@flarehr/superhero-account-registry 1.24.6 → 1.26.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function r(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function o(e){return"function"==typeof e.GetHashCode}function i(e){return null!=e&&"function"==typeof e.Dispose}function s(e,n){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).constructor}t.r(n),t.d(n,"State",(function(){return sf})),t.d(n,"State$reflection",(function(){return uf})),t.d(n,"Msg",(function(){return cf})),t.d(n,"Msg$reflection",(function(){return lf})),t.d(n,"StateModule_init",(function(){return af})),t.d(n,"StateModule_update",(function(){return $f})),t.d(n,"AccountRegistryComponent",(function(){return ff}));class u{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function c(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new u(e[Symbol.iterator]())}function l(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}function a(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function $(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function f(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class d{static id(e){return d.idMap.has(e)||d.idMap.set(e,++d.count),d.idMap.get(e)}}function h(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function p(e){return 2654435761*e|0}function m(e){return 0===e.length?0:e.reduce((e,n)=>(e<<5)+e^n)}function g(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return p(e);case"string":return h(e);default:if(o(e))return e.GetHashCode();if(r(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=g(e[r]);return m(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e).constructor===Object){return m(Object.values(e).map(e=>g(e)))}return p(d.id(e))}}function w(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function _(e,n){return w(e,n,y)}function y(e,n){return e===n||(null==e?null==n:null!=n&&("object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):r(e)?r(n)&&_(e,n):e instanceof Date?n instanceof Date&&0===v(e,n):Object.getPrototypeOf(e).constructor===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!y(e[t[o]],n[r[o]]))return!1;return!0}(e,n))))}function v(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+$(e),r=n.getTime()+$(n)),t===r?0:t<r?-1:1}function b(e,n){return e===n?0:e<n?-1:1}function C(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,x)}function x(e,n){return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):r(e)?r(n)?C(e,n):-1:e instanceof Date?n instanceof Date?v(e,n):-1:Object.getPrototypeOf(e).constructor===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const s=t[o];if(s!==r[o])return s<r[o]?-1:1;if(i=x(e[s],n[s]),0!==i)return i}return 0}(e,n):-1}function S(e,n,t){return e(n,t)>0?n:t}function E(e){const n={};for(const t of e)n[t[0]]=t[1];return n}d.idMap=new WeakMap,d.count=0;function k(e,n){if(null==n||n.length>1)return n;let t;switch(e){case 2:t=(e,t)=>n(e)(t);break;case 3:t=(e,t,r)=>n(e)(t)(r);break;case 4:t=(e,t,r,o)=>n(e)(t)(r)(o);break;case 5:t=(e,t,r,o,i)=>n(e)(t)(r)(o)(i);break;case 6:t=(e,t,r,o,i,s)=>n(e)(t)(r)(o)(i)(s);break;case 7:t=(e,t,r,o,i,s,u)=>n(e)(t)(r)(o)(i)(s)(u);break;case 8:t=(e,t,r,o,i,s,u,c)=>n(e)(t)(r)(o)(i)(s)(u)(c);break;default:throw new Error("Uncurrying to more than 8-arity is not supported: "+e)}return t.__CURRIED__=n,t}function N(e,n){if(null==n||1===n.length)return n;if("__CURRIED__"in n)return n.__CURRIED__;switch(e){case 2:return e=>t=>n(e,t);case 3:return e=>t=>r=>n(e,t,r);case 4:return e=>t=>r=>o=>n(e,t,r,o);case 5:return e=>t=>r=>o=>i=>n(e,t,r,o,i);case 6:return e=>t=>r=>o=>i=>s=>n(e,t,r,o,i,s);case 7:return e=>t=>r=>o=>i=>s=>u=>n(e,t,r,o,i,s,u);case 8:return e=>t=>r=>o=>i=>s=>u=>c=>n(e,t,r,o,i,s,u,c);default:throw new Error("Currying to more than 8-arity is not supported: "+e)}}function A(e,n){return t=>function e(n,t,r,o){const i=r[o];if(0!==i){const e=i[0],n=i[1];e>1&&(t=N(e,t)),n>1&&(t=k(n,t))}const s=n(t);return o+1===r.length?s:n=>e(s,n,r,o+1)}(e,t,n,0)}function I(e,n=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=I(r);else{if(100===n){t+="; ...";break}t+="; "+I(r)}n++}return t+"]"}(e);{const t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map(([e,t])=>e+" = "+I(t,n+1)).join("\n ")+" }":t.name}}return String(e)}class T{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){if(0===this.fields.length)return this.name;{let e="",n=!0;if(1===this.fields.length){const t=I(this.fields[0]);n=t.indexOf(" ")>=0,e=t}else e=this.fields.map(e=>I(e)).join(", ");return this.name+(n?" (":" ")+e+(n?")":"")}}GetHashCode(){const e=this.fields.map(e=>g(e));return e.splice(0,0,p(this.tag)),m(e)}Equals(e){return this===e||!!s(this,e)&&(this.tag===e.tag&&_(this.fields,e.fields))}CompareTo(e){return this===e?0:s(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}function P(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}function D(e){return"{ "+Object.entries(e).map(([e,n])=>e+" = "+I(n)).join("\n ")+" }"}function M(e){return m(Object.values(e).map(e=>g(e)))}function O(e,n){if(e===n)return!0;if(s(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!y(e[t[r]],n[t[r]]))return!1;return!0}return!1}function R(e,n){if(e===n)return 0;if(s(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=x(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}class U{toJSON(){return P(this)}toString(){return D(this)}GetHashCode(){return M(this)}Equals(e){return O(this,e)}CompareTo(e){return R(this,e)}}class L{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}class F{constructor(e,n,t,r){this.declaringType=e,this.tag=n,this.name=t,this.fields=r}}class j{constructor(e,n,t,r,o,i,s){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return K(this)}GetHashCode(){return G(this)}Equals(e){return H(this,e)}}function B(e){return null!=e.generics?e.generics:[]}function G(e){return m([h(e.fullname),...B(e).map(G)])}function H(e,n){return""===e.fullname?""===n.fullname&&w(ie(e),ie(n),([e,n],[t,r])=>e===t&&H(n,r)):e.fullname===n.fullname&&w(B(e),B(n),H)}function W(e,n,t,r){return new j(e,n,t,r)}function z(e,n,t,r){return new j(e,n,t,void 0,r)}function q(e,n,t,r){const o=new j(e,n,t,void 0,void 0,()=>{const e=t.prototype.cases();return r().map((n,t)=>new F(o,t,e[t],n))});return o}function V(e){return new j("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Z(e){return new j("Microsoft.FSharp.Collections.FSharpList`1",[e])}const J=new j("System.Object"),X=(new j("Microsoft.FSharp.Core.Unit"),new j("System.Char"),new j("System.String"));new j("System.Boolean"),new j("System.SByte"),new j("System.Byte"),new j("System.Int16"),new j("System.UInt16"),new j("System.Int32"),new j("System.UInt32"),new j("System.Single"),new j("System.Double"),new j("System.Decimal");function Y(e){if(Array.isArray(e))return e[0];if(e instanceof F)return e.name;{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}function K(e){const n=null==e.generics||Q(e)?[]:e.generics;return n.length>0?e.fullname+"["+n.map(e=>K(e)).join(",")+"]":e.fullname}function Q(e){return e.fullname.endsWith("[]")}function ee(e){return null!=e.enumCases&&e.enumCases.length>0}function ne(e){if(ee(e)&&null!=e.enumCases)return e.enumCases.map(e=>e[1]);throw new Error(e.fullname+" is not an enum type")}function te(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(e.fullname+" is not an enum type")}function re(e,n){const t=parseInt(n,10);return te(e,isNaN(t)?n:t)[1]}function oe(e){if(null!=e.cases)return e.cases();throw new Error(e.fullname+" is not an F# union type")}function ie(e){if(null!=e.fields)return e.fields();throw new Error(e.fullname+" is not an F# record type")}function se(e){return e.fullname.startsWith("System.Tuple")&&!Q(e)}function ue(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}class ce{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return g(this.value)}Equals(e){return null!=e&&y(this.value,e instanceof ce?e.value:e)}CompareTo(e){return null==e?1:x(this.value,e instanceof ce?e.value:e)}}function le(e){return null==e||e instanceof ce?new ce(e):e}function ae(e){if(null==e)throw new Error("Option has no value");return e instanceof ce?e.value:e}function $e(e){return null==e?[]:[ae(e)]}function fe(e,n){return null!=e?ae(e):n}function de(e,n){return null!=n?le(e(ae(n))):void 0}class he extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function pe(e,n){if(0===n.tag){const t=n.fields[0];return new he(0,e(t))}{const e=n.fields[0];return new he(1,e)}}function me(e,n){if(0===n.tag){return e(n.fields[0])}{const e=n.fields[0];return new he(1,e)}}var ge;function we(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function _e(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;if(!function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t=t||function(e,n){if(n&ge.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n)).test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}function ye(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=_e(e,n,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=we(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=we(t,r);if(e>=s&&e<=u)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function ve(e){return-2147483648===e?e:-e}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(ge||(ge={}));const be=Symbol("numeric");function Ce(e){return"number"==typeof e||(null==e?void 0:e[be])}function xe(e,n){return"number"==typeof e?e*n:e[be]().multiply(n)}function Se(e,n){return"number"==typeof e?e.toFixed(n):e[be]().toFixed(n)}function Ee(e,n){return"number"==typeof e?e.toPrecision(n):e[be]().toPrecision(n)}function ke(e,n){return"number"==typeof e?e.toExponential(n):e[be]().toExponential(n)}function Ne(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[be]().toHex()}var Ae=null;try{Ae=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function Ie(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function Te(e){return!0===(e&&e.__isLong__)}Ie.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},Ie.prototype.Equals=function(e){return on(this,e)},Ie.prototype.CompareTo=function(e){return ln(this,e)},Ie.prototype.toString=function(e){return en(this,e)},Ie.prototype.toJSON=function(){return en(this)},Ie.prototype[be]=function(){const e=this;return{multiply:n=>dn(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>en(e.unsigned?e:yn(_n(e),!0),16)}},Ie.prototype.__isLong__,Object.defineProperty(Ie.prototype,"__isLong__",{value:!0});var Pe={},De={};function Me(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=De[e])?r:(t=Re(e,(0|e)<0?-1:0,!0),o&&(De[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=Pe[e])?r:(t=Re(e,e<0?-1:0,!1),o&&(Pe[e]=t),t)}function Oe(e,n){if(isNaN(e))return n?ze:We;if(n){if(e<0)return ze;if(e>=Be)return Xe}else{if(e<=-Ge)return Ye;if(e+1>=Ge)return Je}return e<0?an(Oe(-e,n)):Re(e%je|0,e/je|0,n)}function Re(e,n,t){return new Ie(e,n,t)}var Ue=Math.pow;function Le(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return We;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return an(Le(e.substring(1),n,t));for(var o=Oe(Ue(t,8)),i=We,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+u),t);if(u<8)i=$n(dn(i,Oe(Ue(t,u))),Oe(c));else i=$n(i=dn(i,o),Oe(c))}return i.unsigned=n,i}function Fe(e,n){return"number"==typeof e?Oe(e,n):"string"==typeof e?Le(e,n):Re(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var je=4294967296,Be=je*je,Ge=Be/2,He=Me(1<<24),We=Me(0),ze=Me(0,!0),qe=Me(1),Ve=Me(1,!0),Ze=Me(-1),Je=Re(-1,2147483647,!1),Xe=Re(-1,-1,!0),Ye=Re(0,-2147483648,!1);function Ke(e){return e.unsigned?e.low>>>0:e.low}function Qe(e){return e.unsigned?(e.high>>>0)*je+(e.low>>>0):e.high*je+(e.low>>>0)}function en(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(nn(e))return"0";if(tn(e)){if(on(e,Ye)){var t=Oe(n),r=hn(e,t),o=fn(dn(r,t),e);return en(r,n)+Ke(o).toString(n)}return"-"+en(an(e),n)}for(var i=Oe(Ue(n,6),e.unsigned),s=e,u="";;){var c=hn(s,i),l=(Ke(fn(s,dn(c,i)))>>>0).toString(n);if(nn(s=c))return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}}function nn(e){return 0===e.high&&0===e.low}function tn(e){return!e.unsigned&&e.high<0}function rn(e){return 1==(1&e.low)}function on(e,n){return Te(n)||(n=Fe(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&(e.high===n.high&&e.low===n.low)}function sn(e,n){return ln(e,n)<0}function un(e,n){return ln(e,n)>0}function cn(e,n){return ln(e,n)>=0}function ln(e,n){if(Te(n)||(n=Fe(n)),on(e,n))return 0;var t=tn(e),r=tn(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:tn(fn(e,n))?-1:1}function an(e){return!e.unsigned&&on(e,Ye)?Ye:$n(pn(e),qe)}function $n(e,n){Te(n)||(n=Fe(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,c=n.low>>>16,l=0,a=0,$=0,f=0;return $+=(f+=i+(65535&n.low))>>>16,a+=($+=o+c)>>>16,l+=(a+=r+u)>>>16,l+=t+s,Re(($&=65535)<<16|(f&=65535),(l&=65535)<<16|(a&=65535),e.unsigned)}function fn(e,n){return Te(n)||(n=Fe(n)),$n(e,an(n))}function dn(e,n){if(nn(e))return e.unsigned?ze:We;if(Te(n)||(n=Fe(n)),Ae)return Re(Ae.mul(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned);if(nn(n))return e.unsigned?ze:We;if(on(e,Ye))return rn(n)?Ye:We;if(on(n,Ye))return rn(e)?Ye:We;if(tn(e))return tn(n)?dn(an(e),an(n)):an(dn(an(e),n));if(tn(n))return an(dn(e,an(n)));if(sn(e,He)&&sn(n,He))return Oe(Qe(e)*Qe(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,c=n.low>>>16,l=65535&n.low,a=0,$=0,f=0,d=0;return f+=(d+=i*l)>>>16,$+=(f+=o*l)>>>16,f&=65535,$+=(f+=i*c)>>>16,a+=($+=r*l)>>>16,$&=65535,a+=($+=o*c)>>>16,$&=65535,a+=($+=i*u)>>>16,a+=t*l+r*c+o*u+i*s,Re((f&=65535)<<16|(d&=65535),(a&=65535)<<16|($&=65535),e.unsigned)}function hn(e,n){if(Te(n)||(n=Fe(n)),nn(n))throw Error("division by zero");var t,r,o;if(Ae)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?Re((e.unsigned?Ae.div_u:Ae.div_s)(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned):e;if(nn(e))return e.unsigned?ze:We;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:Re(e.low,e.high,!0)}(n)),un(n,e))return ze;if(un(n,wn(e,1)))return Ve;o=ze}else{if(on(e,Ye))return on(n,qe)||on(n,Ze)?Ye:on(n,Ye)?qe:on(t=mn(hn(gn(e,1),n),1),We)?tn(n)?qe:Ze:o=$n(t,hn(r=fn(e,dn(n,t)),n));if(on(n,Ye))return e.unsigned?ze:We;if(tn(e))return tn(n)?hn(an(e),an(n)):an(hn(an(e),n));if(tn(n))return an(hn(e,an(n)));o=We}for(r=e;cn(r,n);){t=Math.max(1,Math.floor(Qe(r)/Qe(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:Ue(2,i-48),u=Oe(t),c=dn(u,n);tn(c)||un(c,r);)c=dn(u=Oe(t-=s,e.unsigned),n);nn(u)&&(u=qe),o=$n(o,u),r=fn(r,c)}return o}function pn(e){return Re(~e.low,~e.high,e.unsigned)}function mn(e,n){return Te(n)&&(n=Ke(n)),0==(n&=63)?e:n<32?Re(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):Re(0,e.low<<n-32,e.unsigned)}function gn(e,n){return Te(n)&&(n=Ke(n)),0==(n&=63)?e:n<32?Re(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):Re(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}function wn(e,n){if(Te(n)&&(n=Ke(n)),0===(n&=63))return e;var t=e.high;return n<32?Re(e.low>>>n|t<<32-n,t>>>n,e.unsigned):Re(32===n?t:t>>>n-32,0,e.unsigned)}function _n(e,n){return n?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(e):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(e)}function yn(e,n,t){return t?function(e,n){return new Ie(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new Ie(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}const vn=$n,bn=dn,Cn=hn,xn=function(e,n){return Te(n)||(n=Fe(n)),Ae?Re((e.unsigned?Ae.rem_u:Ae.rem_s)(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned):fn(e,dn(hn(e,n),n))},Sn=an,En=function(e,n){return Te(n)||(n=Fe(n)),Re(e.low&n.low,e.high&n.high,e.unsigned)},kn=ln,Nn=Re,An=Ke,In=Qe;function Tn(e,n,t){let r=e,o=0;switch(t){case 0:r=e<<24>>24,o=r;break;case 4:r=e<<24>>>24;break;case 1:r=e<<16>>16,o=r;break;case 5:r=e<<16>>>16;break;case 2:r=e>>0,o=r;break;case 6:r=e>>>0}return Re(r,o>>31,n)}const Pn=/(?:Z|[+-](\d+):?([0-5]?\d)?)\s*$/;function Dn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+a(~~(e/36e5),2)+":"+a(t,2)}function Mn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function On(e,n,t){return n.replace(/(\w)\1*/g,n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r})}function Rn(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Dn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return On(i,n,!0);switch(n){case"D":case"d":return Mn(i,"first");case"T":case"t":return Mn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Dn(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}function Un(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return On(e,n,t);switch(n){case"D":case"d":return t?Mn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Mn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return a(e.getFullYear(),4)+"-"+a(e.getMonth()+1,2)+"-"+a(e.getDate(),2)+"T"+a(e.getHours(),2)+":"+a(e.getMinutes(),2)+":"+a(e.getSeconds(),2)+"."+a(e.getMilliseconds(),3)+(n?Dn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}function Ln(e,n,t){return null!=e.offset?Rn(e,n):Un(e,n)}function Fn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function jn(e){if(null===e)throw new Error("Value cannot be null when parsing DateTime");if(""===e.trim())throw new Error("An empty string is not recognized as a valid DateTime");let n=new Date(e);if(isNaN(n.getTime())){const t=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*([+-]\d+(?::\d+)?)?\s*$/.exec(e);if(null==t)throw new Error("The string is not a valid Date.");{let e,r=0;if(null!=t[2]){const e=t[2].split(":");r=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=t[3]&&"PM"===t[3].toUpperCase()&&(r+=720)}if(null!=t[4]){if(null!=t[1])e=new Date(t[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}const n=t[4].substr(1).split(":");let o=60*parseInt(n[0],10)+parseInt(n[1]||"0",10);"+"===t[4][0]&&(o*=-1),r+=60*o}else if(null!=t[1])e=new Date(t[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}n=new Date(e.getTime()+1e3*r),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}}return n}function Bn(e,n){try{return n.contents=function(e,n=!1){const t=jn(e),r=Pn.exec(e),o=null!=r?n&&"Z"===r[0]?1:2:0;return Fn(t.getTime(),o)}(e),!0}catch(e){return!1}}function Gn(e,n=0){if(0!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}function Hn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Wn(e,n,t=0){let r;if(r=e instanceof RegExp?(r=e,e=n,r.lastIndex=t,r):r=Gn(n,t),!r.global)throw new Error("Non-global RegExp");let o=r.exec(e);const i=[];for(;null!==o;)i.push(o),o=r.exec(e);return i}const zn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/,qn=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Vn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Zn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Jn(e){return{input:e,cont:(n=e,e=>zn.test(n)?function e(n,t,r=new L(null)){return(...o)=>{let i=n;for(const e of o)i=et(i,e,r);return zn.test(i)?e(i,t,r):t(i.replace(/%%/g,"%"))}}(n,e):e(n))};var n}function Xn(e,n){let t=0;return e.replace(qn,(e,r,o,i,s,u)=>Qn(n[t++],r,o,i,s,u)).replace(/%%/g,"%")}function Yn(e,n){return"string"==typeof n?e(n):n.cont(e)}function Kn(e){return Yn(e=>e,e)}function Qn(e,n,t,r,o,i){let s="";if(t=t||"",i=i||"",Ce(e))switch("x"!==i.toLowerCase()&&(Zn(e,0)?(e=xe(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),o=null==o?null:parseInt(o,10),i){case"f":case"F":e=Se(e,o=null!=o?o:6);break;case"g":case"G":e=null!=o?Ee(e,o):Ee(e);break;case"e":case"E":e=null!=o?ke(e,o):ke(e);break;case"x":e=Ne(e);break;case"X":e=Ne(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Ln(e):I(e);if(r="number"==typeof r?r:parseInt(r,10),isNaN(r))e=s+e;else{const n=t.indexOf("0")>=0,o=t.indexOf("-")>=0,i=o||!n?" ":"0";e="0"===i?s+(e=it(e,r-s.length,i,o)):it(s+e,r,i,o)}return n?n+e:e}function et(e,n,t){return e.replace(zn,(e,r,o,i,s,u)=>{if(null!=t.contents)i=t.contents,t.contents=null;else if("*"===i){if(n<0)throw new Error("Non-negative number required");return t.contents=n,e}return Qn(n,r,o,i,s,u).replace(/%/g,"%%")})}function nt(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Vn,(e,t,r,o,i,s)=>{let u=n[t];if(Ce(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Se(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Ee(u,i):Ee(u);break;case"e":case"E":u=null!=i?ke(u,i):ke(u);break;case"p":case"P":i=null!=i?i:2,u=Se(xe(u,100),i)+" %";break;case"d":case"D":u=null!=i?it(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?it(Ne(u),i,"0"):Ne(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/(0+)(\.0+)?/,(n,t,r)=>(Zn(u,0)&&(u=xe(u,-1),e="-"),u=Se(u,null!=r?r.length-1:0),it(u,(t||"").length-e.length+(null!=r?r.length:0),"0"))),u=e+u}}else u=u instanceof Date?Ln(u,s||o):I(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=it(String(u),Math.abs(r)," ",r<0)),u})}function tt(e){return"string"!=typeof e||0===e.length}function rt(e){return"string"!=typeof e||/^\s*$/.test(e)}function ot(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function it(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function st(e,n,t,r){if(r="number"==typeof r?r:void 0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];if(!Array.isArray(n)){if(0===r)return e.split(n,t);const o=arguments.length;n=Array(o-1);for(let e=1;e<o;e++)n[e-1]=arguments[e]}n=(n=n.map(e=>Hn(e))).length>0?n:[" "];let o=0;const i=[],s=new RegExp(n.join("|"),"g");for(;null==t||t>1;){const n=s.exec(e);if(null===n)break;(!r||n.index-o>0)&&(t=null!=t?t-1:t,i.push(e.substring(o,n.index))),o=s.lastIndex}return(!r||e.length-o>0)&&i.push(e.substring(o)),i}function ut(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}const ct=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,lt=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,at=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function $t(e){function n(e){return e.replace(lt,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(ct.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Hn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(lt.test(t))return n(t);if(at.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function ft(e,n){try{return n.contents=$t(e),!0}catch(e){return!1}}class dt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["StreamId"]}}function ht(){return q("MetadataTypes.StreamId",[],dt,()=>[[["Item",X]]])}function pt(e){return e.fields[0]}class mt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Name"]}}class gt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Website"]}}class wt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["FirstName"]}}class _t extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LastName"]}}class yt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Email"]}}class vt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["MobilePhone"]}}class bt extends U{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}class Ct extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Notes"]}}class xt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}function St(){return q("BasicModels.PartnerId",[],xt,()=>[[["Item",X]]])}class Et extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}function kt(){return q("BasicModels.AccountId",[],Et,()=>[[["Item",X]]])}function Nt(e,n){return"function"==typeof e?new e(n):new Array(n)}function At(){throw new Error("Arrays had different lengths")}function It(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function Tt(e,n,t){const r=0|n.length,o=Nt(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function Pt(e,n,t){if(e<0)throw new Error("The input must be non-negative\\nParameter name: count");const r=Nt(t,e);for(let t=0;t<=e-1;t++)r[t]=n(t);return r}function Dt(e,n,t){return t.reduce((n,t)=>e(n,t),n)}function Mt(e,n){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(0===n.length)return[[]];{const t=[];for(let r=0;r<=~~Math.ceil(n.length/e)-1;r++){let o;const i=0|(r*e|0);o=n.slice(i,i+e),t.push(o)}return t}}function Ot(e,n,t){return 0===function(e,n,t){if(null==n)return null==t?0:-1;if(null==t)return 1;{let r=0,o=0;const i=0|n.length,s=0|t.length;if(i>s)return 1;if(i<s)return-1;for(;r<i&&0===o;)o=e(n[r],t[r]),r+=1;return 0|o}}((e,n)=>x(e,n),n,t)}function Rt(e,n,t){return n.reduceRight((n,t)=>e(t,n),t)}function Ut(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&At();const i=0|n.length;for(let r=1;r<=i;r++)o=e(r-1,n[i-r],t[i-r],o);return o}((n,t,r,o)=>e(t,r,o),n,t,r)}class Lt extends U{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+ot("; ",this)+"]"}Equals(e){const n=this;if(n===e)return!0;return((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1];if(y(t.head,r.head)){e=i,n=s;continue e}return!1}return!1}return null==o[1]}})(n,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,s=i.tail;if(null==s)return 0|o;{const u=s;if(r>18)return 0|o;e=r+1,n=(o<<1)+g(i.head)+631*r,t=u}}})(0,0,this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1],u=0|x(t.head,r.head);if(0===u){e=i,n=s;continue e}return 0|u}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return function(e){return new Ft(e)}(this)}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}}class Ft{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){this.it=this.xs,this.current=null}Dispose(){}}function jt(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}function Bt(e){if(null!=e.tail)return e.head;throw new Error("List was empty\\nParameter name: list")}function Gt(e){const n=e.tail;if(null!=n){return n}throw new Error("List was empty\\nParameter name: list")}function Ht(){return new Lt(null,void 0)}function Wt(e,n){return new Lt(e,n)}function zt(e){return new Lt(e,new Lt(null,void 0))}function qt(e){return null==e.tail}function Vt(e){return jt(e)}function Zt(e){return Bt(e)}function Jt(e){return Gt(e)}function Xt(e){const n=0|jt(e),t=It(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(null==o.tail)break;t[r]=Bt(o),e=r+1,n=Gt(o)}})(0,e),t}function Yt(e,n,t){let r=n,o=t;for(;null!=o.tail;)r=e(r,Bt(o)),o=Gt(o);return r}function Kt(e){return Yt((e,n)=>new Lt(n,e),new Lt(null,void 0),e)}function Qt(e,n){return Yt((n,t)=>{e(t)},void 0,n)}function er(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=new Lt(e[n],t);return t}function nr(e){return er(e,new Lt(null,void 0))}function tr(e){if(r(e)){return nr(e)}if(e instanceof Lt){return e}{const n=new Lt(null,void 0);let t=n;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"](),n=t,o=new Lt(e,void 0);n.tail=o,t=o}}finally{r.Dispose()}const o=t,i=new Lt(null,void 0);return o.tail=i,Gt(n)}}function rr(e,n){return Yt((e,n)=>new Lt(n,e),n,Kt(e))}function or(e,n){const t=new Lt(null,void 0),r=function(e,n,t){return((n,t,r)=>{for(;;){const o=n,i=t,s=r;if(null==s.tail)return i;n=o+1,t=e(o,i,Bt(s)),r=Gt(s)}})(0,n,t)}((n,t,r)=>{const o=new Lt(e(n,r),void 0);return t.tail=o,o},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}function ir(e,n){const t=new Lt(null,void 0),r=Yt((n,t)=>{const r=new Lt(e(t),void 0);return n.tail=r,r},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}function sr(e,n){return(n=>{e:for(;;){const t=n;if(null==t.tail)return;{const r=e(Bt(t));if(null==r){n=Gt(t);continue e}return r}}})(n)}function ur(e,n){return sr(n=>e(n)?le(n):void 0,n)}function cr(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(null==o.tail)return;if(r===e)return le(Bt(o));n=r+1,t=Gt(o)}})(0,n)}function lr(){return e=(e,n)=>x(e,n),{Compare:(n,t)=>e(n,t)};var e}function ar(){return lr()}function $r(){throw new Error("Enumeration has not started. Call MoveNext.")}function fr(){throw new Error("Enumeration already finished.")}class dr{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=c(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=I(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e+=1;return 4===e&&(n+="; ..."),n+"]"}finally{t.Dispose()}}GetEnumerator(){return this.f()}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class hr{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){return function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function pr(e,n,t){return new hr(e,n,t)}function mr(e){let n=void 0,t=void 0,r=!1,o=!1,i=void 0;const s=()=>{if(o=!0,null!=t){const e=t;try{e.Dispose()}finally{t=void 0}}if(null!=n){const e=n;try{e.Dispose()}finally{n=void 0}}};return pr(()=>{if(r?o&&fr():$r(),null!=i){return ae(i)}return fr()},()=>(r||(r=!0),!o&&(()=>{let r,o=void 0;for(;null==o;){const u=[n,t];if(null!=u[0])if(null!=u[1]){const e=u[1];if(e["System.Collections.IEnumerator.MoveNext"]())i=le(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{e.Dispose()}finally{t=void 0}}else{const e=u[0];if(e["System.Collections.IEnumerator.MoveNext"]()){r=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=c(r)}else s(),o=!1}else n=c(e)}return ae(o)})()),()=>{o||s()})}function gr(e,n,t){let r=!1,o=void 0,i=le(e());const s=()=>{if(null!=i){const e=ae(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{o=void 0}};return pr(()=>{if(r||$r(),null!=o){return ae(o)}return fr()},()=>{if(r||(r=!0),null!=i){const e=ae(i);let t;try{t=n(e)}catch(e){throw u(),e}if(null!=t){return o=t,!0}return u(),!1}return!1},s)}function wr(e,n){null==n&&function(e){throw new Error(e)}(e)}function _r(e){return function(e){return new dr(e)}(e)}function yr(e){return wr("source",e),c(e)}function vr(e){return _r(()=>c(e()))}function br(e){return _r(()=>mr(e))}function Cr(){return vr(()=>new Array(0))}function xr(e){return vr(()=>function(e,n){const t=Nt(n,1);return t[0]=e,t}(e))}function Sr(e){if(r(e)){return nr(e)}if(e instanceof Lt){return e}return tr(e)}function Er(e,n,t){return _r(()=>gr(e,n,t))}function kr(e,n,t){return _r(()=>{let r=-1;return gr(e,e=>(r+=1,n(r,e)),t)})}function Nr(e,n){return br([e,n])}function Ar(e,n){return Er(()=>yr(n),n=>{let t=void 0;for(;null==t&&n["System.Collections.IEnumerator.MoveNext"]();)t=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return t},e=>{e.Dispose()})}function Ir(e,n,t){const r=yr(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{r.Dispose()}}function Tr(e,n,t){const r=yr(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{r.Dispose()}}function Pr(e,n){return Tr((n,t)=>{e(t)},void 0,n)}function Dr(e,n){return Er(()=>yr(n),n=>n["System.Collections.IEnumerator.MoveNext"]()?le(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,e=>{e.Dispose()})}function Mr(e,n){return kr(()=>yr(n),(n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?le(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,e=>{e.Dispose()})}!function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$R$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1E(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν$(.çђ$,ɪ⇜ɜ*B$-'%A%($-S*(''$$--$*$8(6˓CC:'n'$$Z*'0c%$$$.%1+ӹM,⌚łT&4'+Ưध(0&,*-%$%$'ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&/|*/7/'[+-)K+A%%q$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ፮$A£ē︳𐀡%𐀡"].map(e=>{var n;return(null!==(n=e.codePointAt(0))&&void 0!==n?n:0)-35}),n=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map(e=>{var n;return(null!==(n=e.codePointAt(0))&&void 0!==n?n:0)-35}),t=new Uint32Array(e),r=new Uint8Array(n);for(let e=1;e<t.length;++e)t[e]+=t[e-1]}();function Or(e,n){const t=function(e,n,t=0){let r;return r=e instanceof RegExp?(r=e,e=n,r.lastIndex=t,r):r=Gn(n,t),r.exec(e)}(Gn(e),n);return null!=t?Jt(Sr(vr(()=>Dr(e=>e||"",t)))):void 0}function Rr(e,n){return tt(n)?new he(1,Kn(Jn("%s cannot be null or empty"))(e)):new he(0,n)}function Ur(e){const n=function(e){let n;const t=Or(".*?@(.*)",e);switch(n=null!=t?qt(t)?1:qt(Jt(t))?0:1:1,n){case 0:return e;case 1:return}}(e);if(null!=n){return new he(0,n)}return new he(1,"Email is not in the correct format")}class Lr{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}}class Fr extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Fr.prototype)}}class jr{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>jr.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function Br(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Fr);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack(()=>{try{e(n)}catch(e){n.onError(e)}});else try{e(n)}catch(e){n.onError(e)}}}function Gr(e,n){return Br(t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(e)}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function Hr(e){return Br(n=>n.onSuccess(e))}const Wr=new class{Bind(e,n){return Gr(e,n)}Combine(e,n){return this.Bind(e,()=>n)}Delay(e){return Br(n=>e()(n))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While(()=>!r.done,this.Delay(()=>{const e=n(r.value);return r=t.next(),e}))}Return(e){return Hr(e)}ReturnFrom(e){return e}TryFinally(e,n){return Br(t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})})}TryWith(e,n){return Br(t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(e)}}})})}Using(e,n){return this.TryFinally(n(e),()=>e.Dispose())}While(e,n){return e()?this.Bind(n,()=>this.While(e,n)):this.Return(void 0)}Zero(){return Br(e=>e.onSuccess(void 0))}};class zr{constructor(){}}function qr(e,n){return new he(0,n)}function Vr(e,n){return n}function Zr(e,n,t){return pe(t,n)}new zr;function Jr(e){return e.fields[0]}function Xr(e){return e.fields[0]}function Yr(e){return e.fields[0]}function Kr(e){return e.fields[0]}function Qr(e){return e.fields[0]}class eo extends U{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}function no(){return z("Dto.Primitives.ContactDetails",[],eo,()=>[["FirstName",X],["LastName",X],["Email",X],["MobilePhone",X]])}function to(e){return Vr(0,()=>me(n=>{const t=n;return me(n=>{const r=n;return me(n=>{const o=n;return Zr(0,pe(e=>new vt(0,e),Rr("MobilePhone",e.MobilePhone)),e=>new bt(t,r,o,e))},pe(e=>new yt(0,e),me(e=>Ur(e),Rr("Email",e.Email))))},pe(e=>new _t(0,e),Rr("LastName",e.LastName)))},pe(e=>new wt(0,e),Rr("FirstName",e.FirstName))))()}function ro(e){if(null!=e){return e.fields[0]}}function oo(e){return e.fields[0]}function io(e){return e.fields[0]}class so extends U{constructor(e,n,t,r,o,i,s,u,c){super(),this.BusinessName=e,this.BusinessNumber=n,this.Address1=t,this.Address2=r,this.City=o,this.Postcode=i,this.State=s,this.Phone=u,this.CountryCode=c}}class uo extends U{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}class co extends U{constructor(e,n,t,r,o,i,s){super(),this.StreamId=e,this.PartnerId=n,this.Name=t,this.Website=r,this.ContactDetails=o,this.Notes=i,this.LegalEntity=s}}function lo(){return z("Dto.AdminApi.Account",[],co,()=>[["StreamId",X],["PartnerId",X],["Name",X],["Website",X],["ContactDetails",no()],["Notes",V(X)],["LegalEntity",V(z("Dto.Primitives.LegalEntity",[],so,()=>[["BusinessName",X],["BusinessNumber",X],["Address1",X],["Address2",V(X)],["City",X],["Postcode",X],["State",V(X)],["Phone",X],["CountryCode",V(X)]]))]])}class ao extends U{constructor(e,n,t,r,o,i,s){super(),this.AccountId=e,this.Name=n,this.Contact=t,this.ContactMobilePhone=r,this.Website=o,this.BusinessName=i,this.BusinessNumber=s}}function $o(){return z("Dto.AdminApi.AccountLookupItem",[],ao,()=>[["AccountId",X],["Name",X],["Contact",X],["ContactMobilePhone",X],["Website",X],["BusinessName",V(X)],["BusinessNumber",V(X)]])}class fo extends U{constructor(e,n){super(),this.Accounts=e,this.Token=n}}function ho(){return z("Dto.AdminApi.AccountLookup",[],fo,()=>[["Accounts",Z($o())],["Token",V(X)]])}var po,mo,go,wo,_o,yo,vo,bo={},Co=[],xo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function So(e,n){for(var t in n)e[t]=n[t];return e}function Eo(e){var n=e.parentNode;n&&n.removeChild(e)}function ko(e,n,t){var r,o,i,s={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?po.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return No(e,s,r,o,null)}function No(e,n,t,r,o){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++go:o};return null==o&&null!=mo.vnode&&mo.vnode(i),i}function Ao(e){return e.children}function Io(e,n){this.props=e,this.context=n}function To(e,n){if(null==n)return e.__?To(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?To(e):null}function Po(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return Po(e)}}function Do(e){(!e.__d&&(e.__d=!0)&&wo.push(e)&&!Mo.__r++||yo!==mo.debounceRendering)&&((yo=mo.debounceRendering)||_o)(Mo)}function Mo(){for(var e;Mo.__r=wo.length;)e=wo.sort((function(e,n){return e.__v.__b-n.__v.__b})),wo=[],e.some((function(e){var n,t,r,o,i,s;e.__d&&(i=(o=(n=e).__v).__e,(s=n.__P)&&(t=[],(r=So({},o)).__v=o.__v+1,Ho(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?To(o):i,o.__h),Wo(t,o),o.__e!=i&&Po(o)))}))}function Oo(e,n,t,r,o,i,s,u,c,l){var a,$,f,d,h,p,m,g=r&&r.__k||Co,w=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?No(null,d,null,null,d):Array.isArray(d)?No(Ao,{children:d},null,null,null):d.__b>0?No(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(f=g[a])||f&&d.key==f.key&&d.type===f.type)g[a]=void 0;else for($=0;$<w;$++){if((f=g[$])&&d.key==f.key&&d.type===f.type){g[$]=void 0;break}f=null}Ho(e,d,f=f||bo,o,i,s,u,c,l),h=d.__e,($=d.ref)&&f.ref!=$&&(m||(m=[]),f.ref&&m.push(f.ref,null,d),m.push($,d.__c||h,d)),null!=h?(null==p&&(p=h),"function"==typeof d.type&&d.__k===f.__k?d.__d=c=Ro(d,c,e):c=Lo(e,d,f,g,h,c),"function"==typeof t.type&&(t.__d=c)):c&&f.__e==c&&c.parentNode!=e&&(c=To(f))}for(t.__e=p,a=w;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=To(r,a+1)),qo(g[a],g[a]));if(m)for(a=0;a<m.length;a++)zo(m[a],m[++a],m[++a])}function Ro(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?Ro(r,n,t):Lo(t,r,r,o,r.__e,n));return n}function Uo(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Uo(e,n)})):n.push(e)),n}function Lo(e,n,t,r,o,i){var s,u,c;if(void 0!==n.__d)s=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<r.length;c+=2)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function Fo(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||xo.test(n)?t:t+"px"}function jo(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||Fo(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||Fo(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?Go:Bo,i):e.removeEventListener(n,i?Go:Bo,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function Bo(e){this.l[e.type+!1](mo.event?mo.event(e):e)}function Go(e){this.l[e.type+!0](mo.event?mo.event(e):e)}function Ho(e,n,t,r,o,i,s,u,c){var l,a,$,f,d,h,p,m,g,w,_,y=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(c=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(l=mo.__b)&&l(n);try{e:if("function"==typeof y){if(m=n.props,g=(l=y.contextType)&&r[l.__c],w=l?g?g.props.value:l.__:r,t.__c?p=(a=n.__c=t.__c).__=a.__E:("prototype"in y&&y.prototype.render?n.__c=a=new y(m,w):(n.__c=a=new Io(m,w),a.constructor=y,a.render=Vo),g&&g.sub(a),a.props=m,a.state||(a.state={}),a.context=w,a.__n=r,$=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=y.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=So({},a.__s)),So(a.__s,y.getDerivedStateFromProps(m,a.__s))),f=a.props,d=a.state,$)null==y.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==y.getDerivedStateFromProps&&m!==f&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,w)||n.__v===t.__v){a.props=m,a.state=a.__s,n.__v!==t.__v&&(a.__d=!1),a.__v=n,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),a.__h.length&&s.push(a);break e}null!=a.componentWillUpdate&&a.componentWillUpdate(m,a.__s,w),null!=a.componentDidUpdate&&a.__h.push((function(){a.componentDidUpdate(f,d,h)}))}a.context=w,a.props=m,a.state=a.__s,(l=mo.__r)&&l(n),a.__d=!1,a.__v=n,a.__P=e,l=a.render(a.props,a.state,a.context),a.state=a.__s,null!=a.getChildContext&&(r=So(So({},r),a.getChildContext())),$||null==a.getSnapshotBeforeUpdate||(h=a.getSnapshotBeforeUpdate(f,d)),_=null!=l&&l.type===Ao&&null==l.key?l.props.children:l,Oo(e,Array.isArray(_)?_:[_],n,t,r,o,i,s,u,c),a.base=n.__e,n.__h=null,a.__h.length&&s.push(a),p&&(a.__E=a.__=null),a.__e=!1}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=function(e,n,t,r,o,i,s,u){var c,l,a,$=t.props,f=n.props,d=n.type,h=0;if("svg"===d&&(o=!0),null!=i)for(;h<i.length;h++)if((c=i[h])&&"setAttribute"in c==!!d&&(d?c.localName===d:3===c.nodeType)){e=c,i[h]=null;break}if(null==e){if(null===d)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,f.is&&f),i=null,u=!1}if(null===d)$===f||u&&e.data===f||(e.data=f);else{if(i=i&&po.call(e.childNodes),l=($=t.props||bo).dangerouslySetInnerHTML,a=f.dangerouslySetInnerHTML,!u){if(null!=i)for($={},h=0;h<e.attributes.length;h++)$[e.attributes[h].name]=e.attributes[h].value;(a||l)&&(a&&(l&&a.__html==l.__html||a.__html===e.innerHTML)||(e.innerHTML=a&&a.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||jo(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||jo(e,i,n[i],t[i],r)}(e,f,$,o,u),a)n.__k=[];else if(h=n.props.children,Oo(e,Array.isArray(h)?h:[h],n,t,r,o&&"foreignObject"!==d,i,s,i?i[0]:t.__k&&To(t,0),u),null!=i)for(h=i.length;h--;)null!=i[h]&&Eo(i[h]);u||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===d&&!h||"option"===d&&h!==$.value)&&jo(e,"value",h,$.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&jo(e,"checked",h,$.checked,!1))}return e}(t.__e,n,t,r,o,i,s,c);(l=mo.diffed)&&l(n)}catch(e){n.__v=null,(c||null!=i)&&(n.__e=u,n.__h=!!c,i[i.indexOf(u)]=null),mo.__e(e,n,t)}}function Wo(e,n){mo.__c&&mo.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){mo.__e(e,n.__v)}}))}function zo(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){mo.__e(e,t)}}function qo(e,n,t){var r,o;if(mo.unmount&&mo.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||zo(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){mo.__e(e,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&qo(r[o],n,"function"!=typeof e.type);t||null==e.__e||Eo(e.__e),e.__e=e.__d=void 0}function Vo(e,n,t){return this.constructor(e,t)}function Zo(e,n,t){var r,o,i;mo.__&&mo.__(e,n),o=(r="function"==typeof t)?null:t&&t.__k||n.__k,i=[],Ho(n,e=(!r&&t||n).__k=ko(Ao,null,[e]),o||bo,bo,void 0!==n.ownerSVGElement,!r&&t?[t]:o?null:n.firstChild?po.call(n.childNodes):null,i,!r&&t?t:o?o.__e:n.firstChild,r),Wo(i,e)}function Jo(e,n){Zo(e,n,Jo)}function Xo(e,n,t){var r,o,i,s=So({},e.props);for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];return arguments.length>2&&(s.children=arguments.length>3?po.call(arguments,2):t),No(e.type,s,r||e.key,o||e.ref,null)}po=Co.slice,mo={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},go=0,Io.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=So({},this.state),"function"==typeof e&&(e=e(So({},t),this.props)),e&&So(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),Do(this))},Io.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Do(this))},Io.prototype.render=Ao,wo=[],_o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mo.__r=0,vo=0;var Yo,Ko,Qo,ei=0,ni=[],ti=mo.__b,ri=mo.__r,oi=mo.diffed,ii=mo.__c,si=mo.unmount;function ui(e,n){mo.__h&&mo.__h(Ko,e,ei||n),ei=0;var t=Ko.__H||(Ko.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function ci(e){return ei=1,li(_i,e)}function li(e,n,t){var r=ui(Yo++,2);return r.t=e,r.__c||(r.__=[t?t(n):_i(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ko),r.__}function ai(e,n){var t=ui(Yo++,3);!mo.__s&&wi(t.__H,n)&&(t.__=e,t.__H=n,Ko.__H.__h.push(t))}function $i(e,n){var t=ui(Yo++,4);!mo.__s&&wi(t.__H,n)&&(t.__=e,t.__H=n,Ko.__h.push(t))}function fi(e,n){var t=ui(Yo++,7);return wi(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function di(e,n){mo.useDebugValue&&mo.useDebugValue(n?n(e):e)}function hi(){for(var e;e=ni.shift();)if(e.__P)try{e.__H.__h.forEach(mi),e.__H.__h.forEach(gi),e.__H.__h=[]}catch(n){e.__H.__h=[],mo.__e(n,e.__v)}}mo.__b=function(e){Ko=null,ti&&ti(e)},mo.__r=function(e){ri&&ri(e),Yo=0;var n=(Ko=e.__c).__H;n&&(n.__h.forEach(mi),n.__h.forEach(gi),n.__h=[])},mo.diffed=function(e){oi&&oi(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==ni.push(n)&&Qo===mo.requestAnimationFrame||((Qo=mo.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),pi&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);pi&&(n=requestAnimationFrame(t))})(hi)),Ko=null},mo.__c=function(e,n){n.some((function(e){try{e.__h.forEach(mi),e.__h=e.__h.filter((function(e){return!e.__||gi(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],mo.__e(t,e.__v)}})),ii&&ii(e,n)},mo.unmount=function(e){si&&si(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{mi(e)}catch(e){n=e}})),n&&mo.__e(n,t.__v))};var pi="function"==typeof requestAnimationFrame;function mi(e){var n=Ko,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),Ko=n}function gi(e){var n=Ko;e.__c=e.__(),Ko=n}function wi(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _i(e,n){return"function"==typeof n?n(e):n}function yi(e,n){for(var t in n)e[t]=n[t];return e}function vi(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function bi(e){this.props=e}(bi.prototype=new Io).isPureReactComponent=!0,bi.prototype.shouldComponentUpdate=function(e,n){return vi(this.props,e)||vi(this.state,n)};var Ci=mo.__b;mo.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ci&&Ci(e)};var xi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Si(e){function n(n,t){var r=yi({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=xi,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Ei=function(e,n){return null==e?null:Uo(Uo(e).map(n))},ki={map:Ei,forEach:Ei,count:function(e){return e?Uo(e).length:0},only:function(e){var n=Uo(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:Uo},Ni=mo.__e;mo.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);Ni(e,n,t)};var Ai=mo.unmount;function Ii(){this.__u=0,this.t=null,this.__b=null}function Ti(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Pi(){this.u=null,this.o=null}mo.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Ai&&Ai(e)},(Ii.prototype=new Io).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=Ti(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=s;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},c=!0===n.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},Ii.prototype.componentWillUnmount=function(){this.t=[]},Ii.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=yi({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&ko(Ao,null,e.fallback);return o&&(o.__h=null),[ko(Ao,null,n.__e?null:e.children),o]};var Di=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function Mi(e){return this.getChildContext=function(){return e.context},e.children}function Oi(e){var n=this,t=e.i;n.componentWillUnmount=function(){Zo(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),Zo(ko(Mi,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Pi.prototype=new Io).__e=function(e){var n=this,t=Ti(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Di(n,e,r)):o()};t?t(i):i()}},Pi.prototype.render=function(e){this.u=null,this.o=new Map;var n=Uo(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Pi.prototype.componentDidUpdate=Pi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Di(e,t,n)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ui=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Li="undefined"!=typeof document,Fi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};Io.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Io.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var ji=mo.event;function Bi(){}function Gi(){return this.cancelBubble}function Hi(){return this.defaultPrevented}mo.event=function(e){return ji&&(e=ji(e)),e.persist=Bi,e.isPropagationStopped=Gi,e.isDefaultPrevented=Hi,e.nativeEvent=e};var Wi,zi={configurable:!0,get:function(){return this.class}},qi=mo.vnode;mo.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var s=t[i];Li&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==s||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Fi(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Ui.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=Uo(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=Uo(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(zi.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",zi))}e.$$typeof=Ri,qi&&qi(e)};var Vi=mo.__r;mo.__r=function(e){Vi&&Vi(e),Wi=e.__c};function Zi(e){return!!e&&e.$$typeof===Ri}const Ji={useState:ci,useReducer:li,useEffect:ai,useLayoutEffect:$i,useRef:function(e){return ei=5,fi((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){ei=6,$i((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:fi,useCallback:function(e,n){return ei=8,fi((function(){return e}),n)},useContext:function(e){var n=Ko.context[e.__c],t=ui(Yo++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(Ko)),n.props.value):e.__},useDebugValue:di,version:"17.0.2",Children:ki,render:function(e,n,t){return null==n.__k&&(n.textContent=""),Zo(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return Jo(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Zo(null,e),!0)},createPortal:function(e,n){return ko(Oi,{__v:e,i:n})},createElement:ko,createContext:function(e,n){var t={__c:n="__cC"+vo++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(Do)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return ko.bind(null,e)},cloneElement:function(e){return Zi(e)?Xo.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Ao,isValidElement:Zi,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:Io,PureComponent:bi,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:vi(this.props,e)}function r(n){return this.shouldComponentUpdate=t,ko(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:Si,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:Ao,Suspense:Ii,SuspenseList:Pi,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return ko(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(e){return Wi.__n[e.__c].props.value}}}}},Xi=e=>{ai(()=>{const n=e();return()=>{n.Dispose()}})},Yi=(e,n)=>{ai(()=>{const n=e();return()=>{n.Dispose()}},n)},Ki=e=>{$i(()=>{const n=e();return()=>{n.Dispose()}})};function Qi(e,n,t,r){const o=Ji.memo(e,k(2,fe(N(2,t),null)));return Pr(n=>{e.displayName=n},$e(n)),e=>{const n=es(r,e);return Ji.createElement(o,n)}}function es(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}function ns(e){return{Dispose(){e()}}}function ts(e){Xi(e)}function rs(e,n){Yi(e,n)}function os(e){ss(e,[])}function is(e){rs(e,[])}function ss(e,n){Yi(n=>(e(),ns(()=>{})),n)}function us(e,n){return Ji.useCallback(e,fe(n,[]))}function cs(e){return Ji.useRef(e)}function ls(e,n){return Ji.useMemo(e,fe(n,[]))}function as(e){const n=cs(e),t=us(e=>n.current(e),[]);var r;return r=()=>{n.current=e},Ki(e=>(r(),ns(()=>{}))),t}function $s(e){return Ji.useState(e)}function fs(e){}function ds(e){const n=new Lr("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout(()=>{n.cancel()},e),n}function hs(e){e.cancel()}function ps(e){return null!=e&&e.isCancelled}const ms=new Lr;function gs(e){return Br(n=>e([n.onSuccess,n.onError,n.onCancel]))}function ws(e,n){return function(e,n){return _s(e,n)}(e,n)}function _s(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new jr;e({onSuccess:n||fs,onError:t||fs,onCancel:r||fs,cancelToken:o||ms,trampoline:i})}class ys{constructor(e,n){this.k=e,this.v=n}}function vs(e,n){return new ys(e,n)}function bs(e){return e.k}function Cs(e){return e.v}class xs extends ys{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=o}}function Ss(e,n,t,r,o){return new xs(e,n,t,r,o)}function Es(e){return e.left}function ks(e){return e.right}function Ns(e){return e.h}function As(e){return function e(n,t){e:for(;;){const r=n,o=t;if(null!=o){const i=o;if(i instanceof xs){const o=i;n=e(r+1,Es(o)),t=ks(o);continue e}return r+1|0}return 0|r}}(0,e)}function Is(e,n,t,r){let o,i,s;if(null!=e){const n=e;s=n instanceof xs?(o=n,Ns(o)):1}else s=0;let u;if(null!=r){const e=r;u=e instanceof xs?(i=e,Ns(i)):1}else u=0;const c=0|(s<u?u:s);return 0===c?vs(n,t):Ss(n,t,e,r,c+1)}function Ts(e,n,t,r){let o,i,s,u,c,l,a,$,f;if(null!=e){const n=e;f=n instanceof xs?(o=n,Ns(o)):1}else f=0;let d;if(null!=r){const e=r;d=e instanceof xs?(i=e,Ns(i)):1}else d=0;if(d>f+2){const o=ae(r);if(o instanceof xs){const r=o;if(s=Es(r),(null!=s?(u=s,u instanceof xs?(c=u,Ns(c)):1):0)>f+1){const o=ae(Es(r));if(o instanceof xs){const i=o;return Is(Is(e,n,t,Es(i)),bs(i),Cs(i),Is(ks(i),bs(r),Cs(r),ks(r)))}throw new Error("internal error: Map.rebalance")}return Is(Is(e,n,t,Es(r)),bs(r),Cs(r),ks(r))}throw new Error("internal error: Map.rebalance")}if(f>d+2){const o=ae(e);if(o instanceof xs){const e=o;if(l=ks(e),(null!=l?(a=l,a instanceof xs?($=a,Ns($)):1):0)>d+1){const o=ae(ks(e));if(o instanceof xs){const i=o;return Is(Is(Es(e),bs(e),Cs(e),Es(i)),bs(i),Cs(i),Is(ks(i),n,t,r))}throw new Error("internal error: Map.rebalance")}return Is(Es(e),bs(e),Cs(e),Is(ks(e),n,t,r))}throw new Error("internal error: Map.rebalance")}return Is(e,n,t,r)}function Ps(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,bs(o));if(o instanceof xs){const r=o;return i<0?Ts(Ps(e,n,t,Es(r)),bs(r),Cs(r),ks(r)):0===i?Ss(n,t,Es(r),ks(r),Ns(r)):Ts(Es(r),bs(r),Cs(r),Ps(e,n,t,ks(r)))}return i<0?Ss(n,t,void 0,r,2):0===i?vs(n,t):Ss(n,t,r,void 0,2)}return vs(n,t)}function Ds(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,bs(s));if(0===u)return le(Cs(s));if(s instanceof xs){const i=s;e=r,n=o,t=u<0?Es(i):ks(i);continue e}return}return}}function Ms(e,n){!function e(n,t){e:for(;;){const r=n,o=t;if(null!=o){const i=o;if(i instanceof xs){const o=i;e(r,Es(o)),r(bs(o),Cs(o)),n=r,t=ks(o);continue e}r(bs(i),Cs(i))}break}}(e,n)}function Os(e,n){return function e(n,t){if(null!=t){const r=t;if(r instanceof xs){const t=r,o=e(n,Es(t)),i=n(bs(t),Cs(t)),s=e(n,ks(t));return Ss(bs(t),i,o,s,Ns(t))}return vs(bs(r),n(bs(r),Cs(r)))}}(e,n)}function Rs(e,n,t){let r=0|t;Ms((e,t)=>{n[r]=[e,t],r+=1},e)}function Us(e,n){let t=void 0;for(let r=0;r<=n.length-1;r++){const o=n[r],i=o[1];t=Ps(e,o[0],i,t)}return t}function Ls(e,n){if(r(n)){return Us(e,n)}if(n instanceof Lt){return function(e,n){return Yt((n,t)=>{const r=t[0],o=t[1];return Ps(e,r,o,n)},void 0,n)}(e,n)}{const t=c(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"](),u=s[1];e=r,n=Ps(r,s[0],u,o),t=i}}}(e,void 0,t)}finally{t.Dispose()}}}class Fs extends U{constructor(e,n){super(),this.stack=e,this.started=n}}function js(e){e:for(;;){const n=e;if(qt(n))return Ht();{const t=Jt(n),r=Zt(n);if(null!=r){const o=r;if(o instanceof xs){const n=o;e=er([Es(n),vs(bs(n),Cs(n)),ks(n)],t);continue e}return n}e=t;continue e}}}function Bs(e){return new Fs(js(zt(e)),!1)}function Gs(e){if(e.started){const n=e.stack;if(qt(n))return function(){throw new Error("enumeration already finished")}();if(null!=Zt(n)){const e=Zt(n);if(e instanceof xs)throw new Error("Please report error: Map iterator, unexpected stack for current");return[bs(e),Cs(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Hs(e){let n=Bs(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Gs(n),"System.Collections.IEnumerator.get_Current":()=>Gs(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(qt(n))return!1;if(null!=Zt(n)){const t=Zt(n),r=Jt(n);if(t instanceof xs)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=js(r),!qt(e.stack)}Jt(n);throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!qt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Bs(e)},Dispose(){}}}class Ws{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e[1],i=e[0];t=n(t,g(i)),t=n(t,g(o))}}finally{r.Dispose()}return 0|t}(this)}Equals(e){if(!(e instanceof Ws))return!1;{const n=e,t=c(this);try{const e=c(n);try{const n=()=>{const r=t["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=t["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!y(r[0],o[0])||!y(r[1],o[1]))&&n()}return!0}return!1};return n()}finally{e.Dispose()}}finally{t.Dispose()}}}toString(){return"map ["+ot("; ",Dr(e=>nt("({0}, {1})",e[0],e[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}GetEnumerator(){return Hs(this.tree)}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Hs(this.tree)}CompareTo(e){const n=this;if(e instanceof Ws){return 0|function(e,n,t){const r=yr(n);try{const n=yr(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{n.Dispose()}}finally{r.Dispose()}}((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:x(e[1],t[1]))},n,e)}throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return!!Js(this,e[0])&&y(Vs(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Rs(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Zs(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Zs(this)}get size(){return 0|Zs(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Dr(e=>[e[0],e[1]],this)}get(e){return Vs(this,e)}has(e){return Js(this,e)}keys(){return Dr(e=>e[0],this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Dr(e=>e[1],this)}forEach(e,n){const t=this;Pr(n=>{e(n[1],n[0],t)},t)}}function zs(e,n){return new Ws(e,n)}function qs(e){const n=ar();return zs(n,Ls(n,e))}function Vs(e,n){return function(e,n,t){const r=Ds(e,n,t);if(null==r)throw new Error;return ae(r)}(e.comparer,n,e.tree)}function Zs(e){return As(e.tree)}function Js(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,bs(s));if(s instanceof xs){const i=s;if(u<0){e=r,n=o,t=Es(i);continue e}if(0===u)return!0;e=r,n=o,t=ks(i);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Xs(e,n,t){return function(e,n,t){return zs(e.comparer,Ps(e.comparer,n,t,e.tree))}(t,e,n)}function Ys(e,n){return function(e,n){return Ds(e.comparer,n,e.tree)}(n,e)}function Ks(e,n){return r=e,zs((t=n).comparer,Os(r,t.tree));var t,r}function Qs(){return Ws.empty}(()=>{const e=ar();Ws.empty=zs(e,void 0)})();class eu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function nu(e){return q("Feliz.UseDeferred.Deferred`1",[e],eu,()=>[[],[],[["Item",e]],[["Item",W("System.Exception")]]])}function tu(e,n){const t=cs(ds());is(()=>ns(()=>{hs(t.current)}));return as(r=>{var o;ps(t.current)||ws((o=r,Wr.Delay(()=>Wr.TryWith(Wr.Delay(()=>(n(new eu(1)),Wr.Bind(e(o),e=>(n(new eu(2,e)),Wr.Zero())))),e=>{const t=e;return console.log(le(t)),n(new eu(3,t)),Wr.Zero()}))),t.current)})}const ru=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",e=>{},e),window.removeEventListener("testPassiveEventSupport",e=>{})}}catch(e){}return!1})();function ou(e){return de(e=>e.passive&&!ru?{capture:e.capture,once:e.once,passive:!1}:e,e)}function iu(e){return n=e=>e.capture?{capture:!0}:void 0,null!=(t=e)?n(ae(t)):void 0;var n,t}var su={GetHashCode(){return m([this.s,this.e].concat(this.c))},Equals(e){return!this.cmp(e)},CompareTo(e){return this.cmp(e)},[be](){const e=this;return{multiply:n=>e.mul(n),toPrecision:n=>e.toPrecision(n),toExponential:n=>e.toExponential(n),toFixed:n=>e.toFixed(n),toHex:()=>(Number(e)>>>0).toString(16)}}},uu="[big.js] ",cu=uu+"Invalid ",lu=cu+"decimal places",au=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function $u(e,n){var t,r,o;if(0===n&&1/n<0)n="-0";else if(!au.test(n+=""))throw Error(cu+"number");for(e.s="-"==n.charAt(0)?(n=n.slice(1),-1):1,(t=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(t<0&&(t=r),t+=+n.slice(r+1),n=n.substring(0,r)):t<0&&(t=n.length),o=n.length,r=0;r<t&&r<o&&"0"==n.charAt(r);)++r;if(r==o)e.c=[e.e=0];else for(e.e=t-r-1,e.c=[],t=0;r<o;)e.c[t++]=+n.charAt(r++);return e=fu(e,hu.DP,hu.RM)}function fu(e,n,t,r){var o=e.c,i=e.e+n+1;if(i<o.length){if(1===t)r=o[i]>=5;else if(2===t)r=o[i]>5||5==o[i]&&(r||i<0||void 0!==o[i+1]||1&o[i-1]);else if(3===t){const e=o.findIndex((e,n)=>n>=i&&e>0)<0;r=r||!e}else if(r=!1,0!==t)throw Error("[big.js] Invalid rounding mode");if(i<1)o.length=1,r?(e.e=-n,o[0]=1):o[0]=e.e=0;else{if(o.length=i--,r)for(;++o[i]>9;)o[i]=0,i--||(++e.e,o.unshift(1));for(i=o.length;!o[--i];)o.pop()}}else if(t<0||t>3||t!==~~t)throw Error("[big.js] Invalid rounding mode");return e}function du(e,n,t,r){var o,i,s=e.constructor,u=!e.c[0];if(void 0!==t){if(t!==~~t||t<(3==n)||t>1e6)throw Error(3==n?cu+"precision":lu);for(t=r-(e=new s(e)).e,e.c.length>++r&&fu(e,t,s.RM),2==n&&(r=e.e+t+1);e.c.length<r;)e.c.push(0)}if(o=e.e,t=(i=e.c.join("")).length,2!=n&&(1==n||3==n&&r<=o||o<=s.NE||o>=s.PE))i=i.charAt(0)+(t>1?"."+i.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)i="0"+i;i="0."+i}else if(o>0)if(++o>t)for(o-=t;o--;)i+="0";else o<t&&(i=i.slice(0,o)+"."+i.slice(o));else t>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&(!u||4==n)?"-"+i:i}su.abs=function(){var e=new this.constructor(this);return e.s=1,e},su.cmp=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.c),i=e.c,s=r.s,u=e.s,c=r.e,l=e.e;if(!o[0]||!i[0])return o[0]?s:i[0]?-u:0;if(s!=u)return s;if(n=s<0,c!=l)return c>l^n?1:-1;for(u=Math.max(o.length,i.length),s=0;s<u;s++)if((c=s<o.length?o[s]:0)!=(l=s<i.length?i[s]:0))return c>l^n?1:-1;return 0},su.div=function(e){var n=this.constructor,t=new n(this),r=(e=new n(e),t.c),o=e.c,i=t.s==e.s?1:-1,s=n.DP;if(s!==~~s||s<0||s>1e6)throw Error(lu);if(!o[0])throw Error("[big.js] Division by zero");if(!r[0])return new n(0*i);var u,c,l,a,$,f=o.slice(),d=u=o.length,h=r.length,p=r.slice(0,u),m=p.length,g=e,w=g.c=[],_=0,y=s+(g.e=t.e-e.e)+1;for(g.s=i,i=y<0?0:y,f.unshift(0);m++<u;)p.push(0);do{for(l=0;l<10;l++){if(u!=(m=p.length))a=u>m?1:-1;else for($=-1,a=0;++$<u;)if(o[$]!=p[$]){a=o[$]>p[$]?1:-1;break}if(!(a<0))break;for(c=m==u?o:f;m;){if(p[--m]<c[m]){for($=m;$&&!p[--$];)p[$]=9;--p[$],p[m]+=10}p[m]-=c[m]}for(;!p[0];)p.shift()}w[_++]=a?l:++l,p[0]&&a?p[m]=r[d]||0:p=[r[d]]}while((d++<h||void 0!==p[0])&&i--);return w[0]||1==_||(w.shift(),g.e--),_>y&&fu(g,s,n.RM,void 0!==p[0]),g},su.eq=function(e){return!this.cmp(e)},su.gt=function(e){return this.cmp(e)>0},su.gte=function(e){return this.cmp(e)>-1},su.lt=function(e){return this.cmp(e)<0},su.lte=function(e){return this.cmp(e)<1},su.minus=su.sub=function(e){var n,t,r,o,i=this.constructor,s=new i(this),u=(e=new i(e),s.s),c=e.s;if(u!=c)return e.s=-c,s.plus(e);var l=s.c.slice(),a=s.e,$=e.c,f=e.e;if(!l[0]||!$[0])return $[0]?(e.s=-c,e):new i(l[0]?s:0);if(u=a-f){for((o=u<0)?(u=-u,r=l):(f=a,r=$),r.reverse(),c=u;c--;)r.push(0);r.reverse()}else for(t=((o=l.length<$.length)?l:$).length,u=c=0;c<t;c++)if(l[c]!=$[c]){o=l[c]<$[c];break}if(o&&(r=l,l=$,$=r,e.s=-e.s),(c=(t=$.length)-(n=l.length))>0)for(;c--;)l[n++]=0;for(c=n;t>u;){if(l[--t]<$[t]){for(n=t;n&&!l[--n];)l[n]=9;--l[n],l[t]+=10}l[t]-=$[t]}for(;0===l[--c];)l.pop();for(;0===l[0];)l.shift(),--f;return l[0]||(e.s=1,l=[f=0]),e.c=l,e.e=f,e},su.mod=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.s),i=e.s;if(!e.c[0])throw Error("[big.js] Division by zero");return r.s=e.s=1,n=1==e.cmp(r),r.s=o,e.s=i,n?new t(r):(o=t.DP,i=t.RM,t.DP=t.RM=0,r=r.div(e),t.DP=o,t.RM=i,this.minus(r.times(e)))},su.plus=su.add=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.s),i=e.s;if(o!=i)return e.s=-i,r.minus(e);var s=r.e,u=r.c,c=e.e,l=e.c;if(!u[0]||!l[0])return l[0]?e:new t(u[0]?r:0*o);if(u=u.slice(),o=s-c){for(o>0?(c=s,n=l):(o=-o,n=u),n.reverse();o--;)n.push(0);n.reverse()}for(u.length-l.length<0&&(n=l,l=u,u=n),o=l.length,i=0;o;u[o]%=10)i=(u[--o]=u[o]+l[o]+i)/10|0;for(i&&(u.unshift(i),++c),o=u.length;0===u[--o];)u.pop();return e.c=u,e.e=c,e},su.pow=function(e){var n=this.constructor,t=new n(this),r=new n(1),o=new n(1),i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(cu+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?o.div(r):r},su.round=function(e,n){var t=this.constructor;if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(lu);return fu(new t(this),e,void 0===n?t.RM:n)},su.sqrt=function(){var e,n,t,r=this.constructor,o=new r(this),i=o.s,s=o.e,u=new r(.5);if(!o.c[0])return new r(o);if(i<0)throw Error(uu+"No square root");0===(i=Math.sqrt(o+""))||i===1/0?((n=o.c.join("")).length+s&1||(n+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new r(((i=Math.sqrt(n))==1/0?"1e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):e=new r(i),s=e.e+(r.DP+=4);do{t=e,e=u.times(t.plus(o.div(t)))}while(t.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return fu(e,r.DP-=4,r.RM)},su.times=su.mul=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.c),i=e.c,s=o.length,u=i.length,c=r.e,l=e.e;if(e.s=r.s==e.s?1:-1,!o[0]||!i[0])return new t(0*e.s);for(e.e=c+l,s<u&&(n=o,o=i,i=n,l=s,s=u,u=l),n=new Array(l=s+u);l--;)n[l]=0;for(c=u;c--;){for(u=0,l=s+c;l>c;)u=n[l]+i[c]*o[l-c-1]+u,n[l--]=u%10,u=u/10|0;n[l]=(n[l]+u)%10}for(u?++e.e:n.shift(),c=n.length;!n[--c];)n.pop();return e.c=n,e},su.toExponential=function(e){return du(this,1,e,e)},su.toFixed=function(e){return du(this,2,e,this.e+e)},su.toPrecision=function(e){return du(this,3,e,e-1)},su.toString=function(){return du(this)},su.valueOf=su.toJSON=function(){return du(this,4)};var hu=function e(){function n(t){var r=this;if(!(r instanceof n))return void 0===t?e():new n(t);t instanceof n?(r.s=t.s,r.e=t.e,r.c=t.c.slice(),function(e){if((e=fu(e,28,0)).c.length>1&&!e.c[0]){let n=e.c.findIndex(e=>e);e.c=e.c.slice(n),e.e=e.e-n}}(r)):$u(r,t),r.constructor=n}return n.prototype=su,n.DP=28,n.RM=1,n.NE=-29,n.PE=29,n.version="5.2.2",n}(),pu=hu;new pu(0),new pu(1),new pu(-1),new pu("79228162514264337593543950335"),new pu("-79228162514264337593543950335");function mu(e,n){return 0===n.indexOf(e)?n:void 0}function gu(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function wu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s,u;return n=mu("/",e),null!=n?(t=n,"#"+t):(r=mu("#/",e),null!=r?(o=r,o):(i=mu("#",e),null!=i?(s=i,"#/"+ut(s,1,s.length-1)):(u=e,"#/"+u)))}:e=>{let n,t,r;return n=mu("/",e),null!=n?(t=n,t):(r=e,"/"+r)}}(n)(ot("/",ir(e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e),e)))}function _u(e,n,t){1===n?history.pushState(void 0,"",wu(e,t)):history.replaceState(void 0,"",wu(e,t));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function yu(e,n){return function(e,n){const t=new Lt(null,void 0);let r=t,o=n;for(;null!=o.tail;){let n=e(Bt(o));for(;null!=n.tail;){const e=r,t=new Lt(Bt(n),void 0);e.tail=t,r=t,n=Gt(n)}o=Gt(o)}const i=r,s=new Lt(null,void 0);return i.tail=s,Gt(t)}(e=>{if(rt(e))return Ht();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Hn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return Ht();if(null!=mu("?",n))return zt(n);{const e=n.split("?");if(Ot(0,e,null)||1!==e.length){if(Ot(0,e,null)||2!==e.length)return Ht();if(""===e[1]){const n=e[0];return zt(decodeURIComponent(n))}{const n=e[0],t=e[1];return nr([decodeURIComponent(n),"?"+t])}}{const n=e[0];return zt(decodeURIComponent(n))}}}},nr(st(null!=mu("#",e)?ut(e,1,e.length-1):1===n&&(null!=gu("#",e)||null!=gu("#/",e))?"":e,["/"],null,0)))}const vu=Qi(e=>{const n=as(n=>{const t=fe(e.onUrlChanged,e=>{});return function(e,n,t){return n(yu(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(0|fe(e.hashMode,1),t)});if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=e=>{n(e)},r=void 0,o=ls(()=>ou(r),[r]),i=ls(()=>iu(r),[r]),s=ls(()=>e=>{t(e)},[t]);ts(as(()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ns(()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}})}))}else{const e="popstate",t=n,r=void 0,o=ls(()=>ou(r),[r]),i=ls(()=>iu(r),[r]),s=ls(()=>e=>{t(e)},[t]);ts(as(()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ns(()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}})}))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=ls(()=>ou(void 0),[void 0]),i=ls(()=>iu(void 0),[void 0]),s=ls(()=>e=>{r(e)},[r]);ts(as(()=>{if(null==o)window.addEventListener(t,s);else{const e=o;window.addEventListener(t,s,e)}return ns(()=>{if(null==i)window.removeEventListener(t,s);else{const e=i;window.removeEventListener(t,s,e)}})}));const u=e.application;return null==u?null:u},void 0,Cu,bu);var bu,Cu;class xu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId","Name"]}}class Su extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Asc","Desc"]}}function Eu(e){return 0===e.tag?new Su(1):new Su(0)}class ku extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Sort"]}}const Nu=new ku(0,new xu(1),new Su(0));function Au(e){return e.fields[0]}function Iu(e){return e.fields[1]}function Tu(e,n){const t=n.fields[0],r=n.fields[1],o=[e,t];return 1===o[0].tag?1===o[1].tag?new ku(0,new xu(1),Eu(r)):new ku(0,new xu(1),new Su(0)):0===o[1].tag?new ku(0,new xu(0),Eu(r)):new ku(0,new xu(0),new Su(0))}class Pu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["SearchText"]}}const Du=new Pu(0,"");function Mu(e){return e.fields[0]}class Ou extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageSize"]}}function Ru(e){return 0|(0|e.fields[0])}class Uu extends U{constructor(e,n,t){super(),this.SearchText=e,this.Sort=n,this.PageSize=t}}class Lu extends U{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}function Fu(){return z("AccountRegistry.AdminUI.Types.Partner",[],Lu,()=>[["StreamId",ht()],["Name",q("BasicModels.Name",[],mt,()=>[[["Item",X]]])],["Website",q("BasicModels.Website",[],gt,()=>[[["Item",X]]])],["ContactDetails",z("BasicModels.ContactDetails",[],bt,()=>[["FirstName",q("BasicModels.FirstName",[],wt,()=>[[["Item",X]]])],["LastName",q("BasicModels.LastName",[],_t,()=>[[["Item",X]]])],["Email",q("BasicModels.Email",[],yt,()=>[[["Item",X]]])],["MobilePhone",q("BasicModels.MobilePhone",[],vt,()=>[[["Item",X]]])]])],["Notes",V(q("BasicModels.Notes",[],Ct,()=>[[["Item",X]]]))]])}function ju(e){return Vr(0,()=>me(n=>{const t=n;return me(n=>{const r=n;return Zr(0,to(e.ContactDetails),n=>{const o=n;return new Lu(new dt(0,e.StreamId),t,r,o,de(e=>new Ct(0,e),e.Notes))})},pe(e=>new gt(0,e),Rr("Website",e.Website)))},pe(e=>new mt(0,e),Rr("Name",e.Name))))()}class Bu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerList","Partner","PartnerAccountList","PartnerSuperConfiguration","Account","AccountSuperConfiguration","NotFound"]}}function Gu(){return q("AccountRegistry.AdminUI.Types.Page",[],Bu,()=>[[],[["Item",St()]],[["Item",St()]],[["Item",St()]],[["Item1",St()],["Item2",kt()]],[["Item1",St()],["Item2",kt()]],[]])}function Hu(e){let n,t,r,o,i,s,u,c;switch(qt(e)?n=6:"account-registry"===Zt(e)?qt(Jt(e))?n=6:"partners"===Zt(Jt(e))?qt(Jt(Jt(e)))?n=0:qt(Jt(Jt(Jt(e))))?(n=1,t=Zt(Jt(Jt(e)))):"accounts"===Zt(Jt(Jt(Jt(e))))?qt(Jt(Jt(Jt(Jt(e)))))?(n=2,r=Zt(Jt(Jt(e)))):qt(Jt(Jt(Jt(Jt(Jt(e))))))?(n=4,i=Zt(Jt(Jt(Jt(Jt(e))))),s=Zt(Jt(Jt(e)))):"super-configuration"===Zt(Jt(Jt(Jt(Jt(Jt(e))))))&&qt(Jt(Jt(Jt(Jt(Jt(Jt(e)))))))?(n=5,u=Zt(Jt(Jt(Jt(Jt(e))))),c=Zt(Jt(Jt(e)))):n=6:"super-configuration"===Zt(Jt(Jt(Jt(e))))&&qt(Jt(Jt(Jt(Jt(e)))))?(n=3,o=Zt(Jt(Jt(e)))):n=6:n=6:n=6,n){case 0:return new Bu(0);case 1:return new Bu(1,new xt(0,t));case 2:return new Bu(2,new xt(0,r));case 3:return new Bu(3,new xt(0,o));case 4:return new Bu(4,new xt(0,s),new Et(0,i));case 5:return new Bu(5,new xt(0,c),new Et(0,u));case 6:return new Bu(6)}}function Wu(e){switch(e.tag){case 1:return nr(["account-registry","partners",oo(e.fields[0])]);case 2:return nr(["account-registry","partners",oo(e.fields[0]),"accounts"]);case 3:return nr(["account-registry","partners",oo(e.fields[0]),"super-configuration"]);case 4:{const n=e.fields[0],t=e.fields[1];return nr(["account-registry","partners",oo(n),"accounts",io(t)])}case 5:{const n=e.fields[0],t=e.fields[1];return nr(["account-registry","partners",oo(n),"accounts",io(t),"super-configuration"])}default:return nr(["account-registry","partners"])}}function zu(e){switch(e.tag){case 1:{const n=["account-registry","partners",oo(e.fields[0])];return zt(e=>{_u(nr(n),1,1)})}case 2:{const n=["account-registry","partners",oo(e.fields[0]),"accounts"];return zt(e=>{_u(nr(n),1,1)})}case 3:{const n=["account-registry","partners",oo(e.fields[0]),"super-configuration"];return zt(e=>{_u(nr(n),1,1)})}case 4:{const n=e.fields[0],t=e.fields[1],r=["account-registry","partners",oo(n),"accounts",io(t)];return zt(e=>{_u(nr(r),1,1)})}case 5:{const n=e.fields[0],t=e.fields[1],r=["account-registry","partners",oo(n),"accounts",io(t),"super-configuration"];return zt(e=>{_u(nr(r),1,1)})}default:{const e=["account-registry","partners"];return zt(n=>{_u(nr(e),1,1)})}}}class qu extends U{constructor(e){super(),this.Partners=e}}function Vu(){return z("AccountRegistry.AdminUI.Types.Data",[],qu,()=>[["Partners",Z(Fu())]])}function Zu(){return Ht()}function Ju(e){return zt(e)}class Xu extends U{constructor(e,n){super(),this.bound=0|e,this.digits=n}}function Yu(e,n){for(;;){const t=e,r=n;if(0===r)return 1;if(r%2!=0)return t*Yu(t*t,~~(r/2))|0;e=t*t,n=~~(r/2)}}Nn(2013265921,0,!1),Nn(2013265921,0,!0);Pt(28,e=>Yu(2,e),Int32Array);function Ku(e){return e.bound}function Qu(e,n){return e.digits[n]}function ec(e,n){return Tn(Qu(e,n),!1,2)}function nc(e,n,t){e.digits[n]=t}function tc(e,n){for(;;){const t=e,r=n;if(0===r)return Nn(1,0,!1);if(r%2!=0)return bn(t,tc(bn(t,t),~~(r/2)));e=bn(t,t),n=~~(r/2)}}function rc(e,n){for(;;){const t=e,r=n;if(0===r)return 1;if(r%2!=0)return t*rc(t*t,~~(r/2))|0;e=t*t,n=~~(r/2)}}const oc=Nn(16777216,0,!1),ic=Nn(16777215,0,!1);Nn(16777215,0,!0);function sc(e){return new Xu(e,new Int32Array(e))}function uc(e){const n=0|((e,n)=>{for(;;){const t=e,r=n;if(-1===r||0!==t[r])return r+1|0;e=t,n=r-1}})(e.digits,e.bound-1);return e.bound=n,e}function cc(e){const n=0|(e<0?0:e);if(n<16777216){const e=sc(1);return e.digits[0]=n,uc(e)}{const e=sc(2);for(let t=0;t<=1;t++)e.digits[t]=~~(n/rc(16777216,t))%16777216;return uc(e)}}const lc=cc(1),ac=cc(0);function $c(e){return e.bound-1}function fc(e){return 0===e.bound}function dc(e,n){if(e.bound===n.bound){return((e,n,t)=>{for(;;){const r=e,o=n,i=t;if(-1===i)return!0;if(r[i]!==o[i])return!1;e=r,n=o,t=i-1}})(e.digits,n.digits,e.bound-1)}return!1}function hc(e,n){if(e.bound<n.bound)return-1;if(e.bound>n.bound)return 1;return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t;if(-1===i)return 0;if(r[i]!==o[i])return r[i]<o[i]?-1:1;e=r,n=o,t=i-1}})(e.digits,n.digits,e.bound-1)}function pc(e,n){return-1===hc(e,n)}function mc(e,n,t){for(;;){const r=e,o=n,i=t;if(!(kn(o,Nn(0,0,!1))>0))break;{const s=vn(ec(r,i),o);nc(r,i,~~An(En(s,ic))),e=r,n=Cn(s,oc),t=i+1}}}function gc(e,n){const t=0|Ku(e),r=sc(t+1|0),o=Tn(n,!1,2);let i=Nn(0,0,!1);for(let n=0;n<=t-1;n++){const t=vn(vn(i,ec(r,n)),bn(ec(e,n),o));nc(r,n,~~An(En(t,ic))),i=Cn(t,oc)}return mc(r,i,t),uc(r)}function wc(e,n){const t=1===Ku(e),r=1===Ku(n);return t&&r?function(e,n){const t=sc(2),r=bn(Tn(e,!1,2),Tn(n,!1,2));return nc(t,0,~~An(En(r,ic))),nc(t,1,~~An(Cn(r,oc))),uc(t)}(Qu(e,0),Qu(n,0)):t?gc(n,Qu(e,0)):r?gc(e,Qu(n,0)):function(e,n){const t=sc(e.bound+n.bound|0),r=t.digits,o=e.digits,i=n.digits;for(let s=0;s<=e.bound-1;s++){const e=Tn(o[s],!1,2);let u=Nn(0,0,!1),c=0|s;for(let t=0;t<=n.bound-1;t++){const n=Tn(i[t],!1,2),o=vn(vn(Tn(r[c],!1,2),u),bn(e,n));r[c]=~~An(En(o,ic)),u=Cn(o,oc),c+=1}mc(t,u,c)}return uc(t)}(e,n)}class _c extends U{constructor(e,n,t,r,o,i,s){super(),this.bigL=0|e,this.twoToBigL=0|n,this.k=0|t,this.bigK=0|r,this.bigN=0|o,this.split=0|i,this.splits=s}}function yc(e,n,t,r){return new _c(e,rc(2,e),n,t,r,~~(24/e),Pt(~~(24/e),n=>rc(2,e*n),Int32Array))}const vc=[yc(1,28,268435456,268435456),yc(2,26,67108864,134217728),yc(3,24,16777216,50331648),yc(4,22,4194304,16777216),yc(5,20,1048576,5242880),yc(6,18,262144,1572864),yc(7,16,65536,458752),yc(8,14,16384,131072),yc(9,12,4096,36864),yc(10,10,1024,10240),yc(11,8,256,2816),yc(12,6,64,768),yc(13,4,16,208)];Pt(24,e=>rc(2,e)-1,Int32Array),Pt(24,e=>rc(2,e),Int32Array),Pt(24,e=>tc(Nn(2,0,!1),e));vc[0].bigN;function bc(e,n){return wc(e,n)}function Cc(e,n,t,r){const o=e,i=[e.digits,$c(e)],s=0|i[1],u=i[0],c=[t.digits,$c(t)],l=0|c[1],a=c[0],$=Tn(n,!1,2);let f=0,d=bn($,Tn(a[0],!1,2));for(;kn(d,Nn(0,0,!1))>0||f<l;){if(f>s)throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let e=0|~~An(En(d,ic)),n=Cn(d,oc);e<=u[f+r]?u[f+r]=u[f+r]-e:(u[f+r]=u[f+r]+(16777216-e),n=vn(n,Nn(1,0,!1))),d=f<l?vn(n,bn($,Tn(a[f+1],!1,2))):n,f+=1}uc(o)}function xc(e,n,t,r){const o=e,i=[e.digits,$c(e)],s=0|i[1],u=i[0],c=[t.digits,$c(t)],l=0|c[1],a=c[0],$=Tn(n,!1,2);let f=0,d=bn($,Tn(a[0],!1,2));for(;kn(d,Nn(0,0,!1))>0||f<l;){if(f>s)throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let e=0|~~An(En(d,ic)),n=Cn(d,oc);e<16777216-u[f+r]?u[f+r]=u[f+r]+e:(u[f+r]=e-(16777216-u[f+r]),n=vn(n,Nn(1,0,!1))),d=f<l?vn(n,bn($,Tn(a[f+1],!1,2))):n,f+=1}uc(o)}function Sc(e,n,t){const r=[$c(n),$c(e)],o=0|r[1],i=0|r[0];if(o<i+t)return 0;{const r=[n.digits,e.digits],a=r[1],$=r[0];let f;if(0===i)if(o===t)f=~~(a[t]/$[0]);else{const e=Cn(vn(bn(Tn(a[o],!1,2),oc),Tn(a[o-1],!1,2)),Tn($[0],!1,2));f=~~An(e)}else if(o===i+t)f=~~(a[o]/($[i]+1));else{const e=Cn(vn(bn(Tn(a[o],!1,2),oc),Tn(a[o-1],!1,2)),vn(Tn($[i],!1,2),Nn(1,0,!1)));f=~~An(e)}if(0===f){return 1!=(u=t,c=e,l=0,(s=n).bound+u<c.bound+l?-1:s.bound+u>c.bound+u?1:0|((e,n,t)=>{e:for(;;){const r=e,o=n,i=t;if(-1===i)return 0;{const s=0|(i<u?0:r[i-u]),c=0|(i<l?0:o[i-l]);if(s===c){e=r,n=o,t=i-1;continue e}return s<c?-1:1}}})(s.digits,c.digits,s.bound+u-1))?1:0}return 0|f}var s,u,c,l}function Ec(e,n){if(fc(n))throw new Error;if($c(e)<$c(n))return[ac,e];{const t=function(e){return new Xu(e.bound,e.digits.slice())}(e),r=sc($c(e)-$c(n)+1+1);let o=0|$c(e);const i=0|$c(n);let s=o-i|0;const u=e=>{};let c=!1;for(;!c;){u([r,t,s,o]);const e=0|Sc(t,n,s);e>0?(Cc(t,e,n,s),xc(r,e,lc,s),u([r,t,s,o])):(c=0===e&&0===s,c||(o===i+s?(u([r,t,s-1,o]),s-=1):(u([r,t,s-1,o-1]),s-=1,o-=1)))}return[uc(r),uc(t)]}}cc(2);function kc(e){return cc(e)}function Nc(e){return function(e){const n=kn(e,Nn(0,0,!1))<0?Nn(0,0,!1):e,t=sc(3);for(let e=0;e<=2;e++)t.digits[e]=~~An(xn(Cn(n,tc(oc,e)),oc));return uc(t)}(e)}function Ac(e){const n=0|$c(e),t=((e,t,r)=>{for(;;){const o=e,i=t,s=r;if($c(s)>n)return Wt([i,s],o);e=Wt([i,s],o),t=i+1,r=bc(s,s)}})(Ht(),0,cc(10)),r=(e,n,t,o)=>{if(qt(o)){const r=0|function(e){if(1===e.bound)return 0|e.digits[0];{let n=0;for(let t=e.bound-1;t>=0;t--)n=e.digits[t]+16777216*n;return 0|n}}(t);return e&&0===r?n:Wt(f(r),n)}{const i=Zt(o)[1],s=Jt(o),u=Ec(t,i),c=u[1],l=u[0];if(e&&fc(l)){return r(e,n,c,s)}{const t=r(!1,n,c,s);return r(e,t,l,s)}}},o=t,i=r(!0,Ht(),e,o);return qt(i)?"0":ot("",Xt(i))}function Ic(e){return e.bound<=1}function Tc(e){const n=e;return 0<n.bound?0|n.digits[0]:0}class Pc extends U{constructor(e,n){super(),this.signInt=e,this.v=n}toString(){const e=this;switch(0|Oc(e)){case-1:return fc(Rc(e))?"0":"-"+Ac(Rc(e));case 0:return"0";case 1:return Ac(Rc(e));default:throw new Error("signs should be +/- 1 or 0")}}Equals(e){if(e instanceof Pc){return Uc(this,e)}return!1}GetHashCode(){return 0|(0===Oc(e=this)?1:Oc(e)+function(e){let n=0;for(let t=0;t<=e.bound-1;t++)n=e.digits[t]+(n<<3);return 0|n}(Rc(e))|0);var e}CompareTo(e){if(e instanceof Pc){return 0|function(e,n){return Lc(e,n)?-1:Uc(e,n)?0:1}(this,e)}throw new Error("the objects are not comparable\\nParameter name: obj")}}function Dc(e,n){return new Pc(e,n)}function Mc(e){return Ic(e)&&Tc(e)<Pc.smallLim?Pc.smallPosTab[Tc(e)]:e}function Oc(e){return e.signInt}function Rc(e){return e.v}function Uc(e,n){const t=[Oc(e),Oc(n)];let r;switch(r=-1===t[0]?-1===t[1]?1:0===t[1]?8:1===t[1]?3:9:0===t[0]?-1===t[1]?6:0===t[1]?4:1===t[1]?5:9:1===t[0]?-1===t[1]?2:0===t[1]?7:1===t[1]?0:9:9,r){case 0:case 1:return dc(Rc(e),Rc(n));case 2:case 3:return!!fc(Rc(e))&&fc(Rc(n));case 4:return!0;case 5:case 6:return fc(Rc(n));case 7:case 8:return fc(Rc(e));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Lc(e,n){const t=[Oc(e),Oc(n)];let r;switch(r=-1===t[0]?-1===t[1]?1:0===t[1]?8:1===t[1]?3:9:0===t[0]?-1===t[1]?6:0===t[1]?4:1===t[1]?5:9:1===t[0]?-1===t[1]?2:0===t[1]?7:1===t[1]?0:9:9,r){case 0:return pc(Rc(e),Rc(n));case 1:return pc(Rc(n),Rc(e));case 2:return!1;case 3:return!fc(Rc(e))||!fc(Rc(n));case 4:return!1;case 5:return!fc(Rc(n));case 6:case 7:return!1;case 8:return!fc(Rc(e));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Fc(e){return e>=0?Dc(1,Mc(kc(e))):Dc(-1,Mc(-2147483648===e?Nc(Sn(Tn(e,!1,2))):kc(ve(e))))}function jc(){return Pc.one}function Bc(){return Pc.two}function Gc(){return Pc.zero}Pc.smallLim=4096,Pc.smallPosTab=Pt(Pc.smallLim,e=>kc(e)),Pc.one=Fc(1),Pc.two=Fc(2),Pc.zero=Fc(0);Gc(),jc(),Bc();Gc(),jc();class Hc{constructor(){}}function Wc(e,n){return{then:(e,t)=>{try{return n().then(e,t)}catch(e){if(y(t,null))return Promise.reject(e);try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}},catch:e=>{try{return n().catch(e)}catch(n){try{return Promise.resolve(e(n))}catch(e){return Promise.reject(e)}}}}}const zc=new Hc;class qc extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Vc{constructor(e){this.state=new qc(0,It(new Array(S((e,n)=>b(e,n),e,10)),0,S((e,n)=>b(e,n),e,10),null),0)}}function Zc(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new qc(0,o,t):new qc(1,o,t,i),le(o[r])}}function Jc(e,n,t){const r=cs(e[0]),o=cs(new Vc(10));const s=$s(e[0]),u=s[1],c=s[0];let l;const a=cs(ds()),$=cs(a.current);is(()=>ns(()=>{hs(a.current)})),l=$;const f=()=>{setTimeout(()=>{let e;e=l.current,ps(e)||u(r.current)},0)},d=e=>{var t;(t=Wc(0,()=>{let t=le(e);return function e(n,t,r){return t()?r.then(()=>e(n,t,r)):Promise.resolve(void 0)}(zc,()=>{let e;return null!=t&&(e=l.current,!ps(e))},Wc(0,()=>{const e=ae(t),i=n(e,r.current),s=i[0];return Qt(e=>{e(d)},i[1]),t=Zc(o.current),r.current=s,f(),Promise.resolve()}))}),new Promise((e,n)=>{try{Promise.resolve(t).then(e,n)}catch(e){n(e)}})).then()},h=as(d);var p;return rs(()=>ns(()=>{let e,n;Pr(e=>{e.Dispose()},$e((e=r.current,i(e)?(n=e,n):void 0)))}),t),ss(()=>{r.current=e[0],f(),Qt(e=>{e(h)},e[1])},t),p=()=>{Pr(h,$e(Zc(o.current)))},Xi(e=>(p(),ns(()=>{}))),[c,h]}function Xc(e,n,t){return Jc(ls(e,t),n,t)}class Yc{constructor(){}}function Kc(e,n){return Wr.Delay(n)}new Yc;class Qc extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class el extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class nl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class tl extends U{constructor(e,n,t,r,o,i,s){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.content=s}}class rl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ol extends U{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}const il=new tl("",new Qc(0),Ht(),!1,void 0,void 0,new nl(0));new ol(0,"","",Qs(),new rl(0,""));function sl(e,n){return tt(n)?[n]:st(n,[e],null,0)}function ul(e){return new tl(e,il.method,il.headers,il.withCredentials,il.overridenMimeType,il.overridenResponseType,il.content)}function cl(e,n){return new tl(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.content)}function ll(e,n){return new tl(n.url,n.method,rr(n.headers,zt(e)),n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.content)}function al(e){return gs(n=>{const t=n[0],r=(n[1],new XMLHttpRequest);r.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),r.onreadystatechange=()=>{let e,n,o,i,s,u;4===r.readyState&&t((n=r.responseType,e=""===n||"text"===n?r.responseText:"",o=0|r.status,i=r.responseType,u=r.responseType,s=""===u||"text"===u?new rl(0,r.responseText):new rl("arraybuffer"===u?2:"blob"===u?1:3,r.response),new ol(o,e,i,function(e){const n=ar();return zs(n,Us(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=ae(o);r.push(e)}}return"function"==typeof t?Tt(e=>e,r,t):r}(e=>{const n=nr(sl(":",e));if(!qt(n)){const e=Jt(n);return[Zt(n).toLocaleLowerCase(),ot(":",e).trim()]}},sl("\r\n",r.getAllResponseHeaders()))),s)))};const o=c(e.headers);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"](),n=e.fields[1],t=e.fields[0];r.setRequestHeader(t,n)}}finally{o.Dispose()}r.withCredentials=e.withCredentials;const i=e.overridenMimeType;if(null==i);else{const e=i;r.overrideMimeType(e)}const s=e.overridenResponseType;null==s||(1===s.tag?r.responseType="blob":2===s.tag?r.responseType="arraybuffer":r.responseType="text");const u=[e.method,e.content];if(0===u[0].tag)r.send(le(void 0));else if(1===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else if(3===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else if(2===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else r.send(le(void 0))})}function $l(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(qt(i))return r;{const s=Jt(i),u=Zt(i),c=Vr(0,()=>me(e=>{const n=e;return Zr(0,r,e=>rr(e,zt(n)))},o(u)))();if(1===c.tag)return c;e=c,n=o,t=s;continue e}}}(new he(0,Ht()),e,n)}const fl=0,dl=1,hl=2,pl=3,ml=4;function gl(e,n){return e.replace(/[a-z]?[A-Z]/g,e=>1===e.length?e.toLowerCase():e.charAt(0)+n+e.charAt(1).toLowerCase())}function wl(e,n=fl){const t={},r=n;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,n,r){e=function(e,n){switch(n){case dl:return e.charAt(0).toLowerCase()+e.slice(1);case hl:return gl(e,"_");case pl:return gl(e,"_").toUpperCase();case ml:return gl(e,"-");case fl:default:return e}}(e,n),t[e]=r}for(let n of e){let e=fl;if(null==n&&o(n),n instanceof T){const t=n.cases()[n.tag];n=0===n.fields.length?t:[t].concat(n.fields),e=r}if(Array.isArray(n))switch(n.length){case 0:o(n);break;case 1:i(n[0],e,!0);break;case 2:const t=n[1];i(n[0],e,t);break;default:i(n[0],e,n.slice(1))}else"string"==typeof n?i(n,e,!0):o(n)}return t}class _l extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class yl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class vl{constructor(){this.cache=new Map([])}}function bl(){return new vl}bl(),bl();function Cl(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function xl(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=Gn(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)n.push(arguments[e]);n.index=arguments[s++],n.input=arguments[s++],i&&(n.groups=arguments[s]),e=t(n)}return e}));if(t=t.replace(/\$0/g,e=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=n.substring(o),u=Wn(e,s),c=Wn.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+c.replace(e,t)+n.substring(o+c.length)}return n.replace(e,t)}(Cl(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return Cl(n)}}function Sl(e,n){const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function El(e,n){try{return n.contents=function(e){const n=jn(e),t=Pn.exec(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t[0]?0:36e5*parseInt(t[1],10)+6e4*parseInt(t[2],10);return Sl(n.getTime(),r)}(e),!0}catch(e){return!1}}function kl(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return Nl(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function Nl(e){return In(Cn(e,1e4))}function Al(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return kl(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,s=+n[4],u=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*kl(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Il{constructor(e){this.k=e}}function Tl(e){return new Il(e)}function Pl(e){return e.k}class Dl extends Il{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=r}}function Ml(e,n,t,r){return new Dl(e,n,t,r)}function Ol(e){return e.left}function Rl(e){return e.right}function Ul(e){return e.h}function Ll(e){return function e(n,t){e:for(;;){const r=n,o=t;if(null!=r){const i=r;if(i instanceof Dl){const r=i;n=Ol(r),t=e(Rl(r),o+1);continue e}return o+1|0}return 0|o}}(e,0)}function Fl(e,n,t){let r,o,i;if(null!=e){const n=e;i=n instanceof Dl?(r=n,Ul(r)):1}else i=0;let s;if(null!=t){const e=t;s=e instanceof Dl?(o=e,Ul(o)):1}else s=0;const u=0|(i<s?s:i);return 0===u?Tl(n):Ml(n,e,t,u+1)}function jl(e,n,t){let r,o,i,s,u,c,l,a,$;if(null!=e){const n=e;$=n instanceof Dl?(r=n,Ul(r)):1}else $=0;let f;if(null!=t){const e=t;f=e instanceof Dl?(o=e,Ul(o)):1}else f=0;if(f>$+2){const r=ae(t);if(r instanceof Dl){const t=r;if(i=Ol(t),(null!=i?(s=i,s instanceof Dl?(u=s,Ul(u)):1):0)>$+1){const r=ae(Ol(t));if(r instanceof Dl){const o=r;return Fl(Fl(e,n,Ol(o)),Pl(o),Fl(Rl(o),Pl(t),Rl(t)))}throw new Error("internal error: Set.rebalance")}return Fl(Fl(e,n,Ol(t)),Pl(t),Rl(t))}throw new Error("internal error: Set.rebalance")}if($>f+2){const r=ae(e);if(r instanceof Dl){const e=r;if(c=Rl(e),(null!=c?(l=c,l instanceof Dl?(a=l,Ul(a)):1):0)>f+1){const r=ae(Rl(e));if(r instanceof Dl){const o=r;return Fl(Fl(Ol(e),Pl(e),Ol(o)),Pl(o),Fl(Rl(o),n,t))}throw new Error("internal error: Set.rebalance")}return Fl(Ol(e),Pl(e),Fl(Rl(e),n,t))}throw new Error("internal error: Set.rebalance")}return Fl(e,n,t)}function Bl(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Pl(r));if(r instanceof Dl){const i=r;return o<0?jl(Bl(e,n,Ol(i)),Pl(i),Rl(i)):0===o?t:jl(Ol(i),Pl(i),Bl(e,n,Rl(i)))}{const o=0|e.Compare(n,Pl(r));return o<0?Ml(n,void 0,t,2):0===o?t:Ml(n,t,void 0,2)}}return Tl(n)}function Gl(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Pl(s));if(s instanceof Dl){const i=s;if(u<0){e=r,n=o,t=Ol(i);continue e}if(0===u)return!0;e=r,n=o,t=Rl(i);continue e}return 0===u}return!1}}function Hl(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Dl){const r=o;Hl(t,Ol(r)),t(Pl(r)),e=t,n=Rl(r);continue e}t(Pl(o))}break}}class Wl extends U{constructor(e,n){super(),this.stack=e,this.started=n}}function zl(e){e:for(;;){const n=e;if(qt(n))return Ht();{const t=Zt(n),r=Jt(n);if(null!=t){const o=t;if(o instanceof Dl){const n=o;e=er([Ol(n),Tl(Pl(n)),Rl(n)],r);continue e}return n}e=r;continue e}}}function ql(e){return new Wl(zl(zt(e)),!1)}function Vl(e){if(e.started){const n=e.stack;if(qt(n))return function(){throw new Error("Enumeration already started")}();if(null!=Zt(n)){return Pl(Zt(n))}throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Zl(e){let n=ql(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Vl(n),"System.Collections.IEnumerator.get_Current":()=>Vl(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(qt(n))return!1;if(null!=Zt(n)){const t=Jt(n);if(Zt(n)instanceof Dl)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=zl(t),!qt(e.stack)}Jt(n);throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!qt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=ql(e)},Dispose(){}}}function Jl(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,s=[o,i];if(qt(s[0]))return qt(s[1])?0:-1;if(qt(s[1]))return 1;if(null!=Zt(s[1]))if(null!=Zt(s[0])){const u=Jt(s[0]),c=Jt(s[1]),l=Zt(s[0]),a=Zt(s[1]);if(l instanceof Dl){const s=l;if(null==Ol(s)){if(!(a instanceof Dl)){const o=0|r.Compare(Pl(s),Pl(a));if(0!==o)return 0|o;e=r,n=Wt(Rl(s),u),t=Wt(void 0,c);continue e}{const l=a;if(null==Ol(l)){const o=0|r.Compare(Pl(s),Pl(l));if(0!==o)return 0|o;e=r,n=Wt(Rl(s),u),t=Wt(Rl(l),c);continue e}{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof Dl)){const o=0|r.Compare(Pl(l),Pl(a));if(0!==o)return 0|o;e=r,n=u,t=c;continue e}{const s=a;if(null==Ol(s)){const o=0|r.Compare(Pl(l),Pl(s));if(0!==o)return 0|o;e=r,n=Wt(void 0,u),t=Wt(Rl(s),c);continue e}{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{Jt(s[0]),Jt(s[1]),Zt(s[1]);const u=[o,i];let c,l,a,$,f;switch(qt(u[0])?qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2:null!=Zt(u[0])?(c=0,l=Jt(u[0]),a=Zt(u[0])):qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2,c){case 0:if(a instanceof Dl){const o=a;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],l),t=i;continue e}e=r,n=er([void 0,Tl(Pl(a))],l),t=i;continue e;case 1:if(f instanceof Dl){const i=f;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],$);continue e}e=r,n=o,t=er([void 0,Tl(Pl(f))],$);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==Zt(s[0])){e=r,n=Jt(s[0]),t=Jt(s[1]);continue e}{Jt(s[0]),Jt(s[1]),Zt(s[0]);const u=[o,i];let c,l,a,$,f;switch(qt(u[0])?qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2:null!=Zt(u[0])?(c=0,l=Jt(u[0]),a=Zt(u[0])):qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2,c){case 0:if(a instanceof Dl){const o=a;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],l),t=i;continue e}e=r,n=er([void 0,Tl(Pl(a))],l),t=i;continue e;case 1:if(f instanceof Dl){const i=f;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],$);continue e}e=r,n=o,t=er([void 0,Tl(Pl(f))],$);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,zt(n),zt(t))}function Xl(e,n,t){let r=0|t;Hl(e=>{n[r]=e,r+=1},e)}function Yl(e,n){return Dt((n,t)=>Bl(e,t,n),void 0,n)}function Kl(e,n){if(r(n)){return Yl(e,n)}if(n instanceof Lt){return function(e,n){return Yt((n,t)=>Bl(e,t,n),void 0,n)}(e,n)}{const t=c(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=Bl(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{t.Dispose()}}}class Ql{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n=0;const t=c(e);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();r=n,o=g(e),n=(r<<1)+o+631}}finally{t.Dispose()}var r,o;return 0|Math.abs(n)}(this)}Equals(e){let n;return e instanceof Ql&&(n=e,0===Jl(na(this),ta(this),ta(n)))}toString(){return"set ["+ot("; ",Dr(e=>I(e),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}CompareTo(e){return 0|Jl(na(this),ta(this),ta(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 Gl(na(this),e,ta(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Xl(ta(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ra(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ra(this)}GetEnumerator(){return Zl(ta(this))}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Zl(ta(this))}get size(){return 0|ra(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 oa(this,e)}keys(){return Dr(e=>e,this)}values(){return Dr(e=>e,this)}entries(){return Dr(e=>[e,e],this)}forEach(e,n){const t=this;Pr(n=>{e(n,n,t)},t)}}function ea(e,n){return new Ql(e,n)}function na(e){return e.comparer}function ta(e){return e.tree}function ra(e){return Ll(ta(e))}function oa(e,n){return Gl(na(e),n,ta(e))}function ia(e,n){return ea(n,Kl(n,e))}function sa(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function ua(e,n){let t;switch(n.tag){case 2:{const e=n.fields[1];t=sa(n.fields[0],e,!0);break}case 1:{const e=n.fields[1],r=n.fields[2];t=sa(n.fields[0],e,!1)+"\nReason: "+r;break}case 3:{const e=n.fields[1];t=sa(n.fields[0],e,!0);break}case 4:{const e=n.fields[1],r=n.fields[0],o=n.fields[2];t=sa(r,e,!0)+"\nNode `"+o+"` is unkown.";break}case 5:{const e=n.fields[1];t="Expecting "+n.fields[0]+".\n"+JSON.stringify(e,null,4);break}case 7:t="The following errors were found:\n\n"+ot("\n\n",n.fields[0]);break;case 6:t="The following `failure` occurred with the decoder: "+n.fields[0];break;default:{const e=n.fields[1];t=sa(n.fields[0],e,!1)}}return 7===n.tag?t:"Error at: `"+e+"`\n"+t}function ca(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new he(1,ua(e[0],e[1]))}{const e=r.fields[0];return new he(0,e)}}function la(e,n){let t;try{return ca("$",e,JSON.parse(n))}catch(e){if(t=e,t instanceof SyntaxError){return new he(1,"Given an invalid JSON: "+e.message)}throw e}}const aa=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new he(0,(e+128&255)-128):new he(1,[t,new _l(1,"a sbyte",e,"Value was either too large or too small for a sbyte")]):new he(1,[t,new _l(1,"a sbyte",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!1,8,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[t,new _l(0,"a sbyte",r)])}return new he(1,[t,new _l(0,"a sbyte",r)])},$a=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new he(0,255&e):new he(1,[t,new _l(1,"a byte",e,"Value was either too large or too small for a byte")]):new he(1,[t,new _l(1,"a byte",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!0,8,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[t,new _l(0,"a byte",r)])}return new he(1,[t,new _l(0,"a byte",r)])},fa=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new he(0,(e+32768&65535)-32768):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!1,16,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])},da=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new he(0,65535&e):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!0,16,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])},ha=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new he(0,~~e):new he(1,[t,new _l(1,"an int",e,"Value was either too large or too small for an int")]):new he(1,[t,new _l(1,"an int",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!1,32,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[t,new _l(0,"an int",r)])}return new he(1,[t,new _l(0,"an int",r)])},pa=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new he(0,e>>>0):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!0,32,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])};function ma(e,n){if("string"==typeof n){let r,o=Fn(-621355968e5,0);if(r=[Bn(n,new L(()=>o,e=>{o=e})),o],r[0]){const e=r[1];return new he(0,1===(t=e).kind?t:Fn(t.getTime(),1))}return new he(1,[e,new _l(0,"a datetime",n)])}return new he(1,[e,new _l(0,"a datetime",n)]);var t}function ga(e,n){if("string"==typeof n){let t,r=Sl(-621355968e5,0);if(t=[El(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a datetimeoffset",n)])}return new he(1,[e,new _l(0,"a datetime",n)])}function wa(e,n,t,r){let o;const i=t+".["+f(e)+"]";if(Array.isArray(r)){const t=r;if(e<t.length)return n(i,t[e]);{const n="a longer array. Need index `"+f(e)+"` but there are only `"+(o=0|t.length,f(o)+"` entries");return new he(1,[i,new _l(5,n,r)])}}return new he(1,[i,new _l(0,"an array",r)])}function _a(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return pe(e=>Kt(e),Dt((t,o)=>{if(r+=1,0===t.tag){const i=t.fields[0],s=e(n+".["+f(r)+"]",o);if(0===s.tag){const e=s.fields[0];return new he(0,Wt(e,i))}{const e=s.fields[0];return new he(1,e)}}return t},new he(0,Ht()),o))}return new he(1,[n,new _l(0,"a list",t)])}function ya(e,n,t){if(Array.isArray(t)){let r=-1;const o=t,i=It(new Array(o.length),0,o.length,null);return Dt((t,o)=>{if(r+=1,0===t.tag){const i=t.fields[0],s=e(n+".["+f(r)+"]",o);if(0===s.tag){const e=s.fields[0];return i[r]=e,new he(0,i)}{const e=s.fields[0];return new he(1,e)}}return t},new he(0,i),o)}return new he(1,[n,new _l(0,"an array",t)])}function va(e,n,t){return new he(0,e)}function ba(e,n,t,r){const o=n(t,r);if(0===o.tag){return e(o.fields[0],t,r)}{const e=o.fields[0];return new he(1,e)}}function Ca(e,n,t,r){const o=n(t,r);if(1===o.tag){const e=o.fields[0];return new he(1,e)}{const n=o.fields[0];return new he(0,e(n))}}function xa(e,n){let t;const r=e;return t=e=>n=>wa(0,r,e,n),e=>r=>ba(k(3,e=>{let t;const r=n;return t=e=>n=>wa(1,r,e,n),n=>r=>ba((n,t,r)=>va([e,n]),k(2,t),n,r)}),k(2,t),e,r)}function Sa(e){return qs(e)}function Ea(e,n,t,r){let o,i;return n.length!==r.length?new he(1,[t,new _l(6,(o=0|r.length,i=0|n.length,Kn(Jn("Expected %i %s but got %i"))(i)(e)(o)))]):Ut(k(3,A(e=>n=>r=>{if(0===r.tag){const o=r.fields[0];return pe(e=>Wt(e,o),n(t,e))}return r},[0,[0,2],0])),r,n,new he(0,Ht()))}function ka(e,n,t,r,o,i){const s=(u=e=>Y(e)===r,oe(t).find(u));var u;if(null!=s){const t=s;if(0===i.length)return new he(0,ue(t,[]));return pe(e=>ue(t,Xt(e)),Ea("union fields",Tt(t=>Aa(e,n,!1,t[1]),function(e){return null==e.fields?[]:e.fields}(t)),o,i))}return new he(1,[o,new _l(6,"Cannot find case "+r+" in "+K(t))])}function Na(e,n,t,r){const o=new L(null),i=Xs(K(r),o,e);let s;if(function(e){return e instanceof j?null!=e.fields:e instanceof U}(r)){const e=Tt(e=>[xl(n,Y(e)),Aa(i,n,!1,e[1])],ie(r));s=n=>t=>pe(e=>function(e,n){const t=ie(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce((e,[t,r],o)=>(e[t]=n[o],e),{})}(r,Xt(e)),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new he(1,[n,new _l(0,"an object",t)]):Rt(k(2,e=>{const r=e[0],o=e[1];return e=>{if(0===e.tag){const i=e.fields[0];return pe(e=>Wt(e,i),o(n+"."+r)(t[r]))}return e}}),e,new he(0,Ht()))}(e,n,t))}else if(function(e){return e instanceof j?null!=e.cases:e instanceof T}(r))s=e=>t=>{if("string"==typeof t){return ka(i,n,r,t,e,[])}if(Array.isArray(t)){const o=t,s=o[0];return ka(i,n,r,s,e,o.slice(1,o.length))}return new he(1,[e,new _l(0,"a string or array",t)])};else{if(!t){let e;const n=K(r);throw e=Kn(Jn("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}s=e=>n=>new he(1,[e,new _l(2,"an extra coder for "+K(r),n)])}return o.contents=s,s}function Aa(e,n,t,r){let o;const i=K(r),s=Ys(i,e);if(null==s){if(Q(r)){const t=Aa(e,n,!1,function(e){var n;return Q(e)?null===(n=e.generics)||void 0===n?void 0:n[0]:void 0}(r));return e=>n=>ya(k(2,t),e,n)}if(ee(r)){const e=K(function(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=aa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=$a(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=fa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,(u=(u=e)<0&&null!=c&&10!==c?65535+u+1:u).toString(c))):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}var u,c};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,s=da(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=ha(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,f(e))):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=pa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Ir(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};{const e=K(r),n=Yn(e=>{throw new Error(e)},Jn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>{const t=n(e);return e=>t(e)}}}if(function(e){return null!=e.generics&&e.generics.length>0}(r)){if(se(r)){const t=Tt(t=>Aa(e,n,!1,t),function(e){if(se(e)&&null!=e.generics)return e.generics;throw new Error(e.fullname+" is not a tuple type")}(r));return e=>n=>Array.isArray(n)?pe(e=>Xt(e),Ea("tuple elements",t,e,n)):new he(1,[e,new _l(0,"an array",n)])}{const i=K(function(e){return null==e.generics?e:new j(e.fullname,e.generics.map(()=>J))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===i){const t=Aa(e,n,!0,B(r)[0]);return e=>n=>{return r=k(2,t),o=e,null==(i=n)?new he(0,void 0):pe(e=>le(e),r(o,i));var r,o,i}}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===i){const t=Aa(e,n,!1,B(r)[0]);return e=>n=>_a(k(2,t),e,n)}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===i){const t=Aa(e,n,!1,B(r)[0]),i=Aa(e,n,!1,B(r)[1]);let s;const u=nr([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new he(1,[t,new _l(0,"an object",r)]):Tr((o,i)=>{if(0===o.tag){const s=o.fields[0],u=e(t,i);if(0===u.tag){const e=u.fields[0],o=n(t+"."+i,r[i]);if(0===o.tag){const n=o.fields[0];return new he(0,Wt([e,n],s))}{const e=o.fields[0];return new he(1,e)}}{const e=u.fields[0];return new he(1,e)}}return o},new he(0,Ht()),Object.keys(r))}(k(2,t),k(2,i),e,n),(o=xa(k(2,t),k(2,i)),e=>n=>_a(k(2,o),e,n))]);return s=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(qt(o))return new he(1,[t,new _l(7,i)]);{const s=Jt(o),u=Zt(o),c=ca(t,k(2,u),r);if(1===c.tag){e=s,n=rr(i,zt(c.fields[0]));continue e}{const e=c.fields[0];return new he(0,e)}}}})(u,Ht());var t,r},e=>n=>Ca(e=>Sa(e),k(2,s),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===i){const t=Aa(e,n,!1,B(r)[0]);return e=>n=>{const r=ya(k(2,t),e,n);if(0===r.tag){const e=r.fields[0];return new he(0,ia(e,{Compare:(e,n)=>x(e,n)}))}{const e=r.fields[0];return new he(1,e)}}}return Na(e,n,t,r)}}return"System.Boolean"===i?e=>n=>{return t=e,"boolean"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===i?e=>n=>{return t=e,null==(r=n)?new he(0,void 0):new he(1,[t,new _l(0,"null",r)]);var t,r}:"System.String"===i?e=>n=>{return t=e,"string"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a string",r)]);var t,r}:"System.SByte"===i?aa:"System.Byte"===i?$a:"System.Int16"===i?fa:"System.UInt16"===i?da:"System.Int32"===i?ha:"System.UInt32"===i?pa:"System.Double"===i?e=>n=>{return t=e,"number"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a float",r)]);var t,r}:"System.Single"===i?e=>n=>{return t=e,"number"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a float32",r)]);var t,r}:"System.DateTime"===i?e=>n=>ma(e,n):"System.DateTimeOffset"===i?e=>n=>ga(e,n):"System.TimeSpan"===i?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;if(t=[Al(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a timespan",n)])}return new he(1,[e,new _l(0,"a timespan",n)])}(e,n):"System.Guid"===i?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";if(t=[ft(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a guid",n)])}return new he(1,[e,new _l(0,"a guid",n)])}(e,n):"System.Object"===i?e=>e=>new he(0,e):Na(e,n,t,r)}{const e=s;return n=>t=>e.contents(n)(t)}}function Ia(e){if(null!=e){return Ks((e,n)=>{const t=n[1];return new L(t)},e.Coders)}return Qs()}function Ta(e,n,t){const r=fe(e,new yl(0)),o=ae(t).ResolveType();return Aa(Ia(n),r,!1,o)}function Pa(e,n,t,r){return la(k(2,Ta(n,t,r)),e)}function Da(e){const n=e.fields[0];return new dt(0,n)}function Ma(e){return Kn(Xn("%s%P()/account-registry/admin",[e]))}function Oa(e,n){return Kc(0,()=>{const t=ll((r=Kn(Jn("Bearer %s"))(e),new el(0,"Authorization",r)),n);var r;const o=Wr.Bind(al(t),e=>Wr.Return(new he(0,e)));return Wr.Delay(()=>Wr.Bind(o,e=>{let n;const r=e;if(1===r.tag){const e=r.fields[0];return Wr.Return(new he(1,e))}{const e=r.fields[0];return Wr.ReturnFrom((n=e,429===n.statusCode||n.statusCode>=500?Wr.Bind(al(t),e=>Wr.Return(new he(0,e))):function(e,n){return Wr.Return(qr(0,n))}(0,n)))}}))})}function Ra(e,n){return Kc(0,()=>{const t=Oa(n,cl(new Qc(0),ul(Kn(Xn("%P()/partners",[Ma(e)])))));return Wr.Delay(()=>Wr.Bind(t,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(me(e=>$l(e=>e,ir(e=>ju(e),e)),Pa(n.responseText,new yl(1),void 0,{ResolveType:()=>Z(z("Dto.AdminApi.Partner",[],uo,()=>[["StreamId",X],["Name",X],["Website",X],["ContactDetails",no()],["Notes",V(X)]]))}))):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}function Ua(e,n,t,r,o){return Kc(0,()=>{let i,s;const u=Mu(r.SearchText);let c;s=rt(u)?void 0:Kn(Xn("search=%P()",[encodeURIComponent(u)]));const l=[(a=r.Sort).fields[0],a.fields[1]];var a;let $;c=1===l[0].tag?1===l[1].tag?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":1===l[1].tag?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc";const f=0|Ru(r.PageSize);$=f<=100&&f>=10?Kn(Xn("page_size=%i%P()",[f])):void 0,i="?"+ot("&",function(e,n){const t=new Lt(null,void 0),r=Yt((n,t)=>{const r=e(t);if(null==r)return n;{const e=ae(r),t=new Lt(e,void 0);return n.tail=t,t}},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}(e=>e,nr([s,c,$])));const d=Oa(n,(e=>{if(null==o)return e;return ll(new el(0,"token",o),e)})(cl(new Qc(0),ul(Kn(Xn("%P()/partners/%P()/accounts%P()",[Ma(e),pt(t),i]))))));return Wr.Delay(()=>Wr.Bind(d,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(Pa(n.responseText,new yl(1),void 0,{ResolveType:ho})):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}class La extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Tab"]}}function Fa(e,n){const t=(null!=n?"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300":"border-indigo-500 text-indigo-600")+" whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm";return r=ko("a",E(Sr(vr(()=>Nr(xr(["key",e]),vr(()=>Nr(xr(["children",e]),vr(()=>Nr(xr(["className",t]),vr(()=>null!=n?xr(["href",wu(zt(ae(n)),1)]):Cr())))))))))),new La(0,r);var r}function ja(e){return ko("div",{className:"border-b border-gray-200",children:Ji.Children.toArray([ko("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:Ji.Children.toArray(Array.from(Dr(e=>e.fields[0],e)))})])})}class Ba extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Ga(e){let n;const t=e.accessToken,r=e.backendUrl,o=e.accountId,i=e.partnerId;return ko("superhero-super-configuration",wl(Ar(e=>e,[new Ba(1,t),new Ba(0,r),new Ba(2,(n=i.fields[0],n)),de(e=>{const n=e.fields[0];return new Ba(3,n)},o)]),1))}function Ha(e){return ko("label",{className:"block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2",children:e})}function Wa(e){return ko("div",{className:"mt-1 sm:mt-0 sm:col-span-2",children:Ji.Children.toArray([e])})}function za(e,n){return ko("div",{className:"sm:grid sm:grid-cols-4 sm:gap-4 sm:items-start sm:border-b sm:border-gray-200 sm:py-5",children:Ji.Children.toArray([Ha(e),Wa(n)])})}function qa(e){return ko("input",{type:"text",className:"max-w-lg block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:max-w-xs sm:text-sm border-gray-300 rounded-md",value:e,readOnly:!0})}function Va(e){return ko("textarea",{className:"max-w-lg shadow-sm block w-full focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md",value:e,readOnly:!0,rows:5})}function Za(e){const n=zt(ko("div",{children:Ji.Children.toArray(Array.from(e))}));return ko("form",{children:Ji.Children.toArray(Array.from(n))})}function Ja(e,n){const t=nr([ko("br",{}),(r=e,ko("div",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),children:Ji.Children.toArray([ko("span",{children:[r]})])})),ko("div",{className:ot(" ",["px-6"]),children:Ji.Children.toArray(Array.from(n))})]);var r;return ko("div",{children:Ji.Children.toArray(Array.from(t))})}function Xa(e){return n=>za(e,qa(n))}function Ya(e){return Ja("Account Information",nr([Xa("ID")(e.StreamId),Xa("Name")(e.Name),Xa("Contact")(Kn(Xn("%P() %P()",[e.ContactDetails.FirstName,e.ContactDetails.LastName]))),Xa("Phone")(e.ContactDetails.MobilePhone),Xa("Email")(e.ContactDetails.Email),Xa("Website")(e.Website)]))}function Ka(e){if(null==e)return null;{const n=e;return Ja("Legal Entity",nr([Xa("Business Name")(n.BusinessName),Xa("Business Number")(n.BusinessNumber),Xa("Address Line 1")(n.Address1),Xa("Address Line 2")(fe(n.Address2,"")),Xa("City")(n.City),Xa("State")(fe(n.State,"")),Xa("Postcode")(n.Postcode)]))}}function Qa(e){if(null==e)return null;return Ja("Other details",zt((n="Notes",e=>za(n,Va(e)))(e)));var n}function e$(e){return Za([Ya(e),Ka(e.LegalEntity),Qa(e.Notes)])}function n$(e){const n=zt(ko("span",{children:[e.error]}));return ko("div",{children:Ji.Children.toArray(Array.from(n))})}function t$(){const e=zt(ko("span",{children:["Please wait..."]}));return ko("div",{children:Ji.Children.toArray(Array.from(e))})}class r$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class o$ extends U{constructor(e){super(),this.Data=e}}function i$(){return[new o$(new eu(0)),Zu()]}class s$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","SuperConfiguration"]}}function u$(e,n,t){let r,o;const i=[e,n];return ja(1===t.tag?nr([Fa("Details",wu(Wu((r=i,new Bu(4,r[0],r[1]))),1)),Fa("Super Configuration",void 0)]):nr([Fa("Details",void 0),Fa("Super Configuration",wu(Wu((o=i,new Bu(5,o[0],o[1]))),1))]))}function c$(e,n,t){if(1===n.tag){const n=e.accountDetails;return ko(Ga,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}{const e=t.Data;let n,r,o;switch(0===e.tag||1===e.tag?n=2:3===e.tag?(n=3,o=e.fields[0]):0===e.fields[0].tag?(n=0,r=e.fields[0].fields[0]):n=1,n){case 0:return ko(e$,r);case 1:return ko(n$,{error:"There was an error retrieving account "});case 2:return ko(t$,null);case 3:return ko(n$,{error:I(o)})}}}function l$(e){let n,t;const r=e.mode,o=e.props,i=Xc(i$,(e,n)=>function(e,n){const t=e.fields[0];return[new o$(t),Zu()]}(e),[]),s=i[0],u=i[1];return os((n=[()=>{const e=o.accountDetails,n=e[0],t=e[1];return function(e,n,t,r){const o=t.fields[0],i=r.fields[0];return Kc(0,()=>{const t=Oa(n,cl(new Qc(0),ul(Kn(Xn("%P()/partners/%s%P()/accounts/%s%P()",[Ma(e),o,i])))));return Wr.Delay(()=>Wr.Bind(t,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(Pa(n.responseText,new yl(1),void 0,{ResolveType:lo})):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}(o.backendUrl,o.accessToken,n,t)},e=>{u(new r$(0,e))}],tu(n[0],n[1]))),ko("div",{children:Ji.Children.toArray([(t=o.accountDetails,u$(t[0],t[1],r)),c$(o,r,s)])})}class a$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}}class $${constructor(e){this.props=e}}function f$(e){return n=>t=>Wr.Delay(()=>{const r=Da(e.props.partnerId);return Wr.Bind(Ua(e.props.backendUrl,e.props.accessToken,r,n,void 0),e=>(t(new a$(2,new eu(2,e))),Wr.Zero()))})}class d$ extends U{constructor(e,n,t,r){super(),this.Data=e,this.SearchText=n,this.Sort=t,this.PageSize=r}}function h$(){return[new d$(new eu(0),Du,Nu,(e=20,new Ou(0,e))),Zu()];var e}class p$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function m$(e){return new p$(0,e)}function g$(e){return e.fields[0]}class w$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function _$(e){return new w$(0,e)}function y$(e){return e.fields[0]}function v$(e){return m$(ko("th",E(nr([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))))}function b$(e,n){return _$(ko("td",{className:ot(" ",Nr(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function C$(e,n){let t;const r=(e,n)=>{return ko("tr",{className:(t=e,t%2==0?"bg-white":"bg-gray-50"),children:Ji.Children.toArray(Array.from(Dr(e=>y$(e),n)))});var t};return ko("div",{className:"flex flex-col mt-4",children:Ji.Children.toArray([ko("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:Ji.Children.toArray([ko("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Ji.Children.toArray([ko("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Ji.Children.toArray([ko("table",{className:"min-w-full divide-y divide-gray-200",children:Ji.Children.toArray([(e=>{let n;return ko("thead",{className:"bg-gray-50",children:(n=Dr(e=>g$(e),e),ko("tr",{children:Ji.Children.toArray(Array.from(n))}))})})(e),(t=Mr(k(2,e=>{const n=function(e,n,t){if(null!=n){if("__CURRIED__"in n){n=n.__CURRIED__;for(let e=0;e<t.length;e++)n=n(t[e]);return n}switch(e){case 1:return e=>n.apply(void 0,t.concat([e]));case 2:return e=>r=>n.apply(void 0,t.concat([e,r]));case 3:return e=>r=>o=>n.apply(void 0,t.concat([e,r,o]));case 4:return e=>r=>o=>i=>n.apply(void 0,t.concat([e,r,o,i]));case 5:return e=>r=>o=>i=>s=>n.apply(void 0,t.concat([e,r,o,i,s]));case 6:return e=>r=>o=>i=>s=>u=>n.apply(void 0,t.concat([e,r,o,i,s,u]));case 7:return e=>r=>o=>i=>s=>u=>c=>n.apply(void 0,t.concat([e,r,o,i,s,u,c]));case 8:return e=>r=>o=>i=>s=>u=>c=>l=>n.apply(void 0,t.concat([e,r,o,i,s,u,c,l]));default:throw new Error("Partially applying to more than 8-arity is not supported: "+e)}}}(1,r,[e]);return e=>n(e)}),n),ko("tbody",{children:Ji.Children.toArray(Array.from(t))}))])})])})])})])})])})}function x$(e){return["fillRule",e]}function S$(e){return["clipRule",e]}const E$=ko("svg",{className:ot(" ",["h-5","w-5"]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ji.Children.toArray([ko("path",E(nr([["d","M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"],x$("evenodd"),S$("evenodd")])))])}),k$=ko("svg",{className:ot(" ",["h-5","w-5"]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ji.Children.toArray([ko("path",E(nr([["d","M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"],x$("evenodd"),S$("evenodd")])))])});function N$(e,n,t,r){return m$(ko("th",{className:ot(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"]),scope:"col",children:Ji.Children.toArray([ko("a",{className:ot(" ",["group","inline-flex","cursor-pointer"]),onClick:t,children:Ji.Children.toArray([r,ko("span",{className:ot(" ",(o=!e,i=zt("invisible"),s=nr(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"]),o?rr(s,i):s)),children:Ji.Children.toArray(Array.from(Sr(vr(()=>xr(n?E$:k$)))))})])})])}));var o,i,s}function A$(e,n){return N$(y(Au(e.Sort),new xu(1)),y(Iu(e.Sort),new Su(0)),t=>{n(new a$(1,Tu(new xu(1),e.Sort)))},"Name")}function I$(e,n){return N$(y(Au(e.Sort),new xu(0)),y(Iu(e.Sort),new Su(0)),t=>{n(new a$(1,Tu(new xu(0),e.Sort)))},"Id")}function T$(e,n,t){return _$(ko("td",{className:ot(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"]),children:Ji.Children.toArray(Array.from(Sr(vr(()=>Nr(xr(ko("div",{className:ot(" ",["font-medium"]),children:Ji.Children.toArray([ko("span",{children:[e]})])})),vr(()=>{let e,r;return Nr(null==n?xr(null):(e=n,xr((r="Legal Entity: "+e,ko("span",{children:[r]})))),vr(()=>{if(null==t)return xr(null);{const e=t;return Nr(xr(ko("br",{})),vr(()=>{let n;return xr((n="ABN: "+e,ko("span",{children:[n]})))}))}}))}))))))}))}function P$(e){return _$(ko("td",{className:ot(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}class D$ extends U{constructor(e,n){super(),this.Data=e,this.LoadNext=n}}class M$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Resolved","InProgress"]}}class O$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Known","Unknown"]}}function R$(e,n,t,r,o,i){let s;const u=[n,t];let c,l,a;switch(null!=u[0]&&null!=u[1]?(c=0,l=u[0],a=u[1]):c=1,c){case 0:s=Sr(vr(()=>Nr(xr("Showing "),vr(()=>Nr(xr(ko("span",{className:"font-medium",children:Kn(Xn("%i%P()",[l]))})),vr(()=>Nr(xr(" to "),vr(()=>Nr(xr(ko("span",{className:"font-medium",children:Kn(Xn("%i%P()",[a]))})),vr(()=>Nr(xr(" of "),vr(()=>{let e;return 1===r.tag?zt(" many"):(e=0|r.fields[0],nr([ko("span",{className:"font-medium",children:I(e)})," results"]))}))))))))))));break;case 1:s=zt(null)}const $=Sr(vr(()=>{let e;return Nr(null==i?xr(null):(e=i,xr(ko("a",{className:ot(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:e,children:"Previous "}))),vr(()=>{if(null==o)return xr(null);{const e=o;return xr(ko("a",{className:ot(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:e,children:" Next"}))}}))}));return ko("tfoot",{className:ot(" ",["w-full"]),children:Ji.Children.toArray([ko("tr",{children:Ji.Children.toArray([ko("td",{colSpan:e,children:Ji.Children.toArray([ko("nav",{className:ot(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"]),children:Ji.Children.toArray([ko("div",{className:ot(" ",["hidden","sm:block"]),children:Ji.Children.toArray([ko("p",{className:ot(" ",["text-sm","text-gray-700"]),children:Ji.Children.toArray(Array.from(s))})])}),ko("div",{className:ot(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:Ji.Children.toArray(Array.from($))})])})])})])})])})}function U$(e,n){const t=$s(1),r=t[1],o=0|t[0];return[o,t=>{if(o===e)if(null==n);else{const e=n;Yn(e=>console.log(e),Jn("Calling Load")),e(),r(o+1)}else r(o+1)},e=>{r(o-1)}]}function L$(e){const n=e.data,t=e.pageSize,r=e.renderRowCells,o=e.columnHeaders,i=(s=t,u=n.Data,nr(Tt(e=>nr(e),Mt(s,Xt(u)))));var s,u;const c=U$(Vt(i),n.LoadNext),l=c[2],a=0|c[0],$=c[1];let f;const d=cr(a-1,i);if(null==d)f=new M$(1);else{f=new M$(0,d)}const h=0|Vt(n.Data),p=null==n.LoadNext?new O$(0,h):new O$(1),m=1===f.tag?void 0:h>=1?(a-1)*t+1:void 0;let g;if(1===f.tag)g=void 0;else{const e=f.fields[0];g=h>=1?(a-1)*t+Vt(e):void 0}const w=1===a?void 0:l,_=a===Vt(i)?null!=n.LoadNext?$:void 0:a<Vt(i)?$:void 0;return ko("div",{className:"flex flex-col mt-4",children:Ji.Children.toArray([ko("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:Ji.Children.toArray([ko("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Ji.Children.toArray([ko("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Ji.Children.toArray([ko("table",{className:"min-w-full divide-y divide-gray-200",children:Ji.Children.toArray(Array.from(Sr(vr(()=>Nr(xr(function(e){let n;return ko("thead",{className:"bg-gray-50",children:(n=Dr(e=>g$(e),e),ko("tr",{children:Ji.Children.toArray(Array.from(n))}))})}(o)),vr(()=>{let e,n;return Nr(1===f.tag?xr(null):(e=f.fields[0],xr((n=Mr((e,n)=>function(e,n){return ko("tr",{className:(t=e,t%2==0?"bg-white":"bg-gray-50"),children:Ji.Children.toArray(Array.from(Dr(e=>y$(e),n)))});var t}(e,n),r(e)),ko("tbody",{children:Ji.Children.toArray(Array.from(n))})))),vr(()=>xr(R$(Vt(o),m,g,p,_,w))))}))))))})])})])})])})])})}function F$(e){let n;const t=function(e){return new $$(e)}(e),r=Xc(h$,(e,n)=>function(e,n,t){switch(n.tag){case 1:{const r=n.fields[0],o=n=>{const o=new Uu(t.SearchText,r,t.PageSize);ws(f$(e)(o)(n))};return[new d$(new eu(1),t.SearchText,r,t.PageSize),Ju(o)]}case 2:{const e=n.fields[0];return[new d$(e,t.SearchText,t.Sort,t.PageSize),Zu()]}case 3:{const e=n.fields[0];let r;const o=[t.Data,e];let i,s,u,c;if(2===o[0].tag)if(0===o[0].fields[0].tag){const e=o[1];1===e.tag?(i=1,c=e.fields[0]):(i=0,s=o[0].fields[0].fields[0],u=e.fields[0])}else{const e=o[1];1===e.tag?(i=1,c=e.fields[0]):i=2}else{const e=o[1];1===e.tag?(i=1,c=e.fields[0]):i=2}switch(i){case 0:r=new eu(2,new he(0,new fo(rr(s.Accounts,u.Accounts),u.Token)));break;case 1:r=new eu(2,new he(1,c));break;case 2:r=new eu(3,new Error("Failed to retrieve the account data"))}return[new d$(r,t.SearchText,t.Sort,t.PageSize),Zu()]}case 4:{const n=n=>{const r=new Uu(t.SearchText,t.Sort,t.PageSize);ws(f$(e)(r)(n))};return[new d$(new eu(1),t.SearchText,t.Sort,t.PageSize),Ju(n)]}default:{const e=n.fields[0];return[new d$(t.Data,(r=e,new Pu(0,r.trim())),t.Sort,t.PageSize),Zu()]}}var r}(t,e,n),[]),o=r[0],i=r[1],s=new Uu(o.SearchText,o.Sort,o.PageSize);os((n=[()=>function(e,n,t){const r=Da(e.props.partnerId);return Ua(e.props.backendUrl,e.props.accessToken,r,n,void 0)}(t,s),e=>{i(new a$(2,e))}],tu(n[0],n[1])));const u=n=>{const r=nr([I$(o,i),A$(o,i),v$("Contact"),v$("Website")]),u=new D$(n.Accounts,de(N(2,(e,n)=>{var r;ws((r=t,e=>n=>t=>Wr.Delay(()=>{const o=Da(r.props.partnerId);return Wr.Bind(Ua(r.props.backendUrl,r.props.accessToken,o,e,n),e=>(t(new a$(3,e)),Wr.Zero()))}))(s)(e)(i))}),n.Token));return ko(L$,{columnHeaders:r,renderRowCells:n=>ir(n=>function(e,n){let t,r;return nr([(t=[wu(Wu((r=[e,new Et(0,n.AccountId)],new Bu(4,r[0],r[1]))),1),n.AccountId],s=t[0],u=t[1],_$(ko("td",{className:"px-6 py-2 whitespace-nowrap text-sm align-top",children:Ji.Children.toArray([ko("a",{className:"text-indigo-600 hover:text-indigo-900",children:u,href:s})])}))),T$(n.Name,n.BusinessName,n.BusinessNumber),(o=n.Contact,i=n.ContactMobilePhone,_$(ko("td",{className:ot(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"]),children:Ji.Children.toArray([ko("span",{children:[o]}),ko("br",{}),ko("span",{children:[i]})])}))),P$(n.Website)]);var o,i,s,u}(e.partnerId,n),n),pageSize:0|Ru(o.PageSize),data:u})},c=e=>{i(new a$(0,e))},l=e=>{i(new a$(4))},a=o.Data;let $,f,d,h;switch(0===a.tag||1===a.tag?$=2:3===a.tag?($=3,h=a.fields[0]):1===a.fields[0].tag?($=1,d=a.fields[0].fields[0]):($=0,f=a.fields[0].fields[0]),$){case 0:return(e=>{const n=nr([ko("div",{className:ot(" ",["grid","grid-cols-2","pt-2","sm:-mr-6","lg:mr-0"]),children:Ji.Children.toArray([ko("div",{className:ot(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0"]),children:Ji.Children.toArray([(r=Mu(o.SearchText),i=c,ko("div",{className:ot(" ",["flex-grow","max-w-md"]),children:Ji.Children.toArray([ko("label",{for:"search",children:"Search",className:ot(" ",["block","text-sm","font-medium","text-gray-700"])}),ko("div",{className:"mt-1",children:Ji.Children.toArray([ko("input",{id:"search",name:"search",type:"text",className:ot(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:"Account Id, Name or Legal Entity",value:r,onChange:e=>{i(e.target.value)}})])})])})),(t=l,ko("div",{className:"pt-6",children:Ji.Children.toArray([ko("div",{className:ot(" ",["flex","justify-end"]),children:Ji.Children.toArray([ko("button",{type:"search",children:"Search",className:ot(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:t})])})])}))])})])}),u(e)]);var t,r,i;return ko("div",{children:Ji.Children.toArray(Array.from(n))})})(f);case 1:return ko(n$,{error:d});case 2:return ko(t$,null);case 3:return ko(n$,{error:I(h)})}}function j$(e,n){const t=nr([ko("br",{}),(r=e,ko("div",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),children:Ji.Children.toArray([ko("span",{children:[r]})])})),ko("div",{className:ot(" ",["px-6"]),children:Ji.Children.toArray(Array.from(n))})]);var r;return ko("div",{children:Ji.Children.toArray(Array.from(t))})}function B$(e){return Za([j$("Partner Information",nr([za("ID",qa(pt(e.StreamId))),za("Name",qa(Jr(e.Name))),za("Contact",qa(Kn(Xn("%P() %P()",[Yr(e.ContactDetails.FirstName),Kr(e.ContactDetails.LastName)])))),za("Phone",qa(Qr(e.ContactDetails.MobilePhone))),za("Website",qa(Xr(e.Website))),za("Notes",Va(fe(ro(e.Notes),"")))]))])}class G$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration"]}}class H$ extends U{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}function W$(e){let n,t,r;return ja(1===e.tag?(n=e.fields[0],nr([Fa("Details",wu(Wu(new Bu(1,n.partnerId)),1)),Fa("Accounts",void 0),Fa("Super Configuration",wu(Wu(new Bu(3,n.partnerId)),1))])):2===e.tag?(t=e.fields[0].PartnerId,nr([Fa("Details",wu(Wu(new Bu(1,t)),1)),Fa("Accounts",wu(Wu(new Bu(2,t)),1)),Fa("Super Configuration",void 0)])):(r=e.fields[0],nr([Fa("Details",void 0),Fa("Accounts",wu(Wu(new Bu(2,new xt(0,pt(r.StreamId)))),1)),Fa("Super Configuration",wu(Wu(new Bu(3,new xt(0,pt(r.StreamId)))),1))])))}function z$(e){switch(e.tag){case 1:{const n=e.fields[0];return ko(F$,{accessToken:n.accessToken,backendUrl:n.backendUrl,partnerId:n.partnerId})}case 2:return ko(Ga,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});default:return ko(B$,e.fields[0])}}function q$(e){const n=e.mode;return ko("div",{children:Ji.Children.toArray([W$(n),z$(n)])})}function V$(e){const n=e.partnerList;return C$(nr([v$("ID"),v$("Name"),v$("Contact"),v$("Phone"),v$("Website")]),ir(e=>{let n;const t=pt(e.StreamId),r=new xt(0,t);return nr([(n=[wu(Wu(new Bu(1,r)),1),t],o=n[0],i=n[1],_$(ko("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:Ji.Children.toArray([ko("a",{className:"text-indigo-600 hover:text-indigo-900",children:i,href:o})])}))),b$(["text-gray-500"],Jr(e.Name)),b$(["text-gray-500"],Kn(Xn("%P() %P()",[Yr(e.ContactDetails.FirstName),Kr(e.ContactDetails.LastName)]))),b$(["text-gray-500"],Qr(e.ContactDetails.MobilePhone)),b$(["text-gray-500"],Xr(e.Website))]);var o,i},n))}var Z$=Si((function(e,n){return ko("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:n},e),ko("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));class J$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BreadCrumb"]}}function X$(e){return ko("nav",{className:"pt-2","aria-label":"Breadcrumb",children:Ji.Children.toArray([ko("ol",{className:"-ml-3 max-w-screen-xl w-full flex space-x-4",children:Ji.Children.toArray(Array.from(or((e,n)=>{const t=n.fields[0][1];return function(e,n,t,r){return ko("li",{key:e,className:"flex",children:Ji.Children.toArray([ko("div",{className:"flex items-center",children:Ji.Children.toArray(Array.from(Sr(vr(()=>Nr(t?Cr():xr(ko(Z$,{className:"flex-shrink-0 h-5 w-5 text-gray-400"})),vr(()=>xr(ko("a",E(Sr(vr(()=>Nr(xr(["children",e]),vr(()=>Nr(null!=n?xr(["href",wu(ae(n),1)]):Cr(),vr(()=>xr(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))))))})])})}(n.fields[0][0],t,0===e)},e)))})])})}function Y$(e){let n,t,r,o,i,s,u;const c=e.page,l=()=>new J$(0,["Partners",Wu(new Bu(0))]),a=e=>new J$(0,[oo(e),Wu(new Bu(1,e))]),$=e=>new J$(0,["Accounts",Wu(new Bu(2,e))]),f=e=>new J$(0,[io(e),void 0]);return X$(6===c.tag?zt(l()):1===c.tag?(n=c.fields[0],nr([l(),a(n)])):2===c.tag?(t=c.fields[0],nr([l(),a(t),$(t)])):3===c.tag?(r=c.fields[0],nr([l(),a(r),(d=r,new J$(0,["Super Configuration",Wu(new Bu(3,d))]))])):4===c.tag?(o=c.fields[0],i=c.fields[1],nr([l(),a(o),$(o),f(i)])):5===c.tag?(s=c.fields[0],u=c.fields[1],nr([l(),a(s),$(s),f(u),(e=>{let n;const t=e[0],r=e[1];return new J$(0,["Super Configuration",Wu((n=[t,r],new Bu(5,n[0],n[1])))])})([s,u])])):zt(l()));var d}function K$(){return(K$=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Q$(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return Xo(n,t)}function ef(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ko(Q$,K$({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,s=n.attributes,u=n.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[nf(s[i].name)]=s[i].value);for(i=u.length;i--;){var c=e(u[i],null),l=u[i].slot;l?o[l]=ko(of,{name:l},c):r[i]=c}var a=t?ko(of,null,r):r;return ko(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Jo:Zo)(this._vdom,this._root)}function nf(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function tf(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[nf(e)]=t,this._vdom=Xo(this._vdom,r),Zo(this._vdom,this._root)}}function rf(){Zo(this._vdom=null,this._root)}function of(e,n){var t=this;return ko("slot",K$({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}class sf extends U{constructor(e,n){super(),this.Data=e,this.CurrentPage=n}}function uf(){return z("AccountRegistry.AdminUI.App.State",[],sf,()=>[["Data",nu(q("Microsoft.FSharp.Core.FSharpResult`2",[Vu(),X],he,()=>[[["ResultValue",Vu()]],[["ErrorValue",X]]]))],["CurrentPage",Gu()]])}class cf extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageChanged","LoadData"]}}function lf(){return q("AccountRegistry.AdminUI.App.Msg",[],cf,()=>[[["Item",Gu()]],[["Item",nu(q("Microsoft.FSharp.Core.FSharpResult`2",[Vu(),X],he,()=>[[["ResultValue",Vu()]],[["ErrorValue",X]]]))]]])}function af(){const e=Hu(yu(window.location.hash,1)),n=6===e.tag?zu(new Bu(0)):Zu();return[new sf(new eu(0),e),n]}function $f(e,n){if(0===e.tag){const t=e.fields[0];return 6===t.tag?[n,zu(t)]:[new sf(n.Data,t),Zu()]}{const t=e.fields[0];return[new sf(t,n.CurrentPage),Zu()]}}function ff(e){const n=Xc(af,(e,n)=>$f(e,n),[]),t=n[0],r=n[1];os(tu(()=>{return n=e.backendUrl,t=e.accessToken,Kc(0,()=>Wr.Bind(Ra(n,t),e=>Wr.Return(pe(e=>new qu(e),e))));var n,t},e=>{r(new cf(1,e))}));const o=n=>{const t=n[0],r=n[1];return n=>ko(l$,{props:{accessToken:e.accessToken,accountDetails:[t,r],backendUrl:e.backendUrl},mode:n})};let i;const s=t.Data;let u,c,l,a;switch(1===s.tag?u=0:2===s.tag?1===s.fields[0].tag?(u=2,l=s.fields[0].fields[0]):(u=1,c=s.fields[0].fields[0]):3===s.tag?(u=3,a=s.fields[0]):u=0,u){case 0:i=ko(t$,null);break;case 1:{const n=e=>{return n=c.Partners,t=oo(e),ur(e=>pt(e.StreamId)===t,n);var n,t},r=t.CurrentPage;switch(r.tag){case 1:{const e=n(r.fields[0]);if(null==e)i=ko(n$,{error:"Unknown Partner"});else{i=ko(q$,{mode:new G$(0,e)})}break}case 2:{const n=r.fields[0];$=n,i=ko(q$,{mode:new G$(1,{accessToken:e.accessToken,backendUrl:e.backendUrl,partnerId:$})});break}case 3:{const n=r.fields[0];i=ko(q$,{mode:new G$(2,new H$(n,e.backendUrl,e.accessToken))});break}case 4:i=o([r.fields[0],r.fields[1]])(new s$(0));break;case 5:i=o([r.fields[0],r.fields[1]])(new s$(1));break;default:i=ko(V$,{partnerList:c.Partners})}break}case 2:i=ko(n$,{error:l});break;case 3:i=ko(n$,{error:I(a)});break}var $;return vu({onUrlChanged:e=>{r(new cf(0,Hu(e)))},application:ko(Ao,{},ko(Y$,{page:t.CurrentPage}),i)})}(function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=r&&r.shadow?n.attachShadow({mode:"open"}):n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=ef,o.prototype.attributeChangedCallback=tf,o.prototype.disconnectedCallback=rf,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)})(e=>ko(ff,e),"superhero-account-registry")}]);
|
|
1
|
+
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function r(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function o(e){return"function"==typeof e.GetHashCode}function i(e){return null!=e&&"function"==typeof e.Dispose}function s(e,n){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).constructor}t.r(n),t.d(n,"State",(function(){return cf})),t.d(n,"State$reflection",(function(){return lf})),t.d(n,"Msg",(function(){return af})),t.d(n,"Msg$reflection",(function(){return $f})),t.d(n,"StateModule_init",(function(){return ff})),t.d(n,"StateModule_update",(function(){return df})),t.d(n,"AccountRegistryComponent",(function(){return hf}));class u{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function c(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new u(e[Symbol.iterator]())}function l(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}function a(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function $(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function f(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class d{static id(e){return d.idMap.has(e)||d.idMap.set(e,++d.count),d.idMap.get(e)}}function h(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function p(e){return 2654435761*e|0}function m(e){return 0===e.length?0:e.reduce((e,n)=>(e<<5)+e^n)}function g(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return p(e);case"string":return h(e);default:if(o(e))return e.GetHashCode();if(r(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=g(e[r]);return m(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e).constructor===Object){return m(Object.values(e).map(e=>g(e)))}return p(d.id(e))}}function w(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function _(e,n){return w(e,n,y)}function y(e,n){return e===n||(null==e?null==n:null!=n&&("object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):r(e)?r(n)&&_(e,n):e instanceof Date?n instanceof Date&&0===v(e,n):Object.getPrototypeOf(e).constructor===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!y(e[t[o]],n[r[o]]))return!1;return!0}(e,n))))}function v(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+$(e),r=n.getTime()+$(n)),t===r?0:t<r?-1:1}function b(e,n){return e===n?0:e<n?-1:1}function C(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,x)}function x(e,n){return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):r(e)?r(n)?C(e,n):-1:e instanceof Date?n instanceof Date?v(e,n):-1:Object.getPrototypeOf(e).constructor===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const s=t[o];if(s!==r[o])return s<r[o]?-1:1;if(i=x(e[s],n[s]),0!==i)return i}return 0}(e,n):-1}function S(e,n,t){return e(n,t)>0?n:t}function E(e){const n={};for(const t of e)n[t[0]]=t[1];return n}d.idMap=new WeakMap,d.count=0;function k(e,n){if(null==n||n.length>1)return n;let t;switch(e){case 2:t=(e,t)=>n(e)(t);break;case 3:t=(e,t,r)=>n(e)(t)(r);break;case 4:t=(e,t,r,o)=>n(e)(t)(r)(o);break;case 5:t=(e,t,r,o,i)=>n(e)(t)(r)(o)(i);break;case 6:t=(e,t,r,o,i,s)=>n(e)(t)(r)(o)(i)(s);break;case 7:t=(e,t,r,o,i,s,u)=>n(e)(t)(r)(o)(i)(s)(u);break;case 8:t=(e,t,r,o,i,s,u,c)=>n(e)(t)(r)(o)(i)(s)(u)(c);break;default:throw new Error("Uncurrying to more than 8-arity is not supported: "+e)}return t.__CURRIED__=n,t}function I(e,n){if(null==n||1===n.length)return n;if("__CURRIED__"in n)return n.__CURRIED__;switch(e){case 2:return e=>t=>n(e,t);case 3:return e=>t=>r=>n(e,t,r);case 4:return e=>t=>r=>o=>n(e,t,r,o);case 5:return e=>t=>r=>o=>i=>n(e,t,r,o,i);case 6:return e=>t=>r=>o=>i=>s=>n(e,t,r,o,i,s);case 7:return e=>t=>r=>o=>i=>s=>u=>n(e,t,r,o,i,s,u);case 8:return e=>t=>r=>o=>i=>s=>u=>c=>n(e,t,r,o,i,s,u,c);default:throw new Error("Currying to more than 8-arity is not supported: "+e)}}function A(e,n){return t=>function e(n,t,r,o){const i=r[o];if(0!==i){const e=i[0],n=i[1];e>1&&(t=I(e,t)),n>1&&(t=k(n,t))}const s=n(t);return o+1===r.length?s:n=>e(s,n,r,o+1)}(e,t,n,0)}function N(e,n=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=N(r);else{if(100===n){t+="; ...";break}t+="; "+N(r)}n++}return t+"]"}(e);{const t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map(([e,t])=>e+" = "+N(t,n+1)).join("\n ")+" }":t.name}}return String(e)}class T{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){if(0===this.fields.length)return this.name;{let e="",n=!0;if(1===this.fields.length){const t=N(this.fields[0]);n=t.indexOf(" ")>=0,e=t}else e=this.fields.map(e=>N(e)).join(", ");return this.name+(n?" (":" ")+e+(n?")":"")}}GetHashCode(){const e=this.fields.map(e=>g(e));return e.splice(0,0,p(this.tag)),m(e)}Equals(e){return this===e||!!s(this,e)&&(this.tag===e.tag&&_(this.fields,e.fields))}CompareTo(e){return this===e?0:s(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}function P(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}function D(e){return"{ "+Object.entries(e).map(([e,n])=>e+" = "+N(n)).join("\n ")+" }"}function M(e){return m(Object.values(e).map(e=>g(e)))}function O(e,n){if(e===n)return!0;if(s(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!y(e[t[r]],n[t[r]]))return!1;return!0}return!1}function R(e,n){if(e===n)return 0;if(s(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=x(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}class U{toJSON(){return P(this)}toString(){return D(this)}GetHashCode(){return M(this)}Equals(e){return O(this,e)}CompareTo(e){return R(this,e)}}class L{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}class B{constructor(e,n,t,r){this.declaringType=e,this.tag=n,this.name=t,this.fields=r}}class F{constructor(e,n,t,r,o,i,s){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return K(this)}GetHashCode(){return G(this)}Equals(e){return H(this,e)}}function j(e){return null!=e.generics?e.generics:[]}function G(e){return m([h(e.fullname),...j(e).map(G)])}function H(e,n){return""===e.fullname?""===n.fullname&&w(ie(e),ie(n),([e,n],[t,r])=>e===t&&H(n,r)):e.fullname===n.fullname&&w(j(e),j(n),H)}function W(e,n,t,r){return new F(e,n,t,r)}function z(e,n,t,r){return new F(e,n,t,void 0,r)}function q(e,n,t,r){const o=new F(e,n,t,void 0,void 0,()=>{const e=t.prototype.cases();return r().map((n,t)=>new B(o,t,e[t],n))});return o}function V(e){return new F("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Z(e){return new F("Microsoft.FSharp.Collections.FSharpList`1",[e])}const J=new F("System.Object"),X=(new F("Microsoft.FSharp.Core.Unit"),new F("System.Char"),new F("System.String"));new F("System.Boolean"),new F("System.SByte"),new F("System.Byte"),new F("System.Int16"),new F("System.UInt16"),new F("System.Int32"),new F("System.UInt32"),new F("System.Single"),new F("System.Double"),new F("System.Decimal");function Y(e){if(Array.isArray(e))return e[0];if(e instanceof B)return e.name;{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}function K(e){const n=null==e.generics||Q(e)?[]:e.generics;return n.length>0?e.fullname+"["+n.map(e=>K(e)).join(",")+"]":e.fullname}function Q(e){return e.fullname.endsWith("[]")}function ee(e){return null!=e.enumCases&&e.enumCases.length>0}function ne(e){if(ee(e)&&null!=e.enumCases)return e.enumCases.map(e=>e[1]);throw new Error(e.fullname+" is not an enum type")}function te(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(e.fullname+" is not an enum type")}function re(e,n){const t=parseInt(n,10);return te(e,isNaN(t)?n:t)[1]}function oe(e){if(null!=e.cases)return e.cases();throw new Error(e.fullname+" is not an F# union type")}function ie(e){if(null!=e.fields)return e.fields();throw new Error(e.fullname+" is not an F# record type")}function se(e){return e.fullname.startsWith("System.Tuple")&&!Q(e)}function ue(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}class ce{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return g(this.value)}Equals(e){return null!=e&&y(this.value,e instanceof ce?e.value:e)}CompareTo(e){return null==e?1:x(this.value,e instanceof ce?e.value:e)}}function le(e){return null==e||e instanceof ce?new ce(e):e}function ae(e){if(null==e)throw new Error("Option has no value");return e instanceof ce?e.value:e}function $e(e){return null==e?[]:[ae(e)]}function fe(e,n){return null!=e?ae(e):n}function de(e,n){return null!=n?le(e(ae(n))):void 0}class he extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function pe(e,n){if(0===n.tag){const t=n.fields[0];return new he(0,e(t))}{const e=n.fields[0];return new he(1,e)}}function me(e,n){if(0===n.tag){return e(n.fields[0])}{const e=n.fields[0];return new he(1,e)}}var ge;function we(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function _e(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;if(!function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t=t||function(e,n){if(n&ge.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n)).test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}function ye(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=_e(e,n,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=we(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=we(t,r);if(e>=s&&e<=u)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function ve(e){return-2147483648===e?e:-e}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(ge||(ge={}));const be=Symbol("numeric");function Ce(e){return"number"==typeof e||(null==e?void 0:e[be])}function xe(e,n){return"number"==typeof e?e*n:e[be]().multiply(n)}function Se(e,n){return"number"==typeof e?e.toFixed(n):e[be]().toFixed(n)}function Ee(e,n){return"number"==typeof e?e.toPrecision(n):e[be]().toPrecision(n)}function ke(e,n){return"number"==typeof e?e.toExponential(n):e[be]().toExponential(n)}function Ie(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[be]().toHex()}var Ae=null;try{Ae=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function Ne(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function Te(e){return!0===(e&&e.__isLong__)}Ne.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},Ne.prototype.Equals=function(e){return on(this,e)},Ne.prototype.CompareTo=function(e){return ln(this,e)},Ne.prototype.toString=function(e){return en(this,e)},Ne.prototype.toJSON=function(){return en(this)},Ne.prototype[be]=function(){const e=this;return{multiply:n=>dn(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>en(e.unsigned?e:yn(_n(e),!0),16)}},Ne.prototype.__isLong__,Object.defineProperty(Ne.prototype,"__isLong__",{value:!0});var Pe={},De={};function Me(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=De[e])?r:(t=Re(e,(0|e)<0?-1:0,!0),o&&(De[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=Pe[e])?r:(t=Re(e,e<0?-1:0,!1),o&&(Pe[e]=t),t)}function Oe(e,n){if(isNaN(e))return n?ze:We;if(n){if(e<0)return ze;if(e>=je)return Xe}else{if(e<=-Ge)return Ye;if(e+1>=Ge)return Je}return e<0?an(Oe(-e,n)):Re(e%Fe|0,e/Fe|0,n)}function Re(e,n,t){return new Ne(e,n,t)}var Ue=Math.pow;function Le(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return We;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return an(Le(e.substring(1),n,t));for(var o=Oe(Ue(t,8)),i=We,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+u),t);if(u<8)i=$n(dn(i,Oe(Ue(t,u))),Oe(c));else i=$n(i=dn(i,o),Oe(c))}return i.unsigned=n,i}function Be(e,n){return"number"==typeof e?Oe(e,n):"string"==typeof e?Le(e,n):Re(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var Fe=4294967296,je=Fe*Fe,Ge=je/2,He=Me(1<<24),We=Me(0),ze=Me(0,!0),qe=Me(1),Ve=Me(1,!0),Ze=Me(-1),Je=Re(-1,2147483647,!1),Xe=Re(-1,-1,!0),Ye=Re(0,-2147483648,!1);function Ke(e){return e.unsigned?e.low>>>0:e.low}function Qe(e){return e.unsigned?(e.high>>>0)*Fe+(e.low>>>0):e.high*Fe+(e.low>>>0)}function en(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(nn(e))return"0";if(tn(e)){if(on(e,Ye)){var t=Oe(n),r=hn(e,t),o=fn(dn(r,t),e);return en(r,n)+Ke(o).toString(n)}return"-"+en(an(e),n)}for(var i=Oe(Ue(n,6),e.unsigned),s=e,u="";;){var c=hn(s,i),l=(Ke(fn(s,dn(c,i)))>>>0).toString(n);if(nn(s=c))return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}}function nn(e){return 0===e.high&&0===e.low}function tn(e){return!e.unsigned&&e.high<0}function rn(e){return 1==(1&e.low)}function on(e,n){return Te(n)||(n=Be(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&(e.high===n.high&&e.low===n.low)}function sn(e,n){return ln(e,n)<0}function un(e,n){return ln(e,n)>0}function cn(e,n){return ln(e,n)>=0}function ln(e,n){if(Te(n)||(n=Be(n)),on(e,n))return 0;var t=tn(e),r=tn(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:tn(fn(e,n))?-1:1}function an(e){return!e.unsigned&&on(e,Ye)?Ye:$n(pn(e),qe)}function $n(e,n){Te(n)||(n=Be(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,c=n.low>>>16,l=0,a=0,$=0,f=0;return $+=(f+=i+(65535&n.low))>>>16,a+=($+=o+c)>>>16,l+=(a+=r+u)>>>16,l+=t+s,Re(($&=65535)<<16|(f&=65535),(l&=65535)<<16|(a&=65535),e.unsigned)}function fn(e,n){return Te(n)||(n=Be(n)),$n(e,an(n))}function dn(e,n){if(nn(e))return e.unsigned?ze:We;if(Te(n)||(n=Be(n)),Ae)return Re(Ae.mul(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned);if(nn(n))return e.unsigned?ze:We;if(on(e,Ye))return rn(n)?Ye:We;if(on(n,Ye))return rn(e)?Ye:We;if(tn(e))return tn(n)?dn(an(e),an(n)):an(dn(an(e),n));if(tn(n))return an(dn(e,an(n)));if(sn(e,He)&&sn(n,He))return Oe(Qe(e)*Qe(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,c=n.low>>>16,l=65535&n.low,a=0,$=0,f=0,d=0;return f+=(d+=i*l)>>>16,$+=(f+=o*l)>>>16,f&=65535,$+=(f+=i*c)>>>16,a+=($+=r*l)>>>16,$&=65535,a+=($+=o*c)>>>16,$&=65535,a+=($+=i*u)>>>16,a+=t*l+r*c+o*u+i*s,Re((f&=65535)<<16|(d&=65535),(a&=65535)<<16|($&=65535),e.unsigned)}function hn(e,n){if(Te(n)||(n=Be(n)),nn(n))throw Error("division by zero");var t,r,o;if(Ae)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?Re((e.unsigned?Ae.div_u:Ae.div_s)(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned):e;if(nn(e))return e.unsigned?ze:We;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:Re(e.low,e.high,!0)}(n)),un(n,e))return ze;if(un(n,wn(e,1)))return Ve;o=ze}else{if(on(e,Ye))return on(n,qe)||on(n,Ze)?Ye:on(n,Ye)?qe:on(t=mn(hn(gn(e,1),n),1),We)?tn(n)?qe:Ze:o=$n(t,hn(r=fn(e,dn(n,t)),n));if(on(n,Ye))return e.unsigned?ze:We;if(tn(e))return tn(n)?hn(an(e),an(n)):an(hn(an(e),n));if(tn(n))return an(hn(e,an(n)));o=We}for(r=e;cn(r,n);){t=Math.max(1,Math.floor(Qe(r)/Qe(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:Ue(2,i-48),u=Oe(t),c=dn(u,n);tn(c)||un(c,r);)c=dn(u=Oe(t-=s,e.unsigned),n);nn(u)&&(u=qe),o=$n(o,u),r=fn(r,c)}return o}function pn(e){return Re(~e.low,~e.high,e.unsigned)}function mn(e,n){return Te(n)&&(n=Ke(n)),0==(n&=63)?e:n<32?Re(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):Re(0,e.low<<n-32,e.unsigned)}function gn(e,n){return Te(n)&&(n=Ke(n)),0==(n&=63)?e:n<32?Re(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):Re(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}function wn(e,n){if(Te(n)&&(n=Ke(n)),0===(n&=63))return e;var t=e.high;return n<32?Re(e.low>>>n|t<<32-n,t>>>n,e.unsigned):Re(32===n?t:t>>>n-32,0,e.unsigned)}function _n(e,n){return n?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(e):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(e)}function yn(e,n,t){return t?function(e,n){return new Ne(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new Ne(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}const vn=$n,bn=dn,Cn=hn,xn=function(e,n){return Te(n)||(n=Be(n)),Ae?Re((e.unsigned?Ae.rem_u:Ae.rem_s)(e.low,e.high,n.low,n.high),Ae.get_high(),e.unsigned):fn(e,dn(hn(e,n),n))},Sn=an,En=function(e,n){return Te(n)||(n=Be(n)),Re(e.low&n.low,e.high&n.high,e.unsigned)},kn=ln,In=Re,An=Ke,Nn=Qe;function Tn(e,n,t){let r=e,o=0;switch(t){case 0:r=e<<24>>24,o=r;break;case 4:r=e<<24>>>24;break;case 1:r=e<<16>>16,o=r;break;case 5:r=e<<16>>>16;break;case 2:r=e>>0,o=r;break;case 6:r=e>>>0}return Re(r,o>>31,n)}const Pn=/(?:Z|[+-](\d+):?([0-5]?\d)?)\s*$/;function Dn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+a(~~(e/36e5),2)+":"+a(t,2)}function Mn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function On(e,n,t){return n.replace(/(\w)\1*/g,n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r})}function Rn(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Dn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return On(i,n,!0);switch(n){case"D":case"d":return Mn(i,"first");case"T":case"t":return Mn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Dn(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}function Un(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return On(e,n,t);switch(n){case"D":case"d":return t?Mn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Mn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return a(e.getFullYear(),4)+"-"+a(e.getMonth()+1,2)+"-"+a(e.getDate(),2)+"T"+a(e.getHours(),2)+":"+a(e.getMinutes(),2)+":"+a(e.getSeconds(),2)+"."+a(e.getMilliseconds(),3)+(n?Dn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}function Ln(e,n,t){return null!=e.offset?Rn(e,n):Un(e,n)}function Bn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Fn(e){if(null===e)throw new Error("Value cannot be null when parsing DateTime");if(""===e.trim())throw new Error("An empty string is not recognized as a valid DateTime");let n=new Date(e);if(isNaN(n.getTime())){const t=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*([+-]\d+(?::\d+)?)?\s*$/.exec(e);if(null==t)throw new Error("The string is not a valid Date.");{let e,r=0;if(null!=t[2]){const e=t[2].split(":");r=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=t[3]&&"PM"===t[3].toUpperCase()&&(r+=720)}if(null!=t[4]){if(null!=t[1])e=new Date(t[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}const n=t[4].substr(1).split(":");let o=60*parseInt(n[0],10)+parseInt(n[1]||"0",10);"+"===t[4][0]&&(o*=-1),r+=60*o}else if(null!=t[1])e=new Date(t[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}n=new Date(e.getTime()+1e3*r),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}}return n}function jn(e,n){try{return n.contents=function(e,n=!1){const t=Fn(e),r=Pn.exec(e),o=null!=r?n&&"Z"===r[0]?1:2:0;return Bn(t.getTime(),o)}(e),!0}catch(e){return!1}}function Gn(e,n=0){if(0!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}function Hn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Wn(e,n,t=0){let r;if(r=e instanceof RegExp?(r=e,e=n,r.lastIndex=t,r):r=Gn(n,t),!r.global)throw new Error("Non-global RegExp");let o=r.exec(e);const i=[];for(;null!==o;)i.push(o),o=r.exec(e);return i}const zn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/,qn=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,Vn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Zn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Jn(e){return{input:e,cont:(n=e,e=>zn.test(n)?function e(n,t,r=new L(null)){return(...o)=>{let i=n;for(const e of o)i=et(i,e,r);return zn.test(i)?e(i,t,r):t(i.replace(/%%/g,"%"))}}(n,e):e(n))};var n}function Xn(e,n){let t=0;return e.replace(qn,(e,r,o,i,s,u)=>Qn(n[t++],r,o,i,s,u)).replace(/%%/g,"%")}function Yn(e,n){return"string"==typeof n?e(n):n.cont(e)}function Kn(e){return Yn(e=>e,e)}function Qn(e,n,t,r,o,i){let s="";if(t=t||"",i=i||"",Ce(e))switch("x"!==i.toLowerCase()&&(Zn(e,0)?(e=xe(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),o=null==o?null:parseInt(o,10),i){case"f":case"F":e=Se(e,o=null!=o?o:6);break;case"g":case"G":e=null!=o?Ee(e,o):Ee(e);break;case"e":case"E":e=null!=o?ke(e,o):ke(e);break;case"x":e=Ie(e);break;case"X":e=Ie(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Ln(e):N(e);if(r="number"==typeof r?r:parseInt(r,10),isNaN(r))e=s+e;else{const n=t.indexOf("0")>=0,o=t.indexOf("-")>=0,i=o||!n?" ":"0";e="0"===i?s+(e=it(e,r-s.length,i,o)):it(s+e,r,i,o)}return n?n+e:e}function et(e,n,t){return e.replace(zn,(e,r,o,i,s,u)=>{if(null!=t.contents)i=t.contents,t.contents=null;else if("*"===i){if(n<0)throw new Error("Non-negative number required");return t.contents=n,e}return Qn(n,r,o,i,s,u).replace(/%/g,"%%")})}function nt(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Vn,(e,t,r,o,i,s)=>{let u=n[t];if(Ce(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Se(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Ee(u,i):Ee(u);break;case"e":case"E":u=null!=i?ke(u,i):ke(u);break;case"p":case"P":i=null!=i?i:2,u=Se(xe(u,100),i)+" %";break;case"d":case"D":u=null!=i?it(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?it(Ie(u),i,"0"):Ie(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/(0+)(\.0+)?/,(n,t,r)=>(Zn(u,0)&&(u=xe(u,-1),e="-"),u=Se(u,null!=r?r.length-1:0),it(u,(t||"").length-e.length+(null!=r?r.length:0),"0"))),u=e+u}}else u=u instanceof Date?Ln(u,s||o):N(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=it(String(u),Math.abs(r)," ",r<0)),u})}function tt(e){return"string"!=typeof e||0===e.length}function rt(e){return"string"!=typeof e||/^\s*$/.test(e)}function ot(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function it(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function st(e,n,t,r){if(r="number"==typeof r?r:void 0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];if(!Array.isArray(n)){if(0===r)return e.split(n,t);const o=arguments.length;n=Array(o-1);for(let e=1;e<o;e++)n[e-1]=arguments[e]}n=(n=n.map(e=>Hn(e))).length>0?n:[" "];let o=0;const i=[],s=new RegExp(n.join("|"),"g");for(;null==t||t>1;){const n=s.exec(e);if(null===n)break;(!r||n.index-o>0)&&(t=null!=t?t-1:t,i.push(e.substring(o,n.index))),o=s.lastIndex}return(!r||e.length-o>0)&&i.push(e.substring(o)),i}function ut(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}const ct=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,lt=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,at=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function $t(e){function n(e){return e.replace(lt,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(ct.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Hn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(lt.test(t))return n(t);if(at.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function ft(e,n){try{return n.contents=$t(e),!0}catch(e){return!1}}class dt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["StreamId"]}}function ht(){return q("MetadataTypes.StreamId",[],dt,()=>[[["Item",X]]])}function pt(e){return e.fields[0]}class mt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Name"]}}class gt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Website"]}}class wt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["FirstName"]}}class _t extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LastName"]}}class yt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Email"]}}class vt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["MobilePhone"]}}class bt extends U{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}class Ct extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Notes"]}}class xt extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerId"]}}function St(){return q("BasicModels.PartnerId",[],xt,()=>[[["Item",X]]])}class Et extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId"]}}function kt(){return q("BasicModels.AccountId",[],Et,()=>[[["Item",X]]])}function It(e,n){return"function"==typeof e?new e(n):new Array(n)}function At(){throw new Error("Arrays had different lengths")}function Nt(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function Tt(e,n,t){const r=0|n.length,o=It(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function Pt(e,n,t){if(e<0)throw new Error("The input must be non-negative\\nParameter name: count");const r=It(t,e);for(let t=0;t<=e-1;t++)r[t]=n(t);return r}function Dt(e,n,t){return t.reduce((n,t)=>e(n,t),n)}function Mt(e,n){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(0===n.length)return[[]];{const t=[];for(let r=0;r<=~~Math.ceil(n.length/e)-1;r++){let o;const i=0|(r*e|0);o=n.slice(i,i+e),t.push(o)}return t}}function Ot(e,n,t){return 0===function(e,n,t){if(null==n)return null==t?0:-1;if(null==t)return 1;{let r=0,o=0;const i=0|n.length,s=0|t.length;if(i>s)return 1;if(i<s)return-1;for(;r<i&&0===o;)o=e(n[r],t[r]),r+=1;return 0|o}}((e,n)=>x(e,n),n,t)}function Rt(e,n,t){return n.reduceRight((n,t)=>e(t,n),t)}function Ut(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&At();const i=0|n.length;for(let r=1;r<=i;r++)o=e(r-1,n[i-r],t[i-r],o);return o}((n,t,r,o)=>e(t,r,o),n,t,r)}class Lt extends U{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+ot("; ",this)+"]"}Equals(e){const n=this;if(n===e)return!0;return((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1];if(y(t.head,r.head)){e=i,n=s;continue e}return!1}return!1}return null==o[1]}})(n,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,s=i.tail;if(null==s)return 0|o;{const u=s;if(r>18)return 0|o;e=r+1,n=(o<<1)+g(i.head)+631*r,t=u}}})(0,0,this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1],u=0|x(t.head,r.head);if(0===u){e=i,n=s;continue e}return 0|u}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return function(e){return new Bt(e)}(this)}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}}class Bt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){this.it=this.xs,this.current=null}Dispose(){}}function Ft(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}function jt(e){if(null!=e.tail)return e.head;throw new Error("List was empty\\nParameter name: list")}function Gt(e){const n=e.tail;if(null!=n){return n}throw new Error("List was empty\\nParameter name: list")}function Ht(){return new Lt(null,void 0)}function Wt(e,n){return new Lt(e,n)}function zt(e){return new Lt(e,new Lt(null,void 0))}function qt(e){return null==e.tail}function Vt(e){return Ft(e)}function Zt(e){return jt(e)}function Jt(e){return Gt(e)}function Xt(e){const n=0|Ft(e),t=Nt(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(null==o.tail)break;t[r]=jt(o),e=r+1,n=Gt(o)}})(0,e),t}function Yt(e,n,t){let r=n,o=t;for(;null!=o.tail;)r=e(r,jt(o)),o=Gt(o);return r}function Kt(e){return Yt((e,n)=>new Lt(n,e),new Lt(null,void 0),e)}function Qt(e,n){return Yt((n,t)=>{e(t)},void 0,n)}function er(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=new Lt(e[n],t);return t}function nr(e){return er(e,new Lt(null,void 0))}function tr(e){if(r(e)){return nr(e)}if(e instanceof Lt){return e}{const n=new Lt(null,void 0);let t=n;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"](),n=t,o=new Lt(e,void 0);n.tail=o,t=o}}finally{r.Dispose()}const o=t,i=new Lt(null,void 0);return o.tail=i,Gt(n)}}function rr(e,n){return Yt((e,n)=>new Lt(n,e),n,Kt(e))}function or(e,n){const t=new Lt(null,void 0),r=function(e,n,t){return((n,t,r)=>{for(;;){const o=n,i=t,s=r;if(null==s.tail)return i;n=o+1,t=e(o,i,jt(s)),r=Gt(s)}})(0,n,t)}((n,t,r)=>{const o=new Lt(e(n,r),void 0);return t.tail=o,o},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}function ir(e,n){const t=new Lt(null,void 0),r=Yt((n,t)=>{const r=new Lt(e(t),void 0);return n.tail=r,r},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}function sr(e,n){return(n=>{e:for(;;){const t=n;if(null==t.tail)return;{const r=e(jt(t));if(null==r){n=Gt(t);continue e}return r}}})(n)}function ur(e,n){return sr(n=>e(n)?le(n):void 0,n)}function cr(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(null==o.tail)return;if(r===e)return le(jt(o));n=r+1,t=Gt(o)}})(0,n)}function lr(){return e=(e,n)=>x(e,n),{Compare:(n,t)=>e(n,t)};var e}function ar(){return lr()}function $r(){throw new Error("Enumeration has not started. Call MoveNext.")}function fr(){throw new Error("Enumeration already finished.")}class dr{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=c(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=N(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e+=1;return 4===e&&(n+="; ..."),n+"]"}finally{t.Dispose()}}GetEnumerator(){return this.f()}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class hr{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){return function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function pr(e,n,t){return new hr(e,n,t)}function mr(e){let n=void 0,t=void 0,r=!1,o=!1,i=void 0;const s=()=>{if(o=!0,null!=t){const e=t;try{e.Dispose()}finally{t=void 0}}if(null!=n){const e=n;try{e.Dispose()}finally{n=void 0}}};return pr(()=>{if(r?o&&fr():$r(),null!=i){return ae(i)}return fr()},()=>(r||(r=!0),!o&&(()=>{let r,o=void 0;for(;null==o;){const u=[n,t];if(null!=u[0])if(null!=u[1]){const e=u[1];if(e["System.Collections.IEnumerator.MoveNext"]())i=le(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{e.Dispose()}finally{t=void 0}}else{const e=u[0];if(e["System.Collections.IEnumerator.MoveNext"]()){r=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=c(r)}else s(),o=!1}else n=c(e)}return ae(o)})()),()=>{o||s()})}function gr(e,n,t){let r=!1,o=void 0,i=le(e());const s=()=>{if(null!=i){const e=ae(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{o=void 0}};return pr(()=>{if(r||$r(),null!=o){return ae(o)}return fr()},()=>{if(r||(r=!0),null!=i){const e=ae(i);let t;try{t=n(e)}catch(e){throw u(),e}if(null!=t){return o=t,!0}return u(),!1}return!1},s)}function wr(e,n){null==n&&function(e){throw new Error(e)}(e)}function _r(e){return function(e){return new dr(e)}(e)}function yr(e){return wr("source",e),c(e)}function vr(e){return _r(()=>c(e()))}function br(e){return _r(()=>mr(e))}function Cr(){return vr(()=>new Array(0))}function xr(e){return vr(()=>function(e,n){const t=It(n,1);return t[0]=e,t}(e))}function Sr(e){if(r(e)){return nr(e)}if(e instanceof Lt){return e}return tr(e)}function Er(e,n,t){return _r(()=>gr(e,n,t))}function kr(e,n,t){return _r(()=>{let r=-1;return gr(e,e=>(r+=1,n(r,e)),t)})}function Ir(e,n){return br([e,n])}function Ar(e,n){return Er(()=>yr(n),n=>{let t=void 0;for(;null==t&&n["System.Collections.IEnumerator.MoveNext"]();)t=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return t},e=>{e.Dispose()})}function Nr(e,n,t){const r=yr(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{r.Dispose()}}function Tr(e,n,t){const r=yr(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{r.Dispose()}}function Pr(e,n){return Tr((n,t)=>{e(t)},void 0,n)}function Dr(e,n){return Er(()=>yr(n),n=>n["System.Collections.IEnumerator.MoveNext"]()?le(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,e=>{e.Dispose()})}function Mr(e,n){return kr(()=>yr(n),(n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?le(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,e=>{e.Dispose()})}!function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$R$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1E(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν$(.çђ$,ɪ⇜ɜ*B$-'%A%($-S*(''$$--$*$8(6˓CC:'n'$$Z*'0c%$$$.%1+ӹM,⌚łT&4'+Ưध(0&,*-%$%$'ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&/|*/7/'[+-)K+A%%q$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ፮$A£ē︳𐀡%𐀡"].map(e=>{var n;return(null!==(n=e.codePointAt(0))&&void 0!==n?n:0)-35}),n=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map(e=>{var n;return(null!==(n=e.codePointAt(0))&&void 0!==n?n:0)-35}),t=new Uint32Array(e),r=new Uint8Array(n);for(let e=1;e<t.length;++e)t[e]+=t[e-1]}();function Or(e,n){const t=function(e,n,t=0){let r;return r=e instanceof RegExp?(r=e,e=n,r.lastIndex=t,r):r=Gn(n,t),r.exec(e)}(Gn(e),n);return null!=t?Jt(Sr(vr(()=>Dr(e=>e||"",t)))):void 0}function Rr(e,n){return tt(n)?new he(1,Kn(Jn("%s cannot be null or empty"))(e)):new he(0,n)}function Ur(e){const n=function(e){let n;const t=Or(".*?@(.*)",e);switch(n=null!=t?qt(t)?1:qt(Jt(t))?0:1:1,n){case 0:return e;case 1:return}}(e);if(null!=n){return new he(0,n)}return new he(1,"Email is not in the correct format")}class Lr{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}}class Br extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,Br.prototype)}}class Fr{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>Fr.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function jr(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new Br);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack(()=>{try{e(n)}catch(e){n.onError(e)}});else try{e(n)}catch(e){n.onError(e)}}}function Gr(e,n){return jr(t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(e)}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function Hr(e){return jr(n=>n.onSuccess(e))}const Wr=new class{Bind(e,n){return Gr(e,n)}Combine(e,n){return this.Bind(e,()=>n)}Delay(e){return jr(n=>e()(n))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While(()=>!r.done,this.Delay(()=>{const e=n(r.value);return r=t.next(),e}))}Return(e){return Hr(e)}ReturnFrom(e){return e}TryFinally(e,n){return jr(t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})})}TryWith(e,n){return jr(t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(e)}}})})}Using(e,n){return this.TryFinally(n(e),()=>e.Dispose())}While(e,n){return e()?this.Bind(n,()=>this.While(e,n)):this.Return(void 0)}Zero(){return jr(e=>e.onSuccess(void 0))}};class zr{constructor(){}}function qr(e,n){return new he(0,n)}function Vr(e,n){return n}function Zr(e,n,t){return pe(t,n)}new zr;function Jr(e){return e.fields[0]}function Xr(e){return e.fields[0]}function Yr(e){return e.fields[0]}function Kr(e){return e.fields[0]}function Qr(e){return e.fields[0]}class eo extends U{constructor(e,n,t,r){super(),this.FirstName=e,this.LastName=n,this.Email=t,this.MobilePhone=r}}function no(){return z("Dto.Primitives.ContactDetails",[],eo,()=>[["FirstName",X],["LastName",X],["Email",X],["MobilePhone",X]])}function to(e){return Vr(0,()=>me(n=>{const t=n;return me(n=>{const r=n;return me(n=>{const o=n;return Zr(0,pe(e=>new vt(0,e),Rr("MobilePhone",e.MobilePhone)),e=>new bt(t,r,o,e))},pe(e=>new yt(0,e),me(e=>Ur(e),Rr("Email",e.Email))))},pe(e=>new _t(0,e),Rr("LastName",e.LastName)))},pe(e=>new wt(0,e),Rr("FirstName",e.FirstName))))()}function ro(e){if(null!=e){return e.fields[0]}}function oo(e){return e.fields[0]}function io(e){return e.fields[0]}class so extends U{constructor(e,n,t,r,o,i,s,u,c){super(),this.BusinessName=e,this.BusinessNumber=n,this.Address1=t,this.Address2=r,this.City=o,this.Postcode=i,this.State=s,this.Phone=u,this.CountryCode=c}}class uo extends U{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}class co extends U{constructor(e,n,t,r,o,i,s,u,c){super(),this.StreamId=e,this.PartnerId=n,this.Name=t,this.Website=r,this.ContactDetails=o,this.Notes=i,this.LegalEntity=s,this.ExternalId=u,this.ChannelId=c}}function lo(){return z("Dto.AdminApi.Account",[],co,()=>[["StreamId",X],["PartnerId",X],["Name",X],["Website",X],["ContactDetails",no()],["Notes",V(X)],["LegalEntity",V(z("Dto.Primitives.LegalEntity",[],so,()=>[["BusinessName",X],["BusinessNumber",X],["Address1",X],["Address2",V(X)],["City",X],["Postcode",X],["State",V(X)],["Phone",X],["CountryCode",V(X)]]))],["ExternalId",V(X)],["ChannelId",V(X)]])}class ao extends U{constructor(e,n,t,r,o,i,s,u,c){super(),this.AccountId=e,this.Name=n,this.Contact=t,this.ContactMobilePhone=r,this.Website=o,this.BusinessName=i,this.BusinessNumber=s,this.ExternalId=u,this.ChannelId=c}}function $o(){return z("Dto.AdminApi.AccountLookupItem",[],ao,()=>[["AccountId",X],["Name",X],["Contact",X],["ContactMobilePhone",X],["Website",X],["BusinessName",V(X)],["BusinessNumber",V(X)],["ExternalId",V(X)],["ChannelId",V(X)]])}class fo extends U{constructor(e,n){super(),this.Accounts=e,this.Token=n}}function ho(){return z("Dto.AdminApi.AccountLookup",[],fo,()=>[["Accounts",Z($o())],["Token",V(X)]])}var po,mo,go,wo,_o,yo,vo,bo={},Co=[],xo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function So(e,n){for(var t in n)e[t]=n[t];return e}function Eo(e){var n=e.parentNode;n&&n.removeChild(e)}function ko(e,n,t){var r,o,i,s={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?po.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return Io(e,s,r,o,null)}function Io(e,n,t,r,o){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++go:o};return null==o&&null!=mo.vnode&&mo.vnode(i),i}function Ao(e){return e.children}function No(e,n){this.props=e,this.context=n}function To(e,n){if(null==n)return e.__?To(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?To(e):null}function Po(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return Po(e)}}function Do(e){(!e.__d&&(e.__d=!0)&&wo.push(e)&&!Mo.__r++||yo!==mo.debounceRendering)&&((yo=mo.debounceRendering)||_o)(Mo)}function Mo(){for(var e;Mo.__r=wo.length;)e=wo.sort((function(e,n){return e.__v.__b-n.__v.__b})),wo=[],e.some((function(e){var n,t,r,o,i,s;e.__d&&(i=(o=(n=e).__v).__e,(s=n.__P)&&(t=[],(r=So({},o)).__v=o.__v+1,Ho(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?To(o):i,o.__h),Wo(t,o),o.__e!=i&&Po(o)))}))}function Oo(e,n,t,r,o,i,s,u,c,l){var a,$,f,d,h,p,m,g=r&&r.__k||Co,w=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?Io(null,d,null,null,d):Array.isArray(d)?Io(Ao,{children:d},null,null,null):d.__b>0?Io(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(f=g[a])||f&&d.key==f.key&&d.type===f.type)g[a]=void 0;else for($=0;$<w;$++){if((f=g[$])&&d.key==f.key&&d.type===f.type){g[$]=void 0;break}f=null}Ho(e,d,f=f||bo,o,i,s,u,c,l),h=d.__e,($=d.ref)&&f.ref!=$&&(m||(m=[]),f.ref&&m.push(f.ref,null,d),m.push($,d.__c||h,d)),null!=h?(null==p&&(p=h),"function"==typeof d.type&&d.__k===f.__k?d.__d=c=Ro(d,c,e):c=Lo(e,d,f,g,h,c),"function"==typeof t.type&&(t.__d=c)):c&&f.__e==c&&c.parentNode!=e&&(c=To(f))}for(t.__e=p,a=w;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=To(r,a+1)),qo(g[a],g[a]));if(m)for(a=0;a<m.length;a++)zo(m[a],m[++a],m[++a])}function Ro(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?Ro(r,n,t):Lo(t,r,r,o,r.__e,n));return n}function Uo(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Uo(e,n)})):n.push(e)),n}function Lo(e,n,t,r,o,i){var s,u,c;if(void 0!==n.__d)s=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<r.length;c+=2)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function Bo(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||xo.test(n)?t:t+"px"}function Fo(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||Bo(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||Bo(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?Go:jo,i):e.removeEventListener(n,i?Go:jo,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function jo(e){this.l[e.type+!1](mo.event?mo.event(e):e)}function Go(e){this.l[e.type+!0](mo.event?mo.event(e):e)}function Ho(e,n,t,r,o,i,s,u,c){var l,a,$,f,d,h,p,m,g,w,_,y=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(c=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(l=mo.__b)&&l(n);try{e:if("function"==typeof y){if(m=n.props,g=(l=y.contextType)&&r[l.__c],w=l?g?g.props.value:l.__:r,t.__c?p=(a=n.__c=t.__c).__=a.__E:("prototype"in y&&y.prototype.render?n.__c=a=new y(m,w):(n.__c=a=new No(m,w),a.constructor=y,a.render=Vo),g&&g.sub(a),a.props=m,a.state||(a.state={}),a.context=w,a.__n=r,$=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=y.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=So({},a.__s)),So(a.__s,y.getDerivedStateFromProps(m,a.__s))),f=a.props,d=a.state,$)null==y.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==y.getDerivedStateFromProps&&m!==f&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,w)||n.__v===t.__v){a.props=m,a.state=a.__s,n.__v!==t.__v&&(a.__d=!1),a.__v=n,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),a.__h.length&&s.push(a);break e}null!=a.componentWillUpdate&&a.componentWillUpdate(m,a.__s,w),null!=a.componentDidUpdate&&a.__h.push((function(){a.componentDidUpdate(f,d,h)}))}a.context=w,a.props=m,a.state=a.__s,(l=mo.__r)&&l(n),a.__d=!1,a.__v=n,a.__P=e,l=a.render(a.props,a.state,a.context),a.state=a.__s,null!=a.getChildContext&&(r=So(So({},r),a.getChildContext())),$||null==a.getSnapshotBeforeUpdate||(h=a.getSnapshotBeforeUpdate(f,d)),_=null!=l&&l.type===Ao&&null==l.key?l.props.children:l,Oo(e,Array.isArray(_)?_:[_],n,t,r,o,i,s,u,c),a.base=n.__e,n.__h=null,a.__h.length&&s.push(a),p&&(a.__E=a.__=null),a.__e=!1}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=function(e,n,t,r,o,i,s,u){var c,l,a,$=t.props,f=n.props,d=n.type,h=0;if("svg"===d&&(o=!0),null!=i)for(;h<i.length;h++)if((c=i[h])&&"setAttribute"in c==!!d&&(d?c.localName===d:3===c.nodeType)){e=c,i[h]=null;break}if(null==e){if(null===d)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,f.is&&f),i=null,u=!1}if(null===d)$===f||u&&e.data===f||(e.data=f);else{if(i=i&&po.call(e.childNodes),l=($=t.props||bo).dangerouslySetInnerHTML,a=f.dangerouslySetInnerHTML,!u){if(null!=i)for($={},h=0;h<e.attributes.length;h++)$[e.attributes[h].name]=e.attributes[h].value;(a||l)&&(a&&(l&&a.__html==l.__html||a.__html===e.innerHTML)||(e.innerHTML=a&&a.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||Fo(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||Fo(e,i,n[i],t[i],r)}(e,f,$,o,u),a)n.__k=[];else if(h=n.props.children,Oo(e,Array.isArray(h)?h:[h],n,t,r,o&&"foreignObject"!==d,i,s,i?i[0]:t.__k&&To(t,0),u),null!=i)for(h=i.length;h--;)null!=i[h]&&Eo(i[h]);u||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===d&&!h||"option"===d&&h!==$.value)&&Fo(e,"value",h,$.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Fo(e,"checked",h,$.checked,!1))}return e}(t.__e,n,t,r,o,i,s,c);(l=mo.diffed)&&l(n)}catch(e){n.__v=null,(c||null!=i)&&(n.__e=u,n.__h=!!c,i[i.indexOf(u)]=null),mo.__e(e,n,t)}}function Wo(e,n){mo.__c&&mo.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){mo.__e(e,n.__v)}}))}function zo(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){mo.__e(e,t)}}function qo(e,n,t){var r,o;if(mo.unmount&&mo.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||zo(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){mo.__e(e,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&qo(r[o],n,"function"!=typeof e.type);t||null==e.__e||Eo(e.__e),e.__e=e.__d=void 0}function Vo(e,n,t){return this.constructor(e,t)}function Zo(e,n,t){var r,o,i;mo.__&&mo.__(e,n),o=(r="function"==typeof t)?null:t&&t.__k||n.__k,i=[],Ho(n,e=(!r&&t||n).__k=ko(Ao,null,[e]),o||bo,bo,void 0!==n.ownerSVGElement,!r&&t?[t]:o?null:n.firstChild?po.call(n.childNodes):null,i,!r&&t?t:o?o.__e:n.firstChild,r),Wo(i,e)}function Jo(e,n){Zo(e,n,Jo)}function Xo(e,n,t){var r,o,i,s=So({},e.props);for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:s[i]=n[i];return arguments.length>2&&(s.children=arguments.length>3?po.call(arguments,2):t),Io(e.type,s,r||e.key,o||e.ref,null)}po=Co.slice,mo={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},go=0,No.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=So({},this.state),"function"==typeof e&&(e=e(So({},t),this.props)),e&&So(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),Do(this))},No.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Do(this))},No.prototype.render=Ao,wo=[],_o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mo.__r=0,vo=0;var Yo,Ko,Qo,ei=0,ni=[],ti=mo.__b,ri=mo.__r,oi=mo.diffed,ii=mo.__c,si=mo.unmount;function ui(e,n){mo.__h&&mo.__h(Ko,e,ei||n),ei=0;var t=Ko.__H||(Ko.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function ci(e){return ei=1,li(_i,e)}function li(e,n,t){var r=ui(Yo++,2);return r.t=e,r.__c||(r.__=[t?t(n):_i(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ko),r.__}function ai(e,n){var t=ui(Yo++,3);!mo.__s&&wi(t.__H,n)&&(t.__=e,t.__H=n,Ko.__H.__h.push(t))}function $i(e,n){var t=ui(Yo++,4);!mo.__s&&wi(t.__H,n)&&(t.__=e,t.__H=n,Ko.__h.push(t))}function fi(e,n){var t=ui(Yo++,7);return wi(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function di(e,n){mo.useDebugValue&&mo.useDebugValue(n?n(e):e)}function hi(){for(var e;e=ni.shift();)if(e.__P)try{e.__H.__h.forEach(mi),e.__H.__h.forEach(gi),e.__H.__h=[]}catch(n){e.__H.__h=[],mo.__e(n,e.__v)}}mo.__b=function(e){Ko=null,ti&&ti(e)},mo.__r=function(e){ri&&ri(e),Yo=0;var n=(Ko=e.__c).__H;n&&(n.__h.forEach(mi),n.__h.forEach(gi),n.__h=[])},mo.diffed=function(e){oi&&oi(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==ni.push(n)&&Qo===mo.requestAnimationFrame||((Qo=mo.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),pi&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);pi&&(n=requestAnimationFrame(t))})(hi)),Ko=null},mo.__c=function(e,n){n.some((function(e){try{e.__h.forEach(mi),e.__h=e.__h.filter((function(e){return!e.__||gi(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],mo.__e(t,e.__v)}})),ii&&ii(e,n)},mo.unmount=function(e){si&&si(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{mi(e)}catch(e){n=e}})),n&&mo.__e(n,t.__v))};var pi="function"==typeof requestAnimationFrame;function mi(e){var n=Ko,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),Ko=n}function gi(e){var n=Ko;e.__c=e.__(),Ko=n}function wi(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _i(e,n){return"function"==typeof n?n(e):n}function yi(e,n){for(var t in n)e[t]=n[t];return e}function vi(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function bi(e){this.props=e}(bi.prototype=new No).isPureReactComponent=!0,bi.prototype.shouldComponentUpdate=function(e,n){return vi(this.props,e)||vi(this.state,n)};var Ci=mo.__b;mo.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ci&&Ci(e)};var xi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Si(e){function n(n,t){var r=yi({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=xi,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Ei=function(e,n){return null==e?null:Uo(Uo(e).map(n))},ki={map:Ei,forEach:Ei,count:function(e){return e?Uo(e).length:0},only:function(e){var n=Uo(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:Uo},Ii=mo.__e;mo.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);Ii(e,n,t)};var Ai=mo.unmount;function Ni(){this.__u=0,this.t=null,this.__b=null}function Ti(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Pi(){this.u=null,this.o=null}mo.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Ai&&Ai(e)},(Ni.prototype=new No).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=Ti(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=s;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},c=!0===n.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},Ni.prototype.componentWillUnmount=function(){this.t=[]},Ni.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=yi({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&ko(Ao,null,e.fallback);return o&&(o.__h=null),[ko(Ao,null,n.__e?null:e.children),o]};var Di=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function Mi(e){return this.getChildContext=function(){return e.context},e.children}function Oi(e){var n=this,t=e.i;n.componentWillUnmount=function(){Zo(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),Zo(ko(Mi,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Pi.prototype=new No).__e=function(e){var n=this,t=Ti(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Di(n,e,r)):o()};t?t(i):i()}},Pi.prototype.render=function(e){this.u=null,this.o=new Map;var n=Uo(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Pi.prototype.componentDidUpdate=Pi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Di(e,t,n)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ui=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Li="undefined"!=typeof document,Bi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};No.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(No.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Fi=mo.event;function ji(){}function Gi(){return this.cancelBubble}function Hi(){return this.defaultPrevented}mo.event=function(e){return Fi&&(e=Fi(e)),e.persist=ji,e.isPropagationStopped=Gi,e.isDefaultPrevented=Hi,e.nativeEvent=e};var Wi,zi={configurable:!0,get:function(){return this.class}},qi=mo.vnode;mo.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var s=t[i];Li&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==s||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Bi(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Ui.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=Uo(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=Uo(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(zi.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",zi))}e.$$typeof=Ri,qi&&qi(e)};var Vi=mo.__r;mo.__r=function(e){Vi&&Vi(e),Wi=e.__c};function Zi(e){return!!e&&e.$$typeof===Ri}const Ji={useState:ci,useReducer:li,useEffect:ai,useLayoutEffect:$i,useRef:function(e){return ei=5,fi((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){ei=6,$i((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:fi,useCallback:function(e,n){return ei=8,fi((function(){return e}),n)},useContext:function(e){var n=Ko.context[e.__c],t=ui(Yo++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(Ko)),n.props.value):e.__},useDebugValue:di,version:"17.0.2",Children:ki,render:function(e,n,t){return null==n.__k&&(n.textContent=""),Zo(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return Jo(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Zo(null,e),!0)},createPortal:function(e,n){return ko(Oi,{__v:e,i:n})},createElement:ko,createContext:function(e,n){var t={__c:n="__cC"+vo++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(Do)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return ko.bind(null,e)},cloneElement:function(e){return Zi(e)?Xo.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Ao,isValidElement:Zi,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:No,PureComponent:bi,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:vi(this.props,e)}function r(n){return this.shouldComponentUpdate=t,ko(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:Si,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:Ao,Suspense:Ni,SuspenseList:Pi,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return ko(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(e){return Wi.__n[e.__c].props.value}}}}},Xi=e=>{ai(()=>{const n=e();return()=>{n.Dispose()}})},Yi=(e,n)=>{ai(()=>{const n=e();return()=>{n.Dispose()}},n)},Ki=e=>{$i(()=>{const n=e();return()=>{n.Dispose()}})};function Qi(e,n,t,r){const o=Ji.memo(e,k(2,fe(I(2,t),null)));return Pr(n=>{e.displayName=n},$e(n)),e=>{const n=es(r,e);return Ji.createElement(o,n)}}function es(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}function ns(e){return{Dispose(){e()}}}function ts(e){Xi(e)}function rs(e,n){Yi(e,n)}function os(e){ss(e,[])}function is(e){rs(e,[])}function ss(e,n){Yi(n=>(e(),ns(()=>{})),n)}function us(e,n){return Ji.useCallback(e,fe(n,[]))}function cs(e){return Ji.useRef(e)}function ls(e,n){return Ji.useMemo(e,fe(n,[]))}function as(e){const n=cs(e),t=us(e=>n.current(e),[]);var r;return r=()=>{n.current=e},Ki(e=>(r(),ns(()=>{}))),t}function $s(e){return Ji.useState(e)}function fs(e){}function ds(e){const n=new Lr("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout(()=>{n.cancel()},e),n}function hs(e){e.cancel()}function ps(e){return null!=e&&e.isCancelled}const ms=new Lr;function gs(e){return jr(n=>e([n.onSuccess,n.onError,n.onCancel]))}function ws(e,n){return function(e,n){return _s(e,n)}(e,n)}function _s(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new Fr;e({onSuccess:n||fs,onError:t||fs,onCancel:r||fs,cancelToken:o||ms,trampoline:i})}class ys{constructor(e,n){this.k=e,this.v=n}}function vs(e,n){return new ys(e,n)}function bs(e){return e.k}function Cs(e){return e.v}class xs extends ys{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=o}}function Ss(e,n,t,r,o){return new xs(e,n,t,r,o)}function Es(e){return e.left}function ks(e){return e.right}function Is(e){return e.h}function As(e){return function e(n,t){e:for(;;){const r=n,o=t;if(null!=o){const i=o;if(i instanceof xs){const o=i;n=e(r+1,Es(o)),t=ks(o);continue e}return r+1|0}return 0|r}}(0,e)}function Ns(e,n,t,r){let o,i,s;if(null!=e){const n=e;s=n instanceof xs?(o=n,Is(o)):1}else s=0;let u;if(null!=r){const e=r;u=e instanceof xs?(i=e,Is(i)):1}else u=0;const c=0|(s<u?u:s);return 0===c?vs(n,t):Ss(n,t,e,r,c+1)}function Ts(e,n,t,r){let o,i,s,u,c,l,a,$,f;if(null!=e){const n=e;f=n instanceof xs?(o=n,Is(o)):1}else f=0;let d;if(null!=r){const e=r;d=e instanceof xs?(i=e,Is(i)):1}else d=0;if(d>f+2){const o=ae(r);if(o instanceof xs){const r=o;if(s=Es(r),(null!=s?(u=s,u instanceof xs?(c=u,Is(c)):1):0)>f+1){const o=ae(Es(r));if(o instanceof xs){const i=o;return Ns(Ns(e,n,t,Es(i)),bs(i),Cs(i),Ns(ks(i),bs(r),Cs(r),ks(r)))}throw new Error("internal error: Map.rebalance")}return Ns(Ns(e,n,t,Es(r)),bs(r),Cs(r),ks(r))}throw new Error("internal error: Map.rebalance")}if(f>d+2){const o=ae(e);if(o instanceof xs){const e=o;if(l=ks(e),(null!=l?(a=l,a instanceof xs?($=a,Is($)):1):0)>d+1){const o=ae(ks(e));if(o instanceof xs){const i=o;return Ns(Ns(Es(e),bs(e),Cs(e),Es(i)),bs(i),Cs(i),Ns(ks(i),n,t,r))}throw new Error("internal error: Map.rebalance")}return Ns(Es(e),bs(e),Cs(e),Ns(ks(e),n,t,r))}throw new Error("internal error: Map.rebalance")}return Ns(e,n,t,r)}function Ps(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,bs(o));if(o instanceof xs){const r=o;return i<0?Ts(Ps(e,n,t,Es(r)),bs(r),Cs(r),ks(r)):0===i?Ss(n,t,Es(r),ks(r),Is(r)):Ts(Es(r),bs(r),Cs(r),Ps(e,n,t,ks(r)))}return i<0?Ss(n,t,void 0,r,2):0===i?vs(n,t):Ss(n,t,r,void 0,2)}return vs(n,t)}function Ds(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,bs(s));if(0===u)return le(Cs(s));if(s instanceof xs){const i=s;e=r,n=o,t=u<0?Es(i):ks(i);continue e}return}return}}function Ms(e,n){!function e(n,t){e:for(;;){const r=n,o=t;if(null!=o){const i=o;if(i instanceof xs){const o=i;e(r,Es(o)),r(bs(o),Cs(o)),n=r,t=ks(o);continue e}r(bs(i),Cs(i))}break}}(e,n)}function Os(e,n){return function e(n,t){if(null!=t){const r=t;if(r instanceof xs){const t=r,o=e(n,Es(t)),i=n(bs(t),Cs(t)),s=e(n,ks(t));return Ss(bs(t),i,o,s,Is(t))}return vs(bs(r),n(bs(r),Cs(r)))}}(e,n)}function Rs(e,n,t){let r=0|t;Ms((e,t)=>{n[r]=[e,t],r+=1},e)}function Us(e,n){let t=void 0;for(let r=0;r<=n.length-1;r++){const o=n[r],i=o[1];t=Ps(e,o[0],i,t)}return t}function Ls(e,n){if(r(n)){return Us(e,n)}if(n instanceof Lt){return function(e,n){return Yt((n,t)=>{const r=t[0],o=t[1];return Ps(e,r,o,n)},void 0,n)}(e,n)}{const t=c(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"](),u=s[1];e=r,n=Ps(r,s[0],u,o),t=i}}}(e,void 0,t)}finally{t.Dispose()}}}class Bs extends U{constructor(e,n){super(),this.stack=e,this.started=n}}function Fs(e){e:for(;;){const n=e;if(qt(n))return Ht();{const t=Jt(n),r=Zt(n);if(null!=r){const o=r;if(o instanceof xs){const n=o;e=er([Es(n),vs(bs(n),Cs(n)),ks(n)],t);continue e}return n}e=t;continue e}}}function js(e){return new Bs(Fs(zt(e)),!1)}function Gs(e){if(e.started){const n=e.stack;if(qt(n))return function(){throw new Error("enumeration already finished")}();if(null!=Zt(n)){const e=Zt(n);if(e instanceof xs)throw new Error("Please report error: Map iterator, unexpected stack for current");return[bs(e),Cs(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Hs(e){let n=js(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Gs(n),"System.Collections.IEnumerator.get_Current":()=>Gs(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(qt(n))return!1;if(null!=Zt(n)){const t=Zt(n),r=Jt(n);if(t instanceof xs)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Fs(r),!qt(e.stack)}Jt(n);throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!qt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=js(e)},Dispose(){}}}class Ws{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e[1],i=e[0];t=n(t,g(i)),t=n(t,g(o))}}finally{r.Dispose()}return 0|t}(this)}Equals(e){if(!(e instanceof Ws))return!1;{const n=e,t=c(this);try{const e=c(n);try{const n=()=>{const r=t["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=t["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!y(r[0],o[0])||!y(r[1],o[1]))&&n()}return!0}return!1};return n()}finally{e.Dispose()}}finally{t.Dispose()}}}toString(){return"map ["+ot("; ",Dr(e=>nt("({0}, {1})",e[0],e[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}GetEnumerator(){return Hs(this.tree)}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Hs(this.tree)}CompareTo(e){const n=this;if(e instanceof Ws){return 0|function(e,n,t){const r=yr(n);try{const n=yr(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{n.Dispose()}}finally{r.Dispose()}}((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:x(e[1],t[1]))},n,e)}throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return!!Js(this,e[0])&&y(Vs(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Rs(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Zs(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Zs(this)}get size(){return 0|Zs(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Dr(e=>[e[0],e[1]],this)}get(e){return Vs(this,e)}has(e){return Js(this,e)}keys(){return Dr(e=>e[0],this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Dr(e=>e[1],this)}forEach(e,n){const t=this;Pr(n=>{e(n[1],n[0],t)},t)}}function zs(e,n){return new Ws(e,n)}function qs(e){const n=ar();return zs(n,Ls(n,e))}function Vs(e,n){return function(e,n,t){const r=Ds(e,n,t);if(null==r)throw new Error;return ae(r)}(e.comparer,n,e.tree)}function Zs(e){return As(e.tree)}function Js(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,bs(s));if(s instanceof xs){const i=s;if(u<0){e=r,n=o,t=Es(i);continue e}if(0===u)return!0;e=r,n=o,t=ks(i);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Xs(e,n,t){return function(e,n,t){return zs(e.comparer,Ps(e.comparer,n,t,e.tree))}(t,e,n)}function Ys(e,n){return function(e,n){return Ds(e.comparer,n,e.tree)}(n,e)}function Ks(e,n){return r=e,zs((t=n).comparer,Os(r,t.tree));var t,r}function Qs(){return Ws.empty}(()=>{const e=ar();Ws.empty=zs(e,void 0)})();class eu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function nu(e){return q("Feliz.UseDeferred.Deferred`1",[e],eu,()=>[[],[],[["Item",e]],[["Item",W("System.Exception")]]])}function tu(e,n){const t=cs(ds());is(()=>ns(()=>{hs(t.current)}));return as(r=>{var o;ps(t.current)||ws((o=r,Wr.Delay(()=>Wr.TryWith(Wr.Delay(()=>(n(new eu(1)),Wr.Bind(e(o),e=>(n(new eu(2,e)),Wr.Zero())))),e=>{const t=e;return console.log(le(t)),n(new eu(3,t)),Wr.Zero()}))),t.current)})}const ru=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",e=>{},e),window.removeEventListener("testPassiveEventSupport",e=>{})}}catch(e){}return!1})();function ou(e){return de(e=>e.passive&&!ru?{capture:e.capture,once:e.once,passive:!1}:e,e)}function iu(e){return n=e=>e.capture?{capture:!0}:void 0,null!=(t=e)?n(ae(t)):void 0;var n,t}var su={GetHashCode(){return m([this.s,this.e].concat(this.c))},Equals(e){return!this.cmp(e)},CompareTo(e){return this.cmp(e)},[be](){const e=this;return{multiply:n=>e.mul(n),toPrecision:n=>e.toPrecision(n),toExponential:n=>e.toExponential(n),toFixed:n=>e.toFixed(n),toHex:()=>(Number(e)>>>0).toString(16)}}},uu="[big.js] ",cu=uu+"Invalid ",lu=cu+"decimal places",au=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function $u(e,n){var t,r,o;if(0===n&&1/n<0)n="-0";else if(!au.test(n+=""))throw Error(cu+"number");for(e.s="-"==n.charAt(0)?(n=n.slice(1),-1):1,(t=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(t<0&&(t=r),t+=+n.slice(r+1),n=n.substring(0,r)):t<0&&(t=n.length),o=n.length,r=0;r<t&&r<o&&"0"==n.charAt(r);)++r;if(r==o)e.c=[e.e=0];else for(e.e=t-r-1,e.c=[],t=0;r<o;)e.c[t++]=+n.charAt(r++);return e=fu(e,hu.DP,hu.RM)}function fu(e,n,t,r){var o=e.c,i=e.e+n+1;if(i<o.length){if(1===t)r=o[i]>=5;else if(2===t)r=o[i]>5||5==o[i]&&(r||i<0||void 0!==o[i+1]||1&o[i-1]);else if(3===t){const e=o.findIndex((e,n)=>n>=i&&e>0)<0;r=r||!e}else if(r=!1,0!==t)throw Error("[big.js] Invalid rounding mode");if(i<1)o.length=1,r?(e.e=-n,o[0]=1):o[0]=e.e=0;else{if(o.length=i--,r)for(;++o[i]>9;)o[i]=0,i--||(++e.e,o.unshift(1));for(i=o.length;!o[--i];)o.pop()}}else if(t<0||t>3||t!==~~t)throw Error("[big.js] Invalid rounding mode");return e}function du(e,n,t,r){var o,i,s=e.constructor,u=!e.c[0];if(void 0!==t){if(t!==~~t||t<(3==n)||t>1e6)throw Error(3==n?cu+"precision":lu);for(t=r-(e=new s(e)).e,e.c.length>++r&&fu(e,t,s.RM),2==n&&(r=e.e+t+1);e.c.length<r;)e.c.push(0)}if(o=e.e,t=(i=e.c.join("")).length,2!=n&&(1==n||3==n&&r<=o||o<=s.NE||o>=s.PE))i=i.charAt(0)+(t>1?"."+i.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)i="0"+i;i="0."+i}else if(o>0)if(++o>t)for(o-=t;o--;)i+="0";else o<t&&(i=i.slice(0,o)+"."+i.slice(o));else t>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&(!u||4==n)?"-"+i:i}su.abs=function(){var e=new this.constructor(this);return e.s=1,e},su.cmp=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.c),i=e.c,s=r.s,u=e.s,c=r.e,l=e.e;if(!o[0]||!i[0])return o[0]?s:i[0]?-u:0;if(s!=u)return s;if(n=s<0,c!=l)return c>l^n?1:-1;for(u=Math.max(o.length,i.length),s=0;s<u;s++)if((c=s<o.length?o[s]:0)!=(l=s<i.length?i[s]:0))return c>l^n?1:-1;return 0},su.div=function(e){var n=this.constructor,t=new n(this),r=(e=new n(e),t.c),o=e.c,i=t.s==e.s?1:-1,s=n.DP;if(s!==~~s||s<0||s>1e6)throw Error(lu);if(!o[0])throw Error("[big.js] Division by zero");if(!r[0])return new n(0*i);var u,c,l,a,$,f=o.slice(),d=u=o.length,h=r.length,p=r.slice(0,u),m=p.length,g=e,w=g.c=[],_=0,y=s+(g.e=t.e-e.e)+1;for(g.s=i,i=y<0?0:y,f.unshift(0);m++<u;)p.push(0);do{for(l=0;l<10;l++){if(u!=(m=p.length))a=u>m?1:-1;else for($=-1,a=0;++$<u;)if(o[$]!=p[$]){a=o[$]>p[$]?1:-1;break}if(!(a<0))break;for(c=m==u?o:f;m;){if(p[--m]<c[m]){for($=m;$&&!p[--$];)p[$]=9;--p[$],p[m]+=10}p[m]-=c[m]}for(;!p[0];)p.shift()}w[_++]=a?l:++l,p[0]&&a?p[m]=r[d]||0:p=[r[d]]}while((d++<h||void 0!==p[0])&&i--);return w[0]||1==_||(w.shift(),g.e--),_>y&&fu(g,s,n.RM,void 0!==p[0]),g},su.eq=function(e){return!this.cmp(e)},su.gt=function(e){return this.cmp(e)>0},su.gte=function(e){return this.cmp(e)>-1},su.lt=function(e){return this.cmp(e)<0},su.lte=function(e){return this.cmp(e)<1},su.minus=su.sub=function(e){var n,t,r,o,i=this.constructor,s=new i(this),u=(e=new i(e),s.s),c=e.s;if(u!=c)return e.s=-c,s.plus(e);var l=s.c.slice(),a=s.e,$=e.c,f=e.e;if(!l[0]||!$[0])return $[0]?(e.s=-c,e):new i(l[0]?s:0);if(u=a-f){for((o=u<0)?(u=-u,r=l):(f=a,r=$),r.reverse(),c=u;c--;)r.push(0);r.reverse()}else for(t=((o=l.length<$.length)?l:$).length,u=c=0;c<t;c++)if(l[c]!=$[c]){o=l[c]<$[c];break}if(o&&(r=l,l=$,$=r,e.s=-e.s),(c=(t=$.length)-(n=l.length))>0)for(;c--;)l[n++]=0;for(c=n;t>u;){if(l[--t]<$[t]){for(n=t;n&&!l[--n];)l[n]=9;--l[n],l[t]+=10}l[t]-=$[t]}for(;0===l[--c];)l.pop();for(;0===l[0];)l.shift(),--f;return l[0]||(e.s=1,l=[f=0]),e.c=l,e.e=f,e},su.mod=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.s),i=e.s;if(!e.c[0])throw Error("[big.js] Division by zero");return r.s=e.s=1,n=1==e.cmp(r),r.s=o,e.s=i,n?new t(r):(o=t.DP,i=t.RM,t.DP=t.RM=0,r=r.div(e),t.DP=o,t.RM=i,this.minus(r.times(e)))},su.plus=su.add=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.s),i=e.s;if(o!=i)return e.s=-i,r.minus(e);var s=r.e,u=r.c,c=e.e,l=e.c;if(!u[0]||!l[0])return l[0]?e:new t(u[0]?r:0*o);if(u=u.slice(),o=s-c){for(o>0?(c=s,n=l):(o=-o,n=u),n.reverse();o--;)n.push(0);n.reverse()}for(u.length-l.length<0&&(n=l,l=u,u=n),o=l.length,i=0;o;u[o]%=10)i=(u[--o]=u[o]+l[o]+i)/10|0;for(i&&(u.unshift(i),++c),o=u.length;0===u[--o];)u.pop();return e.c=u,e.e=c,e},su.pow=function(e){var n=this.constructor,t=new n(this),r=new n(1),o=new n(1),i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(cu+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?o.div(r):r},su.round=function(e,n){var t=this.constructor;if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(lu);return fu(new t(this),e,void 0===n?t.RM:n)},su.sqrt=function(){var e,n,t,r=this.constructor,o=new r(this),i=o.s,s=o.e,u=new r(.5);if(!o.c[0])return new r(o);if(i<0)throw Error(uu+"No square root");0===(i=Math.sqrt(o+""))||i===1/0?((n=o.c.join("")).length+s&1||(n+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new r(((i=Math.sqrt(n))==1/0?"1e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):e=new r(i),s=e.e+(r.DP+=4);do{t=e,e=u.times(t.plus(o.div(t)))}while(t.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return fu(e,r.DP-=4,r.RM)},su.times=su.mul=function(e){var n,t=this.constructor,r=new t(this),o=(e=new t(e),r.c),i=e.c,s=o.length,u=i.length,c=r.e,l=e.e;if(e.s=r.s==e.s?1:-1,!o[0]||!i[0])return new t(0*e.s);for(e.e=c+l,s<u&&(n=o,o=i,i=n,l=s,s=u,u=l),n=new Array(l=s+u);l--;)n[l]=0;for(c=u;c--;){for(u=0,l=s+c;l>c;)u=n[l]+i[c]*o[l-c-1]+u,n[l--]=u%10,u=u/10|0;n[l]=(n[l]+u)%10}for(u?++e.e:n.shift(),c=n.length;!n[--c];)n.pop();return e.c=n,e},su.toExponential=function(e){return du(this,1,e,e)},su.toFixed=function(e){return du(this,2,e,this.e+e)},su.toPrecision=function(e){return du(this,3,e,e-1)},su.toString=function(){return du(this)},su.valueOf=su.toJSON=function(){return du(this,4)};var hu=function e(){function n(t){var r=this;if(!(r instanceof n))return void 0===t?e():new n(t);t instanceof n?(r.s=t.s,r.e=t.e,r.c=t.c.slice(),function(e){if((e=fu(e,28,0)).c.length>1&&!e.c[0]){let n=e.c.findIndex(e=>e);e.c=e.c.slice(n),e.e=e.e-n}}(r)):$u(r,t),r.constructor=n}return n.prototype=su,n.DP=28,n.RM=1,n.NE=-29,n.PE=29,n.version="5.2.2",n}(),pu=hu;new pu(0),new pu(1),new pu(-1),new pu("79228162514264337593543950335"),new pu("-79228162514264337593543950335");function mu(e,n){return 0===n.indexOf(e)?n:void 0}function gu(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function wu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s,u;return n=mu("/",e),null!=n?(t=n,"#"+t):(r=mu("#/",e),null!=r?(o=r,o):(i=mu("#",e),null!=i?(s=i,"#/"+ut(s,1,s.length-1)):(u=e,"#/"+u)))}:e=>{let n,t,r;return n=mu("/",e),null!=n?(t=n,t):(r=e,"/"+r)}}(n)(ot("/",ir(e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e),e)))}function _u(e,n,t){1===n?history.pushState(void 0,"",wu(e,t)):history.replaceState(void 0,"",wu(e,t));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function yu(e,n){return function(e,n){const t=new Lt(null,void 0);let r=t,o=n;for(;null!=o.tail;){let n=e(jt(o));for(;null!=n.tail;){const e=r,t=new Lt(jt(n),void 0);e.tail=t,r=t,n=Gt(n)}o=Gt(o)}const i=r,s=new Lt(null,void 0);return i.tail=s,Gt(t)}(e=>{if(rt(e))return Ht();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Hn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return Ht();if(null!=mu("?",n))return zt(n);{const e=n.split("?");if(Ot(0,e,null)||1!==e.length){if(Ot(0,e,null)||2!==e.length)return Ht();if(""===e[1]){const n=e[0];return zt(decodeURIComponent(n))}{const n=e[0],t=e[1];return nr([decodeURIComponent(n),"?"+t])}}{const n=e[0];return zt(decodeURIComponent(n))}}}},nr(st(null!=mu("#",e)?ut(e,1,e.length-1):1===n&&(null!=gu("#",e)||null!=gu("#/",e))?"":e,["/"],null,0)))}const vu=Qi(e=>{const n=as(n=>{const t=fe(e.onUrlChanged,e=>{});return function(e,n,t){return n(yu(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(0|fe(e.hashMode,1),t)});if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=e=>{n(e)},r=void 0,o=ls(()=>ou(r),[r]),i=ls(()=>iu(r),[r]),s=ls(()=>e=>{t(e)},[t]);ts(as(()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ns(()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}})}))}else{const e="popstate",t=n,r=void 0,o=ls(()=>ou(r),[r]),i=ls(()=>iu(r),[r]),s=ls(()=>e=>{t(e)},[t]);ts(as(()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ns(()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}})}))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=ls(()=>ou(void 0),[void 0]),i=ls(()=>iu(void 0),[void 0]),s=ls(()=>e=>{r(e)},[r]);ts(as(()=>{if(null==o)window.addEventListener(t,s);else{const e=o;window.addEventListener(t,s,e)}return ns(()=>{if(null==i)window.removeEventListener(t,s);else{const e=i;window.removeEventListener(t,s,e)}})}));const u=e.application;return null==u?null:u},void 0,Cu,bu);var bu,Cu;class xu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccountId","Name"]}}class Su extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Asc","Desc"]}}function Eu(e){return 0===e.tag?new Su(1):new Su(0)}class ku extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Sort"]}}const Iu=new ku(0,new xu(1),new Su(0));function Au(e){return e.fields[0]}function Nu(e){return e.fields[1]}function Tu(e,n){const t=n.fields[0],r=n.fields[1],o=[e,t];return 1===o[0].tag?1===o[1].tag?new ku(0,new xu(1),Eu(r)):new ku(0,new xu(1),new Su(0)):0===o[1].tag?new ku(0,new xu(0),Eu(r)):new ku(0,new xu(0),new Su(0))}class Pu extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["SearchText"]}}const Du=new Pu(0,"");function Mu(e){return e.fields[0]}class Ou extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageSize"]}}function Ru(e){return 0|(0|e.fields[0])}class Uu extends U{constructor(e,n,t){super(),this.SearchText=e,this.Sort=n,this.PageSize=t}}class Lu extends U{constructor(e,n,t,r,o){super(),this.StreamId=e,this.Name=n,this.Website=t,this.ContactDetails=r,this.Notes=o}}function Bu(){return z("AccountRegistry.AdminUI.Types.Partner",[],Lu,()=>[["StreamId",ht()],["Name",q("BasicModels.Name",[],mt,()=>[[["Item",X]]])],["Website",q("BasicModels.Website",[],gt,()=>[[["Item",X]]])],["ContactDetails",z("BasicModels.ContactDetails",[],bt,()=>[["FirstName",q("BasicModels.FirstName",[],wt,()=>[[["Item",X]]])],["LastName",q("BasicModels.LastName",[],_t,()=>[[["Item",X]]])],["Email",q("BasicModels.Email",[],yt,()=>[[["Item",X]]])],["MobilePhone",q("BasicModels.MobilePhone",[],vt,()=>[[["Item",X]]])]])],["Notes",V(q("BasicModels.Notes",[],Ct,()=>[[["Item",X]]]))]])}function Fu(e){return Vr(0,()=>me(n=>{const t=n;return me(n=>{const r=n;return Zr(0,to(e.ContactDetails),n=>{const o=n;return new Lu(new dt(0,e.StreamId),t,r,o,de(e=>new Ct(0,e),e.Notes))})},pe(e=>new gt(0,e),Rr("Website",e.Website)))},pe(e=>new mt(0,e),Rr("Name",e.Name))))()}class ju extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PartnerList","Partner","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","Account","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","NotFound"]}}function Gu(){return q("AccountRegistry.AdminUI.Types.Page",[],ju,()=>[[],[["Item",St()]],[["Item",St()]],[["Item",St()]],[["Item",St()]],[["Item1",St()],["Item2",kt()]],[["Item1",St()],["Item2",kt()]],[["Item1",St()],["Item2",kt()]],[]])}function Hu(e){let n,t,r,o,i,s,u,c,l,a,$;switch(qt(e)?n=8:"account-registry"===Zt(e)?qt(Jt(e))?n=8:"partners"===Zt(Jt(e))?qt(Jt(Jt(e)))?n=0:qt(Jt(Jt(Jt(e))))?(n=1,t=Zt(Jt(Jt(e)))):"accounts"===Zt(Jt(Jt(Jt(e))))?qt(Jt(Jt(Jt(Jt(e)))))?(n=2,r=Zt(Jt(Jt(e)))):qt(Jt(Jt(Jt(Jt(Jt(e))))))?(n=5,s=Zt(Jt(Jt(Jt(Jt(e))))),u=Zt(Jt(Jt(e)))):"super-configuration"===Zt(Jt(Jt(Jt(Jt(Jt(e))))))?qt(Jt(Jt(Jt(Jt(Jt(Jt(e)))))))?(n=6,c=Zt(Jt(Jt(Jt(Jt(e))))),l=Zt(Jt(Jt(e)))):n=8:"benefits-onboarding-configuration"===Zt(Jt(Jt(Jt(Jt(Jt(e))))))&&qt(Jt(Jt(Jt(Jt(Jt(Jt(e)))))))?(n=7,a=Zt(Jt(Jt(Jt(Jt(e))))),$=Zt(Jt(Jt(e)))):n=8:"super-configuration"===Zt(Jt(Jt(Jt(e))))?qt(Jt(Jt(Jt(Jt(e)))))?(n=3,o=Zt(Jt(Jt(e)))):n=8:"benefits-onboarding-configuration"===Zt(Jt(Jt(Jt(e))))&&qt(Jt(Jt(Jt(Jt(e)))))?(n=4,i=Zt(Jt(Jt(e)))):n=8:n=8:n=8,n){case 0:return new ju(0);case 1:return new ju(1,new xt(0,t));case 2:return new ju(2,new xt(0,r));case 3:return new ju(3,new xt(0,o));case 4:return new ju(4,new xt(0,i));case 5:return new ju(5,new xt(0,u),new Et(0,s));case 6:return new ju(6,new xt(0,l),new Et(0,c));case 7:return new ju(7,new xt(0,$),new Et(0,a));case 8:return new ju(8)}}function Wu(e){switch(e.tag){case 1:return nr(["account-registry","partners",oo(e.fields[0])]);case 2:return nr(["account-registry","partners",oo(e.fields[0]),"accounts"]);case 3:return nr(["account-registry","partners",oo(e.fields[0]),"super-configuration"]);case 4:return nr(["account-registry","partners",oo(e.fields[0]),"benefits-onboarding-configuration"]);case 5:{const n=e.fields[0],t=e.fields[1];return nr(["account-registry","partners",oo(n),"accounts",io(t)])}case 6:{const n=e.fields[0],t=e.fields[1];return nr(["account-registry","partners",oo(n),"accounts",io(t),"super-configuration"])}case 7:{const n=e.fields[0],t=e.fields[1];return nr(["account-registry","partners",oo(n),"accounts",io(t),"benefits-onboarding-configuration"])}default:return nr(["account-registry","partners"])}}function zu(e){switch(e.tag){case 1:{const n=["account-registry","partners",oo(e.fields[0])];return zt(e=>{_u(nr(n),1,1)})}case 2:{const n=["account-registry","partners",oo(e.fields[0]),"accounts"];return zt(e=>{_u(nr(n),1,1)})}case 3:{const n=["account-registry","partners",oo(e.fields[0]),"super-configuration"];return zt(e=>{_u(nr(n),1,1)})}case 4:{const n=["account-registry","partners",oo(e.fields[0]),"benefits-onboarding-configuration"];return zt(e=>{_u(nr(n),1,1)})}case 5:{const n=e.fields[0],t=e.fields[1],r=["account-registry","partners",oo(n),"accounts",io(t)];return zt(e=>{_u(nr(r),1,1)})}case 6:{const n=e.fields[0],t=e.fields[1],r=["account-registry","partners",oo(n),"accounts",io(t),"super-configuration"];return zt(e=>{_u(nr(r),1,1)})}case 7:{const n=e.fields[0],t=e.fields[1],r=["account-registry","partners",oo(n),"accounts",io(t),"benefits-onboarding-configuration"];return zt(e=>{_u(nr(r),1,1)})}default:{const e=["account-registry","partners"];return zt(n=>{_u(nr(e),1,1)})}}}class qu extends U{constructor(e){super(),this.Partners=e}}function Vu(){return z("AccountRegistry.AdminUI.Types.Data",[],qu,()=>[["Partners",Z(Bu())]])}function Zu(){return Ht()}function Ju(e){return zt(e)}class Xu extends U{constructor(e,n){super(),this.bound=0|e,this.digits=n}}function Yu(e,n){for(;;){const t=e,r=n;if(0===r)return 1;if(r%2!=0)return t*Yu(t*t,~~(r/2))|0;e=t*t,n=~~(r/2)}}In(2013265921,0,!1),In(2013265921,0,!0);Pt(28,e=>Yu(2,e),Int32Array);function Ku(e){return e.bound}function Qu(e,n){return e.digits[n]}function ec(e,n){return Tn(Qu(e,n),!1,2)}function nc(e,n,t){e.digits[n]=t}function tc(e,n){for(;;){const t=e,r=n;if(0===r)return In(1,0,!1);if(r%2!=0)return bn(t,tc(bn(t,t),~~(r/2)));e=bn(t,t),n=~~(r/2)}}function rc(e,n){for(;;){const t=e,r=n;if(0===r)return 1;if(r%2!=0)return t*rc(t*t,~~(r/2))|0;e=t*t,n=~~(r/2)}}const oc=In(16777216,0,!1),ic=In(16777215,0,!1);In(16777215,0,!0);function sc(e){return new Xu(e,new Int32Array(e))}function uc(e){const n=0|((e,n)=>{for(;;){const t=e,r=n;if(-1===r||0!==t[r])return r+1|0;e=t,n=r-1}})(e.digits,e.bound-1);return e.bound=n,e}function cc(e){const n=0|(e<0?0:e);if(n<16777216){const e=sc(1);return e.digits[0]=n,uc(e)}{const e=sc(2);for(let t=0;t<=1;t++)e.digits[t]=~~(n/rc(16777216,t))%16777216;return uc(e)}}const lc=cc(1),ac=cc(0);function $c(e){return e.bound-1}function fc(e){return 0===e.bound}function dc(e,n){if(e.bound===n.bound){return((e,n,t)=>{for(;;){const r=e,o=n,i=t;if(-1===i)return!0;if(r[i]!==o[i])return!1;e=r,n=o,t=i-1}})(e.digits,n.digits,e.bound-1)}return!1}function hc(e,n){if(e.bound<n.bound)return-1;if(e.bound>n.bound)return 1;return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t;if(-1===i)return 0;if(r[i]!==o[i])return r[i]<o[i]?-1:1;e=r,n=o,t=i-1}})(e.digits,n.digits,e.bound-1)}function pc(e,n){return-1===hc(e,n)}function mc(e,n,t){for(;;){const r=e,o=n,i=t;if(!(kn(o,In(0,0,!1))>0))break;{const s=vn(ec(r,i),o);nc(r,i,~~An(En(s,ic))),e=r,n=Cn(s,oc),t=i+1}}}function gc(e,n){const t=0|Ku(e),r=sc(t+1|0),o=Tn(n,!1,2);let i=In(0,0,!1);for(let n=0;n<=t-1;n++){const t=vn(vn(i,ec(r,n)),bn(ec(e,n),o));nc(r,n,~~An(En(t,ic))),i=Cn(t,oc)}return mc(r,i,t),uc(r)}function wc(e,n){const t=1===Ku(e),r=1===Ku(n);return t&&r?function(e,n){const t=sc(2),r=bn(Tn(e,!1,2),Tn(n,!1,2));return nc(t,0,~~An(En(r,ic))),nc(t,1,~~An(Cn(r,oc))),uc(t)}(Qu(e,0),Qu(n,0)):t?gc(n,Qu(e,0)):r?gc(e,Qu(n,0)):function(e,n){const t=sc(e.bound+n.bound|0),r=t.digits,o=e.digits,i=n.digits;for(let s=0;s<=e.bound-1;s++){const e=Tn(o[s],!1,2);let u=In(0,0,!1),c=0|s;for(let t=0;t<=n.bound-1;t++){const n=Tn(i[t],!1,2),o=vn(vn(Tn(r[c],!1,2),u),bn(e,n));r[c]=~~An(En(o,ic)),u=Cn(o,oc),c+=1}mc(t,u,c)}return uc(t)}(e,n)}class _c extends U{constructor(e,n,t,r,o,i,s){super(),this.bigL=0|e,this.twoToBigL=0|n,this.k=0|t,this.bigK=0|r,this.bigN=0|o,this.split=0|i,this.splits=s}}function yc(e,n,t,r){return new _c(e,rc(2,e),n,t,r,~~(24/e),Pt(~~(24/e),n=>rc(2,e*n),Int32Array))}const vc=[yc(1,28,268435456,268435456),yc(2,26,67108864,134217728),yc(3,24,16777216,50331648),yc(4,22,4194304,16777216),yc(5,20,1048576,5242880),yc(6,18,262144,1572864),yc(7,16,65536,458752),yc(8,14,16384,131072),yc(9,12,4096,36864),yc(10,10,1024,10240),yc(11,8,256,2816),yc(12,6,64,768),yc(13,4,16,208)];Pt(24,e=>rc(2,e)-1,Int32Array),Pt(24,e=>rc(2,e),Int32Array),Pt(24,e=>tc(In(2,0,!1),e));vc[0].bigN;function bc(e,n){return wc(e,n)}function Cc(e,n,t,r){const o=e,i=[e.digits,$c(e)],s=0|i[1],u=i[0],c=[t.digits,$c(t)],l=0|c[1],a=c[0],$=Tn(n,!1,2);let f=0,d=bn($,Tn(a[0],!1,2));for(;kn(d,In(0,0,!1))>0||f<l;){if(f>s)throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let e=0|~~An(En(d,ic)),n=Cn(d,oc);e<=u[f+r]?u[f+r]=u[f+r]-e:(u[f+r]=u[f+r]+(16777216-e),n=vn(n,In(1,0,!1))),d=f<l?vn(n,bn($,Tn(a[f+1],!1,2))):n,f+=1}uc(o)}function xc(e,n,t,r){const o=e,i=[e.digits,$c(e)],s=0|i[1],u=i[0],c=[t.digits,$c(t)],l=0|c[1],a=c[0],$=Tn(n,!1,2);let f=0,d=bn($,Tn(a[0],!1,2));for(;kn(d,In(0,0,!1))>0||f<l;){if(f>s)throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let e=0|~~An(En(d,ic)),n=Cn(d,oc);e<16777216-u[f+r]?u[f+r]=u[f+r]+e:(u[f+r]=e-(16777216-u[f+r]),n=vn(n,In(1,0,!1))),d=f<l?vn(n,bn($,Tn(a[f+1],!1,2))):n,f+=1}uc(o)}function Sc(e,n,t){const r=[$c(n),$c(e)],o=0|r[1],i=0|r[0];if(o<i+t)return 0;{const r=[n.digits,e.digits],a=r[1],$=r[0];let f;if(0===i)if(o===t)f=~~(a[t]/$[0]);else{const e=Cn(vn(bn(Tn(a[o],!1,2),oc),Tn(a[o-1],!1,2)),Tn($[0],!1,2));f=~~An(e)}else if(o===i+t)f=~~(a[o]/($[i]+1));else{const e=Cn(vn(bn(Tn(a[o],!1,2),oc),Tn(a[o-1],!1,2)),vn(Tn($[i],!1,2),In(1,0,!1)));f=~~An(e)}if(0===f){return 1!=(u=t,c=e,l=0,(s=n).bound+u<c.bound+l?-1:s.bound+u>c.bound+u?1:0|((e,n,t)=>{e:for(;;){const r=e,o=n,i=t;if(-1===i)return 0;{const s=0|(i<u?0:r[i-u]),c=0|(i<l?0:o[i-l]);if(s===c){e=r,n=o,t=i-1;continue e}return s<c?-1:1}}})(s.digits,c.digits,s.bound+u-1))?1:0}return 0|f}var s,u,c,l}function Ec(e,n){if(fc(n))throw new Error;if($c(e)<$c(n))return[ac,e];{const t=function(e){return new Xu(e.bound,e.digits.slice())}(e),r=sc($c(e)-$c(n)+1+1);let o=0|$c(e);const i=0|$c(n);let s=o-i|0;const u=e=>{};let c=!1;for(;!c;){u([r,t,s,o]);const e=0|Sc(t,n,s);e>0?(Cc(t,e,n,s),xc(r,e,lc,s),u([r,t,s,o])):(c=0===e&&0===s,c||(o===i+s?(u([r,t,s-1,o]),s-=1):(u([r,t,s-1,o-1]),s-=1,o-=1)))}return[uc(r),uc(t)]}}cc(2);function kc(e){return cc(e)}function Ic(e){return function(e){const n=kn(e,In(0,0,!1))<0?In(0,0,!1):e,t=sc(3);for(let e=0;e<=2;e++)t.digits[e]=~~An(xn(Cn(n,tc(oc,e)),oc));return uc(t)}(e)}function Ac(e){const n=0|$c(e),t=((e,t,r)=>{for(;;){const o=e,i=t,s=r;if($c(s)>n)return Wt([i,s],o);e=Wt([i,s],o),t=i+1,r=bc(s,s)}})(Ht(),0,cc(10)),r=(e,n,t,o)=>{if(qt(o)){const r=0|function(e){if(1===e.bound)return 0|e.digits[0];{let n=0;for(let t=e.bound-1;t>=0;t--)n=e.digits[t]+16777216*n;return 0|n}}(t);return e&&0===r?n:Wt(f(r),n)}{const i=Zt(o)[1],s=Jt(o),u=Ec(t,i),c=u[1],l=u[0];if(e&&fc(l)){return r(e,n,c,s)}{const t=r(!1,n,c,s);return r(e,t,l,s)}}},o=t,i=r(!0,Ht(),e,o);return qt(i)?"0":ot("",Xt(i))}function Nc(e){return e.bound<=1}function Tc(e){const n=e;return 0<n.bound?0|n.digits[0]:0}class Pc extends U{constructor(e,n){super(),this.signInt=e,this.v=n}toString(){const e=this;switch(0|Oc(e)){case-1:return fc(Rc(e))?"0":"-"+Ac(Rc(e));case 0:return"0";case 1:return Ac(Rc(e));default:throw new Error("signs should be +/- 1 or 0")}}Equals(e){if(e instanceof Pc){return Uc(this,e)}return!1}GetHashCode(){return 0|(0===Oc(e=this)?1:Oc(e)+function(e){let n=0;for(let t=0;t<=e.bound-1;t++)n=e.digits[t]+(n<<3);return 0|n}(Rc(e))|0);var e}CompareTo(e){if(e instanceof Pc){return 0|function(e,n){return Lc(e,n)?-1:Uc(e,n)?0:1}(this,e)}throw new Error("the objects are not comparable\\nParameter name: obj")}}function Dc(e,n){return new Pc(e,n)}function Mc(e){return Nc(e)&&Tc(e)<Pc.smallLim?Pc.smallPosTab[Tc(e)]:e}function Oc(e){return e.signInt}function Rc(e){return e.v}function Uc(e,n){const t=[Oc(e),Oc(n)];let r;switch(r=-1===t[0]?-1===t[1]?1:0===t[1]?8:1===t[1]?3:9:0===t[0]?-1===t[1]?6:0===t[1]?4:1===t[1]?5:9:1===t[0]?-1===t[1]?2:0===t[1]?7:1===t[1]?0:9:9,r){case 0:case 1:return dc(Rc(e),Rc(n));case 2:case 3:return!!fc(Rc(e))&&fc(Rc(n));case 4:return!0;case 5:case 6:return fc(Rc(n));case 7:case 8:return fc(Rc(e));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Lc(e,n){const t=[Oc(e),Oc(n)];let r;switch(r=-1===t[0]?-1===t[1]?1:0===t[1]?8:1===t[1]?3:9:0===t[0]?-1===t[1]?6:0===t[1]?4:1===t[1]?5:9:1===t[0]?-1===t[1]?2:0===t[1]?7:1===t[1]?0:9:9,r){case 0:return pc(Rc(e),Rc(n));case 1:return pc(Rc(n),Rc(e));case 2:return!1;case 3:return!fc(Rc(e))||!fc(Rc(n));case 4:return!1;case 5:return!fc(Rc(n));case 6:case 7:return!1;case 8:return!fc(Rc(e));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Bc(e){return e>=0?Dc(1,Mc(kc(e))):Dc(-1,Mc(-2147483648===e?Ic(Sn(Tn(e,!1,2))):kc(ve(e))))}function Fc(){return Pc.one}function jc(){return Pc.two}function Gc(){return Pc.zero}Pc.smallLim=4096,Pc.smallPosTab=Pt(Pc.smallLim,e=>kc(e)),Pc.one=Bc(1),Pc.two=Bc(2),Pc.zero=Bc(0);Gc(),Fc(),jc();Gc(),Fc();class Hc{constructor(){}}function Wc(e,n){return{then:(e,t)=>{try{return n().then(e,t)}catch(e){if(y(t,null))return Promise.reject(e);try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}},catch:e=>{try{return n().catch(e)}catch(n){try{return Promise.resolve(e(n))}catch(e){return Promise.reject(e)}}}}}const zc=new Hc;class qc extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Vc{constructor(e){this.state=new qc(0,Nt(new Array(S((e,n)=>b(e,n),e,10)),0,S((e,n)=>b(e,n),e,10),null),0)}}function Zc(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new qc(0,o,t):new qc(1,o,t,i),le(o[r])}}function Jc(e,n,t){const r=cs(e[0]),o=cs(new Vc(10));const s=$s(e[0]),u=s[1],c=s[0];let l;const a=cs(ds()),$=cs(a.current);is(()=>ns(()=>{hs(a.current)})),l=$;const f=()=>{setTimeout(()=>{let e;e=l.current,ps(e)||u(r.current)},0)},d=e=>{var t;(t=Wc(0,()=>{let t=le(e);return function e(n,t,r){return t()?r.then(()=>e(n,t,r)):Promise.resolve(void 0)}(zc,()=>{let e;return null!=t&&(e=l.current,!ps(e))},Wc(0,()=>{const e=ae(t),i=n(e,r.current),s=i[0];return Qt(e=>{e(d)},i[1]),t=Zc(o.current),r.current=s,f(),Promise.resolve()}))}),new Promise((e,n)=>{try{Promise.resolve(t).then(e,n)}catch(e){n(e)}})).then()},h=as(d);var p;return rs(()=>ns(()=>{let e,n;Pr(e=>{e.Dispose()},$e((e=r.current,i(e)?(n=e,n):void 0)))}),t),ss(()=>{r.current=e[0],f(),Qt(e=>{e(h)},e[1])},t),p=()=>{Pr(h,$e(Zc(o.current)))},Xi(e=>(p(),ns(()=>{}))),[c,h]}function Xc(e,n,t){return Jc(ls(e,t),n,t)}class Yc{constructor(){}}function Kc(e,n){return Wr.Delay(n)}new Yc;class Qc extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class el extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class nl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class tl extends U{constructor(e,n,t,r,o,i,s){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.content=s}}class rl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ol extends U{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}const il=new tl("",new Qc(0),Ht(),!1,void 0,void 0,new nl(0));new ol(0,"","",Qs(),new rl(0,""));function sl(e,n){return tt(n)?[n]:st(n,[e],null,0)}function ul(e){return new tl(e,il.method,il.headers,il.withCredentials,il.overridenMimeType,il.overridenResponseType,il.content)}function cl(e,n){return new tl(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.content)}function ll(e,n){return new tl(n.url,n.method,rr(n.headers,zt(e)),n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.content)}function al(e){return gs(n=>{const t=n[0],r=(n[1],new XMLHttpRequest);r.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),r.onreadystatechange=()=>{let e,n,o,i,s,u;4===r.readyState&&t((n=r.responseType,e=""===n||"text"===n?r.responseText:"",o=0|r.status,i=r.responseType,u=r.responseType,s=""===u||"text"===u?new rl(0,r.responseText):new rl("arraybuffer"===u?2:"blob"===u?1:3,r.response),new ol(o,e,i,function(e){const n=ar();return zs(n,Us(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=ae(o);r.push(e)}}return"function"==typeof t?Tt(e=>e,r,t):r}(e=>{const n=nr(sl(":",e));if(!qt(n)){const e=Jt(n);return[Zt(n).toLocaleLowerCase(),ot(":",e).trim()]}},sl("\r\n",r.getAllResponseHeaders()))),s)))};const o=c(e.headers);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const e=o["System.Collections.Generic.IEnumerator`1.get_Current"](),n=e.fields[1],t=e.fields[0];r.setRequestHeader(t,n)}}finally{o.Dispose()}r.withCredentials=e.withCredentials;const i=e.overridenMimeType;if(null==i);else{const e=i;r.overrideMimeType(e)}const s=e.overridenResponseType;null==s||(1===s.tag?r.responseType="blob":2===s.tag?r.responseType="arraybuffer":r.responseType="text");const u=[e.method,e.content];if(0===u[0].tag)r.send(le(void 0));else if(1===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else if(3===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else if(2===u[1].tag){const e=u[1].fields[0];r.send(le(e))}else r.send(le(void 0))})}function $l(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(qt(i))return r;{const s=Jt(i),u=Zt(i),c=Vr(0,()=>me(e=>{const n=e;return Zr(0,r,e=>rr(e,zt(n)))},o(u)))();if(1===c.tag)return c;e=c,n=o,t=s;continue e}}}(new he(0,Ht()),e,n)}const fl=0,dl=1,hl=2,pl=3,ml=4;function gl(e,n){return e.replace(/[a-z]?[A-Z]/g,e=>1===e.length?e.toLowerCase():e.charAt(0)+n+e.charAt(1).toLowerCase())}function wl(e,n=fl){const t={},r=n;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,n,r){e=function(e,n){switch(n){case dl:return e.charAt(0).toLowerCase()+e.slice(1);case hl:return gl(e,"_");case pl:return gl(e,"_").toUpperCase();case ml:return gl(e,"-");case fl:default:return e}}(e,n),t[e]=r}for(let n of e){let e=fl;if(null==n&&o(n),n instanceof T){const t=n.cases()[n.tag];n=0===n.fields.length?t:[t].concat(n.fields),e=r}if(Array.isArray(n))switch(n.length){case 0:o(n);break;case 1:i(n[0],e,!0);break;case 2:const t=n[1];i(n[0],e,t);break;default:i(n[0],e,n.slice(1))}else"string"==typeof n?i(n,e,!0):o(n)}return t}class _l extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class yl extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class vl{constructor(){this.cache=new Map([])}}function bl(){return new vl}bl(),bl();function Cl(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function xl(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=Gn(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)n.push(arguments[e]);n.index=arguments[s++],n.input=arguments[s++],i&&(n.groups=arguments[s]),e=t(n)}return e}));if(t=t.replace(/\$0/g,e=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=n.substring(o),u=Wn(e,s),c=Wn.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+c.replace(e,t)+n.substring(o+c.length)}return n.replace(e,t)}(Cl(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return Cl(n)}}function Sl(e,n){const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function El(e,n){try{return n.contents=function(e){const n=Fn(e),t=Pn.exec(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t[0]?0:36e5*parseInt(t[1],10)+6e4*parseInt(t[2],10);return Sl(n.getTime(),r)}(e),!0}catch(e){return!1}}function kl(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return Il(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function Il(e){return Nn(Cn(e,1e4))}function Al(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return kl(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,s=+n[4],u=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*kl(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class Nl{constructor(e){this.k=e}}function Tl(e){return new Nl(e)}function Pl(e){return e.k}class Dl extends Nl{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=r}}function Ml(e,n,t,r){return new Dl(e,n,t,r)}function Ol(e){return e.left}function Rl(e){return e.right}function Ul(e){return e.h}function Ll(e){return function e(n,t){e:for(;;){const r=n,o=t;if(null!=r){const i=r;if(i instanceof Dl){const r=i;n=Ol(r),t=e(Rl(r),o+1);continue e}return o+1|0}return 0|o}}(e,0)}function Bl(e,n,t){let r,o,i;if(null!=e){const n=e;i=n instanceof Dl?(r=n,Ul(r)):1}else i=0;let s;if(null!=t){const e=t;s=e instanceof Dl?(o=e,Ul(o)):1}else s=0;const u=0|(i<s?s:i);return 0===u?Tl(n):Ml(n,e,t,u+1)}function Fl(e,n,t){let r,o,i,s,u,c,l,a,$;if(null!=e){const n=e;$=n instanceof Dl?(r=n,Ul(r)):1}else $=0;let f;if(null!=t){const e=t;f=e instanceof Dl?(o=e,Ul(o)):1}else f=0;if(f>$+2){const r=ae(t);if(r instanceof Dl){const t=r;if(i=Ol(t),(null!=i?(s=i,s instanceof Dl?(u=s,Ul(u)):1):0)>$+1){const r=ae(Ol(t));if(r instanceof Dl){const o=r;return Bl(Bl(e,n,Ol(o)),Pl(o),Bl(Rl(o),Pl(t),Rl(t)))}throw new Error("internal error: Set.rebalance")}return Bl(Bl(e,n,Ol(t)),Pl(t),Rl(t))}throw new Error("internal error: Set.rebalance")}if($>f+2){const r=ae(e);if(r instanceof Dl){const e=r;if(c=Rl(e),(null!=c?(l=c,l instanceof Dl?(a=l,Ul(a)):1):0)>f+1){const r=ae(Rl(e));if(r instanceof Dl){const o=r;return Bl(Bl(Ol(e),Pl(e),Ol(o)),Pl(o),Bl(Rl(o),n,t))}throw new Error("internal error: Set.rebalance")}return Bl(Ol(e),Pl(e),Bl(Rl(e),n,t))}throw new Error("internal error: Set.rebalance")}return Bl(e,n,t)}function jl(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Pl(r));if(r instanceof Dl){const i=r;return o<0?Fl(jl(e,n,Ol(i)),Pl(i),Rl(i)):0===o?t:Fl(Ol(i),Pl(i),jl(e,n,Rl(i)))}{const o=0|e.Compare(n,Pl(r));return o<0?Ml(n,void 0,t,2):0===o?t:Ml(n,t,void 0,2)}}return Tl(n)}function Gl(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Pl(s));if(s instanceof Dl){const i=s;if(u<0){e=r,n=o,t=Ol(i);continue e}if(0===u)return!0;e=r,n=o,t=Rl(i);continue e}return 0===u}return!1}}function Hl(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Dl){const r=o;Hl(t,Ol(r)),t(Pl(r)),e=t,n=Rl(r);continue e}t(Pl(o))}break}}class Wl extends U{constructor(e,n){super(),this.stack=e,this.started=n}}function zl(e){e:for(;;){const n=e;if(qt(n))return Ht();{const t=Zt(n),r=Jt(n);if(null!=t){const o=t;if(o instanceof Dl){const n=o;e=er([Ol(n),Tl(Pl(n)),Rl(n)],r);continue e}return n}e=r;continue e}}}function ql(e){return new Wl(zl(zt(e)),!1)}function Vl(e){if(e.started){const n=e.stack;if(qt(n))return function(){throw new Error("Enumeration already started")}();if(null!=Zt(n)){return Pl(Zt(n))}throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Zl(e){let n=ql(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Vl(n),"System.Collections.IEnumerator.get_Current":()=>Vl(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(qt(n))return!1;if(null!=Zt(n)){const t=Jt(n);if(Zt(n)instanceof Dl)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=zl(t),!qt(e.stack)}Jt(n);throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!qt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=ql(e)},Dispose(){}}}function Jl(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,s=[o,i];if(qt(s[0]))return qt(s[1])?0:-1;if(qt(s[1]))return 1;if(null!=Zt(s[1]))if(null!=Zt(s[0])){const u=Jt(s[0]),c=Jt(s[1]),l=Zt(s[0]),a=Zt(s[1]);if(l instanceof Dl){const s=l;if(null==Ol(s)){if(!(a instanceof Dl)){const o=0|r.Compare(Pl(s),Pl(a));if(0!==o)return 0|o;e=r,n=Wt(Rl(s),u),t=Wt(void 0,c);continue e}{const l=a;if(null==Ol(l)){const o=0|r.Compare(Pl(s),Pl(l));if(0!==o)return 0|o;e=r,n=Wt(Rl(s),u),t=Wt(Rl(l),c);continue e}{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof Dl)){const o=0|r.Compare(Pl(l),Pl(a));if(0!==o)return 0|o;e=r,n=u,t=c;continue e}{const s=a;if(null==Ol(s)){const o=0|r.Compare(Pl(l),Pl(s));if(0!==o)return 0|o;e=r,n=Wt(void 0,u),t=Wt(Rl(s),c);continue e}{const s=[o,i];let u,c,l,a,$;switch(qt(s[0])?qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2:null!=Zt(s[0])?(u=0,c=Jt(s[0]),l=Zt(s[0])):qt(s[1])?u=2:null!=Zt(s[1])?(u=1,a=Jt(s[1]),$=Zt(s[1])):u=2,u){case 0:if(l instanceof Dl){const o=l;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],c),t=i;continue e}e=r,n=er([void 0,Tl(Pl(l))],c),t=i;continue e;case 1:if($ instanceof Dl){const i=$;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],a);continue e}e=r,n=o,t=er([void 0,Tl(Pl($))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{Jt(s[0]),Jt(s[1]),Zt(s[1]);const u=[o,i];let c,l,a,$,f;switch(qt(u[0])?qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2:null!=Zt(u[0])?(c=0,l=Jt(u[0]),a=Zt(u[0])):qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2,c){case 0:if(a instanceof Dl){const o=a;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],l),t=i;continue e}e=r,n=er([void 0,Tl(Pl(a))],l),t=i;continue e;case 1:if(f instanceof Dl){const i=f;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],$);continue e}e=r,n=o,t=er([void 0,Tl(Pl(f))],$);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==Zt(s[0])){e=r,n=Jt(s[0]),t=Jt(s[1]);continue e}{Jt(s[0]),Jt(s[1]),Zt(s[0]);const u=[o,i];let c,l,a,$,f;switch(qt(u[0])?qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2:null!=Zt(u[0])?(c=0,l=Jt(u[0]),a=Zt(u[0])):qt(u[1])?c=2:null!=Zt(u[1])?(c=1,$=Jt(u[1]),f=Zt(u[1])):c=2,c){case 0:if(a instanceof Dl){const o=a;e=r,n=er([Ol(o),Ml(Pl(o),void 0,Rl(o),0)],l),t=i;continue e}e=r,n=er([void 0,Tl(Pl(a))],l),t=i;continue e;case 1:if(f instanceof Dl){const i=f;e=r,n=o,t=er([Ol(i),Ml(Pl(i),void 0,Rl(i),0)],$);continue e}e=r,n=o,t=er([void 0,Tl(Pl(f))],$);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,zt(n),zt(t))}function Xl(e,n,t){let r=0|t;Hl(e=>{n[r]=e,r+=1},e)}function Yl(e,n){return Dt((n,t)=>jl(e,t,n),void 0,n)}function Kl(e,n){if(r(n)){return Yl(e,n)}if(n instanceof Lt){return function(e,n){return Yt((n,t)=>jl(e,t,n),void 0,n)}(e,n)}{const t=c(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=jl(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{t.Dispose()}}}class Ql{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n=0;const t=c(e);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();r=n,o=g(e),n=(r<<1)+o+631}}finally{t.Dispose()}var r,o;return 0|Math.abs(n)}(this)}Equals(e){let n;return e instanceof Ql&&(n=e,0===Jl(na(this),ta(this),ta(n)))}toString(){return"set ["+ot("; ",Dr(e=>N(e),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}CompareTo(e){return 0|Jl(na(this),ta(this),ta(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 Gl(na(this),e,ta(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Xl(ta(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ra(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ra(this)}GetEnumerator(){return Zl(ta(this))}[Symbol.iterator](){return l(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Zl(ta(this))}get size(){return 0|ra(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 oa(this,e)}keys(){return Dr(e=>e,this)}values(){return Dr(e=>e,this)}entries(){return Dr(e=>[e,e],this)}forEach(e,n){const t=this;Pr(n=>{e(n,n,t)},t)}}function ea(e,n){return new Ql(e,n)}function na(e){return e.comparer}function ta(e){return e.tree}function ra(e){return Ll(ta(e))}function oa(e,n){return Gl(na(e),n,ta(e))}function ia(e,n){return ea(n,Kl(n,e))}function sa(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function ua(e,n){let t;switch(n.tag){case 2:{const e=n.fields[1];t=sa(n.fields[0],e,!0);break}case 1:{const e=n.fields[1],r=n.fields[2];t=sa(n.fields[0],e,!1)+"\nReason: "+r;break}case 3:{const e=n.fields[1];t=sa(n.fields[0],e,!0);break}case 4:{const e=n.fields[1],r=n.fields[0],o=n.fields[2];t=sa(r,e,!0)+"\nNode `"+o+"` is unkown.";break}case 5:{const e=n.fields[1];t="Expecting "+n.fields[0]+".\n"+JSON.stringify(e,null,4);break}case 7:t="The following errors were found:\n\n"+ot("\n\n",n.fields[0]);break;case 6:t="The following `failure` occurred with the decoder: "+n.fields[0];break;default:{const e=n.fields[1];t=sa(n.fields[0],e,!1)}}return 7===n.tag?t:"Error at: `"+e+"`\n"+t}function ca(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new he(1,ua(e[0],e[1]))}{const e=r.fields[0];return new he(0,e)}}function la(e,n){let t;try{return ca("$",e,JSON.parse(n))}catch(e){if(t=e,t instanceof SyntaxError){return new he(1,"Given an invalid JSON: "+e.message)}throw e}}const aa=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new he(0,(e+128&255)-128):new he(1,[t,new _l(1,"a sbyte",e,"Value was either too large or too small for a sbyte")]):new he(1,[t,new _l(1,"a sbyte",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!1,8,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[t,new _l(0,"a sbyte",r)])}return new he(1,[t,new _l(0,"a sbyte",r)])},$a=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new he(0,255&e):new he(1,[t,new _l(1,"a byte",e,"Value was either too large or too small for a byte")]):new he(1,[t,new _l(1,"a byte",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!0,8,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[t,new _l(0,"a byte",r)])}return new he(1,[t,new _l(0,"a byte",r)])},fa=e=>n=>{const t="an int16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new he(0,(e+32768&65535)-32768):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!1,16,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])},da=e=>n=>{const t="an uint16",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new he(0,65535&e):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!0,16,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])},ha=e=>n=>{const t=e,r=n;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new he(0,~~e):new he(1,[t,new _l(1,"an int",e,"Value was either too large or too small for an int")]):new he(1,[t,new _l(1,"an int",e,"Value is not an integral value")])}if("string"==typeof r){let e,n=0;if(e=[ye(r,511,!1,32,new L(()=>n,e=>{n=e})),n],e[0]){const n=0|e[1];return new he(0,n)}return new he(1,[t,new _l(0,"an int",r)])}return new he(1,[t,new _l(0,"an int",r)])},pa=e=>n=>{const t="an uint32",r=e,o=n;if("number"==typeof o){const e=o;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new he(0,e>>>0):new he(1,[r,new _l(1,t,e,"Value was either too large or too small for "+t)]):new he(1,[r,new _l(1,t,e,"Value is not an integral value")])}if("string"==typeof o){let e,n=0;if(e=[ye(o,511,!0,32,new L(()=>n,e=>{n=e})),n],e[0]){const n=e[1];return new he(0,n)}return new he(1,[r,new _l(0,t,o)])}return new he(1,[r,new _l(0,t,o)])};function ma(e,n){if("string"==typeof n){let r,o=Bn(-621355968e5,0);if(r=[jn(n,new L(()=>o,e=>{o=e})),o],r[0]){const e=r[1];return new he(0,1===(t=e).kind?t:Bn(t.getTime(),1))}return new he(1,[e,new _l(0,"a datetime",n)])}return new he(1,[e,new _l(0,"a datetime",n)]);var t}function ga(e,n){if("string"==typeof n){let t,r=Sl(-621355968e5,0);if(t=[El(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a datetimeoffset",n)])}return new he(1,[e,new _l(0,"a datetime",n)])}function wa(e,n,t,r){let o;const i=t+".["+f(e)+"]";if(Array.isArray(r)){const t=r;if(e<t.length)return n(i,t[e]);{const n="a longer array. Need index `"+f(e)+"` but there are only `"+(o=0|t.length,f(o)+"` entries");return new he(1,[i,new _l(5,n,r)])}}return new he(1,[i,new _l(0,"an array",r)])}function _a(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return pe(e=>Kt(e),Dt((t,o)=>{if(r+=1,0===t.tag){const i=t.fields[0],s=e(n+".["+f(r)+"]",o);if(0===s.tag){const e=s.fields[0];return new he(0,Wt(e,i))}{const e=s.fields[0];return new he(1,e)}}return t},new he(0,Ht()),o))}return new he(1,[n,new _l(0,"a list",t)])}function ya(e,n,t){if(Array.isArray(t)){let r=-1;const o=t,i=Nt(new Array(o.length),0,o.length,null);return Dt((t,o)=>{if(r+=1,0===t.tag){const i=t.fields[0],s=e(n+".["+f(r)+"]",o);if(0===s.tag){const e=s.fields[0];return i[r]=e,new he(0,i)}{const e=s.fields[0];return new he(1,e)}}return t},new he(0,i),o)}return new he(1,[n,new _l(0,"an array",t)])}function va(e,n,t){return new he(0,e)}function ba(e,n,t,r){const o=n(t,r);if(0===o.tag){return e(o.fields[0],t,r)}{const e=o.fields[0];return new he(1,e)}}function Ca(e,n,t,r){const o=n(t,r);if(1===o.tag){const e=o.fields[0];return new he(1,e)}{const n=o.fields[0];return new he(0,e(n))}}function xa(e,n){let t;const r=e;return t=e=>n=>wa(0,r,e,n),e=>r=>ba(k(3,e=>{let t;const r=n;return t=e=>n=>wa(1,r,e,n),n=>r=>ba((n,t,r)=>va([e,n]),k(2,t),n,r)}),k(2,t),e,r)}function Sa(e){return qs(e)}function Ea(e,n,t,r){let o,i;return n.length!==r.length?new he(1,[t,new _l(6,(o=0|r.length,i=0|n.length,Kn(Jn("Expected %i %s but got %i"))(i)(e)(o)))]):Ut(k(3,A(e=>n=>r=>{if(0===r.tag){const o=r.fields[0];return pe(e=>Wt(e,o),n(t,e))}return r},[0,[0,2],0])),r,n,new he(0,Ht()))}function ka(e,n,t,r,o,i){const s=(u=e=>Y(e)===r,oe(t).find(u));var u;if(null!=s){const t=s;if(0===i.length)return new he(0,ue(t,[]));return pe(e=>ue(t,Xt(e)),Ea("union fields",Tt(t=>Aa(e,n,!1,t[1]),function(e){return null==e.fields?[]:e.fields}(t)),o,i))}return new he(1,[o,new _l(6,"Cannot find case "+r+" in "+K(t))])}function Ia(e,n,t,r){const o=new L(null),i=Xs(K(r),o,e);let s;if(function(e){return e instanceof F?null!=e.fields:e instanceof U}(r)){const e=Tt(e=>[xl(n,Y(e)),Aa(i,n,!1,e[1])],ie(r));s=n=>t=>pe(e=>function(e,n){const t=ie(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce((e,[t,r],o)=>(e[t]=n[o],e),{})}(r,Xt(e)),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new he(1,[n,new _l(0,"an object",t)]):Rt(k(2,e=>{const r=e[0],o=e[1];return e=>{if(0===e.tag){const i=e.fields[0];return pe(e=>Wt(e,i),o(n+"."+r)(t[r]))}return e}}),e,new he(0,Ht()))}(e,n,t))}else if(function(e){return e instanceof F?null!=e.cases:e instanceof T}(r))s=e=>t=>{if("string"==typeof t){return ka(i,n,r,t,e,[])}if(Array.isArray(t)){const o=t,s=o[0];return ka(i,n,r,s,e,o.slice(1,o.length))}return new he(1,[e,new _l(0,"a string or array",t)])};else{if(!t){let e;const n=K(r);throw e=Kn(Jn("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}s=e=>n=>new he(1,[e,new _l(2,"an extra coder for "+K(r),n)])}return o.contents=s,s}function Aa(e,n,t,r){let o;const i=K(r),s=Ys(i,e);if(null==s){if(Q(r)){const t=Aa(e,n,!1,function(e){var n;return Q(e)?null===(n=e.generics)||void 0===n?void 0:n[0]:void 0}(r));return e=>n=>ya(k(2,t),e,n)}if(ee(r)){const e=K(function(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=aa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=$a(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=fa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,(u=(u=e)<0&&null!=c&&10!==c?65535+u+1:u).toString(c))):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}var u,c};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,s=da(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=ha(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=0|s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,f(e))):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=pa(o)(i);if(1===s.tag){const e=s.fields[0];return new he(1,e)}{const e=s.fields[0];return Nr(e,ne(t),{Equals:(e,n)=>e===n,GetHashCode:e=>p(e)})?new he(0,re(t,e.toString())):new he(1,[o,new _l(1,K(t),i,"Unkown value provided for the enum")])}};{const e=K(r),n=Yn(e=>{throw new Error(e)},Jn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>{const t=n(e);return e=>t(e)}}}if(function(e){return null!=e.generics&&e.generics.length>0}(r)){if(se(r)){const t=Tt(t=>Aa(e,n,!1,t),function(e){if(se(e)&&null!=e.generics)return e.generics;throw new Error(e.fullname+" is not a tuple type")}(r));return e=>n=>Array.isArray(n)?pe(e=>Xt(e),Ea("tuple elements",t,e,n)):new he(1,[e,new _l(0,"an array",n)])}{const i=K(function(e){return null==e.generics?e:new F(e.fullname,e.generics.map(()=>J))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===i){const t=Aa(e,n,!0,j(r)[0]);return e=>n=>{return r=k(2,t),o=e,null==(i=n)?new he(0,void 0):pe(e=>le(e),r(o,i));var r,o,i}}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===i){const t=Aa(e,n,!1,j(r)[0]);return e=>n=>_a(k(2,t),e,n)}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===i){const t=Aa(e,n,!1,j(r)[0]),i=Aa(e,n,!1,j(r)[1]);let s;const u=nr([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new he(1,[t,new _l(0,"an object",r)]):Tr((o,i)=>{if(0===o.tag){const s=o.fields[0],u=e(t,i);if(0===u.tag){const e=u.fields[0],o=n(t+"."+i,r[i]);if(0===o.tag){const n=o.fields[0];return new he(0,Wt([e,n],s))}{const e=o.fields[0];return new he(1,e)}}{const e=u.fields[0];return new he(1,e)}}return o},new he(0,Ht()),Object.keys(r))}(k(2,t),k(2,i),e,n),(o=xa(k(2,t),k(2,i)),e=>n=>_a(k(2,o),e,n))]);return s=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(qt(o))return new he(1,[t,new _l(7,i)]);{const s=Jt(o),u=Zt(o),c=ca(t,k(2,u),r);if(1===c.tag){e=s,n=rr(i,zt(c.fields[0]));continue e}{const e=c.fields[0];return new he(0,e)}}}})(u,Ht());var t,r},e=>n=>Ca(e=>Sa(e),k(2,s),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===i){const t=Aa(e,n,!1,j(r)[0]);return e=>n=>{const r=ya(k(2,t),e,n);if(0===r.tag){const e=r.fields[0];return new he(0,ia(e,{Compare:(e,n)=>x(e,n)}))}{const e=r.fields[0];return new he(1,e)}}}return Ia(e,n,t,r)}}return"System.Boolean"===i?e=>n=>{return t=e,"boolean"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===i?e=>n=>{return t=e,null==(r=n)?new he(0,void 0):new he(1,[t,new _l(0,"null",r)]);var t,r}:"System.String"===i?e=>n=>{return t=e,"string"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a string",r)]);var t,r}:"System.SByte"===i?aa:"System.Byte"===i?$a:"System.Int16"===i?fa:"System.UInt16"===i?da:"System.Int32"===i?ha:"System.UInt32"===i?pa:"System.Double"===i?e=>n=>{return t=e,"number"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a float",r)]);var t,r}:"System.Single"===i?e=>n=>{return t=e,"number"==typeof(r=n)?new he(0,r):new he(1,[t,new _l(0,"a float32",r)]);var t,r}:"System.DateTime"===i?e=>n=>ma(e,n):"System.DateTimeOffset"===i?e=>n=>ga(e,n):"System.TimeSpan"===i?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;if(t=[Al(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a timespan",n)])}return new he(1,[e,new _l(0,"a timespan",n)])}(e,n):"System.Guid"===i?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";if(t=[ft(n,new L(()=>r,e=>{r=e})),r],t[0]){const e=t[1];return new he(0,e)}return new he(1,[e,new _l(0,"a guid",n)])}return new he(1,[e,new _l(0,"a guid",n)])}(e,n):"System.Object"===i?e=>e=>new he(0,e):Ia(e,n,t,r)}{const e=s;return n=>t=>e.contents(n)(t)}}function Na(e){if(null!=e){return Ks((e,n)=>{const t=n[1];return new L(t)},e.Coders)}return Qs()}function Ta(e,n,t){const r=fe(e,new yl(0)),o=ae(t).ResolveType();return Aa(Na(n),r,!1,o)}function Pa(e,n,t,r){return la(k(2,Ta(n,t,r)),e)}function Da(e){const n=e.fields[0];return new dt(0,n)}function Ma(e){return Kn(Xn("%s%P()/account-registry/admin",[e]))}function Oa(e,n){return Kc(0,()=>{const t=ll((r=Kn(Jn("Bearer %s"))(e),new el(0,"Authorization",r)),n);var r;const o=Wr.Bind(al(t),e=>Wr.Return(new he(0,e)));return Wr.Delay(()=>Wr.Bind(o,e=>{let n;const r=e;if(1===r.tag){const e=r.fields[0];return Wr.Return(new he(1,e))}{const e=r.fields[0];return Wr.ReturnFrom((n=e,429===n.statusCode||n.statusCode>=500?Wr.Bind(al(t),e=>Wr.Return(new he(0,e))):function(e,n){return Wr.Return(qr(0,n))}(0,n)))}}))})}function Ra(e,n){return Kc(0,()=>{const t=Oa(n,cl(new Qc(0),ul(Kn(Xn("%P()/partners",[Ma(e)])))));return Wr.Delay(()=>Wr.Bind(t,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(me(e=>$l(e=>e,ir(e=>Fu(e),e)),Pa(n.responseText,new yl(1),void 0,{ResolveType:()=>Z(z("Dto.AdminApi.Partner",[],uo,()=>[["StreamId",X],["Name",X],["Website",X],["ContactDetails",no()],["Notes",V(X)]]))}))):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}function Ua(e,n,t,r,o){return Kc(0,()=>{let i,s;const u=Mu(r.SearchText);let c;s=rt(u)?void 0:Kn(Xn("search=%P()",[encodeURIComponent(u)]));const l=[(a=r.Sort).fields[0],a.fields[1]];var a;let $;c=1===l[0].tag?1===l[1].tag?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":1===l[1].tag?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc";const f=0|Ru(r.PageSize);$=f<=100&&f>=10?Kn(Xn("page_size=%i%P()",[f])):void 0,i="?"+ot("&",function(e,n){const t=new Lt(null,void 0),r=Yt((n,t)=>{const r=e(t);if(null==r)return n;{const e=ae(r),t=new Lt(e,void 0);return n.tail=t,t}},t,n),o=new Lt(null,void 0);return r.tail=o,Gt(t)}(e=>e,nr([s,c,$])));const d=Oa(n,(e=>{if(null==o)return e;return ll(new el(0,"token",o),e)})(cl(new Qc(0),ul(Kn(Xn("%P()/partners/%P()/accounts%P()",[Ma(e),pt(t),i]))))));return Wr.Delay(()=>Wr.Bind(d,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(Pa(n.responseText,new yl(1),void 0,{ResolveType:ho})):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}class La extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Tab"]}}function Ba(e,n){const t=(null!=n?"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300":"border-indigo-500 text-indigo-600")+" whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm";return r=ko("a",E(Sr(vr(()=>Ir(xr(["key",e]),vr(()=>Ir(xr(["children",e]),vr(()=>Ir(xr(["className",t]),vr(()=>null!=n?xr(["href",wu(zt(ae(n)),1)]):Cr())))))))))),new La(0,r);var r}function Fa(e){return ko("div",{className:"border-b border-gray-200",children:Ji.Children.toArray([ko("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:Ji.Children.toArray(Array.from(Dr(e=>e.fields[0],e)))})])})}class ja extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Ga(e){let n;const t=e.accessToken,r=e.backendUrl,o=e.accountId,i=e.partnerId;return ko("superhero-super-configuration",wl(Ar(e=>e,[new ja(1,t),new ja(0,r),new ja(2,(n=i.fields[0],n)),de(e=>{const n=e.fields[0];return new ja(3,n)},o)]),1))}class Ha extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}}function Wa(e){let n;const t=e.accessToken,r=e.backendUrl,o=e.accountId,i=e.partnerId;return ko("superhero-benefits-onboarding-configuration",wl(Ar(e=>e,[new Ha(1,t),new Ha(0,r),new Ha(2,(n=i.fields[0],n)),de(e=>{const n=e.fields[0];return new Ha(3,n)},o)]),1))}function za(e){return ko("label",{className:"block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2",children:e})}function qa(e){return ko("div",{className:"mt-1 sm:mt-0 sm:col-span-2",children:Ji.Children.toArray([e])})}function Va(e,n){return ko("div",{className:"sm:grid sm:grid-cols-4 sm:gap-4 sm:items-start sm:border-b sm:border-gray-200 sm:py-5",children:Ji.Children.toArray([za(e),qa(n)])})}function Za(e){return ko("input",{type:"text",className:"max-w-lg block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:max-w-xs sm:text-sm border-gray-300 rounded-md",value:e,readOnly:!0})}function Ja(e){return ko("textarea",{className:"max-w-lg shadow-sm block w-full focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md",value:e,readOnly:!0,rows:5})}function Xa(e){const n=zt(ko("div",{children:Ji.Children.toArray(Array.from(e))}));return ko("form",{children:Ji.Children.toArray(Array.from(n))})}function Ya(e,n){const t=nr([ko("br",{}),(r=e,ko("div",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),children:Ji.Children.toArray([ko("span",{children:[r]})])})),ko("div",{className:ot(" ",["px-6"]),children:Ji.Children.toArray(Array.from(n))})]);var r;return ko("div",{children:Ji.Children.toArray(Array.from(t))})}function Ka(e){return n=>Va(e,Za(n))}function Qa(e){return Ya("Account Information",nr([Ka("ID")(e.StreamId),Ka("External ID")(fe(e.ExternalId,"")),Ka("Channel ID")(fe(e.ChannelId,"")),Ka("Name")(e.Name),Ka("Contact")(Kn(Xn("%P() %P()",[e.ContactDetails.FirstName,e.ContactDetails.LastName]))),Ka("Phone")(e.ContactDetails.MobilePhone),Ka("Email")(e.ContactDetails.Email),Ka("Website")(e.Website)]))}function e$(e){if(null==e)return null;{const n=e;return Ya("Legal Entity",nr([Ka("Business Name")(n.BusinessName),Ka("Business Number")(n.BusinessNumber),Ka("Address Line 1")(n.Address1),Ka("Address Line 2")(fe(n.Address2,"")),Ka("City")(n.City),Ka("State")(fe(n.State,"")),Ka("Postcode")(n.Postcode)]))}}function n$(e){if(null==e)return null;return Ya("Other details",zt((n="Notes",e=>Va(n,Ja(e)))(e)));var n}function t$(e){return Xa([Qa(e),e$(e.LegalEntity),n$(e.Notes)])}function r$(e){const n=zt(ko("span",{children:[e.error]}));return ko("div",{children:Ji.Children.toArray(Array.from(n))})}function o$(){const e=zt(ko("span",{children:["Please wait..."]}));return ko("div",{children:Ji.Children.toArray(Array.from(e))})}class i$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class s$ extends U{constructor(e){super(),this.Data=e}}function u$(){return[new s$(new eu(0)),Zu()]}class c$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","SuperConfiguration","BenefitsOnboardingConfiguration"]}}function l$(e,n,t){let r,o,i,s,u,c;const l=[e,n];return Fa(1===t.tag?nr([Ba("Details",wu(Wu((r=l,new ju(5,r[0],r[1]))),1)),Ba("Super Configuration",void 0),Ba("Benefits Onboarding Configuration",wu(Wu((o=l,new ju(7,o[0],o[1]))),1))]):2===t.tag?nr([Ba("Details",wu(Wu((i=l,new ju(5,i[0],i[1]))),1)),Ba("Super Configuration",wu(Wu((s=l,new ju(6,s[0],s[1]))),1)),Ba("Benefits Onboarding Configuration",void 0)]):nr([Ba("Details",void 0),Ba("Super Configuration",wu(Wu((u=l,new ju(6,u[0],u[1]))),1)),Ba("Benefits Onboarding Configuration",wu(Wu((c=l,new ju(7,c[0],c[1]))),1))]))}function a$(e,n,t){switch(n.tag){case 1:{const n=e.accountDetails;return ko(Ga,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}case 2:{const n=e.accountDetails;return ko(Wa,{partnerId:n[0],accountId:n[1],backendUrl:e.backendUrl,accessToken:e.accessToken})}default:{const e=t.Data;let n,r,o;switch(0===e.tag||1===e.tag?n=2:3===e.tag?(n=3,o=e.fields[0]):0===e.fields[0].tag?(n=0,r=e.fields[0].fields[0]):n=1,n){case 0:return ko(t$,r);case 1:return ko(r$,{error:"There was an error retrieving account "});case 2:return ko(o$,null);case 3:return ko(r$,{error:N(o)})}}}}function $$(e){let n,t;const r=e.mode,o=e.props,i=Xc(u$,(e,n)=>function(e,n){const t=e.fields[0];return[new s$(t),Zu()]}(e),[]),s=i[0],u=i[1];return os((n=[()=>{const e=o.accountDetails,n=e[0],t=e[1];return function(e,n,t,r){const o=t.fields[0],i=r.fields[0];return Kc(0,()=>{const t=Oa(n,cl(new Qc(0),ul(Kn(Xn("%P()/partners/%s%P()/accounts/%s%P()",[Ma(e),o,i])))));return Wr.Delay(()=>Wr.Bind(t,e=>{let n;const t=e;if(1===t.tag){const e=t.fields[0];return Wr.Return(new he(1,e))}{const e=t.fields[0];return Wr.ReturnFrom((n=e,200===n.statusCode?Wr.Return(Pa(n.responseText,new yl(1),void 0,{ResolveType:lo})):Wr.Return(new he(1,"Unexpected response from backend"))))}}))})}(o.backendUrl,o.accessToken,n,t)},e=>{u(new i$(0,e))}],tu(n[0],n[1]))),ko("div",{children:Ji.Children.toArray([(t=o.accountDetails,l$(t[0],t[1],r)),a$(o,r,s)])})}class f$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}}class d${constructor(e){this.props=e}}function h$(e){return n=>t=>Wr.Delay(()=>{const r=Da(e.props.partnerId);return Wr.Bind(Ua(e.props.backendUrl,e.props.accessToken,r,n,void 0),e=>(t(new f$(2,new eu(2,e))),Wr.Zero()))})}class p$ extends U{constructor(e,n,t,r){super(),this.Data=e,this.SearchText=n,this.Sort=t,this.PageSize=r}}function m$(){return[new p$(new eu(0),Du,Iu,(e=20,new Ou(0,e))),Zu()];var e}class g$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function w$(e){return new g$(0,e)}function _$(e){return e.fields[0]}class y$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function v$(e){return new y$(0,e)}function b$(e){return e.fields[0]}function C$(e){return w$(ko("th",E(nr([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))))}function x$(e,n){return v$(ko("td",{className:ot(" ",Ir(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function S$(e,n){let t;const r=(e,n)=>{return ko("tr",{className:(t=e,t%2==0?"bg-white":"bg-gray-50"),children:Ji.Children.toArray(Array.from(Dr(e=>b$(e),n)))});var t};return ko("div",{className:"flex flex-col mt-4",children:Ji.Children.toArray([ko("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:Ji.Children.toArray([ko("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Ji.Children.toArray([ko("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Ji.Children.toArray([ko("table",{className:"min-w-full divide-y divide-gray-200",children:Ji.Children.toArray([(e=>{let n;return ko("thead",{className:"bg-gray-50",children:(n=Dr(e=>_$(e),e),ko("tr",{children:Ji.Children.toArray(Array.from(n))}))})})(e),(t=Mr(k(2,e=>{const n=function(e,n,t){if(null!=n){if("__CURRIED__"in n){n=n.__CURRIED__;for(let e=0;e<t.length;e++)n=n(t[e]);return n}switch(e){case 1:return e=>n.apply(void 0,t.concat([e]));case 2:return e=>r=>n.apply(void 0,t.concat([e,r]));case 3:return e=>r=>o=>n.apply(void 0,t.concat([e,r,o]));case 4:return e=>r=>o=>i=>n.apply(void 0,t.concat([e,r,o,i]));case 5:return e=>r=>o=>i=>s=>n.apply(void 0,t.concat([e,r,o,i,s]));case 6:return e=>r=>o=>i=>s=>u=>n.apply(void 0,t.concat([e,r,o,i,s,u]));case 7:return e=>r=>o=>i=>s=>u=>c=>n.apply(void 0,t.concat([e,r,o,i,s,u,c]));case 8:return e=>r=>o=>i=>s=>u=>c=>l=>n.apply(void 0,t.concat([e,r,o,i,s,u,c,l]));default:throw new Error("Partially applying to more than 8-arity is not supported: "+e)}}}(1,r,[e]);return e=>n(e)}),n),ko("tbody",{children:Ji.Children.toArray(Array.from(t))}))])})])})])})])})])})}function E$(e){return["fillRule",e]}function k$(e){return["clipRule",e]}const I$=ko("svg",{className:ot(" ",["h-5","w-5"]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ji.Children.toArray([ko("path",E(nr([["d","M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"],E$("evenodd"),k$("evenodd")])))])}),A$=ko("svg",{className:ot(" ",["h-5","w-5"]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ji.Children.toArray([ko("path",E(nr([["d","M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z"],E$("evenodd"),k$("evenodd")])))])});function N$(e,n,t,r){return w$(ko("th",{className:ot(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"]),scope:"col",children:Ji.Children.toArray([ko("a",{className:ot(" ",["group","inline-flex","cursor-pointer"]),onClick:t,children:Ji.Children.toArray([r,ko("span",{className:ot(" ",(o=!e,i=zt("invisible"),s=nr(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"]),o?rr(s,i):s)),children:Ji.Children.toArray(Array.from(Sr(vr(()=>xr(n?I$:A$)))))})])})])}));var o,i,s}function T$(e,n){return N$(y(Au(e.Sort),new xu(1)),y(Nu(e.Sort),new Su(0)),t=>{n(new f$(1,Tu(new xu(1),e.Sort)))},"Name")}function P$(e,n){return N$(y(Au(e.Sort),new xu(0)),y(Nu(e.Sort),new Su(0)),t=>{n(new f$(1,Tu(new xu(0),e.Sort)))},"Id")}function D$(e,n){const t=new Et(0,n.AccountId);return Sr(vr(()=>{let r;return Ir(xr(function(e,n,t,r){return v$(ko("td",{className:"px-6 py-2 whitespace-nowrap text-sm align-top",children:Ji.Children.toArray(Array.from(Sr(vr(()=>Ir(xr(ko("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})),vr(()=>{let e;return Ir(null==r?xr(null):(e=r,Ir(xr(ko("br",{})),vr(()=>{let n;return xr((n=Kn(Xn("Channel ID: %s%P()",[e])),ko("span",{children:[n]})))}))),vr(()=>{if(null==t)return xr(null);{const e=t;return Ir(xr(ko("br",{})),vr(()=>{let n;return xr((n=Kn(Xn("External ID: %s%P()",[e])),ko("span",{children:[n]})))}))}}))}))))))}))}(wu(Wu((r=[e,t],new ju(5,r[0],r[1]))),1),n.AccountId,n.ExternalId,n.ChannelId)),vr(()=>{return Ir(xr((e=n.Name,t=n.BusinessName,r=n.BusinessNumber,v$(ko("td",{className:ot(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"]),children:Ji.Children.toArray(Array.from(Sr(vr(()=>Ir(xr(ko("div",{className:ot(" ",["font-medium"]),children:Ji.Children.toArray([ko("span",{children:[e]})])})),vr(()=>{let e,n;return Ir(null==t?xr(null):(e=t,xr((n="Legal Entity: "+e,ko("span",{children:[n]})))),vr(()=>{if(null==r)return xr(null);{const e=r;return Ir(xr(ko("br",{})),vr(()=>{let n;return xr((n="ABN: "+e,ko("span",{children:[n]})))}))}}))}))))))})))),vr(()=>{return Ir(xr((e=n.Contact,t=n.ContactMobilePhone,v$(ko("td",{className:ot(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"]),children:Ji.Children.toArray([ko("span",{children:[e]}),ko("br",{}),ko("span",{children:[t]})])})))),vr(()=>xr(function(e){return v$(ko("td",{className:ot(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}(n.Website))));var e,t}));var e,t,r}))}))}class M$ extends U{constructor(e,n){super(),this.Data=e,this.LoadNext=n}}class O$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Resolved","InProgress"]}}class R$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Known","Unknown"]}}function U$(e,n,t,r,o,i){let s;const u=[n,t];let c,l,a;switch(null!=u[0]&&null!=u[1]?(c=0,l=u[0],a=u[1]):c=1,c){case 0:s=Sr(vr(()=>Ir(xr("Showing "),vr(()=>Ir(xr(ko("span",{className:"font-medium",children:Kn(Xn("%i%P()",[l]))})),vr(()=>Ir(xr(" to "),vr(()=>Ir(xr(ko("span",{className:"font-medium",children:Kn(Xn("%i%P()",[a]))})),vr(()=>Ir(xr(" of "),vr(()=>{let e;return 1===r.tag?zt(" many"):(e=0|r.fields[0],nr([ko("span",{className:"font-medium",children:N(e)})," results"]))}))))))))))));break;case 1:s=zt(null)}const $=Sr(vr(()=>{let e;return Ir(null==i?xr(null):(e=i,xr(ko("a",{className:ot(" ",["relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:e,children:"Previous "}))),vr(()=>{if(null==o)return xr(null);{const e=o;return xr(ko("a",{className:ot(" ",["ml-3","relative","inline-flex","items-center","px-4","py-2","border","border-gray-300","text-sm","font-medium","rounded-md","text-gray-700","bg-white","hover:bg-gray-50","cursor-pointer"]),onClick:e,children:" Next"}))}}))}));return ko("tfoot",{className:ot(" ",["w-full"]),children:Ji.Children.toArray([ko("tr",{children:Ji.Children.toArray([ko("td",{colSpan:e,children:Ji.Children.toArray([ko("nav",{className:ot(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"]),children:Ji.Children.toArray([ko("div",{className:ot(" ",["hidden","sm:block"]),children:Ji.Children.toArray([ko("p",{className:ot(" ",["text-sm","text-gray-700"]),children:Ji.Children.toArray(Array.from(s))})])}),ko("div",{className:ot(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:Ji.Children.toArray(Array.from($))})])})])})])})])})}function L$(e,n){const t=$s(1),r=t[1],o=0|t[0];return[o,t=>{if(o===e)if(null==n);else{const e=n;Yn(e=>console.log(e),Jn("Calling Load")),e(),r(o+1)}else r(o+1)},e=>{r(o-1)}]}function B$(e){const n=e.data,t=e.pageSize,r=e.renderRowCells,o=e.columnHeaders,i=(s=t,u=n.Data,nr(Tt(e=>nr(e),Mt(s,Xt(u)))));var s,u;const c=L$(Vt(i),n.LoadNext),l=c[2],a=0|c[0],$=c[1];let f;const d=cr(a-1,i);if(null==d)f=new O$(1);else{f=new O$(0,d)}const h=0|Vt(n.Data),p=null==n.LoadNext?new R$(0,h):new R$(1),m=1===f.tag?void 0:h>=1?(a-1)*t+1:void 0;let g;if(1===f.tag)g=void 0;else{const e=f.fields[0];g=h>=1?(a-1)*t+Vt(e):void 0}const w=1===a?void 0:l,_=a===Vt(i)?null!=n.LoadNext?$:void 0:a<Vt(i)?$:void 0;return ko("div",{className:"flex flex-col mt-4",children:Ji.Children.toArray([ko("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:Ji.Children.toArray([ko("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Ji.Children.toArray([ko("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Ji.Children.toArray([ko("table",{className:"min-w-full divide-y divide-gray-200",children:Ji.Children.toArray(Array.from(Sr(vr(()=>Ir(xr(function(e){let n;return ko("thead",{className:"bg-gray-50",children:(n=Dr(e=>_$(e),e),ko("tr",{children:Ji.Children.toArray(Array.from(n))}))})}(o)),vr(()=>{let e,n;return Ir(1===f.tag?xr(null):(e=f.fields[0],xr((n=Mr((e,n)=>function(e,n){return ko("tr",{className:(t=e,t%2==0?"bg-white":"bg-gray-50"),children:Ji.Children.toArray(Array.from(Dr(e=>b$(e),n)))});var t}(e,n),r(e)),ko("tbody",{children:Ji.Children.toArray(Array.from(n))})))),vr(()=>xr(U$(Vt(o),m,g,p,_,w))))}))))))})])})])})])})])})}function F$(e){let n;const t=function(e){return new d$(e)}(e),r=Xc(m$,(e,n)=>function(e,n,t){switch(n.tag){case 1:{const r=n.fields[0],o=n=>{const o=new Uu(t.SearchText,r,t.PageSize);ws(h$(e)(o)(n))};return[new p$(new eu(1),t.SearchText,r,t.PageSize),Ju(o)]}case 2:{const e=n.fields[0];return[new p$(e,t.SearchText,t.Sort,t.PageSize),Zu()]}case 3:{const e=n.fields[0];let r;const o=[t.Data,e];let i,s,u,c;if(2===o[0].tag)if(0===o[0].fields[0].tag){const e=o[1];1===e.tag?(i=1,c=e.fields[0]):(i=0,s=o[0].fields[0].fields[0],u=e.fields[0])}else{const e=o[1];1===e.tag?(i=1,c=e.fields[0]):i=2}else{const e=o[1];1===e.tag?(i=1,c=e.fields[0]):i=2}switch(i){case 0:r=new eu(2,new he(0,new fo(rr(s.Accounts,u.Accounts),u.Token)));break;case 1:r=new eu(2,new he(1,c));break;case 2:r=new eu(3,new Error("Failed to retrieve the account data"))}return[new p$(r,t.SearchText,t.Sort,t.PageSize),Zu()]}case 4:{const n=n=>{const r=new Uu(t.SearchText,t.Sort,t.PageSize);ws(h$(e)(r)(n))};return[new p$(new eu(1),t.SearchText,t.Sort,t.PageSize),Ju(n)]}default:{const e=n.fields[0];return[new p$(t.Data,(r=e,new Pu(0,r.trim())),t.Sort,t.PageSize),Zu()]}}var r}(t,e,n),[]),o=r[0],i=r[1],s=new Uu(o.SearchText,o.Sort,o.PageSize);os((n=[()=>function(e,n,t){const r=Da(e.props.partnerId);return Ua(e.props.backendUrl,e.props.accessToken,r,n,void 0)}(t,s),e=>{i(new f$(2,e))}],tu(n[0],n[1])));const u=n=>{const r=nr([P$(o,i),T$(o,i),C$("Contact"),C$("Website")]),u=new M$(n.Accounts,de(I(2,(e,n)=>{var r;ws((r=t,e=>n=>t=>Wr.Delay(()=>{const o=Da(r.props.partnerId);return Wr.Bind(Ua(r.props.backendUrl,r.props.accessToken,o,e,n),e=>(t(new f$(3,e)),Wr.Zero()))}))(s)(e)(i))}),n.Token));return ko(B$,{columnHeaders:r,renderRowCells:n=>ir(n=>D$(e.partnerId,n),n),pageSize:0|Ru(o.PageSize),data:u})},c=e=>{i(new f$(0,e))},l=e=>{i(new f$(4))},a=o.Data;let $,f,d,h;switch(0===a.tag||1===a.tag?$=2:3===a.tag?($=3,h=a.fields[0]):1===a.fields[0].tag?($=1,d=a.fields[0].fields[0]):($=0,f=a.fields[0].fields[0]),$){case 0:return(e=>{const n=nr([ko("div",{className:ot(" ",["grid","grid-cols-2","pt-2","sm:-mr-6","lg:mr-0"]),children:Ji.Children.toArray([ko("div",{className:ot(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0"]),children:Ji.Children.toArray([(r=Mu(o.SearchText),i=c,ko("div",{className:ot(" ",["flex-grow","max-w-md"]),children:Ji.Children.toArray([ko("label",{for:"search",children:"Search",className:ot(" ",["block","text-sm","font-medium","text-gray-700"])}),ko("div",{className:"mt-1",children:Ji.Children.toArray([ko("input",{id:"search",name:"search",type:"text",className:ot(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:"Account Id, Name or Legal Entity",value:r,onChange:e=>{i(e.target.value)}})])})])})),(t=l,ko("div",{className:"pt-6",children:Ji.Children.toArray([ko("div",{className:ot(" ",["flex","justify-end"]),children:Ji.Children.toArray([ko("button",{type:"search",children:"Search",className:ot(" ",["ml-3","inline-flex","justify-center","py-2","px-4","border","border-transparent","shadow-sm","text-sm","font-medium","rounded-md","text-white","bg-indigo-600","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500"]),onClick:t})])})])}))])})])}),u(e)]);var t,r,i;return ko("div",{children:Ji.Children.toArray(Array.from(n))})})(f);case 1:return ko(r$,{error:d});case 2:return ko(o$,null);case 3:return ko(r$,{error:N(h)})}}function j$(e,n){const t=nr([ko("br",{}),(r=e,ko("div",{className:ot(" ",["text-lg","leading-6","font-medium","text-gray-900"]),children:Ji.Children.toArray([ko("span",{children:[r]})])})),ko("div",{className:ot(" ",["px-6"]),children:Ji.Children.toArray(Array.from(n))})]);var r;return ko("div",{children:Ji.Children.toArray(Array.from(t))})}function G$(e){return Xa([j$("Partner Information",nr([Va("ID",Za(pt(e.StreamId))),Va("Name",Za(Jr(e.Name))),Va("Contact",Za(Kn(Xn("%P() %P()",[Yr(e.ContactDetails.FirstName),Kr(e.ContactDetails.LastName)])))),Va("Phone",Za(Qr(e.ContactDetails.MobilePhone))),Va("Website",Za(Xr(e.Website))),Va("Notes",Ja(fe(ro(e.Notes),"")))]))])}class H$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration"]}}class W$ extends U{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}class z$ extends U{constructor(e,n,t){super(),this.PartnerId=e,this.BackendUrl=n,this.AccessToken=t}}function q$(e){let n,t,r,o;return Fa(1===e.tag?(n=e.fields[0],nr([Ba("Details",wu(Wu(new ju(1,n.partnerId)),1)),Ba("Accounts",void 0),Ba("Super Configuration",wu(Wu(new ju(3,n.partnerId)),1)),Ba("Benefits Onboarding Configuration",wu(Wu(new ju(4,n.partnerId)),1))])):2===e.tag?(t=e.fields[0].PartnerId,nr([Ba("Details",wu(Wu(new ju(1,t)),1)),Ba("Accounts",wu(Wu(new ju(2,t)),1)),Ba("Super Configuration",void 0),Ba("Benefits Onboarding Configuration",wu(Wu(new ju(4,t)),1))])):3===e.tag?(r=e.fields[0].PartnerId,nr([Ba("Details",wu(Wu(new ju(1,r)),1)),Ba("Accounts",wu(Wu(new ju(2,r)),1)),Ba("Super Configuration",wu(Wu(new ju(3,r)),1)),Ba("Benefits Onboarding Configuration",void 0)])):(o=e.fields[0],nr([Ba("Details",void 0),Ba("Accounts",wu(Wu(new ju(2,new xt(0,pt(o.StreamId)))),1)),Ba("Super Configuration",wu(Wu(new ju(3,new xt(0,pt(o.StreamId)))),1)),Ba("Benefits Onboarding Configuration",wu(Wu(new ju(4,new xt(0,pt(o.StreamId)))),1))])))}function V$(e){switch(e.tag){case 1:{const n=e.fields[0];return ko(F$,{accessToken:n.accessToken,backendUrl:n.backendUrl,partnerId:n.partnerId})}case 2:return ko(Ga,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return ko(Wa,{partnerId:e.fields[0].PartnerId,accountId:void 0,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});default:return ko(G$,e.fields[0])}}function Z$(e){const n=e.mode;return ko("div",{children:Ji.Children.toArray([q$(n),V$(n)])})}function J$(e){const n=e.partnerList;return S$(nr([C$("ID"),C$("Name"),C$("Contact"),C$("Phone"),C$("Website")]),ir(e=>{let n;const t=pt(e.StreamId),r=new xt(0,t);return nr([(n=[wu(Wu(new ju(1,r)),1),t],o=n[0],i=n[1],v$(ko("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:Ji.Children.toArray([ko("a",{className:"text-indigo-600 hover:text-indigo-900",children:i,href:o})])}))),x$(["text-gray-500"],Jr(e.Name)),x$(["text-gray-500"],Kn(Xn("%P() %P()",[Yr(e.ContactDetails.FirstName),Kr(e.ContactDetails.LastName)]))),x$(["text-gray-500"],Qr(e.ContactDetails.MobilePhone)),x$(["text-gray-500"],Xr(e.Website))]);var o,i},n))}var X$=Si((function(e,n){return ko("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:n},e),ko("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));class Y$ extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BreadCrumb"]}}function K$(e){return ko("nav",{className:"pt-2","aria-label":"Breadcrumb",children:Ji.Children.toArray([ko("ol",{className:"-ml-3 max-w-screen-xl w-full flex space-x-4",children:Ji.Children.toArray(Array.from(or((e,n)=>{const t=n.fields[0][1];return function(e,n,t,r){return ko("li",{key:e,className:"flex",children:Ji.Children.toArray([ko("div",{className:"flex items-center",children:Ji.Children.toArray(Array.from(Sr(vr(()=>Ir(t?Cr():xr(ko(X$,{className:"flex-shrink-0 h-5 w-5 text-gray-400"})),vr(()=>xr(ko("a",E(Sr(vr(()=>Ir(xr(["children",e]),vr(()=>Ir(null!=n?xr(["href",wu(ae(n),1)]):Cr(),vr(()=>xr(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))))))})])})}(n.fields[0][0],t,0===e)},e)))})])})}function Q$(e){let n,t,r,o,i,s,u,c,l,a;const $=e.page,f=()=>new Y$(0,["Partners",Wu(new ju(0))]),d=e=>new Y$(0,[oo(e),Wu(new ju(1,e))]),h=e=>new Y$(0,["Super Configuration",Wu(new ju(3,e))]),p=e=>new Y$(0,["Accounts",Wu(new ju(2,e))]),m=e=>new Y$(0,[io(e),void 0]),g=e=>{let n;const t=e[0],r=e[1];return new Y$(0,["Super Configuration",Wu((n=[t,r],new ju(6,n[0],n[1])))])};return K$(8===$.tag?zt(f()):1===$.tag?(n=$.fields[0],nr([f(),d(n)])):2===$.tag?(t=$.fields[0],nr([f(),d(t),p(t)])):3===$.tag?(r=$.fields[0],nr([f(),d(r),h(r)])):4===$.tag?(o=$.fields[0],nr([f(),d(o),h(o)])):5===$.tag?(i=$.fields[0],s=$.fields[1],nr([f(),d(i),p(i),m(s)])):6===$.tag?(u=$.fields[0],c=$.fields[1],nr([f(),d(u),p(u),m(c),g([u,c])])):7===$.tag?(l=$.fields[0],a=$.fields[1],nr([f(),d(l),p(l),m(a),g([l,a])])):zt(f()))}function ef(){return(ef=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function nf(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return Xo(n,t)}function tf(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ko(nf,ef({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,s=n.attributes,u=n.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[rf(s[i].name)]=s[i].value);for(i=u.length;i--;){var c=e(u[i],null),l=u[i].slot;l?o[l]=ko(uf,{name:l},c):r[i]=c}var a=t?ko(uf,null,r):r;return ko(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Jo:Zo)(this._vdom,this._root)}function rf(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function of(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[rf(e)]=t,this._vdom=Xo(this._vdom,r),Zo(this._vdom,this._root)}}function sf(){Zo(this._vdom=null,this._root)}function uf(e,n){var t=this;return ko("slot",ef({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}class cf extends U{constructor(e,n){super(),this.Data=e,this.CurrentPage=n}}function lf(){return z("AccountRegistry.AdminUI.App.State",[],cf,()=>[["Data",nu(q("Microsoft.FSharp.Core.FSharpResult`2",[Vu(),X],he,()=>[[["ResultValue",Vu()]],[["ErrorValue",X]]]))],["CurrentPage",Gu()]])}class af extends T{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PageChanged","LoadData"]}}function $f(){return q("AccountRegistry.AdminUI.App.Msg",[],af,()=>[[["Item",Gu()]],[["Item",nu(q("Microsoft.FSharp.Core.FSharpResult`2",[Vu(),X],he,()=>[[["ResultValue",Vu()]],[["ErrorValue",X]]]))]]])}function ff(){const e=Hu(yu(window.location.hash,1)),n=8===e.tag?zu(new ju(0)):Zu();return[new cf(new eu(0),e),n]}function df(e,n){if(0===e.tag){const t=e.fields[0];return 8===t.tag?[n,zu(t)]:[new cf(n.Data,t),Zu()]}{const t=e.fields[0];return[new cf(t,n.CurrentPage),Zu()]}}function hf(e){const n=Xc(ff,(e,n)=>df(e,n),[]),t=n[0],r=n[1];os(tu(()=>{return n=e.backendUrl,t=e.accessToken,Kc(0,()=>Wr.Bind(Ra(n,t),e=>Wr.Return(pe(e=>new qu(e),e))));var n,t},e=>{r(new af(1,e))}));const o=n=>{const t=n[0],r=n[1];return n=>ko($$,{props:{accessToken:e.accessToken,accountDetails:[t,r],backendUrl:e.backendUrl},mode:n})};let i;const s=t.Data;let u,c,l,a;switch(1===s.tag?u=0:2===s.tag?1===s.fields[0].tag?(u=2,l=s.fields[0].fields[0]):(u=1,c=s.fields[0].fields[0]):3===s.tag?(u=3,a=s.fields[0]):u=0,u){case 0:i=ko(o$,null);break;case 1:{const n=e=>{return n=c.Partners,t=oo(e),ur(e=>pt(e.StreamId)===t,n);var n,t},r=t.CurrentPage;switch(r.tag){case 1:{const e=n(r.fields[0]);if(null==e)i=ko(r$,{error:"Unknown Partner"});else{i=ko(Z$,{mode:new H$(0,e)})}break}case 2:{const n=r.fields[0];$=n,i=ko(Z$,{mode:new H$(1,{accessToken:e.accessToken,backendUrl:e.backendUrl,partnerId:$})});break}case 3:{const n=r.fields[0];i=ko(Z$,{mode:new H$(2,new W$(n,e.backendUrl,e.accessToken))});break}case 4:{const n=r.fields[0];i=ko(Z$,{mode:new H$(3,new z$(n,e.backendUrl,e.accessToken))});break}case 5:i=o([r.fields[0],r.fields[1]])(new c$(0));break;case 6:i=o([r.fields[0],r.fields[1]])(new c$(1));break;case 7:i=o([r.fields[0],r.fields[1]])(new c$(2));break;default:i=ko(J$,{partnerList:c.Partners})}break}case 2:i=ko(r$,{error:l});break;case 3:i=ko(r$,{error:N(a)});break}var $;return vu({onUrlChanged:e=>{r(new af(0,Hu(e)))},application:ko(Ao,{},ko(Q$,{page:t.CurrentPage}),i)})}(function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=r&&r.shadow?n.attachShadow({mode:"open"}):n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=tf,o.prototype.attributeChangedCallback=of,o.prototype.disconnectedCallback=sf,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)})(e=>ko(hf,e),"superhero-account-registry")}]);
|