@flarehr/superhero-account-registry 2.37.54 → 2.39.56
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,16 +1,16 @@
|
|
|
1
|
-
(function(){"use strict";function
|
|
2
|
-
`)+" }":(r==null?void 0:r.name)??""}}return String(e)}function
|
|
3
|
-
`)+" }"}function Th(e){const t=Object.values(e).map(n=>_n(n));return oo(t)}function Nh(e,t){if(e===t)return!0;if(Uo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Xe(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function Mh(e,t){if(e===t)return 0;if(Uo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=Ht(e[n[r]],t[n[r]]);if(o!==0)return o}return 0}else return-1}class he{toJSON(){return Eh(this)}toString(){return Ih(this)}GetHashCode(){return Th(this)}Equals(t){return Nh(this,t)}CompareTo(t){return Mh(this,t)}}class yt{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class Rh{constructor(t){this.message=t}}function Ph(e){return e instanceof Rh||e instanceof Error}function Oh(e){return e instanceof Promise}function jo(e){return Ph(e)||Oh(e)?e:new Error(String(e))}const Sr=Symbol("numeric");function rl(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Sr])}function Dh(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function ei(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Sr]().multiply(t)}function Ho(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Sr]().toFixed(t)}function Wo(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Sr]().toPrecision(t)}function Go(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Sr]().toExponential(t)}function qo(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Sr]().toHex()}class Fh{constructor(t,n,r,o){this.declaringType=t,this.tag=n,this.name=r,this.fields=o}}class qt{constructor(t,n,r,o,s,i,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=o,this.fields=s,this.cases=i,this.enumCases=a}toString(){return Fe(this)}GetHashCode(){return ol(this)}Equals(t){return ti(this,t)}}function Tt(e){return e.generics!=null?e.generics:[]}function ol(e){const t=Cr(e.fullname),n=Tt(e).map(ol);return oo([t,...n])}function ti(e,t){return e.fullname===""?t.fullname===""&&Ys(ao(e),ao(t),([n,r],[o,s])=>n===o&&ti(r,s)):e.fullname===t.fullname&&Ys(Tt(e),Tt(t),ti)}function bt(e,t,n,r){return new qt(e,t,n,void 0,r)}function sl(e,t,n,r){const o=new qt(e,t,n,void 0,void 0,()=>{const s=n.prototype.cases();return r().map((i,a)=>new Fh(o,a,s[a],i))});return o}function Pe(e){return new qt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function ni(e){return new qt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function il(e){return new qt("[]",[e])}const Vh=new qt("System.Object"),K=new qt("System.String");function kr(e){if(Array.isArray(e))return e[0];if(e instanceof qt){const t=io(e);if(t!=null)return kr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Fe(e){const t=io(e);return t!=null?Fe(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Fe(n)).join(",")+"]"}function al(e){return io(e)!=null}function io(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function ll(e){return e.generics!=null&&e.generics.length>0}function ri(e){return e.enumCases!=null&&e.enumCases.length>0}function cl(e){return e.generics==null?e:new qt(e.fullname,e.generics.map(()=>Vh))}function ul(e){var t;return(t=e.generics)==null?void 0:t[0]}function Ar(e){if(ri(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Lh(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function Er(e,t){const n=parseInt(t,10);return Lh(e,isNaN(n)?t:n)[1]}function dl(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ao(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function fl(e){if(oi(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function hl(e){return e instanceof qt?e.cases!=null:e instanceof W}function pl(e){return e instanceof qt?e.fields!=null:e instanceof he}function oi(e){return e.fullname.startsWith("System.Tuple")}function Bh(e,t){const r=dl(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function $l(e){return e.fields==null?[]:e.fields}function Uh(e,t){return e[t[0]]}function kv(e){return e}function zh(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function jh(e,t){const n=ao(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[o,s],i)=>(r[o]=t[i],r),{})}function Hh(e,t){return e}const Wh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Gh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Nt(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function ml(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Zh(e,t){let n=t;const r=e[t];let o="",s=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){s=!0;break}else if(i==="\\")if(t<e.length)t++,o+=e[t];else throw new Error("Invalid string format");else o+=i}if(!s)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function si(e,t,n){let r=0,o=0,s="";const i=n?lo(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(o=Nt(t,r,"d"),r+=o,o){case 1:s+=_l(i);break;case 2:s+=Ae(_l(i),2);break;case 3:s+=Wh[vl(i)];break;case 4:s+=Gh[vl(i)];break}break;case"f":if(o=Nt(t,r,"f"),r+=o,o<=3){const g=10**(3-o);s+=Ae(Math.floor(Yo(i)/g),o)}else o<=7&&(s+=(""+Yo(i)).padEnd(o,"0"));break;case"F":if(o=Nt(t,r,"F"),r+=o,o<=3){const g=10**(3-o),v=Math.floor(Yo(i)/g);v!=0&&(s+=Ae(v,o))}else if(o<=7){const g=Yo(i);g!=0&&(s+=Ae(g,3))}break;case"g":o=Nt(t,r,"g"),r+=o,o<=2&&(s+="A.D.");break;case"h":switch(o=Nt(t,r,"h"),r+=o,o){case 1:s+=Jo(i)%12;break;case 2:s+=Ae(Jo(i)%12,2);break}break;case"H":switch(o=Nt(t,r,"H"),r+=o,o){case 1:s+=Jo(i);break;case 2:s+=Ae(Jo(i),2);break}break;case"K":switch(o=Nt(t,r,"K"),r+=o,o){case 1:switch(gl(i)){case 1:s+="Z";break;case 2:s+=Ir(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(o=Nt(t,r,"m"),r+=o,o){case 1:s+=yl(i);break;case 2:s+=Ae(yl(i),2);break}break;case"M":switch(o=Nt(t,r,"M"),r+=o,o){case 1:s+=Xo(i);break;case 2:s+=Ae(Xo(i),2);break;case 3:s+=qh[Xo(i)-1];break;case 4:s+=Kh[Xo(i)-1];break}break;case"s":switch(o=Nt(t,r,"s"),r+=o,o){case 1:s+=bl(i);break;case 2:s+=Ae(bl(i),2);break}break;case"t":switch(o=Nt(t,r,"t"),r+=o,o){case 1:s+=i.getHours()<12?"A":"P";break;case 2:s+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(o=Nt(t,r,"y"),r+=o,o){case 1:s+=i.getFullYear()%100;break;case 2:s+=Ae(i.getFullYear()%100,2);break;case 3:s+=Ae(i.getFullYear(),3);break;case 4:s+=Ae(i.getFullYear(),4);break;case 5:s+=Ae(i.getFullYear(),5);break}break;case"z":o=Nt(t,r,"z"),r+=o;let l="";switch(gl(i)){case 1:l="+00:00";break;case 2:l=Ir(i.getTimezoneOffset()*-6e4);break;case 0:l=Ir(op(i).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(o){case 1:s+=`${c}${d}`;break;case 2:s+=`${c}${Ae(d,2)}`;break;default:s+=`${c}${Ae(d,2)}:${Ae(u,2)}`;break}break;case":":s+=":",r++;break;case"/":s+="/",r++;break;case"'":case'"':const[h,f]=Zh(t,r);s+=h,r+=f;break;case"%":const p=ml(t,r);if(p>=0&&p!==37)r+=2,s+=si(i,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const _=ml(t,r);if(_>=0)r+=2,s+=String.fromCharCode(_);else throw new Error("Invalid format string");break;default:r++,s+=a;break}}return s}function gl(e){return e.kind||0}function Ir(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+Ae(n,2)+":"+Ae(r,2)}function Ko(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Jh(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return Ae(e.getFullYear(),4)+"-"+Ae(e.getMonth()+1,2)+"-"+Ae(e.getDate(),2)+"T"+Ae(e.getHours(),2)+":"+Ae(e.getMinutes(),2)+":"+Ae(e.getSeconds(),2)+"."+Ae(e.getMilliseconds(),3)+(n?Ir(e.getTimezoneOffset()*-6e4):"")}}function Yh(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Ir(t)}function Xh(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Ir(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ko(n,"first");case"T":case"t":return Ko(n,"second");case"O":case"o":return Yh(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return si(n,t,!0)}function Qh(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?Ko(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ko(e,"second"):e.toLocaleTimeString();case"O":case"o":return Jh(e,n);default:throw new Error("Unrecognized Date print format")}else return si(e,t,n)}function Zo(e,t,n){return e.offset!=null?Xh(e,t):Qh(e,t)}function lo(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function ep(){return lo(-621355968e5,1)}function wl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(o!=null){let s,i=0;if(o[2]!=null){const a=o[2].split(":"),l=parseInt(a[0],10);i=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),o[3]!=null&&o[3].toUpperCase()==="PM"&&l<12&&(i+=720)}if(o[4]!=null){if(o[1]!=null)s=new Date(o[1]+" UTC");else{const a=new Date;s=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(o[4]==="Z")r="Z";else{let a=parseInt(o[5],10)*60+parseInt(o[6]||"0",10);o[4][0]==="-"&&(a*=-1),r=a,i-=a*60}}else if(o[1]!=null)s=new Date(o[1]);else{const a=new Date;s=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(s.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-s.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function tp(e,t=!1){const[n,r]=wl(e),o=r!=null?t&&r==="Z"?1:2:0;return lo(n.getTime(),o)}function np(e,t){try{return t.contents=tp(e),!0}catch{return!1}}function rp(e){return e.kind===1?e:lo(e.getTime(),1)}function op(e){return e.kind===2?e:lo(e.getTime(),2)}function _l(e){return e.kind===1?e.getUTCDate():e.getDate()}function Jo(e){return e.kind===1?e.getUTCHours():e.getHours()}function Yo(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function yl(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Xo(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function bl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function vl(e){return e.kind===1?e.getUTCDay():e.getDay()}function xl(e,t=0){if(t&-284)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function ii(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function sp(e,t,n=0){return e.lastIndex=n,e.exec(t)}function Cl(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,s=-1;for(;(o=e.exec(t))!=null;)o.index===s?e.lastIndex++:(s=o.index,r.push(o));return r}function ip(e,t,n,r,o=0){function s(){let i=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),i=n(a)}return i}if(typeof e=="string"){const i=e;e=xl(t,r??0),t=i,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,o)+t.substring(o).replace(e,s);if(n=n.replace(/\$0/g,i=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let i;const a=t.substring(o),l=Cl(e,a),c=Cl.length>r?(i=l[r-1],a.substring(0,i.index+i[0].length)):a;return t.substring(0,o)+c.replace(e,n)+t.substring(o+c.length)}else return t.replace(e,n)}const co=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,uo=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,ap=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Sl(e,t){return Dh(e,t)<0}function Kt(e){return{input:e,cont:lp(e)}}function kl(e,t){let n=0,r=0,o="";uo.lastIndex=0;let s=uo.exec(e);for(;s;){const i=s.index+(s[1]||"").length;o+=e.substring(r,i).replace(/%%/g,"%");const[,,a,l,c,d]=s;r=uo.lastIndex,o+=Il(t[n++],a,l,c,d),uo.lastIndex=r-1,s=uo.exec(e)}return o+=e.substring(r).replace(/%%/g,"%"),o}function ai(e,t){return typeof t=="string"?e(t):t.cont(e)}function Al(e){return ai(t=>console.log(t),e)}function cn(e){return ai(t=>t,e)}function El(e){return ai(t=>{throw new Error(t)},e)}function Il(e,t,n,r,o){let s="";if(t=t||"",o=o||"",rl(e))switch(o.toLowerCase()!=="x"&&(Sl(e,0)?(e=ei(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),r=r==null?null:parseInt(r,10),o){case"f":case"F":r=r??6,e=Ho(e,r);break;case"g":case"G":e=r!=null?Wo(e,r):Wo(e);break;case"e":case"E":e=r!=null?Go(e,r):Go(e);break;case"x":e=qo(e);break;case"X":e=qo(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Zo(e):e=_t(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=s+e;else{const i=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!i?" ":"0";l==="0"?(e=fo(e,n-s.length,l,a),e=s+e):e=fo(s+e,n,l,a)}return e}function Tl(e,t,n,r="",o=-1){return(...s)=>{let i=r;const a=t.slice(),l=n.slice();for(const c of s){const[,,d,u,h,f]=l[0];let p=u;if(o>=0)p=o,o=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");o=c;continue}i+=a[0],i+=Il(c,d,p,h,f),a.splice(0,1),l.splice(0,1)}return l.length===0?(i+=a[0],e(i)):Tl(e,a,l,i,o)}}function lp(e){return t=>{co.lastIndex=0;const n=[],r=[];let o=0,s=co.exec(e);for(;s;){const i=s.index+(s[1]||"").length;n.push(e.substring(o,i).replace(/%%/g,"%")),r.push(s),o=co.lastIndex,co.lastIndex-=1,s=co.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(o).replace(/%%/g,"%")),Tl(t,n,r))}}function Nl(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(ap,(r,o,s,i,a,l)=>{if(o<0||o>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[o];if(rl(c))switch(a=a==null?null:parseInt(a,10),i){case"f":case"F":a=a??2,c=Ho(c,a);break;case"g":case"G":c=a!=null?Wo(c,a):Wo(c);break;case"e":case"E":c=a!=null?Go(c,a):Go(c);break;case"p":case"P":a=a??2,c=Ho(ei(c,100),a)+" %";break;case"d":case"D":c=a!=null?li(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?li(qo(c),a,"0"):qo(c),i==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,h,f)=>{Sl(c,0)&&(c=ei(c,-1),d="-"),f=f==null?"":f.substring(1),c=Ho(c,Math.max(f.length,0));let[p,_]=c.split(".");_||(_="");const g=h.replace(/,/g,"").replace(/^#+/,"").length;p=li(p,g,"0");const v=f.replace(/#+$/,"").length;if(v>_.length?_=up(_,v,"0"):v<_.length&&(_=_.substring(0,v)+_.substring(v).replace(/0+$/,"")),h.indexOf(",")>0){const b=p.length%3,S=Math.floor(p.length/3);let D=b>0?p.substr(0,b)+(S>0?",":""):"";for(let L=0;L<S;L++)D+=p.substr(b+L*3,3)+(L<S-1?",":"");p=D}return _.length>0?p+"."+_:p}),c=d+c}}else c instanceof Date?c=Zo(c,l||i):c=_t(c);return s=parseInt((s||" ").substring(1),10),isNaN(s)||(c=fo(String(c),Math.abs(s)," ",s<0)),c})}function cp(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Qo(e){return typeof e!="string"||e.length===0}function Ml(e){return typeof e!="string"||/^\s*$/.test(e)}function pe(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function fo(e,t,n,r){n=n||" ",t=t-e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function li(e,t,n){return fo(e,t,n)}function up(e,t,n){return fo(e,t,n,!0)}function ci(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const o=(r&1)===1,s=(r&2)===2;t=t||[],t=t.filter(d=>d).map(ii),t=t.length>0?t:["\\s"];const i=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=s?e.substring(c).trim():e.substring(c);(!o||u.length>0)&&i.push(u),l=!1}else{const u=s?e.substring(c,d.index).trim():e.substring(c,d.index);(!o||u.length>0)&&(n!=null&&i.length+1===n?(i.push(s?e.substring(c).trim():e.substring(c)),l=!1):i.push(u)),c=a.lastIndex}}while(l);return i}function dp(e,...t){if(t.length===0)return e.trim();const n="["+ii(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function fp(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+ii(t.join(""))+"]+$"),"")}function Rl(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class tr{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return _n(this.value)}Equals(t){return t==null?!1:Xe(this.value,t instanceof tr?t.value:t)}CompareTo(t){return t==null?1:Ht(this.value,t instanceof tr?t.value:t)}}function O(e){if(e==null)throw new Error("Option has no value");return e instanceof tr?e.value:e}function ui(e){return e instanceof tr?e.value:e}function ut(e){return e==null||e instanceof tr?new tr(e):e}function di(e){return e==null?[]:[O(e)]}function ot(e,t){return e!=null?O(e):t}function Pl(e,t){return e!=null?O(e):t()}function Mt(e,t){return t!=null?ut(e(O(t))):void 0}const Ol="Collection was empty.";function fi(e,t){return typeof e=="function"?new e(t):new Array(t)}function Dl(e,t){return e>t?e:t}function es(e,t,n,r){const o=t|0;return e.fill(r,o,o+n)}function Ln(e,t,n){const r=t.length|0,o=fi(n,r);for(let s=0;s<=r-1;s++)Rt(o,s,e(ge(s,t)));return o}function hp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=fi(r,t.length);for(let s=0;s<=t.length-1;s++)Rt(o,s,e(ge(s,t),ge(s,n)));return o}function pp(e,t){const n=fi(t,1);return Rt(n,0,e),n}function $p(e){return e.slice().reverse()}function mp(e,t){return t.find(e)}function gp(e,t,n){const r=[];for(let o=0;o<=t.length-1;o++){const s=e(ge(o,t));if(s!=null){const i=O(s);r.push(i)}}return Xe(n,xe())?r:Ln(o=>o,r,n)}function ts(e,t,n){const r=e;return n.reduce(r,t)}function wp(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let o;const s=r*e|0;o=t.slice(s,s+e),n.push(o)}return n}}function hi(e,t,n){return t==null}function ge(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Rt(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function Fl(e,t,n){return t.reduceRight((r,o)=>e(o,r),n)}function _p(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,ge(r,e));return n}class vt extends he{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+pe("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c);if(Xe(i.head,a.head)){o=d,s=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,o,s)=>{e:for(;;){const i=r,a=o,l=s,c=l.tail;if(c!=null){const d=O(c);if(i>18)return a|0;r=i+1,o=(a<<1)+_n(l.head)+631*i,s=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=O(l),u=O(c),h=Ht(i.head,a.head)|0;if(h===0){o=d,s=u;continue e}else return h|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return bp(this)}[Symbol.iterator](){return ro(Ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Ve(this)}}class yp{constructor(t){this.xs=t,this.it=this.xs,this.current=xe()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=O(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=xe()}Dispose(){}}function bp(e){return new yp(e)}function Je(){return new vt(xe(),void 0)}function ho(e,t){return new vt(e,t)}function yn(e){return e.tail==null}function Vl(e){return((n,r)=>{e:for(;;){const o=n,i=r.tail;if(i!=null){n=o+1,r=O(i);continue e}else return o|0}})(0,e)|0}function Bn(e){if(e.tail!=null)return e.head;throw new Error(Ol+"\\nParameter name: list")}function dt(e){const t=e.tail;if(t!=null)return O(t);throw new Error(Ol+"\\nParameter name: list")}function qe(){return Je()}function Pt(e,t){return ho(e,t)}function ie(e){return ho(e,Je())}function X(e){return yn(e)}function Tr(e){return Vl(e)}function B(e){return Bn(e)}function y(e){return dt(e)}function nr(e){const t=Vl(e)|0,n=es(new Array(t),0,t,null);return((o,s)=>{e:for(;;){const i=o,a=s;if(!yn(a)){Rt(n,i,Bn(a)),o=i+1,s=dt(a);continue e}break}})(0,e),n}function bn(e,t,n){let r=t,o=n;for(;!yn(o);)r=e(r,B(o)),o=dt(o);return r}function ns(e){return bn((t,n)=>ho(n,t),Je(),e)}function vp(e,t,n){return Fl(e,nr(t),n)}function xp(e,t,n){return((o,s,i)=>{e:for(;;){const a=o,l=s,c=i;if(yn(c))return l;o=a+1,s=e(a,l,Bn(c)),i=dt(c);continue e}})(0,t,n)}function rs(e,t){bn((n,r)=>{e(r)},void 0,t)}function Ue(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=ho(ge(r,e),n);return n}function C(e){return Ue(e,Je())}function Cp(e){let t,n;if(ln(e))return C(e);if(e instanceof vt)return e;{const r=Je();let o=r;const s=Ve(e);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"]();o=(t=o,n=new vt(l,void 0),t.tail=n,n)}}finally{Ee(s)}const i=o,a=Je();return i.tail=a,dt(r)}}function ft(e,t){return bn((n,r)=>ho(r,n),t,ns(e))}function Sp(e,t){let n,r;const o=Je();let s=o,i=t;for(;!yn(i);){let c=e(Bn(i));for(;!yn(c);)s=(n=s,r=new vt(Bn(c),void 0),n.tail=r,r),c=dt(c);i=dt(i)}const a=s,l=Je();return a.tail=l,dt(o)}function kp(e,t){const n=Je(),r=xp((s,i,a)=>{const l=new vt(e(s,a),void 0);return i.tail=l,l},n,t),o=Je();return r.tail=o,dt(n)}function po(e,t){const n=Je(),r=bn((s,i)=>{const a=new vt(e(i),void 0);return s.tail=a,a},n,t),o=Je();return r.tail=o,dt(n)}function Ap(e,t){return(r=>{e:for(;;){const o=r;if(yn(o))return;{const s=e(Bn(o));if(s==null){r=dt(o);continue e}else return s}}})(t)}function Ep(e,t){return Ap(n=>e(n)?ut(n):void 0,t)}function Ip(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(yn(i))return;if(e(Bn(i)))return s;r=s+1,o=dt(i);continue e}})(0,t)}function Tp(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(yn(i))return;if(s===e)return ut(Bn(i));r=s+1,o=dt(i);continue e}})(0,t)}function Ll(e,t){const n=Je(),r=bn((s,i)=>{if(e(i)){const a=new vt(i,void 0);return s.tail=a,a}else return s},n,t),o=Je();return r.tail=o,dt(n)}function Np(e,t){const n=Je(),r=Je(),o=n,s=bn((l,c)=>{let d,u;const h=l[0],f=l[1];return e(c)?[(d=new vt(c,void 0),h.tail=d,d),f]:[h,(u=new vt(c,void 0),f.tail=u,u)]},[o,r],t),i=Je();s[0].tail=i;const a=Je();return s[1].tail=a,[dt(o),dt(r)]}function Bl(e,t){const n=Je(),r=bn((s,i)=>{const a=e(i);if(a==null)return s;{const l=new vt(O(a),void 0);return s.tail=l,l}},n,t),o=Je();return r.tail=o,dt(n)}function Ul(e,t,n){return Ip(r=>n.Equals(e,r),t)!=null}function Mp(e,t){const n=nr(t);return n.sort(e),C(n)}function Rp(e,t,n){return Mp((r,o)=>n.Compare(e(r),e(o)),t)}function Pp(e,t){return C(Ln(C,wp(e,nr(t))))}function Op(e){return new w(0,[e])}function zl(e){return new w(1,[e])}class w extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function vn(e,t){return t.tag===0?Op(e(t.fields[0])):zl(t.fields[0])}function Dp(e,t){return t.tag===0?e(t.fields[0]):zl(t.fields[0])}function Ot(e){return e.tag===0}class Fp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function jl(e){return new Fp(e)}function pi(e){return e.fields[0]}class Vp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Lp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class Bp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class Up extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class zp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let jp=class extends he{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}};class Hp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class Wp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function un(e){return e.fields[0]}function We(e){return new Wp(e)}function $i(e){return un(e)}class Gp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function Zt(e){return e.fields[0]}function Jt(e){return new Gp(e)}function Hl(e){return Zt(e)}class qp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class Kp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class Zp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class Jp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class Yp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class Xp extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let Qp=class extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class e$ extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}function t$(e){throw new Error(e)}const n$="Enumeration already finished.",r$="Enumeration has not started. Call MoveNext.",Wl="The input sequence has an insufficient number of elements.",o$="Reset is not supported on this enumerator.";function s$(){throw new Error(o$)}function mi(){throw new Error(r$)}function gi(){throw new Error(n$)}class i${constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const o=Ve(t);try{for(;n<4&&o["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+_t(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{Ee(o)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return ro(Ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function a$(e){return new i$(e)}class l${constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){s$()}Dispose(){this.dispose()}}function os(e,t,n){return new l$(e,t,n)}function c$(e){let t,n,r=!1,o=!1,s;const i=()=>{if(o=!0,n!=null){const a=O(n);try{Ee(a)}finally{n=void 0}}if(t!=null){const a=O(t);try{Ee(a)}finally{t=void 0}}};return os(()=>(r?o&&gi():mi(),s!=null?O(s):gi()),()=>{let a;if(r||(r=!0),o)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=O(d);if(u["System.Collections.IEnumerator.MoveNext"]())s=ut(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{Ee(u)}finally{n=void 0}}else{const u=O(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),Ve(a)):(i(),l=!1)}else t=Ve(e)}return O(l)}},()=>{o||i()})}function u$(e,t){return os(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{Ee(t)}finally{}})}function Gl(e,t,n){let r=!1,o,s=ut(e());const i=()=>{if(s!=null){const l=O(s);try{n(l)}finally{s=void 0}}},a=()=>{try{i()}finally{o=void 0}};return os(()=>(r||mi(),o!=null?O(o):gi()),()=>{if(r||(r=!0),s!=null){const l=O(s);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(o=c,!0):(a(),!1)}else return!1},i)}function d$(e,t){let n,r=t;return os(()=>{if(n!=null){const o=O(n)[0];return O(n)[1],o}else return mi()},()=>(n=e(r),n!=null?(O(n)[0],r=O(n)[1],!0):!1),()=>{})}function f$(e,t){t==null&&t$(e)}function Nr(e){return a$(e)}function xn(e){return f$("source",e),Ve(e)}function R(e){return Nr(()=>Ve(e()))}function wi(e){return Nr(()=>c$(e))}function h$(e,t){return Nr(()=>d$(e,t))}function Dt(){return R(()=>new Array(0))}function P(e){return R(()=>pp(e))}function Av(e){return e}function _i(e){return e instanceof vt?nr(e):Array.from(e)}function Le(e){return ln(e)?C(e):e instanceof vt?e:Cp(e)}function ql(e,t,n){return Nr(()=>Gl(e,t,n))}function Kl(e,t,n){return Nr(()=>{let r=-1;return Gl(e,o=>(r=r+1|0,t(r,o)),n)})}function G(e,t){return wi([e,t])}function rr(e,t){return ql(()=>xn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{Ee(n)})}function p$(e,t,n){const r=xn(t);try{const o=xn(n);try{let s=0,i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]();for(;s===0&&i&&a;)s=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),o["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,s===0&&(i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]());return(s!==0?s:i?1:a?-1:0)|0}finally{Ee(o)}}finally{Ee(r)}}function Mr(e,t,n){const r=xn(t);try{let o=!1;for(;!o&&r["System.Collections.IEnumerator.MoveNext"]();)o=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{Ee(r)}}function $o(e,t,n){const r=xn(n);try{let o=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)o=e(o,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{Ee(r)}}function Rr(e,t){$o((n,r)=>{e(r)},void 0,t)}function $$(e,t){$o((n,r)=>(e(n,r),n+1|0),0,t)}function ze(e,t){return ql(()=>xn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?ut(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{Ee(n)})}function yi(e,t){return Kl(()=>xn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?ut(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{Ee(n)})}function m$(e){return R(()=>$p(_i(e)))}function g$(e,t){return Nr(()=>{const n=xn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Wl+"\\nParameter name: source");return u$(()=>{},n)}catch(r){throw Ee(n),r}})}function w$(e,t){return Kl(()=>xn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return ut(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Wl+"\\nParameter name: source")}else return},n=>{Ee(n)})}function _$(e,t){return R(()=>wi(ze(e,t)))}const or={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function bi(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function y$(e,t){switch(t){case or.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case or.SnakeCase:return bi(e,"_");case or.SnakeCaseAllCaps:return bi(e,"_").toUpperCase();case or.KebabCase:return bi(e,"-");case or.None:default:return e}}function Un(e,t=or.None){const n={},r=t;function o(i){throw new Error("Cannot infer key and value of "+String(i))}function s(i,a,l){i=y$(i,a),n[i]=l}for(let i of e){let a=or.None;if(i==null&&o(i),i instanceof W){const l=i.cases()[i.tag];i=i.fields.length===0?l:[l].concat(i.fields),a=r}if(Array.isArray(i))switch(i.length){case 0:o(i);break;case 1:s(i[0],a,!0);break;case 2:const l=i[1];s(i[0],a,l);break;default:s(i[0],a,i.slice(1))}else typeof i=="string"?s(i,a,!0):o(i)}return n}function Zl(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function mo(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class b${constructor(t,n){const r=new yt(xe());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const o=Ve(t);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const s=o["System.Collections.Generic.IEnumerator`1.get_Current"]();vi(r.contents,s[0],s[1])}}finally{Ee(o)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return Ve(this)}GetEnumerator(){return Ve(wi(this.hashMap.values()))}[Symbol.iterator](){return ro(Ve(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){vi(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){Jl(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=ss(this,t[0]);let o;switch(r!=null&&Xe(O(r)[1],t[1])?(o=0,O(r)):o=1,o){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){$$((o,s)=>{Rt(t,n+o,s)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return Yl(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=ss(n,t[0]);return r!=null?(Xe(O(r)[1],t[1])&&xi(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){vi(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return ec(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return Xl(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Ql(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return _i(R(()=>ze(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return xi(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const o=ss(this,t);if(o!=null){const s=O(o);return n.contents=s[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return _i(R(()=>ze(n=>n[1],t)))}get size(){return Yl(this)|0}clear(){Jl(this)}delete(t){return xi(this,t)}entries(){return ze(n=>[n[0],n[1]],this)}get(t){return Xl(this,t)}has(t){return ec(this,t)}keys(){return ze(n=>n[0],this)}set(t,n){const r=this;return Ql(r,t,n),r}values(){return ze(n=>n[1],this)}forEach(t,n){const r=this;Rr(o=>{t(o[1],o[0],r)},r)}}function go(e,t){const n=e.comparer.GetHashCode(t)|0;let r,o=xe();return r=[Zl(e.hashMap,n,new yt(()=>o,s=>{o=s})),o],r[0]?[!0,n,r[1].findIndex(s=>e.comparer.Equals(t,s[0]))]:[!1,n,-1]}function ss(e,t){const n=go(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return mo(e.hashMap,n[1])[n[2]];default:return}}function Jl(e){e.hashMap.clear()}function Yl(e){let t=0,n=Ve(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{Ee(n)}return t|0}function Xl(e,t){const n=ss(e,t);if(n!=null)return O(n)[1];throw new Error("The item was not found in collection")}function Ql(e,t,n){const r=go(e,t);r[0]?r[2]>-1?mo(e.hashMap,r[1])[r[2]]=[t,n]:mo(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function vi(e,t,n){const r=go(e,t);if(r[0]){if(r[2]>-1)throw new Error(Nl("An item with the same key has already been added. Key: {0}",t));mo(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function ec(e,t){const n=go(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function xi(e,t){const n=go(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return mo(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function v$(e){return new tc(0,[e])}function x$(e){return new tc(1,[e])}class tc extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function C$(e){return v$(e)}function S$(e){return x$(e)}const k$=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,nc=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,A$=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function E$(e){function t(r){return r.replace(nc,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(k$.test(n))return dp(n,"{","}","(",")");if(nc.test(n))return t(n);if(A$.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function I$(e,t){try{return t.contents=E$(e),!0}catch{return!1}}class rc extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function Yt(e){return e.fields[0]}var Ci;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(Ci||(Ci={}));function T$(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}function oc(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function N$(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}function M$(e,t){if(t&Ci.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}function R$(e,t,n){const o=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(o!=null){const[,,s,i]=o;if(n=n||M$(s,t),!N$(n).test(i))return T$(o,n)}return null}function P$(e,t,n,r,o){const s=R$(e,t,o);if(s!=null){let i=Number.parseInt(s.sign+s.digits,s.radix);if(!Number.isNaN(i)){const[a,l]=oc(!0,r);!n&&s.radix!==10&&i>=a&&i<=l&&(i=i<<32-r>>32-r);const[c,d]=oc(n,r);if(i>=c&&i<=d)return i}}throw new Error(`The input string ${e} was not in a correct format.`)}function Pr(e,t,n,r,o){try{return o.contents=P$(e,t,n,r),!0}catch{return!1}}const O$="#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£ē︳𐀡%𐀡",D$="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@";function F$(){const t=[...O$].map(s=>(s.codePointAt(0)??0)-35),n=[...D$].map(s=>(s.codePointAt(0)??0)-35),r=new Uint32Array(t),o=new Uint8Array(n);for(let s=1;s<r.length;++s)r[s]+=r[s-1];return s=>{let i=r.length,a=0;for(;i-a>1;){const l=Math.floor((i+a)/2),c=r[l];if(s<c)i=l;else if(s===c){i=a=l;break}else c<s&&(a=l)}return o[a]}}const V$=256,L$=F$();function B$(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const U$=e=>j$(e,0);function z$(e,t){const n=B$(e,t);return L$(n)}function j$(e,t){return(1<<z$(e,t)&V$)!==0}function H$(e,t){const n=sp(xl(e),t);if(n!=null)return y(Le(R(()=>ze(r=>r||"",n))))}function W$(e){let t;const n=H$(".*?@(.*)",e);switch(n!=null?X(n)?t=1:X(y(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function Ft(e,t){return Qo(t)?new w(1,[cn(Kt("%s cannot be null or empty"))(e)]):new w(0,[t])}function G$(e){const t=W$(e);if(t!=null){const n=t;return new w(0,[n])}else return new w(1,["Email is not in the correct format"])}function q$(e){return~~e.charCodeAt(0)-48}function K$(e){let t;const n=new w(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),o=Ln(q$,(t=e.split(""),t.filter(U$)),Int32Array);return o.length===11?(Rt(o,0,ge(0,o)-1|0),_p(hp((s,i)=>s*i,o,r,Int32Array),{GetZero:()=>0,Add:(s,i)=>s+i})%89===0?new w(0,[e]):n):n}function sc(e){const t=Ft("Name",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[jl(t.fields[0])])}function is(e){return pi(e)}function ic(e){const t=Ft("Website",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Vp(t.fields[0])])}function ac(e){return e.fields[0]}function lc(e){const t=Ft("FirstName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Lp(t.fields[0])])}function cc(e){return e.fields[0]}function uc(e){const t=Ft("LastName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Bp(t.fields[0])])}function dc(e){return e.fields[0]}function fc(e){let t;const n=Ft("Email",e);return t=n.tag===1?new w(1,[n.fields[0]]):G$(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Up(t.fields[0])])}function hc(e){const t=Ft("MobilePhone",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new zp(t.fields[0])])}function pc(e){return e.fields[0]}class $c extends he{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}}function Si(){return bt("AccountRegistry.Shared.Primitives.ContactDetails",[],$c,()=>[["FirstName",K],["LastName",K],["Email",K],["MobilePhone",K]])}function Z$(e){const t=lc(e.FirstName);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=uc(e.LastName);if(n.tag===1)return new w(1,[n.fields[0]]);{const r=fc(e.Email);if(r.tag===1)return new w(1,[r.fields[0]]);{const o=hc(e.MobilePhone);return o.tag===1?new w(1,[o.fields[0]]):new w(0,[new jp(t.fields[0],n.fields[0],r.fields[0],o.fields[0])])}}}}function J$(e){const t=e;if(t!=null)return new Hp(t)}function Y$(e){if(e!=null)return e.fields[0]}function Ce(e){return un(e)}function mt(e){return Zt(e)}function X$(e){const t=Ft("BusinessName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new qp(t.fields[0])])}function Q$(e){let t;const n=Ft("BusinessNumber",e);return t=n.tag===1?new w(1,[n.fields[0]]):K$(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Kp(t.fields[0])])}function em(e){const t=Ft("Address1",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Zp(t.fields[0])])}function tm(e){const t=e;if(t!=null)return new Jp(t)}function nm(e){const t=Ft("City",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Yp(t.fields[0])])}function rm(e){const t=Ft("Postcode",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Xp(t.fields[0])])}function om(e){const t=Ft("State",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Qp(t.fields[0])])}class sm extends he{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function im(){return bt("AccountRegistry.Shared.Primitives.LegalEntity",[],sm,()=>[["BusinessName",K],["BusinessNumber",K],["Address1",K],["Address2",Pe(K)],["City",K],["Postcode",K],["State",Pe(K)],["Phone",K],["CountryCode",Pe(K)]])}function am(e){const t=Ft("SalesforceParentRecordId",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new e$(t.fields[0])])}class mc extends he{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function lm(){return bt("AccountRegistry.Shared.Primitives.SalesforceInfo",[],mc,()=>[["SalesforceParentRecordId",K],["SalesforceRecordId",Pe(K)]])}class gc extends he{constructor(t,n){super(),this.Code=t,this.Name=n}}function cm(){return bt("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],gc,()=>[["Code",K],["Name",K]])}let um=class extends he{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}};function dm(){return bt("AccountRegistry.Shared.AdminApi.Partner",[],um,()=>[["StreamId",K],["Name",K],["Website",K],["ContactDetails",Pe(Si())],["Notes",Pe(K)],["AccountProvisioningMode",hm()]])}class fm extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function hm(){return sl("AccountRegistry.Shared.AdminApi.AccountProvisioningModeDto",[],fm,()=>[[],[]])}class pm extends he{constructor(t,n,r,o,s,i,a,l,c){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=o,this.ContactDetails=s,this.Notes=i,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c}}function $m(){return bt("AccountRegistry.Shared.AdminApi.Account",[],pm,()=>[["StreamId",K],["PartnerId",K],["Name",K],["Website",K],["ContactDetails",Pe(Si())],["Notes",Pe(K)],["LegalEntity",Pe(im())],["ExternalId",Pe(K)],["ChannelId",Pe(K)]])}class mm extends he{constructor(t,n,r,o,s,i,a,l,c){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=o,this.Website=s,this.BusinessName=i,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c}}function gm(){return bt("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],mm,()=>[["AccountId",K],["Name",K],["Contact",Pe(K)],["ContactMobilePhone",Pe(K)],["Website",K],["BusinessName",Pe(K)],["BusinessNumber",Pe(K)],["ExternalId",Pe(K)],["ChannelId",Pe(K)]])}class wc extends he{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function wm(){return bt("AccountRegistry.Shared.AdminApi.AccountLookup",[],wc,()=>[["Accounts",ni(gm())],["Token",Pe(K)]])}class _m extends he{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function ym(){return bt("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],_m,()=>[["PartnerId",K],["AccountId",K]])}class bm extends he{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function vm(){return bt("AccountRegistry.Shared.AdminApi.AnzsicClass",[],bm,()=>[["ClassCode",K],["ClassTitle",K]])}class xm extends he{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function Cm(){return bt("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],xm,()=>[["GroupCode",K],["GroupTitle",K],["Classes",il(vm())]])}class Sm extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function km(){return sl("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],Sm,()=>[[["Item",il(Cm())]],[]])}class _c extends he{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function Am(){return bt("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],_c,()=>[["BusinessName",K],["BusinessNumber",K],["Address1",K],["Address2",Pe(K)],["City",K],["Postcode",K],["State",Pe(K)],["Phone",K],["CountryCode",K]])}class yc extends he{constructor(t,n,r,o,s,i,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=o,this.LegalEntity=s,this.ExternalId=i,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function Em(){return bt("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],yc,()=>[["Name",K],["Website",K],["ContactDetails",Si()],["Notes",Pe(K)],["LegalEntity",Pe(Am())],["ExternalId",Pe(K)],["ChannelId",Pe(K)],["SalesforceInfo",Pe(lm())],["AnzsicClassifier",Pe(cm())]])}class Im extends he{constructor(t){super(),this.Id=t}}function Tm(){return bt("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],Im,()=>[["Id",K]])}var wo,le,bc,sr,vc,xc,ki,Ai,Ei,Ii,Cc,_o={},Sc=[],Nm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,as=Array.isArray;function Cn(e,t){for(var n in t)e[n]=t[n];return e}function kc(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?wo.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return yo(e,i,r,o,null)}function yo(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++bc,__i:-1,__u:0};return o==null&&le.vnode!=null&&le.vnode(s),s}function Ti(){return{current:null}}function Be(e){return e.children}function Xt(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ir(e):null}function Ac(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Ac(e)}}function Ni(e){(!e.__d&&(e.__d=!0)&&sr.push(e)&&!ls.__r++||vc!==le.debounceRendering)&&((vc=le.debounceRendering)||xc)(ls)}function ls(){var e,t,n,r,o,s,i,a;for(sr.sort(ki);e=sr.shift();)e.__d&&(t=sr.length,r=void 0,s=(o=(n=e).__v).__e,i=[],a=[],n.__P&&((r=Cn({},o)).__v=o.__v+1,le.vnode&&le.vnode(r),Mi(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,i,s??ir(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Mc(i,r,a),r.__e!=s&&Ac(r)),sr.length>t&&sr.sort(ki));ls.__r=0}function Ec(e,t,n,r,o,s,i,a,l,c,d){var u,h,f,p,_,g=r&&r.__k||Sc,v=t.length;for(n.__d=l,Mm(n,t,g),l=n.__d,u=0;u<v;u++)(f=n.__k[u])!=null&&typeof f!="boolean"&&typeof f!="function"&&(h=f.__i===-1?_o:g[f.__i]||_o,f.__i=u,Mi(e,f,h,o,s,i,a,l,c,d),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ri(h.ref,null,f),d.push(f.ref,f.__c||p,f)),_==null&&p!=null&&(_=p),65536&f.__u||h.__k===f.__k?(l&&!l.isConnected&&(l=ir(h)),l=Ic(f,l,e)):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:p&&(l=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=_}function Mm(e,t,n){var r,o,s,i,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)i=r+u,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?yo(null,o,null,null,null):as(o)?yo(Be,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?yo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Rm(o,n,i,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?u++:a>i?d>l-i?u+=a-i:u--:a<i?a==i-1&&(u=a-i):u=0,a!==r+u&&(o.__u|=65536))):(s=n[i])&&s.key==null&&s.__e&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=ir(s)),Pi(s,s,!1),n[i]=null,d--);if(d)for(r=0;r<c;r++)(s=n[r])!=null&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=ir(s)),Pi(s,s))}function Ic(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Ic(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Sn(e,t){return t=t||[],e==null||typeof e=="boolean"||(as(e)?e.some(function(n){Sn(n,t)}):t.push(e)),t}function Rm(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,l=t[n];if(l===null||l&&o==l.key&&s===l.type&&!(131072&l.__u))return n;if(r>(l!=null&&!(131072&l.__u)?1:0))for(;i>=0||a<t.length;){if(i>=0){if((l=t[i])&&!(131072&l.__u)&&o==l.key&&s===l.type)return i;i--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&s===l.type)return a;a++}}return-1}function Tc(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Nm.test(t)?n:n+"px"}function cs(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Tc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Tc(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Ai,e.addEventListener(t,s?Ii:Ei,s)):e.removeEventListener(t,s?Ii:Ei,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Nc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ai++;else if(t.t<n.u)return;return n(le.event?le.event(t):t)}}}function Mi(e,t,n,r,o,s,i,a,l,c){var d,u,h,f,p,_,g,v,b,S,D,L,ne,me,we,ue=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=le.__b)&&d(t);e:if(typeof ue=="function")try{if(v=t.props,b=(d=ue.contextType)&&r[d.__c],S=d?b?b.props.value:d.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in ue&&ue.prototype.render?t.__c=u=new ue(v,S):(t.__c=u=new Xt(v,S),u.constructor=ue,u.render=Om),b&&b.sub(u),u.props=v,u.state||(u.state={}),u.context=S,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),ue.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Cn({},u.__s)),Cn(u.__s,ue.getDerivedStateFromProps(v,u.__s))),f=u.props,p=u.state,u.__v=t,h)ue.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(ue.getDerivedStateFromProps==null&&v!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,S),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,S)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(Q){Q&&(Q.__=t)}),D=0;D<u._sb.length;D++)u.__h.push(u._sb[D]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,S),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,_)})}if(u.context=S,u.props=v,u.__P=e,u.__e=!1,L=le.__r,ne=0,"prototype"in ue&&ue.prototype.render){for(u.state=u.__s,u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),me=0;me<u._sb.length;me++)u.__h.push(u._sb[me]);u._sb=[]}else do u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++ne<25);u.state=u.__s,u.getChildContext!=null&&(r=Cn(Cn({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(f,p)),Ec(e,as(we=d!=null&&d.type===Be&&d.key==null?d.props.children:d)?we:[we],t,n,r,o,s,i,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),g&&(u.__E=u.__=null)}catch(Q){t.__v=null,l||s!=null?(t.__e=a,t.__u|=l?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),le.__e(Q,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Pm(n.__e,t,n,r,o,s,i,l,c);(d=le.diffed)&&d(t)}function Mc(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Ri(n[r],n[++r],n[++r]);le.__c&&le.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){le.__e(s,o.__v)}})}function Pm(e,t,n,r,o,s,i,a,l){var c,d,u,h,f,p,_,g=n.props,v=t.props,b=t.type;if(b==="svg"?o="http://www.w3.org/2000/svg":b==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!b&&(b?f.localName===b:f.nodeType===3)){e=f,s[c]=null;break}}if(e==null){if(b===null)return document.createTextNode(v);e=document.createElementNS(o,b,v.is&&v),s=null,a=!1}if(b===null)g===v||a&&e.data===v||(e.data=v);else{if(s=s&&wo.call(e.childNodes),g=n.props||_o,!a&&s!=null)for(g={},c=0;c<e.attributes.length;c++)g[(f=e.attributes[c]).name]=f.value;for(c in g)if(f=g[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=f;else if(c!=="key"&&!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;cs(e,c,null,f,o)}}for(c in v)f=v[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?p=f:c=="checked"?_=f:c==="key"||a&&typeof f!="function"||g[c]===f||cs(e,c,f,g[c],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Ec(e,as(h)?h:[h],t,n,r,b==="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&ir(n,0),a,l),s!=null)for(c=s.length;c--;)s[c]!=null&&kc(s[c]);a||(c="value",p!==void 0&&(p!==e[c]||b==="progress"&&!p||b==="option"&&p!==g[c])&&cs(e,c,p,g[c],o),c="checked",_!==void 0&&_!==e[c]&&cs(e,c,_,g[c],o))}return e}function Ri(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){le.__e(r,n)}}function Pi(e,t,n){var r,o;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ri(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){le.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Pi(r[o],t,n||typeof e.type!="function");n||e.__e==null||kc(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Om(e,t,n){return this.constructor(e,n)}function zn(e,t,n){var r,o,s,i;le.__&&le.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Mi(t,e=(!r&&n||t).__k=$(Be,null,[e]),o||_o,_o,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?wo.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Mc(s,e,i)}function Oi(e,t){zn(e,t,Oi)}function Di(e,t,n){var r,o,s,i,a=Cn({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?wo.call(arguments,2):n),yo(e.type,a,r||e.key,o||e.ref,null)}function jn(e,t){var n={__c:t="__cC"+Cc++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,s;return this.getChildContext||(o=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&o.some(function(a){a.__e=!0,Ni(a)})},this.sub=function(i){o.push(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){o.splice(o.indexOf(i),1),a&&a.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}wo=Sc.slice,le={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},bc=0,Xt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Cn({},this.state),typeof e=="function"&&(e=e(Cn({},n),this.props)),e&&Cn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ni(this))},Xt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ni(this))},Xt.prototype.render=Be,sr=[],xc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(e,t){return e.__v.__b-t.__v.__b},ls.__r=0,Ai=0,Ei=Nc(!1),Ii=Nc(!0),Cc=0;var kn,Te,Fi,Rc,Or=0,Pc=[],us=[],je=le,Oc=je.__b,Dc=je.__r,Fc=je.diffed,Vc=je.__c,Lc=je.unmount,Bc=je.__;function ar(e,t){je.__h&&je.__h(Te,e,Or||t),Or=0;var n=Te.__H||(Te.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:us}),n.__[e]}function Qe(e){return Or=1,Dr(zc,e)}function Dr(e,t,n){var r=ar(kn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):zc(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Te,!Te.u)){var o=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!s||s.call(this,a,l,c);var u=!1;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!s||s.call(this,a,l,c))};Te.u=!0;var s=Te.shouldComponentUpdate,i=Te.componentWillUpdate;Te.componentWillUpdate=function(a,l,c){if(this.__e){var d=s;s=void 0,o(a,l,c),s=d}i&&i.call(this,a,l,c)},Te.shouldComponentUpdate=o}return r.__N||r.__}function Oe(e,t){var n=ar(kn++,3);!je.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,Te.__H.__h.push(n))}function An(e,t){var n=ar(kn++,4);!je.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,Te.__h.push(n))}function $e(e){return Or=5,ht(function(){return{current:e}},[])}function Vi(e,t,n){Or=6,An(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ht(e,t){var n=ar(kn++,7);return zi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Hn(e,t){return Or=8,ht(function(){return e},t)}function dn(e){var t=Te.context[e.__c],n=ar(kn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Te)),t.props.value):e.__}function Li(e,t){je.useDebugValue&&je.useDebugValue(t?t(e):e)}function Dm(e){var t=ar(kn++,10),n=Qe();return t.__=e,Te.componentDidCatch||(Te.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Bi(){var e=ar(kn++,11);if(!e.__){for(var t=Te.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Fm(){for(var e;e=Pc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ds),e.__H.__h.forEach(Ui),e.__H.__h=[]}catch(t){e.__H.__h=[],je.__e(t,e.__v)}}je.__b=function(e){Te=null,Oc&&Oc(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Bc&&Bc(e,t)},je.__r=function(e){Dc&&Dc(e),kn=0;var t=(Te=e.__c).__H;t&&(Fi===Te?(t.__h=[],Te.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=us,n.__N=n.i=void 0})):(t.__h.forEach(ds),t.__h.forEach(Ui),t.__h=[],kn=0)),Fi=Te},je.diffed=function(e){Fc&&Fc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pc.push(t)!==1&&Rc===je.requestAnimationFrame||((Rc=je.requestAnimationFrame)||Vm)(Fm)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==us&&(n.__=n.__V),n.i=void 0,n.__V=us})),Fi=Te=null},je.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ds),n.__h=n.__h.filter(function(r){return!r.__||Ui(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],je.__e(r,n.__v)}}),Vc&&Vc(e,t)},je.unmount=function(e){Lc&&Lc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ds(r)}catch(o){t=o}}),n.__H=void 0,t&&je.__e(t,n.__v))};var Uc=typeof requestAnimationFrame=="function";function Vm(e){var t,n=function(){clearTimeout(r),Uc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Uc&&(t=requestAnimationFrame(n))}function ds(e){var t=Te,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Te=t}function Ui(e){var t=Te;e.__c=e.__(),Te=t}function zi(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function zc(e,t){return typeof t=="function"?t(e):t}function jc(e,t){for(var n in t)e[n]=t[n];return e}function ji(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function fs(e,t){this.props=e,this.context=t}function Hc(e,t){function n(o){var s=this.props.ref,i=s==o.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,o)||!i:ji(this.props,o)}function r(o){return this.shouldComponentUpdate=n,$(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(fs.prototype=new Xt).isPureReactComponent=!0,fs.prototype.shouldComponentUpdate=function(e,t){return ji(this.props,e)||ji(this.state,t)};var Wc=le.__b;le.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Wc&&Wc(e)};var Lm=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Wn(e){function t(n){var r=jc({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Lm,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Gc=function(e,t){return e==null?null:Sn(Sn(e).map(t))},qc={map:Gc,forEach:Gc,count:function(e){return e?Sn(e).length:0},only:function(e){var t=Sn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Sn},Bm=le.__e;le.__e=function(e,t,n,r){if(e.then){for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Bm(e,t,n,r)};var Kc=le.unmount;function Zc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=jc({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Zc(r,t,n)})),e}function Jc(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Jc(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function bo(){this.__u=0,this.t=null,this.__b=null}function Yc(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xc(e){var t,n,r;function o(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return $(n,s)}return o.displayName="Lazy",o.__f=!0,o}function Fr(){this.u=null,this.o=null}le.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Kc&&Kc(e)},(bo.prototype=new Xt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Yc(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Jc(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},bo.prototype.componentWillUnmount=function(){this.t=[]},bo.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Zc(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&$(Be,null,e.fallback);return o&&(o.__u&=-33),[$(Be,null,t.__a?null:e.children),o]};var Qc=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Um(e){return this.getChildContext=function(){return e.context},e.children}function zm(e){var t=this,n=e.i;t.componentWillUnmount=function(){zn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),zn($(Um,{context:t.context},e.__v),t.l)}function eu(e,t){var n=$(zm,{__v:e,i:t});return n.containerInfo=t,n}(Fr.prototype=new Xt).__a=function(e){var t=this,n=Yc(t.__v),r=t.o.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),Qc(t,e,r)):o()};n?n(s):s()}},Fr.prototype.render=function(e){this.u=null,this.o=new Map;var t=Sn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Fr.prototype.componentDidUpdate=Fr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Qc(e,n,t)})};var tu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,jm=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Hm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wm=/[A-Z0-9]/g,Gm=typeof document<"u",qm=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function nu(e,t,n){return t.__k==null&&(t.textContent=""),zn(e,t),typeof n=="function"&&n(),e?e.__c:null}function ru(e,t,n){return Oi(e,t),typeof n=="function"&&n(),e?e.__c:null}Xt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Xt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ou=le.event;function Km(){}function Zm(){return this.cancelBubble}function Jm(){return this.defaultPrevented}le.event=function(e){return ou&&(e=ou(e)),e.persist=Km,e.isPropagationStopped=Zm,e.isDefaultPrevented=Jm,e.nativeEvent=e};var Hi,Ym={enumerable:!1,configurable:!0,get:function(){return this.class}},su=le.vnode;le.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var s in n){var i=n[s];if(!(s==="value"&&"defaultValue"in n&&i==null||Gm&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var a=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&i===!0?i="":a==="translate"&&i==="no"?i=!1:a==="ondoubleclick"?s="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||qm(n.type)?a==="onfocus"?s="onfocusin":a==="onblur"?s="onfocusout":Hm.test(s)?s=a:r.indexOf("-")===-1&&jm.test(s)?s=s.replace(Wm,"-$&").toLowerCase():i===null&&(i=void 0):a=s="oninput",a==="oninput"&&o[s=a]&&(s="oninputCapture"),o[s]=i}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Sn(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=Sn(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Ym)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=tu,su&&su(e)};var iu=le.__r;le.__r=function(e){iu&&iu(e),Hi=e.__c};var au=le.diffed;le.diffed=function(e){au&&au(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Hi=null};var lu={ReactCurrentDispatcher:{current:{readContext:function(e){return Hi.__n[e.__c].props.value},useCallback:Hn,useContext:dn,useDebugValue:Li,useDeferredValue:Ki,useEffect:Oe,useId:Bi,useImperativeHandle:Vi,useInsertionEffect:Ji,useLayoutEffect:An,useMemo:ht,useReducer:Dr,useRef:$e,useState:Qe,useSyncExternalStore:Yi,useTransition:Zi}}},Xm="17.0.2";function cu(e){return $.bind(null,e)}function Vr(e){return!!e&&e.$$typeof===tu}function uu(e){return Vr(e)&&e.type===Be}function du(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Wi(e){return Vr(e)?Di.apply(null,arguments):e}function fu(e){return!!e.__k&&(zn(null,e),!0)}function hu(e){return e&&(e.base||e.nodeType===1&&e)||null}var pu=function(e,t){return e(t)},Gi=function(e,t){return e(t)},$u=Be;function qi(e){e()}function Ki(e){return e}function Zi(){return[!1,qi]}var Ji=An,mu=Vr;function Yi(e,t){var n=t(),r=Qe({h:{__:n,v:t}}),o=r[0].h,s=r[1];return An(function(){o.__=n,o.v=t,Xi(o)&&s({h:o})},[e,n,t]),Oe(function(){return Xi(o)&&s({h:o}),e(function(){Xi(o)&&s({h:o})})},[e]),n}function Xi(e){var t,n,r=e.v,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Y={useState:Qe,useId:Bi,useReducer:Dr,useEffect:Oe,useLayoutEffect:An,useInsertionEffect:Ji,useTransition:Zi,useDeferredValue:Ki,useSyncExternalStore:Yi,startTransition:qi,useRef:$e,useImperativeHandle:Vi,useMemo:ht,useCallback:Hn,useContext:dn,useDebugValue:Li,version:"17.0.2",Children:qc,render:nu,hydrate:ru,unmountComponentAtNode:fu,createPortal:eu,createElement:$,createContext:jn,createFactory:cu,cloneElement:Wi,createRef:Ti,Fragment:Be,isValidElement:Vr,isElement:mu,isFragment:uu,isMemo:du,findDOMNode:hu,Component:Xt,PureComponent:fs,memo:Hc,forwardRef:Wn,flushSync:Gi,unstable_batchedUpdates:pu,StrictMode:$u,Suspense:bo,SuspenseList:Fr,lazy:Xc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:lu};const Qi=Object.freeze(Object.defineProperty({__proto__:null,Children:qc,Component:Xt,Fragment:Be,PureComponent:fs,StrictMode:$u,Suspense:bo,SuspenseList:Fr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:lu,cloneElement:Wi,createContext:jn,createElement:$,createFactory:cu,createPortal:eu,createRef:Ti,default:Y,findDOMNode:hu,flushSync:Gi,forwardRef:Wn,hydrate:ru,isElement:mu,isFragment:uu,isMemo:du,isValidElement:Vr,lazy:Xc,memo:Hc,render:nu,startTransition:qi,unmountComponentAtNode:fu,unstable_batchedUpdates:pu,useCallback:Hn,useContext:dn,useDebugValue:Li,useDeferredValue:Ki,useEffect:Oe,useErrorBoundary:Dm,useId:Bi,useImperativeHandle:Vi,useInsertionEffect:Ji,useLayoutEffect:An,useMemo:ht,useReducer:Dr,useRef:$e,useState:Qe,useSyncExternalStore:Yi,useTransition:Zi,version:Xm},Symbol.toStringTag,{value:"Module"})),Qm=e=>{Oe(()=>{const t=e();return()=>{t.Dispose()}})},e0=(e,t)=>{Oe(()=>{const n=e();return()=>{n.Dispose()}},t)},t0=e=>{An(()=>{const t=e();return()=>{t.Dispose()}})},T=Y,n0=Qm,gu=e0,r0=t0;function o0(e,t,n,r){const o=T.memo(e,Ie(ot(Mt(Vn,n),xe())));return Rr(s=>{e.displayName=s},di(t)),s=>{const i=s0(r,s);return T.createElement(o,i)}}function s0(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function vo(e){return{Dispose(){e()}}}function i0(e,t){gu(e,t)}function a0(e){r0(t=>(e(),vo(()=>{})))}function ea(e){const t=T.useRef(!1);c0(()=>{t.current||(t.current=!0,e())},[])}function wu(e){const t=T.useRef(void 0),n=T.useRef(!1),r=T.useRef(!1);n.current&&(r.current=!0),i0(()=>{let o;return n.current?o=void 0:(n.current=!0,t.current=ut(e()),o=r.current?t.current:void 0),{Dispose(){Rr(s=>{Ee(s)},di(o))}}},[])}function l0(e){n0(t=>(e(),vo(()=>{})))}function c0(e,t){gu(n=>(e(),vo(()=>{})),t)}function u0(e,t){const n=ot(t,[]);return T.useCallback(e,n)}function _u(e){return T.useRef(e)}function d0(e,t,n){return o0(e,void 0,ui(n),ui(t))}function f0(e,t){const n=T.createContext(ot(t,void 0));return Rr(r=>{n.displayName=r},di(e)),n}function h0(e,t,n){return T.createElement(e.Provider,{value:t},...n)}function lr(e){return T.useContext(e)}function yu(e){const t=_u(e),n=u0(r=>t.current(r),[]);return a0(()=>{t.current=e}),n}function Lr(e){return T.useState(e)}class bu{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,o=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(o)}}}Dispose(){}}class hs extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,hs.prototype)}}class ta{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>ta.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function En(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new hs);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(jo(n))}});else try{e(t)}catch(n){t.onError(jo(n))}}}function p0(e,t){return En(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(o){n.onError(jo(o))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function $0(e){return En(t=>t.onSuccess(e))}class m0{Bind(t,n){return p0(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return En(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let o=r.next();return this.While(()=>!o.done,this.Delay(()=>{const s=n(o.value);return o=r.next(),s}))}Return(t){return $0(t)}ReturnFrom(t){return t}TryFinally(t,n){return En(r=>{t({onSuccess:o=>{n(),r.onSuccess(o)},onError:o=>{n(),r.onError(o)},onCancel:o=>{n(),r.onCancel(o)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return En(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:o=>{try{n(o)(r)}catch(s){r.onError(jo(s))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return En(t=>t.onSuccess(void 0))}}const J=new m0;function na(e){}function g0(e){return new bu(!1)}function w0(e){e.cancel()}function _0(e){return e!=null&&e.isCancelled}const vu=new bu;function y0(e){return En(t=>{e({onSuccess:n=>t.onSuccess(C$(n)),onError:n=>t.onSuccess(S$(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function b0(e){return En(t=>e([t.onSuccess,t.onError,t.onCancel]))}function v0(e){return En(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new hs)})})}function x0(e,t){return xu(e,t)}function Br(e,t){return x0(e,t)}function xu(e,t,n,r,o){typeof t!="function"&&(o=t,t=void 0);const s=new ta;e({onSuccess:t||na,onError:n||na,onCancel:r||na,cancelToken:o||vu,trampoline:s})}function C0(e,t){return new Promise((n,r)=>xu(e,n,r,r,vu))}class Cu{constructor(t,n){this.k=t,this.v=n}}function ps(e,t){return new Cu(e,t)}function xt(e){return e.k}function Vt(e){return e.v}class et extends Cu{constructor(t,n,r,o,s){super(t,n),this.left=r,this.right=o,this.h=s|0}}function $s(e,t,n,r,o){return new et(e,t,n,r,o)}function Ct(e){return e.left}function St(e){return e.right}function cr(e){return e.h}function Ev(){}function Su(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=O(r);if(o instanceof et){const s=o;e=Su(n+1,Ct(s)),t=St(s);continue e}else return n+1|0}else return n|0}}function S0(e){return Su(0,e)}function Qt(e,t,n,r){let o,s,i;const a=e;if(a!=null){const u=O(a);i=u instanceof et?(o=u,cr(o)):1}else i=0;let l;const c=r;if(c!=null){const u=O(c);l=u instanceof et?(s=u,cr(s)):1}else l=0;const d=(i<l?l:i)|0;return d===0?ps(t,n):$s(t,n,e,r,d+1)}function ku(e,t,n,r){let o,s,i,a,l,c,d,u,h;const f=e;if(f!=null){const g=O(f);h=g instanceof et?(o=g,cr(o)):1}else h=0;let p;const _=r;if(_!=null){const g=O(_);p=g instanceof et?(s=g,cr(s)):1}else p=0;if(p>h+2){const g=O(r);if(g instanceof et){const v=g;if(i=Ct(v),(i!=null?(a=O(i),a instanceof et?(l=a,cr(l)):1):0)>h+1){const b=O(Ct(v));if(b instanceof et){const S=b;return Qt(Qt(e,t,n,Ct(S)),xt(S),Vt(S),Qt(St(S),xt(v),Vt(v),St(v)))}else throw new Error("internal error: Map.rebalance")}else return Qt(Qt(e,t,n,Ct(v)),xt(v),Vt(v),St(v))}else throw new Error("internal error: Map.rebalance")}else if(h>p+2){const g=O(e);if(g instanceof et){const v=g;if(c=St(v),(c!=null?(d=O(c),d instanceof et?(u=d,cr(u)):1):0)>p+1){const b=O(St(v));if(b instanceof et){const S=b;return Qt(Qt(Ct(v),xt(v),Vt(v),Ct(S)),xt(S),Vt(S),Qt(St(S),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Qt(Ct(v),xt(v),Vt(v),Qt(St(v),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Qt(e,t,n,r)}function Ur(e,t,n,r){if(r!=null){const o=O(r),s=e.Compare(t,xt(o))|0;if(o instanceof et){const i=o;return s<0?ku(Ur(e,t,n,Ct(i)),xt(i),Vt(i),St(i)):s===0?$s(t,n,Ct(i),St(i),cr(i)):ku(Ct(i),xt(i),Vt(i),Ur(e,t,n,St(i)))}else return s<0?$s(t,n,void 0,r,2):s===0?ps(t,n):$s(t,n,r,void 0,2)}else return ps(t,n)}function Au(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=O(s),a=r.Compare(o,xt(i))|0;if(a===0)return ut(Vt(i));if(i instanceof et){const l=i;e=r,t=o,n=a<0?Ct(l):St(l);continue e}else return}else return}}function k0(e,t,n){const r=Au(e,t,n);if(r==null)throw new Error;return O(r)}function A0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=O(s),a=r.Compare(o,xt(i))|0;if(i instanceof et){const l=i;if(a<0){e=r,t=o,n=Ct(l);continue e}else{if(a===0)return!0;e=r,t=o,n=St(l);continue e}}else return a===0}else return!1}}function Eu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=O(r);if(o instanceof et){const s=o;Eu(n,Ct(s)),n(xt(s),Vt(s)),e=n,t=St(s);continue e}else n(xt(o),Vt(o))}break}}function E0(e,t){Eu(e,t)}function I0(e,t,n){let r=n;E0((o,s)=>{Rt(t,r,[o,s]),r=r+1|0},e)}function T0(e,t){return bn((n,r)=>Ur(e,r[0],r[1],n),void 0,t)}function N0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Ur(r,i[0],i[1],o),n=s;continue e}else return o}}function M0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const o=ge(r,t);n=Ur(e,o[0],o[1],n)}return n}function Iu(e,t){if(ln(t))return M0(e,t);if(t instanceof vt)return T0(e,t);{const n=Ve(t);try{return N0(e,void 0,n)}finally{Ee(n)}}}class R0 extends he{constructor(t,n){super(),this.stack=t,this.started=n}}function Tu(e){e:for(;;){const t=e;if(X(t))return qe();{const n=y(t),r=B(t);if(r!=null){const o=O(r);if(o instanceof et){const s=o;e=Ue([Ct(s),ps(xt(s),Vt(s)),St(s)],n);continue e}else return t}else{e=n;continue e}}}}function Nu(e){return new R0(Tu(ie(e)),!1)}function P0(){throw new Error("enumeration not started")}function O0(){throw new Error("enumeration already finished")}function Mu(e){if(e.started){const t=e.stack;if(X(t))return O0();if(B(t)!=null){const n=O(B(t));if(n instanceof et)throw new Error("Please report error: Map iterator, unexpected stack for current");return[xt(n),Vt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return P0()}function D0(e){if(e.started){const t=e.stack;if(X(t))return!1;if(B(t)!=null){if(O(B(t))instanceof et)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Tu(y(t)),!X(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!X(e.stack)}function Ru(e){let t=Nu(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Mu(t)},"System.Collections.IEnumerator.get_Current"(){return Mu(t)},"System.Collections.IEnumerator.MoveNext"(){return D0(t)},"System.Collections.IEnumerator.Reset"(){t=Nu(e)},Dispose(){}}}class ms{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return B0(this)|0}Equals(t){const n=this;if(t instanceof ms){const r=t,o=Ve(n);try{const s=Ve(r);try{const i=()=>{const a=o["System.Collections.IEnumerator.MoveNext"]();if(a===s["System.Collections.IEnumerator.MoveNext"]())if(a){const l=o["System.Collections.Generic.IEnumerator`1.get_Current"](),c=s["System.Collections.Generic.IEnumerator`1.get_Current"]();return Xe(l[0],c[0])&&Xe(l[1],c[1])?i():!1}else return!0;else return!1};return i()}finally{Ee(s)}}finally{Ee(o)}}else return!1}toString(){return"map ["+pe("; ",ze(n=>Nl("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return Ru(this.tree)}[Symbol.iterator](){return ro(Ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Ru(this.tree)}CompareTo(t){const n=this;if(t instanceof ms)return p$((o,s)=>{const i=n.comparer.Compare(o[0],s[0])|0;return(i!==0?i:Ht(o[1],s[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Ou(n,t[0])&&Xe(Pu(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){I0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return ra(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return ra(this)|0}get size(){return ra(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return ze(n=>[n[0],n[1]],this)}get(t){return Pu(this,t)}has(t){return Ou(this,t)}keys(){return ze(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return ze(n=>n[1],this)}forEach(t,n){const r=this;Rr(o=>{t(o[1],o[0],r)},r)}}function gs(e,t){return new ms(e,t)}function F0(e){return gs(e,void 0)}function V0(e,t,n){return gs(e.comparer,Ur(e.comparer,t,n,e.tree))}function Pu(e,t){return k0(e.comparer,t,e.tree)}function ra(e){return S0(e.tree)}function Ou(e,t){return A0(e.comparer,t,e.tree)}function L0(e,t){return Au(e.comparer,t,e.tree)}function B0(e){const t=(o,s)=>(o<<1)+s+631;let n=0;const r=Ve(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const o=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,_n(o[0]))|0,n=t(n,_n(o[1]))|0}}finally{Ee(r)}return n|0}function Du(e,t,n){return V0(n,e,t)}function Fu(e,t){return L0(t,e)}function U0(e,t){return gs(t,Iu(t,e))}function z0(e,t){return gs(t,Iu(t,e))}function oa(e){return F0(e)}class Se extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Vu(e,t){const n=_u(g0());return wu(()=>vo(()=>{w0(n.current)})),yu(r=>{_0(n.current)||Br(J.Delay(()=>J.TryWith(J.Delay(()=>(t(new Se(1,[])),J.Bind(e(r),o=>(t(new Se(2,[o])),J.Zero())))),o=>(t(new Se(3,[o])),J.Zero()))),n.current)})}class j0{constructor(t,n,r){this.OnNext=t,this.OnError=n||(o=>{}),this.OnCompleted=r||(()=>{})}}function H0(e,t){t.Subscribe(new j0(e))}class W0{constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return q0(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const o=n===void 0?t:(r=t,n);this.delegates.forEach(s=>{s(r,o)})}}let G0=class extends W0{};function q0(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(o,s)=>n.OnNext(s);return e(r),{Dispose(){t(r)}}}}}class K0{constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new G0}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,this._enabled?this.AutoReset?this._intervalId=setInterval(()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)},this.Interval):this._timeoutId=setTimeout(()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)},this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}}function Z0(e,t){console.error(ut(e),t)}function J0(e,t){let n,r=new K0(e);r.AutoReset=!1,n=r,H0(t,n.Elapsed()),n.Enabled=!0,n.Start()}function Lu(e,t,n){rs(r=>{try{r(t)}catch(o){e(o)}},n)}function Ge(){return qe()}function st(e){return ie(e)}function Bu(e,t,n,r){return ie(o=>{e(J.Delay(()=>J.Bind(y0(t(n)),s=>{const i=s;return i.tag===0&&o(r(i.fields[0])),J.Zero()})))})}function Uu(e){J0(1,t=>{Br(e)})}function zr(e,t){if(t.indexOf(e)===0)return t}function zu(e,t){if(cp(t,e))return t}function Y0(e){return e===1?t=>{let n,r,o,s,i,a;return n=zr("/",t),n!=null?(r=n,"#"+r):(o=zr("#/",t),o!=null?(s=o,s):(i=zr("#",t),i!=null?(a=i,"#/"+Rl(a,1,a.length-1)):"#/"+t))}:t=>{let n,r;return n=zr("/",t),n!=null?(r=n,r):"/"+t}}function M(e,t){return Y0(t)(pe("/",po(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function gt(e,t,n){history.pushState(void 0,"",M(e,n));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function ju(e,t){return Sp(n=>{if(Ml(n))return qe();{const r=fp(n,"#");if(r==="?")return qe();if(zr("?",r)!=null)return ie(r);{const o=r.split("?");if(!hi((s,i)=>s===i,o)&&o.length===1){const s=ge(0,o);return ie(decodeURIComponent(s))}else if(!hi((s,i)=>s===i,o)&&o.length===2)if(ge(1,o)===""){const s=ge(0,o);return ie(decodeURIComponent(s))}else{const s=ge(0,o),i=ge(1,o);return C([decodeURIComponent(s),"?"+i])}else return qe()}}},C(ci(zr("#",e)!=null?Rl(e,1,e.length-1):t===1&&(zu("#",e)!=null||zu("#/",e)!=null)?"":e,["/"],void 0,0)))}function X0(e,t,n){return t(ju(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const Q0=d0(e=>{const t=yu(r=>{const o=ot(e.onUrlChanged,s=>{});X0(ot(e.hashMode,1),o)});wu(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),vo(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),ea(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??xe()});class In extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class ur extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Hu(e){return e.tag===0?new ur(1,[]):new ur(0,[])}class xo extends W{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const eg=new xo(new In(1,[]),new ur(0,[]));function tg(e){return[e.fields[0],e.fields[1]]}function Wu(e){return e.fields[0]}function Gu(e){return e.fields[1]}function qu(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new xo(new In(1,[]),Hu(r)):new xo(new In(1,[]),new ur(0,[])):n.tag===0?new xo(new In(0,[]),Hu(r)):new xo(new In(0,[]),new ur(0,[]))}class Ku extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const ng=new Ku("");function rg(e){return new Ku(e.trim())}function Zu(e){return e.fields[0]}class og extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function sg(e){return new og(e)}function Ju(e){return e.fields[0]}class sa extends he{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class ig extends W{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function ag(e){return[e.fields[0],e.fields[1]]}function lg(e,t){return new ig(e,t)}function cg(e){const t=ag(e);return[t[0],t[1]]}function ug(){return new b$([],{Equals:Xe,GetHashCode:bh})}function dg(e,t){let n,r=xe();if(n=[Zl(e,t,new yt(()=>r,o=>{r=o})),r],n[0])return n[1]}function Yu(e,t,n){return e.set(t,n),e}class fg extends he{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}}function hg(e){const t=sc(e.Name);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=ic(e.Website);if(n.tag===1)return new w(1,[n.fields[0]]);{let r;const o=e.ContactDetails;if(o!=null){const s=Z$(o);r=s.tag===1?new w(1,[s.fields[0]]):new w(0,[s.fields[0]])}else r=new w(0,[void 0]);return r.tag===1?new w(1,[r.fields[0]]):new w(0,[new fg(new rc(e.StreamId),t.fields[0],n.fields[0],r.fields[0],J$(e.Notes),e.AccountProvisioningMode)])}}}function ia(e,t){return Ep(n=>Yt(n.StreamId)===$i(t),e)}class k extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountImports","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","NotFound"]}}function Xu(e){let t,n,r,o,s,i,a,l,c,d,u,h,f,p,_,g,v,b,S,D,L,ne,me,we;if(X(e))t=16;else if(B(e)==="account-registry")if(X(y(e)))t=16;else if(B(y(e))==="partners")if(X(y(y(e))))t=0;else if(X(y(y(y(e)))))t=1,n=B(y(y(e)));else switch(B(y(y(y(e))))){case"accounts":{if(X(y(y(y(y(e))))))t=2,r=B(y(y(e)));else if(X(y(y(y(y(y(e)))))))t=8,c=B(y(y(y(y(e))))),d=B(y(y(e)));else switch(B(y(y(y(y(y(e))))))){case"directory":{X(y(y(y(y(y(y(e)))))))?(t=9,u=B(y(y(y(y(e))))),h=B(y(y(e)))):t=16;break}case"imports":{X(y(y(y(y(y(y(e)))))))?(t=10,f=B(y(y(y(y(e))))),p=B(y(y(e)))):t=16;break}case"super-configuration":{X(y(y(y(y(y(y(e)))))))?(t=11,_=B(y(y(y(y(e))))),g=B(y(y(e)))):t=16;break}case"benefits-onboarding-configuration":{X(y(y(y(y(y(y(e)))))))?(t=12,v=B(y(y(y(y(e))))),b=B(y(y(e)))):t=16;break}case"bank-details-configuration":{X(y(y(y(y(y(y(e)))))))?(t=13,S=B(y(y(y(y(e))))),D=B(y(y(e)))):t=16;break}case"salary-packaging-configuration":{X(y(y(y(y(y(y(e)))))))?(t=14,L=B(y(y(y(y(e))))),ne=B(y(y(e)))):t=16;break}case"workspace":{X(y(y(y(y(y(y(e)))))))?(t=15,me=B(y(y(y(y(e))))),we=B(y(y(e)))):t=16;break}default:t=16}break}case"super-configuration":{X(y(y(y(y(e)))))?(t=3,o=B(y(y(e)))):t=16;break}case"benefits-onboarding-configuration":{X(y(y(y(y(e)))))?(t=4,s=B(y(y(e)))):t=16;break}case"directory":{X(y(y(y(y(e)))))?(t=5,i=B(y(y(e)))):t=16;break}case"bank-details-configuration":{X(y(y(y(y(e)))))?(t=6,a=B(y(y(e)))):t=16;break}case"workspace":{X(y(y(y(y(e)))))?(t=7,l=B(y(y(e)))):t=16;break}default:t=16}else t=16;else t=16;switch(t){case 0:return new k(0,[]);case 1:return new k(1,[We(n)]);case 2:return new k(3,[We(r)]);case 3:return new k(4,[We(o)]);case 4:return new k(5,[We(s)]);case 5:return new k(2,[We(i)]);case 6:return new k(6,[We(a)]);case 7:return new k(7,[We(l)]);case 8:return new k(8,[We(d),Jt(c)]);case 9:return new k(9,[We(h),Jt(u)]);case 10:return new k(10,[We(p),Jt(f)]);case 11:return new k(11,[We(g),Jt(_)]);case 12:return new k(12,[We(b),Jt(v)]);case 13:return new k(13,[We(D),Jt(S)]);case 14:return new k(14,[We(ne),Jt(L)]);case 15:return new k(15,[We(we),Jt(me)]);default:return new k(16,[])}}function E(e){switch(e.tag){case 3:return C(["account-registry","partners",Ce(e.fields[0]),"accounts"]);case 4:return C(["account-registry","partners",Ce(e.fields[0]),"super-configuration"]);case 5:return C(["account-registry","partners",Ce(e.fields[0]),"benefits-onboarding-configuration"]);case 6:return C(["account-registry","partners",Ce(e.fields[0]),"bank-details-configuration"]);case 2:return C(["account-registry","partners",Ce(e.fields[0]),"directory"]);case 7:return C(["account-registry","partners",Ce(e.fields[0]),"workspace"]);case 8:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1])]);case 9:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"directory"]);case 10:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"imports"]);case 11:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"super-configuration"]);case 12:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"benefits-onboarding-configuration"]);case 13:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"bank-details-configuration"]);case 14:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"salary-packaging-configuration"]);case 15:return C(["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"workspace"]);case 16:case 0:return C(["account-registry","partners"]);default:return C(["account-registry","partners",Ce(e.fields[0])])}}function aa(e){switch(e.tag){case 3:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts"];return st(n=>{gt(C(t),1,1)})}case 4:{const t=["account-registry","partners",Ce(e.fields[0]),"super-configuration"];return st(n=>{gt(C(t),1,1)})}case 5:{const t=["account-registry","partners",Ce(e.fields[0]),"benefits-onboarding-configuration"];return st(n=>{gt(C(t),1,1)})}case 6:{const t=["account-registry","partners",Ce(e.fields[0]),"bank-details-configuration"];return st(n=>{gt(C(t),1,1)})}case 2:{const t=["account-registry","partners",Ce(e.fields[0]),"directory"];return st(n=>{gt(C(t),1,1)})}case 7:{const t=["account-registry","partners",Ce(e.fields[0]),"workspace"];return st(n=>{gt(C(t),1,1)})}case 8:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1])];return st(n=>{gt(C(t),1,1)})}case 9:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"directory"];return st(n=>{gt(C(t),1,1)})}case 10:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"imports"];return st(n=>{gt(C(t),1,1)})}case 11:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"super-configuration"];return st(n=>{gt(C(t),1,1)})}case 12:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"benefits-onboarding-configuration"];return st(n=>{gt(C(t),1,1)})}case 13:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"bank-details-configuration"];return st(n=>{gt(C(t),1,1)})}case 14:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"salary-packaging-configuration"];return st(n=>{gt(C(t),1,1)})}case 15:{const t=["account-registry","partners",Ce(e.fields[0]),"accounts",mt(e.fields[1]),"workspace"];return st(n=>{gt(C(t),1,1)})}case 0:case 16:return Ge();default:{const t=["account-registry","partners",Ce(e.fields[0])];return st(n=>{gt(C(t),1,1)})}}}function pg(e,t){switch(t.tag){case 1:return new Se(1,[]);case 2:return t.fields[0].tag===1?new Se(2,[new w(1,[t.fields[0].fields[0]])]):new Se(2,[new w(0,[e(t.fields[0].fields[0])])]);case 3:return new Se(3,[t.fields[0]]);default:return new Se(0,[])}}class Qu extends he{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function $g(e){return new Qu(Ul("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Cr}),Ul("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:Cr}))}const mg=new Qu(!1,!1);class Z extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class fn extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function ed(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function td(e,t){switch(e.tag){case 2:return ip(ed(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return ed(t)}}function nd(e,t){gg(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function gg(e){if(e!=null&&e!==0){if(e%6e4!==0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}function wg(){return nd(-621355968e5,0)}function _g(e){const[t,n]=wl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return nd(t.getTime(),r)}function yg(e,t){try{return t.contents=_g(e),!0}catch{return!1}}function Co(e){return e<0?Math.ceil(e):Math.floor(e)}function rd(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return bg(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+o}function bg(e){return Number(BigInt(e)/10000n)}function vg(e){return Co(e/864e5)}function xg(e){return Co(e%864e5/36e5)}function Cg(e){return Co(e%36e5/6e4)}function Sg(e){return Co(e%6e4/1e3)}function kg(e){return Co(e%1e3)}function Ag(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(vg(e)),o=Math.abs(xg(e)),s=Math.abs(Cg(e)),i=Math.abs(Sg(e)),a=Math.abs(kg(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?o:Ae(o,2)}:${Ae(s,2)}:${Ae(i,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+Ae(a,3):"."+$h(a,3,7)}`}function Eg(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return rd(r,0,0,0,0)}if(n>0){const r=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(r!=null&&r[4]!=null&&r[5]!=null){let o=0,s=0,i=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(o=+r[3]),r[7]!=null&&(i=+r[7]),r[8]!=null)switch(r[8].length){case 1:s=+r[8]*100;break;case 2:s=+r[8]*10;break;case 3:s=+r[8];break;case 4:s=+r[8]/10;break;case 5:s=+r[8]/100;break;case 6:s=+r[8]/1e3;break;case 7:s=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*rd(o,l,c,i,s)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function Ig(e,t){try{return t.contents=Eg(e),!0}catch{return!1}}class od{constructor(t){this.k=t}}function Lt(e){return new od(e)}function re(e){return e.k}class ke extends od{constructor(t,n,r,o){super(t),this.left=n,this.right=r,this.h=o|0}}function Bt(e,t,n,r){return new ke(e,t,n,r)}function De(e){return e.left}function Ne(e){return e.right}function jr(e){return e.h}function Iv(){}function sd(e,t){e:for(;;){const n=e,r=t;if(n!=null){const o=O(n);if(o instanceof ke){const s=o;e=De(s),t=sd(Ne(s),r+1);continue e}else return r+1|0}else return r|0}}function Tg(e){return sd(e,0)}function en(e,t,n){let r,o,s;const i=e;if(i!=null){const d=O(i);s=d instanceof ke?(r=d,jr(r)):1}else s=0;let a;const l=n;if(l!=null){const d=O(l);a=d instanceof ke?(o=d,jr(o)):1}else a=0;const c=(s<a?a:s)|0;return c===0?Lt(t):Bt(t,e,n,c+1)}function id(e,t,n){let r,o,s,i,a,l,c,d,u;const h=e;if(h!=null){const _=O(h);u=_ instanceof ke?(r=_,jr(r)):1}else u=0;let f;const p=n;if(p!=null){const _=O(p);f=_ instanceof ke?(o=_,jr(o)):1}else f=0;if(f>u+2){const _=O(n);if(_ instanceof ke){const g=_;if(s=De(g),(s!=null?(i=O(s),i instanceof ke?(a=i,jr(a)):1):0)>u+1){const v=O(De(g));if(v instanceof ke){const b=v;return en(en(e,t,De(b)),re(b),en(Ne(b),re(g),Ne(g)))}else throw new Error("internal error: Set.rebalance")}else return en(en(e,t,De(g)),re(g),Ne(g))}else throw new Error("internal error: Set.rebalance")}else if(u>f+2){const _=O(e);if(_ instanceof ke){const g=_;if(l=Ne(g),(l!=null?(c=O(l),c instanceof ke?(d=c,jr(d)):1):0)>f+1){const v=O(Ne(g));if(v instanceof ke){const b=v;return en(en(De(g),re(g),De(b)),re(b),en(Ne(b),t,n))}else throw new Error("internal error: Set.rebalance")}else return en(De(g),re(g),en(Ne(g),t,n))}else throw new Error("internal error: Set.rebalance")}else return en(e,t,n)}function Hr(e,t,n){if(n!=null){const r=O(n),o=e.Compare(t,re(r))|0;if(r instanceof ke){const s=r;return o<0?id(Hr(e,t,De(s)),re(s),Ne(s)):o===0?n:id(De(s),re(s),Hr(e,t,Ne(s)))}else{const s=e.Compare(t,re(r))|0;return s<0?Bt(t,void 0,n,2):s===0?n:Bt(t,n,void 0,2)}}else return Lt(t)}function ad(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=O(s),a=r.Compare(o,re(i))|0;if(i instanceof ke){const l=i;if(a<0){e=r,t=o,n=De(l);continue e}else{if(a===0)return!0;e=r,t=o,n=Ne(l);continue e}}else return a===0}else return!1}}function ld(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=O(r);if(o instanceof ke){const s=o;ld(n,De(s)),n(re(s)),e=n,t=Ne(s);continue e}else n(re(o))}break}}class Ng extends he{constructor(t,n){super(),this.stack=t,this.started=n}}function cd(e){e:for(;;){const t=e;if(X(t))return qe();{const n=B(t),r=y(t);if(n!=null){const o=O(n);if(o instanceof ke){const s=o;e=Ue([De(s),Lt(re(s)),Ne(s)],r);continue e}else return t}else{e=r;continue e}}}}function ud(e){return new Ng(cd(ie(e)),!1)}function Mg(){throw new Error("Enumeration not started")}function Rg(){throw new Error("Enumeration already started")}function dd(e){if(e.started){const t=e.stack;if(X(t))return Rg();if(B(t)!=null){const n=O(B(t));return re(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return Mg()}function Pg(e){if(e.started){const t=e.stack;if(X(t))return!1;if(B(t)!=null){if(O(B(t))instanceof ke)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=cd(y(t)),!X(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!X(e.stack)}function fd(e){let t=ud(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return dd(t)},"System.Collections.IEnumerator.get_Current"(){return dd(t)},"System.Collections.IEnumerator.MoveNext"(){return Pg(t)},"System.Collections.IEnumerator.Reset"(){t=ud(e)},Dispose(){}}}function Og(e,t,n){e:for(;;){const r=e,o=t,s=n;if(X(o))return X(s)?0:-1;if(X(s))return 1;if(B(s)!=null)if(B(o)!=null){const i=O(B(o)),a=O(B(s));if(i instanceof ke){const l=i;if(De(l)==null)if(a instanceof ke){const c=a;if(De(c)==null){const d=r.Compare(re(l),re(c))|0;if(d!==0)return d|0;e=r,t=Pt(Ne(l),y(o)),n=Pt(Ne(c),y(s));continue e}else{let d,u,h,f,p;switch(X(o)?X(s)?d=2:B(s)!=null?(d=1,f=y(s),p=O(B(s))):d=2:B(o)!=null?(d=0,u=y(o),h=O(B(o))):X(s)?d=2:B(s)!=null?(d=1,f=y(s),p=O(B(s))):d=2,d){case 0:if(h instanceof ke){const _=h;e=r,t=Ue([De(_),Bt(re(_),void 0,Ne(_),0)],u),n=s;continue e}else{e=r,t=Ue([void 0,Lt(re(h))],u),n=s;continue e}case 1:if(p instanceof ke){const _=p;e=r,t=o,n=Ue([De(_),Bt(re(_),void 0,Ne(_),0)],f);continue e}else{e=r,t=o,n=Ue([void 0,Lt(re(p))],f);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(re(l),re(a))|0;if(c!==0)return c|0;e=r,t=Pt(Ne(l),y(o)),n=Pt(void 0,y(s));continue e}else{let c,d,u,h,f;switch(X(o)?X(s)?c=2:B(s)!=null?(c=1,h=y(s),f=O(B(s))):c=2:B(o)!=null?(c=0,d=y(o),u=O(B(o))):X(s)?c=2:B(s)!=null?(c=1,h=y(s),f=O(B(s))):c=2,c){case 0:if(u instanceof ke){const p=u;e=r,t=Ue([De(p),Bt(re(p),void 0,Ne(p),0)],d),n=s;continue e}else{e=r,t=Ue([void 0,Lt(re(u))],d),n=s;continue e}case 1:if(f instanceof ke){const p=f;e=r,t=o,n=Ue([De(p),Bt(re(p),void 0,Ne(p),0)],h);continue e}else{e=r,t=o,n=Ue([void 0,Lt(re(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof ke){const l=a;if(De(l)==null){const c=r.Compare(re(i),re(l))|0;if(c!==0)return c|0;e=r,t=Pt(void 0,y(o)),n=Pt(Ne(l),y(s));continue e}else{let c,d,u,h,f;switch(X(o)?X(s)?c=2:B(s)!=null?(c=1,h=y(s),f=O(B(s))):c=2:B(o)!=null?(c=0,d=y(o),u=O(B(o))):X(s)?c=2:B(s)!=null?(c=1,h=y(s),f=O(B(s))):c=2,c){case 0:if(u instanceof ke){const p=u;e=r,t=Ue([De(p),Bt(re(p),void 0,Ne(p),0)],d),n=s;continue e}else{e=r,t=Ue([void 0,Lt(re(u))],d),n=s;continue e}case 1:if(f instanceof ke){const p=f;e=r,t=o,n=Ue([De(p),Bt(re(p),void 0,Ne(p),0)],h);continue e}else{e=r,t=o,n=Ue([void 0,Lt(re(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(re(i),re(a))|0;if(l!==0)return l|0;e=r,t=y(o),n=y(s);continue e}}else{O(B(s));let i,a,l,c,d;switch(X(o)?X(s)?i=2:B(s)!=null?(i=1,c=y(s),d=O(B(s))):i=2:B(o)!=null?(i=0,a=y(o),l=O(B(o))):X(s)?i=2:B(s)!=null?(i=1,c=y(s),d=O(B(s))):i=2,i){case 0:if(l instanceof ke){const u=l;e=r,t=Ue([De(u),Bt(re(u),void 0,Ne(u),0)],a),n=s;continue e}else{e=r,t=Ue([void 0,Lt(re(l))],a),n=s;continue e}case 1:if(d instanceof ke){const u=d;e=r,t=o,n=Ue([De(u),Bt(re(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=o,n=Ue([void 0,Lt(re(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(B(o)!=null){O(B(o));let i,a,l,c,d;switch(X(o)?X(s)?i=2:B(s)!=null?(i=1,c=y(s),d=O(B(s))):i=2:B(o)!=null?(i=0,a=y(o),l=O(B(o))):X(s)?i=2:B(s)!=null?(i=1,c=y(s),d=O(B(s))):i=2,i){case 0:if(l instanceof ke){const u=l;e=r,t=Ue([De(u),Bt(re(u),void 0,Ne(u),0)],a),n=s;continue e}else{e=r,t=Ue([void 0,Lt(re(l))],a),n=s;continue e}case 1:if(d instanceof ke){const u=d;e=r,t=o,n=Ue([De(u),Bt(re(u),void 0,Ne(u),0)],c);continue e}else{e=r,t=o,n=Ue([void 0,Lt(re(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=y(o),n=y(s);continue e}}}function hd(e,t,n){return t==null?n==null?0:-1:n==null?1:Og(e,ie(t),ie(n))|0}function Dg(e,t,n){let r=n;ld(o=>{Rt(t,r,o),r=r+1|0},e)}function Fg(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){e=r,t=Hr(r,s["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=s;continue e}else return o}}function Vg(e,t){return ts((n,r)=>Hr(e,r,n),void 0,t)}function Lg(e,t){return bn((n,r)=>Hr(e,r,n),void 0,t)}function pd(e,t){if(ln(t))return Vg(e,t);if(t instanceof vt)return Lg(e,t);{const n=Ve(t);try{return Fg(e,void 0,n)}finally{Ee(n)}}}class la{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return zg(this)|0}Equals(t){let n;const r=this;return t instanceof la&&(n=t,hd(Wr(r),tn(r),tn(n))===0)}toString(){return"set ["+pe("; ",ze(n=>_t(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return hd(Wr(n),tn(n),tn(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return ad(Wr(n),t,tn(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Dg(tn(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return ca(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return ca(this)|0}GetEnumerator(){return fd(tn(this))}[Symbol.iterator](){return ro(Ve(this))}"System.Collections.IEnumerable.GetEnumerator"(){return fd(tn(this))}get size(){return ca(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return $d(this,t)}keys(){return ze(n=>n,this)}values(){return ze(n=>n,this)}entries(){return ze(n=>[n,n],this)}forEach(t,n){const r=this;Rr(o=>{t(o,o,r)},r)}}function ws(e,t){return new la(e,t)}function Wr(e){return e.comparer}function tn(e){return e.tree}function Bg(e){return ws(e,void 0)}function Ug(e,t){return ws(Wr(e),Hr(Wr(e),t,tn(e)))}function ca(e){return Tg(tn(e))}function $d(e,t){return ad(Wr(e),t,tn(e))}function zg(e){let t=0;const n=Ve(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+_n(r)+631|0}}finally{Ee(n)}return Math.abs(t)|0}function ua(e,t){return $d(t,e)}function jg(e,t){return Ug(t,e)}function Hg(e){return Bg(e)}function Wg(e,t){return ws(t,pd(t,e))}function Gg(e,t){return ws(t,pd(t,e))}function So(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
|
|
1
|
+
(function(){"use strict";function Xt(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function lh(e){return e!=null&&typeof e.GetEnumerator=="function"}function ch(e){return e!=null&&typeof e.CompareTo=="function"}function uh(e){return e!=null&&typeof e.Equals=="function"}function qa(e){return e!=null&&typeof e.GetHashCode=="function"}function qs(e){return e!=null&&typeof e.Dispose=="function"}function we(e){qs(e)&&e.Dispose()}function he(){return null}function Vo(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class dh{constructor(t){this.iter=t,this.current=he()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Re(e){return lh(e)?e.GetEnumerator():new dh(e[Symbol.iterator]())}function Zr(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class fh{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function ge(e,t){return e.toString(10).padStart(t,"0")}function hh(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Ka(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function ph(e,t){return e=e<0&&t!=null&&t!==10?65535+e+1:e,e.toString(t)}function zn(e,t){return e=e<0&&t!=null&&t!==10?4294967295+e+1:e,e.toString(t)}class an{static id(t){return an.idMap.has(t)||an.idMap.set(t,++an.count),an.idMap.get(t)}}an.idMap=new WeakMap,an.count=0;function $r(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Lt(e){return e*2654435761|0}function Za(e){return $r(e.toString(32))}function Jr(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const o=e[r];t=(t<<5)+t^o}return t}function mh(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Lt(e);case"bigint":return Za(e);case"string":return $r(e);default:return Lt(an.id(e))}}function $h(e){return qa(e)?e.GetHashCode():mh(e)}function gh(e){return e.getTime()}function wh(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=ln(e[r]);return Jr(n)}function ln(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Lt(e);case"bigint":return Za(e);case"string":return $r(e);default:{if(qa(e))return e.GetHashCode();if(Xt(e))return wh(e);if(e instanceof Date)return gh(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>ln(r));return Jr(n)}else return Lt(an.id(e))}}}function bh(e){return $h(e)}function Ks(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ja(e,t){return Ks(e,t,He)}function _h(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!He(e[n[o]],t[r[o]]))return!1;return!0}function He(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:uh(e)?e.Equals(t):Xt(e)?Xt(t)&&Ja(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&Ya(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&_h(e,t)}function Ya(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Ka(e),r=t.getTime()+Ka(t)),n===r?0:n<r?-1:1}function Yr(e,t){return e===t?0:e<t?-1:1}function yh(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),o!==0)return o;return 0}function Xa(e,t){return yh(e,t,Ft)}function vh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,s=0;o<n.length;o++){const i=n[o];if(i!==r[o])return i<r[o]?-1:1;if(s=Ft(e[i],t[i]),s!==0)return s}return 0}function Ft(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:ch(e)?e.CompareTo(t):Xt(e)?Xt(t)?Xa(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?Ya(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?vh(e,t):-1}function D(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function xh(e){Xt(e)?e.splice(0):e.clear()}const Lo=new WeakMap;function be(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Lo.set(t,e),t}function kn(e){return Lo.get(e)??(t=>n=>e(t,n))}function Zs(e){if(e==null)return null;const t=(n,r,o)=>e(n)(r)(o);return Lo.set(t,e),t}function Js(e){return Lo.get(e)??(t=>n=>r=>e(t,n,r))}function Ch(e){let t=0,n="[";for(const r of e){if(t===0)n+=dt(r);else if(t===100){n+="; ...";break}else n+="; "+dt(r);t++}return n+"]"}function dt(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return Ch(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([o,s])=>o+" = "+dt(s,t+1)).join(`
|
|
2
|
+
`)+" }":(r==null?void 0:r.name)??""}}return String(e)}function Sh(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=dt(t[0]),r=n.indexOf(" ")>=0):n=t.map(o=>dt(o)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class z{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return Sh(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>ln(n));return t.splice(0,0,Lt(this.tag)),Jr(t)}Equals(t){return this===t?!0:Vo(this,t)&&this.tag===t.tag?Ja(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Vo(this,t)?this.tag===t.tag?Xa(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function kh(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function Ah(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+dt(n)).join(`
|
|
3
|
+
`)+" }"}function Eh(e){const t=Object.values(e).map(n=>ln(n));return Jr(t)}function Ih(e,t){if(e===t)return!0;if(Vo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!He(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function Th(e,t){if(e===t)return 0;if(Vo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=Ft(e[n[r]],t[n[r]]);if(o!==0)return o}return 0}else return-1}class ie{toJSON(){return kh(this)}toString(){return Ah(this)}GetHashCode(){return Eh(this)}Equals(t){return Ih(this,t)}CompareTo(t){return Th(this,t)}}class ft{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class Nh{constructor(t){this.message=t}}function Mh(e){return e instanceof Nh||e instanceof Error}function Rh(e){return e instanceof Promise}function Bo(e){return Mh(e)||Rh(e)?e:new Error(String(e))}const gr=Symbol("numeric");function Qa(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[gr])}function Oh(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Ys(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[gr]().multiply(t)}function Uo(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[gr]().toFixed(t)}function zo(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[gr]().toPrecision(t)}function jo(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[gr]().toExponential(t)}function Ho(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[gr]().toHex()}class Ph{constructor(t,n,r,o){this.declaringType=t,this.tag=n,this.name=r,this.fields=o}}class Bt{constructor(t,n,r,o,s,i,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=o,this.fields=s,this.cases=i,this.enumCases=a}toString(){return Me(this)}GetHashCode(){return el(this)}Equals(t){return Xs(this,t)}}function xt(e){return e.generics!=null?e.generics:[]}function el(e){const t=$r(e.fullname),n=xt(e).map(el);return Jr([t,...n])}function Xs(e,t){return e.fullname===""?t.fullname===""&&Ks(Qr(e),Qr(t),([n,r],[o,s])=>n===o&&Xs(r,s)):e.fullname===t.fullname&&Ks(xt(e),xt(t),Xs)}function ht(e,t,n,r){return new Bt(e,t,n,void 0,r)}function tl(e,t,n,r){const o=new Bt(e,t,n,void 0,void 0,()=>{const s=n.prototype.cases();return r().map((i,a)=>new Ph(o,a,s[a],i))});return o}function Ee(e){return new Bt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Qs(e){return new Bt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function nl(e){return new Bt("[]",[e])}const Dh=new Bt("System.Object"),j=new Bt("System.String");function wr(e){if(Array.isArray(e))return e[0];if(e instanceof Bt){const t=Xr(e);if(t!=null)return wr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Me(e){const t=Xr(e);return t!=null?Me(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Me(n)).join(",")+"]"}function rl(e){return Xr(e)!=null}function Xr(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function ol(e){return e.generics!=null&&e.generics.length>0}function ei(e){return e.enumCases!=null&&e.enumCases.length>0}function sl(e){return e.generics==null?e:new Bt(e.fullname,e.generics.map(()=>Dh))}function il(e){var t;return(t=e.generics)==null?void 0:t[0]}function br(e){if(ei(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Fh(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function _r(e,t){const n=parseInt(t,10);return Fh(e,isNaN(n)?t:n)[1]}function al(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function Qr(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function ll(e){if(ti(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function cl(e){return e instanceof Bt?e.cases!=null:e instanceof z}function ul(e){return e instanceof Bt?e.fields!=null:e instanceof ie}function ti(e){return e.fullname.startsWith("System.Tuple")}function Vh(e,t){const r=al(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function dl(e){return e.fields==null?[]:e.fields}function Lh(e,t){return e[t[0]]}function Ev(e){return e}function Bh(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function Uh(e,t){const n=Qr(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[o,s],i)=>(r[o]=t[i],r),{})}function zh(e,t){return e}const jh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Hh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Wh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Gh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ct(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function fl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function qh(e,t){let n=t;const r=e[t];let o="",s=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){s=!0;break}else if(i==="\\")if(t<e.length)t++,o+=e[t];else throw new Error("Invalid string format");else o+=i}if(!s)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function ni(e,t,n){let r=0,o=0,s="";const i=n?eo(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(o=Ct(t,r,"d"),r+=o,o){case 1:s+=ml(i);break;case 2:s+=ge(ml(i),2);break;case 3:s+=jh[wl(i)];break;case 4:s+=Hh[wl(i)];break}break;case"f":if(o=Ct(t,r,"f"),r+=o,o<=3){const $=10**(3-o);s+=ge(Math.floor(Ko(i)/$),o)}else o<=7&&(s+=(""+Ko(i)).padEnd(o,"0"));break;case"F":if(o=Ct(t,r,"F"),r+=o,o<=3){const $=10**(3-o),v=Math.floor(Ko(i)/$);v!=0&&(s+=ge(v,o))}else if(o<=7){const $=Ko(i);$!=0&&(s+=ge($,3))}break;case"g":o=Ct(t,r,"g"),r+=o,o<=2&&(s+="A.D.");break;case"h":switch(o=Ct(t,r,"h"),r+=o,o){case 1:s+=qo(i)%12;break;case 2:s+=ge(qo(i)%12,2);break}break;case"H":switch(o=Ct(t,r,"H"),r+=o,o){case 1:s+=qo(i);break;case 2:s+=ge(qo(i),2);break}break;case"K":switch(o=Ct(t,r,"K"),r+=o,o){case 1:switch(hl(i)){case 1:s+="Z";break;case 2:s+=yr(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(o=Ct(t,r,"m"),r+=o,o){case 1:s+=$l(i);break;case 2:s+=ge($l(i),2);break}break;case"M":switch(o=Ct(t,r,"M"),r+=o,o){case 1:s+=Zo(i);break;case 2:s+=ge(Zo(i),2);break;case 3:s+=Wh[Zo(i)-1];break;case 4:s+=Gh[Zo(i)-1];break}break;case"s":switch(o=Ct(t,r,"s"),r+=o,o){case 1:s+=gl(i);break;case 2:s+=ge(gl(i),2);break}break;case"t":switch(o=Ct(t,r,"t"),r+=o,o){case 1:s+=i.getHours()<12?"A":"P";break;case 2:s+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(o=Ct(t,r,"y"),r+=o,o){case 1:s+=i.getFullYear()%100;break;case 2:s+=ge(i.getFullYear()%100,2);break;case 3:s+=ge(i.getFullYear(),3);break;case 4:s+=ge(i.getFullYear(),4);break;case 5:s+=ge(i.getFullYear(),5);break}break;case"z":o=Ct(t,r,"z"),r+=o;let l="";switch(hl(i)){case 1:l="+00:00";break;case 2:l=yr(i.getTimezoneOffset()*-6e4);break;case 0:l=yr(np(i).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(o){case 1:s+=`${c}${d}`;break;case 2:s+=`${c}${ge(d,2)}`;break;default:s+=`${c}${ge(d,2)}:${ge(u,2)}`;break}break;case":":s+=":",r++;break;case"/":s+="/",r++;break;case"'":case'"':const[h,f]=qh(t,r);s+=h,r+=f;break;case"%":const p=fl(t,r);if(p>=0&&p!==37)r+=2,s+=ni(i,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const b=fl(t,r);if(b>=0)r+=2,s+=String.fromCharCode(b);else throw new Error("Invalid format string");break;default:r++,s+=a;break}}return s}function hl(e){return e.kind||0}function yr(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+ge(n,2)+":"+ge(r,2)}function Wo(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Kh(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return ge(e.getFullYear(),4)+"-"+ge(e.getMonth()+1,2)+"-"+ge(e.getDate(),2)+"T"+ge(e.getHours(),2)+":"+ge(e.getMinutes(),2)+":"+ge(e.getSeconds(),2)+"."+ge(e.getMilliseconds(),3)+(n?yr(e.getTimezoneOffset()*-6e4):"")}}function Zh(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+yr(t)}function Jh(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+yr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Wo(n,"first");case"T":case"t":return Wo(n,"second");case"O":case"o":return Zh(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return ni(n,t,!0)}function Yh(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?Wo(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Wo(e,"second"):e.toLocaleTimeString();case"O":case"o":return Kh(e,n);default:throw new Error("Unrecognized Date print format")}else return ni(e,t,n)}function Go(e,t,n){return e.offset!=null?Jh(e,t):Yh(e,t)}function eo(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Xh(){return eo(-621355968e5,1)}function pl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(o!=null){let s,i=0;if(o[2]!=null){const a=o[2].split(":"),l=parseInt(a[0],10);i=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),o[3]!=null&&o[3].toUpperCase()==="PM"&&l<12&&(i+=720)}if(o[4]!=null){if(o[1]!=null)s=new Date(o[1]+" UTC");else{const a=new Date;s=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(o[4]==="Z")r="Z";else{let a=parseInt(o[5],10)*60+parseInt(o[6]||"0",10);o[4][0]==="-"&&(a*=-1),r=a,i-=a*60}}else if(o[1]!=null)s=new Date(o[1]);else{const a=new Date;s=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(s.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-s.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function Qh(e,t=!1){const[n,r]=pl(e),o=r!=null?t&&r==="Z"?1:2:0;return eo(n.getTime(),o)}function ep(e,t){try{return t.contents=Qh(e),!0}catch{return!1}}function tp(e){return e.kind===1?e:eo(e.getTime(),1)}function np(e){return e.kind===2?e:eo(e.getTime(),2)}function ml(e){return e.kind===1?e.getUTCDate():e.getDate()}function qo(e){return e.kind===1?e.getUTCHours():e.getHours()}function Ko(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function $l(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Zo(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function gl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function wl(e){return e.kind===1?e.getUTCDay():e.getDay()}function bl(e,t=0){if(t&-284)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function ri(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function rp(e,t,n=0){return e.lastIndex=n,e.exec(t)}function _l(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,s=-1;for(;(o=e.exec(t))!=null;)o.index===s?e.lastIndex++:(s=o.index,r.push(o));return r}function op(e,t,n,r,o=0){function s(){let i=arguments[0];if(r){r--;const a=[],l=arguments.length,c=typeof arguments[l-1]!="string";let d=c?l-3:l-2;for(let u=0;u<d;u++)a.push(arguments[u]);a.index=arguments[d++],a.input=arguments[d++],c&&(a.groups=arguments[d]),i=n(a)}return i}if(typeof e=="string"){const i=e;e=bl(t,r??0),t=i,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,o)+t.substring(o).replace(e,s);if(n=n.replace(/\$0/g,i=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let i;const a=t.substring(o),l=_l(e,a),c=_l.length>r?(i=l[r-1],a.substring(0,i.index+i[0].length)):a;return t.substring(0,o)+c.replace(e,n)+t.substring(o+c.length)}else return t.replace(e,n)}const to=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,no=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,sp=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function yl(e,t){return Oh(e,t)<0}function Ut(e){return{input:e,cont:ip(e)}}function vl(e,t){let n=0,r=0,o="";no.lastIndex=0;let s=no.exec(e);for(;s;){const i=s.index+(s[1]||"").length;o+=e.substring(r,i).replace(/%%/g,"%");const[,,a,l,c,d]=s;r=no.lastIndex,o+=Sl(t[n++],a,l,c,d),no.lastIndex=r-1,s=no.exec(e)}return o+=e.substring(r).replace(/%%/g,"%"),o}function oi(e,t){return typeof t=="string"?e(t):t.cont(e)}function xl(e){return oi(t=>console.log(t),e)}function Qt(e){return oi(t=>t,e)}function Cl(e){return oi(t=>{throw new Error(t)},e)}function Sl(e,t,n,r,o){let s="";if(t=t||"",o=o||"",Qa(e))switch(o.toLowerCase()!=="x"&&(yl(e,0)?(e=Ys(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),r=r==null?null:parseInt(r,10),o){case"f":case"F":r=r??6,e=Uo(e,r);break;case"g":case"G":e=r!=null?zo(e,r):zo(e);break;case"e":case"E":e=r!=null?jo(e,r):jo(e);break;case"x":e=Ho(e);break;case"X":e=Ho(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Go(e):e=dt(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=s+e;else{const i=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!i?" ":"0";l==="0"?(e=ro(e,n-s.length,l,a),e=s+e):e=ro(s+e,n,l,a)}return e}function kl(e,t,n,r="",o=-1){return(...s)=>{let i=r;const a=t.slice(),l=n.slice();for(const c of s){const[,,d,u,h,f]=l[0];let p=u;if(o>=0)p=o,o=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");o=c;continue}i+=a[0],i+=Sl(c,d,p,h,f),a.splice(0,1),l.splice(0,1)}return l.length===0?(i+=a[0],e(i)):kl(e,a,l,i,o)}}function ip(e){return t=>{to.lastIndex=0;const n=[],r=[];let o=0,s=to.exec(e);for(;s;){const i=s.index+(s[1]||"").length;n.push(e.substring(o,i).replace(/%%/g,"%")),r.push(s),o=to.lastIndex,to.lastIndex-=1,s=to.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(o).replace(/%%/g,"%")),kl(t,n,r))}}function Al(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(sp,(r,o,s,i,a,l)=>{if(o<0||o>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[o];if(Qa(c))switch(a=a==null?null:parseInt(a,10),i){case"f":case"F":a=a??2,c=Uo(c,a);break;case"g":case"G":c=a!=null?zo(c,a):zo(c);break;case"e":case"E":c=a!=null?jo(c,a):jo(c);break;case"p":case"P":a=a??2,c=Uo(Ys(c,100),a)+" %";break;case"d":case"D":c=a!=null?si(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?si(Ho(c),a,"0"):Ho(c),i==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,h,f)=>{yl(c,0)&&(c=Ys(c,-1),d="-"),f=f==null?"":f.substring(1),c=Uo(c,Math.max(f.length,0));let[p,b]=c.split(".");b||(b="");const $=h.replace(/,/g,"").replace(/^#+/,"").length;p=si(p,$,"0");const v=f.replace(/#+$/,"").length;if(v>b.length?b=lp(b,v,"0"):v<b.length&&(b=b.substring(0,v)+b.substring(v).replace(/0+$/,"")),h.indexOf(",")>0){const y=p.length%3,C=Math.floor(p.length/3);let R=y>0?p.substr(0,y)+(C>0?",":""):"";for(let L=0;L<C;L++)R+=p.substr(y+L*3,3)+(L<C-1?",":"");p=R}return b.length>0?p+"."+b:p}),c=d+c}}else c instanceof Date?c=Go(c,l||i):c=dt(c);return s=parseInt((s||" ").substring(1),10),isNaN(s)||(c=ro(String(c),Math.abs(s)," ",s<0)),c})}function ap(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Jo(e){return typeof e!="string"||e.length===0}function El(e){return typeof e!="string"||/^\s*$/.test(e)}function ae(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ro(e,t,n,r){n=n||" ",t=t-e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function si(e,t,n){return ro(e,t,n)}function lp(e,t,n){return ro(e,t,n,!0)}function ii(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const o=(r&1)===1,s=(r&2)===2;t=t||[],t=t.filter(d=>d).map(ri),t=t.length>0?t:["\\s"];const i=[],a=new RegExp(t.join("|"),"g");let l=!0,c=0;do{const d=a.exec(e);if(d===null){const u=s?e.substring(c).trim():e.substring(c);(!o||u.length>0)&&i.push(u),l=!1}else{const u=s?e.substring(c,d.index).trim():e.substring(c,d.index);(!o||u.length>0)&&(n!=null&&i.length+1===n?(i.push(s?e.substring(c).trim():e.substring(c)),l=!1):i.push(u)),c=a.lastIndex}}while(l);return i}function cp(e,...t){if(t.length===0)return e.trim();const n="["+ri(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function up(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+ri(t.join(""))+"]+$"),"")}function Il(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class jn{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return ln(this.value)}Equals(t){return t==null?!1:He(this.value,t instanceof jn?t.value:t)}CompareTo(t){return t==null?1:Ft(this.value,t instanceof jn?t.value:t)}}function T(e){if(e==null)throw new Error("Option has no value");return e instanceof jn?e.value:e}function ai(e){return e instanceof jn?e.value:e}function nt(e){return e==null||e instanceof jn?new jn(e):e}function dp(e){return e??void 0}function li(e){return e==null?[]:[T(e)]}function Ye(e,t){return e!=null?T(e):t}function Tl(e,t){return e!=null?T(e):t()}function zt(e,t){return t!=null?nt(e(T(t))):void 0}const Nl="Collection was empty.";function ci(e,t){return typeof e=="function"?new e(t):new Array(t)}function Ml(e,t){return e>t?e:t}function Yo(e,t,n,r){const o=t|0;return e.fill(r,o,o+n)}function An(e,t,n){const r=t.length|0,o=ci(n,r);for(let s=0;s<=r-1;s++)St(o,s,e(fe(s,t)));return o}function fp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=ci(r,t.length);for(let s=0;s<=t.length-1;s++)St(o,s,e(fe(s,t),fe(s,n)));return o}function hp(e,t){const n=ci(t,1);return St(n,0,e),n}function pp(e){return e.slice().reverse()}function mp(e,t){return t.find(e)}function $p(e,t,n){const r=[];for(let o=0;o<=t.length-1;o++){const s=e(fe(o,t));if(s!=null){const i=T(s);r.push(i)}}return He(n,he())?r:An(o=>o,r,n)}function Xo(e,t,n){const r=e;return n.reduce(r,t)}function gp(e,t){if(e<1)throw new Error("The input must be positive.\\nParameter name: size");if(t.length===0)return[[]];{const n=[];for(let r=0;r<=~~Math.ceil(t.length/e)-1;r++){let o;const s=r*e|0;o=t.slice(s,s+e),n.push(o)}return n}}function ui(e,t,n){return t==null}function fe(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function St(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function Rl(e,t,n){return t.reduceRight((r,o)=>e(o,r),n)}function wp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,fe(r,e));return n}class pt extends ie{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+ae("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=T(l),u=T(c);if(He(i.head,a.head)){o=d,s=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,o,s)=>{e:for(;;){const i=r,a=o,l=s,c=l.tail;if(c!=null){const d=T(c);if(i>18)return a|0;r=i+1,o=(a<<1)+ln(l.head)+631*i,s=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=T(l),u=T(c),h=Ft(i.head,a.head)|0;if(h===0){o=d,s=u;continue e}else return h|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return _p(this)}[Symbol.iterator](){return Zr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Re(this)}}class bp{constructor(t){this.xs=t,this.it=this.xs,this.current=he()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=T(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=he()}Dispose(){}}function _p(e){return new bp(e)}function je(){return new pt(he(),void 0)}function oo(e,t){return new pt(e,t)}function cn(e){return e.tail==null}function Ol(e){return((n,r)=>{e:for(;;){const o=n,i=r.tail;if(i!=null){n=o+1,r=T(i);continue e}else return o|0}})(0,e)|0}function En(e){if(e.tail!=null)return e.head;throw new Error(Nl+"\\nParameter name: list")}function rt(e){const t=e.tail;if(t!=null)return T(t);throw new Error(Nl+"\\nParameter name: list")}function Be(){return je()}function kt(e,t){return oo(e,t)}function ee(e){return oo(e,je())}function K(e){return cn(e)}function vr(e){return Ol(e)}function P(e){return En(e)}function _(e){return rt(e)}function Hn(e){const t=Ol(e)|0,n=Yo(new Array(t),0,t,null);return((o,s)=>{e:for(;;){const i=o,a=s;if(!cn(a)){St(n,i,En(a)),o=i+1,s=rt(a);continue e}break}})(0,e),n}function un(e,t,n){let r=t,o=n;for(;!cn(o);)r=e(r,P(o)),o=rt(o);return r}function Qo(e){return un((t,n)=>oo(n,t),je(),e)}function yp(e,t,n){return Rl(e,Hn(t),n)}function vp(e,t,n){return((o,s,i)=>{e:for(;;){const a=o,l=s,c=i;if(cn(c))return l;o=a+1,s=e(a,l,En(c)),i=rt(c);continue e}})(0,t,n)}function es(e,t){un((n,r)=>{e(r)},void 0,t)}function Pe(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=oo(fe(r,e),n);return n}function k(e){return Pe(e,je())}function xp(e){let t,n;if(Xt(e))return k(e);if(e instanceof pt)return e;{const r=je();let o=r;const s=Re(e);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"]();o=(t=o,n=new pt(l,void 0),t.tail=n,n)}}finally{we(s)}const i=o,a=je();return i.tail=a,rt(r)}}function ot(e,t){return un((n,r)=>oo(r,n),t,Qo(e))}function Cp(e,t){let n,r;const o=je();let s=o,i=t;for(;!cn(i);){let c=e(En(i));for(;!cn(c);)s=(n=s,r=new pt(En(c),void 0),n.tail=r,r),c=rt(c);i=rt(i)}const a=s,l=je();return a.tail=l,rt(o)}function Sp(e,t){const n=je(),r=vp((s,i,a)=>{const l=new pt(e(s,a),void 0);return i.tail=l,l},n,t),o=je();return r.tail=o,rt(n)}function Wn(e,t){const n=je(),r=un((s,i)=>{const a=new pt(e(i),void 0);return s.tail=a,a},n,t),o=je();return r.tail=o,rt(n)}function kp(e,t){return(r=>{e:for(;;){const o=r;if(cn(o))return;{const s=e(En(o));if(s==null){r=rt(o);continue e}else return s}}})(t)}function Ap(e,t){return kp(n=>e(n)?nt(n):void 0,t)}function Ep(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(cn(i))return;if(e(En(i)))return s;r=s+1,o=rt(i);continue e}})(0,t)}function Ip(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(cn(i))return;if(s===e)return nt(En(i));r=s+1,o=rt(i);continue e}})(0,t)}function Pl(e,t){const n=je(),r=un((s,i)=>{if(e(i)){const a=new pt(i,void 0);return s.tail=a,a}else return s},n,t),o=je();return r.tail=o,rt(n)}function Tp(e,t){const n=je(),r=je(),o=n,s=un((l,c)=>{let d,u;const h=l[0],f=l[1];return e(c)?[(d=new pt(c,void 0),h.tail=d,d),f]:[h,(u=new pt(c,void 0),f.tail=u,u)]},[o,r],t),i=je();s[0].tail=i;const a=je();return s[1].tail=a,[rt(o),rt(r)]}function Dl(e,t){const n=je(),r=un((s,i)=>{const a=e(i);if(a==null)return s;{const l=new pt(T(a),void 0);return s.tail=l,l}},n,t),o=je();return r.tail=o,rt(n)}function Fl(e,t,n){return Ep(r=>n.Equals(e,r),t)!=null}function Np(e,t){const n=Hn(t);return n.sort(e),k(n)}function Mp(e,t,n){return Np((r,o)=>n.Compare(e(r),e(o)),t)}function Rp(e,t){return k(An(k,gp(e,Hn(t))))}function Op(e){return new w(0,[e])}function Vl(e){return new w(1,[e])}class w extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function dn(e,t){return t.tag===0?Op(e(t.fields[0])):Vl(t.fields[0])}function Pp(e,t){return t.tag===0?e(t.fields[0]):Vl(t.fields[0])}function At(e){return e.tag===0}class Dp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function Ll(e){return new Dp(e)}function di(e){return e.fields[0]}class Fp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Vp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class Lp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class Bp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class Up extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let zp=class extends ie{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}};class jp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class Hp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function fn(e){return e.fields[0]}function st(e){return new Hp(e)}function ts(e){return fn(e)}class Wp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function hn(e){return e.fields[0]}function jt(e){return new Wp(e)}function ns(e){return hn(e)}class Gp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class qp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class Kp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class Zp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class Jp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class Yp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let Xp=class extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class Qp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}function em(e){throw new Error(e)}const tm="Enumeration already finished.",nm="Enumeration has not started. Call MoveNext.",Bl="The input sequence has an insufficient number of elements.",rm="Reset is not supported on this enumerator.";function om(){throw new Error(rm)}function fi(){throw new Error(nm)}function hi(){throw new Error(tm)}class sm{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const o=Re(t);try{for(;n<4&&o["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+dt(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{we(o)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Zr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function im(e){return new sm(e)}class am{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){om()}Dispose(){this.dispose()}}function rs(e,t,n){return new am(e,t,n)}function lm(e){let t,n,r=!1,o=!1,s;const i=()=>{if(o=!0,n!=null){const a=T(n);try{we(a)}finally{n=void 0}}if(t!=null){const a=T(t);try{we(a)}finally{t=void 0}}};return rs(()=>(r?o&&hi():fi(),s!=null?T(s):hi()),()=>{let a;if(r||(r=!0),o)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=T(d);if(u["System.Collections.IEnumerator.MoveNext"]())s=nt(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{we(u)}finally{n=void 0}}else{const u=T(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),Re(a)):(i(),l=!1)}else t=Re(e)}return T(l)}},()=>{o||i()})}function cm(e,t){return rs(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{we(t)}finally{}})}function Ul(e,t,n){let r=!1,o,s=nt(e());const i=()=>{if(s!=null){const l=T(s);try{n(l)}finally{s=void 0}}},a=()=>{try{i()}finally{o=void 0}};return rs(()=>(r||fi(),o!=null?T(o):hi()),()=>{if(r||(r=!0),s!=null){const l=T(s);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(o=c,!0):(a(),!1)}else return!1},i)}function um(e,t){let n,r=t;return rs(()=>{if(n!=null){const o=T(n)[0];return T(n)[1],o}else return fi()},()=>(n=e(r),n!=null?(T(n)[0],r=T(n)[1],!0):!1),()=>{})}function dm(e,t){t==null&&em(e)}function xr(e){return im(e)}function pn(e){return dm("source",e),Re(e)}function A(e){return xr(()=>Re(e()))}function pi(e){return xr(()=>lm(e))}function fm(e,t){return xr(()=>um(e,t))}function Et(){return A(()=>new Array(0))}function E(e){return A(()=>hp(e))}function Iv(e){return e}function mi(e){return e instanceof pt?Hn(e):Array.from(e)}function Ie(e){return Xt(e)?k(e):e instanceof pt?e:xp(e)}function zl(e,t,n){return xr(()=>Ul(e,t,n))}function jl(e,t,n){return xr(()=>{let r=-1;return Ul(e,o=>(r=r+1|0,t(r,o)),n)})}function B(e,t){return pi([e,t])}function so(e,t){return zl(()=>pn(t),n=>{let r;for(;r==null&&n["System.Collections.IEnumerator.MoveNext"]();)r=e(n["System.Collections.Generic.IEnumerator`1.get_Current"]());return r},n=>{we(n)})}function hm(e,t,n){const r=pn(t);try{const o=pn(n);try{let s=0,i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]();for(;s===0&&i&&a;)s=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),o["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,s===0&&(i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]());return(s!==0?s:i?1:a?-1:0)|0}finally{we(o)}}finally{we(r)}}function Cr(e,t,n){const r=pn(t);try{let o=!1;for(;!o&&r["System.Collections.IEnumerator.MoveNext"]();)o=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{we(r)}}function io(e,t,n){const r=pn(n);try{let o=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)o=e(o,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{we(r)}}function Sr(e,t){io((n,r)=>{e(r)},void 0,t)}function pm(e,t){io((n,r)=>(e(n,r),n+1|0),0,t)}function De(e,t){return zl(()=>pn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?nt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{we(n)})}function $i(e,t){return jl(()=>pn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?nt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{we(n)})}function mm(e){return A(()=>pp(mi(e)))}function $m(e,t){return xr(()=>{const n=pn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Bl+"\\nParameter name: source");return cm(()=>{},n)}catch(r){throw we(n),r}})}function gm(e,t){return jl(()=>pn(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return nt(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Bl+"\\nParameter name: source")}else return},n=>{we(n)})}function wm(e,t){return A(()=>pi(De(e,t)))}const Gn={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function gi(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function bm(e,t){switch(t){case Gn.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case Gn.SnakeCase:return gi(e,"_");case Gn.SnakeCaseAllCaps:return gi(e,"_").toUpperCase();case Gn.KebabCase:return gi(e,"-");case Gn.None:default:return e}}function In(e,t=Gn.None){const n={},r=t;function o(i){throw new Error("Cannot infer key and value of "+String(i))}function s(i,a,l){i=bm(i,a),n[i]=l}for(let i of e){let a=Gn.None;if(i==null&&o(i),i instanceof z){const l=i.cases()[i.tag];i=i.fields.length===0?l:[l].concat(i.fields),a=r}if(Array.isArray(i))switch(i.length){case 0:o(i);break;case 1:s(i[0],a,!0);break;case 2:const l=i[1];s(i[0],a,l);break;default:s(i[0],a,i.slice(1))}else typeof i=="string"?s(i,a,!0):o(i)}return n}function Hl(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function ao(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class _m{constructor(t,n){const r=new ft(he());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const o=Re(t);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const s=o["System.Collections.Generic.IEnumerator`1.get_Current"]();wi(r.contents,s[0],s[1])}}finally{we(o)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return Re(this)}GetEnumerator(){return Re(pi(this.hashMap.values()))}[Symbol.iterator](){return Zr(Re(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){wi(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){Wl(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=os(this,t[0]);let o;switch(r!=null&&He(T(r)[1],t[1])?(o=0,T(r)):o=1,o){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){pm((o,s)=>{St(t,n+o,s)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return Gl(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=os(n,t[0]);return r!=null?(He(T(r)[1],t[1])&&bi(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){wi(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return Zl(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return ql(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Kl(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return mi(A(()=>De(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return bi(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const o=os(this,t);if(o!=null){const s=T(o);return n.contents=s[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return mi(A(()=>De(n=>n[1],t)))}get size(){return Gl(this)|0}clear(){Wl(this)}delete(t){return bi(this,t)}entries(){return De(n=>[n[0],n[1]],this)}get(t){return ql(this,t)}has(t){return Zl(this,t)}keys(){return De(n=>n[0],this)}set(t,n){const r=this;return Kl(r,t,n),r}values(){return De(n=>n[1],this)}forEach(t,n){const r=this;Sr(o=>{t(o[1],o[0],r)},r)}}function lo(e,t){const n=e.comparer.GetHashCode(t)|0;let r,o=he();return r=[Hl(e.hashMap,n,new ft(()=>o,s=>{o=s})),o],r[0]?[!0,n,r[1].findIndex(s=>e.comparer.Equals(t,s[0]))]:[!1,n,-1]}function os(e,t){const n=lo(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return ao(e.hashMap,n[1])[n[2]];default:return}}function Wl(e){e.hashMap.clear()}function Gl(e){let t=0,n=Re(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=t+r.length|0}}finally{we(n)}return t|0}function ql(e,t){const n=os(e,t);if(n!=null)return T(n)[1];throw new Error("The item was not found in collection")}function Kl(e,t,n){const r=lo(e,t);r[0]?r[2]>-1?ao(e.hashMap,r[1])[r[2]]=[t,n]:ao(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function wi(e,t,n){const r=lo(e,t);if(r[0]){if(r[2]>-1)throw new Error(Al("An item with the same key has already been added. Key: {0}",t));ao(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function Zl(e,t){const n=lo(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function bi(e,t){const n=lo(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return ao(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function ym(e){return new Jl(0,[e])}function vm(e){return new Jl(1,[e])}class Jl extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function xm(e){return ym(e)}function Cm(e){return vm(e)}const Sm=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Yl=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,km=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Am(e){function t(r){return r.replace(Yl,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(Sm.test(n))return cp(n,"{","}","(",")");if(Yl.test(n))return t(n);if(km.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function Em(e,t){try{return t.contents=Am(e),!0}catch{return!1}}class Xl extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function kr(e){return e.fields[0]}var _i;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(_i||(_i={}));function Im(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}function Ql(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Tm(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}function Nm(e,t){if(t&_i.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}function Mm(e,t,n){const o=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(o!=null){const[,,s,i]=o;if(n=n||Nm(s,t),!Tm(n).test(i))return Im(o,n)}return null}function Rm(e,t,n,r,o){const s=Mm(e,t,o);if(s!=null){let i=Number.parseInt(s.sign+s.digits,s.radix);if(!Number.isNaN(i)){const[a,l]=Ql(!0,r);!n&&s.radix!==10&&i>=a&&i<=l&&(i=i<<32-r>>32-r);const[c,d]=Ql(n,r);if(i>=c&&i<=d)return i}}throw new Error(`The input string ${e} was not in a correct format.`)}function Ar(e,t,n,r,o){try{return o.contents=Rm(e,t,n,r),!0}catch{return!1}}const Om="#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£ē︳𐀡%𐀡",Pm="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@";function Dm(){const t=[...Om].map(s=>(s.codePointAt(0)??0)-35),n=[...Pm].map(s=>(s.codePointAt(0)??0)-35),r=new Uint32Array(t),o=new Uint8Array(n);for(let s=1;s<r.length;++s)r[s]+=r[s-1];return s=>{let i=r.length,a=0;for(;i-a>1;){const l=Math.floor((i+a)/2),c=r[l];if(s<c)i=l;else if(s===c){i=a=l;break}else c<s&&(a=l)}return o[a]}}const Fm=256,Vm=Dm();function Lm(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const Bm=e=>zm(e,0);function Um(e,t){const n=Lm(e,t);return Vm(n)}function zm(e,t){return(1<<Um(e,t)&Fm)!==0}function jm(e,t){const n=rp(bl(e),t);if(n!=null)return _(Ie(A(()=>De(r=>r||"",n))))}function Hm(e){let t;const n=jm(".*?@(.*)",e);switch(n!=null?K(n)?t=1:K(_(n))?t=0:t=1:t=1,t){case 0:return e;default:return}}function It(e,t){return Jo(t)?new w(1,[Qt(Ut("%s cannot be null or empty"))(e)]):new w(0,[t])}function Wm(e){const t=Hm(e);if(t!=null){const n=t;return new w(0,[n])}else return new w(1,["Email is not in the correct format"])}function Gm(e){return~~e.charCodeAt(0)-48}function qm(e){let t;const n=new w(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),o=An(Gm,(t=e.split(""),t.filter(Bm)),Int32Array);return o.length===11?(St(o,0,fe(0,o)-1|0),wp(fp((s,i)=>s*i,o,r,Int32Array),{GetZero:()=>0,Add:(s,i)=>s+i})%89===0?new w(0,[e]):n):n}function ec(e){const t=It("Name",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[Ll(t.fields[0])])}function ss(e){return di(e)}function tc(e){const t=It("Website",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Fp(t.fields[0])])}function nc(e){return e.fields[0]}function rc(e){const t=It("FirstName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Vp(t.fields[0])])}function oc(e){return e.fields[0]}function sc(e){const t=It("LastName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Lp(t.fields[0])])}function ic(e){return e.fields[0]}function ac(e){let t;const n=It("Email",e);return t=n.tag===1?new w(1,[n.fields[0]]):Wm(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Bp(t.fields[0])])}function lc(e){const t=It("MobilePhone",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Up(t.fields[0])])}function cc(e){return e.fields[0]}class uc extends ie{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}}function yi(){return ht("AccountRegistry.Shared.Primitives.ContactDetails",[],uc,()=>[["FirstName",j],["LastName",j],["Email",j],["MobilePhone",j]])}function Km(e){const t=rc(e.FirstName);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=sc(e.LastName);if(n.tag===1)return new w(1,[n.fields[0]]);{const r=ac(e.Email);if(r.tag===1)return new w(1,[r.fields[0]]);{const o=lc(e.MobilePhone);return o.tag===1?new w(1,[o.fields[0]]):new w(0,[new zp(t.fields[0],n.fields[0],r.fields[0],o.fields[0])])}}}}function Zm(e){const t=e;if(t!=null)return new jp(t)}function Jm(e){if(e!=null)return e.fields[0]}function lt(e){return fn(e)}function mn(e){return hn(e)}function Ym(e){const t=It("BusinessName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Gp(t.fields[0])])}function Xm(e){let t;const n=It("BusinessNumber",e);return t=n.tag===1?new w(1,[n.fields[0]]):qm(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new qp(t.fields[0])])}function Qm(e){const t=It("Address1",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Kp(t.fields[0])])}function e$(e){const t=e;if(t!=null)return new Zp(t)}function t$(e){const t=It("City",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Jp(t.fields[0])])}function n$(e){const t=It("Postcode",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Yp(t.fields[0])])}function r$(e){const t=It("State",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Xp(t.fields[0])])}class o$ extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function s$(){return ht("AccountRegistry.Shared.Primitives.LegalEntity",[],o$,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",Ee(j)],["City",j],["Postcode",j],["State",Ee(j)],["Phone",j],["CountryCode",Ee(j)]])}function i$(e){const t=It("SalesforceParentRecordId",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Qp(t.fields[0])])}class dc extends ie{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function a$(){return ht("AccountRegistry.Shared.Primitives.SalesforceInfo",[],dc,()=>[["SalesforceParentRecordId",j],["SalesforceRecordId",Ee(j)]])}class fc extends ie{constructor(t,n){super(),this.Code=t,this.Name=n}}function l$(){return ht("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],fc,()=>[["Code",j],["Name",j]])}let c$=class extends ie{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}};function u$(){return ht("AccountRegistry.Shared.AdminApi.Partner",[],c$,()=>[["StreamId",j],["Name",j],["Website",j],["ContactDetails",Ee(yi())],["Notes",Ee(j)],["AccountProvisioningMode",f$()]])}class d$ extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function f$(){return tl("AccountRegistry.Shared.AdminApi.AccountProvisioningModeDto",[],d$,()=>[[],[]])}class h$ extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=o,this.ContactDetails=s,this.Notes=i,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c}}function p$(){return ht("AccountRegistry.Shared.AdminApi.Account",[],h$,()=>[["StreamId",j],["PartnerId",j],["Name",j],["Website",j],["ContactDetails",Ee(yi())],["Notes",Ee(j)],["LegalEntity",Ee(s$())],["ExternalId",Ee(j)],["ChannelId",Ee(j)]])}class m$ extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=o,this.Website=s,this.BusinessName=i,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c}}function $$(){return ht("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],m$,()=>[["AccountId",j],["Name",j],["Contact",Ee(j)],["ContactMobilePhone",Ee(j)],["Website",j],["BusinessName",Ee(j)],["BusinessNumber",Ee(j)],["ExternalId",Ee(j)],["ChannelId",Ee(j)]])}class hc extends ie{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function g$(){return ht("AccountRegistry.Shared.AdminApi.AccountLookup",[],hc,()=>[["Accounts",Qs($$())],["Token",Ee(j)]])}class w$ extends ie{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function b$(){return ht("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],w$,()=>[["PartnerId",j],["AccountId",j]])}class _$ extends ie{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function y$(){return ht("AccountRegistry.Shared.AdminApi.AnzsicClass",[],_$,()=>[["ClassCode",j],["ClassTitle",j]])}class v$ extends ie{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function x$(){return ht("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],v$,()=>[["GroupCode",j],["GroupTitle",j],["Classes",nl(y$())]])}class C$ extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function S$(){return tl("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],C$,()=>[[["Item",nl(x$())]],[]])}class pc extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function k$(){return ht("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],pc,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",Ee(j)],["City",j],["Postcode",j],["State",Ee(j)],["Phone",j],["CountryCode",j]])}class mc extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=o,this.LegalEntity=s,this.ExternalId=i,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function A$(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],mc,()=>[["Name",j],["Website",j],["ContactDetails",yi()],["Notes",Ee(j)],["LegalEntity",Ee(k$())],["ExternalId",Ee(j)],["ChannelId",Ee(j)],["SalesforceInfo",Ee(a$())],["AnzsicClassifier",Ee(l$())]])}class E$ extends ie{constructor(t){super(),this.Id=t}}function I$(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],E$,()=>[["Id",j]])}var co,te,$c,qn,gc,wc,vi,xi,Ci,Si,bc,uo={},_c=[],T$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,is=Array.isArray;function $n(e,t){for(var n in t)e[n]=t[n];return e}function yc(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?co.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return fo(e,i,r,o,null)}function fo(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++$c,__i:-1,__u:0};return o==null&&te.vnode!=null&&te.vnode(s),s}function ki(){return{current:null}}function Oe(e){return e.children}function Ht(e,t){this.props=e,this.context=t}function Kn(e,t){if(t==null)return e.__?Kn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Kn(e):null}function vc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return vc(e)}}function Ai(e){(!e.__d&&(e.__d=!0)&&qn.push(e)&&!as.__r++||gc!==te.debounceRendering)&&((gc=te.debounceRendering)||wc)(as)}function as(){var e,t,n,r,o,s,i,a;for(qn.sort(vi);e=qn.shift();)e.__d&&(t=qn.length,r=void 0,s=(o=(n=e).__v).__e,i=[],a=[],n.__P&&((r=$n({},o)).__v=o.__v+1,te.vnode&&te.vnode(r),Ei(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,i,s??Kn(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Ac(i,r,a),r.__e!=s&&vc(r)),qn.length>t&&qn.sort(vi));as.__r=0}function xc(e,t,n,r,o,s,i,a,l,c,d){var u,h,f,p,b,$=r&&r.__k||_c,v=t.length;for(n.__d=l,N$(n,t,$),l=n.__d,u=0;u<v;u++)(f=n.__k[u])!=null&&typeof f!="boolean"&&typeof f!="function"&&(h=f.__i===-1?uo:$[f.__i]||uo,f.__i=u,Ei(e,f,h,o,s,i,a,l,c,d),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ii(h.ref,null,f),d.push(f.ref,f.__c||p,f)),b==null&&p!=null&&(b=p),65536&f.__u||h.__k===f.__k?(l&&!l.isConnected&&(l=Kn(h)),l=Cc(f,l,e)):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:p&&(l=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=b}function N$(e,t,n){var r,o,s,i,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)i=r+u,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?fo(null,o,null,null,null):is(o)?fo(Oe,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?fo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=M$(o,n,i,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?u++:a>i?d>l-i?u+=a-i:u--:a<i?a==i-1&&(u=a-i):u=0,a!==r+u&&(o.__u|=65536))):(s=n[i])&&s.key==null&&s.__e&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=Kn(s)),Ti(s,s,!1),n[i]=null,d--);if(d)for(r=0;r<c;r++)(s=n[r])!=null&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=Kn(s)),Ti(s,s))}function Cc(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Cc(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function gn(e,t){return t=t||[],e==null||typeof e=="boolean"||(is(e)?e.some(function(n){gn(n,t)}):t.push(e)),t}function M$(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,l=t[n];if(l===null||l&&o==l.key&&s===l.type&&!(131072&l.__u))return n;if(r>(l!=null&&!(131072&l.__u)?1:0))for(;i>=0||a<t.length;){if(i>=0){if((l=t[i])&&!(131072&l.__u)&&o==l.key&&s===l.type)return i;i--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&s===l.type)return a;a++}}return-1}function Sc(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||T$.test(t)?n:n+"px"}function ls(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Sc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Sc(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=xi,e.addEventListener(t,s?Si:Ci,s)):e.removeEventListener(t,s?Si:Ci,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function kc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=xi++;else if(t.t<n.u)return;return n(te.event?te.event(t):t)}}}function Ei(e,t,n,r,o,s,i,a,l,c){var d,u,h,f,p,b,$,v,y,C,R,L,X,$e,_e,ue=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=te.__b)&&d(t);e:if(typeof ue=="function")try{if(v=t.props,y=(d=ue.contextType)&&r[d.__c],C=d?y?y.props.value:d.__:r,n.__c?$=(u=t.__c=n.__c).__=u.__E:("prototype"in ue&&ue.prototype.render?t.__c=u=new ue(v,C):(t.__c=u=new Ht(v,C),u.constructor=ue,u.render=O$),y&&y.sub(u),u.props=v,u.state||(u.state={}),u.context=C,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),ue.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=$n({},u.__s)),$n(u.__s,ue.getDerivedStateFromProps(v,u.__s))),f=u.props,p=u.state,u.__v=t,h)ue.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(ue.getDerivedStateFromProps==null&&v!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,C),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(Y){Y&&(Y.__=t)}),R=0;R<u._sb.length;R++)u.__h.push(u._sb[R]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,C),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,b)})}if(u.context=C,u.props=v,u.__P=e,u.__e=!1,L=te.__r,X=0,"prototype"in ue&&ue.prototype.render){for(u.state=u.__s,u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),$e=0;$e<u._sb.length;$e++)u.__h.push(u._sb[$e]);u._sb=[]}else do u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++X<25);u.state=u.__s,u.getChildContext!=null&&(r=$n($n({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(b=u.getSnapshotBeforeUpdate(f,p)),xc(e,is(_e=d!=null&&d.type===Oe&&d.key==null?d.props.children:d)?_e:[_e],t,n,r,o,s,i,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),$&&(u.__E=u.__=null)}catch(Y){t.__v=null,l||s!=null?(t.__e=a,t.__u|=l?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),te.__e(Y,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=R$(n.__e,t,n,r,o,s,i,l,c);(d=te.diffed)&&d(t)}function Ac(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Ii(n[r],n[++r],n[++r]);te.__c&&te.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){te.__e(s,o.__v)}})}function R$(e,t,n,r,o,s,i,a,l){var c,d,u,h,f,p,b,$=n.props,v=t.props,y=t.type;if(y==="svg"?o="http://www.w3.org/2000/svg":y==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!y&&(y?f.localName===y:f.nodeType===3)){e=f,s[c]=null;break}}if(e==null){if(y===null)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s=null,a=!1}if(y===null)$===v||a&&e.data===v||(e.data=v);else{if(s=s&&co.call(e.childNodes),$=n.props||uo,!a&&s!=null)for($={},c=0;c<e.attributes.length;c++)$[(f=e.attributes[c]).name]=f.value;for(c in $)if(f=$[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=f;else if(c!=="key"&&!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;ls(e,c,null,f,o)}}for(c in v)f=v[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?p=f:c=="checked"?b=f:c==="key"||a&&typeof f!="function"||$[c]===f||ls(e,c,f,$[c],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),xc(e,is(h)?h:[h],t,n,r,y==="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Kn(n,0),a,l),s!=null)for(c=s.length;c--;)s[c]!=null&&yc(s[c]);a||(c="value",p!==void 0&&(p!==e[c]||y==="progress"&&!p||y==="option"&&p!==$[c])&&ls(e,c,p,$[c],o),c="checked",b!==void 0&&b!==e[c]&&ls(e,c,b,$[c],o))}return e}function Ii(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){te.__e(r,n)}}function Ti(e,t,n){var r,o;if(te.unmount&&te.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ii(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){te.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ti(r[o],t,n||typeof e.type!="function");n||e.__e==null||yc(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function O$(e,t,n){return this.constructor(e,n)}function Tn(e,t,n){var r,o,s,i;te.__&&te.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Ei(t,e=(!r&&n||t).__k=m(Oe,null,[e]),o||uo,uo,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?co.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Ac(s,e,i)}function Ni(e,t){Tn(e,t,Ni)}function Mi(e,t,n){var r,o,s,i,a=$n({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?co.call(arguments,2):n),fo(e.type,a,r||e.key,o||e.ref,null)}function Nn(e,t){var n={__c:t="__cC"+bc++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,s;return this.getChildContext||(o=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&o.some(function(a){a.__e=!0,Ai(a)})},this.sub=function(i){o.push(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){o.splice(o.indexOf(i),1),a&&a.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}co=_c.slice,te={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},$c=0,Ht.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$n({},this.state),typeof e=="function"&&(e=e($n({},n),this.props)),e&&$n(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ai(this))},Ht.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ai(this))},Ht.prototype.render=Oe,qn=[],wc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vi=function(e,t){return e.__v.__b-t.__v.__b},as.__r=0,xi=0,Ci=kc(!1),Si=kc(!0),bc=0;var wn,ve,Ri,Ec,Er=0,Ic=[],cs=[],Fe=te,Tc=Fe.__b,Nc=Fe.__r,Mc=Fe.diffed,Rc=Fe.__c,Oc=Fe.unmount,Pc=Fe.__;function Zn(e,t){Fe.__h&&Fe.__h(ve,e,Er||t),Er=0;var n=ve.__H||(ve.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:cs}),n.__[e]}function We(e){return Er=1,Ir(Fc,e)}function Ir(e,t,n){var r=Zn(wn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Fc(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=ve,!ve.u)){var o=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!s||s.call(this,a,l,c);var u=!1;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!s||s.call(this,a,l,c))};ve.u=!0;var s=ve.shouldComponentUpdate,i=ve.componentWillUpdate;ve.componentWillUpdate=function(a,l,c){if(this.__e){var d=s;s=void 0,o(a,l,c),s=d}i&&i.call(this,a,l,c)},ve.shouldComponentUpdate=o}return r.__N||r.__}function Te(e,t){var n=Zn(wn++,3);!Fe.__s&&Vi(n.__H,t)&&(n.__=e,n.i=t,ve.__H.__h.push(n))}function bn(e,t){var n=Zn(wn++,4);!Fe.__s&&Vi(n.__H,t)&&(n.__=e,n.i=t,ve.__h.push(n))}function ce(e){return Er=5,it(function(){return{current:e}},[])}function Oi(e,t,n){Er=6,bn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function it(e,t){var n=Zn(wn++,7);return Vi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Mn(e,t){return Er=8,it(function(){return e},t)}function en(e){var t=ve.context[e.__c],n=Zn(wn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ve)),t.props.value):e.__}function Pi(e,t){Fe.useDebugValue&&Fe.useDebugValue(t?t(e):e)}function P$(e){var t=Zn(wn++,10),n=We();return t.__=e,ve.componentDidCatch||(ve.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Di(){var e=Zn(wn++,11);if(!e.__){for(var t=ve.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function D$(){for(var e;e=Ic.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(us),e.__H.__h.forEach(Fi),e.__H.__h=[]}catch(t){e.__H.__h=[],Fe.__e(t,e.__v)}}Fe.__b=function(e){ve=null,Tc&&Tc(e)},Fe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Pc&&Pc(e,t)},Fe.__r=function(e){Nc&&Nc(e),wn=0;var t=(ve=e.__c).__H;t&&(Ri===ve?(t.__h=[],ve.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=cs,n.__N=n.i=void 0})):(t.__h.forEach(us),t.__h.forEach(Fi),t.__h=[],wn=0)),Ri=ve},Fe.diffed=function(e){Mc&&Mc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ic.push(t)!==1&&Ec===Fe.requestAnimationFrame||((Ec=Fe.requestAnimationFrame)||F$)(D$)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==cs&&(n.__=n.__V),n.i=void 0,n.__V=cs})),Ri=ve=null},Fe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(us),n.__h=n.__h.filter(function(r){return!r.__||Fi(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Fe.__e(r,n.__v)}}),Rc&&Rc(e,t)},Fe.unmount=function(e){Oc&&Oc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{us(r)}catch(o){t=o}}),n.__H=void 0,t&&Fe.__e(t,n.__v))};var Dc=typeof requestAnimationFrame=="function";function F$(e){var t,n=function(){clearTimeout(r),Dc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Dc&&(t=requestAnimationFrame(n))}function us(e){var t=ve,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ve=t}function Fi(e){var t=ve;e.__c=e.__(),ve=t}function Vi(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Fc(e,t){return typeof t=="function"?t(e):t}function Vc(e,t){for(var n in t)e[n]=t[n];return e}function Li(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ds(e,t){this.props=e,this.context=t}function Lc(e,t){function n(o){var s=this.props.ref,i=s==o.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,o)||!i:Li(this.props,o)}function r(o){return this.shouldComponentUpdate=n,m(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ds.prototype=new Ht).isPureReactComponent=!0,ds.prototype.shouldComponentUpdate=function(e,t){return Li(this.props,e)||Li(this.state,t)};var Bc=te.__b;te.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Bc&&Bc(e)};var V$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rn(e){function t(n){var r=Vc({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=V$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Uc=function(e,t){return e==null?null:gn(gn(e).map(t))},zc={map:Uc,forEach:Uc,count:function(e){return e?gn(e).length:0},only:function(e){var t=gn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:gn},L$=te.__e;te.__e=function(e,t,n,r){if(e.then){for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}L$(e,t,n,r)};var jc=te.unmount;function Hc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Vc({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Hc(r,t,n)})),e}function Wc(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Wc(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ho(){this.__u=0,this.t=null,this.__b=null}function Gc(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qc(e){var t,n,r;function o(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return m(n,s)}return o.displayName="Lazy",o.__f=!0,o}function Tr(){this.u=null,this.o=null}te.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),jc&&jc(e)},(ho.prototype=new Ht).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Gc(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Wc(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},ho.prototype.componentWillUnmount=function(){this.t=[]},ho.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Hc(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&m(Oe,null,e.fallback);return o&&(o.__u&=-33),[m(Oe,null,t.__a?null:e.children),o]};var Kc=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function B$(e){return this.getChildContext=function(){return e.context},e.children}function U$(e){var t=this,n=e.i;t.componentWillUnmount=function(){Tn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Tn(m(B$,{context:t.context},e.__v),t.l)}function Zc(e,t){var n=m(U$,{__v:e,i:t});return n.containerInfo=t,n}(Tr.prototype=new Ht).__a=function(e){var t=this,n=Gc(t.__v),r=t.o.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),Kc(t,e,r)):o()};n?n(s):s()}},Tr.prototype.render=function(e){this.u=null,this.o=new Map;var t=gn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Tr.prototype.componentDidUpdate=Tr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Kc(e,n,t)})};var Jc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,z$=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,j$=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,H$=/[A-Z0-9]/g,W$=typeof document<"u",G$=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Yc(e,t,n){return t.__k==null&&(t.textContent=""),Tn(e,t),typeof n=="function"&&n(),e?e.__c:null}function Xc(e,t,n){return Ni(e,t),typeof n=="function"&&n(),e?e.__c:null}Ht.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Qc=te.event;function q$(){}function K$(){return this.cancelBubble}function Z$(){return this.defaultPrevented}te.event=function(e){return Qc&&(e=Qc(e)),e.persist=q$,e.isPropagationStopped=K$,e.isDefaultPrevented=Z$,e.nativeEvent=e};var Bi,J$={enumerable:!1,configurable:!0,get:function(){return this.class}},eu=te.vnode;te.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var s in n){var i=n[s];if(!(s==="value"&&"defaultValue"in n&&i==null||W$&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var a=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&i===!0?i="":a==="translate"&&i==="no"?i=!1:a==="ondoubleclick"?s="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||G$(n.type)?a==="onfocus"?s="onfocusin":a==="onblur"?s="onfocusout":j$.test(s)?s=a:r.indexOf("-")===-1&&z$.test(s)?s=s.replace(H$,"-$&").toLowerCase():i===null&&(i=void 0):a=s="oninput",a==="oninput"&&o[s=a]&&(s="oninputCapture"),o[s]=i}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=gn(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=gn(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",J$)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Jc,eu&&eu(e)};var tu=te.__r;te.__r=function(e){tu&&tu(e),Bi=e.__c};var nu=te.diffed;te.diffed=function(e){nu&&nu(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Bi=null};var ru={ReactCurrentDispatcher:{current:{readContext:function(e){return Bi.__n[e.__c].props.value},useCallback:Mn,useContext:en,useDebugValue:Pi,useDeferredValue:Hi,useEffect:Te,useId:Di,useImperativeHandle:Oi,useInsertionEffect:Gi,useLayoutEffect:bn,useMemo:it,useReducer:Ir,useRef:ce,useState:We,useSyncExternalStore:qi,useTransition:Wi}}},Y$="17.0.2";function ou(e){return m.bind(null,e)}function Nr(e){return!!e&&e.$$typeof===Jc}function su(e){return Nr(e)&&e.type===Oe}function iu(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ui(e){return Nr(e)?Mi.apply(null,arguments):e}function au(e){return!!e.__k&&(Tn(null,e),!0)}function lu(e){return e&&(e.base||e.nodeType===1&&e)||null}var cu=function(e,t){return e(t)},zi=function(e,t){return e(t)},uu=Oe;function ji(e){e()}function Hi(e){return e}function Wi(){return[!1,ji]}var Gi=bn,du=Nr;function qi(e,t){var n=t(),r=We({h:{__:n,v:t}}),o=r[0].h,s=r[1];return bn(function(){o.__=n,o.v=t,Ki(o)&&s({h:o})},[e,n,t]),Te(function(){return Ki(o)&&s({h:o}),e(function(){Ki(o)&&s({h:o})})},[e]),n}function Ki(e){var t,n,r=e.v,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var q={useState:We,useId:Di,useReducer:Ir,useEffect:Te,useLayoutEffect:bn,useInsertionEffect:Gi,useTransition:Wi,useDeferredValue:Hi,useSyncExternalStore:qi,startTransition:ji,useRef:ce,useImperativeHandle:Oi,useMemo:it,useCallback:Mn,useContext:en,useDebugValue:Pi,version:"17.0.2",Children:zc,render:Yc,hydrate:Xc,unmountComponentAtNode:au,createPortal:Zc,createElement:m,createContext:Nn,createFactory:ou,cloneElement:Ui,createRef:ki,Fragment:Oe,isValidElement:Nr,isElement:du,isFragment:su,isMemo:iu,findDOMNode:lu,Component:Ht,PureComponent:ds,memo:Lc,forwardRef:Rn,flushSync:zi,unstable_batchedUpdates:cu,StrictMode:uu,Suspense:ho,SuspenseList:Tr,lazy:qc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ru};const Zi=Object.freeze(Object.defineProperty({__proto__:null,Children:zc,Component:Ht,Fragment:Oe,PureComponent:ds,StrictMode:uu,Suspense:ho,SuspenseList:Tr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ru,cloneElement:Ui,createContext:Nn,createElement:m,createFactory:ou,createPortal:Zc,createRef:ki,default:q,findDOMNode:lu,flushSync:zi,forwardRef:Rn,hydrate:Xc,isElement:du,isFragment:su,isMemo:iu,isValidElement:Nr,lazy:qc,memo:Lc,render:Yc,startTransition:ji,unmountComponentAtNode:au,unstable_batchedUpdates:cu,useCallback:Mn,useContext:en,useDebugValue:Pi,useDeferredValue:Hi,useEffect:Te,useErrorBoundary:P$,useId:Di,useImperativeHandle:Oi,useInsertionEffect:Gi,useLayoutEffect:bn,useMemo:it,useReducer:Ir,useRef:ce,useState:We,useSyncExternalStore:qi,useTransition:Wi,version:Y$},Symbol.toStringTag,{value:"Module"})),X$=e=>{Te(()=>{const t=e();return()=>{t.Dispose()}})},Q$=(e,t)=>{Te(()=>{const n=e();return()=>{n.Dispose()}},t)},e0=e=>{bn(()=>{const t=e();return()=>{t.Dispose()}})},I=q,t0=X$,fu=Q$,n0=e0;function r0(e,t,n,r){const o=I.memo(e,be(Ye(zt(kn,n),he())));return Sr(s=>{e.displayName=s},li(t)),s=>{const i=o0(r,s);return I.createElement(o,i)}}function o0(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function po(e){return{Dispose(){e()}}}function s0(e,t){fu(e,t)}function i0(e){n0(t=>(e(),po(()=>{})))}function Ji(e){const t=I.useRef(!1);l0(()=>{t.current||(t.current=!0,e())},[])}function hu(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(!1);n.current&&(r.current=!0),s0(()=>{let o;return n.current?o=void 0:(n.current=!0,t.current=nt(e()),o=r.current?t.current:void 0),{Dispose(){Sr(s=>{we(s)},li(o))}}},[])}function a0(e){t0(t=>(e(),po(()=>{})))}function l0(e,t){fu(n=>(e(),po(()=>{})),t)}function c0(e,t){const n=Ye(t,[]);return I.useCallback(e,n)}function pu(e){return I.useRef(e)}function u0(e,t,n){return r0(e,void 0,ai(n),ai(t))}function d0(e,t){const n=I.createContext(Ye(t,void 0));return Sr(r=>{n.displayName=r},li(e)),n}function f0(e,t,n){return I.createElement(e.Provider,{value:t},...n)}function Jn(e){return I.useContext(e)}function mu(e){const t=pu(e),n=c0(r=>t.current(r),[]);return i0(()=>{t.current=e}),n}function Yn(e){return I.useState(e)}class $u{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,o=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(o)}}}Dispose(){}}class fs extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,fs.prototype)}}class Yi{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>Yi.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function _n(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new fs);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Bo(n))}});else try{e(t)}catch(n){t.onError(Bo(n))}}}function h0(e,t){return _n(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(o){n.onError(Bo(o))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function p0(e){return _n(t=>t.onSuccess(e))}class m0{Bind(t,n){return h0(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return _n(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let o=r.next();return this.While(()=>!o.done,this.Delay(()=>{const s=n(o.value);return o=r.next(),s}))}Return(t){return p0(t)}ReturnFrom(t){return t}TryFinally(t,n){return _n(r=>{t({onSuccess:o=>{n(),r.onSuccess(o)},onError:o=>{n(),r.onError(o)},onCancel:o=>{n(),r.onCancel(o)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return _n(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:o=>{try{n(o)(r)}catch(s){r.onError(Bo(s))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return _n(t=>t.onSuccess(void 0))}}const W=new m0;function Xi(e){}function $0(e){return new $u(!1)}function g0(e){e.cancel()}function w0(e){return e!=null&&e.isCancelled}const gu=new $u;function b0(e){return _n(t=>{e({onSuccess:n=>t.onSuccess(xm(n)),onError:n=>t.onSuccess(Cm(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function _0(e){return _n(t=>e([t.onSuccess,t.onError,t.onCancel]))}function y0(e){return _n(t=>{let n;const r=setTimeout(()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)},e);n=t.cancelToken.addListener(()=>{clearTimeout(r),t.onCancel(new fs)})})}function v0(e,t){return wu(e,t)}function Mr(e,t){return v0(e,t)}function wu(e,t,n,r,o){typeof t!="function"&&(o=t,t=void 0);const s=new Yi;e({onSuccess:t||Xi,onError:n||Xi,onCancel:r||Xi,cancelToken:o||gu,trampoline:s})}function x0(e,t){return new Promise((n,r)=>wu(e,n,r,r,gu))}class bu{constructor(t,n){this.k=t,this.v=n}}function hs(e,t){return new bu(e,t)}function mt(e){return e.k}function Tt(e){return e.v}class Ge extends bu{constructor(t,n,r,o,s){super(t,n),this.left=r,this.right=o,this.h=s|0}}function ps(e,t,n,r,o){return new Ge(e,t,n,r,o)}function $t(e){return e.left}function gt(e){return e.right}function Xn(e){return e.h}function Tv(){}function _u(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;e=_u(n+1,$t(s)),t=gt(s);continue e}else return n+1|0}else return n|0}}function C0(e){return _u(0,e)}function Wt(e,t,n,r){let o,s,i;const a=e;if(a!=null){const u=T(a);i=u instanceof Ge?(o=u,Xn(o)):1}else i=0;let l;const c=r;if(c!=null){const u=T(c);l=u instanceof Ge?(s=u,Xn(s)):1}else l=0;const d=(i<l?l:i)|0;return d===0?hs(t,n):ps(t,n,e,r,d+1)}function yu(e,t,n,r){let o,s,i,a,l,c,d,u,h;const f=e;if(f!=null){const $=T(f);h=$ instanceof Ge?(o=$,Xn(o)):1}else h=0;let p;const b=r;if(b!=null){const $=T(b);p=$ instanceof Ge?(s=$,Xn(s)):1}else p=0;if(p>h+2){const $=T(r);if($ instanceof Ge){const v=$;if(i=$t(v),(i!=null?(a=T(i),a instanceof Ge?(l=a,Xn(l)):1):0)>h+1){const y=T($t(v));if(y instanceof Ge){const C=y;return Wt(Wt(e,t,n,$t(C)),mt(C),Tt(C),Wt(gt(C),mt(v),Tt(v),gt(v)))}else throw new Error("internal error: Map.rebalance")}else return Wt(Wt(e,t,n,$t(v)),mt(v),Tt(v),gt(v))}else throw new Error("internal error: Map.rebalance")}else if(h>p+2){const $=T(e);if($ instanceof Ge){const v=$;if(c=gt(v),(c!=null?(d=T(c),d instanceof Ge?(u=d,Xn(u)):1):0)>p+1){const y=T(gt(v));if(y instanceof Ge){const C=y;return Wt(Wt($t(v),mt(v),Tt(v),$t(C)),mt(C),Tt(C),Wt(gt(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt($t(v),mt(v),Tt(v),Wt(gt(v),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt(e,t,n,r)}function Rr(e,t,n,r){if(r!=null){const o=T(r),s=e.Compare(t,mt(o))|0;if(o instanceof Ge){const i=o;return s<0?yu(Rr(e,t,n,$t(i)),mt(i),Tt(i),gt(i)):s===0?ps(t,n,$t(i),gt(i),Xn(i)):yu($t(i),mt(i),Tt(i),Rr(e,t,n,gt(i)))}else return s<0?ps(t,n,void 0,r,2):s===0?hs(t,n):ps(t,n,r,void 0,2)}else return hs(t,n)}function vu(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,mt(i))|0;if(a===0)return nt(Tt(i));if(i instanceof Ge){const l=i;e=r,t=o,n=a<0?$t(l):gt(l);continue e}else return}else return}}function S0(e,t,n){const r=vu(e,t,n);if(r==null)throw new Error;return T(r)}function k0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,mt(i))|0;if(i instanceof Ge){const l=i;if(a<0){e=r,t=o,n=$t(l);continue e}else{if(a===0)return!0;e=r,t=o,n=gt(l);continue e}}else return a===0}else return!1}}function xu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;xu(n,$t(s)),n(mt(s),Tt(s)),e=n,t=gt(s);continue e}else n(mt(o),Tt(o))}break}}function A0(e,t){xu(e,t)}function E0(e,t,n){let r=n;A0((o,s)=>{St(t,r,[o,s]),r=r+1|0},e)}function I0(e,t){return un((n,r)=>Rr(e,r[0],r[1],n),void 0,t)}function T0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Rr(r,i[0],i[1],o),n=s;continue e}else return o}}function N0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const o=fe(r,t);n=Rr(e,o[0],o[1],n)}return n}function Cu(e,t){if(Xt(t))return N0(e,t);if(t instanceof pt)return I0(e,t);{const n=Re(t);try{return T0(e,void 0,n)}finally{we(n)}}}class M0 extends ie{constructor(t,n){super(),this.stack=t,this.started=n}}function Su(e){e:for(;;){const t=e;if(K(t))return Be();{const n=_(t),r=P(t);if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;e=Pe([$t(s),hs(mt(s),Tt(s)),gt(s)],n);continue e}else return t}else{e=n;continue e}}}}function ku(e){return new M0(Su(ee(e)),!1)}function R0(){throw new Error("enumeration not started")}function O0(){throw new Error("enumeration already finished")}function Au(e){if(e.started){const t=e.stack;if(K(t))return O0();if(P(t)!=null){const n=T(P(t));if(n instanceof Ge)throw new Error("Please report error: Map iterator, unexpected stack for current");return[mt(n),Tt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return R0()}function P0(e){if(e.started){const t=e.stack;if(K(t))return!1;if(P(t)!=null){if(T(P(t))instanceof Ge)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Su(_(t)),!K(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function Eu(e){let t=ku(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Au(t)},"System.Collections.IEnumerator.get_Current"(){return Au(t)},"System.Collections.IEnumerator.MoveNext"(){return P0(t)},"System.Collections.IEnumerator.Reset"(){t=ku(e)},Dispose(){}}}class ms{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return L0(this)|0}Equals(t){const n=this;if(t instanceof ms){const r=t,o=Re(n);try{const s=Re(r);try{const i=()=>{const a=o["System.Collections.IEnumerator.MoveNext"]();if(a===s["System.Collections.IEnumerator.MoveNext"]())if(a){const l=o["System.Collections.Generic.IEnumerator`1.get_Current"](),c=s["System.Collections.Generic.IEnumerator`1.get_Current"]();return He(l[0],c[0])&&He(l[1],c[1])?i():!1}else return!0;else return!1};return i()}finally{we(s)}}finally{we(o)}}else return!1}toString(){return"map ["+ae("; ",De(n=>Al("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return Eu(this.tree)}[Symbol.iterator](){return Zr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Eu(this.tree)}CompareTo(t){const n=this;if(t instanceof ms)return hm((o,s)=>{const i=n.comparer.Compare(o[0],s[0])|0;return(i!==0?i:Ft(o[1],s[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Tu(n,t[0])&&He(Iu(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){E0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Qi(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Qi(this)|0}get size(){return Qi(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return De(n=>[n[0],n[1]],this)}get(t){return Iu(this,t)}has(t){return Tu(this,t)}keys(){return De(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return De(n=>n[1],this)}forEach(t,n){const r=this;Sr(o=>{t(o[1],o[0],r)},r)}}function $s(e,t){return new ms(e,t)}function D0(e){return $s(e,void 0)}function F0(e,t,n){return $s(e.comparer,Rr(e.comparer,t,n,e.tree))}function Iu(e,t){return S0(e.comparer,t,e.tree)}function Qi(e){return C0(e.tree)}function Tu(e,t){return k0(e.comparer,t,e.tree)}function V0(e,t){return vu(e.comparer,t,e.tree)}function L0(e){const t=(o,s)=>(o<<1)+s+631;let n=0;const r=Re(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const o=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,ln(o[0]))|0,n=t(n,ln(o[1]))|0}}finally{we(r)}return n|0}function Nu(e,t,n){return F0(n,e,t)}function Mu(e,t){return V0(t,e)}function B0(e,t){return $s(t,Cu(t,e))}function U0(e,t){return $s(t,Cu(t,e))}function ea(e){return D0(e)}class pe extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Ru(e,t){const n=pu($0());return hu(()=>po(()=>{g0(n.current)})),mu(r=>{w0(n.current)||Mr(W.Delay(()=>W.TryWith(W.Delay(()=>(t(new pe(1,[])),W.Bind(e(r),o=>(t(new pe(2,[o])),W.Zero())))),o=>(t(new pe(3,[o])),W.Zero()))),n.current)})}class z0{constructor(t,n,r){this.OnNext=t,this.OnError=n||(o=>{}),this.OnCompleted=r||(()=>{})}}function j0(e,t){t.Subscribe(new z0(e))}class H0{constructor(){this.delegates=[]}_add(t){this.delegates.push(t)}_remove(t){const n=this.delegates.indexOf(t);n>-1&&this.delegates.splice(n,1)}get Publish(){return G0(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const o=n===void 0?t:(r=t,n);this.delegates.forEach(s=>{s(r,o)})}}let W0=class extends H0{};function G0(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(o,s)=>n.OnNext(s);return e(r),{Dispose(){t(r)}}}}}class q0{constructor(t){this._enabled=!1,this._isDisposed=!1,this._intervalId=0,this._timeoutId=0,this.Interval=t&&t>0?t:100,this.AutoReset=!0,this._elapsed=new W0}Elapsed(){return this._elapsed.Publish}get Enabled(){return this._enabled}set Enabled(t){!this._isDisposed&&this._enabled!==t&&(this._enabled=t,this._enabled?this.AutoReset?this._intervalId=setInterval(()=>{this.AutoReset||(this.Enabled=!1),this._elapsed.Trigger(new Date)},this.Interval):this._timeoutId=setTimeout(()=>{this.Enabled=!1,this._timeoutId=0,this.AutoReset&&(this.Enabled=!0),this._elapsed.Trigger(new Date)},this.Interval):(this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)))}Dispose(){this.Enabled=!1,this._isDisposed=!0}Close(){this.Dispose()}Start(){this.Enabled=!0}Stop(){this.Enabled=!1}}function K0(e,t){console.error(nt(e),t)}function Z0(e,t){let n,r=new q0(e);r.AutoReset=!1,n=r,j0(t,n.Elapsed()),n.Enabled=!0,n.Start()}function Ou(e,t,n){es(r=>{try{r(t)}catch(o){e(o)}},n)}function Le(){return Be()}function Xe(e){return ee(e)}function Pu(e,t,n,r){return ee(o=>{e(W.Delay(()=>W.Bind(b0(t(n)),s=>{const i=s;return i.tag===0&&o(r(i.fields[0])),W.Zero()})))})}function Du(e){Z0(1,t=>{Mr(e)})}function Or(e,t){if(t.indexOf(e)===0)return t}function Fu(e,t){if(ap(t,e))return t}function J0(e){return e===1?t=>{let n,r,o,s,i,a;return n=Or("/",t),n!=null?(r=n,"#"+r):(o=Or("#/",t),o!=null?(s=o,s):(i=Or("#",t),i!=null?(a=i,"#/"+Il(a,1,a.length-1)):"#/"+t))}:t=>{let n,r;return n=Or("/",t),n!=null?(r=n,r):"/"+t}}function Qn(e,t){return J0(t)(ae("/",Wn(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ct(e,t,n){history.pushState(void 0,"",Qn(e,n));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function Vu(e,t){return Cp(n=>{if(El(n))return Be();{const r=up(n,"#");if(r==="?")return Be();if(Or("?",r)!=null)return ee(r);{const o=r.split("?");if(!ui((s,i)=>s===i,o)&&o.length===1){const s=fe(0,o);return ee(decodeURIComponent(s))}else if(!ui((s,i)=>s===i,o)&&o.length===2)if(fe(1,o)===""){const s=fe(0,o);return ee(decodeURIComponent(s))}else{const s=fe(0,o),i=fe(1,o);return k([decodeURIComponent(s),"?"+i])}else return Be()}}},k(ii(Or("#",e)!=null?Il(e,1,e.length-1):t===1&&(Fu("#",e)!=null||Fu("#/",e)!=null)?"":e,["/"],void 0,0)))}function Y0(e,t,n){return t(Vu(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const X0=u0(e=>{const t=mu(r=>{const o=Ye(e.onUrlChanged,s=>{});Y0(Ye(e.hashMode,1),o)});hu(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),po(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),Ji(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??he()});class yn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class er extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Lu(e){return e.tag===0?new er(1,[]):new er(0,[])}class mo extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const Q0=new mo(new yn(1,[]),new er(0,[]));function eg(e){return[e.fields[0],e.fields[1]]}function Bu(e){return e.fields[0]}function Uu(e){return e.fields[1]}function zu(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new mo(new yn(1,[]),Lu(r)):new mo(new yn(1,[]),new er(0,[])):n.tag===0?new mo(new yn(0,[]),Lu(r)):new mo(new yn(0,[]),new er(0,[]))}class ju extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const tg=new ju("");function ng(e){return new ju(e.trim())}function Hu(e){return e.fields[0]}class rg extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function og(e){return new rg(e)}function Wu(e){return e.fields[0]}class ta extends ie{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class sg extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function ig(e){return[e.fields[0],e.fields[1]]}function ag(e,t){return new sg(e,t)}function lg(e){const t=ig(e);return[t[0],t[1]]}function cg(){return new _m([],{Equals:He,GetHashCode:bh})}function ug(e,t){let n,r=he();if(n=[Hl(e,t,new ft(()=>r,o=>{r=o})),r],n[0])return n[1]}function Gu(e,t,n){return e.set(t,n),e}class dg extends ie{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}}function fg(e){const t=ec(e.Name);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=tc(e.Website);if(n.tag===1)return new w(1,[n.fields[0]]);{let r;const o=e.ContactDetails;if(o!=null){const s=Km(o);r=s.tag===1?new w(1,[s.fields[0]]):new w(0,[s.fields[0]])}else r=new w(0,[void 0]);return r.tag===1?new w(1,[r.fields[0]]):new w(0,[new dg(new Xl(e.StreamId),t.fields[0],n.fields[0],r.fields[0],Zm(e.Notes),e.AccountProvisioningMode)])}}}function na(e,t){return Ap(n=>kr(n.StreamId)===ts(t),e)}class J extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PartnerList","Partner","PartnerProfilesDirectory","PartnerAccountList","PartnerSuperConfiguration","PartnerBenefitsOnboardingConfiguration","PartnerBankDetailsConfiguration","PartnerWorkspace","Account","AccountProfilesDirectory","AccountImports","AccountSuperConfiguration","AccountBenefitsOnboardingConfiguration","AccountBankDetailsConfiguration","AccountSalaryPackagingConfiguration","AccountWorkspace","NotFound"]}}function qu(e){let t,n,r,o,s,i,a,l,c,d,u,h,f,p,b,$,v,y,C,R,L,X,$e,_e;if(K(e))t=16;else if(P(e)==="account-registry")if(K(_(e)))t=16;else if(P(_(e))==="partners")if(K(_(_(e))))t=0;else if(K(_(_(_(e)))))t=1,n=P(_(_(e)));else switch(P(_(_(_(e))))){case"accounts":{if(K(_(_(_(_(e))))))t=2,r=P(_(_(e)));else if(K(_(_(_(_(_(e)))))))t=8,c=P(_(_(_(_(e))))),d=P(_(_(e)));else switch(P(_(_(_(_(_(e))))))){case"directory":{K(_(_(_(_(_(_(e)))))))?(t=9,u=P(_(_(_(_(e))))),h=P(_(_(e)))):t=16;break}case"imports":{K(_(_(_(_(_(_(e)))))))?(t=10,f=P(_(_(_(_(e))))),p=P(_(_(e)))):t=16;break}case"super-configuration":{K(_(_(_(_(_(_(e)))))))?(t=11,b=P(_(_(_(_(e))))),$=P(_(_(e)))):t=16;break}case"benefits-onboarding-configuration":{K(_(_(_(_(_(_(e)))))))?(t=12,v=P(_(_(_(_(e))))),y=P(_(_(e)))):t=16;break}case"bank-details-configuration":{K(_(_(_(_(_(_(e)))))))?(t=13,C=P(_(_(_(_(e))))),R=P(_(_(e)))):t=16;break}case"salary-packaging-configuration":{K(_(_(_(_(_(_(e)))))))?(t=14,L=P(_(_(_(_(e))))),X=P(_(_(e)))):t=16;break}case"workspace":{K(_(_(_(_(_(_(e)))))))?(t=15,$e=P(_(_(_(_(e))))),_e=P(_(_(e)))):t=16;break}default:t=16}break}case"super-configuration":{K(_(_(_(_(e)))))?(t=3,o=P(_(_(e)))):t=16;break}case"benefits-onboarding-configuration":{K(_(_(_(_(e)))))?(t=4,s=P(_(_(e)))):t=16;break}case"directory":{K(_(_(_(_(e)))))?(t=5,i=P(_(_(e)))):t=16;break}case"bank-details-configuration":{K(_(_(_(_(e)))))?(t=6,a=P(_(_(e)))):t=16;break}case"workspace":{K(_(_(_(_(e)))))?(t=7,l=P(_(_(e)))):t=16;break}default:t=16}else t=16;else t=16;switch(t){case 0:return new J(0,[]);case 1:return new J(1,[st(n)]);case 2:return new J(3,[st(r)]);case 3:return new J(4,[st(o)]);case 4:return new J(5,[st(s)]);case 5:return new J(2,[st(i)]);case 6:return new J(6,[st(a)]);case 7:return new J(7,[st(l)]);case 8:return new J(8,[st(d),jt(c)]);case 9:return new J(9,[st(h),jt(u)]);case 10:return new J(10,[st(p),jt(f)]);case 11:return new J(11,[st($),jt(b)]);case 12:return new J(12,[st(y),jt(v)]);case 13:return new J(13,[st(R),jt(C)]);case 14:return new J(14,[st(X),jt(L)]);case 15:return new J(15,[st(_e),jt($e)]);default:return new J(16,[])}}function $o(e){const t=(r,o)=>Ie(A(()=>B(E("account-registry"),A(()=>B(E("partners"),A(()=>B(E(lt(r)),A(()=>o)))))))),n=(r,o,s)=>{const i=Ie(A(()=>B(E("accounts"),A(()=>B(E(mn(o)),A(()=>s))))));return t(r,i)};switch(e.tag){case 3:return t(e.fields[0],["accounts"]);case 4:return t(e.fields[0],["super-configuration"]);case 5:return t(e.fields[0],["benefits-onboarding-configuration"]);case 6:return t(e.fields[0],["bank-details-configuration"]);case 2:return t(e.fields[0],["directory"]);case 7:return t(e.fields[0],["workspace"]);case 8:return n(e.fields[0],e.fields[1],[]);case 9:return n(e.fields[0],e.fields[1],["directory"]);case 10:return n(e.fields[0],e.fields[1],["imports"]);case 11:return n(e.fields[0],e.fields[1],["super-configuration"]);case 12:return n(e.fields[0],e.fields[1],["benefits-onboarding-configuration"]);case 13:return n(e.fields[0],e.fields[1],["bank-details-configuration"]);case 14:return n(e.fields[0],e.fields[1],["salary-packaging-configuration"]);case 15:return n(e.fields[0],e.fields[1],["workspace"]);case 16:case 0:return k(["account-registry","partners"]);default:return t(e.fields[0],[])}}function ra(e){switch(e.tag){case 3:{const t=["account-registry","partners",lt(e.fields[0]),"accounts"];return Xe(n=>{ct(k(t),1,1)})}case 4:{const t=["account-registry","partners",lt(e.fields[0]),"super-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 5:{const t=["account-registry","partners",lt(e.fields[0]),"benefits-onboarding-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 6:{const t=["account-registry","partners",lt(e.fields[0]),"bank-details-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 2:{const t=["account-registry","partners",lt(e.fields[0]),"directory"];return Xe(n=>{ct(k(t),1,1)})}case 7:{const t=["account-registry","partners",lt(e.fields[0]),"workspace"];return Xe(n=>{ct(k(t),1,1)})}case 8:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1])];return Xe(n=>{ct(k(t),1,1)})}case 9:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"directory"];return Xe(n=>{ct(k(t),1,1)})}case 10:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"imports"];return Xe(n=>{ct(k(t),1,1)})}case 11:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"super-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 12:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"benefits-onboarding-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 13:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"bank-details-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 14:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"salary-packaging-configuration"];return Xe(n=>{ct(k(t),1,1)})}case 15:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"workspace"];return Xe(n=>{ct(k(t),1,1)})}case 0:case 16:return Le();default:{const t=["account-registry","partners",lt(e.fields[0])];return Xe(n=>{ct(k(t),1,1)})}}}function hg(e,t){switch(t.tag){case 1:return new pe(1,[]);case 2:return t.fields[0].tag===1?new pe(2,[new w(1,[t.fields[0].fields[0]])]):new pe(2,[new w(0,[e(t.fields[0].fields[0])])]);case 3:return new pe(3,[t.fields[0]]);default:return new pe(0,[])}}class Ku extends ie{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function pg(e){return new Ku(Fl("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:$r}),Fl("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:$r}))}const mg=new Ku(!1,!1);class H extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class tn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function Zu(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Ju(e,t){switch(e.tag){case 2:return op(Zu(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Zu(t)}}function Yu(e,t){$g(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function $g(e){if(e!=null&&e!==0){if(e%6e4!==0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}function gg(){return Yu(-621355968e5,0)}function wg(e){const[t,n]=pl(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Yu(t.getTime(),r)}function bg(e,t){try{return t.contents=wg(e),!0}catch{return!1}}function go(e){return e<0?Math.ceil(e):Math.floor(e)}function Xu(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return _g(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+o}function _g(e){return Number(BigInt(e)/10000n)}function yg(e){return go(e/864e5)}function vg(e){return go(e%864e5/36e5)}function xg(e){return go(e%36e5/6e4)}function Cg(e){return go(e%6e4/1e3)}function Sg(e){return go(e%1e3)}function kg(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(yg(e)),o=Math.abs(vg(e)),s=Math.abs(xg(e)),i=Math.abs(Cg(e)),a=Math.abs(Sg(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?o:ge(o,2)}:${ge(s,2)}:${ge(i,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+ge(a,3):"."+hh(a,3,7)}`}function Ag(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Xu(r,0,0,0,0)}if(n>0){const r=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(r!=null&&r[4]!=null&&r[5]!=null){let o=0,s=0,i=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(o=+r[3]),r[7]!=null&&(i=+r[7]),r[8]!=null)switch(r[8].length){case 1:s=+r[8]*100;break;case 2:s=+r[8]*10;break;case 3:s=+r[8];break;case 4:s=+r[8]/10;break;case 5:s=+r[8]/100;break;case 6:s=+r[8]/1e3;break;case 7:s=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*Xu(o,l,c,i,s)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function Eg(e,t){try{return t.contents=Ag(e),!0}catch{return!1}}class Qu{constructor(t){this.k=t}}function Nt(e){return new Qu(e)}function Q(e){return e.k}class me extends Qu{constructor(t,n,r,o){super(t),this.left=n,this.right=r,this.h=o|0}}function Mt(e,t,n,r){return new me(e,t,n,r)}function Ne(e){return e.left}function xe(e){return e.right}function Pr(e){return e.h}function Nv(){}function ed(e,t){e:for(;;){const n=e,r=t;if(n!=null){const o=T(n);if(o instanceof me){const s=o;e=Ne(s),t=ed(xe(s),r+1);continue e}else return r+1|0}else return r|0}}function Ig(e){return ed(e,0)}function Gt(e,t,n){let r,o,s;const i=e;if(i!=null){const d=T(i);s=d instanceof me?(r=d,Pr(r)):1}else s=0;let a;const l=n;if(l!=null){const d=T(l);a=d instanceof me?(o=d,Pr(o)):1}else a=0;const c=(s<a?a:s)|0;return c===0?Nt(t):Mt(t,e,n,c+1)}function td(e,t,n){let r,o,s,i,a,l,c,d,u;const h=e;if(h!=null){const b=T(h);u=b instanceof me?(r=b,Pr(r)):1}else u=0;let f;const p=n;if(p!=null){const b=T(p);f=b instanceof me?(o=b,Pr(o)):1}else f=0;if(f>u+2){const b=T(n);if(b instanceof me){const $=b;if(s=Ne($),(s!=null?(i=T(s),i instanceof me?(a=i,Pr(a)):1):0)>u+1){const v=T(Ne($));if(v instanceof me){const y=v;return Gt(Gt(e,t,Ne(y)),Q(y),Gt(xe(y),Q($),xe($)))}else throw new Error("internal error: Set.rebalance")}else return Gt(Gt(e,t,Ne($)),Q($),xe($))}else throw new Error("internal error: Set.rebalance")}else if(u>f+2){const b=T(e);if(b instanceof me){const $=b;if(l=xe($),(l!=null?(c=T(l),c instanceof me?(d=c,Pr(d)):1):0)>f+1){const v=T(xe($));if(v instanceof me){const y=v;return Gt(Gt(Ne($),Q($),Ne(y)),Q(y),Gt(xe(y),t,n))}else throw new Error("internal error: Set.rebalance")}else return Gt(Ne($),Q($),Gt(xe($),t,n))}else throw new Error("internal error: Set.rebalance")}else return Gt(e,t,n)}function Dr(e,t,n){if(n!=null){const r=T(n),o=e.Compare(t,Q(r))|0;if(r instanceof me){const s=r;return o<0?td(Dr(e,t,Ne(s)),Q(s),xe(s)):o===0?n:td(Ne(s),Q(s),Dr(e,t,xe(s)))}else{const s=e.Compare(t,Q(r))|0;return s<0?Mt(t,void 0,n,2):s===0?n:Mt(t,n,void 0,2)}}else return Nt(t)}function nd(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,Q(i))|0;if(i instanceof me){const l=i;if(a<0){e=r,t=o,n=Ne(l);continue e}else{if(a===0)return!0;e=r,t=o,n=xe(l);continue e}}else return a===0}else return!1}}function rd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof me){const s=o;rd(n,Ne(s)),n(Q(s)),e=n,t=xe(s);continue e}else n(Q(o))}break}}class Tg extends ie{constructor(t,n){super(),this.stack=t,this.started=n}}function od(e){e:for(;;){const t=e;if(K(t))return Be();{const n=P(t),r=_(t);if(n!=null){const o=T(n);if(o instanceof me){const s=o;e=Pe([Ne(s),Nt(Q(s)),xe(s)],r);continue e}else return t}else{e=r;continue e}}}}function sd(e){return new Tg(od(ee(e)),!1)}function Ng(){throw new Error("Enumeration not started")}function Mg(){throw new Error("Enumeration already started")}function id(e){if(e.started){const t=e.stack;if(K(t))return Mg();if(P(t)!=null){const n=T(P(t));return Q(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return Ng()}function Rg(e){if(e.started){const t=e.stack;if(K(t))return!1;if(P(t)!=null){if(T(P(t))instanceof me)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=od(_(t)),!K(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!K(e.stack)}function ad(e){let t=sd(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return id(t)},"System.Collections.IEnumerator.get_Current"(){return id(t)},"System.Collections.IEnumerator.MoveNext"(){return Rg(t)},"System.Collections.IEnumerator.Reset"(){t=sd(e)},Dispose(){}}}function Og(e,t,n){e:for(;;){const r=e,o=t,s=n;if(K(o))return K(s)?0:-1;if(K(s))return 1;if(P(s)!=null)if(P(o)!=null){const i=T(P(o)),a=T(P(s));if(i instanceof me){const l=i;if(Ne(l)==null)if(a instanceof me){const c=a;if(Ne(c)==null){const d=r.Compare(Q(l),Q(c))|0;if(d!==0)return d|0;e=r,t=kt(xe(l),_(o)),n=kt(xe(c),_(s));continue e}else{let d,u,h,f,p;switch(K(o)?K(s)?d=2:P(s)!=null?(d=1,f=_(s),p=T(P(s))):d=2:P(o)!=null?(d=0,u=_(o),h=T(P(o))):K(s)?d=2:P(s)!=null?(d=1,f=_(s),p=T(P(s))):d=2,d){case 0:if(h instanceof me){const b=h;e=r,t=Pe([Ne(b),Mt(Q(b),void 0,xe(b),0)],u),n=s;continue e}else{e=r,t=Pe([void 0,Nt(Q(h))],u),n=s;continue e}case 1:if(p instanceof me){const b=p;e=r,t=o,n=Pe([Ne(b),Mt(Q(b),void 0,xe(b),0)],f);continue e}else{e=r,t=o,n=Pe([void 0,Nt(Q(p))],f);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const c=r.Compare(Q(l),Q(a))|0;if(c!==0)return c|0;e=r,t=kt(xe(l),_(o)),n=kt(void 0,_(s));continue e}else{let c,d,u,h,f;switch(K(o)?K(s)?c=2:P(s)!=null?(c=1,h=_(s),f=T(P(s))):c=2:P(o)!=null?(c=0,d=_(o),u=T(P(o))):K(s)?c=2:P(s)!=null?(c=1,h=_(s),f=T(P(s))):c=2,c){case 0:if(u instanceof me){const p=u;e=r,t=Pe([Ne(p),Mt(Q(p),void 0,xe(p),0)],d),n=s;continue e}else{e=r,t=Pe([void 0,Nt(Q(u))],d),n=s;continue e}case 1:if(f instanceof me){const p=f;e=r,t=o,n=Pe([Ne(p),Mt(Q(p),void 0,xe(p),0)],h);continue e}else{e=r,t=o,n=Pe([void 0,Nt(Q(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof me){const l=a;if(Ne(l)==null){const c=r.Compare(Q(i),Q(l))|0;if(c!==0)return c|0;e=r,t=kt(void 0,_(o)),n=kt(xe(l),_(s));continue e}else{let c,d,u,h,f;switch(K(o)?K(s)?c=2:P(s)!=null?(c=1,h=_(s),f=T(P(s))):c=2:P(o)!=null?(c=0,d=_(o),u=T(P(o))):K(s)?c=2:P(s)!=null?(c=1,h=_(s),f=T(P(s))):c=2,c){case 0:if(u instanceof me){const p=u;e=r,t=Pe([Ne(p),Mt(Q(p),void 0,xe(p),0)],d),n=s;continue e}else{e=r,t=Pe([void 0,Nt(Q(u))],d),n=s;continue e}case 1:if(f instanceof me){const p=f;e=r,t=o,n=Pe([Ne(p),Mt(Q(p),void 0,xe(p),0)],h);continue e}else{e=r,t=o,n=Pe([void 0,Nt(Q(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare(Q(i),Q(a))|0;if(l!==0)return l|0;e=r,t=_(o),n=_(s);continue e}}else{T(P(s));let i,a,l,c,d;switch(K(o)?K(s)?i=2:P(s)!=null?(i=1,c=_(s),d=T(P(s))):i=2:P(o)!=null?(i=0,a=_(o),l=T(P(o))):K(s)?i=2:P(s)!=null?(i=1,c=_(s),d=T(P(s))):i=2,i){case 0:if(l instanceof me){const u=l;e=r,t=Pe([Ne(u),Mt(Q(u),void 0,xe(u),0)],a),n=s;continue e}else{e=r,t=Pe([void 0,Nt(Q(l))],a),n=s;continue e}case 1:if(d instanceof me){const u=d;e=r,t=o,n=Pe([Ne(u),Mt(Q(u),void 0,xe(u),0)],c);continue e}else{e=r,t=o,n=Pe([void 0,Nt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(P(o)!=null){T(P(o));let i,a,l,c,d;switch(K(o)?K(s)?i=2:P(s)!=null?(i=1,c=_(s),d=T(P(s))):i=2:P(o)!=null?(i=0,a=_(o),l=T(P(o))):K(s)?i=2:P(s)!=null?(i=1,c=_(s),d=T(P(s))):i=2,i){case 0:if(l instanceof me){const u=l;e=r,t=Pe([Ne(u),Mt(Q(u),void 0,xe(u),0)],a),n=s;continue e}else{e=r,t=Pe([void 0,Nt(Q(l))],a),n=s;continue e}case 1:if(d instanceof me){const u=d;e=r,t=o,n=Pe([Ne(u),Mt(Q(u),void 0,xe(u),0)],c);continue e}else{e=r,t=o,n=Pe([void 0,Nt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=_(o),n=_(s);continue e}}}function ld(e,t,n){return t==null?n==null?0:-1:n==null?1:Og(e,ee(t),ee(n))|0}function Pg(e,t,n){let r=n;rd(o=>{St(t,r,o),r=r+1|0},e)}function Dg(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){e=r,t=Dr(r,s["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=s;continue e}else return o}}function Fg(e,t){return Xo((n,r)=>Dr(e,r,n),void 0,t)}function Vg(e,t){return un((n,r)=>Dr(e,r,n),void 0,t)}function cd(e,t){if(Xt(t))return Fg(e,t);if(t instanceof pt)return Vg(e,t);{const n=Re(t);try{return Dg(e,void 0,n)}finally{we(n)}}}class oa{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return Ug(this)|0}Equals(t){let n;const r=this;return t instanceof oa&&(n=t,ld(Fr(r),qt(r),qt(n))===0)}toString(){return"set ["+ae("; ",De(n=>dt(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return ld(Fr(n),qt(n),qt(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return nd(Fr(n),t,qt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Pg(qt(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return sa(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return sa(this)|0}GetEnumerator(){return ad(qt(this))}[Symbol.iterator](){return Zr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ad(qt(this))}get size(){return sa(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return ud(this,t)}keys(){return De(n=>n,this)}values(){return De(n=>n,this)}entries(){return De(n=>[n,n],this)}forEach(t,n){const r=this;Sr(o=>{t(o,o,r)},r)}}function gs(e,t){return new oa(e,t)}function Fr(e){return e.comparer}function qt(e){return e.tree}function Lg(e){return gs(e,void 0)}function Bg(e,t){return gs(Fr(e),Dr(Fr(e),t,qt(e)))}function sa(e){return Ig(qt(e))}function ud(e,t){return nd(Fr(e),t,qt(e))}function Ug(e){let t=0;const n=Re(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+ln(r)+631|0}}finally{we(n)}return Math.abs(t)|0}function ia(e,t){return ud(t,e)}function zg(e,t){return Bg(t,e)}function jg(e){return Lg(e)}function Hg(e,t){return gs(t,cd(t,e))}function Wg(e,t){return gs(t,cd(t,e))}function wo(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
|
|
4
4
|
`:" ")+(JSON.stringify(t,null,4)+"")}catch{return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?`
|
|
5
|
-
`:" ")}}function
|
|
6
|
-
Reason: `+t.fields[2]:t.tag===3?
|
|
5
|
+
`:" ")}}function Gg(e,t){const n=t.tag===2?wo(t.fields[0],t.fields[1],!0):t.tag===1?wo(t.fields[0],t.fields[1],!1)+`
|
|
6
|
+
Reason: `+t.fields[2]:t.tag===3?wo(t.fields[0],t.fields[1],!0):t.tag===4?wo(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
|
|
7
7
|
`+(JSON.stringify(t.fields[1],null,4)+""):t.tag===7?`The following errors were found:
|
|
8
8
|
|
|
9
|
-
`+
|
|
9
|
+
`+ae(`
|
|
10
10
|
|
|
11
|
-
`,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:
|
|
11
|
+
`,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:wo(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function dd(e,t,n){const r=t(e,n);if(r.tag===1){const o=r.fields[0];return new w(1,[Gg(o[0],o[1])])}else return new w(0,[r.fields[0]])}function tr(e,t){try{return dd("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new w(1,["Given an invalid JSON: "+n.message]);throw n}}function fd(e,t){return typeof t=="string"?new w(0,[t]):new w(1,[[e,new H(0,["a string",t])]])}function qg(e,t){if(typeof t=="string"){const n=t;return n.length===1?new w(0,[n[0]]):new w(1,[[e,new H(0,["a single character string",t])]])}else return new w(1,[[e,new H(0,["a char",t])]])}function Kg(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[Em(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a guid",t])]])}else return new w(1,[[e,new H(0,["a guid",t])]])}function Zg(e,t){return t==null?new w(0,[void 0]):new w(1,[[e,new H(0,["null",t])]])}const hd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-128<=o&&o<=127?new w(0,[(o+128&255)-128]):new w(1,[[n,new H(1,["a sbyte",o,"Value was either too large or too small for a sbyte"])]]):new w(1,[[n,new H(1,["a sbyte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,8,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["a sbyte",r])]])}else return new w(1,[[n,new H(0,["a sbyte",r])]])},pd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=255?new w(0,[o&255]):new w(1,[[n,new H(1,["a byte",o,"Value was either too large or too small for a byte"])]]):new w(1,[[n,new H(1,["a byte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,8,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["a byte",r])]])}else return new w(1,[[n,new H(0,["a byte",r])]])},md=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-32768<=o&&o<=32767?new w(0,[(o+32768&65535)-32768]):new w(1,[[n,new H(1,["an int16",o,"Value was either too large or too small for an int16"])]]):new w(1,[[n,new H(1,["an int16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,16,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an int16",r])]])}else return new w(1,[[n,new H(0,["an int16",r])]])},$d=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=65535?new w(0,[o&65535]):new w(1,[[n,new H(1,["an uint16",o,"Value was either too large or too small for an uint16"])]]):new w(1,[[n,new H(1,["an uint16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,16,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an uint16",r])]])}else return new w(1,[[n,new H(0,["an uint16",r])]])},gd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-2147483648<=o&&o<=2147483647?new w(0,[~~o]):new w(1,[[n,new H(1,["an int",o,"Value was either too large or too small for an int"])]]):new w(1,[[n,new H(1,["an int",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,32,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an int",r])]])}else return new w(1,[[n,new H(0,["an int",r])]])},wd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=4294967295?new w(0,[o>>>0]):new w(1,[[n,new H(1,["an uint32",o,"Value was either too large or too small for an uint32"])]]):new w(1,[[n,new H(1,["an uint32",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,32,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an uint32",r])]])}else return new w(1,[[n,new H(0,["an uint32",r])]])};function Jg(e,t){return typeof t=="boolean"?new w(0,[t]):new w(1,[[e,new H(0,["a boolean",t])]])}function Yg(e,t){return typeof t=="number"?new w(0,[t]):new w(1,[[e,new H(0,["a float",t])]])}function Xg(e,t){return typeof t=="number"?new w(0,[t]):new w(1,[[e,new H(0,["a float32",t])]])}function Qg(e,t){if(typeof t=="string"){let n,r=Xh();return n=[ep(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[tp(n[1])]):new w(1,[[e,new H(0,["a datetime",t])]])}else return new w(1,[[e,new H(0,["a datetime",t])]])}function ew(e,t){if(typeof t=="string"){let n,r=gg();return n=[bg(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a datetimeoffset",t])]])}else return new w(1,[[e,new H(0,["a datetime",t])]])}function tw(e,t){if(typeof t=="string"){let n,r=0;return n=[Eg(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a timespan",t])]])}else return new w(1,[[e,new H(0,["a timespan",t])]])}function bd(e,t,n,r){let o;const s=n+".["+zn(e)+"]";if(Array.isArray(r)){const i=r;return e<i.length?t(s,fe(e,i)):new w(1,[[s,new H(5,["a longer array. Need index `"+zn(e)+"` but there are only `"+(o=i.length,zn(o))+"` entries",r])]])}else return new w(1,[[s,new H(0,["an array",r])]])}function nw(e,t,n){return n==null?new w(0,[void 0]):dn(nt,e(t,n))}function _d(e,t,n){if(Array.isArray(n)){let r=-1;return dn(Qo,Xo((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+zn(r)+"]",s);return i.tag===0?new w(0,[kt(i.fields[0],o.fields[0])]):new w(1,[i.fields[0]])}else return o},new w(0,[Be()]),n))}else return new w(1,[[t,new H(0,["a list",n])]])}function rw(e,t,n){if(Array.isArray(n)){let r=-1;return dn(mm,Xo((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+zn(r)+"]",s);return i.tag===0?new w(0,[B([i.fields[0]],o.fields[0])]):new w(1,[i.fields[0]])}else return o},new w(0,[[]]),n))}else return new w(1,[[t,new H(0,["a seq",n])]])}function yd(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return Xo((s,i)=>{if(r=r+1|0,s.tag===0){const a=s.fields[0],l=e(t+".["+zn(r)+"]",i);return l.tag===0?(St(a,r,l.fields[0]),new w(0,[a])):new w(1,[l.fields[0]])}else return s},new w(0,[Yo(new Array(o.length),0,o.length,null)]),o)}else return new w(1,[[t,new H(0,["an array",n])]])}function ow(e,t,n){return((o,s)=>{e:for(;;){const i=o,a=s;if(K(i))return new w(1,[[t,new H(7,[a])]]);{const l=dd(t,be(P(i)),n);if(l.tag===1){o=_(i),s=ot(a,ee(l.fields[0]));continue e}else return new w(0,[l.fields[0]])}}})(e,Be())}function sw(e,t,n){return new w(0,[e])}function vd(e,t,n,r){const o=t(n,r);return o.tag===0?e(o.fields[0],n,r):new w(1,[o.fields[0]])}function iw(e,t,n,r){const o=t(n,r);return o.tag===1?new w(1,[o.fields[0]]):new w(0,[e(o.fields[0])])}function aw(e,t){let n;const r=e;return n=o=>s=>bd(0,r,o,s),o=>s=>vd(Zs(i=>{let a;const l=t;return a=c=>d=>bd(1,l,c,d),c=>d=>vd((u,h,f)=>sw([i,u]),be(a),c,d)}),be(n),o,s)}function lw(e){return B0(e,{Compare:Ft})}function cw(e){return Wg(e,{Compare:Ft})}function uw(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?Rl((r,o)=>{const s=r[0];return o.tag===0?dn(i=>kt(i,o.fields[0]),r[1](t+"."+s)(n[s])):o},e,new w(0,[Be()])):new w(1,[[t,new H(0,["an object",n])]])}function dw(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?io((o,s)=>{if(o.tag===0){const i=e(n,s);if(i.tag===0){const a=t(n+"."+s,r[s]);return a.tag===0?new w(0,[kt([i.fields[0],a.fields[0]],o.fields[0])]):new w(1,[a.fields[0]])}else return new w(1,[i.fields[0]])}else return o},new w(0,[Be()]),Object.keys(r)):new w(1,[[n,new H(0,["an object",r])]])}function xd(e,t,n,r){let o;const s=t.length+e|0;if(s!==r.length)return new w(1,[[n,new H(6,[(o=r.length|0,Qt(Ut("Expected array of length %i but got %i"))(s)(o))])]]);{let i=new w(0,[Be()]);for(let a=e;a<=r.length-1;a++)if(i.tag===0){const l=i.fields[0],c=Qt(Ut("%s[%i]"))(n)(a),d=fe(a-e,t),u=fe(a,r);i=dn(h=>kt(h,l),d(c)(u))}return dn(Qo,i)}}function Cd(e,t,n,r,o,s){const i=mp(a=>wr(a)===r,al(n));if(i!=null){const a=i,l=An(c=>Kt(e,t,!1,c[1]),dl(a));return dn(c=>Bh(a,Hn(c)),l.length===0&&s.length<=1?new w(0,[Be()]):xd(1,l,o,s))}else return new w(1,[[o,new H(6,["Cannot find case "+r+" in "+Me(n)])]])}function Sd(e,t,n,r){let o;const s=new ft(he());let i;const a=Me(r);i=a===""?e:Nu(a,s,e);let l;if(ul(r)){const c=An(d=>[Ju(t,wr(d)),Kt(i,t,!1,d[1])],Qr(r));l=d=>u=>dn(h=>Uh(r,Hn(h)),uw(c,d,u))}else if(cl(r))l=c=>d=>{if(typeof d=="string")return Cd(i,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return Pp(h=>Cd(i,t,r,h,c,u),fd(c+"[0]",fe(0,u)))}else return new w(1,[[c,new H(0,["a string or array",d])]])};else if(n)l=c=>d=>new w(1,[[c,new H(2,["an extra coder for "+Me(r),d])]]);else throw new Error((o=Me(r),Qt(Ut(`Cannot generate auto decoder for %s. Please pass an extra decoder.
|
|
12
12
|
|
|
13
|
-
Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function
|
|
13
|
+
Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function Kt(e,t,n,r){let o,s,i,a;const l=Me(r),c=Mu(l,e);if(c==null)if(rl(r)){const d=Kt(e,t,!1,Xr(r));return u=>h=>yd(be(d),u,h)}else if(ei(r))switch(Me(il(r))){case"System.SByte":return u=>h=>{const f=r,p=u,b=h,$=hd(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>h=>{const f=r,p=u,b=h,$=pd(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>h=>{const f=r,p=u,b=h,$=md(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,ph(v))]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>h=>{const f=r,p=u,b=h,$=$d(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>h=>{const f=r,p=u,b=h,$=gd(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,zn(v))]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>h=>{const f=r,p=u,b=h,$=wd(p)(b);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,br(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[_r(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),b,"Unkown value provided for the enum"])]])}};default:{const u=Me(r),h=Cl(Ut(`Cannot generate auto decoder for %s.
|
|
14
14
|
Thoth.Json.Net only support the following enum types:
|
|
15
15
|
- sbyte
|
|
16
16
|
- byte
|
|
@@ -19,7 +19,7 @@ Thoth.Json.Net only support the following enum types:
|
|
|
19
19
|
- int
|
|
20
20
|
- uint32
|
|
21
21
|
If you can't use one of these types, please pass an extra decoder.
|
|
22
|
-
`))(u);return f=>h(f)}}else if(
|
|
22
|
+
`))(u);return f=>h(f)}}else if(ol(r))if(ti(r)){const d=An(u=>Kt(e,t,!1,u),ll(r));return u=>h=>Array.isArray(h)?dn(f=>zh(Hn(f)),xd(0,d,u,h)):new w(1,[[u,new H(0,["an array",h])]])}else switch(Me(sl(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=Kt(e,t,!0,fe(0,xt(r))),u=>h=>nw(be(o),u,h);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return s=Kt(e,t,!1,fe(0,xt(r))),u=>h=>_d(be(s),u,h);case"System.Collections.Generic.IEnumerable`1[System.Object]":return i=Kt(e,t,!1,fe(0,xt(r))),u=>h=>rw(be(i),u,h);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=Kt(e,t,!1,fe(0,xt(r))),h=Kt(e,t,!1,fe(1,xt(r)));let f;const p=k([b=>$=>dw(be(u),be(h),b,$),(a=aw(be(u),be(h)),b=>$=>_d(be(a),b,$))]);return f=b=>$=>ow(p,b,$),b=>$=>iw(lw,be(f),b,$)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=Kt(e,t,!1,fe(0,xt(r)));return h=>f=>{const p=yd(be(u),h,f);return p.tag===0?new w(0,[cw(p.fields[0])]):new w(1,[p.fields[0]])}}default:return Sd(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>Jg(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>Zg(d,u);case"System.String":return d=>u=>fd(d,u);case"System.Char":return d=>u=>qg(d,u);case"System.SByte":return hd;case"System.Byte":return pd;case"System.Int16":return md;case"System.UInt16":return $d;case"System.Int32":return gd;case"System.UInt32":return wd;case"System.Double":return d=>u=>Yg(d,u);case"System.Single":return d=>u=>Xg(d,u);case"System.DateTime":return d=>u=>Qg(d,u);case"System.DateTimeOffset":return d=>u=>ew(d,u);case"System.TimeSpan":return d=>u=>tw(d,u);case"System.Guid":return d=>u=>Kg(d,u);case"System.Object":return d=>u=>new w(0,[u]);default:return Sd(e,t,n,r)}else{const d=c;return u=>h=>d.contents(u)(h)}}function fw(e){return ea({Compare:Yr})}function nr(e,t,n){const r=Ye(t,new tn(0,[]));return Kt(fw(),r,!1,e)}class hw extends ie{constructor(t){super(),this.Roles=t}}function pw(){return ht("AccountRegistry.AdminUI.Jwt.JwtPayload",[],hw,()=>[["Roles",Qs(j)]])}function mw(e){const t=ii(e??"",["."],void 0,0);if(!ui((n,r)=>n===r,t)&&t.length===3){let n;const r=fe(1,t);return n=atob(r),tr(be(nr(pw(),new tn(1,[]))),n)}else return new w(1,["Failed to decode access token"])}function kd(e,t,n,r){return Pu(o=>{Du(o)},e,t,o=>o.tag===1?r(o.fields[0]):n(o.fields[0]))}function $w(){return Be()}function aa(e){return ae("/",e)}function gw(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+aa(t),n])}function Ad(e,t,n){try{we(n)}catch(r){e(["Error stopping subscription: "+aa(t),r])}}function ww(e,t,n,r){try{return[n,r(t)]}catch(o){e(["Error starting subscription: "+aa(n),o]);return}}function bw(e,t){es(n=>{Ad(e,n[0],n[1])},t)}function Ed(e,t,n,r,o,s){return es(i=>{gw(e,i)},n),es(i=>{Ad(e,i[0],i[1])},r),ot(o,Dl(i=>ww(e,t,i[0],i[1]),s))}function _w(){return[Be(),jg({Compare:Ft}),Be()]}function yw(e,t,n,r,o){return ia(e,r)?[kt(e,n),r,o]:[n,zg(e,r),kt([e,t],o)]}function vw(e){return yp((t,n)=>yw(t[0],t[1],n[0],n[1],n[2]),e,_w())}const xw=Be();function Id(e,t){const n=Hg(Wn(i=>i[0],e),{Compare:Ft}),r=vw(t),o=r[1],s=r[0];if(n.Equals(o))return[s,Be(),e,Be()];{const i=Tp(a=>ia(a[0],o),e);return[s,i[1],i[0],Pl(a=>!ia(a[0],n),r[2])]}}function Cw(e,t,n,r){const o=Ft(e,n)|0;if(o===0)throw new Error("The step of a range cannot be zero");const s=o>0;return i=>{const a=Ft(i,t)|0;return s&&a<=0||!s&&a>=0?[i,r(i,e)]:void 0}}function Sw(e,t,n,r,o){const s=Cw(t,n,r,o);return A(()=>fm(s,e))}function kw(e,t,n){return Sw(e,t,n,0,(r,o)=>r+o)}class Vr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Aw{constructor(t){this.state=new Vr(0,[Yo(new Array(Ml(t,10)),0,Ml(t,10),null),0])}}function Ew(e){return new Aw(e)}function Td(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,o=t.fields[0],s=(r+1)%o.length|0;return s===n?e.state=new Vr(0,[o,n]):e.state=new Vr(1,[o,n,s]),nt(fe(r,o))}else return}function Iw(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,o=n.fields[2]|0,s=n.fields[0];St(s,r,t);const i=(r+1)%s.length|0;i===o?e.state=new Vr(1,[Tw(e,o,s),s.length,0]):e.state=new Vr(1,[s,i,o])}else{const r=n.fields[1]|0,o=n.fields[0];St(o,r,t);const s=(r+1)%o.length|0;e.state=new Vr(1,[o,s,r])}}function Tw(e,t,n){return Array.from(A(()=>B($m(t,n),A(()=>B(gm(t,n),A(()=>wm(r=>E(he()),kw(0,1,n.length))))))))}class la extends ie{constructor(t,n,r,o,s,i,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=o,this.setState=s,this.onError=i,this.termination=a}}function ws(e,t,n){return new la(e,t,r=>$w(),n,be(r=>{const o=kn(n)(r);return s=>{o(s)}}),r=>{K0(r[0],r[1])},[r=>!1,r=>{}])}function Nw(e,t){return new la(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function Mw(e){return e.init}function Rw(e,t,n,r,o,s,i){const a=kn(e)(i.init),l=Js(t)(kn(i.update)),c=Js(n)(kn(i.view)),d=Js(r)(kn(i.setState));return new la(a,be(l),kn(o)(i.subscribe),be(c),be(d),i.onError,s(i.termination))}function Ow(e,t,n){let r;const o=n.init(t),s=o[0],i=n.subscribe(s),a=n.termination,l=Ew(10);let c=!1,d=s,u=xw,h=!1;const f=$=>{h||(Iw(l,$),c||(c=!0,b(),c=!1))},p=kn(e)(f),b=()=>{let $,v=Td(l);for(;!h&&v!=null;){const y=T(v);if(a[0](y))bw(n.onError,u),a[1](d),h=!0;else{const C=n.update(y,d),R=C[0],L=n.subscribe(R);n.setState(R,p),Ou(X=>{n.onError([Qt(Ut("Error handling the message: %A"))(y),X])},p,C[1]),d=R,u=($=Id(u,L),Ed(n.onError,p,$[0],$[1],$[2],$[3])),v=Td(l)}}};c=!0,n.setState(s,p),Ou($=>{n.onError([Qt(Ut("Error intitializing:")),$])},p,o[1]),u=(r=Id(u,i),Ed(n.onError,p,r[0],r[1],r[2],r[3])),b(),c=!1}function Pw(e,t){Ow(be(n=>n),e,t)}function Dw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Nd={exports:{}},Md={};const Fw=Dw(Zi);/**
|
|
23
23
|
* @license React
|
|
24
24
|
* use-sync-external-store-shim.production.min.js
|
|
25
25
|
*
|
|
@@ -27,10 +27,10 @@ If you can't use one of these types, please pass an extra decoder.
|
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var
|
|
31
|
-
`,n.getAllResponseHeaders())),{Compare:so}),new Ud(d,l,u,n.responseURL,p,h)))};const r=Ve(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{Ee(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(o!=null){const l=o;n.overrideMimeType(l)}const s=e.overridenResponseType;if(s!=null)switch(s.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const i=e.timeout;if(i!=null){const l=i|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(ut(a.fields[0]));break}case 3:{n.send(ut(a.fields[0]));break}case 2:{n.send(ut(a.fields[0]));break}default:n.send()}})}function tw(e,t,n){e:for(;;){const r=e,o=t,s=n;if(X(s)){const i=r;return i.tag===1?new w(1,[i.fields[0]]):new w(0,[ns(i.fields[0])])}else{let i;const a=o(B(s));if(a.tag===1)i=new w(1,[a.fields[0]]);else{const l=r;i=l.tag===1?new w(1,[l.fields[0]]):new w(0,[Pt(a.fields[0],l.fields[0])])}if(i.tag===1)return i;e=i,t=o,n=y(s);continue e}}}function nw(e,t){return tw(new w(0,[qe()]),e,t)}function rw(e){return nw(t=>t,e)}function ma(e){return new rc(un(e))}function bs(e){return`${e}/account-registry/admin`}function vs(e,t){return J.Delay(()=>{const n=pa(zd(cn(Kt("Bearer %s"))(e)),t);let r;const o=$a(n);return r=J.Bind(o,s=>J.Return(new w(0,[s]))),J.Bind(r,s=>{const i=s;if(i.tag===1)return J.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=$a(n);return J.Bind(l,c=>J.Return(new w(0,[c])))}else return J.Return(new w(0,[a]))}})})}function ow(e,t){return J.Delay(()=>{const n=vs(t,Ao(new Kr(0,[]),Jr(`${bs(e)}/partners`)));return J.Bind(n,r=>{const o=r;if(o.tag===1)return J.Return(new w(1,[o.fields[0]]));{const s=o.fields[0];if(s.statusCode===200){let i;const a=dr(Ie(fr(ni(dm()),new fn(1,[]))),s.responseText);return i=a.tag===1?new w(1,[a.fields[0]]):rw(po(hg,a.fields[0])),J.Return(i)}else return J.Return(new w(1,["Unexpected response from backend"]))}})})}function sw(e,t,n,r){const o=un(n),s=Zt(r);return J.Delay(()=>{const i=vs(t,Ao(new Kr(0,[]),Jr(`${bs(e)}/partners/${o}/accounts/${s}`)));return J.Bind(i,a=>{const l=a;if(l.tag===1)return J.Return(new w(1,[l.fields[0]]));{const c=l.fields[0];if(c.statusCode===200){const d=dr(Ie(fr($m(),new fn(1,[]))),c.responseText);return J.Return(d)}else return J.Return(new w(1,["Unexpected response from backend"]))}})})}function ga(e,t,n,r,o){return J.Delay(()=>{let s,i,a,l;const c="?"+pe("&",Bl(u=>u,C([(s=Zu(r.SearchText),Ml(s)?void 0:`search=${encodeURIComponent(s)}`),(i=tg(r.Sort),i[0].tag===1?i[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":i[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=Ju(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)]))),d=vs(t,(l=Ao(new Kr(0,[]),Jr(`${bs(e)}/partners/${Yt(n)}/accounts${c}`)),o==null?l:pa(new Ld("token",o),l)));return J.Bind(d,u=>{const h=u;if(h.tag===1)return J.Return(new w(1,[h.fields[0]]));{const f=h.fields[0];if(f.statusCode===200){const p=dr(Ie(fr(wm(),new fn(1,[]))),f.responseText);return J.Return(p)}else return J.Return(new w(1,["Unexpected response from backend"]))}})})}function iw(e,t,n){const r=Zt(n);return J.Delay(()=>{const o=vs(t,Ao(new Kr(0,[]),Jr(`${bs(e)}/search-by-id/${r}`)));return J.Bind(o,s=>{const i=s;if(i.tag===1)return J.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===200){const l=dr(Ie(fr(ym(),new fn(1,[]))),a.responseText);return J.Return(l)}else return J.Return(new w(1,["Unexpected response from backend"]))}})})}function aw(e,t){return $("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const lw=Wn(aw);function cw(e,t){return $("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$("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"}))}const uw=Wn(cw);function dw(e,t){return $("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const fw=Wn(dw);function hw(e,t){return $("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const pw=Wn(hw);function $w(e,t){return $("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),$("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const mw=Wn($w);class wt extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function gw(e,t,n){let r,o;return $("li",U(C([["key",e],["className","flex"],(r=[$("div",U(C([["className","flex items-center"],(o=Le(R(()=>{let s;return G(n?Dt():P((s={className:"flex-shrink-0 h-5 w-5 text-gray-400"},$(uw,s))),R(()=>P($("a",U(Le(R(()=>G(P(["children",e]),R(()=>G(t!=null?P(["href",M(O(t),1)]):Dt(),R(()=>P(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",T.Children.toArray(Array.from(o))])])))],["children",T.Children.toArray(Array.from(r))])])))}function ww(e){let t,n;return $("nav",U(C([["className","pt-2"],["aria-label","Breadcrumb"],(t=[$("ol",U(C([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=kp((r,o)=>gw(o.fields[0][0],o.fields[0][1],r===0),e),["children",T.Children.toArray(Array.from(n))])])))],["children",T.Children.toArray(Array.from(t))])])))}function Hd(){return new wt(["Partners",E(new k(0,[]))])}function Wd(e,t){return new wt([t,E(new k(1,[e]))])}function _w(e){return new wt(["Super",E(new k(4,[e]))])}function yw(e){return new wt(["Benefits",E(new k(5,[e]))])}function bw(e){return new wt(["Bank Details",E(new k(6,[e]))])}function vw(e){return new wt(["Directory",E(new k(2,[e]))])}function xw(e){return new wt(["Workspace",E(new k(7,[e]))])}function Cw(e){return new wt(["Accounts",E(new k(3,[e]))])}function Sw(e){return new wt([e,void 0])}function kw(e,t){let n;return new wt(["Directory",E((n=[e,t],new k(9,[n[0],n[1]])))])}function Aw(e,t){let n;return new wt(["Imports",E((n=[e,t],new k(10,[n[0],n[1]])))])}function Ew(e,t){let n;return new wt(["Super",E((n=[e,t],new k(11,[n[0],n[1]])))])}function Iw(e,t){let n;return new wt(["Benefits",E((n=[e,t],new k(12,[n[0],n[1]])))])}function Tw(e,t){let n;return new wt(["Bank Details",E((n=[e,t],new k(13,[n[0],n[1]])))])}function Nw(e,t){let n;return new wt(["Salary Packaging",E((n=[e,t],new k(14,[n[0],n[1]])))])}function Mw(e,t){let n;return new wt(["Workspace",E((n=[e,t],new k(15,[n[0],n[1]])))])}function Eo(e){let t,n;const r=e.partner;if(r==null)n="...";else{const h=r,f=h.Name;n=f.tag===2?f.fields[0].tag===1?$i(h.Id):pi(f.fields[0].fields[0]):"..."}let o;const s=e.account;if(s==null)o="...";else{const h=s,f=h.Name;o=f.tag===2?f.fields[0].tag===1?Hl(h.Id):pi(f.fields[0].fields[0]):"..."}let i;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{i=C([Hd(),Wd(d.Id,n),Cw(d.Id),Sw(o)]);break}case 1:{i=C([Hd(),Wd(u.Id,n)]);break}default:i=qe()}return ww((t=e.page,t.tag===16||t.tag===1||t.tag===3?i:t.tag===4?ft(i,ie(_w(t.fields[0]))):t.tag===5?ft(i,ie(yw(t.fields[0]))):t.tag===6?ft(i,ie(bw(t.fields[0]))):t.tag===2?ft(i,ie(vw(t.fields[0]))):t.tag===7?ft(i,ie(xw(t.fields[0]))):t.tag===8?i:t.tag===9?ft(i,ie(kw(t.fields[0],t.fields[1]))):t.tag===10?ft(i,ie(Aw(t.fields[0],t.fields[1]))):t.tag===11?ft(i,ie(Ew(t.fields[0],t.fields[1]))):t.tag===12?ft(i,ie(Iw(t.fields[0],t.fields[1]))):t.tag===13?ft(i,ie(Tw(t.fields[0],t.fields[1]))):t.tag===14?ft(i,ie(Nw(t.fields[0],t.fields[1]))):t.tag===15?ft(i,ie(Mw(t.fields[0],t.fields[1]))):i))}class Rw extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function Pw(e){return new Rw(e)}function Ow(e){return e.fields[0]}function I(e,t){const n=(t!=null?"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 Pw($("a",U(Le(R(()=>G(P(["key",e]),R(()=>G(P(["children",e]),R(()=>G(P(["className",n]),R(()=>t!=null?P(["href",M(ie(O(t)),1)]):Dt())))))))))))}function Gd(e){let t,n;return $("div",U(C([["className","border-b border-gray-200"],(t=[$("nav",U(C([["className","-mb-px flex space-x-8"],["aria-label","Tabs"],(n=ze(Ow,e),["children",T.Children.toArray(Array.from(n))])])))],["children",T.Children.toArray(Array.from(t))])])))}class Dw extends he{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const Gn=f0();let pr=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class Fw{constructor(t){this.props=t}}function Vw(e){return new Fw(e)}function qd(e){return t=>n=>J.Delay(()=>{const r=ma(e.props.partnerId);return J.Bind(ga(e.props.backendUrl,e.props.accessToken,r,t,void 0),o=>(n(new pr(2,[new Se(2,[o])])),J.Zero()))})}function Lw(e){return t=>n=>r=>J.Delay(()=>{const o=ma(e.props.partnerId);return J.Bind(ga(e.props.backendUrl,e.props.accessToken,o,t,n),s=>(r(new pr(3,[s])),J.Zero()))})}function Bw(e,t,n){return ga(e.props.backendUrl,e.props.accessToken,ma(e.props.partnerId),t,void 0)}let Yr=class extends he{constructor(t,n,r,o){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=o}};function Uw(){return[new Yr(new Se(0,[]),ng,eg,sg(20)),Ge()]}function zw(e,t,n){let r,o,s,i;switch(t.tag){case 1:{const a=t.fields[0];return[new Yr(new Se(1,[]),n.SearchText,a,n.PageSize),st(l=>{const c=new sa(n.SearchText,a,n.PageSize);Br(qd(e)(c)(l))})]}case 2:return[new Yr(t.fields[0],n.SearchText,n.Sort,n.PageSize),Ge()];case 3:{const a=t.fields[0];return[new Yr((r=n.Data,r.tag===2?r.fields[0].tag===0?(o=a,o.tag===1?new Se(2,[new w(1,[o.fields[0]])]):new Se(2,[new w(0,[new wc(ft(r.fields[0].fields[0].Accounts,o.fields[0].Accounts),o.fields[0].Token)])])):(s=a,s.tag===1?new Se(2,[new w(1,[s.fields[0]])]):new Se(3,[new Error("Failed to retrieve the account data")])):(i=a,i.tag===1?new Se(2,[new w(1,[i.fields[0]])]):new Se(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),Ge()]}case 4:return[new Yr(new Se(1,[]),n.SearchText,n.Sort,n.PageSize),st(a=>{const l=new sa(n.SearchText,n.Sort,n.PageSize);Br(qd(e)(l)(a))})];default:return[new Yr(n.Data,rg(t.fields[0]),n.Sort,n.PageSize),Ge()]}}function Kd(e,t,n,r){let o,s;return $("div",U(C([["className",pe(" ",["flex-grow","max-w-md"])],(o=[$("label",{for:"search",children:"Search",className:pe(" ",["block","text-sm","font-medium","text-gray-700"])}),$("div",U(C([["className","mt-1"],(s=[$("input",{id:"search",name:"search",type:"text",className:pe(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:i=>{i.key==="Enter"&&r()},onChange:i=>{n(i.target.value)}})],["children",T.Children.toArray(Array.from(s))])])))],["children",T.Children.toArray(Array.from(o))])])))}function jw(e){let t,n;return $("div",U(C([["className","pt-6"],(t=[$("div",U(C([["className",pe(" ",["flex","justify-end"])],(n=[$("button",{type:"search",children:"Search",className:pe(" ",["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:e})],["children",T.Children.toArray(Array.from(n))])])))],["children",T.Children.toArray(Array.from(t))])])))}function Zd(e){return["fillRule",e]}function Jd(e){return["clipRule",e]}const Hw=$("svg",U(C([["className",pe(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ie($("path",U(C([(e="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",["d",e]),Zd("evenodd"),Jd("evenodd")]))));return["children",T.Children.toArray(Array.from(t))]})()]))),Ww=$("svg",U(C([["className",pe(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ie($("path",U(C([(e="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",["d",e]),Zd("evenodd"),Jd("evenodd")]))));return["children",T.Children.toArray(Array.from(t))]})()]))),Yd=$("svg",U(C([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ie($("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",T.Children.toArray(Array.from(e))]})()]))),Gw=$("svg",U(C([["className",pe(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ie($("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",T.Children.toArray(Array.from(e))]})()])));function qw(e){return e}const Xd=xe();function xs(e){return Array.from(e)}function Kw(e){return Zo(e,"O")}function Zw(e){return Ag(e)}function Jw(){return xe()}function Yw(e){return Zo(e,"O")}function Xw(e,t){return JSON.stringify(t,void 0,ut(e))}function Qw(e){return t=>Pl(Mt(e,t),()=>Xd)}function Qd(e,t,n,r){let o;const s=new yt(xe());let i;const a=Fe(r);i=a===""?e:Du(a,s,e);let l;if(pl(r)){const c=Ln(d=>{const u=td(t,kr(d)),h=Tn(i,t,n,d[1]);return f=>p=>{const _=Uh(f,d);return(!n||n&&_!=null)&&(p[u]=h(_)),p}},ao(r));l=d=>$o((u,h)=>h(d)(u),{},c)}else if(hl(r))l=c=>{const d=Bh(c,r),u=d[0],h=d[1],f=h.length|0;if(f===0)return kr(u);{const p=f|0,_=$l(u),g=es(new Array(p+1),0,p+1,null);Rt(g,0,kr(u));for(let v=1;v<=p;v++){const b=Tn(i,t,n,ge(v-1,_)[1]);Rt(g,v,b(ge(v-1,h)))}return g}};else throw new Error((o=Fe(r),cn(Kt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
|
|
30
|
+
*/var Lr=Fw;function Vw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lw=typeof Object.is=="function"?Object.is:Vw,Bw=Lr.useState,Uw=Lr.useEffect,zw=Lr.useLayoutEffect,jw=Lr.useDebugValue;function Hw(e,t){var n=t(),r=Bw({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return zw(function(){o.value=n,o.getSnapshot=t,ca(o)&&s({inst:o})},[e,n,t]),Uw(function(){return ca(o)&&s({inst:o}),e(function(){ca(o)&&s({inst:o})})},[e]),jw(n),n}function ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lw(e,n)}catch{return!0}}function Ww(e,t){return t()}var Gw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ww:Hw;Md.useSyncExternalStore=Lr.useSyncExternalStore!==void 0?Lr.useSyncExternalStore:Gw,Nd.exports=Md;var qw=Nd.exports;class Kw{constructor(t,n,r){this.arg=n,this.dependencies=r;const o=t(),s=[];this.finalDispatch=void 0;let i;const a=Mw(o)(this.arg);let l=a[0],c=a[1];i=[[l,d=>{const u=this.finalDispatch;u==null?s.push(d):u(d)},!1,s],c],this.state=i[0],this.cmd=i[1],this.subscribe=d=>{let u=!1;const h=qs(this.state[0]);return Pw(this.arg,Nw((f,p)=>{const b=this.state;this.finalDispatch=p,this.state=[f,b[1],!0,s],f!==b[0]&&d()},Rw((f,p)=>{const b=this.cmd;return this.cmd=Le(),[this.state[0],b]},(f,p,b)=>f(p)(this.state[0]),Zs(f=>f),Zs(f=>f),be(f=>f),f=>[p=>f[0](p)?!0:h&&u,p=>{const b=p;qs(b)?we(b):f[1](p)}],o))),()=>{u=!0}}}}function Rd(e,t,n){return new Kw(e,t,n)}function Zw(e){return e.state}function Jw(e){return e.subscribe}function Yw(e,t,n){return He(e.arg,t)?!He(e.dependencies,n):!0}function bs(e,t,n){const r=We(()=>Rd(e,t,n)),o=r[0];Yw(o,t,n)&&r[1](Rd(e,t,n));const s=qw.useSyncExternalStore(Jw(o),()=>Zw(o)),i=s[2],a=s[3],l=s[1];return Te(()=>{if(i&&a.length>0){let c=Re(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{we(c)}xh(a)}},[i,a]),[s[0],l]}class Br extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class Od extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class Pd extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class bo extends ie{constructor(t,n,r,o,s,i,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=o,this.overridenMimeType=s,this.overridenResponseType=i,this.timeout=a,this.content=l}}class Ur extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class Dd extends ie{constructor(t,n,r,o,s,i){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=o,this.responseHeaders=s,this.content=i}}function Fd(e){return new Od("Authorization",e)}const rr=new bo("",new Br(0,[]),Be(),!1,void 0,void 0,void 0,new Pd(0,[]));new Dd(0,"","","",ea({Compare:Yr}),new Ur(0,[""]));function Vd(e,t){return Jo(t)?new Array(0):ii(t,[e],void 0,0)}function Xw(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}function zr(e){return new bo(e,rr.method,rr.headers,rr.withCredentials,rr.overridenMimeType,rr.overridenResponseType,rr.timeout,rr.content)}function _o(e,t){return new bo(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function ua(e,t){return new bo(t.url,t.method,ot(t.headers,ee(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Qw(e,t){return new bo(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function da(e){return _0(t=>{const n=new XMLHttpRequest;n.open(Xw(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,h,f,p;n.readyState===4&&t[0]((l=(c=n.responseType,c===""||c==="text"?n.responseText:""),d=n.status|0,u=n.responseType,h=(f=n.responseType,f===""?new Ur(0,[n.responseText]):f==="text"?new Ur(0,[n.responseText]):f==="arraybuffer"?new Ur(2,[n.response]):f==="blob"?new Ur(1,[n.response]):new Ur(3,[n.response])),p=U0($p(b=>{const $=k(Vd(":",b));if(!K($))return[P($).toLocaleLowerCase(),ae(":",_($)).trim()]},Vd(`\r
|
|
31
|
+
`,n.getAllResponseHeaders())),{Compare:Yr}),new Dd(d,l,u,n.responseURL,p,h)))};const r=Re(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const l=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(l.fields[0],l.fields[1])}}finally{we(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(o!=null){const l=o;n.overrideMimeType(l)}const s=e.overridenResponseType;if(s!=null)switch(s.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const i=e.timeout;if(i!=null){const l=i|0;n.timeout=l|0}const a=e.content;switch(a.tag){case 1:{n.send(nt(a.fields[0]));break}case 3:{n.send(nt(a.fields[0]));break}case 2:{n.send(nt(a.fields[0]));break}default:n.send()}})}function e1(e,t,n){e:for(;;){const r=e,o=t,s=n;if(K(s)){const i=r;return i.tag===1?new w(1,[i.fields[0]]):new w(0,[Qo(i.fields[0])])}else{let i;const a=o(P(s));if(a.tag===1)i=new w(1,[a.fields[0]]);else{const l=r;i=l.tag===1?new w(1,[l.fields[0]]):new w(0,[kt(a.fields[0],l.fields[0])])}if(i.tag===1)return i;e=i,t=o,n=_(s);continue e}}}function t1(e,t){return e1(new w(0,[Be()]),e,t)}function n1(e){return t1(t=>t,e)}function fa(e){return new Xl(fn(e))}function _s(e){return`${e}/account-registry/admin`}function ys(e,t){return W.Delay(()=>{const n=ua(Fd(Qt(Ut("Bearer %s"))(e)),t);let r;const o=da(n);return r=W.Bind(o,s=>W.Return(new w(0,[s]))),W.Bind(r,s=>{const i=s;if(i.tag===1)return W.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=da(n);return W.Bind(l,c=>W.Return(new w(0,[c])))}else return W.Return(new w(0,[a]))}})})}function r1(e,t){return W.Delay(()=>{const n=ys(t,_o(new Br(0,[]),zr(`${_s(e)}/partners`)));return W.Bind(n,r=>{const o=r;if(o.tag===1)return W.Return(new w(1,[o.fields[0]]));{const s=o.fields[0];if(s.statusCode===200){let i;const a=tr(be(nr(Qs(u$()),new tn(1,[]))),s.responseText);return i=a.tag===1?new w(1,[a.fields[0]]):n1(Wn(fg,a.fields[0])),W.Return(i)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function o1(e,t,n,r){const o=fn(n),s=hn(r);return W.Delay(()=>{const i=ys(t,_o(new Br(0,[]),zr(`${_s(e)}/partners/${o}/accounts/${s}`)));return W.Bind(i,a=>{const l=a;if(l.tag===1)return W.Return(new w(1,[l.fields[0]]));{const c=l.fields[0];if(c.statusCode===200){const d=tr(be(nr(p$(),new tn(1,[]))),c.responseText);return W.Return(d)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function ha(e,t,n,r,o){return W.Delay(()=>{let s,i,a,l;const c="?"+ae("&",Dl(u=>u,k([(s=Hu(r.SearchText),El(s)?void 0:`search=${encodeURIComponent(s)}`),(i=eg(r.Sort),i[0].tag===1?i[1].tag===1?"sort_by=name&sort_direction=desc":"sort_by=name&sort_direction=asc":i[1].tag===1?"sort_by=accountid&sort_direction=desc":"sort_by=accountid&sort_direction=asc"),(a=Wu(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)]))),d=ys(t,(l=_o(new Br(0,[]),zr(`${_s(e)}/partners/${kr(n)}/accounts${c}`)),o==null?l:ua(new Od("token",o),l)));return W.Bind(d,u=>{const h=u;if(h.tag===1)return W.Return(new w(1,[h.fields[0]]));{const f=h.fields[0];if(f.statusCode===200){const p=tr(be(nr(g$(),new tn(1,[]))),f.responseText);return W.Return(p)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function s1(e,t,n){const r=hn(n);return W.Delay(()=>{const o=ys(t,_o(new Br(0,[]),zr(`${_s(e)}/search-by-id/${r}`)));return W.Bind(o,s=>{const i=s;if(i.tag===1)return W.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===200){const l=tr(be(nr(b$(),new tn(1,[]))),a.responseText);return W.Return(l)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function i1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const a1=Rn(i1);function l1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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"}))}const c1=Rn(l1);function u1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}const d1=Rn(u1);function f1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}const h1=Rn(f1);function p1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}const m1=Rn(p1);class Ld extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function $1(e,t,n){let r,o;return m("li",D(k([["key",e],["className","flex"],(r=[m("div",D(k([["className","flex items-center"],(o=Ie(A(()=>{let s;return B(n?Et():E((s={className:"flex-shrink-0 h-5 w-5 text-gray-400"},m(c1,s))),A(()=>E(m("a",D(Ie(A(()=>B(E(["children",e]),A(()=>B(t!=null?E(["href",Qn(T(t),1)]):Et(),A(()=>E(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))}function g1(e){let t,n;return m("nav",D(k([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[m("ol",D(k([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=Sp((r,o)=>$1(o.fields[0][0],o.fields[0][1],r===0),e),["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function wt(e,t){return new Ld([e,$o(t)])}function Bd(){return wt("Partners",new J(0,[]))}function Ud(e,t){return wt(t,new J(1,[e]))}function w1(e){return wt("Super",new J(4,[e]))}function b1(e){return wt("Benefits",new J(5,[e]))}function _1(e){return wt("Bank Details",new J(6,[e]))}function y1(e){return wt("Directory",new J(2,[e]))}function v1(e){return wt("Workspace",new J(7,[e]))}function x1(e){return wt("Accounts",new J(3,[e]))}function C1(e){return new Ld([e,void 0])}function S1(e,t){let n;return wt("Directory",(n=[e,t],new J(9,[n[0],n[1]])))}function k1(e,t){let n;return wt("Imports",(n=[e,t],new J(10,[n[0],n[1]])))}function A1(e,t){let n;return wt("Super",(n=[e,t],new J(11,[n[0],n[1]])))}function E1(e,t){let n;return wt("Benefits",(n=[e,t],new J(12,[n[0],n[1]])))}function I1(e,t){let n;return wt("Bank Details",(n=[e,t],new J(13,[n[0],n[1]])))}function T1(e,t){let n;return wt("Salary Packaging",(n=[e,t],new J(14,[n[0],n[1]])))}function N1(e,t){let n;return wt("Workspace",(n=[e,t],new J(15,[n[0],n[1]])))}function yo(e){let t,n;const r=e.partner;if(r==null)n="...";else{const h=r,f=h.Name;n=f.tag===2?f.fields[0].tag===1?ts(h.Id):di(f.fields[0].fields[0]):"..."}let o;const s=e.account;if(s==null)o="...";else{const h=s,f=h.Name;o=f.tag===2?f.fields[0].tag===1?ns(h.Id):di(f.fields[0].fields[0]):"..."}let i;const a=e.partner,l=e.account;let c,d,u;switch(a==null?(l==null,c=2):l==null?(c=1,u=a):(c=0,d=a),c){case 0:{i=k([Bd(),Ud(d.Id,n),x1(d.Id),C1(o)]);break}case 1:{i=k([Bd(),Ud(u.Id,n)]);break}default:i=Be()}return g1((t=e.page,t.tag===16||t.tag===1||t.tag===3?i:t.tag===4?ot(i,ee(w1(t.fields[0]))):t.tag===5?ot(i,ee(b1(t.fields[0]))):t.tag===6?ot(i,ee(_1(t.fields[0]))):t.tag===2?ot(i,ee(y1(t.fields[0]))):t.tag===7?ot(i,ee(v1(t.fields[0]))):t.tag===8?i:t.tag===9?ot(i,ee(S1(t.fields[0],t.fields[1]))):t.tag===10?ot(i,ee(k1(t.fields[0],t.fields[1]))):t.tag===11?ot(i,ee(A1(t.fields[0],t.fields[1]))):t.tag===12?ot(i,ee(E1(t.fields[0],t.fields[1]))):t.tag===13?ot(i,ee(I1(t.fields[0],t.fields[1]))):t.tag===14?ot(i,ee(T1(t.fields[0],t.fields[1]))):t.tag===15?ot(i,ee(N1(t.fields[0],t.fields[1]))):i))}class M1 extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function R1(e){return new M1(e)}function O1(e){return e.fields[0]}function zd(e,t,n){const r=(e===t?"border-indigo-500 text-indigo-600 bg-indigo-100":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 hover:bg-white")+" whitespace-nowrap p-3 border-r-2 font-medium text-sm";return R1(m("a",D(Ie(A(()=>B(E(["key",t]),A(()=>B(E(["children",t]),A(()=>B(E(["className",r]),A(()=>e!==t?E(["href",Qn(ee(n),1)]):Et())))))))))))}function jd(e){let t,n;const r=e.headers,o=Yn(100);return m("div",D(k([["ref",s=>{const i=dp(s);if(i!=null){const a=i;o[1](~~a.offsetTop)}}],["className","relative"],(t=[m("div",{className:"w-40 mr-6"}),m("nav",D(k([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:o[0]}],(n=De(O1,r),["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}class P1 extends ie{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const On=d0();let or=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class D1{constructor(t){this.props=t}}function F1(e){return new D1(e)}function Hd(e){return t=>n=>W.Delay(()=>{const r=fa(e.props.partnerId);return W.Bind(ha(e.props.backendUrl,e.props.accessToken,r,t,void 0),o=>(n(new or(2,[new pe(2,[o])])),W.Zero()))})}function V1(e){return t=>n=>r=>W.Delay(()=>{const o=fa(e.props.partnerId);return W.Bind(ha(e.props.backendUrl,e.props.accessToken,o,t,n),s=>(r(new or(3,[s])),W.Zero()))})}function L1(e,t,n){return ha(e.props.backendUrl,e.props.accessToken,fa(e.props.partnerId),t,void 0)}let jr=class extends ie{constructor(t,n,r,o){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=o}};function B1(){return[new jr(new pe(0,[]),tg,Q0,og(20)),Le()]}function U1(e,t,n){let r,o,s,i;switch(t.tag){case 1:{const a=t.fields[0];return[new jr(new pe(1,[]),n.SearchText,a,n.PageSize),Xe(l=>{const c=new ta(n.SearchText,a,n.PageSize);Mr(Hd(e)(c)(l))})]}case 2:return[new jr(t.fields[0],n.SearchText,n.Sort,n.PageSize),Le()];case 3:{const a=t.fields[0];return[new jr((r=n.Data,r.tag===2?r.fields[0].tag===0?(o=a,o.tag===1?new pe(2,[new w(1,[o.fields[0]])]):new pe(2,[new w(0,[new hc(ot(r.fields[0].fields[0].Accounts,o.fields[0].Accounts),o.fields[0].Token)])])):(s=a,s.tag===1?new pe(2,[new w(1,[s.fields[0]])]):new pe(3,[new Error("Failed to retrieve the account data")])):(i=a,i.tag===1?new pe(2,[new w(1,[i.fields[0]])]):new pe(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),Le()]}case 4:return[new jr(new pe(1,[]),n.SearchText,n.Sort,n.PageSize),Xe(a=>{const l=new ta(n.SearchText,n.Sort,n.PageSize);Mr(Hd(e)(l)(a))})];default:return[new jr(n.Data,ng(t.fields[0]),n.Sort,n.PageSize),Le()]}}function Wd(e,t,n,r){let o,s;return m("div",D(k([["className",ae(" ",["flex-grow","max-w-md"])],(o=[m("label",{for:"search",children:"Search",className:ae(" ",["block","text-sm","font-medium","text-gray-700"])}),m("div",D(k([["className","mt-1"],(s=[m("input",{id:"search",name:"search",type:"text",className:ae(" ",["py-2","shadow-sm","focus:ring-indigo-500","focus:border-indigo-500","block","w-full","sm:text-sm","border-gray-300","rounded-md"]),placeholder:t,value:e,onKeyUp:i=>{i.key==="Enter"&&r()},onChange:i=>{n(i.target.value)}})],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))}function z1(e){let t,n;return m("div",D(k([["className","pt-6"],(t=[m("div",D(k([["className",ae(" ",["flex","justify-end"])],(n=[m("button",{type:"search",children:"Search",className:ae(" ",["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:e})],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function Gd(e){return["fillRule",e]}function qd(e){return["clipRule",e]}const j1=m("svg",D(k([["className",ae(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(m("path",D(k([(e="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",["d",e]),Gd("evenodd"),qd("evenodd")]))));return["children",I.Children.toArray(Array.from(t))]})()]))),H1=m("svg",D(k([["className",ae(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ee(m("path",D(k([(e="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",["d",e]),Gd("evenodd"),qd("evenodd")]))));return["children",I.Children.toArray(Array.from(t))]})()]))),Kd=m("svg",D(k([["className","size-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}));return["children",I.Children.toArray(Array.from(e))]})()]))),W1=m("svg",D(k([["className",ae(" ",["h-5","w-5"])],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{const e=ee(m("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",I.Children.toArray(Array.from(e))]})()])));function G1(e){return e}const Zd=he();function vs(e){return Array.from(e)}function q1(e){return Go(e,"O")}function K1(e){return kg(e)}function Z1(){return he()}function J1(e){return Go(e,"O")}function Y1(e,t){return JSON.stringify(t,void 0,nt(e))}function X1(e){return t=>Tl(zt(e,t),()=>Zd)}function Jd(e,t,n,r){let o;const s=new ft(he());let i;const a=Me(r);i=a===""?e:Nu(a,s,e);let l;if(ul(r)){const c=An(d=>{const u=Ju(t,wr(d)),h=vn(i,t,n,d[1]);return f=>p=>{const b=Lh(f,d);return(!n||n&&b!=null)&&(p[u]=h(b)),p}},Qr(r));l=d=>io((u,h)=>h(d)(u),{},c)}else if(cl(r))l=c=>{const d=Vh(c,r),u=d[0],h=d[1],f=h.length|0;if(f===0)return wr(u);{const p=f|0,b=dl(u),$=Yo(new Array(p+1),0,p+1,null);St($,0,wr(u));for(let v=1;v<=p;v++){const y=vn(i,t,n,fe(v-1,b)[1]);St($,v,y(fe(v-1,h)))}return $}};else throw new Error((o=Me(r),Qt(Ut(`Cannot generate auto encoder for %s. Please pass an extra encoder.
|
|
32
32
|
|
|
33
|
-
Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function
|
|
33
|
+
Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function vn(e,t,n,r){const o=Me(r),s=Mu(o,e);if(s==null)if(rl(r)){const i=vn(e,t,n,Xr(r));return a=>vs(De(i,a))}else if(ei(r))switch(Me(il(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=Me(r);return Cl(Ut(`Cannot generate auto encoder for %s.
|
|
34
34
|
Thoth.Json.Net only support the following enum types:
|
|
35
35
|
- sbyte
|
|
36
36
|
- byte
|
|
@@ -42,12 +42,12 @@ Thoth.Json.Net only support the following enum types:
|
|
|
42
42
|
If you can't use one of these types, please pass an extra encoder.
|
|
43
43
|
|
|
44
44
|
Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders
|
|
45
|
-
`))(a)}}else if(ll(r))if(oi(r)){const i=Ln(a=>Tn(e,t,n,a),fl(r));return a=>xs(yi((l,c)=>ge(l,i)(c),a))}else{const i=Fe(cl(r));if(i==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new ph(()=>Qw(Tn(e,t,n,ge(0,Tt(r)))));return l=>l==null?Xd:a.Value(l)}else if(i==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||i==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||i==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=Tn(e,t,n,ge(0,Tt(r)));return l=>xs(ze(a,l))}else if(i==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=ge(0,Tt(r)),l=Tn(e,t,n,ge(1,Tt(r)));if(Fe(a)==="System.String"||Fe(a)==="System.Guid")return c=>$o((d,u)=>{const h=u;return d[h[0]]=l(h[1]),d},{},c);{let c;return c=Tn(e,t,n,a),u=>xs(ze(h=>{const f=h;return[c(f[0]),l(f[1])]},u))}}else return Qd(e,t,n,r)}else switch(o){case"System.Boolean":return i=>i;case"Microsoft.FSharp.Core.Unit":return Jw;case"System.String":return i=>i;case"System.Char":return i=>i;case"System.SByte":return i=>i;case"System.Byte":return i=>i;case"System.Int16":return i=>i;case"System.UInt16":return i=>i;case"System.Int32":return i=>i;case"System.UInt32":return i=>i;case"System.Double":return i=>i;case"System.Single":return i=>i;case"System.DateTime":return Yw;case"System.DateTimeOffset":return Kw;case"System.TimeSpan":return Zw;case"System.Guid":return qw;case"System.Object":return i=>i;default:return Qd(e,t,n,r)}else{const i=s;return a=>i.contents(a)}}function e_(e){return oa({Compare:so})}function t_(e,t,n,r){const o=ot(t,new fn(0,[])),s=ot(r,!0);return Tn(e_(),o,s,e)}class n_{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return C0(J.Delay(()=>J.Bind(ef(n,Jr(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const o=dr(Ie(fr(km(),new fn(1,[]))),r.responseText);return J.Return(o.tag===1?new Array(0):o.fields[0].tag===0?o.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,o){const s=this;return J.Delay(()=>{let i,a;const l=ef(s,ew(new Bd(1,[(i=new yc(n.AccountName,n.WebsiteUrl,new $c(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new _c(n.LegalEntityName,n.Abn,o.Line1,Qo(o.Line2)?void 0:o.Line2,o.City,o.Postcode,o.State,r.MobilePhone,"AU"),void 0,void 0,new mc(n.SalesforceParentRecordId,void 0),new gc(n.Industry.ClassCode,n.Industry.ClassTitle)),Xw(0,t_(Em(),new fn(1,[]),void 0,void 0)(i)))]),Ao(new Kr(1,[]),Jr(`${s.adminUrl}/partners/${$i(t)}/accounts`))));return a=J.Bind(l,c=>J.Return(new w(0,[c]))),J.Bind(a,c=>{const d=c;if(d.tag===1)return J.Return(new w(1,[d.fields[0]]));{let u;const h=dr(Ie(fr(Tm(),new fn(1,[]))),d.fields[0].responseText);return u=h.tag===1?new w(1,[void 0]):new w(0,[h.fields[0].Id]),J.Return(u)}})})}}function r_(e,t){return new n_(e,t)}function ef(e,t){return $a(pa(zd(`Bearer ${e.accessToken}`),t))}class $r extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let rn=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},qn=class extends he{constructor(t,n,r,o,s){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=o,this.AccountCreation=s}};function o_(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function s_(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const i_=[new qn({},{},{},new $r(0,[]),new Se(0,[])),Ge()];function a_(e,t,n,r){let o,s;switch(n.tag){case 1:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(o=r.CurrentView,o.tag===1?new $r(0,[]):o.tag===2?new $r(1,[]):new $r(0,[])),r.AccountCreation),Ge()];case 2:return[new qn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Ge()];case 3:return[new qn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Ge()];case 4:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),Ge()];case 5:{const i=r.AccountCreation;let a;switch(i.tag){case 0:case 3:{a=1;break}case 2:{i.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,Ge()];default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new Se(1,[])),Bu(l=>{Uu(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new rn(6,[l]))]}}case 6:{const i=n.fields[0];return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new Se(2,[i])),i.tag===1?Ge():aa(new k(15,[e,Jt(i.fields[0])]))]}default:return[new qn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new $r(2,[]):s.tag===2?new $r(2,[]):new $r(1,[])),r.AccountCreation),Ge()]}}var l_=0;function F(e,t,n,r,o,s){t||(t={});var i,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?i=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--l_,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)l[a]===void 0&&(l[a]=i[a]);return le.vnode&&le.vnode(c),c}var Io=e=>e.type==="checkbox",mr=e=>e instanceof Date,kt=e=>e==null;const tf=e=>typeof e=="object";var Ke=e=>!kt(e)&&!Array.isArray(e)&&tf(e)&&!mr(e),nf=e=>Ke(e)&&e.target?Io(e.target)?e.target.checked:e.target.value:e,c_=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rf=(e,t)=>e.has(c_(t)),u_=e=>{const t=e.constructor&&e.constructor.prototype;return Ke(t)&&t.hasOwnProperty("isPrototypeOf")},wa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Et(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(wa&&(e instanceof Blob||r))&&(n||Ke(e)))if(t=n?[]:{},!n&&!u_(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Et(e[o]));else return e;return t}var Cs=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,z=(e,t,n)=>{if(!t||!Ke(e))return n;const r=Cs(t.split(/[,[\].]+?/)).reduce((o,s)=>kt(o)?o:o[s],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},Wt=e=>typeof e=="boolean",_a=e=>/^\w*$/.test(e),of=e=>Cs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{let r=-1;const o=_a(t)?[t]:of(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const c=e[a];l=Ke(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Ss={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},on={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Nn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},d_=Y.createContext(null),ya=()=>Y.useContext(d_);var sf=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==on.all&&(t._proxyFormState[i]=!r||on.all),n&&(n[i]=!0),e[i]}});return o},It=e=>Ke(e)&&!Object.keys(e).length,af=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return It(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||on.all))},To=e=>Array.isArray(e)?e:[e],lf=(e,t,n)=>!e||!t||e===t||To(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function ba(e){const t=Y.useRef(e);t.current=e,Y.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function f_(e){const t=ya(),{control:n=t.control,disabled:r,name:o,exact:s}=e||{},[i,a]=Y.useState(n._formState),l=Y.useRef(!0),c=Y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Y.useRef(o);return d.current=o,ba({disabled:r,next:u=>l.current&&lf(d.current,u.name,s)&&af(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),Y.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Y.useMemo(()=>sf(i,n,c.current,!1),[i,n])}var hn=e=>typeof e=="string",cf=(e,t,n,r,o)=>hn(e)?(r&&t.watch.add(e),z(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),z(n,s))):(r&&(t.watchAll=!0),n);function h_(e){const t=ya(),{control:n=t.control,name:r,defaultValue:o,disabled:s,exact:i}=e||{},a=Y.useRef(r);a.current=r,ba({disabled:s,subject:n._subjects.values,next:d=>{lf(a.current,d.name,i)&&c(Et(cf(a.current,n._names,d.values||n._formValues,!1,o)))}});const[l,c]=Y.useState(n._getWatch(r,o));return Y.useEffect(()=>n._removeUnmounted()),l}function uf(e){const t=ya(),{name:n,disabled:r,control:o=t.control,shouldUnregister:s}=e,i=rf(o._names.array,n),a=h_({control:o,name:n,defaultValue:z(o._formValues,n,z(o._defaultValues,n,e.defaultValue)),exact:!0}),l=f_({control:o,name:n,exact:!0}),c=Y.useRef(o.register(n,{...e.rules,value:a,...Wt(e.disabled)?{disabled:e.disabled}:{}})),d=Y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!z(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!z(l.validatingFields,n)},error:{enumerable:!0,get:()=>z(l.errors,n)}}),[l,n]),u=Y.useMemo(()=>({name:n,value:a,...Wt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:h=>c.current.onChange({target:{value:nf(h),name:n},type:Ss.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:z(o._formValues,n),name:n},type:Ss.BLUR}),ref:h=>{const f=z(o._fields,n);f&&h&&(f._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:p=>h.setCustomValidity(p),reportValidity:()=>h.reportValidity()})}}),[n,o._formValues,r,l.disabled,a,o._fields]);return Y.useEffect(()=>{const h=o._options.shouldUnregister||s,f=(p,_)=>{const g=z(o._fields,p);g&&g._f&&(g._f.mount=_)};if(f(n,!0),h){const p=Et(z(o._options.defaultValues,n));Me(o._defaultValues,n,p),Ze(z(o._formValues,n))&&Me(o._formValues,n,p)}return!i&&o.register(n),()=>{(i?h&&!o._state.action:h)?o.unregister(n):f(n,!1)}},[n,o,i,s]),Y.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),Y.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var p_=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},df=e=>({isOnSubmit:!e||e===on.onSubmit,isOnBlur:e===on.onBlur,isOnChange:e===on.onChange,isOnAll:e===on.all,isOnTouch:e===on.onTouched}),ff=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const No=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=z(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(No(a,t))break}else if(Ke(a)&&No(a,t))break}}};var $_=(e,t,n)=>{const r=To(z(e,n));return Me(r,"root",t[n]),Me(e,n,r),e},va=e=>e.type==="file",pn=e=>typeof e=="function",ks=e=>{if(!wa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},As=e=>hn(e),xa=e=>e.type==="radio",Es=e=>e instanceof RegExp;const hf={value:!1,isValid:!1},pf={value:!0,isValid:!0};var $f=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?pf:{value:e[0].value,isValid:!0}:pf:hf}return hf};const mf={isValid:!1,value:null};var gf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,mf):mf;function wf(e,t,n="validate"){if(As(e)||Array.isArray(e)&&e.every(As)||Wt(e)&&!e)return{type:n,message:As(e)?e:"",ref:t}}var Xr=e=>Ke(e)&&!Es(e)?e:{value:e,message:""},_f=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:u,max:h,pattern:f,validate:p,name:_,valueAsNumber:g,mount:v}=e._f,b=z(n,_);if(!v||t.has(_))return{};const S=a?a[0]:i,D=q=>{o&&S.reportValidity&&(S.setCustomValidity(Wt(q)?"":q||""),S.reportValidity())},L={},ne=xa(i),me=Io(i),we=ne||me,ue=(g||va(i))&&Ze(i.value)&&Ze(b)||ks(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,Q=p_.bind(null,_,r,L),de=(q,oe,ye,N=Nn.maxLength,_e=Nn.minLength)=>{const ae=q?oe:ye;L[_]={type:q?N:_e,message:ae,ref:i,...Q(q?N:_e,ae)}};if(s?!Array.isArray(b)||!b.length:l&&(!we&&(ue||kt(b))||Wt(b)&&!b||me&&!$f(a).isValid||ne&&!gf(a).isValid)){const{value:q,message:oe}=As(l)?{value:!!l,message:l}:Xr(l);if(q&&(L[_]={type:Nn.required,message:oe,ref:S,...Q(Nn.required,oe)},!r))return D(oe),L}if(!ue&&(!kt(u)||!kt(h))){let q,oe;const ye=Xr(h),N=Xr(u);if(!kt(b)&&!isNaN(b)){const _e=i.valueAsNumber||b&&+b;kt(ye.value)||(q=_e>ye.value),kt(N.value)||(oe=_e<N.value)}else{const _e=i.valueAsDate||new Date(b),ae=Re=>new Date(new Date().toDateString()+" "+Re),He=i.type=="time",be=i.type=="week";hn(ye.value)&&b&&(q=He?ae(b)>ae(ye.value):be?b>ye.value:_e>new Date(ye.value)),hn(N.value)&&b&&(oe=He?ae(b)<ae(N.value):be?b<N.value:_e<new Date(N.value))}if((q||oe)&&(de(!!q,ye.message,N.message,Nn.max,Nn.min),!r))return D(L[_].message),L}if((c||d)&&!ue&&(hn(b)||s&&Array.isArray(b))){const q=Xr(c),oe=Xr(d),ye=!kt(q.value)&&b.length>+q.value,N=!kt(oe.value)&&b.length<+oe.value;if((ye||N)&&(de(ye,q.message,oe.message),!r))return D(L[_].message),L}if(f&&!ue&&hn(b)){const{value:q,message:oe}=Xr(f);if(Es(q)&&!b.match(q)&&(L[_]={type:Nn.pattern,message:oe,ref:i,...Q(Nn.pattern,oe)},!r))return D(oe),L}if(p){if(pn(p)){const q=await p(b,n),oe=wf(q,S);if(oe&&(L[_]={...oe,...Q(Nn.validate,oe.message)},!r))return D(oe.message),L}else if(Ke(p)){let q={};for(const oe in p){if(!It(q)&&!r)break;const ye=wf(await p[oe](b,n),S,oe);ye&&(q={...ye,...Q(oe,ye.message)},D(ye.message),r&&(L[_]=q))}if(!It(q)&&(L[_]={ref:S,...q},!r))return L}}return D(!0),L};function m_(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ze(e)?r++:e[t[r++]];return e}function g_(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ze(e[t]))return!1;return!0}function tt(e,t){const n=Array.isArray(t)?t:_a(t)?[t]:of(t),r=n.length===1?e:m_(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Ke(r)&&It(r)||Array.isArray(r)&&g_(r))&&tt(e,n.slice(0,-1)),e}var Ca=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},Sa=e=>kt(e)||!tf(e);function Kn(e,t){if(Sa(e)||Sa(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const s=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(mr(s)&&mr(i)||Ke(s)&&Ke(i)||Array.isArray(s)&&Array.isArray(i)?!Kn(s,i):s!==i)return!1}}return!0}var yf=e=>e.type==="select-multiple",w_=e=>xa(e)||Io(e),ka=e=>ks(e)&&e.isConnected,bf=e=>{for(const t in e)if(pn(e[t]))return!0;return!1};function Is(e,t={}){const n=Array.isArray(e);if(Ke(e)||n)for(const r in e)Array.isArray(e[r])||Ke(e[r])&&!bf(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Is(e[r],t[r])):kt(e[r])||(t[r]=!0);return t}function vf(e,t,n){const r=Array.isArray(e);if(Ke(e)||r)for(const o in e)Array.isArray(e[o])||Ke(e[o])&&!bf(e[o])?Ze(t)||Sa(n[o])?n[o]=Array.isArray(e[o])?Is(e[o],[]):{...Is(e[o])}:vf(e[o],kt(t)?{}:t[o],n[o]):n[o]=!Kn(e[o],t[o]);return n}var Mo=(e,t)=>vf(e,t,Is(t)),xf=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===""?NaN:e&&+e:n&&hn(e)?new Date(e):r?r(e):e;function Aa(e){const t=e.ref;return va(t)?t.files:xa(t)?gf(e.refs).value:yf(t)?[...t.selectedOptions].map(({value:n})=>n):Io(t)?$f(e.refs).value:xf(Ze(t.value)?e.ref.value:t.value,e)}var __=(e,t,n,r)=>{const o={};for(const s of e){const i=z(t,s);i&&Me(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Ro=e=>Ze(e)?e:Es(e)?e.source:Ke(e)?Es(e.value)?e.value.source:e.value:e;const Cf="AsyncFunction";var y_=e=>!!e&&!!e.validate&&!!(pn(e.validate)&&e.validate.constructor.name===Cf||Ke(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Cf)),b_=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Sf(e,t,n){const r=z(e,n);if(r||_a(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=z(t,s),a=z(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};o.pop()}return{name:n}}var v_=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,x_=(e,t)=>!Cs(z(e,t)).length&&tt(e,t);const C_={mode:on.onSubmit,reValidateMode:on.onChange,shouldFocusError:!0};function S_(e={}){let t={...C_,...e},n={submitCount:0,isDirty:!1,isLoading:pn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Ke(t.defaultValues)||Ke(t.values)?Et(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Et(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Ca(),array:Ca(),state:Ca()},h=df(t.mode),f=df(t.reValidateMode),p=t.criteriaMode===on.all,_=m=>x=>{clearTimeout(c),c=setTimeout(m,x)},g=async m=>{if(!t.disabled&&(d.isValid||m)){const x=t.resolver?It((await we()).errors):await Q(r,!0);x!==n.isValid&&u.state.next({isValid:x})}},v=(m,x)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((m||Array.from(a.mount)).forEach(A=>{A&&(x?Me(n.validatingFields,A,x):tt(n.validatingFields,A))}),u.state.next({validatingFields:n.validatingFields,isValidating:!It(n.validatingFields)}))},b=(m,x=[],A,H,j=!0,V=!0)=>{if(H&&A&&!t.disabled){if(i.action=!0,V&&Array.isArray(z(r,m))){const te=A(z(r,m),H.argA,H.argB);j&&Me(r,m,te)}if(V&&Array.isArray(z(n.errors,m))){const te=A(z(n.errors,m),H.argA,H.argB);j&&Me(n.errors,m,te),x_(n.errors,m)}if(d.touchedFields&&V&&Array.isArray(z(n.touchedFields,m))){const te=A(z(n.touchedFields,m),H.argA,H.argB);j&&Me(n.touchedFields,m,te)}d.dirtyFields&&(n.dirtyFields=Mo(o,s)),u.state.next({name:m,isDirty:q(m,x),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Me(s,m,x)},S=(m,x)=>{Me(n.errors,m,x),u.state.next({errors:n.errors})},D=m=>{n.errors=m,u.state.next({errors:n.errors,isValid:!1})},L=(m,x,A,H)=>{const j=z(r,m);if(j){const V=z(s,m,Ze(A)?z(o,m):A);Ze(V)||H&&H.defaultChecked||x?Me(s,m,x?V:Aa(j._f)):N(m,V),i.mount&&g()}},ne=(m,x,A,H,j)=>{let V=!1,te=!1;const fe={name:m};if(!t.disabled){const lt=!!(z(r,m)&&z(r,m)._f&&z(r,m)._f.disabled);if(!A||H){d.isDirty&&(te=n.isDirty,n.isDirty=fe.isDirty=q(),V=te!==fe.isDirty);const ct=lt||Kn(z(o,m),x);te=!!(!lt&&z(n.dirtyFields,m)),ct||lt?tt(n.dirtyFields,m):Me(n.dirtyFields,m,!0),fe.dirtyFields=n.dirtyFields,V=V||d.dirtyFields&&te!==!ct}if(A){const ct=z(n.touchedFields,m);ct||(Me(n.touchedFields,m,A),fe.touchedFields=n.touchedFields,V=V||d.touchedFields&&ct!==A)}V&&j&&u.state.next(fe)}return V?fe:{}},me=(m,x,A,H)=>{const j=z(n.errors,m),V=d.isValid&&Wt(x)&&n.isValid!==x;if(t.delayError&&A?(l=_(()=>S(m,A)),l(t.delayError)):(clearTimeout(c),l=null,A?Me(n.errors,m,A):tt(n.errors,m)),(A?!Kn(j,A):j)||!It(H)||V){const te={...H,...V&&Wt(x)?{isValid:x}:{},errors:n.errors,name:m};n={...n,...te},u.state.next(te)}},we=async m=>{v(m,!0);const x=await t.resolver(s,t.context,__(m||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(m),x},ue=async m=>{const{errors:x}=await we(m);if(m)for(const A of m){const H=z(x,A);H?Me(n.errors,A,H):tt(n.errors,A)}else n.errors=x;return x},Q=async(m,x,A={valid:!0})=>{for(const H in m){const j=m[H];if(j){const{_f:V,...te}=j;if(V){const fe=a.array.has(V.name),lt=j._f&&y_(j._f);lt&&d.validatingFields&&v([H],!0);const ct=await _f(j,a.disabled,s,p,t.shouldUseNativeValidation&&!x,fe);if(lt&&d.validatingFields&&v([H]),ct[V.name]&&(A.valid=!1,x))break;!x&&(z(ct,V.name)?fe?$_(n.errors,ct,V.name):Me(n.errors,V.name,ct[V.name]):tt(n.errors,V.name))}!It(te)&&await Q(te,x,A)}}return A.valid},de=()=>{for(const m of a.unMount){const x=z(r,m);x&&(x._f.refs?x._f.refs.every(A=>!ka(A)):!ka(x._f.ref))&&On(m)}a.unMount=new Set},q=(m,x)=>!t.disabled&&(m&&x&&Me(s,m,x),!Kn(at(),o)),oe=(m,x,A)=>cf(m,a,{...i.mount?s:Ze(x)?o:hn(m)?{[m]:x}:x},A,x),ye=m=>Cs(z(i.mount?s:o,m,t.shouldUnregister?z(o,m,[]):[])),N=(m,x,A={})=>{const H=z(r,m);let j=x;if(H){const V=H._f;V&&(!V.disabled&&Me(s,m,xf(x,V)),j=ks(V.ref)&&kt(x)?"":x,yf(V.ref)?[...V.ref.options].forEach(te=>te.selected=j.includes(te.value)):V.refs?Io(V.ref)?V.refs.length>1?V.refs.forEach(te=>(!te.defaultChecked||!te.disabled)&&(te.checked=Array.isArray(j)?!!j.find(fe=>fe===te.value):j===te.value)):V.refs[0]&&(V.refs[0].checked=!!j):V.refs.forEach(te=>te.checked=te.value===j):va(V.ref)?V.ref.value="":(V.ref.value=j,V.ref.type||u.values.next({name:m,values:{...s}})))}(A.shouldDirty||A.shouldTouch)&&ne(m,j,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&Re(m)},_e=(m,x,A)=>{for(const H in x){const j=x[H],V=`${m}.${H}`,te=z(r,V);(a.array.has(m)||Ke(j)||te&&!te._f)&&!mr(j)?_e(V,j,A):N(V,j,A)}},ae=(m,x,A={})=>{const H=z(r,m),j=a.array.has(m),V=Et(x);Me(s,m,V),j?(u.array.next({name:m,values:{...s}}),(d.isDirty||d.dirtyFields)&&A.shouldDirty&&u.state.next({name:m,dirtyFields:Mo(o,s),isDirty:q(m,V)})):H&&!H._f&&!kt(V)?_e(m,V,A):N(m,V,A),ff(m,a)&&u.state.next({...n}),u.values.next({name:i.mount?m:void 0,values:{...s}})},He=async m=>{i.mount=!0;const x=m.target;let A=x.name,H=!0;const j=z(r,A),V=()=>x.type?Aa(j._f):nf(m),te=fe=>{H=Number.isNaN(fe)||mr(fe)&&isNaN(fe.getTime())||Kn(fe,z(s,A,fe))};if(j){let fe,lt;const ct=V(),Qn=m.type===Ss.BLUR||m.type===Ss.FOCUS_OUT,xv=!b_(j._f)&&!t.resolver&&!z(n.errors,A)&&!j._f.deps||v_(Qn,z(n.touchedFields,A),n.isSubmitted,f,h),Za=ff(A,a,Qn);Me(s,A,ct),Qn?(j._f.onBlur&&j._f.onBlur(m),l&&l(0)):j._f.onChange&&j._f.onChange(m);const Ja=ne(A,ct,Qn,!1),Cv=!It(Ja)||Za;if(!Qn&&u.values.next({name:A,type:m.type,values:{...s}}),xv)return d.isValid&&(t.mode==="onBlur"&&Qn?g():Qn||g()),Cv&&u.state.next({name:A,...Za?{}:Ja});if(!Qn&&Za&&u.state.next({...n}),t.resolver){const{errors:lh}=await we([A]);if(te(ct),H){const Sv=Sf(n.errors,r,A),ch=Sf(lh,r,Sv.name||A);fe=ch.error,A=ch.name,lt=It(lh)}}else v([A],!0),fe=(await _f(j,a.disabled,s,p,t.shouldUseNativeValidation))[A],v([A]),te(ct),H&&(fe?lt=!1:d.isValid&&(lt=await Q(r,!0)));H&&(j._f.deps&&Re(j._f.deps),me(A,lt,fe,Ja))}},be=(m,x)=>{if(z(n.errors,x)&&m.focus)return m.focus(),1},Re=async(m,x={})=>{let A,H;const j=To(m);if(t.resolver){const V=await ue(Ze(m)?m:j);A=It(V),H=m?!j.some(te=>z(V,te)):A}else m?(H=(await Promise.all(j.map(async V=>{const te=z(r,V);return await Q(te&&te._f?{[V]:te}:te)}))).every(Boolean),!(!H&&!n.isValid)&&g()):H=A=await Q(r);return u.state.next({...!hn(m)||d.isValid&&A!==n.isValid?{}:{name:m},...t.resolver||!m?{isValid:A}:{},errors:n.errors}),x.shouldFocus&&!H&&No(r,be,m?j:a.mount),H},at=m=>{const x={...i.mount?s:o};return Ze(m)?x:hn(m)?z(x,m):m.map(A=>z(x,A))},At=(m,x)=>({invalid:!!z((x||n).errors,m),isDirty:!!z((x||n).dirtyFields,m),error:z((x||n).errors,m),isValidating:!!z(n.validatingFields,m),isTouched:!!z((x||n).touchedFields,m)}),sn=m=>{m&&To(m).forEach(x=>tt(n.errors,x)),u.state.next({errors:m?n.errors:{}})},$t=(m,x,A)=>{const H=(z(r,m,{_f:{}})._f||{}).ref,j=z(n.errors,m)||{},{ref:V,message:te,type:fe,...lt}=j;Me(n.errors,m,{...lt,...x,ref:H}),u.state.next({name:m,errors:n.errors,isValid:!1}),A&&A.shouldFocus&&H&&H.focus&&H.focus()},Pn=(m,x)=>pn(m)?u.values.subscribe({next:A=>m(oe(void 0,x),A)}):oe(m,x,!0),On=(m,x={})=>{for(const A of m?To(m):a.mount)a.mount.delete(A),a.array.delete(A),x.keepValue||(tt(r,A),tt(s,A)),!x.keepError&&tt(n.errors,A),!x.keepDirty&&tt(n.dirtyFields,A),!x.keepTouched&&tt(n.touchedFields,A),!x.keepIsValidating&&tt(n.validatingFields,A),!t.shouldUnregister&&!x.keepDefaultValue&&tt(o,A);u.values.next({values:{...s}}),u.state.next({...n,...x.keepDirty?{isDirty:q()}:{}}),!x.keepIsValid&&g()},an=({disabled:m,name:x,field:A,fields:H})=>{(Wt(m)&&i.mount||m||a.disabled.has(x))&&(m?a.disabled.add(x):a.disabled.delete(x),ne(x,Aa(A?A._f:z(H,x)._f),!1,!1,!0))},Dn=(m,x={})=>{let A=z(r,m);const H=Wt(x.disabled)||Wt(t.disabled);return Me(r,m,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:m}},name:m,mount:!0,...x}}),a.mount.add(m),A?an({field:A,disabled:Wt(x.disabled)?x.disabled:t.disabled,name:m}):L(m,!0,x.value),{...H?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:Ro(x.min),max:Ro(x.max),minLength:Ro(x.minLength),maxLength:Ro(x.maxLength),pattern:Ro(x.pattern)}:{},name:m,onChange:He,onBlur:He,ref:j=>{if(j){Dn(m,x),A=z(r,m);const V=Ze(j.value)&&j.querySelectorAll&&j.querySelectorAll("input,select,textarea")[0]||j,te=w_(V),fe=A._f.refs||[];if(te?fe.find(lt=>lt===V):V===A._f.ref)return;Me(r,m,{_f:{...A._f,...te?{refs:[...fe.filter(ka),V,...Array.isArray(z(o,m))?[{}]:[]],ref:{type:V.type,name:m}}:{ref:V}}}),L(m,!1,void 0,V)}else A=z(r,m,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(rf(a.array,m)&&i.action)&&a.unMount.add(m)}}},se=()=>t.shouldFocusError&&No(r,be,a.mount),ve=m=>{Wt(m)&&(u.state.next({disabled:m}),No(r,(x,A)=>{const H=z(r,A);H&&(x.disabled=H._f.disabled||m,Array.isArray(H._f.refs)&&H._f.refs.forEach(j=>{j.disabled=H._f.disabled||m}))},0,!1))},Ye=(m,x)=>async A=>{let H;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let j=Et(s);if(a.disabled.size)for(const V of a.disabled)Me(j,V,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:V,values:te}=await we();n.errors=V,j=te}else await Q(r);if(tt(n.errors,"root"),It(n.errors)){u.state.next({errors:{}});try{await m(j,A)}catch(V){H=V}}else x&&await x({...n.errors},A),se(),setTimeout(se);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:It(n.errors)&&!H,submitCount:n.submitCount+1,errors:n.errors}),H)throw H},gn=(m,x={})=>{z(r,m)&&(Ze(x.defaultValue)?ae(m,Et(z(o,m))):(ae(m,x.defaultValue),Me(o,m,Et(x.defaultValue))),x.keepTouched||tt(n.touchedFields,m),x.keepDirty||(tt(n.dirtyFields,m),n.isDirty=x.defaultValue?q(m,Et(z(o,m))):q()),x.keepError||(tt(n.errors,m),d.isValid&&g()),u.state.next({...n}))},Fn=(m,x={})=>{const A=m?Et(m):o,H=Et(A),j=It(m),V=j?o:H;if(x.keepDefaultValues||(o=A),!x.keepValues){if(x.keepDirtyValues){const te=new Set([...a.mount,...Object.keys(Mo(o,s))]);for(const fe of Array.from(te))z(n.dirtyFields,fe)?Me(V,fe,z(s,fe)):ae(fe,z(V,fe))}else{if(wa&&Ze(m))for(const te of a.mount){const fe=z(r,te);if(fe&&fe._f){const lt=Array.isArray(fe._f.refs)?fe._f.refs[0]:fe._f.ref;if(ks(lt)){const ct=lt.closest("form");if(ct){ct.reset();break}}}}r={}}s=t.shouldUnregister?x.keepDefaultValues?Et(o):{}:Et(V),u.array.next({values:{...V}}),u.values.next({values:{...V}})}a={mount:x.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!x.keepIsValid||!!x.keepDirtyValues,i.watch=!!t.shouldUnregister,u.state.next({submitCount:x.keepSubmitCount?n.submitCount:0,isDirty:j?!1:x.keepDirty?n.isDirty:!!(x.keepDefaultValues&&!Kn(m,o)),isSubmitted:x.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:j?{}:x.keepDirtyValues?x.keepDefaultValues&&s?Mo(o,s):n.dirtyFields:x.keepDefaultValues&&m?Mo(o,m):x.keepDirty?n.dirtyFields:{},touchedFields:x.keepTouched?n.touchedFields:{},errors:x.keepErrors?n.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},no=(m,x)=>Fn(pn(m)?m(s):m,x);return{control:{register:Dn,unregister:On,getFieldState:At,handleSubmit:Ye,setError:$t,_executeSchema:we,_getWatch:oe,_getDirty:q,_updateValid:g,_removeUnmounted:de,_updateFieldArray:b,_updateDisabledField:an,_getFieldArray:ye,_reset:Fn,_resetDefaultValues:()=>pn(t.defaultValues)&&t.defaultValues().then(m=>{no(m,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:m=>{n={...n,...m}},_disableForm:ve,_subjects:u,_proxyFormState:d,_setErrors:D,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(m){i=m},get _defaultValues(){return o},get _names(){return a},set _names(m){a=m},get _formState(){return n},set _formState(m){n=m},get _options(){return t},set _options(m){t={...t,...m}}},trigger:Re,register:Dn,handleSubmit:Ye,watch:Pn,setValue:ae,getValues:at,reset:no,resetField:gn,clearErrors:sn,unregister:On,setError:$t,setFocus:(m,x={})=>{const A=z(r,m),H=A&&A._f;if(H){const j=H.refs?H.refs[0]:H.ref;j.focus&&(j.focus(),x.shouldSelect&&pn(j.select)&&j.select())}},getFieldState:At}}function Ea(e={}){const t=Y.useRef(void 0),n=Y.useRef(void 0),[r,o]=Y.useState({isDirty:!1,isValidating:!1,isLoading:pn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:pn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...S_(e),formState:r});const s=t.current.control;return s._options=e,ba({subject:s._subjects.state,next:i=>{af(i,s._proxyFormState,s._updateFormState,!0)&&o({...s._formState})}}),Y.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),Y.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),Y.useEffect(()=>{e.values&&!Kn(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[e.values,s]),Y.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),Y.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),Y.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=sf(r,s),t.current}function k_(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function Ut({label:e,name:t,control:n,validate:r,placeholder:o,optional:s,isNumber:i}){const{field:a,fieldState:l}=uf({name:t,control:n,rules:{validate:r}});return F("div",{children:[F("div",{className:"flex justify-between",children:[F("label",{className:"block text-sm font-medium",children:e}),s&&F("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),F("div",{className:"mt-2",children:F("input",{...a,placeholder:o,className:"block w-full rounded-md bg-white px-2 py-[9px] outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 text-sm",onChange:c=>i?a.onChange(k_(c.target.value)):a.onChange(c)})}),l.invalid&&F("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Ia({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return F("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[F("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?F("div",{className:"animate-spin size-5",children:F(fw,{})}):e}),F("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function A_({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:o,onSubmit:s,onBack:i}){const{handleSubmit:a,control:l,getValues:c}=Ea({mode:"onChange",defaultValues:e});return F(Be,{children:[F("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),F("form",{className:"space-y-6",onSubmit:a(s),children:[F("div",{className:"grid grid-cols-2 gap-3",children:[F(Ut,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),F(Ut,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),F(Ut,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),F("div",{className:"grid grid-cols-2 gap-3",children:F(Ut,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:o})}),F(Ia,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>i(c())})]})]})}function E_(e,t){return $(A_,{defaultValues:e,validateFirstName:n=>Ot(lc(n)),validateLastName:n=>Ot(uc(n)),validateEmail:n=>Ot(fc(n)),validateMobilePhone:n=>Ot(hc(n)),onSubmit:n=>{t(new rn(3,[n])),t(new rn(0,[]))},onBack:n=>{t(new rn(3,[n])),t(new rn(1,[]))}})}function I_(){return F("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:F("div",{className:"flex",children:[F("div",{className:"shrink-0",children:F(mw,{"aria-hidden":"true",className:"size-5 text-red-400"})}),F("div",{className:"ml-3",children:[F("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),F("div",{className:"mt-2 text-sm text-red-700",children:F("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function T_({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:o,validatePostcode:s,accountCreationInProgress:i,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:h,getValues:f}=Ea({mode:"onChange",defaultValues:e});return F(Be,{children:[a&&F(I_,{}),F("div",{className:"font-bold text-lg mb-4",children:"Business address"}),F("form",{className:"space-y-6",onSubmit:d(l),children:[F(Ut,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),F(Ut,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),F("div",{className:"grid grid-cols-2 gap-3",children:[F(Ut,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),F("div",{children:[F("label",{className:"block text-sm font-medium",children:"State"}),F("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 text-sm",...h("State",{validate:o}),children:[F("option",{children:"NSW"}),F("option",{children:"VIC"}),F("option",{children:"QLD"}),F("option",{children:"SA"}),F("option",{children:"WA"}),F("option",{children:"NT"}),F("option",{children:"TAS"}),F("option",{children:"ACT"})]})]})]}),F("div",{className:"grid grid-cols-2 gap-3",children:F(Ut,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:s,isNumber:!0})}),F(Ia,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(f()),isBusy:i})]})]})}function N_(e,t,n,r){return $(T_,{defaultValues:e,validateAddress1:o=>Ot(em(o)),validateAddress2:o=>Qo(o)?!0:tm(o)!=null,validateCity:o=>Ot(nm(o)),validateState:o=>Ot(om(o)),validatePostcode:o=>Ot(rm(o)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:o=>{r(new rn(4,[o])),r(new rn(5,[]))},onBack:o=>{r(new rn(4,[o])),r(new rn(1,[]))}})}function Po(e,t,n){let r=n.initialDeps??[],o;return()=>{var s,i,a,l;let c;n.key&&((s=n.debug)!=null&&s.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((f,p)=>r[p]!==f)))return o;r=d;let h;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(h=Date.now()),o=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const f=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-h)*100)/100,_=p/16,g=(v,b)=>{for(v=String(v);v.length<b;)v=" "+v;return v};console.info(`%c⏱ ${g(p,5)} /${g(f,5)} ms`,`
|
|
45
|
+
`))(a)}}else if(ol(r))if(ti(r)){const i=An(a=>vn(e,t,n,a),ll(r));return a=>vs($i((l,c)=>fe(l,i)(c),a))}else{const i=Me(sl(r));if(i==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new fh(()=>X1(vn(e,t,n,fe(0,xt(r)))));return l=>l==null?Zd:a.Value(l)}else if(i==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||i==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||i==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=vn(e,t,n,fe(0,xt(r)));return l=>vs(De(a,l))}else if(i==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=fe(0,xt(r)),l=vn(e,t,n,fe(1,xt(r)));if(Me(a)==="System.String"||Me(a)==="System.Guid")return c=>io((d,u)=>{const h=u;return d[h[0]]=l(h[1]),d},{},c);{let c;return c=vn(e,t,n,a),u=>vs(De(h=>{const f=h;return[c(f[0]),l(f[1])]},u))}}else return Jd(e,t,n,r)}else switch(o){case"System.Boolean":return i=>i;case"Microsoft.FSharp.Core.Unit":return Z1;case"System.String":return i=>i;case"System.Char":return i=>i;case"System.SByte":return i=>i;case"System.Byte":return i=>i;case"System.Int16":return i=>i;case"System.UInt16":return i=>i;case"System.Int32":return i=>i;case"System.UInt32":return i=>i;case"System.Double":return i=>i;case"System.Single":return i=>i;case"System.DateTime":return J1;case"System.DateTimeOffset":return q1;case"System.TimeSpan":return K1;case"System.Guid":return G1;case"System.Object":return i=>i;default:return Jd(e,t,n,r)}else{const i=s;return a=>i.contents(a)}}function Q1(e){return ea({Compare:Yr})}function eb(e,t,n,r){const o=Ye(t,new tn(0,[])),s=Ye(r,!0);return vn(Q1(),o,s,e)}class tb{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return x0(W.Delay(()=>W.Bind(Yd(n,zr(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const o=tr(be(nr(S$(),new tn(1,[]))),r.responseText);return W.Return(o.tag===1?new Array(0):o.fields[0].tag===0?o.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,o){const s=this;return W.Delay(()=>{let i,a;const l=Yd(s,Qw(new Pd(1,[(i=new mc(n.AccountName,n.WebsiteUrl,new uc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new pc(n.LegalEntityName,n.Abn,o.Line1,Jo(o.Line2)?void 0:o.Line2,o.City,o.Postcode,o.State,r.MobilePhone,"AU"),void 0,void 0,new dc(n.SalesforceParentRecordId,void 0),new fc(n.Industry.ClassCode,n.Industry.ClassTitle)),Y1(0,eb(A$(),new tn(1,[]),void 0,void 0)(i)))]),_o(new Br(1,[]),zr(`${s.adminUrl}/partners/${ts(t)}/accounts`))));return a=W.Bind(l,c=>W.Return(new w(0,[c]))),W.Bind(a,c=>{const d=c;if(d.tag===1)return W.Return(new w(1,[d.fields[0]]));{let u;const h=tr(be(nr(I$(),new tn(1,[]))),d.fields[0].responseText);return u=h.tag===1?new w(1,[void 0]):new w(0,[h.fields[0].Id]),W.Return(u)}})})}}function nb(e,t){return new tb(e,t)}function Yd(e,t){return da(ua(Fd(`Bearer ${e.accessToken}`),t))}class sr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let Zt=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},Pn=class extends ie{constructor(t,n,r,o,s){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=o,this.AccountCreation=s}};function rb(e){const t=e.AccountCreation;let n;switch(t.tag){case 2:{t.fields[0].tag===1?n=1:n=0;break}case 3:{n=1;break}default:n=0}switch(n){case 0:return!1;default:return!0}}function ob(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const sb=[new Pn({},{},{},new sr(0,[]),new pe(0,[])),Le()];function ib(e,t,n,r){let o,s;switch(n.tag){case 1:return[new Pn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(o=r.CurrentView,o.tag===1?new sr(0,[]):o.tag===2?new sr(1,[]):new sr(0,[])),r.AccountCreation),Le()];case 2:return[new Pn(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Le()];case 3:return[new Pn(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Le()];case 4:return[new Pn(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),Le()];case 5:{const i=r.AccountCreation;let a;switch(i.tag){case 0:case 3:{a=1;break}case 2:{i.fields[0].tag===1?a=1:a=0;break}default:a=0}switch(a){case 0:return[r,Le()];default:return[new Pn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new pe(1,[])),Pu(l=>{Du(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new Zt(6,[l]))]}}case 6:{const i=n.fields[0];return[new Pn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new pe(2,[i])),i.tag===1?Le():ra(new J(15,[e,jt(i.fields[0])]))]}default:return[new Pn(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new sr(2,[]):s.tag===2?new sr(2,[]):new sr(1,[])),r.AccountCreation),Le()]}}var ab=0;function M(e,t,n,r,o,s){t||(t={});var i,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?i=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ab,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)l[a]===void 0&&(l[a]=i[a]);return te.vnode&&te.vnode(c),c}var vo=e=>e.type==="checkbox",ir=e=>e instanceof Date,bt=e=>e==null;const Xd=e=>typeof e=="object";var Ue=e=>!bt(e)&&!Array.isArray(e)&&Xd(e)&&!ir(e),Qd=e=>Ue(e)&&e.target?vo(e.target)?e.target.checked:e.target.value:e,lb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ef=(e,t)=>e.has(lb(t)),cb=e=>{const t=e.constructor&&e.constructor.prototype;return Ue(t)&&t.hasOwnProperty("isPrototypeOf")},pa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _t(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(pa&&(e instanceof Blob||r))&&(n||Ue(e)))if(t=n?[]:{},!n&&!cb(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=_t(e[o]));else return e;return t}var xs=e=>Array.isArray(e)?e.filter(Boolean):[],ze=e=>e===void 0,F=(e,t,n)=>{if(!t||!Ue(e))return n;const r=xs(t.split(/[,[\].]+?/)).reduce((o,s)=>bt(o)?o:o[s],e);return ze(r)||r===e?ze(e[t])?n:e[t]:r},Vt=e=>typeof e=="boolean",ma=e=>/^\w*$/.test(e),tf=e=>xs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{let r=-1;const o=ma(t)?[t]:tf(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const c=e[a];l=Ue(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Cs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ub=q.createContext(null),$a=()=>q.useContext(ub);var nf=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Jt.all&&(t._proxyFormState[i]=!r||Jt.all),n&&(n[i]=!0),e[i]}});return o},yt=e=>Ue(e)&&!Object.keys(e).length,rf=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return yt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||Jt.all))},xo=e=>Array.isArray(e)?e:[e],of=(e,t,n)=>!e||!t||e===t||xo(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function ga(e){const t=q.useRef(e);t.current=e,q.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function db(e){const t=$a(),{control:n=t.control,disabled:r,name:o,exact:s}=e||{},[i,a]=q.useState(n._formState),l=q.useRef(!0),c=q.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=q.useRef(o);return d.current=o,ga({disabled:r,next:u=>l.current&&of(d.current,u.name,s)&&rf(u,c.current,n._updateFormState)&&a({...n._formState,...u}),subject:n._subjects.state}),q.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),q.useMemo(()=>nf(i,n,c.current,!1),[i,n])}var nn=e=>typeof e=="string",sf=(e,t,n,r,o)=>nn(e)?(r&&t.watch.add(e),F(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),F(n,s))):(r&&(t.watchAll=!0),n);function fb(e){const t=$a(),{control:n=t.control,name:r,defaultValue:o,disabled:s,exact:i}=e||{},a=q.useRef(r);a.current=r,ga({disabled:s,subject:n._subjects.values,next:d=>{of(a.current,d.name,i)&&c(_t(sf(a.current,n._names,d.values||n._formValues,!1,o)))}});const[l,c]=q.useState(n._getWatch(r,o));return q.useEffect(()=>n._removeUnmounted()),l}function af(e){const t=$a(),{name:n,disabled:r,control:o=t.control,shouldUnregister:s}=e,i=ef(o._names.array,n),a=fb({control:o,name:n,defaultValue:F(o._formValues,n,F(o._defaultValues,n,e.defaultValue)),exact:!0}),l=db({control:o,name:n,exact:!0}),c=q.useRef(o.register(n,{...e.rules,value:a,...Vt(e.disabled)?{disabled:e.disabled}:{}})),d=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!F(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!F(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!F(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!F(l.validatingFields,n)},error:{enumerable:!0,get:()=>F(l.errors,n)}}),[l,n]),u=q.useMemo(()=>({name:n,value:a,...Vt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:h=>c.current.onChange({target:{value:Qd(h),name:n},type:Cs.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:F(o._formValues,n),name:n},type:Cs.BLUR}),ref:h=>{const f=F(o._fields,n);f&&h&&(f._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:p=>h.setCustomValidity(p),reportValidity:()=>h.reportValidity()})}}),[n,o._formValues,r,l.disabled,a,o._fields]);return q.useEffect(()=>{const h=o._options.shouldUnregister||s,f=(p,b)=>{const $=F(o._fields,p);$&&$._f&&($._f.mount=b)};if(f(n,!0),h){const p=_t(F(o._options.defaultValues,n));Ce(o._defaultValues,n,p),ze(F(o._formValues,n))&&Ce(o._formValues,n,p)}return!i&&o.register(n),()=>{(i?h&&!o._state.action:h)?o.unregister(n):f(n,!1)}},[n,o,i,s]),q.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),q.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var hb=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},lf=e=>({isOnSubmit:!e||e===Jt.onSubmit,isOnBlur:e===Jt.onBlur,isOnChange:e===Jt.onChange,isOnAll:e===Jt.all,isOnTouch:e===Jt.onTouched}),cf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Co=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=F(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(Co(a,t))break}else if(Ue(a)&&Co(a,t))break}}};var pb=(e,t,n)=>{const r=xo(F(e,n));return Ce(r,"root",t[n]),Ce(e,n,r),e},wa=e=>e.type==="file",rn=e=>typeof e=="function",Ss=e=>{if(!pa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ks=e=>nn(e),ba=e=>e.type==="radio",As=e=>e instanceof RegExp;const uf={value:!1,isValid:!1},df={value:!0,isValid:!0};var ff=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ze(e[0].attributes.value)?ze(e[0].value)||e[0].value===""?df:{value:e[0].value,isValid:!0}:df:uf}return uf};const hf={isValid:!1,value:null};var pf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,hf):hf;function mf(e,t,n="validate"){if(ks(e)||Array.isArray(e)&&e.every(ks)||Vt(e)&&!e)return{type:n,message:ks(e)?e:"",ref:t}}var Hr=e=>Ue(e)&&!As(e)?e:{value:e,message:""},$f=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:u,max:h,pattern:f,validate:p,name:b,valueAsNumber:$,mount:v}=e._f,y=F(n,b);if(!v||t.has(b))return{};const C=a?a[0]:i,R=G=>{o&&C.reportValidity&&(C.setCustomValidity(Vt(G)?"":G||""),C.reportValidity())},L={},X=ba(i),$e=vo(i),_e=X||$e,ue=($||wa(i))&&ze(i.value)&&ze(y)||Ss(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,Y=hb.bind(null,b,r,L),de=(G,ne,Se,N=xn.maxLength,ye=xn.minLength)=>{const le=G?ne:Se;L[b]={type:G?N:ye,message:le,ref:i,...Y(G?N:ye,le)}};if(s?!Array.isArray(y)||!y.length:l&&(!_e&&(ue||bt(y))||Vt(y)&&!y||$e&&!ff(a).isValid||X&&!pf(a).isValid)){const{value:G,message:ne}=ks(l)?{value:!!l,message:l}:Hr(l);if(G&&(L[b]={type:xn.required,message:ne,ref:C,...Y(xn.required,ne)},!r))return R(ne),L}if(!ue&&(!bt(u)||!bt(h))){let G,ne;const Se=Hr(h),N=Hr(u);if(!bt(y)&&!isNaN(y)){const ye=i.valueAsNumber||y&&+y;bt(Se.value)||(G=ye>Se.value),bt(N.value)||(ne=ye<N.value)}else{const ye=i.valueAsDate||new Date(y),le=Ve=>new Date(new Date().toDateString()+" "+Ve),Je=i.type=="time",ke=i.type=="week";nn(Se.value)&&y&&(G=Je?le(y)>le(Se.value):ke?y>Se.value:ye>new Date(Se.value)),nn(N.value)&&y&&(ne=Je?le(y)<le(N.value):ke?y<N.value:ye<new Date(N.value))}if((G||ne)&&(de(!!G,Se.message,N.message,xn.max,xn.min),!r))return R(L[b].message),L}if((c||d)&&!ue&&(nn(y)||s&&Array.isArray(y))){const G=Hr(c),ne=Hr(d),Se=!bt(G.value)&&y.length>+G.value,N=!bt(ne.value)&&y.length<+ne.value;if((Se||N)&&(de(Se,G.message,ne.message),!r))return R(L[b].message),L}if(f&&!ue&&nn(y)){const{value:G,message:ne}=Hr(f);if(As(G)&&!y.match(G)&&(L[b]={type:xn.pattern,message:ne,ref:i,...Y(xn.pattern,ne)},!r))return R(ne),L}if(p){if(rn(p)){const G=await p(y,n),ne=mf(G,C);if(ne&&(L[b]={...ne,...Y(xn.validate,ne.message)},!r))return R(ne.message),L}else if(Ue(p)){let G={};for(const ne in p){if(!yt(G)&&!r)break;const Se=mf(await p[ne](y,n),C,ne);Se&&(G={...Se,...Y(ne,Se.message)},R(Se.message),r&&(L[b]=G))}if(!yt(G)&&(L[b]={ref:C,...G},!r))return L}}return R(!0),L};function mb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ze(e)?r++:e[t[r++]];return e}function $b(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function qe(e,t){const n=Array.isArray(t)?t:ma(t)?[t]:tf(t),r=n.length===1?e:mb(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Ue(r)&&yt(r)||Array.isArray(r)&&$b(r))&&qe(e,n.slice(0,-1)),e}var _a=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},ya=e=>bt(e)||!Xd(e);function Dn(e,t){if(ya(e)||ya(t))return e===t;if(ir(e)&&ir(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const s=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(ir(s)&&ir(i)||Ue(s)&&Ue(i)||Array.isArray(s)&&Array.isArray(i)?!Dn(s,i):s!==i)return!1}}return!0}var gf=e=>e.type==="select-multiple",gb=e=>ba(e)||vo(e),va=e=>Ss(e)&&e.isConnected,wf=e=>{for(const t in e)if(rn(e[t]))return!0;return!1};function Es(e,t={}){const n=Array.isArray(e);if(Ue(e)||n)for(const r in e)Array.isArray(e[r])||Ue(e[r])&&!wf(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Es(e[r],t[r])):bt(e[r])||(t[r]=!0);return t}function bf(e,t,n){const r=Array.isArray(e);if(Ue(e)||r)for(const o in e)Array.isArray(e[o])||Ue(e[o])&&!wf(e[o])?ze(t)||ya(n[o])?n[o]=Array.isArray(e[o])?Es(e[o],[]):{...Es(e[o])}:bf(e[o],bt(t)?{}:t[o],n[o]):n[o]=!Dn(e[o],t[o]);return n}var So=(e,t)=>bf(e,t,Es(t)),_f=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ze(e)?e:t?e===""?NaN:e&&+e:n&&nn(e)?new Date(e):r?r(e):e;function xa(e){const t=e.ref;return wa(t)?t.files:ba(t)?pf(e.refs).value:gf(t)?[...t.selectedOptions].map(({value:n})=>n):vo(t)?ff(e.refs).value:_f(ze(t.value)?e.ref.value:t.value,e)}var wb=(e,t,n,r)=>{const o={};for(const s of e){const i=F(t,s);i&&Ce(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ko=e=>ze(e)?e:As(e)?e.source:Ue(e)?As(e.value)?e.value.source:e.value:e;const yf="AsyncFunction";var bb=e=>!!e&&!!e.validate&&!!(rn(e.validate)&&e.validate.constructor.name===yf||Ue(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===yf)),_b=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function vf(e,t,n){const r=F(e,n);if(r||ma(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=F(t,s),a=F(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};o.pop()}return{name:n}}var yb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,vb=(e,t)=>!xs(F(e,t)).length&&qe(e,t);const xb={mode:Jt.onSubmit,reValidateMode:Jt.onChange,shouldFocusError:!0};function Cb(e={}){let t={...xb,...e},n={submitCount:0,isDirty:!1,isLoading:rn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Ue(t.defaultValues)||Ue(t.values)?_t(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:_t(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:_a(),array:_a(),state:_a()},h=lf(t.mode),f=lf(t.reValidateMode),p=t.criteriaMode===Jt.all,b=g=>x=>{clearTimeout(c),c=setTimeout(g,x)},$=async g=>{if(!t.disabled&&(d.isValid||g)){const x=t.resolver?yt((await _e()).errors):await Y(r,!0);x!==n.isValid&&u.state.next({isValid:x})}},v=(g,x)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((g||Array.from(a.mount)).forEach(S=>{S&&(x?Ce(n.validatingFields,S,x):qe(n.validatingFields,S))}),u.state.next({validatingFields:n.validatingFields,isValidating:!yt(n.validatingFields)}))},y=(g,x=[],S,U,V=!0,O=!0)=>{if(U&&S&&!t.disabled){if(i.action=!0,O&&Array.isArray(F(r,g))){const Z=S(F(r,g),U.argA,U.argB);V&&Ce(r,g,Z)}if(O&&Array.isArray(F(n.errors,g))){const Z=S(F(n.errors,g),U.argA,U.argB);V&&Ce(n.errors,g,Z),vb(n.errors,g)}if(d.touchedFields&&O&&Array.isArray(F(n.touchedFields,g))){const Z=S(F(n.touchedFields,g),U.argA,U.argB);V&&Ce(n.touchedFields,g,Z)}d.dirtyFields&&(n.dirtyFields=So(o,s)),u.state.next({name:g,isDirty:G(g,x),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ce(s,g,x)},C=(g,x)=>{Ce(n.errors,g,x),u.state.next({errors:n.errors})},R=g=>{n.errors=g,u.state.next({errors:n.errors,isValid:!1})},L=(g,x,S,U)=>{const V=F(r,g);if(V){const O=F(s,g,ze(S)?F(o,g):S);ze(O)||U&&U.defaultChecked||x?Ce(s,g,x?O:xa(V._f)):N(g,O),i.mount&&$()}},X=(g,x,S,U,V)=>{let O=!1,Z=!1;const se={name:g};if(!t.disabled){const et=!!(F(r,g)&&F(r,g)._f&&F(r,g)._f.disabled);if(!S||U){d.isDirty&&(Z=n.isDirty,n.isDirty=se.isDirty=G(),O=Z!==se.isDirty);const tt=et||Dn(F(o,g),x);Z=!!(!et&&F(n.dirtyFields,g)),tt||et?qe(n.dirtyFields,g):Ce(n.dirtyFields,g,!0),se.dirtyFields=n.dirtyFields,O=O||d.dirtyFields&&Z!==!tt}if(S){const tt=F(n.touchedFields,g);tt||(Ce(n.touchedFields,g,S),se.touchedFields=n.touchedFields,O=O||d.touchedFields&&tt!==S)}O&&V&&u.state.next(se)}return O?se:{}},$e=(g,x,S,U)=>{const V=F(n.errors,g),O=d.isValid&&Vt(x)&&n.isValid!==x;if(t.delayError&&S?(l=b(()=>C(g,S)),l(t.delayError)):(clearTimeout(c),l=null,S?Ce(n.errors,g,S):qe(n.errors,g)),(S?!Dn(V,S):V)||!yt(U)||O){const Z={...U,...O&&Vt(x)?{isValid:x}:{},errors:n.errors,name:g};n={...n,...Z},u.state.next(Z)}},_e=async g=>{v(g,!0);const x=await t.resolver(s,t.context,wb(g||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(g),x},ue=async g=>{const{errors:x}=await _e(g);if(g)for(const S of g){const U=F(x,S);U?Ce(n.errors,S,U):qe(n.errors,S)}else n.errors=x;return x},Y=async(g,x,S={valid:!0})=>{for(const U in g){const V=g[U];if(V){const{_f:O,...Z}=V;if(O){const se=a.array.has(O.name),et=V._f&&bb(V._f);et&&d.validatingFields&&v([U],!0);const tt=await $f(V,a.disabled,s,p,t.shouldUseNativeValidation&&!x,se);if(et&&d.validatingFields&&v([U]),tt[O.name]&&(S.valid=!1,x))break;!x&&(F(tt,O.name)?se?pb(n.errors,tt,O.name):Ce(n.errors,O.name,tt[O.name]):qe(n.errors,O.name))}!yt(Z)&&await Y(Z,x,S)}}return S.valid},de=()=>{for(const g of a.unMount){const x=F(r,g);x&&(x._f.refs?x._f.refs.every(S=>!va(S)):!va(x._f.ref))&&Po(g)}a.unMount=new Set},G=(g,x)=>!t.disabled&&(g&&x&&Ce(s,g,x),!Dn(vt(),o)),ne=(g,x,S)=>sf(g,a,{...i.mount?s:ze(x)?o:nn(g)?{[g]:x}:x},S,x),Se=g=>xs(F(i.mount?s:o,g,t.shouldUnregister?F(o,g,[]):[])),N=(g,x,S={})=>{const U=F(r,g);let V=x;if(U){const O=U._f;O&&(!O.disabled&&Ce(s,g,_f(x,O)),V=Ss(O.ref)&&bt(x)?"":x,gf(O.ref)?[...O.ref.options].forEach(Z=>Z.selected=V.includes(Z.value)):O.refs?vo(O.ref)?O.refs.length>1?O.refs.forEach(Z=>(!Z.defaultChecked||!Z.disabled)&&(Z.checked=Array.isArray(V)?!!V.find(se=>se===Z.value):V===Z.value)):O.refs[0]&&(O.refs[0].checked=!!V):O.refs.forEach(Z=>Z.checked=Z.value===V):wa(O.ref)?O.ref.value="":(O.ref.value=V,O.ref.type||u.values.next({name:g,values:{...s}})))}(S.shouldDirty||S.shouldTouch)&&X(g,V,S.shouldTouch,S.shouldDirty,!0),S.shouldValidate&&Ve(g)},ye=(g,x,S)=>{for(const U in x){const V=x[U],O=`${g}.${U}`,Z=F(r,O);(a.array.has(g)||Ue(V)||Z&&!Z._f)&&!ir(V)?ye(O,V,S):N(O,V,S)}},le=(g,x,S={})=>{const U=F(r,g),V=a.array.has(g),O=_t(x);Ce(s,g,O),V?(u.array.next({name:g,values:{...s}}),(d.isDirty||d.dirtyFields)&&S.shouldDirty&&u.state.next({name:g,dirtyFields:So(o,s),isDirty:G(g,O)})):U&&!U._f&&!bt(O)?ye(g,O,S):N(g,O,S),cf(g,a)&&u.state.next({...n}),u.values.next({name:i.mount?g:void 0,values:{...s}})},Je=async g=>{i.mount=!0;const x=g.target;let S=x.name,U=!0;const V=F(r,S),O=()=>x.type?xa(V._f):Qd(g),Z=se=>{U=Number.isNaN(se)||ir(se)&&isNaN(se.getTime())||Dn(se,F(s,S,se))};if(V){let se,et;const tt=O(),Un=g.type===Cs.BLUR||g.type===Cs.FOCUS_OUT,Sv=!_b(V._f)&&!t.resolver&&!F(n.errors,S)&&!V._f.deps||yb(Un,F(n.touchedFields,S),n.isSubmitted,f,h),Wa=cf(S,a,Un);Ce(s,S,tt),Un?(V._f.onBlur&&V._f.onBlur(g),l&&l(0)):V._f.onChange&&V._f.onChange(g);const Ga=X(S,tt,Un,!1),kv=!yt(Ga)||Wa;if(!Un&&u.values.next({name:S,type:g.type,values:{...s}}),Sv)return d.isValid&&(t.mode==="onBlur"&&Un?$():Un||$()),kv&&u.state.next({name:S,...Wa?{}:Ga});if(!Un&&Wa&&u.state.next({...n}),t.resolver){const{errors:ih}=await _e([S]);if(Z(tt),U){const Av=vf(n.errors,r,S),ah=vf(ih,r,Av.name||S);se=ah.error,S=ah.name,et=yt(ih)}}else v([S],!0),se=(await $f(V,a.disabled,s,p,t.shouldUseNativeValidation))[S],v([S]),Z(tt),U&&(se?et=!1:d.isValid&&(et=await Y(r,!0)));U&&(V._f.deps&&Ve(V._f.deps),$e(S,et,se,Ga))}},ke=(g,x)=>{if(F(n.errors,x)&&g.focus)return g.focus(),1},Ve=async(g,x={})=>{let S,U;const V=xo(g);if(t.resolver){const O=await ue(ze(g)?g:V);S=yt(O),U=g?!V.some(Z=>F(O,Z)):S}else g?(U=(await Promise.all(V.map(async O=>{const Z=F(r,O);return await Y(Z&&Z._f?{[O]:Z}:Z)}))).every(Boolean),!(!U&&!n.isValid)&&$()):U=S=await Y(r);return u.state.next({...!nn(g)||d.isValid&&S!==n.isValid?{}:{name:g},...t.resolver||!g?{isValid:S}:{},errors:n.errors}),x.shouldFocus&&!U&&Co(r,ke,g?V:a.mount),U},vt=g=>{const x={...i.mount?s:o};return ze(g)?x:nn(g)?F(x,g):g.map(S=>F(x,S))},Yt=(g,x)=>({invalid:!!F((x||n).errors,g),isDirty:!!F((x||n).dirtyFields,g),error:F((x||n).errors,g),isValidating:!!F(n.validatingFields,g),isTouched:!!F((x||n).touchedFields,g)}),pr=g=>{g&&xo(g).forEach(x=>qe(n.errors,x)),u.state.next({errors:g?n.errors:{}})},Dt=(g,x,S)=>{const U=(F(r,g,{_f:{}})._f||{}).ref,V=F(n.errors,g)||{},{ref:O,message:Z,type:se,...et}=V;Ce(n.errors,g,{...et,...x,ref:U}),u.state.next({name:g,errors:n.errors,isValid:!1}),S&&S.shouldFocus&&U&&U.focus&&U.focus()},Oo=(g,x)=>rn(g)?u.values.subscribe({next:S=>g(ne(void 0,x),S)}):ne(g,x,!0),Po=(g,x={})=>{for(const S of g?xo(g):a.mount)a.mount.delete(S),a.array.delete(S),x.keepValue||(qe(r,S),qe(s,S)),!x.keepError&&qe(n.errors,S),!x.keepDirty&&qe(n.dirtyFields,S),!x.keepTouched&&qe(n.touchedFields,S),!x.keepIsValidating&&qe(n.validatingFields,S),!t.shouldUnregister&&!x.keepDefaultValue&&qe(o,S);u.values.next({values:{...s}}),u.state.next({...n,...x.keepDirty?{isDirty:G()}:{}}),!x.keepIsValid&&$()},mr=({disabled:g,name:x,field:S,fields:U})=>{(Vt(g)&&i.mount||g||a.disabled.has(x))&&(g?a.disabled.add(x):a.disabled.delete(x),X(x,xa(S?S._f:F(U,x)._f),!1,!1,!0))},Do=(g,x={})=>{let S=F(r,g);const U=Vt(x.disabled)||Vt(t.disabled);return Ce(r,g,{...S||{},_f:{...S&&S._f?S._f:{ref:{name:g}},name:g,mount:!0,...x}}),a.mount.add(g),S?mr({field:S,disabled:Vt(x.disabled)?x.disabled:t.disabled,name:g}):L(g,!0,x.value),{...U?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:ko(x.min),max:ko(x.max),minLength:ko(x.minLength),maxLength:ko(x.maxLength),pattern:ko(x.pattern)}:{},name:g,onChange:Je,onBlur:Je,ref:V=>{if(V){Do(g,x),S=F(r,g);const O=ze(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Z=gb(O),se=S._f.refs||[];if(Z?se.find(et=>et===O):O===S._f.ref)return;Ce(r,g,{_f:{...S._f,...Z?{refs:[...se.filter(va),O,...Array.isArray(F(o,g))?[{}]:[]],ref:{type:O.type,name:g}}:{ref:O}}}),L(g,!1,void 0,O)}else S=F(r,g,{}),S._f&&(S._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(ef(a.array,g)&&i.action)&&a.unMount.add(g)}}},re=()=>t.shouldFocusError&&Co(r,ke,a.mount),Ae=g=>{Vt(g)&&(u.state.next({disabled:g}),Co(r,(x,S)=>{const U=F(r,S);U&&(x.disabled=U._f.disabled||g,Array.isArray(U._f.refs)&&U._f.refs.forEach(V=>{V.disabled=U._f.disabled||g}))},0,!1))},ut=(g,x)=>async S=>{let U;S&&(S.preventDefault&&S.preventDefault(),S.persist&&S.persist());let V=_t(s);if(a.disabled.size)for(const O of a.disabled)Ce(V,O,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:Z}=await _e();n.errors=O,V=Z}else await Y(r);if(qe(n.errors,"root"),yt(n.errors)){u.state.next({errors:{}});try{await g(V,S)}catch(O){U=O}}else x&&await x({...n.errors},S),re(),setTimeout(re);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:yt(n.errors)&&!U,submitCount:n.submitCount+1,errors:n.errors}),U)throw U},Kr=(g,x={})=>{F(r,g)&&(ze(x.defaultValue)?le(g,_t(F(o,g))):(le(g,x.defaultValue),Ce(o,g,_t(x.defaultValue))),x.keepTouched||qe(n.touchedFields,g),x.keepDirty||(qe(n.dirtyFields,g),n.isDirty=x.defaultValue?G(g,_t(F(o,g))):G()),x.keepError||(qe(n.errors,g),d.isValid&&$()),u.state.next({...n}))},Fo=(g,x={})=>{const S=g?_t(g):o,U=_t(S),V=yt(g),O=V?o:U;if(x.keepDefaultValues||(o=S),!x.keepValues){if(x.keepDirtyValues){const Z=new Set([...a.mount,...Object.keys(So(o,s))]);for(const se of Array.from(Z))F(n.dirtyFields,se)?Ce(O,se,F(s,se)):le(se,F(O,se))}else{if(pa&&ze(g))for(const Z of a.mount){const se=F(r,Z);if(se&&se._f){const et=Array.isArray(se._f.refs)?se._f.refs[0]:se._f.ref;if(Ss(et)){const tt=et.closest("form");if(tt){tt.reset();break}}}}r={}}s=t.shouldUnregister?x.keepDefaultValues?_t(o):{}:_t(O),u.array.next({values:{...O}}),u.values.next({values:{...O}})}a={mount:x.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!x.keepIsValid||!!x.keepDirtyValues,i.watch=!!t.shouldUnregister,u.state.next({submitCount:x.keepSubmitCount?n.submitCount:0,isDirty:V?!1:x.keepDirty?n.isDirty:!!(x.keepDefaultValues&&!Dn(g,o)),isSubmitted:x.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:V?{}:x.keepDirtyValues?x.keepDefaultValues&&s?So(o,s):n.dirtyFields:x.keepDefaultValues&&g?So(o,g):x.keepDirty?n.dirtyFields:{},touchedFields:x.keepTouched?n.touchedFields:{},errors:x.keepErrors?n.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},sh=(g,x)=>Fo(rn(g)?g(s):g,x);return{control:{register:Do,unregister:Po,getFieldState:Yt,handleSubmit:ut,setError:Dt,_executeSchema:_e,_getWatch:ne,_getDirty:G,_updateValid:$,_removeUnmounted:de,_updateFieldArray:y,_updateDisabledField:mr,_getFieldArray:Se,_reset:Fo,_resetDefaultValues:()=>rn(t.defaultValues)&&t.defaultValues().then(g=>{sh(g,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:g=>{n={...n,...g}},_disableForm:Ae,_subjects:u,_proxyFormState:d,_setErrors:R,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(g){i=g},get _defaultValues(){return o},get _names(){return a},set _names(g){a=g},get _formState(){return n},set _formState(g){n=g},get _options(){return t},set _options(g){t={...t,...g}}},trigger:Ve,register:Do,handleSubmit:ut,watch:Oo,setValue:le,getValues:vt,reset:sh,resetField:Kr,clearErrors:pr,unregister:Po,setError:Dt,setFocus:(g,x={})=>{const S=F(r,g),U=S&&S._f;if(U){const V=U.refs?U.refs[0]:U.ref;V.focus&&(V.focus(),x.shouldSelect&&rn(V.select)&&V.select())}},getFieldState:Yt}}function Ca(e={}){const t=q.useRef(void 0),n=q.useRef(void 0),[r,o]=q.useState({isDirty:!1,isValidating:!1,isLoading:rn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:rn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Cb(e),formState:r});const s=t.current.control;return s._options=e,ga({subject:s._subjects.state,next:i=>{rf(i,s._proxyFormState,s._updateFormState,!0)&&o({...s._formState})}}),q.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),q.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),q.useEffect(()=>{e.values&&!Dn(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[e.values,s]),q.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),q.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),q.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=nf(r,s),t.current}function Sb(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function Rt({label:e,name:t,control:n,validate:r,placeholder:o,optional:s,isNumber:i}){const{field:a,fieldState:l}=af({name:t,control:n,rules:{validate:r}});return M("div",{children:[M("div",{className:"flex justify-between",children:[M("label",{className:"block text-sm font-medium",children:e}),s&&M("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),M("div",{className:"mt-2",children:M("input",{...a,placeholder:o,className:"block w-full rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:c=>i?a.onChange(Sb(c.target.value)):a.onChange(c)})}),l.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function Sa({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return M("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[M("button",{type:"submit",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:r,children:r?M("div",{className:"animate-spin size-5",children:M(d1,{})}):e}),M("button",{type:"button",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:n,disabled:r,children:t})]})}function kb({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:o,onSubmit:s,onBack:i}){const{handleSubmit:a,control:l,getValues:c}=Ca({mode:"onChange",defaultValues:e});return M(Oe,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),M("form",{className:"space-y-6",onSubmit:a(s),children:[M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),M(Rt,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),M(Rt,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),M("div",{className:"grid grid-cols-2 gap-3",children:M(Rt,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:o})}),M(Sa,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>i(c())})]})]})}function Ab(e,t){return m(kb,{defaultValues:e,validateFirstName:n=>At(rc(n)),validateLastName:n=>At(sc(n)),validateEmail:n=>At(ac(n)),validateMobilePhone:n=>At(lc(n)),onSubmit:n=>{t(new Zt(3,[n])),t(new Zt(0,[]))},onBack:n=>{t(new Zt(3,[n])),t(new Zt(1,[]))}})}function Eb(){return M("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:M("div",{className:"flex",children:[M("div",{className:"shrink-0",children:M(m1,{"aria-hidden":"true",className:"size-5 text-red-400"})}),M("div",{className:"ml-3",children:[M("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),M("div",{className:"mt-2 text-sm text-red-700",children:M("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function Ib({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:o,validatePostcode:s,accountCreationInProgress:i,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:h,getValues:f}=Ca({mode:"onChange",defaultValues:e});return M(Oe,{children:[a&&M(Eb,{}),M("div",{className:"font-bold text-lg mb-4",children:"Business address"}),M("form",{className:"space-y-6",onSubmit:d(l),children:[M(Rt,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),M(Rt,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),M("div",{children:[M("label",{className:"block text-sm font-medium",children:"State"}),M("select",{className:"mt-2 w-full appearance-none rounded-md bg-white px-2 py-[9px] text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",...h("State",{validate:o}),children:[M("option",{children:"NSW"}),M("option",{children:"VIC"}),M("option",{children:"QLD"}),M("option",{children:"SA"}),M("option",{children:"WA"}),M("option",{children:"NT"}),M("option",{children:"TAS"}),M("option",{children:"ACT"})]})]})]}),M("div",{className:"grid grid-cols-2 gap-3",children:M(Rt,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:s,isNumber:!0})}),M(Sa,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(f()),isBusy:i})]})]})}function Tb(e,t,n,r){return m(Ib,{defaultValues:e,validateAddress1:o=>At(Qm(o)),validateAddress2:o=>Jo(o)?!0:e$(o)!=null,validateCity:o=>At(t$(o)),validateState:o=>At(r$(o)),validatePostcode:o=>At(n$(o)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:o=>{r(new Zt(4,[o])),r(new Zt(5,[]))},onBack:o=>{r(new Zt(4,[o])),r(new Zt(1,[]))}})}function Ao(e,t,n){let r=n.initialDeps??[],o;return()=>{var s,i,a,l;let c;n.key&&((s=n.debug)!=null&&s.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((f,p)=>r[p]!==f)))return o;r=d;let h;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(h=Date.now()),o=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const f=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-h)*100)/100,b=p/16,$=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${$(p,5)} /${$(f,5)} ms`,`
|
|
46
46
|
font-size: .6rem;
|
|
47
47
|
font-weight: bold;
|
|
48
|
-
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,o),o}}function Ta(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const M_=(e,t)=>Math.abs(e-t)<1,R_=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},P_=e=>e,O_=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},D_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},kf={passive:!0},F_=typeof window>"u"?!0:"onscrollend"in window,V_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const s=F_?()=>{}:R_(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=n[e.options.horizontal?"scrollLeft":"scrollTop"],s(),t(o,c)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,kf),n.addEventListener("scrollend",l,kf),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},L_=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},B_=(e,{adjustments:t=0,behavior:n},r)=>{var o,s;const i=e+t;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class U_{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:P_,rangeExtractor:O_,onChange:()=>{},measureElement:L_,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var o,s;const{startIndex:i,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||i!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((s=(o=this.options).onChange)==null||s.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=s,this.notify(i!==s,s)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=Po(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,s,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i}),{key:!1}),this.getMeasurements=Po(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i},a)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let h=(l=this.measurementsCache[u])==null?void 0:l.measureElement;h||(h=D=>{const L=s(u),ne=this.elementsCache.get(L);if(!D){ne&&(this.observer.unobserve(ne),this.elementsCache.delete(L));return}ne!==D&&(ne&&this.observer.unobserve(ne),this.observer.observe(D),this.elementsCache.set(L,D)),D.isConnected&&this.resizeItem(u,this.options.measureElement(D,void 0,this))});const f=s(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),_=p?p.end+this.options.gap:r+o,g=a.get(f),v=typeof g=="number"?g:this.options.estimateSize(u),b=_+v,S=p?p.lane:u%this.options.lanes;d[u]={index:u,start:_,size:v,end:b,key:f,lane:S,measureElement:h}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Po(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,o)=>this.range=n.length>0&&r>0?z_({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Po(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.indexFromElement(n),s=this.getMeasurements()[o];if(!s||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(s.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(s.key,n)),this.resizeItem(o,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const o=this.getMeasurements()[n];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,i=r-s;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Po(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Ta(r[Af(0,r.length-1,o=>Ta(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getMeasurements()[n];if(!o)return;const s=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const a=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[i,a]=s;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=Ta(this.getOffsetForIndex(n,a));M_(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:o})}else this.scrollToIndex(n,{align:a,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const Af=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<r)e=o+1;else if(s>r)t=o-1;else return o}return e>0?e-1:0};function z_({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,s=Af(0,r,a=>e[a].start,n);let i=s;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:s,endIndex:i}}const j_=typeof document<"u"?An:Oe;function H_(e){const t=Dr(()=>({}),{})[1],n={...e,onChange:(o,s)=>{var i;s?Gi(t):t(),(i=e.onChange)==null||i.call(e,o,s)}},[r]=Qe(()=>new U_(n));return r.setOptions(n),Oe(()=>r._didMount(),[]),j_(()=>r._willUpdate()),r}function W_(e){return H_({observeElementRect:D_,observeElementOffset:V_,scrollToFn:B_,...e})}var G_=Object.defineProperty,q_=(e,t,n)=>t in e?G_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Na=(e,t,n)=>(q_(e,typeof t!="symbol"?t+"":t,n),n);let K_=class{constructor(){Na(this,"current",this.detect()),Na(this,"handoffState","pending"),Na(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},gr=new K_,nt=(e,t)=>{gr.isServer?Oe(e,t):An(e,t)};function $n(e){let t=$e(e);return nt(()=>{t.current=e},[e]),t}function Ma(e,t){let[n,r]=Qe(e),o=$n(e);return nt(()=>r(o.current),[o,r,...t]),n}let ce=function(e){let t=$n(e);return Y.useCallback((...n)=>t.current(...n),[t])};function Z_(e,t,n){let[r,o]=Qe(n),s=e!==void 0,i=$e(s),a=$e(!1),l=$e(!1);return s&&!i.current&&!a.current?(a.current=!0,i.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&i.current&&!l.current&&(l.current=!0,i.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,ce(c=>(s||o(c),t==null?void 0:t(c)))]}function J_(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function wr(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return J_(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=wr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Oo(){let[e]=Qe(wr);return Oe(()=>()=>e.dispose(),[e]),e}function Y_(){let e=typeof document>"u";return"useSyncExternalStore"in Qi?(t=>t.useSyncExternalStore)(Qi)(()=>()=>{},()=>!1,()=>!e):!1}function Ra(){let e=Y_(),[t,n]=Qe(gr.isHandoffComplete);return t&&gr.isHandoffComplete===!1&&n(!1),Oe(()=>{t!==!0&&n(!0)},[t]),Oe(()=>gr.handoff(),[]),e?!1:t}var Ef;let Do=(Ef=Y.useId)!=null?Ef:function(){let e=Ra(),[t,n]=Y.useState(e?()=>gr.nextId():null);return nt(()=>{t===null&&n(gr.nextId())},[t]),t!=null?""+t:void 0};function pt(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,pt),r}function Pa(e){return gr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let If=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var X_=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(X_||{}),Q_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Q_||{}),ey=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ey||{}),Tf=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Tf||{});function ty(e,t=0){var n;return e===((n=Pa(e))==null?void 0:n.body)?!1:pt(t,{0(){return e.matches(If)},1(){let r=e;for(;r!==null;){if(r.matches(If))return!0;r=r.parentElement}return!1}})}var ny=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ny||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ry(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function oy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sy(){return/Android/gi.test(window.navigator.userAgent)}function Nf(){return oy()||sy()}function Ts(e,t,n){let r=$n(t);Oe(()=>{function o(s){r.current(s)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function iy(e,t,n){let r=$n(t);Oe(()=>{function o(s){r.current(s)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function ay(e,t,n=!0){let r=$e(!1);Oe(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(i,a){if(!r.current||i.defaultPrevented)return;let l=a(i);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||i.composed&&i.composedPath().includes(u))return}return!ty(l,Tf.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let s=$e(null);Ts("pointerdown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Ts("mousedown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Ts("click",i=>{Nf()||s.current&&(o(i,()=>s.current),s.current=null)},!0),Ts("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),iy("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ly(...e){return ht(()=>Pa(...e),[...e])}function Mf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function cy(e,t){let[n,r]=Qe(()=>Mf(e));return nt(()=>{r(Mf(e))},[e.type,e.as]),nt(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let uy=Symbol();function _r(...e){let t=$e(e);Oe(()=>{t.current=e},[e]);let n=ce(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[uy]))?void 0:n}function Rf(e){return[e.screenX,e.screenY]}function dy(){let e=$e([-1,-1]);return{wasMoved(t){let n=Rf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Rf(t)}}}function fy({container:e,accept:t,walk:n,enabled:r=!0}){let o=$e(t),s=$e(n);Oe(()=>{o.current=t,s.current=n},[t,n]),nt(()=>{if(!e||!r)return;let i=Pa(e);if(!i)return;let a=o.current,l=s.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,o,s])}function Pf(e,t){let n=$e([]),r=ce(e);Oe(()=>{let o=[...n.current];for(let[s,i]of t.entries())if(n.current[s]!==i){let a=r(t,o);return n.current=t,a}},[r,...t])}function Ns(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ms=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ms||{}),Zn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zn||{});function Mn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:i,mergeRefs:a}){a=a??hy;let l=Of(t,e);if(s)return Rs(l,n,r,i,a);let c=o??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Rs(u,n,r,i,a)}if(c&1){let{unmount:d=!0,...u}=l;return pt(d?0:1,{0(){return null},1(){return Rs({...u,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return Rs(l,n,r,i,a)}function Rs(e,t={},n,r,o){let{as:s=n,children:i,refName:a="ref",...l}=Da(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let h=!1,f=[];for(let[p,_]of Object.entries(t))typeof _=="boolean"&&(h=!0),_===!0&&f.push(p);h&&(u["data-headlessui-state"]=f.join(" "))}if(s===Be&&Object.keys(Oa(l)).length>0){if(!Vr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(_=>` - ${_}`).join(`
|
|
49
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(
|
|
48
|
+
color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,o),o}}function ka(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Nb=(e,t)=>Math.abs(e-t)<1,Mb=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},Rb=e=>e,Ob=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},Pb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},xf={passive:!0},Db=typeof window>"u"?!0:"onscrollend"in window,Fb=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const s=Db?()=>{}:Mb(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=n[e.options.horizontal?"scrollLeft":"scrollTop"],s(),t(o,c)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,xf),n.addEventListener("scrollend",l,xf),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Vb=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Lb=(e,{adjustments:t=0,behavior:n},r)=>{var o,s;const i=e+t;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class Bb{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Rb,rangeExtractor:Ob,onChange:()=>{},measureElement:Vb,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...n}},this.notify=(n,r)=>{var o,s;const{startIndex:i,endIndex:a}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||i!==(l==null?void 0:l.startIndex)||a!==(l==null?void 0:l.endIndex))&&((s=(o=this.options).onChange)==null||s.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=s,this.notify(i!==s,s)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=Ao(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,s,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i}),{key:!1}),this.getMeasurements=Ao(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i},a)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let u=c;u<n;u++){let h=(l=this.measurementsCache[u])==null?void 0:l.measureElement;h||(h=R=>{const L=s(u),X=this.elementsCache.get(L);if(!R){X&&(this.observer.unobserve(X),this.elementsCache.delete(L));return}X!==R&&(X&&this.observer.unobserve(X),this.observer.observe(R),this.elementsCache.set(L,R)),R.isConnected&&this.resizeItem(u,this.options.measureElement(R,void 0,this))});const f=s(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),b=p?p.end+this.options.gap:r+o,$=a.get(f),v=typeof $=="number"?$:this.options.estimateSize(u),y=b+v,C=p?p.lane:u%this.options.lanes;d[u]={index:u,start:b,size:v,end:y,key:f,lane:C,measureElement:h}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ao(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,o)=>this.range=n.length>0&&r>0?Ub({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Ao(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.indexFromElement(n),s=this.getMeasurements()[o];if(!s||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(s.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(s.key,n)),this.resizeItem(o,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const o=this.getMeasurements()[n];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,i=r-s;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Ao(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return ka(r[Cf(0,r.length-1,o=>ka(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getMeasurements()[n];if(!o)return;const s=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const a=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[i,a]=s;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=ka(this.getOffsetForIndex(n,a));Nb(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:o})}else this.scrollToIndex(n,{align:a,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t)}}const Cf=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<r)e=o+1;else if(s>r)t=o-1;else return o}return e>0?e-1:0};function Ub({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,s=Cf(0,r,a=>e[a].start,n);let i=s;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:s,endIndex:i}}const zb=typeof document<"u"?bn:Te;function jb(e){const t=Ir(()=>({}),{})[1],n={...e,onChange:(o,s)=>{var i;s?zi(t):t(),(i=e.onChange)==null||i.call(e,o,s)}},[r]=We(()=>new Bb(n));return r.setOptions(n),Te(()=>r._didMount(),[]),zb(()=>r._willUpdate()),r}function Hb(e){return jb({observeElementRect:Pb,observeElementOffset:Fb,scrollToFn:Lb,...e})}var Wb=Object.defineProperty,Gb=(e,t,n)=>t in e?Wb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t,n)=>(Gb(e,typeof t!="symbol"?t+"":t,n),n);let qb=class{constructor(){Aa(this,"current",this.detect()),Aa(this,"handoffState","pending"),Aa(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ar=new qb,Ke=(e,t)=>{ar.isServer?Te(e,t):bn(e,t)};function on(e){let t=ce(e);return Ke(()=>{t.current=e},[e]),t}function Ea(e,t){let[n,r]=We(e),o=on(e);return Ke(()=>r(o.current),[o,r,...t]),n}let oe=function(e){let t=on(e);return q.useCallback((...n)=>t.current(...n),[t])};function Kb(e,t,n){let[r,o]=We(n),s=e!==void 0,i=ce(s),a=ce(!1),l=ce(!1);return s&&!i.current&&!a.current?(a.current=!0,i.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&i.current&&!l.current&&(l.current=!0,i.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,oe(c=>(s||o(c),t==null?void 0:t(c)))]}function Zb(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function lr(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Zb(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=lr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Eo(){let[e]=We(lr);return Te(()=>()=>e.dispose(),[e]),e}function Jb(){let e=typeof document>"u";return"useSyncExternalStore"in Zi?(t=>t.useSyncExternalStore)(Zi)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=Jb(),[t,n]=We(ar.isHandoffComplete);return t&&ar.isHandoffComplete===!1&&n(!1),Te(()=>{t!==!0&&n(!0)},[t]),Te(()=>ar.handoff(),[]),e?!1:t}var Sf;let Io=(Sf=q.useId)!=null?Sf:function(){let e=Ia(),[t,n]=q.useState(e?()=>ar.nextId():null);return Ke(()=>{t===null&&n(ar.nextId())},[t]),t!=null?""+t:void 0};function at(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,at),r}function Ta(e){return ar.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let kf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Yb=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Yb||{}),Xb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Xb||{}),Qb=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Qb||{}),Af=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Af||{});function e_(e,t=0){var n;return e===((n=Ta(e))==null?void 0:n.body)?!1:at(t,{0(){return e.matches(kf)},1(){let r=e;for(;r!==null;){if(r.matches(kf))return!0;r=r.parentElement}return!1}})}var t_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(t_||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function n_(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function r_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function o_(){return/Android/gi.test(window.navigator.userAgent)}function Ef(){return r_()||o_()}function Is(e,t,n){let r=on(t);Te(()=>{function o(s){r.current(s)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function s_(e,t,n){let r=on(t);Te(()=>{function o(s){r.current(s)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function i_(e,t,n=!0){let r=ce(!1);Te(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(i,a){if(!r.current||i.defaultPrevented)return;let l=a(i);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:d.current;if(u!=null&&u.contains(l)||i.composed&&i.composedPath().includes(u))return}return!e_(l,Af.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let s=ce(null);Is("pointerdown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Is("mousedown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Is("click",i=>{Ef()||s.current&&(o(i,()=>s.current),s.current=null)},!0),Is("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),s_("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function a_(...e){return it(()=>Ta(...e),[...e])}function If(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function l_(e,t){let[n,r]=We(()=>If(e));return Ke(()=>{r(If(e))},[e.type,e.as]),Ke(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let c_=Symbol();function cr(...e){let t=ce(e);Te(()=>{t.current=e},[e]);let n=oe(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[c_]))?void 0:n}function Tf(e){return[e.screenX,e.screenY]}function u_(){let e=ce([-1,-1]);return{wasMoved(t){let n=Tf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Tf(t)}}}function d_({container:e,accept:t,walk:n,enabled:r=!0}){let o=ce(t),s=ce(n);Te(()=>{o.current=t,s.current=n},[t,n]),Ke(()=>{if(!e||!r)return;let i=Ta(e);if(!i)return;let a=o.current,l=s.current,c=Object.assign(u=>a(u),{acceptNode:a}),d=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,r,o,s])}function Nf(e,t){let n=ce([]),r=oe(e);Te(()=>{let o=[...n.current];for(let[s,i]of t.entries())if(n.current[s]!==i){let a=r(t,o);return n.current=t,a}},[r,...t])}function Ts(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ns=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ns||{}),Fn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Fn||{});function Cn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:i,mergeRefs:a}){a=a??f_;let l=Mf(t,e);if(s)return Ms(l,n,r,i,a);let c=o??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ms(u,n,r,i,a)}if(c&1){let{unmount:d=!0,...u}=l;return at(d?0:1,{0(){return null},1(){return Ms({...u,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return Ms(l,n,r,i,a)}function Ms(e,t={},n,r,o){let{as:s=n,children:i,refName:a="ref",...l}=Ma(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let u={};if(t){let h=!1,f=[];for(let[p,b]of Object.entries(t))typeof b=="boolean"&&(h=!0),b===!0&&f.push(p);h&&(u["data-headlessui-state"]=f.join(" "))}if(s===Oe&&Object.keys(Na(l)).length>0){if(!Nr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(b=>` - ${b}`).join(`
|
|
49
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
|
|
50
50
|
`)].join(`
|
|
51
|
-
`));let h=d.props,f=typeof(h==null?void 0:h.className)=="function"?(..._)=>Ns(h==null?void 0:h.className(..._),l.className):Ns(h==null?void 0:h.className,l.className),p=f?{className:f}:{};return Wi(d,Object.assign({},Of(d.props,Oa(Da(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},p))}return $(s,Object.assign({},Da(l,["ref"]),s!==Be&&c,s!==Be&&u),d)}function hy(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Of(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...s){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...s)}}});return t}function mn(e){var t;return Object.assign(Wn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Oa(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Da(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let py="div";var Df=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Df||{});function $y(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Mn({ourProps:s,theirProps:o,slot:{},defaultTag:py,name:"Hidden"})}let my=mn($y),Fa=jn(null);Fa.displayName="OpenClosedContext";var zt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(zt||{});function Va(){return dn(Fa)}function Ff({value:e,children:t}){return Y.createElement(Fa.Provider,{value:e},t)}function gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let yr=[];gy(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&yr[0]!==t.target&&(yr.unshift(t.target),yr=yr.filter(n=>n!=null&&n.isConnected),yr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function wy(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&_y(n)?!1:r}function _y(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function yy(e){throw new Error("Unexpected object: "+e)}var rt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(rt||{});function Vf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:yy(e)}}function Lf(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Uf(n,Bf(t,r),o);return n}function Bf(e,t){return e?e+"["+t+"]":t}function Uf(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Uf(e,Bf(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Lf(n,t,e)}var jt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(jt||{}),by={},vy=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vy||{}),xy=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(xy||{}),Cy=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Cy||{}),Sy=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Sy||{});function La(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,a)=>i.dataRef.current.order-a.dataRef.current.order):ry(r,i=>i.dataRef.current.domRef.current),s=n?o.indexOf(n):null;return s===-1&&(s=null),{options:o,activeOptionIndex:s}}let ky={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,o,s,i;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===rt.Specific?t.idx:Vf(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var h,f;return(f=(h=e.activeOptionIndex)!=null?h:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?f:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(s=t.trigger)!=null?s:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=La(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===rt.Specific?t.idx:Vf(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,o;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,i=La(e,l=>(l.push(s),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(s));let a={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(o=>o.id!==t.id)};let r=La(e,o=>{let s=o.findIndex(i=>i.id===t.id);return s!==-1&&o.splice(s,1),o});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},Ba=jn(null);Ba.displayName="ComboboxActionsContext";function Fo(e){let t=dn(Ba);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Fo),n}return t}let zf=jn(null);function Ay(e){var t;let n=br("VirtualProvider"),[r,o]=ht(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),s=W_({scrollPaddingStart:r,scrollPaddingEnd:o,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[i,a]=Qe(0);return nt(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),Y.createElement(zf.Provider,{value:s},Y.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&by.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&s.scrollToIndex(n.activeOptionIndex)}}},s.getVirtualItems().map(l=>{var c;return Y.createElement(Be,{key:l.key},Y.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${i}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let Ua=jn(null);Ua.displayName="ComboboxDataContext";function br(e){let t=dn(Ua);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,br),n}return t}function Ey(e,t){return pt(t.type,ky,e,t)}let Iy=Be;function Ty(e,t){let{value:n,defaultValue:r,onChange:o,form:s,name:i,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:h=!1,virtual:f=null,...p}=e,_=!1,g=null,[v=u?[]:void 0,b]=Z_(n,o,r),[S,D]=Dr(Ey,{dataRef:Ti(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),L=$e(!1),ne=$e({static:!1,hold:!1}),me=$e(null),we=$e(null),ue=$e(null),Q=$e(null),de=ce(typeof a=="string"?(se,ve)=>{let Ye=a;return(se==null?void 0:se[Ye])===(ve==null?void 0:ve[Ye])}:a??((se,ve)=>se===ve)),q=ce(se=>S.options.findIndex(ve=>de(ve.dataRef.current.value,se))),oe=Hn(se=>pt(N.mode,{1:()=>v.some(ve=>de(ve,se)),0:()=>de(v,se)}),[v]),ye=ce(se=>S.activeOptionIndex===q(se)),N=ht(()=>({...S,immediate:_,optionsPropsRef:ne,labelRef:me,inputRef:we,buttonRef:ue,optionsRef:Q,value:v,defaultValue:r,disabled:l,mode:u?1:0,virtual:S.virtual,get activeOptionIndex(){if(L.current&&S.activeOptionIndex===null&&S.options.length>0){let se=S.options.findIndex(ve=>!ve.dataRef.current.disabled);if(se!==-1)return se}return S.activeOptionIndex},calculateIndex:q,compare:de,isSelected:oe,isActive:ye,nullable:d,__demoMode:c}),[v,r,l,u,d,c,S,g]);nt(()=>{},[g,void 0]),nt(()=>{S.dataRef.current=N},[N]),ay([N.buttonRef,N.inputRef,N.optionsRef],()=>Pn.closeCombobox(),N.comboboxState===0);let _e=ht(()=>{var se,ve,Ye;return{open:N.comboboxState===0,disabled:l,activeIndex:N.activeOptionIndex,activeOption:N.activeOptionIndex===null?null:N.virtual?N.virtual.options[(se=N.activeOptionIndex)!=null?se:0]:(Ye=(ve=N.options[N.activeOptionIndex])==null?void 0:ve.dataRef.current.value)!=null?Ye:null,value:v}},[N,l,v]),ae=ce(()=>{if(N.activeOptionIndex!==null){if(N.virtual)sn(N.virtual.options[N.activeOptionIndex]);else{let{dataRef:se}=N.options[N.activeOptionIndex];sn(se.current.value)}Pn.goToOption(rt.Specific,N.activeOptionIndex)}}),He=ce(()=>{D({type:0}),L.current=!0}),be=ce(()=>{D({type:1}),L.current=!1}),Re=ce((se,ve,Ye)=>(L.current=!1,se===rt.Specific?D({type:2,focus:rt.Specific,idx:ve,trigger:Ye}):D({type:2,focus:se,trigger:Ye}))),at=ce((se,ve)=>(D({type:3,payload:{id:se,dataRef:ve}}),()=>{N.isActive(ve.current.value)&&(L.current=!0),D({type:4,id:se})})),At=ce(se=>(D({type:5,id:se}),()=>D({type:5,id:null}))),sn=ce(se=>pt(N.mode,{0(){return b==null?void 0:b(se)},1(){let ve=N.value.slice(),Ye=ve.findIndex(gn=>de(gn,se));return Ye===-1?ve.push(se):ve.splice(Ye,1),b==null?void 0:b(ve)}})),$t=ce(se=>{D({type:6,trigger:se})}),Pn=ht(()=>({onChange:sn,registerOption:at,registerLabel:At,goToOption:Re,closeCombobox:be,openCombobox:He,setActivationTrigger:$t,selectActiveOption:ae}),[]),On=t===null?{}:{ref:t},an=$e(null),Dn=Oo();return Oe(()=>{an.current&&r!==void 0&&Dn.addEventListener(an.current,"reset",()=>{b==null||b(r)})},[an,b]),Y.createElement(Ba.Provider,{value:Pn},Y.createElement(Ua.Provider,{value:N},Y.createElement(Ff,{value:pt(N.comboboxState,{0:zt.Open,1:zt.Closed})},i!=null&&v!=null&&Lf({[i]:v}).map(([se,ve],Ye)=>Y.createElement(my,{features:Df.Hidden,ref:Ye===0?gn=>{var Fn;an.current=(Fn=gn==null?void 0:gn.closest("form"))!=null?Fn:null}:void 0,...Oa({key:se,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:s,disabled:l,name:se,value:ve})})),Mn({ourProps:On,theirProps:p,slot:_e,defaultTag:Iy,name:"Combobox"}))))}let Ny="input";function My(e,t){var n,r,o,s,i;let a=Do(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...h}=e,f=br("Combobox.Input"),p=Fo("Combobox.Input"),_=_r(f.inputRef,t),g=ly(f.inputRef),v=$e(!1),b=Oo(),S=ce(()=>{p.onChange(null),f.optionsRef.current&&(f.optionsRef.current.scrollTop=0),p.goToOption(rt.Nothing)}),D=function(){var N;return typeof d=="function"&&f.value!==void 0?(N=d(f.value))!=null?N:"":typeof f.value=="string"?f.value:""}();Pf(([N,_e],[ae,He])=>{if(v.current)return;let be=f.inputRef.current;be&&((He===0&&_e===1||N!==ae)&&(be.value=N),requestAnimationFrame(()=>{if(v.current||!be||(g==null?void 0:g.activeElement)!==be)return;let{selectionStart:Re,selectionEnd:at}=be;Math.abs((at??0)-(Re??0))===0&&Re===0&&be.setSelectionRange(be.value.length,be.value.length)}))},[D,f.comboboxState,g]),Pf(([N],[_e])=>{if(N===0&&_e===1){if(v.current)return;let ae=f.inputRef.current;if(!ae)return;let He=ae.value,{selectionStart:be,selectionEnd:Re,selectionDirection:at}=ae;ae.value="",ae.value=He,at!==null?ae.setSelectionRange(be,Re,at):ae.setSelectionRange(be,Re)}},[f.comboboxState]);let L=$e(!1),ne=ce(()=>{L.current=!0}),me=ce(()=>{b.nextFrame(()=>{L.current=!1})}),we=ce(N=>{switch(v.current=!0,N.key){case jt.Enter:if(v.current=!1,f.comboboxState!==0||L.current)return;if(N.preventDefault(),N.stopPropagation(),f.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),f.mode===0&&p.closeCombobox();break;case jt.ArrowDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),pt(f.comboboxState,{0:()=>p.goToOption(rt.Next),1:()=>p.openCombobox()});case jt.ArrowUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),pt(f.comboboxState,{0:()=>p.goToOption(rt.Previous),1:()=>{p.openCombobox(),b.nextFrame(()=>{f.value||p.goToOption(rt.Last)})}});case jt.Home:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(rt.First);case jt.PageUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(rt.First);case jt.End:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(rt.Last);case jt.PageDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(rt.Last);case jt.Escape:return v.current=!1,f.comboboxState!==0?void 0:(N.preventDefault(),f.optionsRef.current&&!f.optionsPropsRef.current.static&&N.stopPropagation(),f.nullable&&f.mode===0&&f.value===null&&S(),p.closeCombobox());case jt.Tab:if(v.current=!1,f.comboboxState!==0)return;f.mode===0&&f.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),ue=ce(N=>{c==null||c(N),f.nullable&&f.mode===0&&N.target.value===""&&S(),p.openCombobox()}),Q=ce(N=>{var _e,ae,He;let be=(_e=N.relatedTarget)!=null?_e:yr.find(Re=>Re!==N.currentTarget);if(v.current=!1,!((ae=f.optionsRef.current)!=null&&ae.contains(be))&&!((He=f.buttonRef.current)!=null&&He.contains(be))&&f.comboboxState===0)return N.preventDefault(),f.mode===0&&(f.nullable&&f.value===null?S():f.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),de=ce(N=>{var _e,ae,He;let be=(_e=N.relatedTarget)!=null?_e:yr.find(Re=>Re!==N.currentTarget);(ae=f.buttonRef.current)!=null&&ae.contains(be)||(He=f.optionsRef.current)!=null&&He.contains(be)||f.disabled||f.immediate&&f.comboboxState!==0&&(p.openCombobox(),b.nextFrame(()=>{p.setActivationTrigger(1)}))}),q=Ma(()=>{if(f.labelId)return[f.labelId].join(" ")},[f.labelId]),oe=ht(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]),ye={ref:_,id:l,role:"combobox",type:u,"aria-controls":(n=f.optionsRef.current)==null?void 0:n.id,"aria-expanded":f.comboboxState===0,"aria-activedescendant":f.activeOptionIndex===null?void 0:f.virtual?(r=f.options.find(N=>{var _e;return!((_e=f.virtual)!=null&&_e.disabled(N.dataRef.current.value))&&f.compare(N.dataRef.current.value,f.virtual.options[f.activeOptionIndex])}))==null?void 0:r.id:(o=f.options[f.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":q,"aria-autocomplete":"list",defaultValue:(i=(s=e.defaultValue)!=null?s:f.defaultValue!==void 0?d==null?void 0:d(f.defaultValue):null)!=null?i:f.defaultValue,disabled:f.disabled,onCompositionStart:ne,onCompositionEnd:me,onKeyDown:we,onChange:ue,onFocus:de,onBlur:Q};return Mn({ourProps:ye,theirProps:h,slot:oe,defaultTag:Ny,name:"Combobox.Input"})}let Ry="button";function Py(e,t){var n;let r=br("Combobox.Button"),o=Fo("Combobox.Button"),s=_r(r.buttonRef,t),i=Do(),{id:a=`headlessui-combobox-button-${i}`,...l}=e,c=Oo(),d=ce(_=>{switch(_.key){case jt.ArrowDown:return _.preventDefault(),_.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})});case jt.ArrowUp:return _.preventDefault(),_.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(rt.Last)})),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})});case jt.Escape:return r.comboboxState!==0?void 0:(_.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&_.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})}));default:return}}),u=ce(_=>{if(wy(_.currentTarget))return _.preventDefault();r.comboboxState===0?o.closeCombobox():(_.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var g;return(g=r.inputRef.current)==null?void 0:g.focus({preventScroll:!0})})}),h=Ma(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),f=ht(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:s,id:a,type:cy(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":h,disabled:r.disabled,onClick:u,onKeyDown:d};return Mn({ourProps:p,theirProps:l,slot:f,defaultTag:Ry,name:"Combobox.Button"})}let Oy="label";function Dy(e,t){let n=Do(),{id:r=`headlessui-combobox-label-${n}`,...o}=e,s=br("Combobox.Label"),i=Fo("Combobox.Label"),a=_r(s.labelRef,t);nt(()=>i.registerLabel(r),[r]);let l=ce(()=>{var d;return(d=s.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=ht(()=>({open:s.comboboxState===0,disabled:s.disabled}),[s]);return Mn({ourProps:{ref:a,id:r,onClick:l},theirProps:o,slot:c,defaultTag:Oy,name:"Combobox.Label"})}let Fy="ul",Vy=Ms.RenderStrategy|Ms.Static;function Ly(e,t){let n=Do(),{id:r=`headlessui-combobox-options-${n}`,hold:o=!1,...s}=e,i=br("Combobox.Options"),a=_r(i.optionsRef,t),l=Va(),c=l!==null?(l&zt.Open)===zt.Open:i.comboboxState===0;nt(()=>{var f;i.optionsPropsRef.current.static=(f=e.static)!=null?f:!1},[i.optionsPropsRef,e.static]),nt(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),fy({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(f){return f.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});let d=Ma(()=>{var f,p;return(p=i.labelId)!=null?p:(f=i.buttonRef.current)==null?void 0:f.id},[i.labelId,i.buttonRef.current]),u=ht(()=>({open:i.comboboxState===0,option:void 0}),[i]),h={"aria-labelledby":d,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:a};return i.virtual&&i.comboboxState===0&&Object.assign(s,{children:Y.createElement(Ay,null,s.children)}),Mn({ourProps:h,theirProps:s,slot:u,defaultTag:Fy,features:Vy,visible:c,name:"Combobox.Options"})}let By="li";function Uy(e,t){var n;let r=Do(),{id:o=`headlessui-combobox-option-${r}`,disabled:s=!1,value:i,order:a=null,...l}=e,c=br("Combobox.Option"),d=Fo("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===o,h=c.isSelected(i),f=$e(null),p=$n({disabled:s,value:i,domRef:f,order:a}),_=dn(zf),g=_r(t,f,_?_.measureElement:null),v=ce(()=>d.onChange(i));nt(()=>d.registerOption(o,p),[p,o]);let b=$e(!(c.virtual||c.__demoMode));nt(()=>{if(!c.virtual||!c.__demoMode)return;let Q=wr();return Q.requestAnimationFrame(()=>{b.current=!0}),Q.dispose},[c.virtual,c.__demoMode]),nt(()=>{if(!b.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let Q=wr();return Q.requestAnimationFrame(()=>{var de,q;(q=(de=f.current)==null?void 0:de.scrollIntoView)==null||q.call(de,{block:"nearest"})}),Q.dispose},[f,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let S=ce(Q=>{var de;if(s||(de=c.virtual)!=null&&de.disabled(i))return Q.preventDefault();v(),Nf()||requestAnimationFrame(()=>{var q;return(q=c.inputRef.current)==null?void 0:q.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),D=ce(()=>{var Q;if(s||(Q=c.virtual)!=null&&Q.disabled(i))return d.goToOption(rt.Nothing);let de=c.calculateIndex(i);d.goToOption(rt.Specific,de)}),L=dy(),ne=ce(Q=>L.update(Q)),me=ce(Q=>{var de;if(!L.wasMoved(Q)||s||(de=c.virtual)!=null&&de.disabled(i)||u)return;let q=c.calculateIndex(i);d.goToOption(rt.Specific,q,0)}),we=ce(Q=>{var de;L.wasMoved(Q)&&(s||(de=c.virtual)!=null&&de.disabled(i)||u&&(c.optionsPropsRef.current.hold||d.goToOption(rt.Nothing)))}),ue=ht(()=>({active:u,selected:h,disabled:s}),[u,h,s]);return Mn({ourProps:{id:o,ref:g,role:"option",tabIndex:s===!0?void 0:-1,"aria-disabled":s===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:S,onFocus:D,onPointerEnter:ne,onMouseEnter:ne,onPointerMove:me,onMouseMove:me,onPointerLeave:we,onMouseLeave:we},theirProps:l,slot:ue,defaultTag:By,name:"Combobox.Option"})}let zy=mn(Ty),jy=mn(Py),Hy=mn(My),Wy=mn(Dy),Gy=mn(Ly),qy=mn(Uy),Vo=Object.assign(zy,{Input:Hy,Button:jy,Label:Wy,Options:Gy,Option:qy});function za(){let e=$e(!1);return nt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ky(e=0){let[t,n]=Qe(e),r=za(),o=Hn(l=>{r.current&&n(c=>c|l)},[t,r]),s=Hn(l=>!!(t&l),[t]),i=Hn(l=>{r.current&&n(c=>c&~l)},[n,r]),a=Hn(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:o,hasFlag:s,removeFlag:i,toggleFlag:a}}function Zy(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ja(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ha(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Jy(e,t){let n=wr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=s+i;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function Yy(e,t,n,r){let o=n?"enter":"leave",s=wr(),i=r!==void 0?Zy(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=pt(o,{enter:()=>t.enter,leave:()=>t.leave}),l=pt(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=pt(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ha(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),ja(e,...t.base,...a,...c),s.nextFrame(()=>{Ha(e,...t.base,...a,...c),ja(e,...t.base,...a,...l),Jy(e,()=>(Ha(e,...t.base,...a),ja(e,...t.base,...t.entered),i()))}),s.dispose}function Xy({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:s}){let i=za(),a=Oo(),l=$n(n);nt(()=>{e&&(l.current="enter")},[e]),nt(()=>{let c=wr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&i.current)return c.dispose(),o.current(l.current),c.add(Yy(d,r.current,l.current==="enter",()=>{c.dispose(),s.current(l.current)})),c.dispose},[n])}function Jn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ps=jn(null);Ps.displayName="TransitionContext";var Qy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Qy||{});function eb(){let e=dn(Ps);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function tb(){let e=dn(Os);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Os=jn(null);Os.displayName="NestingContext";function Ds(e){return"children"in e?Ds(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function jf(e,t){let n=$n(e),r=$e([]),o=za(),s=Oo(),i=ce((f,p=Zn.Hidden)=>{let _=r.current.findIndex(({el:g})=>g===f);_!==-1&&(pt(p,{[Zn.Unmount](){r.current.splice(_,1)},[Zn.Hidden](){r.current[_].state="hidden"}}),s.microTask(()=>{var g;!Ds(r)&&o.current&&((g=n.current)==null||g.call(n))}))}),a=ce(f=>{let p=r.current.find(({el:_})=>_===f);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,Zn.Unmount)}),l=$e([]),c=$e(Promise.resolve()),d=$e({enter:[],leave:[],idle:[]}),u=ce((f,p,_)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([g])=>g!==f)),t==null||t.chains.current[p].push([f,new Promise(g=>{l.current.push(g)})]),t==null||t.chains.current[p].push([f,new Promise(g=>{Promise.all(d.current[p].map(([v,b])=>b)).then(()=>g())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>_(p)):_(p)}),h=ce((f,p,_)=>{Promise.all(d.current[p].splice(0).map(([g,v])=>v)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>_(p))});return ht(()=>({children:r,register:a,unregister:i,onStart:u,onStop:h,wait:c,chains:d}),[a,i,r,u,h,d,c])}function nb(){}let rb=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Hf(e){var t;let n={};for(let r of rb)n[r]=(t=e[r])!=null?t:nb;return n}function ob(e){let t=$e(Hf(e));return Oe(()=>{t.current=Hf(e)},[e]),t}let sb="div",Wf=Ms.RenderStrategy;function ib(e,t){var n,r;let{beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:h,leaveFrom:f,leaveTo:p,..._}=e,g=$e(null),v=_r(g,t),b=(n=_.unmount)==null||n?Zn.Unmount:Zn.Hidden,{show:S,appear:D,initial:L}=eb(),[ne,me]=Qe(S?"visible":"hidden"),we=tb(),{register:ue,unregister:Q}=we;Oe(()=>ue(g),[ue,g]),Oe(()=>{if(b===Zn.Hidden&&g.current){if(S&&ne!=="visible"){me("visible");return}return pt(ne,{hidden:()=>Q(g),visible:()=>ue(g)})}},[ne,g,ue,Q,S,b]);let de=$n({base:Jn(_.className),enter:Jn(l),enterFrom:Jn(c),enterTo:Jn(d),entered:Jn(u),leave:Jn(h),leaveFrom:Jn(f),leaveTo:Jn(p)}),q=ob({beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a}),oe=Ra();Oe(()=>{if(oe&&ne==="visible"&&g.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[g,ne,oe]);let ye=L&&!D,N=D&&S&&L,_e=!oe||ye?"idle":S?"enter":"leave",ae=Ky(0),He=ce($t=>pt($t,{enter:()=>{ae.addFlag(zt.Opening),q.current.beforeEnter()},leave:()=>{ae.addFlag(zt.Closing),q.current.beforeLeave()},idle:()=>{}})),be=ce($t=>pt($t,{enter:()=>{ae.removeFlag(zt.Opening),q.current.afterEnter()},leave:()=>{ae.removeFlag(zt.Closing),q.current.afterLeave()},idle:()=>{}})),Re=jf(()=>{me("hidden"),Q(g)},we),at=$e(!1);Xy({immediate:N,container:g,classes:de,direction:_e,onStart:$n($t=>{at.current=!0,Re.onStart(g,$t,He)}),onStop:$n($t=>{at.current=!1,Re.onStop(g,$t,be),$t==="leave"&&!Ds(Re)&&(me("hidden"),Q(g))})});let At=_,sn={ref:v};return N?At={...At,className:Ns(_.className,...de.current.enter,...de.current.enterFrom)}:at.current&&(At.className=Ns(_.className,(r=g.current)==null?void 0:r.className),At.className===""&&delete At.className),Y.createElement(Os.Provider,{value:Re},Y.createElement(Ff,{value:pt(ne,{visible:zt.Open,hidden:zt.Closed})|ae.flags},Mn({ourProps:sn,theirProps:At,defaultTag:sb,features:Wf,visible:ne==="visible",name:"Transition.Child"})))}function ab(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,i=$e(null),a=_r(i,t);Ra();let l=Va();if(n===void 0&&l!==null&&(n=(l&zt.Open)===zt.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Qe(n?"visible":"hidden"),u=jf(()=>{d("hidden")}),[h,f]=Qe(!0),p=$e([n]);nt(()=>{h!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),f(!1))},[p,n]);let _=ht(()=>({show:n,appear:r,initial:h}),[n,r,h]);Oe(()=>{if(n)d("visible");else if(!Ds(u))d("hidden");else{let S=i.current;if(!S)return;let D=S.getBoundingClientRect();D.x===0&&D.y===0&&D.width===0&&D.height===0&&d("hidden")}},[n,u]);let g={unmount:o},v=ce(()=>{var S;h&&f(!1),(S=e.beforeEnter)==null||S.call(e)}),b=ce(()=>{var S;h&&f(!1),(S=e.beforeLeave)==null||S.call(e)});return Y.createElement(Os.Provider,{value:u},Y.createElement(Ps.Provider,{value:_},Mn({ourProps:{...g,as:Be,children:Y.createElement(Gf,{ref:a,...g,...s,beforeEnter:v,beforeLeave:b})},theirProps:{},defaultTag:Be,features:Wf,visible:c==="visible",name:"Transition"})))}function lb(e,t){let n=dn(Ps)!==null,r=Va()!==null;return Y.createElement(Y.Fragment,null,!n&&r?Y.createElement(Wa,{ref:t,...e}):Y.createElement(Gf,{ref:t,...e}))}let Wa=mn(ab),Gf=mn(ib),cb=mn(lb),ub=Object.assign(Wa,{Child:cb,Root:Wa});function db({name:e,control:t,queryAnzsic:n}){const[r,o]=Qe(""),[s,i]=Qe([]),a=async()=>{try{if(r.length>=2){const d=await n(r);i(d)}else i([])}catch(d){console.error("Error fetching data:",d),i([])}};Oe(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=uf({name:e,control:t,rules:{required:!0}});return F("div",{children:F(Vo,{onChange:l.onChange,value:l.value??null,name:l.name,children:[F(Vo.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),F("div",{className:"relative mt-2",children:[F("div",{className:"grid grid-cols-1",children:[F(Vo.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 text-sm",onChange:d=>o(d.target.value),onBlur:()=>o(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),F(pw,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),s.length>0&&F(Vo.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:s.map(d=>F(Be,{children:[F("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[F("span",{className:"self-start",children:d.GroupCode}),F("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var h,f;return F(Vo.Option,{value:u,className:"group relative cursor-pointer select-none py-2 pl-3 pr-9 text-gray-900 hover:bg-indigo-600 hover:text-white hover:outline-none",children:[F("div",{className:`flex items-center text-sm ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[F("span",{className:"self-start",children:u.ClassCode}),F("span",{className:"ml-2",children:u.ClassTitle})]}),F("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((f=l.value)==null?void 0:f.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:F(lw,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&s.length===0&&F("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:F("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&F("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function fb({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:o,validateWebsiteUrl:s,queryAnzsic:i,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Ea({mode:"onChange",defaultValues:e});return F(Be,{children:[F("div",{className:"font-bold text-lg mb-4",children:"Account details"}),F("form",{className:"space-y-6",onSubmit:c(a),children:[F("div",{children:[F(Ut,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),F("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),F(Ut,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),F("div",{className:"grid grid-cols-2 gap-3",children:[F(Ut,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),F(Ut,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:o})]}),F(Ut,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:s}),F(db,{name:"Industry",control:d,queryAnzsic:i}),F(Ia,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function hb(e,t,n,r){return $(fb,{defaultValues:e,validateAccountName:o=>Ot(sc(o)),validateLegalEntityName:o=>Ot(X$(o)),validateAbn:o=>Ot(Q$(o)),validateSalesforceParentRecordId:o=>Ot(am(o)),validateWebsiteUrl:o=>Ot(ic(o)),queryAnzsic:t,onSubmit:o=>{r(new rn(2,[o])),r(new rn(0,[]))},closeModal:n})}function qf(e){let t,n;const r=$("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),o=$("div",U(C([["className","pt-4 mx-6"],(t=Le(R(()=>e)),["children",T.Children.toArray(Array.from(t))])]))),s=[$("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),$("div",U(C([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(n=[$("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:T.Children.toArray([r,o])})],["children",T.Children.toArray(Array.from(n))])])))];return $(Be,{},...s)}function pb(e){let t;const n=$("div",U(C([["className","mb-4 text-sm font-normal text-gray-500"],(t=["All fields are required unless labelled as ",$("span",{className:"font-semibold",children:"optional"}),"."],["children",T.Children.toArray(Array.from(t))])])));return qf(Le(R(()=>G(P(n),R(()=>e)))))}function $b(e){let t,n,r,o;return qf([$("div",U(C([["className","text-sm mb-4"],(t=[$("p",{children:["You do not have sufficient permissions."]}),(n=C(["For details, please see ",$("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),$("p",{children:T.Children.toArray(Array.from(n))})),$("div",U(C([["className","flex justify-end"],(r=[$("button",U(C([(o="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",o]),["type","button"],["onClick",s=>{e()}],["children","Close"]])))],["children",T.Children.toArray(Array.from(r))])])))],["children",T.Children.toArray(Array.from(t))])])))])}function mb(e){const t=e.closeModal,n=e.partnerId,r=lr(Gn),o=r_(r.BackendUrl,r.AccessToken),s=ys(()=>_s(()=>i_,(l,c)=>a_(n,o,l,c),(l,c)=>{}),void 0,void 0),i=s[0],a=s[1];return r.Roles.ProvisionAccounts?pb(Le(R(()=>{const l=i.CurrentView;return l.tag===1?P(E_(i.PrimaryContactForm,a)):l.tag===2?P(N_(i.BusinessAddressForm,s_(i),o_(i),a)):P(hb(i.AccountDetailsForm,c=>o.QueryAnzsic(c),t,a))}))):$b(t)}function gb(e){const t=e.partnerId,n=Lr(!1),r=n[1],o=Le(R(()=>{let s;return G(P($("button",U(C([["type","button"],(s="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["onClick",i=>{r(!0)}],["children",T.Children.toArray([Gw,"Add account"])]])))),R(()=>n[0]?P($(mb,{partnerId:t,closeModal:()=>{r(!1)}})):Dt()))}));return $(Be,{},...o)}class wb extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Kf(e){return new wb(e)}function Zf(e){return e.fields[0]}class _b extends W{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function Qr(e){return new _b(e)}function Jf(e){return e.fields[0]}function yb(){return["scope","col"]}function vr(e){return Kf($("th",U(C([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],yb(),["children",e]]))))}function bb(e,t){let n;return Qr($("td",U(C([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[$("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",T.Children.toArray(Array.from(n))])]))))}function Fs(e,t){return Qr($("td",{className:pe(" ",G(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function vb(e,t){let n,r,o,s,i,a,l;return $("div",U(C([["className","flex flex-col mt-4"],(n=[$("div",U(C([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[$("div",U(C([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[$("div",U(C([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[$("table",U(C([["className","min-w-full divide-y divide-gray-200"],(i=[$("thead",{className:"bg-gray-50",children:(a=ze(Zf,e),$("tr",{children:T.Children.toArray(Array.from(a))}))}),(l=yi((c,d)=>(u=>{let h;return $("tr",U(C([["className",c%2===0?"bg-white":"bg-gray-50"],(h=ze(Jf,u),["children",T.Children.toArray(Array.from(h))])])))})(d),t),$("tbody",{children:T.Children.toArray(Array.from(l))}))],["children",T.Children.toArray(Array.from(i))])])))],["children",T.Children.toArray(Array.from(s))])])))],["children",T.Children.toArray(Array.from(o))])])))],["children",T.Children.toArray(Array.from(r))])])))],["children",T.Children.toArray(Array.from(n))])])))}function xb(e,t,n){return e?ft(n,t):n}function Yf(e,t,n,r){let o,s,i;return Kf($("th",U(C([["className",pe(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(o=[$("a",U(C([["className",pe(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(s=[r,$("span",U(C([["className",pe(" ",xb(!e,ie("invisible"),C(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(i=Le(R(()=>P(t?Hw:Ww))),["children",T.Children.toArray(Array.from(i))])])))],["children",T.Children.toArray(Array.from(s))])])))],["children",T.Children.toArray(Array.from(o))])]))))}function Cb(e,t){return Yf(Xe(Wu(e.Sort),new In(1,[])),Xe(Gu(e.Sort),new ur(0,[])),n=>{t(new pr(1,[qu(new In(1,[]),e.Sort)]))},"Name")}function Sb(e,t){return Yf(Xe(Wu(e.Sort),new In(0,[])),Xe(Gu(e.Sort),new ur(0,[])),n=>{t(new pr(1,[qu(new In(0,[]),e.Sort)]))},"Id")}function kb(e,t){let n;return Qr($("td",U(C([["className",pe(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[$("span",{children:[e]}),$("br",{}),$("span",{children:[t]})],["children",T.Children.toArray(Array.from(n))])]))))}function Ab(e,t,n){let r;return Qr($("td",U(C([["className",pe(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=Le(R(()=>{let o;return G(P($("div",U(C([["className",pe(" ",["font-medium"])],(o=[$("span",{children:[e]})],["children",T.Children.toArray(Array.from(o))])])))),R(()=>{let s;return G((s=t,s==null?P(xe()):P($("span",{children:["Legal Entity: "+s]}))),R(()=>{const i=n;if(i==null)return P(xe());{const a=i;return G(P($("br",{})),R(()=>P($("span",{children:["ABN: "+a]}))))}}))}))})),["children",T.Children.toArray(Array.from(r))])]))))}function Eb(e){return Qr($("td",{className:pe(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function Ib(e,t,n,r){let o;return Qr($("td",U(C([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(o=Le(R(()=>G(P($("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),R(()=>{let s,i;return G((s=r,s==null?P(xe()):(i=s,G(P($("br",{})),R(()=>P($("span",{children:[`Channel ID: ${i}`]})))))),R(()=>{const a=n;if(a==null)return P(xe());{const l=a;return G(P($("br",{})),R(()=>P($("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",T.Children.toArray(Array.from(o))])]))))}function Tb(e,t,n){const r=Jt(n.AccountId);return Le(R(()=>{let o;return G(P(Ib(M(E((o=[e,r],new k(8,[o[0],o[1]]))),1),n.AccountId,n.ExternalId,n.ChannelId)),R(()=>G(P(Ab(n.Name,n.BusinessName,n.BusinessNumber)),R(()=>G(t.ReadProtectedData?P(kb(ot(n.Contact,""),ot(n.ContactMobilePhone,""))):Dt(),R(()=>P(Eb(n.Website))))))))}))}class Nb extends he{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Xf extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Qf extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function Mb(e){let t;return $("thead",{className:"bg-gray-50",children:(t=ze(Zf,e),$("tr",{children:T.Children.toArray(Array.from(t))}))})}function Rb(e,t){let n;return $("tr",U(C([["className",e%2===0?"bg-white":"bg-gray-50"],(n=ze(Jf,t),["children",T.Children.toArray(Array.from(n))])])))}function Pb(e,t,n,r,o,s){let i,a,l,c,d,u,h;const f=t!=null&&n!=null?(i=t|0,a=n|0,Le(R(()=>G(P("Showing "),R(()=>G(P($("span",{className:"font-medium",children:`${i}`})),R(()=>G(P(" to "),R(()=>G(P($("span",{className:"font-medium",children:`${a}`})),R(()=>G(P(" of "),R(()=>r.tag===1?ie(" many"):C([$("span",{className:"font-medium",children:_t(r.fields[0])})," results"])))))))))))))):ie(xe()),p=Le(R(()=>{let _,g;return G((_=s,_==null?P(xe()):(g=_,P($("a",{className:pe(" ",["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:g,children:"Previous "})))),R(()=>{const v=o;if(v==null)return P(xe());{const b=v;return P($("a",{className:pe(" ",["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:b,children:" Next"}))}}))}));return $("tfoot",U(C([["className",pe(" ",["w-full"])],(l=[$("tr",U(ie((c=[$("td",U(C([["colSpan",e],(d=[$("nav",U(C([["className",pe(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[$("div",U(C([["className",pe(" ",["hidden","sm:block"])],(h=[$("p",{className:pe(" ",["text-sm","text-gray-700"]),children:T.Children.toArray(Array.from(f))})],["children",T.Children.toArray(Array.from(h))])]))),$("div",{className:pe(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:T.Children.toArray(Array.from(p))})],["children",T.Children.toArray(Array.from(u))])])))],["children",T.Children.toArray(Array.from(d))])])))],["children",T.Children.toArray(Array.from(c))]))))],["children",T.Children.toArray(Array.from(l))])])))}function Ob(e,t){const n=Lr(1),r=n[1],o=n[0]|0;return[o,s=>{if(o===e){if(t!=null){const i=t;Al(Kt("Calling Load")),i(),r(o+1)}}else r(o+1)},s=>{r(o-1)}]}function Db(e){let t,n,r,o,s;const i=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Pp(a,i.Data),u=Ob(Tr(d),i.LoadNext),h=u[0]|0,f=u[1];let p;const _=Tp(h-1,d);p=_==null?new Xf(1,[]):new Xf(0,[_]);const g=Tr(i.Data)|0,v=i.LoadNext==null?new Qf(0,[g]):new Qf(1,[]),b=p.tag===1?void 0:g>=1?(h-1)*a+1:void 0,S=p.tag===1?void 0:g>=1?(h-1)*a+Tr(p.fields[0]):void 0,D=h===1?void 0:u[2],L=h===Tr(d)?i.LoadNext!=null?f:void 0:h<Tr(d)?f:void 0;return $("div",U(C([["className","flex flex-col mt-4"],(t=[$("div",U(C([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[$("div",U(C([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[$("div",U(C([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[$("table",U(C([["className","min-w-full divide-y divide-gray-200"],(s=Le(R(()=>G(P(Mb(c)),R(()=>{let ne,me;return G((ne=p,ne.tag===1?P(xe()):P((me=yi(Rb,l(ne.fields[0])),$("tbody",{children:T.Children.toArray(Array.from(me))})))),R(()=>P(Pb(Tr(c),b,S,v,L,D))))})))),["children",T.Children.toArray(Array.from(s))])])))],["children",T.Children.toArray(Array.from(o))])])))],["children",T.Children.toArray(Array.from(r))])])))],["children",T.Children.toArray(Array.from(n))])])))],["children",T.Children.toArray(Array.from(t))])])))}function Yn(e){const t=e.error,n=ie($("span",{children:[t]}));return $("div",{children:T.Children.toArray(Array.from(n))})}function Vs(){const e=ie($("span",{children:["Please wait..."]}));return $("div",{children:T.Children.toArray(Array.from(e))})}function Fb(e){let t,n,r,o,s,i;const a=lr(Gn),l=Vw({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=ys(()=>_s(Uw,(S,D)=>zw(l,S,D),(S,D)=>{}),void 0,void 0),d=c[0],u=c[1],h=new sa(d.SearchText,d.Sort,d.PageSize);ea((t=[()=>Bw(l,h),S=>{u(new pr(2,[S]))}],Vu(t[0],t[1])));const f=S=>{u(new pr(4,[]))},p=d.Data;let _,g,v,b;switch(p.tag){case 0:case 1:{_=2;break}case 3:{_=3,b=p.fields[0];break}default:p.fields[0].tag===1?(_=1,v=p.fields[0].fields[0]):(_=0,g=p.fields[0].fields[0])}switch(_){case 0:{const S=C([$("div",U(C([["className",pe(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=Le(R(()=>{let D;return G(P($("div",U(C([["className",pe(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(D=[Kd(Zu(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",L=>{u(new pr(0,[L]))},f),jw(f)],["children",T.Children.toArray(Array.from(D))])])))),R(()=>e.accountProvisioningMode.tag===0?P(xe()):P($(gb,{partnerId:e.partnerId}))))})),["children",T.Children.toArray(Array.from(n))])]))),(r=g,o=Le(R(()=>G(P(Sb(d,u)),R(()=>G(P(Cb(d,u)),R(()=>G(a.Roles.ReadProtectedData?P(vr("Contact")):Dt(),R(()=>P(vr("Website")))))))))),s=new Nb(r.Accounts,Mt(D=>()=>{Br(Lw(l)(h)(D)(u))},r.Token)),i=Ju(d.PageSize)|0,$(Db,{columnHeaders:o,renderRowCells:D=>po(L=>Tb(e.partnerId,a.Roles,L),D),pageSize:i,data:s}))]);return $("div",{children:T.Children.toArray(Array.from(S))})}case 1:return $(Yn,{error:v});case 2:return $(Vs,null);default:{const S=_t(b);return $(Yn,{error:S})}}}let Ls=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function eh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=rr(i=>i,[new Ls(1,[t]),new Ls(0,[n]),new Ls(2,[un(o)]),Mt(i=>new Ls(3,[Zt(i)]),r)]);return $("superhero-super-configuration",Un(s,1))}let Bs=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function th(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=rr(i=>i,[new Bs(1,[t]),new Bs(0,[n]),new Bs(2,[un(o)]),Mt(i=>new Bs(3,[Zt(i)]),r)]);return $("superhero-benefits-onboarding-configuration",Un(s,1))}let Us=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function nh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=rr(i=>i,[new Us(1,[t]),new Us(0,[n]),new Us(2,[un(o)]),Mt(i=>new Us(3,[Zt(i)]),r)]);return $("superhero-bank-details",Un(s,1))}let zs=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function rh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=rr(i=>i,[new zs(1,[t]),new zs(0,[n]),new zs(2,[un(o)]),Mt(i=>new zs(3,[Zt(i)]),r)]);return $("superhero-profile-directory-app",Un(s,1))}let js=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function oh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,o=e.backendUrl,s=rr(i=>i,[new js(1,[r]),new js(0,[o]),new js(2,[un(n)]),Mt(i=>new js(3,[Zt(i)]),t)]);return $("workspace-account-registry-app",Un(s,1))}let Rn=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function Vb(e){const t=Un(e,1);return $(ub,t)}function Hs(e,t){let n;return $("div",U(C([["className","px-4 py-4 sm:px-0"],(n=[$("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),ot(Mt(r=>$("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),xe())],["children",T.Children.toArray(Array.from(n))])])))}function it(e,t){let n;return $("div",U(C([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[$("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),$("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",T.Children.toArray(Array.from(n))])])))}function Ga(e){let t,n;const r=e.value,o=e.label,s=Lr(!1),i=s[0],a=s[1];return l0(()=>{Br(J.Delay(()=>i?J.Bind(v0(2e3),()=>(a(!1),J.Zero())):J.Zero()))}),$("div",U(C([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[$("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:o}),$("dd",U(C([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[Vb(C([new Rn(3,["absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"]),new Rn(2,[i]),new Rn(4,["transition-opacity ease-in duration-100"]),new Rn(5,["opacity-0"]),new Rn(6,["opacity-90"]),new Rn(7,["transition-opacity ease-out duration-500"]),new Rn(8,["opacity-90"]),new Rn(9,["opacity-0"]),new Rn(10,[[$("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),$("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",T.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",T.Children.toArray(Array.from(t))])])))}function Ws(e,t){let n;const r=C([e,$("div",U(C([["className","mt-2 border-b border-gray-200"],(n=[$("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:T.Children.toArray(Array.from(t))})],["children",T.Children.toArray(Array.from(n))])])))]);return $("div",{children:T.Children.toArray(Array.from(r))})}function Lb(e){const t=lr(Gn);return Ws(Hs("Partner Information",void 0),Le(R(()=>{let n;return G(P((n=["ID",Yt(e.StreamId)],$(Ga,{label:n[0],value:n[1]}))),R(()=>{let r;return G(P((r=["Name",is(e.Name)],it(r[0],r[1]))),R(()=>{let o,s,i;return G(t.Roles.ReadProtectedData?(o=e.ContactDetails,o!=null?(s=o,G(P((i=["Contact",`${cc(s.FirstName)} ${dc(s.LastName)}`],it(i[0],i[1]))),R(()=>{let a;return P((a=["Phone",pc(s.MobilePhone)],it(a[0],a[1])))}))):Dt()):Dt(),R(()=>{let a;return G(P((a=["Website",ac(e.Website)],it(a[0],a[1]))),R(()=>{let l;return P((l=["Notes",ot(Y$(e.Notes),"")],it(l[0],l[1])))}))}))}))}))})))}let xr=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class Bb extends he{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Ub extends he{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class zb extends he{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class jb extends he{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Hb extends he{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Wb(e){let t,n,r,o,s,i,a;const l=c=>I("Workspace",M(E(new k(7,[c])),1));return Gd(e.tag===1?(t=e.fields[0],C([I("Details",M(E(new k(1,[t.partnerId])),1)),I("Accounts",void 0),I("Super",M(E(new k(4,[t.partnerId])),1)),I("Benefits",M(E(new k(5,[t.partnerId])),1)),I("Bank Details",M(E(new k(6,[t.partnerId])),1)),I("Directory",M(E(new k(2,[t.partnerId])),1)),l(t.partnerId)])):e.tag===2?(n=e.fields[0].PartnerId,C([I("Details",M(E(new k(1,[n])),1)),I("Accounts",M(E(new k(3,[n])),1)),I("Super",void 0),I("Benefits",M(E(new k(5,[n])),1)),I("Bank Details",M(E(new k(6,[n])),1)),I("Directory",M(E(new k(2,[n])),1)),l(n)])):e.tag===3?(r=e.fields[0].PartnerId,C([I("Details",M(E(new k(1,[r])),1)),I("Accounts",M(E(new k(3,[r])),1)),I("Super",M(E(new k(4,[r])),1)),I("Benefits",void 0),I("Bank Details",M(E(new k(6,[r])),1)),I("Directory",M(E(new k(2,[r])),1)),l(r)])):e.tag===4?(o=e.fields[0].PartnerId,C([I("Details",M(E(new k(1,[o])),1)),I("Accounts",M(E(new k(3,[o])),1)),I("Super",M(E(new k(4,[o])),1)),I("Benefits",M(E(new k(5,[o])),1)),I("Bank Details",void 0),I("Directory",M(E(new k(2,[o])),1)),l(o)])):e.tag===5?(s=e.fields[0].PartnerId,C([I("Details",M(E(new k(1,[s])),1)),I("Accounts",M(E(new k(3,[s])),1)),I("Super",M(E(new k(4,[s])),1)),I("Benefits",M(E(new k(5,[s])),1)),I("Bank Details",M(E(new k(6,[s])),1)),I("Directory",void 0),l(s)])):e.tag===6?(i=e.fields[0].PartnerId,C([I("Details",M(E(new k(1,[i])),1)),I("Accounts",M(E(new k(3,[i])),1)),I("Super",M(E(new k(4,[i])),1)),I("Benefits",M(E(new k(5,[i])),1)),I("Bank Details",M(E(new k(6,[i])),1)),I("Directory",M(E(new k(2,[i])),1)),I("Workspace",void 0)])):(a=e.fields[0],C([I("Details",void 0),I("Accounts",M(E(new k(3,[We(Yt(a.StreamId))])),1)),I("Super",M(E(new k(4,[We(Yt(a.StreamId))])),1)),I("Benefits",M(E(new k(5,[We(Yt(a.StreamId))])),1)),I("Bank Details",M(E(new k(6,[We(Yt(a.StreamId))])),1)),I("Directory",M(E(new k(2,[We(Yt(a.StreamId))])),1)),l(We(Yt(a.StreamId)))])))}function Gb(e){switch(e.tag){case 1:return $(Fb,e.fields[0]);case 2:return $(eh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return $(th,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return $(nh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return $(rh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return $(oh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return $(Lb,e.fields[0])}}function sh(e){let t;const n=e.mode;return $("div",U(ie((t=[Wb(n),Gb(n)],["children",T.Children.toArray(Array.from(t))]))))}let Gs=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function qb(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=rr(i=>i,[new Gs(1,[t]),new Gs(0,[n]),new Gs(2,[un(o)]),Mt(i=>new Gs(3,[Zt(i)]),r)]);return $("superhero-import-app",Un(s,1))}class qa extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function Kb(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=rr(s=>s,[new qa(1,[t]),new qa(0,[n]),Mt(s=>new qa(2,[Zt(s)]),r)]);return $("superhero-salpac-profile-admin",Un(o,1))}function Zb(e){const t=lr(Gn);return Ws(Hs("Account Information",void 0),Le(R(()=>{let n;return G(P((n=["ID",e.StreamId],$(Ga,{label:n[0],value:n[1]}))),R(()=>{let r;return G(P((r=["Name",e.Name],$(Ga,{label:r[0],value:r[1]}))),R(()=>{let o;return G(P((o=["External ID",ot(e.ExternalId,"")],it(o[0],o[1]))),R(()=>{let s;return G(P((s=["Channel ID",ot(e.ChannelId,"")],it(s[0],s[1]))),R(()=>{let i;if(t.Roles.ReadProtectedData){const a=e.ContactDetails;if(a!=null){const l=a;return G(P((i=["Contact",`${l.FirstName} ${l.LastName}`],it(i[0],i[1]))),R(()=>{let c;return G(P((c=["Phone",l.MobilePhone],it(c[0],c[1]))),R(()=>{let d;return P((d=["Email",l.Email],it(d[0],d[1])))}))}))}else return Dt()}else return Dt()}))}))}))}))})))}function Jb(e){let t,n,r,o,s,i,a;if(e==null)return xe();{const l=e;return Ws(Hs("Legal Entity",void 0),C([(t=["Business Name",l.BusinessName],it(t[0],t[1])),(n=["Business Number",l.BusinessNumber],it(n[0],n[1])),(r=["Address Line 1",l.Address1],it(r[0],r[1])),(o=["Address Line 2",ot(l.Address2,"")],it(o[0],o[1])),(s=["City",l.City],it(s[0],s[1])),(i=["State",ot(l.State,"")],it(i[0],i[1])),(a=["Postcode",l.Postcode],it(a[0],a[1]))]))}}function Yb(e){let t;if(e==null)return xe();{const n=e;return Ws(Hs("Legal Entity",void 0),ie((t=["Notes",n],it(t[0],t[1]))))}}function Xb(e){const t=C([$(Zb,e),Jb(e.LegalEntity),Yb(e.Notes)]);return $("div",{children:T.Children.toArray(Array.from(t))})}class Xn extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Imports","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace"]}}function Qb(e,t,n){let r,o,s,i,a,l,c,d,u,h,f,p,_,g,v,b,S,D,L,ne,me,we,ue,Q,de,q,oe,ye,N,_e,ae,He,be,Re,at,At,sn,$t,Pn,On,an,Dn,se,ve,Ye,gn,Fn,no,Ks,Zs;const ee=[e,t],m=I("Workspace",M(E((r=ee,new k(15,[r[0],r[1]]))),1));return Gd(n.tag===1?C([I("Details",M(E((o=ee,new k(8,[o[0],o[1]]))),1)),I("Directory",void 0),I("Imports",M(E((s=ee,new k(10,[s[0],s[1]]))),1)),I("Super",M(E((i=ee,new k(11,[i[0],i[1]]))),1)),I("Benefits",M(E((a=ee,new k(12,[a[0],a[1]]))),1)),I("Bank Details",M(E((l=ee,new k(13,[l[0],l[1]]))),1)),I("Salary Packaging",M(E((c=ee,new k(14,[c[0],c[1]]))),1)),m]):n.tag===2?C([I("Details",M(E((d=ee,new k(8,[d[0],d[1]]))),1)),I("Directory",M(E((u=ee,new k(9,[u[0],u[1]]))),1)),I("Imports",void 0),I("Super",M(E((h=ee,new k(11,[h[0],h[1]]))),1)),I("Benefits",M(E((f=ee,new k(12,[f[0],f[1]]))),1)),I("Bank Details",M(E((p=ee,new k(13,[p[0],p[1]]))),1)),I("Salary Packaging",M(E((_=ee,new k(14,[_[0],_[1]]))),1)),m]):n.tag===3?C([I("Details",M(E((g=ee,new k(8,[g[0],g[1]]))),1)),I("Directory",M(E((v=ee,new k(9,[v[0],v[1]]))),1)),I("Imports",M(E((b=ee,new k(10,[b[0],b[1]]))),1)),I("Super",void 0),I("Benefits",M(E((S=ee,new k(12,[S[0],S[1]]))),1)),I("Bank Details",M(E((D=ee,new k(13,[D[0],D[1]]))),1)),I("Salary Packaging",M(E((L=ee,new k(14,[L[0],L[1]]))),1)),m]):n.tag===4?C([I("Details",M(E((ne=ee,new k(8,[ne[0],ne[1]]))),1)),I("Directory",M(E((me=ee,new k(9,[me[0],me[1]]))),1)),I("Imports",M(E((we=ee,new k(10,[we[0],we[1]]))),1)),I("Super",M(E((ue=ee,new k(11,[ue[0],ue[1]]))),1)),I("Benefits",void 0),I("Bank Details",M(E((Q=ee,new k(13,[Q[0],Q[1]]))),1)),I("Salary Packaging",M(E((de=ee,new k(14,[de[0],de[1]]))),1)),m]):n.tag===5?C([I("Details",M(E((q=ee,new k(8,[q[0],q[1]]))),1)),I("Directory",M(E((oe=ee,new k(9,[oe[0],oe[1]]))),1)),I("Imports",M(E((ye=ee,new k(10,[ye[0],ye[1]]))),1)),I("Super",M(E((N=ee,new k(11,[N[0],N[1]]))),1)),I("Benefits",M(E((_e=ee,new k(12,[_e[0],_e[1]]))),1)),I("Bank Details",void 0),I("Salary Packaging",M(E((ae=ee,new k(14,[ae[0],ae[1]]))),1)),m]):n.tag===6?C([I("Details",M(E((He=ee,new k(8,[He[0],He[1]]))),1)),I("Directory",M(E((be=ee,new k(9,[be[0],be[1]]))),1)),I("Imports",M(E((Re=ee,new k(10,[Re[0],Re[1]]))),1)),I("Super",M(E((at=ee,new k(11,[at[0],at[1]]))),1)),I("Benefits",M(E((At=ee,new k(12,[At[0],At[1]]))),1)),I("Bank Details",M(E((sn=ee,new k(13,[sn[0],sn[1]]))),1)),I("Salary Packaging",void 0),m]):n.tag===7?C([I("Details",M(E(($t=ee,new k(8,[$t[0],$t[1]]))),1)),I("Directory",M(E((Pn=ee,new k(9,[Pn[0],Pn[1]]))),1)),I("Imports",M(E((On=ee,new k(10,[On[0],On[1]]))),1)),I("Super",M(E((an=ee,new k(11,[an[0],an[1]]))),1)),I("Benefits",M(E((Dn=ee,new k(12,[Dn[0],Dn[1]]))),1)),I("Bank Details",M(E((se=ee,new k(13,[se[0],se[1]]))),1)),I("Salary Packaging",M(E((ve=ee,new k(14,[ve[0],ve[1]]))),1)),I("Workspace",void 0)]):C([I("Details",void 0),I("Directory",M(E((Ye=ee,new k(9,[Ye[0],Ye[1]]))),1)),I("Imports",M(E((gn=ee,new k(10,[gn[0],gn[1]]))),1)),I("Super",M(E((Fn=ee,new k(11,[Fn[0],Fn[1]]))),1)),I("Benefits",M(E((no=ee,new k(12,[no[0],no[1]]))),1)),I("Bank Details",M(E((Ks=ee,new k(13,[Ks[0],Ks[1]]))),1)),I("Salary Packaging",M(E((Zs=ee,new k(14,[Zs[0],Zs[1]]))),1)),m]))}function ev(e){const t=e.account,n=e.mode,r=e.props,o=lr(Gn);switch(n.tag){case 1:{const s=r.accountDetails;return $(rh,{partnerId:s[0],accountId:s[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken})}case 2:{const s=r.accountDetails;return $(qb,{partnerId:s[0],accountId:s[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken})}case 3:{const s=r.accountDetails;return $(eh,{partnerId:s[0],accountId:s[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken})}case 4:{const s=r.accountDetails;return $(th,{partnerId:s[0],accountId:s[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken})}case 5:{const s=r.accountDetails;return $(nh,{partnerId:s[0],accountId:s[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken})}case 6:return $(Kb,{accountId:r.accountDetails[1],backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 7:{const s=r.accountDetails;return $(oh,{backendUrl:o.BackendUrl,accessToken:o.AccessToken,partnerId:s[0],accountId:s[1]})}default:{let s,i,a;switch(t.tag){case 0:case 1:{s=2;break}case 3:{s=3,a=t.fields[0];break}default:t.fields[0].tag===0?(s=0,i=t.fields[0].fields[0]):s=1}switch(s){case 0:return $(Xb,i);case 1:return $(Yn,{error:"There was an error retrieving account "});case 2:return $(Vs,null);default:{const l=_t(a);return $(Yn,{error:l})}}}}}function tv(e){let t,n;const r=e.account,o=e.mode,s=e.props;return $("div",U(ie((t=[(n=s.accountDetails,Qb(n[0],n[1],o)),$(ev,{props:s,mode:o,account:r})],["children",T.Children.toArray(Array.from(t))]))))}class eo extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let qs=class extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},to=class extends he{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function nv(){return[new to(void 0,new eo(0,[])),Ge()]}function rv(e,t,n,r){switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const s=o;return[new to(r.AccountId,new eo(1,[])),Nd(()=>iw(e,t,s),void 0,i=>new qs(2,[i]),i=>new qs(3,[i]))]}else return[new to(r.AccountId,new eo(3,["Account Id is required"])),Ge()]}case 2:{const o=n.fields[0];return[new to(r.AccountId,new eo(2,[o])),st(s=>{gt(ie(`#/account-registry/partners/${o.PartnerId}/accounts/${o.AccountId}`),1,2)})]}case 3:return[new to(r.AccountId,new eo(3,["Account not found"])),Ge()];default:return[new to(Jt(n.fields[0]),r.AccountDetails),Ge()]}}const ov=$("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),sv=$("div",U(C([["className","mt-2"],(()=>{let e;const t=[$("p",U(C([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
|
|
51
|
+
`));let h=d.props,f=typeof(h==null?void 0:h.className)=="function"?(...b)=>Ts(h==null?void 0:h.className(...b),l.className):Ts(h==null?void 0:h.className,l.className),p=f?{className:f}:{};return Ui(d,Object.assign({},Mf(d.props,Na(Ma(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},p))}return m(s,Object.assign({},Ma(l,["ref"]),s!==Oe&&c,s!==Oe&&u),d)}function f_(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Mf(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...s){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...s)}}});return t}function sn(e){var t;return Object.assign(Rn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Na(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ma(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let h_="div";var Rf=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Rf||{});function p_(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Cn({ourProps:s,theirProps:o,slot:{},defaultTag:h_,name:"Hidden"})}let m_=sn(p_),Ra=Nn(null);Ra.displayName="OpenClosedContext";var Ot=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ot||{});function Oa(){return en(Ra)}function Of({value:e,children:t}){return q.createElement(Ra.Provider,{value:e},t)}function $_(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let ur=[];$_(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ur[0]!==t.target&&(ur.unshift(t.target),ur=ur.filter(n=>n!=null&&n.isConnected),ur.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function g_(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&w_(n)?!1:r}function w_(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function b_(e){throw new Error("Unexpected object: "+e)}var Ze=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ze||{});function Pf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:b_(e)}}function Df(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Vf(n,Ff(t,r),o);return n}function Ff(e,t){return e?e+"["+t+"]":t}function Vf(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Vf(e,Ff(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Df(n,t,e)}var Pt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Pt||{}),__={},y_=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(y_||{}),v_=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(v_||{}),x_=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(x_||{}),C_=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(C_||{});function Pa(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,a)=>i.dataRef.current.order-a.dataRef.current.order):n_(r,i=>i.dataRef.current.domRef.current),s=n?o.indexOf(n):null;return s===-1&&(s=null),{options:o,activeOptionIndex:s}}let S_={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,o,s,i;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===Ze.Specific?t.idx:Pf(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var h,f;return(f=(h=e.activeOptionIndex)!=null?h:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?f:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(s=t.trigger)!=null?s:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=Pa(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===Ze.Specific?t.idx:Pf(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===l&&e.activationTrigger===c?e:{...e,...a,activeOptionIndex:l,activationTrigger:c}},3:(e,t)=>{var n,r,o;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,i=Pa(e,l=>(l.push(s),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(s));let a={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(o=>o.id!==t.id)};let r=Pa(e,o=>{let s=o.findIndex(i=>i.id===t.id);return s!==-1&&o.splice(s,1),o});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},Da=Nn(null);Da.displayName="ComboboxActionsContext";function To(e){let t=en(Da);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,To),n}return t}let Lf=Nn(null);function k_(e){var t;let n=dr("VirtualProvider"),[r,o]=it(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let c=window.getComputedStyle(l);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[n.optionsRef.current]),s=Hb({scrollPaddingStart:r,scrollPaddingEnd:o,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[i,a]=We(0);return Ke(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),q.createElement(Lf.Provider,{value:s},q.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&__.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&s.scrollToIndex(n.activeOptionIndex)}}},s.getVirtualItems().map(l=>{var c;return q.createElement(Oe,{key:l.key},q.cloneElement((c=e.children)==null?void 0:c.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${i}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let Fa=Nn(null);Fa.displayName="ComboboxDataContext";function dr(e){let t=en(Fa);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dr),n}return t}function A_(e,t){return at(t.type,S_,e,t)}let E_=Oe;function I_(e,t){let{value:n,defaultValue:r,onChange:o,form:s,name:i,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:h=!1,virtual:f=null,...p}=e,b=!1,$=null,[v=u?[]:void 0,y]=Kb(n,o,r),[C,R]=Ir(A_,{dataRef:ki(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),L=ce(!1),X=ce({static:!1,hold:!1}),$e=ce(null),_e=ce(null),ue=ce(null),Y=ce(null),de=oe(typeof a=="string"?(re,Ae)=>{let ut=a;return(re==null?void 0:re[ut])===(Ae==null?void 0:Ae[ut])}:a??((re,Ae)=>re===Ae)),G=oe(re=>C.options.findIndex(Ae=>de(Ae.dataRef.current.value,re))),ne=Mn(re=>at(N.mode,{1:()=>v.some(Ae=>de(Ae,re)),0:()=>de(v,re)}),[v]),Se=oe(re=>C.activeOptionIndex===G(re)),N=it(()=>({...C,immediate:b,optionsPropsRef:X,labelRef:$e,inputRef:_e,buttonRef:ue,optionsRef:Y,value:v,defaultValue:r,disabled:l,mode:u?1:0,virtual:C.virtual,get activeOptionIndex(){if(L.current&&C.activeOptionIndex===null&&C.options.length>0){let re=C.options.findIndex(Ae=>!Ae.dataRef.current.disabled);if(re!==-1)return re}return C.activeOptionIndex},calculateIndex:G,compare:de,isSelected:ne,isActive:Se,nullable:d,__demoMode:c}),[v,r,l,u,d,c,C,$]);Ke(()=>{},[$,void 0]),Ke(()=>{C.dataRef.current=N},[N]),i_([N.buttonRef,N.inputRef,N.optionsRef],()=>Oo.closeCombobox(),N.comboboxState===0);let ye=it(()=>{var re,Ae,ut;return{open:N.comboboxState===0,disabled:l,activeIndex:N.activeOptionIndex,activeOption:N.activeOptionIndex===null?null:N.virtual?N.virtual.options[(re=N.activeOptionIndex)!=null?re:0]:(ut=(Ae=N.options[N.activeOptionIndex])==null?void 0:Ae.dataRef.current.value)!=null?ut:null,value:v}},[N,l,v]),le=oe(()=>{if(N.activeOptionIndex!==null){if(N.virtual)pr(N.virtual.options[N.activeOptionIndex]);else{let{dataRef:re}=N.options[N.activeOptionIndex];pr(re.current.value)}Oo.goToOption(Ze.Specific,N.activeOptionIndex)}}),Je=oe(()=>{R({type:0}),L.current=!0}),ke=oe(()=>{R({type:1}),L.current=!1}),Ve=oe((re,Ae,ut)=>(L.current=!1,re===Ze.Specific?R({type:2,focus:Ze.Specific,idx:Ae,trigger:ut}):R({type:2,focus:re,trigger:ut}))),vt=oe((re,Ae)=>(R({type:3,payload:{id:re,dataRef:Ae}}),()=>{N.isActive(Ae.current.value)&&(L.current=!0),R({type:4,id:re})})),Yt=oe(re=>(R({type:5,id:re}),()=>R({type:5,id:null}))),pr=oe(re=>at(N.mode,{0(){return y==null?void 0:y(re)},1(){let Ae=N.value.slice(),ut=Ae.findIndex(Kr=>de(Kr,re));return ut===-1?Ae.push(re):Ae.splice(ut,1),y==null?void 0:y(Ae)}})),Dt=oe(re=>{R({type:6,trigger:re})}),Oo=it(()=>({onChange:pr,registerOption:vt,registerLabel:Yt,goToOption:Ve,closeCombobox:ke,openCombobox:Je,setActivationTrigger:Dt,selectActiveOption:le}),[]),Po=t===null?{}:{ref:t},mr=ce(null),Do=Eo();return Te(()=>{mr.current&&r!==void 0&&Do.addEventListener(mr.current,"reset",()=>{y==null||y(r)})},[mr,y]),q.createElement(Da.Provider,{value:Oo},q.createElement(Fa.Provider,{value:N},q.createElement(Of,{value:at(N.comboboxState,{0:Ot.Open,1:Ot.Closed})},i!=null&&v!=null&&Df({[i]:v}).map(([re,Ae],ut)=>q.createElement(m_,{features:Rf.Hidden,ref:ut===0?Kr=>{var Fo;mr.current=(Fo=Kr==null?void 0:Kr.closest("form"))!=null?Fo:null}:void 0,...Na({key:re,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:s,disabled:l,name:re,value:Ae})})),Cn({ourProps:Po,theirProps:p,slot:ye,defaultTag:E_,name:"Combobox"}))))}let T_="input";function N_(e,t){var n,r,o,s,i;let a=Io(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...h}=e,f=dr("Combobox.Input"),p=To("Combobox.Input"),b=cr(f.inputRef,t),$=a_(f.inputRef),v=ce(!1),y=Eo(),C=oe(()=>{p.onChange(null),f.optionsRef.current&&(f.optionsRef.current.scrollTop=0),p.goToOption(Ze.Nothing)}),R=function(){var N;return typeof d=="function"&&f.value!==void 0?(N=d(f.value))!=null?N:"":typeof f.value=="string"?f.value:""}();Nf(([N,ye],[le,Je])=>{if(v.current)return;let ke=f.inputRef.current;ke&&((Je===0&&ye===1||N!==le)&&(ke.value=N),requestAnimationFrame(()=>{if(v.current||!ke||($==null?void 0:$.activeElement)!==ke)return;let{selectionStart:Ve,selectionEnd:vt}=ke;Math.abs((vt??0)-(Ve??0))===0&&Ve===0&&ke.setSelectionRange(ke.value.length,ke.value.length)}))},[R,f.comboboxState,$]),Nf(([N],[ye])=>{if(N===0&&ye===1){if(v.current)return;let le=f.inputRef.current;if(!le)return;let Je=le.value,{selectionStart:ke,selectionEnd:Ve,selectionDirection:vt}=le;le.value="",le.value=Je,vt!==null?le.setSelectionRange(ke,Ve,vt):le.setSelectionRange(ke,Ve)}},[f.comboboxState]);let L=ce(!1),X=oe(()=>{L.current=!0}),$e=oe(()=>{y.nextFrame(()=>{L.current=!1})}),_e=oe(N=>{switch(v.current=!0,N.key){case Pt.Enter:if(v.current=!1,f.comboboxState!==0||L.current)return;if(N.preventDefault(),N.stopPropagation(),f.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),f.mode===0&&p.closeCombobox();break;case Pt.ArrowDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),at(f.comboboxState,{0:()=>p.goToOption(Ze.Next),1:()=>p.openCombobox()});case Pt.ArrowUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),at(f.comboboxState,{0:()=>p.goToOption(Ze.Previous),1:()=>{p.openCombobox(),y.nextFrame(()=>{f.value||p.goToOption(Ze.Last)})}});case Pt.Home:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.First);case Pt.PageUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.First);case Pt.End:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.Last);case Pt.PageDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.Last);case Pt.Escape:return v.current=!1,f.comboboxState!==0?void 0:(N.preventDefault(),f.optionsRef.current&&!f.optionsPropsRef.current.static&&N.stopPropagation(),f.nullable&&f.mode===0&&f.value===null&&C(),p.closeCombobox());case Pt.Tab:if(v.current=!1,f.comboboxState!==0)return;f.mode===0&&f.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),ue=oe(N=>{c==null||c(N),f.nullable&&f.mode===0&&N.target.value===""&&C(),p.openCombobox()}),Y=oe(N=>{var ye,le,Je;let ke=(ye=N.relatedTarget)!=null?ye:ur.find(Ve=>Ve!==N.currentTarget);if(v.current=!1,!((le=f.optionsRef.current)!=null&&le.contains(ke))&&!((Je=f.buttonRef.current)!=null&&Je.contains(ke))&&f.comboboxState===0)return N.preventDefault(),f.mode===0&&(f.nullable&&f.value===null?C():f.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),de=oe(N=>{var ye,le,Je;let ke=(ye=N.relatedTarget)!=null?ye:ur.find(Ve=>Ve!==N.currentTarget);(le=f.buttonRef.current)!=null&&le.contains(ke)||(Je=f.optionsRef.current)!=null&&Je.contains(ke)||f.disabled||f.immediate&&f.comboboxState!==0&&(p.openCombobox(),y.nextFrame(()=>{p.setActivationTrigger(1)}))}),G=Ea(()=>{if(f.labelId)return[f.labelId].join(" ")},[f.labelId]),ne=it(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]),Se={ref:b,id:l,role:"combobox",type:u,"aria-controls":(n=f.optionsRef.current)==null?void 0:n.id,"aria-expanded":f.comboboxState===0,"aria-activedescendant":f.activeOptionIndex===null?void 0:f.virtual?(r=f.options.find(N=>{var ye;return!((ye=f.virtual)!=null&&ye.disabled(N.dataRef.current.value))&&f.compare(N.dataRef.current.value,f.virtual.options[f.activeOptionIndex])}))==null?void 0:r.id:(o=f.options[f.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(i=(s=e.defaultValue)!=null?s:f.defaultValue!==void 0?d==null?void 0:d(f.defaultValue):null)!=null?i:f.defaultValue,disabled:f.disabled,onCompositionStart:X,onCompositionEnd:$e,onKeyDown:_e,onChange:ue,onFocus:de,onBlur:Y};return Cn({ourProps:Se,theirProps:h,slot:ne,defaultTag:T_,name:"Combobox.Input"})}let M_="button";function R_(e,t){var n;let r=dr("Combobox.Button"),o=To("Combobox.Button"),s=cr(r.buttonRef,t),i=Io(),{id:a=`headlessui-combobox-button-${i}`,...l}=e,c=Eo(),d=oe(b=>{switch(b.key){case Pt.ArrowDown:return b.preventDefault(),b.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Pt.ArrowUp:return b.preventDefault(),b.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(Ze.Last)})),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Pt.Escape:return r.comboboxState!==0?void 0:(b.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&b.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),u=oe(b=>{if(g_(b.currentTarget))return b.preventDefault();r.comboboxState===0?o.closeCombobox():(b.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),h=Ea(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),f=it(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:s,id:a,type:l_(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":h,disabled:r.disabled,onClick:u,onKeyDown:d};return Cn({ourProps:p,theirProps:l,slot:f,defaultTag:M_,name:"Combobox.Button"})}let O_="label";function P_(e,t){let n=Io(),{id:r=`headlessui-combobox-label-${n}`,...o}=e,s=dr("Combobox.Label"),i=To("Combobox.Label"),a=cr(s.labelRef,t);Ke(()=>i.registerLabel(r),[r]);let l=oe(()=>{var d;return(d=s.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=it(()=>({open:s.comboboxState===0,disabled:s.disabled}),[s]);return Cn({ourProps:{ref:a,id:r,onClick:l},theirProps:o,slot:c,defaultTag:O_,name:"Combobox.Label"})}let D_="ul",F_=Ns.RenderStrategy|Ns.Static;function V_(e,t){let n=Io(),{id:r=`headlessui-combobox-options-${n}`,hold:o=!1,...s}=e,i=dr("Combobox.Options"),a=cr(i.optionsRef,t),l=Oa(),c=l!==null?(l&Ot.Open)===Ot.Open:i.comboboxState===0;Ke(()=>{var f;i.optionsPropsRef.current.static=(f=e.static)!=null?f:!1},[i.optionsPropsRef,e.static]),Ke(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),d_({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(f){return f.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});let d=Ea(()=>{var f,p;return(p=i.labelId)!=null?p:(f=i.buttonRef.current)==null?void 0:f.id},[i.labelId,i.buttonRef.current]),u=it(()=>({open:i.comboboxState===0,option:void 0}),[i]),h={"aria-labelledby":d,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:a};return i.virtual&&i.comboboxState===0&&Object.assign(s,{children:q.createElement(k_,null,s.children)}),Cn({ourProps:h,theirProps:s,slot:u,defaultTag:D_,features:F_,visible:c,name:"Combobox.Options"})}let L_="li";function B_(e,t){var n;let r=Io(),{id:o=`headlessui-combobox-option-${r}`,disabled:s=!1,value:i,order:a=null,...l}=e,c=dr("Combobox.Option"),d=To("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===o,h=c.isSelected(i),f=ce(null),p=on({disabled:s,value:i,domRef:f,order:a}),b=en(Lf),$=cr(t,f,b?b.measureElement:null),v=oe(()=>d.onChange(i));Ke(()=>d.registerOption(o,p),[p,o]);let y=ce(!(c.virtual||c.__demoMode));Ke(()=>{if(!c.virtual||!c.__demoMode)return;let Y=lr();return Y.requestAnimationFrame(()=>{y.current=!0}),Y.dispose},[c.virtual,c.__demoMode]),Ke(()=>{if(!y.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let Y=lr();return Y.requestAnimationFrame(()=>{var de,G;(G=(de=f.current)==null?void 0:de.scrollIntoView)==null||G.call(de,{block:"nearest"})}),Y.dispose},[f,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=oe(Y=>{var de;if(s||(de=c.virtual)!=null&&de.disabled(i))return Y.preventDefault();v(),Ef()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),R=oe(()=>{var Y;if(s||(Y=c.virtual)!=null&&Y.disabled(i))return d.goToOption(Ze.Nothing);let de=c.calculateIndex(i);d.goToOption(Ze.Specific,de)}),L=u_(),X=oe(Y=>L.update(Y)),$e=oe(Y=>{var de;if(!L.wasMoved(Y)||s||(de=c.virtual)!=null&&de.disabled(i)||u)return;let G=c.calculateIndex(i);d.goToOption(Ze.Specific,G,0)}),_e=oe(Y=>{var de;L.wasMoved(Y)&&(s||(de=c.virtual)!=null&&de.disabled(i)||u&&(c.optionsPropsRef.current.hold||d.goToOption(Ze.Nothing)))}),ue=it(()=>({active:u,selected:h,disabled:s}),[u,h,s]);return Cn({ourProps:{id:o,ref:$,role:"option",tabIndex:s===!0?void 0:-1,"aria-disabled":s===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:C,onFocus:R,onPointerEnter:X,onMouseEnter:X,onPointerMove:$e,onMouseMove:$e,onPointerLeave:_e,onMouseLeave:_e},theirProps:l,slot:ue,defaultTag:L_,name:"Combobox.Option"})}let U_=sn(I_),z_=sn(R_),j_=sn(N_),H_=sn(P_),W_=sn(V_),G_=sn(B_),No=Object.assign(U_,{Input:j_,Button:z_,Label:H_,Options:W_,Option:G_});function Va(){let e=ce(!1);return Ke(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function q_(e=0){let[t,n]=We(e),r=Va(),o=Mn(l=>{r.current&&n(c=>c|l)},[t,r]),s=Mn(l=>!!(t&l),[t]),i=Mn(l=>{r.current&&n(c=>c&~l)},[n,r]),a=Mn(l=>{r.current&&n(c=>c^l)},[n]);return{flags:t,addFlag:o,hasFlag:s,removeFlag:i,toggleFlag:a}}function K_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function La(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ba(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Z_(e,t){let n=lr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,u)=>u-d);return c}),a=s+i;if(a!==0){n.group(c=>{c.setTimeout(()=>{t(),c.dispose()},a),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=n.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function J_(e,t,n,r){let o=n?"enter":"leave",s=lr(),i=r!==void 0?K_(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=at(o,{enter:()=>t.enter,leave:()=>t.leave}),l=at(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=at(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ba(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),La(e,...t.base,...a,...c),s.nextFrame(()=>{Ba(e,...t.base,...a,...c),La(e,...t.base,...a,...l),Z_(e,()=>(Ba(e,...t.base,...a),La(e,...t.base,...t.entered),i()))}),s.dispose}function Y_({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:s}){let i=Va(),a=Eo(),l=on(n);Ke(()=>{e&&(l.current="enter")},[e]),Ke(()=>{let c=lr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&i.current)return c.dispose(),o.current(l.current),c.add(J_(d,r.current,l.current==="enter",()=>{c.dispose(),s.current(l.current)})),c.dispose},[n])}function Vn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Rs=Nn(null);Rs.displayName="TransitionContext";var X_=(e=>(e.Visible="visible",e.Hidden="hidden",e))(X_||{});function Q_(){let e=en(Rs);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ey(){let e=en(Os);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Os=Nn(null);Os.displayName="NestingContext";function Ps(e){return"children"in e?Ps(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Bf(e,t){let n=on(e),r=ce([]),o=Va(),s=Eo(),i=oe((f,p=Fn.Hidden)=>{let b=r.current.findIndex(({el:$})=>$===f);b!==-1&&(at(p,{[Fn.Unmount](){r.current.splice(b,1)},[Fn.Hidden](){r.current[b].state="hidden"}}),s.microTask(()=>{var $;!Ps(r)&&o.current&&(($=n.current)==null||$.call(n))}))}),a=oe(f=>{let p=r.current.find(({el:b})=>b===f);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,Fn.Unmount)}),l=ce([]),c=ce(Promise.resolve()),d=ce({enter:[],leave:[],idle:[]}),u=oe((f,p,b)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([$])=>$!==f)),t==null||t.chains.current[p].push([f,new Promise($=>{l.current.push($)})]),t==null||t.chains.current[p].push([f,new Promise($=>{Promise.all(d.current[p].map(([v,y])=>y)).then(()=>$())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>b(p)):b(p)}),h=oe((f,p,b)=>{Promise.all(d.current[p].splice(0).map(([$,v])=>v)).then(()=>{var $;($=l.current.shift())==null||$()}).then(()=>b(p))});return it(()=>({children:r,register:a,unregister:i,onStart:u,onStop:h,wait:c,chains:d}),[a,i,r,u,h,d,c])}function ty(){}let ny=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Uf(e){var t;let n={};for(let r of ny)n[r]=(t=e[r])!=null?t:ty;return n}function ry(e){let t=ce(Uf(e));return Te(()=>{t.current=Uf(e)},[e]),t}let oy="div",zf=Ns.RenderStrategy;function sy(e,t){var n,r;let{beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:h,leaveFrom:f,leaveTo:p,...b}=e,$=ce(null),v=cr($,t),y=(n=b.unmount)==null||n?Fn.Unmount:Fn.Hidden,{show:C,appear:R,initial:L}=Q_(),[X,$e]=We(C?"visible":"hidden"),_e=ey(),{register:ue,unregister:Y}=_e;Te(()=>ue($),[ue,$]),Te(()=>{if(y===Fn.Hidden&&$.current){if(C&&X!=="visible"){$e("visible");return}return at(X,{hidden:()=>Y($),visible:()=>ue($)})}},[X,$,ue,Y,C,y]);let de=on({base:Vn(b.className),enter:Vn(l),enterFrom:Vn(c),enterTo:Vn(d),entered:Vn(u),leave:Vn(h),leaveFrom:Vn(f),leaveTo:Vn(p)}),G=ry({beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a}),ne=Ia();Te(()=>{if(ne&&X==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,X,ne]);let Se=L&&!R,N=R&&C&&L,ye=!ne||Se?"idle":C?"enter":"leave",le=q_(0),Je=oe(Dt=>at(Dt,{enter:()=>{le.addFlag(Ot.Opening),G.current.beforeEnter()},leave:()=>{le.addFlag(Ot.Closing),G.current.beforeLeave()},idle:()=>{}})),ke=oe(Dt=>at(Dt,{enter:()=>{le.removeFlag(Ot.Opening),G.current.afterEnter()},leave:()=>{le.removeFlag(Ot.Closing),G.current.afterLeave()},idle:()=>{}})),Ve=Bf(()=>{$e("hidden"),Y($)},_e),vt=ce(!1);Y_({immediate:N,container:$,classes:de,direction:ye,onStart:on(Dt=>{vt.current=!0,Ve.onStart($,Dt,Je)}),onStop:on(Dt=>{vt.current=!1,Ve.onStop($,Dt,ke),Dt==="leave"&&!Ps(Ve)&&($e("hidden"),Y($))})});let Yt=b,pr={ref:v};return N?Yt={...Yt,className:Ts(b.className,...de.current.enter,...de.current.enterFrom)}:vt.current&&(Yt.className=Ts(b.className,(r=$.current)==null?void 0:r.className),Yt.className===""&&delete Yt.className),q.createElement(Os.Provider,{value:Ve},q.createElement(Of,{value:at(X,{visible:Ot.Open,hidden:Ot.Closed})|le.flags},Cn({ourProps:pr,theirProps:Yt,defaultTag:oy,features:zf,visible:X==="visible",name:"Transition.Child"})))}function iy(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,i=ce(null),a=cr(i,t);Ia();let l=Oa();if(n===void 0&&l!==null&&(n=(l&Ot.Open)===Ot.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=We(n?"visible":"hidden"),u=Bf(()=>{d("hidden")}),[h,f]=We(!0),p=ce([n]);Ke(()=>{h!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),f(!1))},[p,n]);let b=it(()=>({show:n,appear:r,initial:h}),[n,r,h]);Te(()=>{if(n)d("visible");else if(!Ps(u))d("hidden");else{let C=i.current;if(!C)return;let R=C.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&d("hidden")}},[n,u]);let $={unmount:o},v=oe(()=>{var C;h&&f(!1),(C=e.beforeEnter)==null||C.call(e)}),y=oe(()=>{var C;h&&f(!1),(C=e.beforeLeave)==null||C.call(e)});return q.createElement(Os.Provider,{value:u},q.createElement(Rs.Provider,{value:b},Cn({ourProps:{...$,as:Oe,children:q.createElement(jf,{ref:a,...$,...s,beforeEnter:v,beforeLeave:y})},theirProps:{},defaultTag:Oe,features:zf,visible:c==="visible",name:"Transition"})))}function ay(e,t){let n=en(Rs)!==null,r=Oa()!==null;return q.createElement(q.Fragment,null,!n&&r?q.createElement(Ua,{ref:t,...e}):q.createElement(jf,{ref:t,...e}))}let Ua=sn(iy),jf=sn(sy),ly=sn(ay),cy=Object.assign(Ua,{Child:ly,Root:Ua});function uy({name:e,control:t,queryAnzsic:n}){const[r,o]=We(""),[s,i]=We([]),a=async()=>{try{if(r.length>=2){const d=await n(r);i(d)}else i([])}catch(d){console.error("Error fetching data:",d),i([])}};Te(()=>{const d=setTimeout(()=>{a()},500);return()=>clearTimeout(d)},[r]);const{field:l,fieldState:c}=af({name:e,control:t,rules:{required:!0}});return M("div",{children:M(No,{onChange:l.onChange,value:l.value??null,name:l.name,children:[M(No.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),M("div",{className:"relative mt-2",children:[M("div",{className:"grid grid-cols-1",children:[M(No.Input,{className:"col-start-1 row-start-1 block w-full rounded-md bg-white py-[9px] pl-9 pr-2 text-gray-900 placeholder:text-gray-400 text-sm border border-gray-300 focus:ring-2 focus:ring-indigo-600 focus:border-indigo-600",onChange:d=>o(d.target.value),onBlur:()=>o(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),M(h1,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),s.length>0&&M(No.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:s.map(d=>M(Oe,{children:[M("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[M("span",{className:"self-start",children:d.GroupCode}),M("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var h,f;return M(No.Option,{value:u,className:"group relative cursor-pointer select-none py-2 pl-3 pr-9 text-gray-900 hover:bg-indigo-600 hover:text-white hover:outline-none",children:[M("div",{className:`flex items-center text-sm ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[M("span",{className:"self-start",children:u.ClassCode}),M("span",{className:"ml-2",children:u.ClassTitle})]}),M("span",{className:`absolute inset-y-0 right-0 items-center pr-4 text-indigo-600 group-hover:text-white ${((f=l.value)==null?void 0:f.ClassCode)===u.ClassCode?"flex":"hidden"}`,children:M(a1,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&s.length===0&&M("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none",children:M("div",{className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-400 text-sm",children:"Keep typing to search industries"})})]}),c.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function dy({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:o,validateWebsiteUrl:s,queryAnzsic:i,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Ca({mode:"onChange",defaultValues:e});return M(Oe,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:c(a),children:[M("div",{children:[M(Rt,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),M("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),M(Rt,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),M(Rt,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:o})]}),M(Rt,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:s}),M(uy,{name:"Industry",control:d,queryAnzsic:i}),M(Sa,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function fy(e,t,n,r){return m(dy,{defaultValues:e,validateAccountName:o=>At(ec(o)),validateLegalEntityName:o=>At(Ym(o)),validateAbn:o=>At(Xm(o)),validateSalesforceParentRecordId:o=>At(i$(o)),validateWebsiteUrl:o=>At(tc(o)),queryAnzsic:t,onSubmit:o=>{r(new Zt(2,[o])),r(new Zt(0,[]))},closeModal:n})}function Hf(e){let t,n;const r=m("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),o=m("div",D(k([["className","pt-4 mx-6"],(t=Ie(A(()=>e)),["children",I.Children.toArray(Array.from(t))])]))),s=[m("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),m("div",D(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(n=[m("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:I.Children.toArray([r,o])})],["children",I.Children.toArray(Array.from(n))])])))];return m(Oe,{},...s)}function hy(e){let t;const n=m("div",D(k([["className","mb-4 text-sm font-normal text-gray-500"],(t=["All fields are required unless labelled as ",m("span",{className:"font-semibold",children:"optional"}),"."],["children",I.Children.toArray(Array.from(t))])])));return Hf(Ie(A(()=>B(E(n),A(()=>e)))))}function py(e){let t,n,r,o;return Hf([m("div",D(k([["className","text-sm mb-4"],(t=[m("p",{children:["You do not have sufficient permissions."]}),(n=k(["For details, please see ",m("a",{className:"font-medium text-blue-600 hover:underline",href:"https://myobconfluence.atlassian.net/wiki/spaces/ENG/pages/9811993991/SuperHero+Module+Permissions",target:"_blank",children:"SuperHero Module Permissions"})]),m("p",{children:I.Children.toArray(Array.from(n))})),m("div",D(k([["className","flex justify-end"],(r=[m("button",D(k([(o="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",o]),["type","button"],["onClick",s=>{e()}],["children","Close"]])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(t))])])))])}function my(e){const t=e.closeModal,n=e.partnerId,r=Jn(On),o=nb(r.BackendUrl,r.AccessToken),s=bs(()=>ws(()=>sb,(l,c)=>ib(n,o,l,c),(l,c)=>{}),void 0,void 0),i=s[0],a=s[1];return r.Roles.ProvisionAccounts?hy(Ie(A(()=>{const l=i.CurrentView;return l.tag===1?E(Ab(i.PrimaryContactForm,a)):l.tag===2?E(Tb(i.BusinessAddressForm,ob(i),rb(i),a)):E(fy(i.AccountDetailsForm,c=>o.QueryAnzsic(c),t,a))}))):py(t)}function $y(e){const t=e.partnerId,n=Yn(!1),r=n[1],o=Ie(A(()=>{let s;return B(E(m("button",D(k([["type","button"],(s="inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-[8.5px] text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",["className",s]),["onClick",i=>{r(!0)}],["children",I.Children.toArray([W1,"Add account"])]])))),A(()=>n[0]?E(m(my,{partnerId:t,closeModal:()=>{r(!1)}})):Et()))}));return m(Oe,{},...o)}class gy extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Wf(e){return new gy(e)}function Gf(e){return e.fields[0]}class wy extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function Wr(e){return new wy(e)}function qf(e){return e.fields[0]}function by(){return["scope","col"]}function fr(e){return Wf(m("th",D(k([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],by(),["children",e]]))))}function _y(e,t){let n;return Wr(m("td",D(k([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[m("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",I.Children.toArray(Array.from(n))])]))))}function Ds(e,t){return Wr(m("td",{className:ae(" ",B(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function yy(e,t){let n,r,o,s,i,a,l;return m("div",D(k([["className","flex flex-col mt-4"],(n=[m("div",D(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[m("div",D(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[m("div",D(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[m("table",D(k([["className","min-w-full divide-y divide-gray-200"],(i=[m("thead",{className:"bg-gray-50",children:(a=De(Gf,e),m("tr",{children:I.Children.toArray(Array.from(a))}))}),(l=$i((c,d)=>(u=>{let h;return m("tr",D(k([["className",c%2===0?"bg-white":"bg-gray-50"],(h=De(qf,u),["children",I.Children.toArray(Array.from(h))])])))})(d),t),m("tbody",{children:I.Children.toArray(Array.from(l))}))],["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))}function vy(e,t,n){return e?ot(n,t):n}function Kf(e,t,n,r){let o,s,i;return Wf(m("th",D(k([["className",ae(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(o=[m("a",D(k([["className",ae(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(s=[r,m("span",D(k([["className",ae(" ",vy(!e,ee("invisible"),k(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(i=Ie(A(()=>E(t?j1:H1))),["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])]))))}function xy(e,t){return Kf(He(Bu(e.Sort),new yn(1,[])),He(Uu(e.Sort),new er(0,[])),n=>{t(new or(1,[zu(new yn(1,[]),e.Sort)]))},"Name")}function Cy(e,t){return Kf(He(Bu(e.Sort),new yn(0,[])),He(Uu(e.Sort),new er(0,[])),n=>{t(new or(1,[zu(new yn(0,[]),e.Sort)]))},"Id")}function Sy(e,t){let n;return Wr(m("td",D(k([["className",ae(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[m("span",{children:[e]}),m("br",{}),m("span",{children:[t]})],["children",I.Children.toArray(Array.from(n))])]))))}function ky(e,t,n){let r;return Wr(m("td",D(k([["className",ae(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=Ie(A(()=>{let o;return B(E(m("div",D(k([["className",ae(" ",["font-medium"])],(o=[m("span",{children:[e]})],["children",I.Children.toArray(Array.from(o))])])))),A(()=>{let s;return B((s=t,s==null?E(he()):E(m("span",{children:["Legal Entity: "+s]}))),A(()=>{const i=n;if(i==null)return E(he());{const a=i;return B(E(m("br",{})),A(()=>E(m("span",{children:["ABN: "+a]}))))}}))}))})),["children",I.Children.toArray(Array.from(r))])]))))}function Ay(e){return Wr(m("td",{className:ae(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function Ey(e,t,n,r){let o;return Wr(m("td",D(k([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(o=Ie(A(()=>B(E(m("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),A(()=>{let s,i;return B((s=r,s==null?E(he()):(i=s,B(E(m("br",{})),A(()=>E(m("span",{children:[`Channel ID: ${i}`]})))))),A(()=>{const a=n;if(a==null)return E(he());{const l=a;return B(E(m("br",{})),A(()=>E(m("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",I.Children.toArray(Array.from(o))])]))))}function Iy(e,t,n){const r=jt(n.AccountId);return Ie(A(()=>{let o;return B(E(Ey(Qn($o((o=[e,r],new J(8,[o[0],o[1]]))),1),n.AccountId,n.ExternalId,n.ChannelId)),A(()=>B(E(ky(n.Name,n.BusinessName,n.BusinessNumber)),A(()=>B(t.ReadProtectedData?E(Sy(Ye(n.Contact,""),Ye(n.ContactMobilePhone,""))):Et(),A(()=>E(Ay(n.Website))))))))}))}class Ty extends ie{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Zf extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Jf extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function Ny(e){let t;return m("thead",{className:"bg-gray-50",children:(t=De(Gf,e),m("tr",{children:I.Children.toArray(Array.from(t))}))})}function My(e,t){let n;return m("tr",D(k([["className",e%2===0?"bg-white":"bg-gray-50"],(n=De(qf,t),["children",I.Children.toArray(Array.from(n))])])))}function Ry(e,t,n,r,o,s){let i,a,l,c,d,u,h;const f=t!=null&&n!=null?(i=t|0,a=n|0,Ie(A(()=>B(E("Showing "),A(()=>B(E(m("span",{className:"font-medium",children:`${i}`})),A(()=>B(E(" to "),A(()=>B(E(m("span",{className:"font-medium",children:`${a}`})),A(()=>B(E(" of "),A(()=>r.tag===1?ee(" many"):k([m("span",{className:"font-medium",children:dt(r.fields[0])})," results"])))))))))))))):ee(he()),p=Ie(A(()=>{let b,$;return B((b=s,b==null?E(he()):($=b,E(m("a",{className:ae(" ",["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:$,children:"Previous "})))),A(()=>{const v=o;if(v==null)return E(he());{const y=v;return E(m("a",{className:ae(" ",["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:y,children:" Next"}))}}))}));return m("tfoot",D(k([["className",ae(" ",["w-full"])],(l=[m("tr",D(ee((c=[m("td",D(k([["colSpan",e],(d=[m("nav",D(k([["className",ae(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[m("div",D(k([["className",ae(" ",["hidden","sm:block"])],(h=[m("p",{className:ae(" ",["text-sm","text-gray-700"]),children:I.Children.toArray(Array.from(f))})],["children",I.Children.toArray(Array.from(h))])]))),m("div",{className:ae(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:I.Children.toArray(Array.from(p))})],["children",I.Children.toArray(Array.from(u))])])))],["children",I.Children.toArray(Array.from(d))])])))],["children",I.Children.toArray(Array.from(c))]))))],["children",I.Children.toArray(Array.from(l))])])))}function Oy(e,t){const n=Yn(1),r=n[1],o=n[0]|0;return[o,s=>{if(o===e){if(t!=null){const i=t;xl(Ut("Calling Load")),i(),r(o+1)}}else r(o+1)},s=>{r(o-1)}]}function Py(e){let t,n,r,o,s;const i=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Rp(a,i.Data),u=Oy(vr(d),i.LoadNext),h=u[0]|0,f=u[1];let p;const b=Ip(h-1,d);p=b==null?new Zf(1,[]):new Zf(0,[b]);const $=vr(i.Data)|0,v=i.LoadNext==null?new Jf(0,[$]):new Jf(1,[]),y=p.tag===1?void 0:$>=1?(h-1)*a+1:void 0,C=p.tag===1?void 0:$>=1?(h-1)*a+vr(p.fields[0]):void 0,R=h===1?void 0:u[2],L=h===vr(d)?i.LoadNext!=null?f:void 0:h<vr(d)?f:void 0;return m("div",D(k([["className","flex flex-col mt-4"],(t=[m("div",D(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[m("div",D(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[m("div",D(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[m("table",D(k([["className","min-w-full divide-y divide-gray-200"],(s=Ie(A(()=>B(E(Ny(c)),A(()=>{let X,$e;return B((X=p,X.tag===1?E(he()):E(($e=$i(My,l(X.fields[0])),m("tbody",{children:I.Children.toArray(Array.from($e))})))),A(()=>E(Ry(vr(c),y,C,v,L,R))))})))),["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function Ln(e){const t=e.error,n=ee(m("span",{children:[t]}));return m("div",{children:I.Children.toArray(Array.from(n))})}function Fs(){const e=ee(m("span",{children:["Please wait..."]}));return m("div",{children:I.Children.toArray(Array.from(e))})}function Dy(e){let t,n,r,o,s,i;const a=Jn(On),l=F1({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=bs(()=>ws(B1,(C,R)=>U1(l,C,R),(C,R)=>{}),void 0,void 0),d=c[0],u=c[1],h=new ta(d.SearchText,d.Sort,d.PageSize);Ji((t=[()=>L1(l,h),C=>{u(new or(2,[C]))}],Ru(t[0],t[1])));const f=C=>{u(new or(4,[]))},p=d.Data;let b,$,v,y;switch(p.tag){case 0:case 1:{b=2;break}case 3:{b=3,y=p.fields[0];break}default:p.fields[0].tag===1?(b=1,v=p.fields[0].fields[0]):(b=0,$=p.fields[0].fields[0])}switch(b){case 0:{const C=k([m("div",D(k([["className",ae(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=Ie(A(()=>{let R;return B(E(m("div",D(k([["className",ae(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(R=[Wd(Hu(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",L=>{u(new or(0,[L]))},f),z1(f)],["children",I.Children.toArray(Array.from(R))])])))),A(()=>e.accountProvisioningMode.tag===0?E(he()):E(m($y,{partnerId:e.partnerId}))))})),["children",I.Children.toArray(Array.from(n))])]))),(r=$,o=Ie(A(()=>B(E(Cy(d,u)),A(()=>B(E(xy(d,u)),A(()=>B(a.Roles.ReadProtectedData?E(fr("Contact")):Et(),A(()=>E(fr("Website")))))))))),s=new Ty(r.Accounts,zt(R=>()=>{Mr(V1(l)(h)(R)(u))},r.Token)),i=Wu(d.PageSize)|0,m(Py,{columnHeaders:o,renderRowCells:R=>Wn(L=>Iy(e.partnerId,a.Roles,L),R),pageSize:i,data:s}))]);return m("div",{children:I.Children.toArray(Array.from(C))})}case 1:return m(Ln,{error:v});case 2:return m(Fs,null);default:{const C=dt(y);return m(Ln,{error:C})}}}let Vs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Yf(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=so(i=>i,[new Vs(1,[t]),new Vs(0,[n]),new Vs(2,[fn(o)]),zt(i=>new Vs(3,[hn(i)]),r)]);return m("superhero-super-configuration",In(s,1))}let Ls=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Xf(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=so(i=>i,[new Ls(1,[t]),new Ls(0,[n]),new Ls(2,[fn(o)]),zt(i=>new Ls(3,[hn(i)]),r)]);return m("superhero-benefits-onboarding-configuration",In(s,1))}let Bs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Qf(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=so(i=>i,[new Bs(1,[t]),new Bs(0,[n]),new Bs(2,[fn(o)]),zt(i=>new Bs(3,[hn(i)]),r)]);return m("superhero-bank-details",In(s,1))}let Us=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function eh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=so(i=>i,[new Us(1,[t]),new Us(0,[n]),new Us(2,[fn(o)]),zt(i=>new Us(3,[hn(i)]),r)]);return m("superhero-profile-directory-app",In(s,1))}let zs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function th(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,o=e.backendUrl,s=so(i=>i,[new zs(1,[r]),new zs(0,[o]),new zs(2,[fn(n)]),zt(i=>new zs(3,[hn(i)]),t)]);return m("workspace-account-registry-app",In(s,1))}let Sn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Appear","Show","ClassName","Enter","EnterFrom","EnterTo","Leave","LeaveFrom","LeaveTo","Children"]}};function Fy(e){const t=In(e,1);return m(cy,t)}function js(e,t){let n;return m("div",D(k([["className","px-4 py-4 sm:px-0"],(n=[m("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),Ye(zt(r=>m("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),he())],["children",I.Children.toArray(Array.from(n))])])))}function Qe(e,t){let n;return m("div",D(k([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[m("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),m("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",I.Children.toArray(Array.from(n))])])))}function za(e){let t,n;const r=e.value,o=e.label,s=Yn(!1),i=s[0],a=s[1];return a0(()=>{Mr(W.Delay(()=>i?W.Bind(y0(2e3),()=>(a(!1),W.Zero())):W.Zero()))}),m("div",D(k([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[m("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:o}),m("dd",D(k([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[Fy(k([new Sn(3,["absolute bottom-8 flex flex-row bg-gray-900 items-start w-[69px] h-8 shadow-md px-3 py-2 rounded-md"]),new Sn(2,[i]),new Sn(4,["transition-opacity ease-in duration-100"]),new Sn(5,["opacity-0"]),new Sn(6,["opacity-90"]),new Sn(7,["transition-opacity ease-out duration-500"]),new Sn(8,["opacity-90"]),new Sn(9,["opacity-0"]),new Sn(10,[[m("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),m("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",I.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",I.Children.toArray(Array.from(t))])])))}function Hs(e,t){let n;const r=k([e,m("div",D(k([["className","mt-2 border-b border-gray-200"],(n=[m("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:I.Children.toArray(Array.from(t))})],["children",I.Children.toArray(Array.from(n))])])))]);return m("div",{children:I.Children.toArray(Array.from(r))})}function Vy(e){const t=Jn(On);return Hs(js("Partner Information",void 0),Ie(A(()=>{let n;return B(E((n=["ID",kr(e.StreamId)],m(za,{label:n[0],value:n[1]}))),A(()=>{let r;return B(E((r=["Name",ss(e.Name)],Qe(r[0],r[1]))),A(()=>{let o,s,i;return B(t.Roles.ReadProtectedData?(o=e.ContactDetails,o!=null?(s=o,B(E((i=["Contact",`${oc(s.FirstName)} ${ic(s.LastName)}`],Qe(i[0],i[1]))),A(()=>{let a;return E((a=["Phone",cc(s.MobilePhone)],Qe(a[0],a[1])))}))):Et()):Et(),A(()=>{let a;return B(E((a=["Website",nc(e.Website)],Qe(a[0],a[1]))),A(()=>{let l;return E((l=["Notes",Ye(Jm(e.Notes),"")],Qe(l[0],l[1])))}))}))}))}))})))}let hr=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class Ly extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class By extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Uy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class zy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class jy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Hy(e){switch(e.tag){case 1:return"Accounts";case 2:return"Super";case 3:return"Benefits";case 4:return"Bank Details";case 5:return"Directory";case 6:return"Workspace";default:return"Details"}}function Wy(e){switch(e.tag){case 1:return e.fields[0].partnerId;case 2:return e.fields[0].PartnerId;case 3:return e.fields[0].PartnerId;case 4:return e.fields[0].PartnerId;case 5:return e.fields[0].PartnerId;case 6:return e.fields[0].PartnerId;default:return st(kr(e.fields[0].StreamId))}}function Gy(e){const t=Wn(n=>zd(Hy(e),n[0],Qn($o(n[1](Wy(e))),1)),k([["Details",n=>new J(1,[n])],["Accounts",n=>new J(3,[n])],["Super",n=>new J(4,[n])],["Benefits",n=>new J(5,[n])],["Bank Details",n=>new J(6,[n])],["Directory",n=>new J(2,[n])]]));return m(jd,{headers:t})}function qy(e){switch(e.tag){case 1:return m(Dy,e.fields[0]);case 2:return m(Yf,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return m(Xf,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return m(Qf,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return m(eh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return m(th,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return m(Vy,e.fields[0])}}function nh(e){let t;const n=e.mode;return m("div",D(k([["className","flex flex-row"],(t=[Gy(n),qy(n)],["children",I.Children.toArray(Array.from(t))])])))}let Ws=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function Ky(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=A(()=>B(E(new Ws(1,[t])),A(()=>B(E(new Ws(0,[n])),A(()=>B(E(new Ws(2,[ts(o)])),A(()=>E(new Ws(3,[ns(r)])))))))));return m("superhero-import-app",In(s,1))}class ja extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function Zy(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=A(()=>B(E(new ja(1,[t])),A(()=>B(E(new ja(0,[n])),A(()=>E(new ja(2,[ns(r)])))))));return m("superhero-salpac-profile-admin",In(o,1))}function Jy(e){const t=Jn(On);return Hs(js("Account Information",void 0),Ie(A(()=>{let n;return B(E((n=["ID",e.StreamId],m(za,{label:n[0],value:n[1]}))),A(()=>{let r;return B(E((r=["Name",e.Name],m(za,{label:r[0],value:r[1]}))),A(()=>{let o;return B(E((o=["External ID",Ye(e.ExternalId,"")],Qe(o[0],o[1]))),A(()=>{let s;return B(E((s=["Channel ID",Ye(e.ChannelId,"")],Qe(s[0],s[1]))),A(()=>{let i;if(t.Roles.ReadProtectedData){const a=e.ContactDetails;if(a!=null){const l=a;return B(E((i=["Contact",`${l.FirstName} ${l.LastName}`],Qe(i[0],i[1]))),A(()=>{let c;return B(E((c=["Phone",l.MobilePhone],Qe(c[0],c[1]))),A(()=>{let d;return E((d=["Email",l.Email],Qe(d[0],d[1])))}))}))}else return Et()}else return Et()}))}))}))}))})))}function Yy(e){let t,n,r,o,s,i,a;if(e==null)return he();{const l=e;return Hs(js("Legal Entity",void 0),k([(t=["Business Name",l.BusinessName],Qe(t[0],t[1])),(n=["Business Number",l.BusinessNumber],Qe(n[0],n[1])),(r=["Address Line 1",l.Address1],Qe(r[0],r[1])),(o=["Address Line 2",Ye(l.Address2,"")],Qe(o[0],o[1])),(s=["City",l.City],Qe(s[0],s[1])),(i=["State",Ye(l.State,"")],Qe(i[0],i[1])),(a=["Postcode",l.Postcode],Qe(a[0],a[1]))]))}}function Xy(e){let t;if(e==null)return he();{const n=e;return Hs(js("Legal Entity",void 0),ee((t=["Notes",n],Qe(t[0],t[1]))))}}function Qy(e){const t=k([m(Jy,e),Yy(e.LegalEntity),Xy(e.Notes)]);return m("div",{children:I.Children.toArray(Array.from(t))})}class Bn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Imports","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace"]}}function ev(e){switch(e.tag){case 1:return"Directory";case 2:return"Imports";case 3:return"Super";case 4:return"Benefits";case 5:return"Bank Details";case 6:return"Salary Packaging";case 7:return"Workspace";default:return"Details"}}function tv(e,t,n){const r=Wn(o=>zd(ev(n),o[0],Qn($o(o[1]([e,t])),1)),k([["Details",o=>new J(8,[o[0],o[1]])],["Workspace",o=>new J(15,[o[0],o[1]])],["Directory",o=>new J(9,[o[0],o[1]])],["Imports",o=>new J(10,[o[0],o[1]])],["Super",o=>new J(11,[o[0],o[1]])],["Benefits",o=>new J(12,[o[0],o[1]])],["Bank Details",o=>new J(13,[o[0],o[1]])],["Salary Packaging",o=>new J(14,[o[0],o[1]])]]));return m(jd,{headers:r})}function nv(e){const t=e.account,n=e.mode,r=e.props,o=Jn(On),s=r.accountDetails,i=s[0],a=s[1];switch(n.tag){case 1:return m(eh,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 2:return m(Ky,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 3:return m(Yf,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 4:return m(Xf,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 5:return m(Qf,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 6:return m(Zy,{accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 7:return m(th,{backendUrl:o.BackendUrl,accessToken:o.AccessToken,partnerId:i,accountId:a});default:{let l,c,d;switch(t.tag){case 0:case 1:{l=2;break}case 3:{l=3,d=t.fields[0];break}default:t.fields[0].tag===0?(l=0,c=t.fields[0].fields[0]):l=1}switch(l){case 0:return m(Qy,c);case 1:return m(Ln,{error:"There was an error retrieving account "});case 2:return m(Fs,null);default:{const u=dt(d);return m(Ln,{error:u})}}}}}function rv(e){let t,n;const r=e.account,o=e.mode,s=e.props;return m("div",D(k([["className","flex flex-row"],(t=[(n=s.accountDetails,tv(n[0],n[1],o)),m(nv,{props:s,mode:o,account:r})],["children",I.Children.toArray(Array.from(t))])])))}class Gr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let Gs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},qr=class extends ie{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function ov(){return[new qr(void 0,new Gr(0,[])),Le()]}function sv(e,t,n,r){switch(n.tag){case 1:{const o=r.AccountId;if(o!=null){const s=o;return[new qr(r.AccountId,new Gr(1,[])),kd(()=>s1(e,t,s),void 0,i=>new Gs(2,[i]),i=>new Gs(3,[i]))]}else return[new qr(r.AccountId,new Gr(3,["Account Id is required"])),Le()]}case 2:{const o=n.fields[0];return[new qr(r.AccountId,new Gr(2,[o])),Xe(s=>{ct(ee(`#/account-registry/partners/${o.PartnerId}/accounts/${o.AccountId}`),1,2)})]}case 3:return[new qr(r.AccountId,new Gr(3,["Account not found"])),Le()];default:return[new qr(jt(n.fields[0]),r.AccountDetails),Le()]}}const iv=m("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),av=m("div",D(k([["className","mt-2"],(()=>{let e;const t=[m("p",D(k([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
|
|
52
52
|
|
|
53
|
-
If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",T.Children.toArray(Array.from(t))]})()])));function iv(e){let t,n,r,o;return $("div",U(C([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[$("button",U(C([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[$("span",{className:"sr-only",children:"Close"}),$("svg",U(C([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(o=ie($("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",T.Children.toArray(Array.from(o))])])))],["children",T.Children.toArray(Array.from(r))])])))],["children",T.Children.toArray(Array.from(t))])])))}function av(e,t,n,r){let o,s,i;return $("div",U(C([["className","mt-5 sm:flex sm:items-center"],(o=[$("div",U(C([["className","w-full sm:max-w-xs"],(s=[$("label",{className:"sr-only",for:"account-id",children:"Account Id"}),$("input",U(Le(R(()=>G(P(["id","account-id"]),R(()=>G(P(["autoComplete","off"]),R(()=>{let a;return G(P((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),R(()=>G(P(["placeholder","Account Id"]),R(()=>G(P(["disabled",!n]),R(()=>G(P(["onChange",l=>{e(l.target.value)}]),R(()=>{const l=r;return l==null?Dt():P(["value",Hl(l)])}))))))))}))))))))],["children",T.Children.toArray(Array.from(s))])]))),$("button",U(C([["className",pe(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(i=Le(R(()=>P(n?$("span",{children:["Search"]}):$("span",{children:["Searching..."]})))),["children",T.Children.toArray(Array.from(i))]),["onClick",t],["disabled",!n]])))],["children",T.Children.toArray(Array.from(o))])])))}function lv(e){let t,n,r,o,s,i,a;const l=e.closeModal,c=lr(Gn),d=ys(()=>_s(nv,(g,v)=>rv(c.BackendUrl,c.AccessToken,g,v),(g,v)=>{}),void 0,void 0),u=d[0],h=d[1],f=av(g=>{h(new qs(0,[g]))},g=>{h(new qs(1,[]))},!Xe(u.AccountDetails,new eo(1,[])),u.AccountId);let p;const _=u.AccountDetails;return p=_.tag===3?$("div",{className:pe(" ",["mt-2 text-sm text-red-600"]),children:_.fields[0]}):xe(),$("div",U(C([["className","relative z-10"],["role",pe(" ",["dialog"])],(t=[$("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),$("div",U(C([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[$("div",U(C([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",l],(r=[$("div",U(C([(o="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",o]),["onClick",g=>{g.preventDefault(),g.stopPropagation()}],(s=[iv(l),$("div",U(C([["className","sm:flex sm:items-start"],(i=[$("div",U(C([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",T.Children.toArray([Yd])]]))),$("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:T.Children.toArray([ov,sv,f,p])})],["children",T.Children.toArray(Array.from(i))])])))],["children",T.Children.toArray(Array.from(s))])])))],["children",T.Children.toArray(Array.from(r))])])))],["children",T.Children.toArray(Array.from(n))])])))],["children",T.Children.toArray(Array.from(t))])])))}function cv(e,t){return Ll(n=>{const r=e.toLocaleLowerCase();return Yt(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:is(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function uv(e){const t=lr(Gn),n=Rp(c=>is(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:so}),r=Lr(n),o=Lr(""),s=Lr(!1),i=s[1],a=Le(R(()=>G(P(vr("ID")),R(()=>G(P(vr("Name")),R(()=>G(t.Roles.ReadProtectedData?G(P(vr("Contact")),R(()=>P(vr("Phone")))):Dt(),R(()=>P(vr("Website")))))))))),l=Le(R(()=>G(s[0]?P($(lv,{closeModal:c=>{i(!1)}})):P(xe()),R(()=>{let c;return G(P($("div",U(C([["className","flex items-end place-content-between"],(c=[Kd(o[0],"Partner ID or Name",d=>{o[1](d),r[1](cv(d,n))},()=>{}),$("button",{className:pe(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{i(!0)},children:T.Children.toArray(["Account Search ",Yd])})],["children",T.Children.toArray(Array.from(c))])])))),R(()=>P(vb(a,po(d=>{const u=Yt(d.StreamId),h=We(u);return Le(R(()=>{let f;return G(P((f=[M(E(new k(1,[h])),1),u],bb(f[0],f[1]))),R(()=>G(P(Fs(["text-gray-500"],is(d.Name))),R(()=>G(t.Roles.ReadProtectedData?G(P(Fs(["text-gray-500"],ot(Mt(p=>`${cc(p.FirstName)} ${dc(p.LastName)}`,d.ContactDetails),""))),R(()=>P(Fs(["text-gray-500"],ot(Mt(p=>pc(p.MobilePhone),d.ContactDetails),""))))):Dt(),R(()=>P(Fs(["text-gray-500"],ac(d.Website)))))))))}))},r[0])))))}))));return $("div",{children:T.Children.toArray(Array.from(l))})}const dv=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-8{bottom:2rem}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mb-px{margin-bottom:-1px}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-full{min-height:100%}.w-12{width:3rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-3{padding-left:.75rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-wider{letter-spacing:.05em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-1{outline-width:1px}.-outline-offset-1{outline-offset:-1px}.outline-gray-300{outline-color:#d1d5db}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-600:hover{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:outline-none:hover{outline:2px solid transparent;outline-offset:2px}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-2:focus{outline-width:2px}.focus\\:-outline-offset-2:focus{outline-offset:-2px}.focus\\:outline-indigo-600:focus{outline-color:#4f46e5}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,fv=_t(dv);function Ka(){return(Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var hv=["context","children"];function pv(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},l=Object.keys(r);for(i=0;i<l.length;i++)o.indexOf(s=l[i])>=0||(a[s]=r[s]);return a}(e,hv);return Di(t,n)}function $v(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=$(pv,Ka({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,l=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[ih(a[i].name)]=a[i].value);for(i=l.length;i--;){var c=t(l[i],null),d=l[i].slot;d?s[d]=$(ah,{name:d},c):o[i]=c}var u=r?$(ah,null,o):o;return $(r||n.nodeName.toLowerCase(),s,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Oi:zn)(this._vdom,this._root)}function ih(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function mv(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[ih(e)]=n,this._vdom=Di(this._vdom,r),zn(this._vdom,this._root)}}function gv(){zn(this._vdom=null,this._root)}function ah(e,t){var n=this;return $("slot",Ka({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function wv(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=$v,o.prototype.attributeChangedCallback=mv,o.prototype.disconnectedCallback=gv,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t,o)}function _v(e,t){wv(e,t,void 0,{shadow:!0})}class Lo extends he{constructor(t,n,r,o){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=o}}class Bo extends W{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners"]}}function yv(e){let t;const n=Xu(ju(window.location.hash,1)),r=n.tag===16?aa(new k(0,[])):Ge();return[new Lo(new Se(0,[]),ug(),n,(t=m1(e),t.tag===1?(Al(`Failed to decode jwt: ${t.fields[0]}`),mg):$g(t.fields[0]))),r]}function bv(e,t,n){switch(t.tag){case 1:{const r=t.fields[0],o=Nd(e,r,s=>new Bo(2,[r,new w(0,[s])]),s=>new Bo(2,[r,new w(1,["Failed to retrieve account name"])]));return[new Lo(n.Partners,Yu(n.Accounts,r,new Se(1,[])),n.CurrentPage,n.Roles),o]}case 2:return[new Lo(n.Partners,Yu(n.Accounts,t.fields[0],new Se(2,[t.fields[1]])),n.CurrentPage,n.Roles),Ge()];case 0:{const r=t.fields[0];return r.tag===16?[n,aa(r)]:[new Lo(n.Partners,n.Accounts,r,n.Roles),Ge()]}default:return[new Lo(t.fields[0],n.Accounts,n.CurrentPage,n.Roles),Ge()]}}function vv(e){let t,n,r,o;const s=yv(e.accessToken);o=ys(()=>_s(()=>s,(b,S)=>bv(D=>{const L=cg(D);return sw(e.backendUrl,e.accessToken,L[0],L[1])},b,S),(b,S)=>{}),void 0,void 0);const i=o[0],a=o[1];ea(Vu(()=>ow(e.backendUrl,e.accessToken),b=>{a(new Bo(3,[b]))}));const l=b=>{let S;const D=i.Partners;switch(D.tag){case 0:return new Se(0,[]);case 1:return new Se(1,[]);case 3:return new Se(3,[D.fields[0]]);default:return D.fields[0].tag===1?new Se(2,[new w(1,[cn(kl("Unknown partner: %A%P()",[b]))])]):new Se(2,[(S=ia(D.fields[0].fields[0],b),S==null?new w(1,[cn(kl("Unknown partner: %A%P()",[b]))]):new w(0,[S.Name]))])}},c=b=>$(Eo,{page:i.CurrentPage,partner:{Id:b,Name:l(b)}}),d=(b,S)=>{const D=$(sh,{mode:S});return[c(b),D]},u=(b,S)=>{let D,L,ne;const me=b[0],we=b[1];let ue,Q;const de=[me,we];Q=lg(de[0],de[1]),ue=Pl(dg(i.Accounts,Q),()=>(a(new Bo(1,[Q])),new Se(0,[])));let q;return q=$(tv,{props:{accountDetails:[me,we]},mode:S,account:ue}),[(D=[me,we,ue],L=D[0],$(Eo,(ne={Id:L,Name:l(L)},{account:{Id:D[1],Name:pg(ye=>jl(ye.Name),D[2])},page:i.CurrentPage,partner:ui(ne)}))),q]};let h;const f=i.Partners;let p,_,g,v;switch(f.tag){case 2:{f.fields[0].tag===1?(p=2,g=f.fields[0].fields[0]):(p=1,_=f.fields[0].fields[0]);break}case 3:{p=3,v=f.fields[0];break}default:p=0}switch(p){case 0:{h=[$(Vs,null),$(Vs,null)];break}case 1:{const b=i.CurrentPage;switch(b.tag){case 3:{const S=b.fields[0],D=c(S),L=ia(_,S);if(L==null)h=[D,$(Yn,{error:"Unknown Partner"})];else{const ne=L;h=d(S,new xr(1,[{accountProvisioningMode:ne.AccountProvisioningMode,partnerId:S}]))}break}case 4:{const S=b.fields[0];h=d(S,new xr(2,[new Bb(S,e.backendUrl,e.accessToken)]));break}case 5:{const S=b.fields[0];h=d(S,new xr(3,[new Ub(S,e.backendUrl,e.accessToken)]));break}case 6:{const S=b.fields[0];h=d(S,new xr(4,[new zb(S,e.backendUrl,e.accessToken)]));break}case 2:{const S=b.fields[0];h=d(S,new xr(5,[new jb(S,e.backendUrl,e.accessToken)]));break}case 7:{const S=b.fields[0];h=d(S,new xr(6,[new Hb(S,e.backendUrl,e.accessToken)]));break}case 8:{h=u([b.fields[0],b.fields[1]],new Xn(0,[]));break}case 9:{h=u([b.fields[0],b.fields[1]],new Xn(1,[]));break}case 10:{h=u([b.fields[0],b.fields[1]],new Xn(2,[]));break}case 11:{h=u([b.fields[0],b.fields[1]],new Xn(3,[]));break}case 12:{h=u([b.fields[0],b.fields[1]],new Xn(4,[]));break}case 13:{h=u([b.fields[0],b.fields[1]],new Xn(5,[]));break}case 14:{h=u([b.fields[0],b.fields[1]],new Xn(6,[]));break}case 15:{h=u([b.fields[0],b.fields[1]],new Xn(7,[]));break}case 0:case 16:{h=[$(Eo,{page:i.CurrentPage}),$(uv,{partnerList:_})];break}default:{const S=b.fields[0],D=c(S),L=ia(_,S);h=L==null?[D,$(Yn,{error:"Unknown Partner"})]:[D,(t=new xr(0,[L]),$(sh,{mode:t}))]}}break}case 2:{h=[$(Eo,{page:i.CurrentPage}),$(Yn,{error:g})];break}default:h=[$(Eo,{page:i.CurrentPage}),(n=_t(v),$(Yn,{error:n}))]}return h0(Gn,new Dw(i.Roles,e.backendUrl,e.accessToken),ie((r=C([$("style",{children:[fv]}),Q0({onUrlChanged:b=>{a(new Bo(0,[Xu(b)]))},application:$(Be,{},h[0],h[1])})]),$("div",{children:T.Children.toArray(Array.from(r))}))))}_v(e=>$(vv,e),"superhero-account-registry")})();
|
|
53
|
+
If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",I.Children.toArray(Array.from(t))]})()])));function lv(e){let t,n,r,o;return m("div",D(k([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[m("button",D(k([(n="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",["className",n]),["type","button"],["onClick",e],(r=[m("span",{className:"sr-only",children:"Close"}),m("svg",D(k([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(o=ee(m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(t))])])))}function cv(e,t,n,r){let o,s,i;return m("div",D(k([["className","mt-5 sm:flex sm:items-center"],(o=[m("div",D(k([["className","w-full sm:max-w-xs"],(s=[m("label",{className:"sr-only",for:"account-id",children:"Account Id"}),m("input",D(Ie(A(()=>B(E(["id","account-id"]),A(()=>B(E(["autoComplete","off"]),A(()=>{let a;return B(E((a="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6",["className",a])),A(()=>B(E(["placeholder","Account Id"]),A(()=>B(E(["disabled",!n]),A(()=>B(E(["onChange",l=>{e(l.target.value)}]),A(()=>{const l=r;return l==null?Et():E(["value",ns(l)])}))))))))}))))))))],["children",I.Children.toArray(Array.from(s))])]))),m("button",D(k([["className",ae(" ",["mt-3 inline-flex w-full items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","sm:ml-3 sm:mt-0 sm:w-auto","disabled:opacity-50"])],(i=Ie(A(()=>E(n?m("span",{children:["Search"]}):m("span",{children:["Searching..."]})))),["children",I.Children.toArray(Array.from(i))]),["onClick",t],["disabled",!n]])))],["children",I.Children.toArray(Array.from(o))])])))}function uv(e){let t,n,r,o,s,i,a;const l=e.closeModal,c=Jn(On),d=bs(()=>ws(ov,($,v)=>sv(c.BackendUrl,c.AccessToken,$,v),($,v)=>{}),void 0,void 0),u=d[0],h=d[1],f=cv($=>{h(new Gs(0,[$]))},$=>{h(new Gs(1,[]))},!He(u.AccountDetails,new Gr(1,[])),u.AccountId);let p;const b=u.AccountDetails;return p=b.tag===3?m("div",{className:ae(" ",["mt-2 text-sm text-red-600"]),children:b.fields[0]}):he(),m("div",D(k([["className","relative z-10"],["role",ae(" ",["dialog"])],(t=[m("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),m("div",D(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[m("div",D(k([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",l],(r=[m("div",D(k([(o="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6",["className",o]),["onClick",$=>{$.preventDefault(),$.stopPropagation()}],(s=[lv(l),m("div",D(k([["className","sm:flex sm:items-start"],(i=[m("div",D(k([(a="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10",["className",a]),["children",I.Children.toArray([Kd])]]))),m("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:I.Children.toArray([iv,av,f,p])})],["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function dv(e,t){return Pl(n=>{const r=e.toLocaleLowerCase();return kr(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:ss(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function fv(e){const t=Jn(On),n=Mp(c=>ss(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:Yr}),r=Yn(n),o=Yn(""),s=Yn(!1),i=s[1],a=Ie(A(()=>B(E(fr("ID")),A(()=>B(E(fr("Name")),A(()=>B(t.Roles.ReadProtectedData?B(E(fr("Contact")),A(()=>E(fr("Phone")))):Et(),A(()=>E(fr("Website")))))))))),l=Ie(A(()=>B(s[0]?E(m(uv,{closeModal:c=>{i(!1)}})):E(he()),A(()=>{let c;return B(E(m("div",D(k([["className","flex items-end place-content-between"],(c=[Wd(o[0],"Partner ID or Name",d=>{o[1](d),r[1](dv(d,n))},()=>{}),m("button",{className:ae(" ",["max-h-10 inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm","hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"]),type:"button",onClick:d=>{i(!0)},children:I.Children.toArray(["Account Search ",Kd])})],["children",I.Children.toArray(Array.from(c))])])))),A(()=>E(yy(a,Wn(d=>{const u=kr(d.StreamId),h=st(u);return Ie(A(()=>{let f;return B(E((f=[Qn($o(new J(1,[h])),1),u],_y(f[0],f[1]))),A(()=>B(E(Ds(["text-gray-500"],ss(d.Name))),A(()=>B(t.Roles.ReadProtectedData?B(E(Ds(["text-gray-500"],Ye(zt(p=>`${oc(p.FirstName)} ${ic(p.LastName)}`,d.ContactDetails),""))),A(()=>E(Ds(["text-gray-500"],Ye(zt(p=>cc(p.MobilePhone),d.ContactDetails),""))))):Et(),A(()=>E(Ds(["text-gray-500"],nc(d.Website)))))))))}))},r[0])))))}))));return m("div",{children:I.Children.toArray(Array.from(l))})}const hv=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-14{bottom:3.5rem}.bottom-8{bottom:2rem}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.order-none{order:0}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.max-h-60{max-height:15rem}.min-h-full{min-height:100%}.w-12{width:3rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[45px\\]{width:45px}.w-\\[480px\\]{width:480px}.w-\\[560px\\]{width:560px}.w-\\[69px\\]{width:69px}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-md{max-width:28rem}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\\[8\\.5px\\]{padding-top:8.5px;padding-bottom:8.5px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-3{padding-left:.75rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-wider{letter-spacing:.05em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black\\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\\:bg-indigo-600:hover{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:outline-none:hover{outline:2px solid transparent;outline-offset:2px}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:visible{visibility:visible}.group:hover .group-hover\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .group-focus\\:visible{visibility:visible}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:-mr-6{margin-right:-1.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:block{display:block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pl-6{padding-left:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:mr-0{margin-right:0}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,pv=dt(hv);function Ha(){return(Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var mv=["context","children"];function $v(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},l=Object.keys(r);for(i=0;i<l.length;i++)o.indexOf(s=l[i])>=0||(a[s]=r[s]);return a}(e,mv);return Mi(t,n)}function gv(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=m($v,Ha({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,l=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[rh(a[i].name)]=a[i].value);for(i=l.length;i--;){var c=t(l[i],null),d=l[i].slot;d?s[d]=m(oh,{name:d},c):o[i]=c}var u=r?m(oh,null,o):o;return m(r||n.nodeName.toLowerCase(),s,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Ni:Tn)(this._vdom,this._root)}function rh(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function wv(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[rh(e)]=n,this._vdom=Mi(this._vdom,r),Tn(this._vdom,this._root)}}function bv(){Tn(this._vdom=null,this._root)}function oh(e,t){var n=this;return m("slot",Ha({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function _v(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=gv,o.prototype.attributeChangedCallback=wv,o.prototype.disconnectedCallback=bv,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t,o)}function yv(e,t){_v(e,t,void 0,{shadow:!0})}class Mo extends ie{constructor(t,n,r,o){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=o}}class Ro extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners"]}}function vv(e){let t;const n=qu(Vu(window.location.hash,1)),r=n.tag===16?ra(new J(0,[])):Le();return[new Mo(new pe(0,[]),cg(),n,(t=mw(e),t.tag===1?(xl(`Failed to decode jwt: ${t.fields[0]}`),mg):pg(t.fields[0]))),r]}function xv(e,t,n){switch(t.tag){case 1:{const r=t.fields[0],o=kd(e,r,s=>new Ro(2,[r,new w(0,[s])]),s=>new Ro(2,[r,new w(1,["Failed to retrieve account name"])]));return[new Mo(n.Partners,Gu(n.Accounts,r,new pe(1,[])),n.CurrentPage,n.Roles),o]}case 2:return[new Mo(n.Partners,Gu(n.Accounts,t.fields[0],new pe(2,[t.fields[1]])),n.CurrentPage,n.Roles),Le()];case 0:{const r=t.fields[0];return r.tag===16?[n,ra(r)]:[new Mo(n.Partners,n.Accounts,r,n.Roles),Le()]}default:return[new Mo(t.fields[0],n.Accounts,n.CurrentPage,n.Roles),Le()]}}function Cv(e){let t,n,r,o;const s=vv(e.accessToken);o=bs(()=>ws(()=>s,(y,C)=>xv(R=>{const L=lg(R);return o1(e.backendUrl,e.accessToken,L[0],L[1])},y,C),(y,C)=>{}),void 0,void 0);const i=o[0],a=o[1];Ji(Ru(()=>r1(e.backendUrl,e.accessToken),y=>{a(new Ro(3,[y]))}));const l=y=>{let C;const R=i.Partners;switch(R.tag){case 0:return new pe(0,[]);case 1:return new pe(1,[]);case 3:return new pe(3,[R.fields[0]]);default:return R.fields[0].tag===1?new pe(2,[new w(1,[Qt(vl("Unknown partner: %A%P()",[y]))])]):new pe(2,[(C=na(R.fields[0].fields[0],y),C==null?new w(1,[Qt(vl("Unknown partner: %A%P()",[y]))]):new w(0,[C.Name]))])}},c=y=>m(yo,{page:i.CurrentPage,partner:{Id:y,Name:l(y)}}),d=(y,C)=>{const R=m(nh,{mode:C});return[c(y),R]},u=(y,C)=>{let R,L,X;const $e=y[0],_e=y[1];let ue,Y;const de=[$e,_e];Y=ag(de[0],de[1]),ue=Tl(ug(i.Accounts,Y),()=>(a(new Ro(1,[Y])),new pe(0,[])));let G;return G=m(rv,{props:{accountDetails:[$e,_e]},mode:C,account:ue}),[(R=[$e,_e,ue],L=R[0],m(yo,(X={Id:L,Name:l(L)},{account:{Id:R[1],Name:hg(Se=>Ll(Se.Name),R[2])},page:i.CurrentPage,partner:ai(X)}))),G]};let h;const f=i.Partners;let p,b,$,v;switch(f.tag){case 2:{f.fields[0].tag===1?(p=2,$=f.fields[0].fields[0]):(p=1,b=f.fields[0].fields[0]);break}case 3:{p=3,v=f.fields[0];break}default:p=0}switch(p){case 0:{h=[m(Fs,null),m(Fs,null)];break}case 1:{const y=i.CurrentPage;switch(y.tag){case 3:{const C=y.fields[0],R=c(C),L=na(b,C);if(L==null)h=[R,m(Ln,{error:"Unknown Partner"})];else{const X=L;h=d(C,new hr(1,[{accountProvisioningMode:X.AccountProvisioningMode,partnerId:C}]))}break}case 4:{const C=y.fields[0];h=d(C,new hr(2,[new Ly(C,e.backendUrl,e.accessToken)]));break}case 5:{const C=y.fields[0];h=d(C,new hr(3,[new By(C,e.backendUrl,e.accessToken)]));break}case 6:{const C=y.fields[0];h=d(C,new hr(4,[new Uy(C,e.backendUrl,e.accessToken)]));break}case 2:{const C=y.fields[0];h=d(C,new hr(5,[new zy(C,e.backendUrl,e.accessToken)]));break}case 7:{const C=y.fields[0];h=d(C,new hr(6,[new jy(C,e.backendUrl,e.accessToken)]));break}case 8:{h=u([y.fields[0],y.fields[1]],new Bn(0,[]));break}case 9:{h=u([y.fields[0],y.fields[1]],new Bn(1,[]));break}case 10:{h=u([y.fields[0],y.fields[1]],new Bn(2,[]));break}case 11:{h=u([y.fields[0],y.fields[1]],new Bn(3,[]));break}case 12:{h=u([y.fields[0],y.fields[1]],new Bn(4,[]));break}case 13:{h=u([y.fields[0],y.fields[1]],new Bn(5,[]));break}case 14:{h=u([y.fields[0],y.fields[1]],new Bn(6,[]));break}case 15:{h=u([y.fields[0],y.fields[1]],new Bn(7,[]));break}case 0:case 16:{h=[m(yo,{page:i.CurrentPage}),m(fv,{partnerList:b})];break}default:{const C=y.fields[0],R=c(C),L=na(b,C);h=L==null?[R,m(Ln,{error:"Unknown Partner"})]:[R,(t=new hr(0,[L]),m(nh,{mode:t}))]}}break}case 2:{h=[m(yo,{page:i.CurrentPage}),m(Ln,{error:$})];break}default:h=[m(yo,{page:i.CurrentPage}),(n=dt(v),m(Ln,{error:n}))]}return f0(On,new P1(i.Roles,e.backendUrl,e.accessToken),ee((r=k([m("style",{children:[pv]}),X0({onUrlChanged:y=>{a(new Ro(0,[qu(y)]))},application:m(Oe,{},h[0],h[1])})]),m("div",{children:I.Children.toArray(Array.from(r))}))))}yv(e=>m(Cv,e),"superhero-account-registry")})();
|