@flarehr/workflows-app 0.1.3111 → 0.1.3113

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.
@@ -806,7 +806,7 @@ Thoth.Json.Net only support the following enum types:
806
806
  - int
807
807
  - uint32
808
808
  If you can't use one of these types, please pass an extra decoder.
809
- `))(c);return m=>p(m)}}else if(Vu(r))if(Eo(r)){const f=ir(c=>xt(e,t,!1,c),Uu(r));return c=>p=>Array.isArray(p)?_t(m=>Gm(ar(m)),dh(0,f,c,p)):new h(1,[[c,new V(0,["an array",p])]])}else switch(ye(Fu(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=xt(e,t,!0,se(0,tt(r))),c=>p=>Cv(re(s),c,p);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=xt(e,t,!1,se(0,tt(r))),c=>p=>uh(re(i),c,p);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=xt(e,t,!1,se(0,tt(r))),c=>p=>Sv(re(o),c,p);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const c=xt(e,t,!1,se(0,tt(r))),p=xt(e,t,!1,se(1,tt(r)));let m;const $=y([g=>w=>Mv(re(c),re(p),g,w),(a=Av(re(c),re(p)),g=>w=>uh(re(a),g,w))]);return m=g=>w=>kv($,g,w),g=>w=>Iv(Ev,re(m),g,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const c=xt(e,t,!1,se(0,tt(r)));return p=>m=>{const $=ch(re(c),p,m);return $.tag===0?new h(0,[Tv($.fields[0])]):new h(1,[$.fields[0]])}}default:return mh(e,t,n,r)}else switch(l){case"System.Boolean":return f=>c=>gv(f,c);case"Microsoft.FSharp.Core.Unit":return f=>c=>$v(f,c);case"System.String":return f=>c=>th(f,c);case"System.Char":return f=>c=>mv(f,c);case"System.SByte":return nh;case"System.Byte":return rh;case"System.Int16":return sh;case"System.UInt16":return ih;case"System.Int32":return oh;case"System.UInt32":return ah;case"System.Double":return f=>c=>wv(f,c);case"System.Single":return f=>c=>yv(f,c);case"System.DateTime":return f=>c=>_v(f,c);case"System.DateTimeOffset":return f=>c=>vv(f,c);case"System.TimeSpan":return f=>c=>bv(f,c);case"System.Guid":return f=>c=>pv(f,c);case"System.Object":return f=>c=>new h(0,[c]);default:return mh(e,t,n,r)}else{const f=u;return c=>p=>f.contents(c)(p)}}function Ov(e){return cl({Compare:Ls})}function tn(e,t,n){const r=Te(t,new He(0,[]));return xt(Ov(),r,!1,e)}class Dv{constructor(t){this.magicLink=t,this.backendUrl=`${Vn}/workflows/public-backend/invites/${this.magicLink.InviteToken}`}}function Nv(e){return new Dv(e)}function Rv(e){return A.Delay(()=>{let t,n;const r=ws(e,(t=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/magic-link/validate`)),pn(new Zt(1,[(n=new S0(e.magicLink.MagicCode),$n(0,gn(U_(),new He(1,[]),void 0,void 0)(n)))]),t)));return A.Bind(r,s=>{const i=s;if(i.tag===1)return A.Return(new h(1,[i.fields[0]]));{let o;const a=i.fields[0];return o=a.statusCode===200?en(re(tn(J_(),new He(1,[]))),a.responseText):new h(1,["Unexpected response from backend"]),A.Return(o)}})})}function Lv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/magic-link/reissue`)),pn(new Zt(1,[(r=new k0(e.magicLink.MagicCode,t),$n(0,gn(Z_(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(e2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Bv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/one-time-code/issue`)),pn(new Zt(1,[(r=new x0(e.magicLink.MagicCode,t),$n(0,gn(t2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(i2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Vv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/one-time-code/validate`)),pn(new Zt(1,[(r=new I0(t),$n(0,gn(o2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(c2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Fv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/progress`)),pn(new Zt(1,[(r=new A0(e.magicLink.MagicCode,t),$n(0,gn(f2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(p2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function ws(e,t){return A.Delay(()=>{let n;const r=ps(t);return n=A.Bind(r,s=>A.Return(new h(0,[s]))),A.Bind(n,s=>{const i=s;if(i.tag===1)return A.Return(new h(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===429||o.statusCode>=500){let a;const l=$i(2e3);return a=A.Bind(l,u=>A.Return(new h(0,[u]))),A.Bind(a,u=>{const f=u;if(f.tag===1)return A.Return(new h(1,[f.fields[0]]));{const c=ps(t);return A.Bind(c,p=>A.Return(new h(0,[p])))}})}else return A.Return(new h(0,[o]))}})})}class Wv extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AuthCode"]}}function dl(e){return new Wv(e)}function jv(e){return e.fields[0]}class ph extends F{constructor(t,n,r,s,i,o){super(),this.id_token=t,this.access_token=n,this.expires_in=r,this.refresh_token=s,this.scope=i,this.token_type=o}}function hl(){return fe("Workflows.UI.Auth.Types.Credentials",[],ph,()=>[["id_token",G],["access_token",G],["expires_in",Fm],["refresh_token",X(G)],["scope",G],["token_type",G]])}let jn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SignIn","SignInWithCurrentAuth","NavigateToOnboarding"]}};function Uv(){return[new sl(de(),new q(0,[]),void 0,new b0(0,[new C0(void 0)])),E(e=>{e(new z(1,[new Se(0,[])]))})]}function zv(e,t,n,r,s){let i,o,a,l,u,f,c;const p=Nv(e);switch(r.tag){case 1:if(r.fields[0].tag===1){if(r.fields[0].fields[0].tag===1)return[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})];{let m;const $=r.fields[0].fields[0].fields[0].Outcome;switch($.tag){case 1:{const g=$.fields[0],w=g.OneTimeCodeOptionAvailable;m=g.IsInitialMagicLinkUsed?w?new z(0,[new q(1,[g.FirstName,new rl(1,[])])]):new z(0,[new q(1,[g.FirstName,new rl(0,[])])]):w?new z(3,[!1,new Se(0,[])]):new z(0,[new q(4,[])]);break}case 4:{m=new z(0,[new q(5,[])]);break}case 2:case 7:{m=new z(0,[new q(6,[new ie(2,[])])]);break}case 3:{m=new z(0,[new q(6,[new ie(4,[])])]);break}case 5:{m=new z(0,[new q(6,[new ie(3,[])])]);break}case 6:{m=new z(0,[new q(6,[new ie(1,[])])]);break}default:{const g=$.fields[0];g.IsInitialMagicLinkUsed?(n(dl(g.AuthCode)),m=new z(0,[new q(1,[g.FirstName,new rl(2,[])])])):m=new z(6,[g.AuthCode])}}return[new sl(r.fields[0].fields[0].fields[0].CssOverrides,s.Page,G_(r.fields[0].fields[0].fields[0].Outcome),Te(q_(r.fields[0].fields[0].fields[0].Outcome),s.JourneyType)),E(g=>{g(m)})]}}else return[s,St(m=>{qe(m)},()=>Rv(p),void 0,m=>new z(1,[new Se(1,[m])]),m=>new z(1,[new Se(1,[new h(1,[m.message])])]))];case 2:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(i=new z(0,[(o=r.fields[1].fields[0].fields[0].Outcome,o.tag===2?new q(2,[o.fields[0].MaskedEmail]):o.tag===1?new q(6,[new ie(2,[])]):o.tag===5?new q(6,[new ie(2,[])]):o.tag===3?new q(6,[new ie(4,[])]):o.tag===4?new q(6,[new ie(1,[])]):o.tag===6?new q(5,[]):o.tag===7?new q(6,[new ie(3,[])]):new q(2,[o.fields[0].MaskedEmail]))]),E(m=>{m(i)}))]:[s,St(m=>{qe(m)},m=>Lv(p,m),r.fields[0],m=>new z(2,[r.fields[0],new Se(1,[m])]),m=>new z(2,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 3:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(a=new z(0,[(l=r.fields[1].fields[0].fields[0].Outcome,l.tag===1?new q(4,[]):l.tag===2?new q(6,[new ie(0,[])]):l.tag===3?r.fields[0]?s.Page:new q(3,[l.fields[0].MaskedPhone]):l.tag===4?new q(6,[new ie(2,[])]):l.tag===7?new q(6,[new ie(2,[])]):l.tag===5?new q(6,[new ie(4,[])]):l.tag===6?new q(6,[new ie(1,[])]):l.tag===8?new q(5,[]):l.tag===9?new q(6,[new ie(3,[])]):r.fields[0]?s.Page:new q(3,[l.fields[0].MaskedPhone]))]),E(m=>{m(a)}))]:[s,St(m=>{qe(m)},m=>Bv(p,m),r.fields[0],m=>new z(3,[r.fields[0],new Se(1,[m])]),m=>new z(3,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 4:return r.fields[2].tag===1?r.fields[2].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(u=r.fields[2].fields[0].fields[0].Outcome,u.tag===1?u.fields[0].RemainingAttempts>0?(r.fields[1]({AttemptsRemaining:u.fields[0].RemainingAttempts}),te()):E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):u.tag===5?E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):u.tag===2?(r.fields[1]({}),te()):u.tag===3?(r.fields[1]({}),te()):u.tag===4?(r.fields[1]({}),te()):u.tag===6?E(m=>{m(new z(0,[new q(6,[new ie(4,[])])]))}):u.tag===7?E(m=>{m(new z(0,[new q(6,[new ie(1,[])])]))}):u.tag===8?E(m=>{m(new z(0,[new q(6,[new ie(2,[])])]))}):u.tag===9?E(m=>{m(new z(0,[new q(5,[])]))}):u.tag===10?E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):E(m=>{m(new z(6,[u.fields[0].AuthCode]))}))]:[s,St(m=>{qe(m)},m=>Vv(p,m),r.fields[0],m=>new z(4,[r.fields[0],r.fields[1],new Se(1,[m])]),m=>new z(4,[r.fields[0],r.fields[1],new Se(1,[new h(1,[m.message])])]))];case 5:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(f=(c=r.fields[1].fields[0].fields[0].Outcome,c.tag===1?new z(0,[new q(6,[new ie(2,[])])]):c.tag===4?new z(0,[new q(6,[new ie(2,[])])]):c.tag===2?new z(0,[new q(6,[new ie(4,[])])]):c.tag===3?new z(0,[new q(6,[new ie(1,[])])]):c.tag===5?new z(0,[new q(5,[])]):c.tag===6?new z(0,[new q(6,[new ie(0,[])])]):r.fields[0].tag===1?new z(3,[!1,new Se(0,[])]):r.fields[0].tag===2?new z(6,[void 0]):new z(2,[!1,new Se(0,[])])),E(m=>{m(f)}))]:[s,St(m=>{qe(m)},m=>Fv(p,m),r.fields[0].tag===1?!1:r.fields[0].tag===2,m=>new z(5,[r.fields[0],new Se(1,[m])]),m=>new z(5,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 6:return t(Be(dl,r.fields[0])),[s,te()];default:return[new sl(s.CssOverrides,r.fields[0],s.Branding,s.JourneyType),te()]}}function Hv(e,t,n,r){const s=oi(!1),i=Be(l=>d("span",{className:"font-semibold",children:`${l}`}),on(l=>l.CompanyName,t)),o=n.tag===1?`Hi, ${e}`:n.tag===2?`${e}, join your workplace benefits program`:`Welcome, ${e}`,a=ge(T(()=>{let l,u;return W((l=n,l.tag===1?_(Sc([])):l.tag===2?_(d("div",C(y([["className","sm:w-[700px]"],(u=[d("img",{src:"/workflows/app/app-invite/welcome.png"})],["children",b.Children.toArray(Array.from(u))])])))):_(Sc([]))),T(()=>W(_(An(o)),T(()=>{let f;return W(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(f=ge(T(()=>{let c;return n.tag===1?W(_(Te(i,d("span",{children:["Your employer"]}))),T(()=>W(_(d("span",{children:[" has requested additional information from you."]})),T(()=>_(d("p",{children:["Sign in to complete your information request."]})))))):n.tag===2?_((c="Your employer has partnered with Flare Benefits to give you exclusive access to savings and perks from Australia’s most-loved brands, plus special offers to help you save on bigger expenses like household utilities, health insurance and more.",d("p",{children:[c]}))):W(_(d("p",{children:["Congratulations on the new role!"]})),T(()=>{let p;return _((p=y([d("span",{children:["Sign in to complete your onboarding with "]}),Te(i,d("span",{children:["your employer"]})),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})))}))})),["children",b.Children.toArray(Array.from(f))])])))),T(()=>_(Go(void 0,()=>{s[1](!0),r()},s[0],[d("span",{children:[n.tag===1?"Sign in":n.tag===2?"Continue":"Sign in"]})]))))}))))}));return d(Me,{},...a)}function Gv(e,t){let n,r,s,i;const o=[gp([]),An("Check your inbox"),d("div",C(y([(n="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",n]),(r=[(s=y([d("span",{children:["We’ve sent a temporary access link to "]}),d("span",{className:"font-semibold",children:dc(e,"*","•")}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(s))})),d("p",{children:["Click the link to confirm your email address and sign in. The link is valid for 5 minutes."]})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","text-sm text-gray-900 whitespace-pre-wrap mt-10 sm:mt-14 space-y-4 leading-5"],(i=ge(T(()=>W(_(d("p",{children:["Can’t see the email? Check your spam folder."]})),T(()=>{const a=t;return a==null?_(ne()):_(si(a))})))),["children",b.Children.toArray(Array.from(i))])])))];return d(Me,{},...o)}let nn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ResendTimerTick","SignIn","IncorrectOneTimeCodeCallback","SetCodeInvalid","SetCodeInputValue","SetReissueLinkInProgress"]}},Un=class extends F{constructor(t,n,r,s,i,o){super(),this.AttemptsRemaining=t,this.CodeInvalid=n,this.CodeInputValue=r,this.ResendTimer=s,this.SignInInProgress=i,this.ReissueLinkInProgress=o}};function qv(){return[new Un(void 0,!1,"",void 0,!1,!1),te()]}function Yv(e,t,n){let r;switch(t.tag){case 1:{const s=Do(ea,n.CodeInputValue);return s.length===6?(e([Ho(s,511,!1,32),t.fields[0]]),[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,!0,n.ReissueLinkInProgress),te()]):[n,E(i=>{i(new nn(3,[!0]))})]}case 2:return[new Un(t.fields[0],n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),E(s=>{s(new nn(3,[!0]))})];case 3:{const s=t.fields[0];return[new Un(n.AttemptsRemaining,s,s?"":n.CodeInputValue,n.ResendTimer,!1,n.ReissueLinkInProgress),te()]}case 4:return[new Un(n.AttemptsRemaining,n.CodeInvalid,t.fields[0],n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),te()];case 5:return[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,!0),te()];default:{const s=Ka(a=>{qe(a)},()=>A.Delay(()=>A.Bind($i(1e3),()=>A.Return(void 0))),void 0,()=>new nn(0,[]));let i;const o=n.ResendTimer;return i=o!=null?o>0?(r=o|0,[r-1,s]):[void 0,te()]:[20,s],[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,i[0],n.SignInInProgress,n.ReissueLinkInProgress),i[1]]}}}function ji(e){e.target.id==="one-time-code-input"||e.key!=="Enter"&&document.getElementById("one-time-code-input").focus()}function Jv(){document.addEventListener("keypress",e=>{ji(e)}),document.addEventListener("paste",e=>{ji(e)})}const Zv={Dispose(){document.removeEventListener("keypress",e=>{ji(e)}),document.removeEventListener("paste",e=>{ji(e)})}};function Xv(e){const t=e.reissueLink,n=e.reissueOneTimeCode,r=e.validateOneTimeCode,s=e.maskedPhone,i=tl(()=>Oi(qv,(f,c)=>Yv(r,f,c),(f,c)=>{}),void 0,void 0),o=i[0],a=i[1];qo(()=>(Jv(),Zv),new Array(0));const l=()=>{a(new nn(1,[f=>{a(new nn(2,[f.AttemptsRemaining]))}]))},u=ge(T(()=>W(_($p([])),T(()=>W(_(An("Enter your security code")),T(()=>{let f,c,p;return W(_(d("div",C(y([(f="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",f]),(c=[(p=y([d("span",{children:["We’ve sent a security code to your mobile number ending in •••"]}),d("span",{className:"font-semibold",children:Do(ea,s)}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})),d("p",{children:["Enter your code to sign in."]})],["children",b.Children.toArray(Array.from(c))])])))),T(()=>{let m;return W(_(d("div",C(y([["className","mt-8 flex relative"],(m=ge(T(()=>{let $;return W(_(d("input",C(y([["className","absolute w-full h-full peer z-10 opacity-0"],["id","one-time-code-input"],["type","text"],["autoComplete","one-time-code"],["maxLength",6],["onClick",g=>{const w=g.target;w.selectionStart=o.CodeInputValue.length|0,w.selectionEnd=o.CodeInputValue.length|0,a(new nn(3,[!1]))}],["onChange",g=>{const w=Do(ea,g.target.value);a(new nn(4,[w])),w.length===6&&l()}],($=o.CodeInputValue,["ref",g=>{g!=null&&!O(g.value,$)&&(g.value=$)}])])))),T(()=>Cc(g=>{const w=Be(S=>S,pc(g,o.CodeInputValue.split(""))),v=Be(S=>S,pc(g-1,o.CodeInputValue.split("")));return _(d("div",{key:g,className:ve(" ",ge(T(()=>W(_("flex justify-center items-center text-xl w-10 h-12 rounded-md ring-inset ring-1 transition ease-in"),T(()=>W(o.CodeInvalid?_("ring-red-600"):_("ring-gray-400"),T(()=>W(_(g===2?"mr-4":g===5?"":"mr-2"),T(()=>w!=null||v!=null||g===0?_("peer-focus:ring-2 peer-focus:ring-primary-base"):cr()))))))))),children:Te(w,"")}))},d0(0,1,5))))})),["children",b.Children.toArray(Array.from(m))])])))),T(()=>{let $;return W(o.CodeInvalid?_(d("p",C(y([["className","w-[288px] text-red-600 mt-2 leading-5"],($=ge(T(()=>W(_("The code you entered is invalid"),T(()=>{let g;return W((g=o.AttemptsRemaining,g==null?_(ne()):_(`, you have ${g} attempts remaining`)),T(()=>W(_("."),T(()=>o.AttemptsRemaining==null?_(" Try again or click on the link below to resend the code."):_(ne())))))})))),["children",b.Children.toArray(Array.from($))])])))):cr(),T(()=>W(_(Go("sm:w-[288px] mt-6",l,o.SignInInProgress,[d("span",{children:["Continue"]})])),T(()=>{let g;return _(d("div",C(y([["className","mt-8 sm:mt-14 text-sm text-gray-900 whitespace-pre-wrap leading-5 space-y-4"],(g=ge(T(()=>{let w,v;return W((w=o.ResendTimer,w!=null?_(d("p",{children:[`Message sent. Wait ${w} seconds before trying again.`]})):_((v=y([d("span",{children:["Didn’t get the code? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:S=>{n(),a(new nn(0,[]))},children:"Resend message"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(v))})))),T(()=>{let S;return _((S=y([d("span",{children:["Still having trouble? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:N=>{o.ReissueLinkInProgress||(a(new nn(5,[])),t())},children:"Sign in with email instead"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(S))})))}))})),["children",b.Children.toArray(Array.from(g))])]))))}))))}))}))}))))));return d(Me,{},...u)}function Kv(e){const t=e.reissueLink,n=e.brandingOption,r=oi(!1),s=ge(T(()=>W(_(wp([])),T(()=>W(_(An("Access link timed-out")),T(()=>{let i,o;return W(_(d("div",C(y([(i="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",i]),(o=[d("p",{children:["Your 5-minute temporary access link has timed-out."]}),d("p",{children:["Get a new link to continue."]})],["children",b.Children.toArray(Array.from(o))])])))),T(()=>W(_(Go("mt-8 mb-8 sm:mb-14",()=>{r[1](!0),t()},r[0],[d("span",{children:["Get a new link"]})])),T(()=>{const a=n;return a==null?_(ne()):_(si(a))}))))}))))));return d(Me,{},...s)}function ml(e,t){const n=Te(on(s=>s.CompanyName,e),"your employer"),r=ge(T(()=>W(_(kc([])),T(()=>W(_(An("You’re all done")),T(()=>{let s;return W(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(s=[d("p",{children:[`Your ${t} is now complete and your pay information has now been submitted to ${n}.`]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(s))])])))),T(()=>{const i=e;return i==null?_(ne()):_(si(i))}))}))))));return d(Me,{},...r)}function $h(){let e,t,n,r,s,i,o,a,l;return d("div",C(y([["className","flex lg:min-w-[1024px] xl:min-w-[1280px] max-w-screen-xl justify-center"],(e=[d("div",C(y([["className","flex flex-col justify-center items-center"],(t=[kc([]),An("You’re all set!"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(n=[d("p",{children:["Access your exclusive benefits by downloading the Flare app."]}),d("div",C(y([["className","hidden lg:flex justify-center lg:py-8"],(r=[d("img",{className:"h-40",src:"/workflows/app/app-invite/qr.png"})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","flex items-center justify-center lg:hidden"],(s=[d("img",{className:"w-[280px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(s))])]))),d("p",C(y([["className","font-semibold pt-5 lg:pt-0"],(i=[d("span",{className:"lg:hidden",children:"Download the Flare App"}),d("span",{className:"hidden lg:block",children:"Scan to download"})],["children",b.Children.toArray(Array.from(i))])]))),d("p",{children:"Available on iOS and Android"})],["children",b.Children.toArray(Array.from(n))])]))),d("div",C(y([["className","flex space-x-6"],(o=[d("a",C(y([["href","https://apps.apple.com/us/app/flare/id1587276031"],["target","_blank"],["rel","noreferrer"],(a=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/app-store.png"})],["children",b.Children.toArray(Array.from(a))])]))),d("a",C(y([["href","https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits"],["target","_blank"],["rel","noreferrer"],(l=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/google-play.png"})],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(t))])]))),d("img",{className:"hidden lg:block w-[640px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(e))])])))}function Qv(e){switch(e.tag){case 1:return"information request";case 2:return"workflow";default:return"onboarding"}}function eb(e){const t=e.startAuthCodeExchangeBackground,n=e.navigateAuthCodeExchangePage,r=e.magicLink,s=tl(()=>Oi(Uv,(l,u)=>zv(r,n,t,l,u),(l,u)=>{}),void 0,void 0),i=s[0],o=s[1],a=ge(T(()=>W(Ie(l=>d("style",{children:[l]}),i.CssOverrides),T(()=>{const l=i.Page;switch(l.tag){case 1:return _(Hv(l.fields[0],i.Branding,i.JourneyType,()=>{o(new z(5,[l.fields[1],new Se(0,[])]))}));case 2:return _(Gv(l.fields[0],i.Branding));case 3:return _(d(Xv,{maskedPhone:l.fields[0],validateOneTimeCode:u=>{o(new z(4,[u[0],u[1],new Se(0,[])]))},reissueOneTimeCode:()=>{o(new z(3,[!0,new Se(0,[])]))},reissueLink:()=>{o(new z(2,[!0,new Se(0,[])]))}}));case 4:return _(d(Kv,{brandingOption:Gs(i.Branding),reissueLink:()=>{o(new z(2,[!1,new Se(0,[])]))}}));case 5:switch(i.JourneyType.tag){case 2:return _($h());default:return _(ml(i.Branding,Qv(i.JourneyType)))}case 6:return l.fields[0].tag===1?_(Wp()):l.fields[0].tag===0?_(d(Fp,{reissueMagicLink:()=>{o(new z(2,[!0,new Se(0,[])]))}})):l.fields[0].tag===5?_(li()):l.fields[0].tag===2?_(Pc(i.Branding)):l.fields[0].tag===3?_(jp(i.Branding)):_(Up(i.Branding));default:return _(Ip)}}))));return d(Me,{},...a)}function tb(e){let t,n,r;const s=e.startAuthCodeExchangeBackground,i=e.navigateAuthCodeExchangePage,o=e.inviteCode;return hr(()=>{un(0)}),d("div",C(y([(t="min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",C(y([["className","flex flex-col items-center justify-center sm:max-w-[640px]"],(r=ge(T(()=>{const a=g2(o);return a.tag===0?_(d(eb,{magicLink:a.fields[0],navigateAuthCodeExchangePage:i,startAuthCodeExchangeBackground:s})):_(Pc(void 0))})),["children",b.Children.toArray(Array.from(r))])]))),Xo],["children",b.Children.toArray(Array.from(n))])])))}class U extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Home","LegacyInvite","InviteV2","AuthCodeExchange","AuthCodeExchangeWithCurrentAuth","NotFound","LoggedOut"]}}function nb(e){let t,n,r;if(M(e))t=2;else if(k(e)==="workflows")if(M(P(e)))t=2;else switch(k(P(e))){case"app":{t=0,n=P(P(e));break}case"embed":{M(P(P(e)))?t=2:k(P(P(e)))==="v1.0"?(t=1,r=P(P(P(e)))):t=2;break}default:t=2}else t=2;switch(t){case 0:return new ua(1,[n]);case 1:return new ua(0,[r]);default:return new ua(2,[void 0])}}function rb(e){const t=mn(e);if(t!=null)return Be(r=>r[1],Xr(r=>r[0]==="code",t))}function gh(e){let t,n,r,s,i,o,a;const l=nb(e);switch(l.tag){case 1:return[M(l.fields[0])?M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):(t=mn(k(l.fields[0])),t!=null?M(t)?M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):k(t)[0]==="invite"?M(P(t))?M(P(l.fields[0]))?(n=k(t)[1],r=Uc(n),r.tag===1?new U(5,[]):new U(1,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[]))),new Ar(1,[])];case 2:return[new U(5,[]),new Ar(2,[])];default:return[M(l.fields[0])?new U(0,[]):M(P(l.fields[0]))?new U(0,[]):(o=rb(k(P(l.fields[0]))),o!=null?M(P(P(l.fields[0])))?(a=o,new U(3,[dl(a)])):new U(0,[]):new U(0,[])),new Ar(0,[])]}}let zn=class extends F{constructor(t,n,r){super(),this.CurrentPage=t,this.Credentials=n,this.AppMode=r}},wn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UrlChanged","NavigateAuthCodeExchangePage","NavigateAuthCodeExchangePageWithCurrentAuth","AuthMsg","StartAuthCodeExchangeBackground","DisplayLoggedOut"]}};function sb(){let e;return hr(()=>{un(0)}),d("div",C(y([["className","w-full sm:max-w-md mt-5 mx-1 text-center mx-auto"],(e=[d("h4",{className:"text-2xl",children:"You have been logged out of your onboarding due to inactivity"}),d("br",{}),d("p",{children:["To continue your onboarding, please find your onboarding invite email and click the link again."]})],["children",b.Children.toArray(Array.from(e))])])))}class ys extends Error{}ys.prototype.name="InvalidTokenError";function ib(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function ob(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return ib(t)}catch{return atob(t)}}function ab(e,t){if(typeof e!="string")throw new ys("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new ys(`Invalid token specified: missing part #${n+1}`);let s;try{s=ob(r)}catch(i){throw new ys(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ys(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}class ke extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function lb(e,t){switch(t.tag){case 1:return new ke(1,[]);case 3:return new ke(3,[t.fields[0]]);case 2:try{return new ke(2,[e(t.fields[0])])}catch(n){return new ke(3,[n])}default:return new ke(0,[])}}function ub(e,t){const n=Yo(hg());return Ec(()=>es(()=>{mg(n.current)})),Tc(r=>{pg(n.current)||fa(A.Delay(()=>A.TryWith(A.Delay(()=>(t(new ke(1,[])),A.Bind(e(r),s=>(t(new ke(2,[s])),A.Zero())))),s=>(t(new ke(3,[s])),A.Zero()))),n.current)})}function cb(e,t,n){e:for(;;){const r=e,s=t,i=n;if(M(i)){const o=r;return o.tag===1?new h(1,[o.fields[0]]):new h(0,[lr(o.fields[0])])}else{let o;const a=s(k(i));if(a.tag===1)o=new h(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new h(1,[l.fields[0]]):new h(0,[Qe(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=P(i);continue e}}}function fb(e,t){return cb(new h(0,[de()]),e,t)}function Pr(e){return fb(t=>t,e)}class db extends F{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function hb(){return fe("Workflows.Business.Aggregates.CommonDto.InviteBrandingDto",[],db,()=>[["CompanyName",X(G)],["Logo",X(G)],["Support",X(pb())]])}class mb extends F{constructor(t,n){super(),this.Email=t,this.Phone=n}}function pb(){return fe("Workflows.Business.Aggregates.CommonDto.SupportDto",[],mb,()=>[["Email",X(G)],["Phone",X(G)]])}function $b(e){let t;const n=e.Email;if(n!=null){const r=Gc(n);t=r.tag===1?new h(1,[r.fields[0]]):new h(0,[r.fields[0]])}else t=new h(0,[void 0]);if(t.tag===1)return new h(1,[t.fields[0]]);{let r;const s=e.Phone;if(s!=null){const i=qc(s);r=i.tag===1?new h(1,[i.fields[0]]):new h(0,[i.fields[0]])}else r=new h(0,[void 0]);return r.tag===1?new h(1,[r.fields[0]]):new h(0,[new Hc(t.fields[0],r.fields[0])])}}function gb(e){let t;const n=e.Logo;if(n!=null){const r=Jc(n);t=r.tag===1?new h(1,[r.fields[0]]):new h(0,[r.fields[0]])}else t=new h(0,[void 0]);if(t.tag===1)return new h(1,[t.fields[0]]);{let r;const s=e.CompanyName;if(s!=null){const i=Yc(s);r=i.tag===1?new h(1,[i.fields[0]]):new h(0,[i.fields[0]])}else r=new h(0,[void 0]);if(r.tag===1)return new h(1,[r.fields[0]]);{let i;const o=e.Support;if(o!=null){const a=$b(o);i=a.tag===1?new h(1,[a.fields[0]]):new h(0,[a.fields[0]])}else i=new h(0,[void 0]);return i.tag===1?new h(1,[i.fields[0]]):new h(0,[new zc(r.fields[0],t.fields[0],i.fields[0])])}}}class wb extends F{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.NumberOfAttempts=r|0,this.DateOfLastAttempt=s}}function yb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.SecondFactorDto",[],wb,()=>[["Code",G],["DateIssued",zt("System.DateTime")],["NumberOfAttempts",Hs],["DateOfLastAttempt",X(zt("System.DateTime"))]])}function _b(e){return new v$(_$(e.Code),e.DateIssued,e.NumberOfAttempts,e.DateOfLastAttempt)}class vb extends F{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.SecondFactor=r,this.Branding=s}}function bb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.InviteDto",[],vb,()=>[["Code",G],["DateIssued",zt("System.DateTime")],["SecondFactor",X(yb())],["Branding",X(hb())]])}function Cb(e){const t=Uc(e.Code);if(t.tag===1)return new h(1,[t.fields[0]]);{let n;const r=e.SecondFactor;n=r==null?void 0:_b(r);let s;const i=e.Branding;if(i!=null){const o=gb(i);s=o.tag===1?new h(1,[o.fields[0]]):new h(0,[o.fields[0]])}else s=new h(0,[void 0]);return s.tag===1?new h(1,[s.fields[0]]):new h(0,[new b$(t.fields[0],e.DateIssued,n,s.fields[0])])}}class Sb extends F{constructor(t,n,r){super(),this.Id=t,this.DisplayName=n,this.ComponentTagName=r}}function kb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessStepConfigDto",[],Sb,()=>[["Id",G],["DisplayName",G],["ComponentTagName",G]])}function xb(e){return new h(0,[new Dt(Zc(e.Id),e.DisplayName,e.ComponentTagName)])}function Ib(e){return Pr(et(xb,e))}class Ab extends F{constructor(t,n){super(),this.ActivatedDates=t,this.CompletedSteps=n}}function Eb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ActiveProcessInstanceDto",[],Ab,()=>[["ActivatedDates",sn(zt("System.DateTime"))],["CompletedSteps",sn(Bm(G,zt("System.DateTime")))]])}function Tb(e){const t=Pr(et(n=>new h(0,[[Zc(n[0]),n[1]]]),e.CompletedSteps));return t.tag===1?new h(1,[t.fields[0]]):new h(0,[new mf(e.ActivatedDates,t.fields[0])])}class Pb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Inactive","Active","Complete","Abandoned"]}}function Mb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceStatusDto",[],Pb,()=>[[],[["Item",Eb()]],[["Item",zt("System.DateTime")]],[["Item",zt("System.DateTime")]]])}function Ob(e){switch(e.tag){case 1:{const t=Tb(e.fields[0]);return t.tag===1?new h(1,[t.fields[0]]):new h(0,[new ss(1,[t.fields[0]])])}case 2:return new h(0,[new ss(2,[e.fields[0]])]);case 3:return new h(0,[new ss(3,[e.fields[0]])]);default:return new h(0,[new ss(0,[])])}}class Db extends F{constructor(t,n,r){super(),this.Id=t,this.Name=n,this.Steps=r}}function Nb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessConfigDto",[],Db,()=>[["Id",zt("System.Guid")],["Name",G],["Steps",sn(kb())]])}function Rb(e){const t=Ib(e.Steps);if(t.tag===1)return new h(1,[t.fields[0]]);{const n=x$(e.Id);return n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Le(n.fields[0],e.Name,t.fields[0])])}}class Lb extends F{constructor(t,n){super(),this.Name=t,this.Value=n}}function Bb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.TagDto",[],Lb,()=>[["Name",G],["Value",G]])}function Vb(e){return O$(e.Name,e.Value)}class Fb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WhenEnabled","Always"]}}function Wb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.BenefitsOnboardingShowOptionsDto",[],Fb,()=>[[],[]])}class jb extends F{constructor(t){super(),this.BenefitsOnboarding=t}}function Ub(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.StepsConfigurationDto",[],jb,()=>[["BenefitsOnboarding",X(Ke(["Show",Wb()]))]])}function zb(e){let t,n;return new N$((t=e.BenefitsOnboarding,t==null?void 0:(n=t,{Show:n.Show.tag===1?new gf(1,[]):new gf(0,[])})))}class Hb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Default","InfoRequest","AppInvite","BenefitsExisting","BenefitsOnboarding"]}}function Gb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDto",[],Hb,()=>[[["Item",_s()]],[["Item",_s()]],[["Item",_s()]],[["Item",_s()]],[["Item",_s()]]])}class qb extends F{constructor(t){super(),this.Category=t}}function _s(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDetailsDto",[],qb,()=>[["Category",X(G)]])}function vs(e){return new $f(e.Category)}function Yb(e){if(e==null)return new pr(0,[new $f(void 0)]);switch(e.tag){case 1:{const t=e.fields[0];return new pr(1,[vs(t)])}case 2:{const t=e.fields[0];return new pr(2,[vs(t)])}case 3:{const t=e.fields[0];return new pr(3,[vs(t)])}case 4:{const t=e.fields[0];return new pr(4,[vs(t)])}default:{const t=e.fields[0];return new pr(0,[vs(t)])}}}class Jb extends F{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.Id=t|0,this.DateCreated=n,this.Configuration=r,this.Status=s,this.Invite=i,this.Tags=o,this.Creator=a,this.StepsConfiguration=l,this.JourneyType=u,this.IsBenefitsStepEnabled=f,this.PaySetupComplete=c}}function wh(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceDto",[],Jb,()=>[["Id",Hs],["DateCreated",zt("System.DateTime")],["Configuration",Nb()],["Status",Mb()],["Invite",X(bb())],["Tags",X(sn(Bb()))],["Creator",X(G)],["StepsConfiguration",X(Ub())],["JourneyType",X(Gb())],["IsBenefitsStepEnabled",X(ct)],["PaySetupComplete",X(ct)]])}function yh(e){let t,n;const r=Rb(e.Configuration);if(r.tag===1)return new h(1,[r.fields[0]]);{const s=r.fields[0],i=Ob(e.Status);if(i.tag===1)return new h(1,[i.fields[0]]);{const o=i.fields[0];let a;if(o.tag===1){const l=o.fields[0],u=Pr(et(f=>{const c=[f[0],f[1]],p=c[0];return yc(m=>O(m.Id,p),s.Steps)?new h(0,[[p,c[1]]]):new h(1,["Step id is not configured for this Process Instance."])},l.CompletedSteps));a=u.tag===1?new h(1,[u.fields[0]]):new h(0,[new ss(1,[new mf(l.ActivatedDates,u.fields[0])])])}else a=new h(0,[o]);if(a.tag===1)return new h(1,[a.fields[0]]);{let l;const u=e.Invite;if(u!=null){const f=Cb(u);l=f.tag===1?new h(1,[f.fields[0]]):new h(0,[f.fields[0]])}else l=new h(0,[void 0]);if(l.tag===1)return new h(1,[l.fields[0]]);{let f;const c=e.Tags;if(c!=null){const p=Pr(et(Vb,c));f=p.tag===1?new h(1,[p.fields[0]]):new h(0,[p.fields[0]])}else f=new h(0,[void 0]);return f.tag===1?new h(1,[f.fields[0]]):new h(0,[new D$(pf(e.Id),s,e.DateCreated,a.fields[0],l.fields[0],f.fields[0],(t=e.Creator,t==null?void 0:Wc(t)),(n=e.StepsConfiguration,n==null?void 0:zb(n)),Yb(e.JourneyType),e.IsBenefitsStepEnabled,e.PaySetupComplete)])}}}}}class bs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}class Zb extends F{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstance=n,this.IsBenefitsEnabled=r,this.Branding=s}}class Hn extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}function Xb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.ProcessInstanceCommandDto",[],Hn,()=>[[["Item",G]],[["Item",G]],[],[["Item",ct]],[["Item",ct]],[["Item",ct]]])}function Kb(e){switch(e.tag){case 1:return new Hn(1,[fi(e.fields[0])]);case 2:return new Hn(2,[]);case 3:return new Hn(3,[e.fields[0]]);case 4:return new Hn(4,[e.fields[0]]);case 5:return new Hn(5,[e.fields[0]]);default:return new Hn(0,[fi(e.fields[0])])}}const Qb=yh;class eC extends F{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstanceDto=n,this.IsBenefitsEnabled=r,this.Branding=s}}function tC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.ProcessInstanceContextDto",[],eC,()=>[["CssOverrides",sn(G)],["ProcessInstanceDto",wh()],["IsBenefitsEnabled",ct],["Branding",X(rC())]])}class nC extends F{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function rC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Branding",[],nC,()=>[["CompanyName",X(G)],["Logo",X(G)],["Support",X(iC())]])}class sC extends F{constructor(t,n){super(),this.Email=t,this.Phone=n}}function iC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Support",[],sC,()=>[["Email",X(G)],["Phone",X(G)]])}function oC(e){let t,n,r,s,i,o,a,l,u,f,c,p,m,$,g,w,v,S;return new zc((t=(n=(r=e.CompanyName,r==null?void 0:Yc(r)),n!=null?(s=n,s.tag===1?new h(1,[s.fields[0]]):new h(0,[s.fields[0]])):new h(0,[void 0])),t.tag===1?void 0:t.fields[0]),(i=(o=(a=e.Logo,a==null?void 0:Jc(a)),o!=null?(l=o,l.tag===1?new h(1,[l.fields[0]]):new h(0,[l.fields[0]])):new h(0,[void 0])),i.tag===1?void 0:i.fields[0]),(u=e.Support,u==null?void 0:(f=u,new Hc((c=(p=(m=f.Email,m==null?void 0:Gc(m)),p!=null?($=p,$.tag===1?new h(1,[$.fields[0]]):new h(0,[$.fields[0]])):new h(0,[void 0])),c.tag===1?void 0:c.fields[0]),(g=(w=(v=f.Phone,v==null?void 0:qc(v)),w!=null?(S=w,S.tag===1?new h(1,[S.fields[0]]):new h(0,[S.fields[0]])):new h(0,[void 0])),g.tag===1?void 0:g.fields[0])))))}function aC(e){let t,n;return new Zb(e.CssOverrides,(t=yh(e.ProcessInstanceDto),t.tag===1?(()=>{throw new Error(t.fields[0])})():t.fields[0]),e.IsBenefitsEnabled,(n=e.Branding,n==null?void 0:oC(n)))}class Ui extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WorkflowInstanceStepActivated","BenefitsStepActivated","BenefitsStepCompleted"]}}function lC(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Write.WorkflowAnalyticsEventDto",[],Ui,()=>[[["Item",G]],[],[]])}class xe extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PersonalDetails","EmergencyContacts","Bank","Tax","Super","WorkplaceLinking","BenefitsOnboarding","WorkplacePolicies","DiscreteBenefits"]}}class Cs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Hidden","Incomplete","Complete"]}}function pl(e){return e?new Cs(1,[]):new Cs(0,[])}class le extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Disabled","Active","Locked","CompletedAndDisabled"]}}function _h(e){return O(e,Ge)?new h(0,[new xe(0,[])]):O(e,ft)?new h(0,[new xe(1,[])]):O(e,dt)?new h(0,[new xe(2,[])]):O(e,ht)?new h(0,[new xe(3,[])]):O(e,Ne)?new h(0,[new xe(4,[])]):O(e,Tn)?new h(0,[new xe(5,[])]):O(e,Ht)?new h(0,[new xe(7,[])]):O(e,Pn)?new h(0,[new xe(8,[])]):new h(1,["Invalid step"])}function uC(e){switch(e.tag){case 1:return ft;case 2:return dt;case 3:return ht;case 4:return Ne;case 5:return Tn;case 6:return ci;case 7:return Ht;case 8:return Pn;default:return Ge}}function vh(e){switch(e.tag){case 1:return"Emergency contacts";case 2:return"Bank details";case 3:return"Tax declaration";case 4:return"Super nomination";case 5:return Tn.DisplayName;case 6:return"Workplace benefits";case 7:return"Fair Work";case 8:return Pn.DisplayName;default:return"Employee profile"}}function bh(e){switch(e.tag){case 1:return"Contacts";case 2:return"Bank";case 3:return"Tax";case 4:return"Super";case 5:return Tn.DisplayName;case 6:return"Benefits";case 7:return"Fair Work";case 8:return Pn.DisplayName;default:return"Profile"}}function Ch(e){switch(e.tag){case 1:return ft;case 2:return dt;case 3:return ht;case 4:return Ne;case 5:return Tn;case 6:return ci;case 7:return Ht;case 8:return Pn;default:return Ge}}function cC(e){switch(e.tag){case 5:case 6:case 8:return!1;default:return!0}}function fC(e,t){return e.tag===0?t:wt(t,E(new xe(6,[])))}class Mr extends F{constructor(t,n){super(),this.Id=t,this.Status=n}}function Gn(e){return vh(e.Id)}function dC(e){return bh(e.Id)}function hC(e){return Ch(e.Id).ComponentTagName}function mC(e){return Ch(e.Id).Id}function pC(e){return cC(e.Id)}function $C(e){if(e.Id.tag===0)return e}function gC(e){if(e.Id.tag===1)return e}function wC(e){return Xr(t=>O(t.Status,new le(2,[])),e)}function yC(e){return((n,r)=>{e:for(;;){const s=n,i=r;if(M(s))return i;if(O(k(s).Status,new le(2,[])))return Lo([i,E(k(s)),P(s)]);if(O(k(s).Status,new le(1,[])))return Lo([i,E(new Mr(k(s).Id,new le(2,[]))),P(s)]);n=P(s),r=wt(i,E(k(s)));continue e}})(e,de())}function $l(e,t){const n=Te(e.PaySetupComplete,!1);let r;const s=Pr(et(_h,e.Configuration.Steps));if(r=s.tag===1?new h(1,[s.fields[0]]):new h(0,[fC(t,s.fields[0])]),r.tag===1)return new h(1,[r.fields[0]]);{const i=Pr(et(_h,L$(e)));return i.tag===1?new h(1,[i.fields[0]]):new h(0,[yC(et(o=>n&&pC(o)&&O(o.Status,new le(0,[]))?new Mr(o.Id,new le(4,[])):o,et(o=>yc(a=>O(a,o.Id),i.fields[0])?new Mr(o.Id,new le(0,[])):o,et(o=>O(o.Id,new xe(6,[]))&&!n?new Mr(o.Id,new le(3,[])):o,et(o=>new Mr(o,new le(1,[])),r.fields[0])))))])}}class Sh extends F{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.AppMode=t,this.JourneyType=n,this.Branding=r,this.IsBenefitsStepEnabled=s,this.IsPaySetupCompatible=i,this.IsPaySetupComplete=o,this.Status=a,this.ProcessInstanceId=l,this.InstanceName=u,this.ProcessConfigId=f,this.Steps=c}}function kh(e){switch(e.Status.tag){case 3:return!1;case 0:return!1;case 1:return Te(e.PaySetupComplete,!1);default:return!0}}function _C(e,t){let n;const r=[t.ProcessInstance,pl(t.IsBenefitsEnabled)];return n=$l(r[0],r[1]),n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Sh(e,t.ProcessInstance.JourneyType,t.Branding,t.IsBenefitsEnabled,k$(t.ProcessInstance.Configuration),kh(t.ProcessInstance),t.ProcessInstance.Status,t.ProcessInstance.Id,t.ProcessInstance.Configuration.Name,t.ProcessInstance.Configuration.Id,n.fields[0])])}function gl(e,t){let n;const r=[t,pl(e.IsBenefitsStepEnabled)];return n=$l(r[0],r[1]),n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Sh(e.AppMode,e.JourneyType,e.Branding,e.IsBenefitsStepEnabled,e.IsPaySetupCompatible,kh(t),t.Status,e.ProcessInstanceId,e.InstanceName,e.ProcessConfigId,n.fields[0])])}let oe=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","StepList","Step","PaySetupCompleteConfirmation","Oops","AllDone"]}};class H extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ActivateCallback","ChangeCurrentView","CloseStepListView","StepCompletionEventCallback","CompleteStep","ConfirmPaySetupComplete","ResumePaySetup","CompletePaySetup","PaySetupCompleted","CompleteWorkflow","ShowAllDoneAndNotifyComplete","SendAnalyticsEvent","AppendTrailingSlashToUrl","CompleteBenefitsOnboardingStep","CommandSuccess","CommandFailure"]}}class It extends F{constructor(t,n,r,s,i,o){super(),this.ProfileId=t,this.ProcessInstanceId=n,this.WorkflowDetail=r,this.CurrentView=s,this.CssOverrides=i,this.BenefitsOnboarding=o}}function wl(e){switch(e.tag){case 1:return"Information request";case 2:return"Workflow";case 3:return"Benefits Onboarding";case 4:return"Benefits Onboarding";default:return"Onboarding"}}function yl(e){if(e<640)return Ee(void 0)}function _l(e){return((n,r)=>{e:for(;;){const s=n,i=r;let o,a,l,u;if(M(s))o=0;else{const f=$C(k(s));if(f!=null)if(M(P(s)))o=2;else{const c=gC(k(P(s)));c!=null?(o=1,a=c,l=f,u=P(P(s))):o=2}else o=2}switch(o){case 0:return i;case 1:{n=u,r=wt(i,E(O(a.Status,new le(2,[]))?new Mr(l.Id,new le(2,[])):l));continue e}default:if(M(s))throw new Error("Match failure");n=P(s),r=wt(i,E(k(s)));continue e}}})(e,de())}function Ss(e){let t,n;return d("div",C(y([(t="absolute inset-0 min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",{className:"mt-5 px-4 flex flex-col items-center justify-center sm:max-w-[640px]",children:b.Children.toArray([e])}),Xo],["children",b.Children.toArray(Array.from(n))])])))}function vC(e,t){let n;const r=e.tag===2?e.fields[0]:void 0;let s;if(r==null)s=void 0;else{const u=r;s=on(f=>V1(f+1,t.Steps),ni(f=>O(u,f),t.Steps))}const i=Be(u=>new H(1,[new oe(2,[u])]),Xr(u=>O(u.Status,new le(2,[])),t.Steps));let o,a,l;switch(r!=null&&s!=null?(n=s,O(r.Status,new le(2,[]))&&(O(n.Status,new le(1,[]))?!0:O(n.Status,new le(3,[])))?(o=0,a=r):(o=1,l=s)):o=2,o){case 0:return new H(1,[new oe(2,[a])]);case 1:return O(l.Status,new le(3,[]))?void 0:new H(1,[new oe(2,[l])]);default:return i}}function bC(e,t){const n=e.IsPaySetupCompatible&&!e.IsPaySetupComplete&&or(e.Steps)!==1;let r;if(n)switch(t.tag){case 1:case 0:{r=0;break}default:r=1}else r=1;switch(r){case 0:return new H(5,[{Branding:Gs(e.Branding),InjectedBenefits:e.IsBenefitsStepEnabled}]);default:return}}function CC(e){if(ra(e.Status))return new H(10,[e])}function vl(e,t,n){return Te(Yu(Yu(CC(t),vC(e,t)),bC(t,n)),new H(9,[new ke(0,[])]))}function SC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/%i"))(Vn)(t)}function kC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/process-instances/%i/activate"))(Vn)(t)}function xC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/process-instances/%i/analytics-events"))(Vn)(t)}function bl(e,t){return A.Delay(()=>{const n=Fi(H2(je(We("Bearer %s"))(e)),t);let r;const s=ps(n);return r=A.Bind(s,i=>A.Return(new h(0,[i]))),A.Bind(r,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{const a=o.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=ps(n);return A.Bind(l,u=>A.Return(new h(0,[u])))}else return A.Return(new h(0,[a]))}})})}function ks(e,t,n){return A.Delay(()=>{let r,s;const i=bl(n,(r=pn(new Zt(1,[(s=E(Kb(e)),$n(0,gn(sn(Xb()),new He(1,[]),void 0,void 0)(s)))]),Kt(new Bt(1,[]),Xt(SC(t)))),Fi(fl("application/json"),r)));return A.Bind(i,o=>{const a=o;if(a.tag===1)return A.Return(new h(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let u;const f=en(re(tn(wh(),new He(1,[]))),l.responseText);return u=f.tag===1?new h(1,[f.fields[0]]):Qb(f.fields[0]),A.Return(u)}else return A.Return(new h(1,["Unexpected response from backend"]))}})})}function IC(e,t){return A.Delay(()=>{const n=bl(t,Kt(new Bt(1,[]),Xt(kC(e))));return A.Bind(n,r=>{const s=r;if(s.tag===1)return A.Return(new h(1,[s.fields[0]]));{const i=s.fields[0];if(i.statusCode===200){let o;const a=en(re(tn(tC(),new He(1,[]))),i.responseText);return o=a.tag===1?new h(1,[a.fields[0]]):new h(0,[aC(a.fields[0])]),A.Return(o)}else return A.Return(new h(1,["Unexpected response from backend"]))}})})}function AC(e,t,n){let r;const s=A.Delay(()=>{let i;return bl(e,(i=pn(new Zt(1,[$n(0,gn(sn(lC()),new He(1,[]),void 0,void 0)(E(n)))]),Kt(new Bt(1,[]),Xt(xC(t)))),Fi(fl("application/json"),i)))});return r=A.Bind(s,i=>{let o;const a=i;return o=a.tag===1?new h(1,[a.fields[0]]):new h(0,[void a.fields[0]]),A.Return(o)}),A.Bind(r,i=>{const o=i;return o.tag===1||o.fields[0],A.Return()})}function EC(e,t){return IC(e,t)}function TC(e,t,n){return ks(new bs(1,[t]),e,n)}function PC(e,t,n){return ks(new bs(3,[n]),e,t)}function MC(e,t,n){return ks(new bs(4,[n]),e,t)}function OC(e,t,n){return ks(new bs(5,[n]),e,t)}function DC(e,t){return ks(new bs(2,[]),e,t)}function NC(e){const t=ab(e);return[new It(Wc(t.sub),pf(t.workflow.instanceId),new ke(0,[]),new oe(0,[]),de(),new Cs(0,[])),te()]}function RC(e,t,n,r,s){let i,o,a,l,u,f,c,p,m,$,g,w,v,S,N,Q,Z,Ae,at;switch(r.tag){case 1:{const x=r.fields[0];return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,x,s.CssOverrides,s.BenefitsOnboarding),x.tag===2?(i=uC(x.fields[0].Id),O(i.Id,ci.Id)?E(R=>{R(new H(11,[s.ProcessInstanceId,new Ui(1,[])]))}):(o=new H(11,[s.ProcessInstanceId,new Ui(0,[fi(i.Id)])]),E(R=>{R(o)}))):te()]}case 2:{const x=s.WorkflowDetail;let R,B;switch(x.tag===2&&x.fields[0].tag===0?(R=0,B=x.fields[0].fields[0]):R=1,R){case 0:{const ee=vl(s.CurrentView,B,s.BenefitsOnboarding);return[s,E(he=>{he(ee)})]}default:return[s,te()]}}case 11:return qe(AC(t,r.fields[0],r.fields[1])),[s,te()];case 3:{const x=s.WorkflowDetail;let R,B;switch(x.tag===2&&x.fields[0].tag===0?(R=0,B=x.fields[0].fields[0]):R=1,R){case 0:return[s,(a=r.fields[0].target,l=Xr(ee=>m1(hC(ee),a.tagName,5)===0,B.Steps),l==null?te():O(l.Id,new xe(6,[]))?E(ee=>{ee(new H(13,[]))}):(u=l,f=new H(4,[mC(u),new ke(0,[])]),E(ee=>{ee(f)})))];default:return[s,te()]}}case 13:{const x=s.WorkflowDetail;let R;switch(x.tag===2&&x.fields[0].tag===0?O(s.BenefitsOnboarding,new Cs(0,[]))?R=1:R=0:R=1,R){case 0:return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,s.CurrentView,s.CssOverrides,new Cs(2,[])),c0(y([E(B=>{B(new H(11,[s.ProcessInstanceId,new Ui(2,[])]))}),E(B=>{B(new H(9,[new ke(0,[])]))}),E(B=>{B(new H(1,[new oe(5,[])]))})]))];default:return[s,te()]}}case 4:{const x=r.fields[0],R=r.fields[1];switch(R.tag){case 1:return[s,te()];case 2:{const B=R.fields[0],ee=B;ee.tag===1?ee.fields[0]:Ig(x,ee.fields[0],s.ProfileId);let he;const At=s.WorkflowDetail;let qn,Yn;switch(At.tag===2&&At.fields[0].tag===0?(qn=0,Yn=At.fields[0].fields[0]):qn=1,qn){case 0:{he=new ke(2,[(c=B,c.tag===1?new h(1,[c.fields[0]]):gl(Yn,c.fields[0]))]);break}default:he=s.WorkflowDetail}return[new It(s.ProfileId,s.ProcessInstanceId,he,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(p=he.tag===2?he.fields[0].tag===1?new H(1,[new oe(4,[he.fields[0].fields[0]])]):vl(s.CurrentView,he.fields[0].fields[0],s.BenefitsOnboarding):he.tag===3?new H(1,[new oe(4,[he.fields[0].message])]):new H(1,[new oe(4,["Process Instance not resolved"])]),E(Yi=>{Yi(p)}))]}case 3:{const B=R.fields[0];return[new It(s.ProfileId,s.ProcessInstanceId,new ke(3,[B]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(m=new H(1,[new oe(4,[B.message])]),E(ee=>{ee(m)}))]}default:return[s,St(B=>{qe(B)},B=>TC(s.ProcessInstanceId,x,B),t,B=>new H(4,[x,new ke(2,[B])]),B=>new H(4,[x,new ke(3,[B])]))]}}case 5:return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,new oe(3,[]),s.CssOverrides,s.BenefitsOnboarding),St(x=>{qe(x)},x=>PC(s.ProcessInstanceId,t,x),r.fields[0].InjectedBenefits,x=>new H(14,[]),x=>new H(15,[x]))];case 6:return[s,c0(y([St(x=>{qe(x)},x=>OC(s.ProcessInstanceId,t,x),r.fields[0].InjectedBenefits,x=>new H(14,[]),x=>new H(15,[x])),($=s.WorkflowDetail,$.tag===2?$.fields[0].tag===0?(g=new H(1,[new oe(2,[P1(Bo(x=>O(x.Status,new le(0,[]))?!0:O(x.Status,new le(4,[])),$.fields[0].fields[0].Steps))])]),E(x=>{x(g)})):E(x=>{x(new H(1,[new oe(4,["Process Instance not resolved"])]))}):E(x=>{x(new H(1,[new oe(4,["Process Instance not resolved"])]))}))]))];case 7:return[s,St(x=>{qe(x)},Vs(e)(s.ProcessInstanceId)(t),r.fields[0].InjectedBenefits,x=>new H(8,[x]),x=>new H(15,[x]))];case 8:{let x;const R=s.WorkflowDetail;let B,ee;switch(R.tag===2&&R.fields[0].tag===0?(B=0,ee=R.fields[0].fields[0]):B=1,B){case 0:{x=new ke(2,[(w=r.fields[0],w.tag===1?new h(1,[w.fields[0]]):gl(ee,w.fields[0]))]);break}default:x=s.WorkflowDetail}return[new It(s.ProfileId,s.ProcessInstanceId,x,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(v=x.tag===2?x.fields[0].tag===1?new H(1,[new oe(4,[x.fields[0].fields[0]])]):vl(s.CurrentView,x.fields[0].fields[0],s.BenefitsOnboarding):x.tag===3?new H(1,[new oe(4,[x.fields[0].message])]):new H(1,[new oe(4,["Process Instance not resolved"])]),E(he=>{he(v)}))]}case 9:{const x=r.fields[0];switch(x.tag){case 1:return[s,te()];case 2:return x.fields[0].tag===1?[new It(s.ProfileId,s.ProcessInstanceId,new ke(2,[new h(1,[x.fields[0].fields[0]])]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),E(R=>{R(new H(1,[new oe(4,[x.fields[0].fields[0]])]))})]:(ha(x.fields[0].fields[0].Id,x.fields[0].fields[0].Configuration.Name,x.fields[0].fields[0].Configuration.Id,s.ProfileId),[new It(s.ProfileId,s.ProcessInstanceId,lb(R=>{const B=R;return B.tag===1?new h(1,[B.fields[0]]):gl(B.fields[0],x.fields[0].fields[0])},s.WorkflowDetail),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),E(R=>{R(new H(1,[new oe(5,[])]))})]);case 3:return[new It(s.ProfileId,s.ProcessInstanceId,new ke(3,[x.fields[0]]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(S=new H(1,[new oe(4,[x.fields[0].message])]),E(R=>{R(S)}))];default:{const R=s.WorkflowDetail;let B,ee;switch(R.tag===2&&R.fields[0].tag===0&&ra(R.fields[0].fields[0].Status)?(B=0,ee=R.fields[0].fields[0]):B=1,B){case 0:return ha(ee.ProcessInstanceId,ee.InstanceName,ee.ProcessConfigId,s.ProfileId),[s,te()];default:return[s,St(he=>{qe(he)},he=>DC(s.ProcessInstanceId,he),t,he=>new H(9,[new ke(2,[he])]),he=>new H(9,[new ke(3,[he])]))]}}}}case 10:{const x=r.fields[0];return ha(x.ProcessInstanceId,x.InstanceName,x.ProcessConfigId,s.ProfileId),[s,E(R=>{R(new H(1,[new oe(5,[])]))})]}case 12:return[s,(N=window.location.pathname+"/"+window.location.search+window.location.hash,f0(x=>{ol(E(N),1)}))];case 14:return[s,te()];case 15:return[s,te()];default:{const x=r.fields[0];let R;switch(x.tag){case 3:{R=[s,(Q=new H(1,[new oe(4,[x.fields[0].message])]),E(B=>{B(Q)}))];break}case 0:case 1:{R=[s,te()];break}default:{let B,ee;const he=x.fields[0];if(he.tag===1)ee=new h(1,[he.fields[0]]);else{const At=he.fields[0],qn=pl(At.IsBenefitsEnabled);let Yn;const Yi=[At.ProcessInstance,qn];if(Yn=$l(Yi[0],Yi[1]),Yn.tag===1)ee=new h(1,[Yn.fields[0]]);else{const Vh=Yn.fields[0],Al=_C(n,At);if(Al.tag===1)ee=new h(1,[Al.fields[0]]);else{const Fh=Al.fields[0],q3=ra(At.ProcessInstance.Status);let Ji;const Wh=wC(Vh);Ji=Wh==null?Fh.IsPaySetupComplete?q3?new h(0,[new oe(5,[])]):new h(0,[new oe(4,["Something went wrong"])]):new h(0,[new oe(3,[])]):new h(0,[(Z=Wh,Ae=al.clientWidth,at=or(Vh)|0,at===1?(document.title=Gn(Z),new oe(2,[Z])):yl(Ae)!=null?new oe(1,[]):new oe(2,[Z]))]),ee=Ji.tag===1?new h(1,[Ji.fields[0]]):new h(0,[[new It(s.ProfileId,s.ProcessInstanceId,new ke(2,[new h(0,[Fh])]),s.CurrentView,At.CssOverrides,qn),Ji.fields[0]]])}}}B=ee.tag===1?[s,new oe(4,[ee.fields[0]])]:ee.fields[0],R=[B[0],E(At=>{At(new H(1,[B[1]]))})]}}return[R[0],R[1]]}}}function LC(e,t,n,r){return RC(MC,e,t,n,r)}const BC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=E(d("g",C(E((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:16,fill:"currentColor"}),d("path",C(y([(n="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",n]),["fill","white"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()]))),VC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n,r;const s=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=E(d("g",C(E((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"currentColor",strokeWidth:2}),d("path",C(y([(n="M16.616 12.6769L11.146 18.1459C11.0908 18.2022 11.0497 18.2707 11.026 18.3459L10.026 21.3459C10.0018 21.4208 9.99555 21.5004 10.0079 21.5781C10.0202 21.6559 10.0507 21.7296 10.0969 21.7934C10.1431 21.8571 10.2036 21.909 10.2737 21.9449C10.3438 21.9808 10.4213 21.9997 10.5 21.9999C10.5538 22.0002 10.6072 21.9914 10.658 21.9739L13.658 20.9739C13.7332 20.9503 13.8017 20.9091 13.858 20.8539L19.327 15.3839L16.616 12.6769Z",["d",n]),["fill","currentColor"]]))),d("path",C(y([(r="M21.8545 12.146L19.8545 10.146C19.808 10.0994 19.7529 10.0625 19.6921 10.0373C19.6314 10.0121 19.5663 9.99908 19.5005 9.99908C19.4347 9.99908 19.3696 10.0121 19.3089 10.0373C19.2481 10.0625 19.1929 10.0994 19.1465 10.146L17.6775 11.616L20.3845 14.323L21.8545 12.854C21.9011 12.8075 21.938 12.7524 21.9632 12.6916C21.9884 12.6309 22.0014 12.5657 22.0014 12.5C22.0014 12.4342 21.9884 12.3691 21.9632 12.3083C21.938 12.2476 21.9011 12.1924 21.8545 12.146Z",["d",r]),["fill","currentColor"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(s))]})()]))),FC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t,n;const r=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M15 13C15 12.7348 15.1054 12.4804 15.2929 12.2929C15.4804 12.1054 15.7348 12 16 12C16.2652 12 16.5196 12.1054 16.7071 12.2929C16.8946 12.4804 17 12.7348 17 13V15H19V13C19 12.2044 18.6839 11.4413 18.1213 10.8787C17.5587 10.3161 16.7956 10 16 10C15.2044 10 14.4413 10.3161 13.8787 10.8787C13.3161 11.4413 13 12.2044 13 13V15H15V13Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M19.6 16H12.4C11.9029 16 11.5 16.3731 11.5 16.8333V20.1667C11.5 20.6269 11.9029 21 12.4 21H19.6C20.0971 21 20.5 20.6269 20.5 20.1667V16.8333C20.5 16.3731 20.0971 16 19.6 16Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(r))]})()]))),xh=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2})]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(t))]})()]))),WC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",t]),["fill","#D1D5DB"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function Cl(e,t){let n;return d("div",C(y([["className","w-full h-6 rounded justify-start items-center inline-flex"],(n=[d("div",{className:ve(" ",[e,"text-lg font-medium leading-normal"]),children:t})],["children",b.Children.toArray(Array.from(n))])])))}function jC(e){return Cl("text-gray-900",e)}function Sl(e){return Cl("text-gray-500",e)}function UC(e){return Cl("text-primary-base",e)}function zC(e){switch(e.Status.tag){case 0:return jC(Gn(e));case 1:return Sl(Gn(e));case 3:return Sl(Gn(e));case 4:return Sl(Gn(e));default:return UC(Gn(e))}}function Ih(e){let t;return d("div",C(y([["className","w-8 h-6 flex-col justify-center items-center inline-flex"],(t=[d("div",{className:ve(" ",[e,"w-0.5 h-6 relative"])})],["children",b.Children.toArray(Array.from(t))])])))}const HC=Ih("bg-gray-300"),Ah=Ih("bg-primary-base");function GC(e){const t=O(e.Id,new xe(6,[])),n=e.Status;let r;if(t)r=2;else switch(n.tag){case 0:{r=0;break}case 2:{r=1;break}default:r=2}switch(r){case 0:return Ah;case 1:return Ah;default:return HC}}function Eh(e,t){let n,r,s;const i=O(t.Status,new le(0,[]))?!0:O(t.Status,new le(2,[]));return d("button",C(y([["className",ve(" ",["group h-8 justify-start items-center space-x-4 inline-flex focus:outline-none"])],["type","button"],["disabled",!i],["onClick",o=>{e(new H(1,[new oe(2,[t])]))}],(n=[d("div",C(y([["className","w-8 h-8 relative"],(r=ge(T(()=>{const o=t.Status;return o.tag===0?_(BC):o.tag===1?_(xh):o.tag===3?O(t.Id,new xe(6,[]))?_(FC):_(xh):o.tag===4?_(WC):_(VC)})),["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className",ve(" ",ge(T(()=>W(_("rounded justify-start items-center flex"),T(()=>i?_("group-focus:outline-none group-focus:ring-2 group-focus:ring-offset-4 group-focus:ring-primary-focus"):cr())))))],(s=[zC(t)],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function qC(e){let t,n,r,s=!1,i=0;const o=$e(e.Steps);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const u=o["System.Collections.Generic.IEnumerator`1.get_Current"]();switch(u.Id.tag){case 0:case 1:{s=O(u.Status,new le(0,[]))?!0:O(u.Status,new le(4,[]));break}default:(O(u.Status,new le(0,[]))||O(u.Status,new le(4,[])))&&(i=i+1|0)}}}finally{ue(o)}r=i+(s?1:0);const a=or(_l(e.Steps))|0,l=u=>d("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:u});return d("div",C(y([(t="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start inline-flex cursor-default",["className",t]),(n=ge(T(()=>{let u,f;return W((u=e.Branding,O(e.AppMode,new Ar(0,[]))?_(ne()):u!=null&&u.CompanyName!=null?(f=u.CompanyName,_(l(rs(f)))):_(l(wl(e.JourneyType)))),T(()=>_(d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:`${r}/${a} sections complete`}))))})),["children",b.Children.toArray(Array.from(n))])])))}function YC(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(M(i))return o;if(M(P(i)))return wt(o,E(Eh(e,k(i))));r=Qe(k(P(i)),P(P(i))),s=wt(o,y([Eh(e,k(i)),GC(k(P(i)))]));continue e}})(_l(t.Steps),de())}function JC(e){let t,n,r;const s=e.dispatch,i=e.detail,o=Yo(void 0),a=oi(!1);return Rp(()=>{const l=window.ResizeObserver?new window.ResizeObserver(()=>{const u=document.body.offsetWidth;yl(u)!=null||a[0]===!1&&(a[1](!0),s(new H(2,[])))}):new Nf(()=>{const u=document.body.offsetWidth;yl(u)!=null||a[0]===!1&&(a[1](!0),s(new H(2,[])))});return xn(u=>{l.observe(u)},qs(o.current)),{Dispose(){l.disconnect()}}}),d("div",C(y([["ref",o],["className","absolute top-0 bottom-0 left-0 right-0"],(t=[d("div",C(y([["className","w-full h-full bg-white flex-col justify-start items-start inline-flex"],(n=[qC(i),d("div",C(y([["className","p-6 bg-white flex-col justify-start items-start inline-flex"],(r=YC(s,i),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class zi extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token"]}}class ZC extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["app-base-url"]}}class XC extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["workflows-instance-id"]}}function Th(e){const t=e.children,n=e.effect,r=e.props,s=e.step;hr(n);const i=s.tag===1?ft.ComponentTagName:s.tag===2?dt.ComponentTagName:s.tag===3?ht.ComponentTagName:s.tag===4?Ne.ComponentTagName:s.tag===5?Tn.ComponentTagName:s.tag===6?ci.ComponentTagName:s.tag===7?Ht.ComponentTagName:s.tag===8?Pn.ComponentTagName:Ge.ComponentTagName;return d(i,yt(r,1),...t)}class xs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Mobile","MobileLandscape","Tablet","Desktop","WideScreen"]}}class KC extends F{constructor(t,n,r,s){super(),this.MobileLandscape=t|0,this.Tablet=n|0,this.Desktop=r|0,this.WideScreen=s|0}}const QC=new KC(576,768,1024,1216);function e3(e){return["(max-width: "+e.MobileLandscape+"px)","(max-width: "+e.Tablet+"px)","(max-width: "+e.Desktop+"px)","(max-width: "+e.WideScreen+"px)"]}function Hi(e){const t=Np(()=>window.matchMedia(e).matches);return qo(()=>{const n=window.matchMedia(e),r=()=>{t[1](n.matches)};return r(),n.addListener(r),es(()=>{n.removeListener(r)})},[e]),t[0]}function t3(e){const t=e3(Te(e,QC)),n=Hi(t[0]),r=Hi(t[1]),s=Hi(t[2]),i=Hi(t[3]);return n?new xs(0,[]):r?new xs(1,[]):s?new xs(2,[]):i?new xs(3,[]):new xs(4,[])}const n3=d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=E(d("g",C(E((e=y([d("rect",{width:16,height:16,fill:"white"}),d("path",C(y([(t="M15 6.99992H3.41403L6.70703 3.70692C6.88919 3.51832 6.98998 3.26571 6.9877 3.00352C6.98543 2.74132 6.88026 2.49051 6.69485 2.3051C6.50944 2.11969 6.25863 2.01452 5.99643 2.01224C5.73423 2.00997 5.48163 2.11076 5.29303 2.29292L0.293031 7.29292C0.10556 7.48045 0.000244141 7.73475 0.000244141 7.99992C0.000244141 8.26508 0.10556 8.51939 0.293031 8.70692L5.29303 13.7069C5.38528 13.8024 5.49562 13.8786 5.61763 13.931C5.73963 13.9834 5.87085 14.011 6.00363 14.0122C6.13641 14.0133 6.26809 13.988 6.39098 13.9377C6.51388 13.8875 6.62553 13.8132 6.71943 13.7193C6.81332 13.6254 6.88757 13.5138 6.93785 13.3909C6.98813 13.268 7.01343 13.1363 7.01228 13.0035C7.01113 12.8707 6.98354 12.7395 6.93113 12.6175C6.87872 12.4955 6.80254 12.3852 6.70703 12.2929L3.41403 8.99992H15C15.2652 8.99992 15.5196 8.89456 15.7071 8.70703C15.8947 8.51949 16 8.26514 16 7.99992C16 7.7347 15.8947 7.48035 15.7071 7.29281C15.5196 7.10528 15.2652 6.99992 15 6.99992Z",["d",t]),["fill","#212121"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function r3(e,t,n){let r,s,i,o,a,l;const u=R1(m=>O(m.Id,n.Id),t)/or(t)*100;l=je(We("%.0f%%"))(u);let f;const c=B1(m=>O(m.Status,new le(2,[]))?!0:O(m.Status,new le(0,[])),t)/or(t)*100;f=je(We("%.0f%%"))(c);const p=O(n.Id,new xe(1,[]))?vh(new xe(0,[])):Gn(n);return d("div",C(y([(r="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start space-y-3 inline-flex sticky left-0 right-0 top-0 z-50",["className",r]),(s=[d("div",C(y([["className","self-stretch justify-start items-center space-x-3 inline-flex"],(i=[d("button",{type:"button",className:"w-4 h-4 rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",onClick:m=>{e(new H(1,[new oe(1,[])]))},children:b.Children.toArray([n3])}),d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:p})],["children",b.Children.toArray(Array.from(i))])]))),d("div",C(y([["className","w-full h-2 relative rounded-sm"],(o=[d("div",{className:"w-full h-0.5 left-0 top-[3px] absolute bg-gray-300 rounded-sm"}),d("div",C(y([["className","w-full left-0 top-0 absolute"],(a=[d("div",{className:"h-0.5 left-0 top-[3px] absolute bg-primary-base rounded-sm",style:{width:f}}),d("div",{className:"w-2 h-2 top-0 absolute bg-primary-base rounded-full",style:{left:l}})],["children",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))}const s3=d("div",C(y([["className","relative h-4 w-2 z-50"],(()=>{const e=[d("div",{className:"absolute left-0 top-1 h-2 w-2 rounded-full bg-primary-base"})];return["children",b.Children.toArray(Array.from(e))]})()]))),i3=d("div",{className:"relative h-0.5 w-2 bg-gray-300"}),Ph=d("div",{className:"relative h-0.5 w-2 bg-primary-base"}),o3=d("div",C(y([["className","w-4 h-4 relative"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(e=y([d("path",C(y([(t="M7 5C7 4.73478 7.10536 4.48043 7.29289 4.29289C7.48043 4.10536 7.73478 4 8 4C8.26522 4 8.51957 4.10536 8.70711 4.29289C8.89464 4.48043 9 4.73478 9 5V7H11V5C11 4.20435 10.6839 3.44129 10.1213 2.87868C9.55871 2.31607 8.79565 2 8 2C7.20435 2 6.44129 2.31607 5.87868 2.87868C5.31607 3.44129 5 4.20435 5 5V7H7V5Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M11.6 8H4.4C3.90294 8 3.5 8.3731 3.5 8.83333V12.1667C3.5 12.6269 3.90294 13 4.4 13H11.6C12.0971 13 12.5 12.6269 12.5 12.1667V8.83333C12.5 8.3731 12.0971 8 11.6 8Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()])));function Mh(e,t,n){let r;if(e)r=0;else switch(n.tag){case 0:case 4:{r=2;break}case 1:{r=4;break}case 3:{t?r=3:r=4;break}default:r=1}switch(r){case 0:return s3;case 1:return Ph;case 2:return Ph;case 3:return o3;default:return i3}}const Oh=d("div",{className:"relative h-0.5 w-full"}),a3=d("div",{className:"relative h-0.5 w-full bg-gray-300"}),l3=d("div",{className:"relative h-0.5 w-full bg-primary-base"});function kl(e){let t;if(e==null)t=1;else switch(e.tag){case 0:case 4:case 2:{t=0;break}default:t=2}switch(t){case 0:return l3;case 1:return Oh;default:return a3}}function Dh(e){let t,n;return d("div",C(y([["className","inline-flex h-11 w-10 flex-col items-center justify-start"],(t=[d("div",C(y([["className","inline-flex h-4 items-center justify-center self-stretch"],(n=[d("div",{className:ve(" ",[e,"relative h-0.5 w-10"])})],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}const u3=Dh("bg-gray-300"),c3=Dh("bg-primary-base");function f3(e){switch(e.tag){case 0:case 4:case 2:return c3;default:return u3}}function Nh(e,t,n,r){let s,i;const o=!e&&(O(n.Status,new le(0,[]))?!0:O(n.Status,new le(2,[]))),a=e?"text-primary-base":O(n.Status,new le(2,[]))||O(n.Status,new le(0,[]))?"text-gray-900 group-hover:text-primary-base":"text-gray-500",l=d("div",{className:"absolute inset-0 group-hover:bg-primary-base group-hover:opacity-10 rounded"});let u;const f=dc(bh(n.Id).toLocaleLowerCase()," ","-");return u=je(We("step-%s"))(f),d("div",C(y([["className",ve(" ",["h-11 flex-col justify-start items-center inline-flex"])],(s=[d("div",{className:"h-4 inline-flex items-center justify-center self-stretch",children:b.Children.toArray(Array.from(r))}),d("button",C(y([["type","button"],["disabled",!o],["data-testid",u],["className",ve(" ",["relative group h-7 px-2 py-1 justify-center items-center gap-2 inline-flex rounded","focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-primary-focus"])],["onClick",Et(t)(n)],(i=ge(T(()=>W(_(o?l:ne()),T(()=>_(d("div",{className:ve(" ",[a,"text-sm font-medium leading-tight whitespace-nowrap"]),children:dC(n)})))))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function d3(e,t,n){const r=O(n.Id,new xe(1,[]))?new xe(0,[]):n.Id,s=(o,a)=>{e(new H(1,[new oe(2,[o])]))};return lr(((o,a,l)=>{e:for(;;){const u=o,f=a,c=l;if(M(u))return c;if(M(P(u))){const p=kl(f),m=O(k(u).Id,r);return wt(c,E(Nh(m,s,k(u),y([Oh,Mh(m,O(k(u).Id,new xe(6,[])),k(u).Status),p]))))}else{const p=kl(f),m=O(k(u).Id,r),$=Mh(m,O(k(u).Id,new xe(6,[])),k(u).Status);o=P(u),a=k(u).Status,l=wt(c,y([Nh(m,s,k(u),y([kl(k(u).Status),$,p])),f3(k(u).Status)]));continue e}}})(lr(_l(t)),void 0,de()))}function h3(e,t,n){let r,s,i;const o=d("div",C(y([["className","grow shrink basis-0 flex-col justify-start items-start inline-flex"],(r=[d("div",{className:"hidden lg:inline text-gray-500 text-sm font-medium leading-tight",children:wl(t.JourneyType)}),Te(Be(l=>d("div",{className:"hidden lg:inline text-center text-gray-900 text-base font-semibold leading-normal",children:l}),Be(rs,on(l=>l.CompanyName,t.Branding))),ne())],["children",b.Children.toArray(Array.from(r))])]))),a=d("div",{className:"grow shrink basis-0"});return d("div",C(y([(s="w-full h-20 px-8 py-4 bg-white border-b border-gray-300 justify-between items-center inline-flex sticky left-0 right-0 top-0 z-50",["className",s]),(i=ge(T(()=>W(O(t.AppMode,new Ar(0,[]))?_(a):_(o),T(()=>{let l;return W(_(d("div",C(y([["className","bg-white justify-center items-start flex"],(l=d3(e,t.Steps,n),["children",b.Children.toArray(Array.from(l))])])))),T(()=>_(d("div",{className:"grow shrink basis-0"}))))})))),["children",b.Children.toArray(Array.from(i))])])))}function m3(e){let t;const n=e.body,r=e.currentStep,s=e.detail,i=e.dispatch;return d("div",C(y([["className","w-full flex-col justify-start items-center inline-flex bg-white"],(t=ge(T(()=>W(or(s.Steps)===1?_(ne()):t3().tag===0?_(r3(i,s.Steps,r)):_(h3(i,s,r)),T(()=>_(d("div",{className:"p-4 max-w-7xl mx-auto w-full",children:n})))))),["children",b.Children.toArray(Array.from(t))])])))}const p3=e=>d("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M16 16V30",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 21L16 16L21 21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 29H4C3.20435 29 2.44129 28.6839 1.87868 28.1213C1.31607 27.5587 1 26.7956 1 26V2H12L15 7H31V26C31 26.7956 30.6839 27.5587 30.1213 28.1213C29.5587 28.6839 28.7956 29 28 29H21",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$3=e=>d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M19.7 4.3C19.3 3.9 18.7 3.9 18.3 4.3L12 10.6L5.7 4.3C5.3 3.9 4.7 3.9 4.3 4.3C3.9 4.7 3.9 5.3 4.3 5.7L10.6 12L4.3 18.3C3.9 18.7 3.9 19.3 4.3 19.7C4.5 19.9 4.7 20 5 20C5.3 20 5.5 19.9 5.7 19.7L12 13.4L18.3 19.7C18.5 19.9 18.8 20 19 20C19.2 20 19.5 19.9 19.7 19.7C20.1 19.3 20.1 18.7 19.7 18.3L13.4 12L19.7 5.7C20.1 5.3 20.1 4.7 19.7 4.3Z",fill:"#9CA3AF"}));function g3(e){const t=yt(e,1);return d(p3,t)}function w3(e){const t=yt(e,1);return d($3,t)}function y3(e){return d("div",{className:"absolute top-0 bottom-0 left-0 right-0",children:b.Children.toArray([e])})}function _3(e,t){let n;return d("button",C(y([["type","button"],["data-testid","submit-btn"],["className",ve(" ",["self-stretch md:self-auto md:w-60 px-4 py-2 bg-primary-base hover:bg-primary-hover rounded-md shadow","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer","justify-center items-center inline-flex"])],["onClick",t],(n=[d("div",{className:"text-white text-base font-semibold leading-normal",children:e})],["children",b.Children.toArray(Array.from(n))])])))}function v3(e,t){let n;return d("button",C(y([["type","button"],["className",ve(" ",["relative group self-stretch md:self-auto md:w-60 px-4 py-2 rounded-md shadow justify-center items-center inline-flex","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer"])],["onClick",t],(n=[d("div",{className:"text-primary-dark text-base font-semibold leading-normal z-[1]",children:e}),d("div",{className:"absolute w-full h-full rounded-md z-[0] bg-primary-base opacity-10 group-hover:opacity-20"})],["children",b.Children.toArray(Array.from(n))])])))}function Gi(e,t,n,r,s){let i,o,a,l,u,f,c,p,m,$,g,w,v,S,N;return y3(d("div",C(y([["className","w-full h-full md:pb-8 bg-white flex-col justify-start items-start md:items-center inline-flex"],(i=[d("div",C(y([(o="w-full md:self-stretch p-4 bg-white border-gray-200 flex-col justify-start items-end space-x-4 space-y-4 flex",["className",o]),(a=[d("button",C(y([["type","button"],(l="w-6 h-6 relative rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",["className",l]),["onClick",Q=>{s(new H(6,[{InjectedBenefits:r}]))}],(u=[w3([])],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(a))])]))),d("div",C(y([(f="w-full md:w-[560px] grow shrink basis-0 px-4 md:px-0 pb-8 md:pb-0 bg-white flex-col justify-between md:justify-start items-center md:space-y-14 flex",["className",f]),(c=[d("div",C(y([["className","self-stretch h-64 md:h-56 flex-col justify-start items-center space-y-8 flex"],(p=[d("div",C(y([["className","self-stretch h-64 flex-col justify-start items-center space-y-6 flex"],(m=[d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex"],($=[d("div",C(y([["className","w-12 h-12 relative rounded-lg"],(g=[d("div",{className:"w-12 h-12 relative bg-primary-base opacity-10 rounded-lg"}),d("div",C(y([["className","w-8 h-8 left-2 top-2 absolute"],(w=[d("div",C(y([["className","w-7 h-7 left-px top-0.5 absolute"],(v=[g3([["className","text-primary-base"]])],["children",b.Children.toArray(Array.from(v))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(g))])]))),d("div",{className:"self-stretch text-center text-gray-900 text-2xl md:text-3xl font-bold leading-7 md:leading-9",children:e})],["children",b.Children.toArray(Array.from($))])]))),d("div",C(y([["className","self-stretch h-40 md:h-24 flex-col justify-start items-center space-y-3 md:space-y-4 flex"],(S=[d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:t}),d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:n})],["children",b.Children.toArray(Array.from(S))])])))],["children",b.Children.toArray(Array.from(m))])])))],["children",b.Children.toArray(Array.from(p))])]))),d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex cursor-pointer"],(N=[_3(r?"Submit and continue":"Submit",Q=>{s(new H(7,[{InjectedBenefits:r}]))}),v3("Keep editing",Q=>{s(new H(6,[{InjectedBenefits:r}]))})],["children",b.Children.toArray(Array.from(N))])])))],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(i))])]))))}function b3(e){let t,n;const r=e.dispatch,s=e.wd,i=s.IsBenefitsStepEnabled;return s.AppMode.tag===1?i?Gi("Before you continue",(t=on(o=>o.CompanyName,s.Branding),t==null?"Submit to finalise your pay information to your employer and continue to access your workplace benefits":`Submit to finalise your pay information to ${rs(t)} and continue to access your workplace benefits`),"Once you submit, you’ll be unable to view or edit your details",!0,r):Gi("Submit your details",(n=on(o=>o.CompanyName,s.Branding),n==null?"Submit to finalise your pay information to your employer":`Submit to finalise your pay information to ${rs(n)}`),"Once you submit, you’ll be unable to view or edit your details.",!1,r):i?Gi("Before you continue","Submit to finalise your pay information to your employer and continue to access your workplace benefits","",!0,r):Gi("Submit your details","Submit to finalise your pay information to your employer","",!1,r)}function qi(e,t){let n;return d("div",C(y([["className",ve(" ",["animate-pulse w-full relative",e,t])],(n=[d("div",{className:ve(" ",["w-full left-0 top-0 absolute bg-gray-200 rounded",e])})],["children",b.Children.toArray(Array.from(n))])])))}const C3=qi("h-9","max-w-96"),Rh=qi("h-6","max-w-96"),S3=qi("h-80","max-w-96"),k3=qi("h-10","max-w-48"),x3=(()=>{let e,t,n;const r=[d("div",C(y([(e="w-full h-full px-8 py-20 bg-white rounded border border-zinc-200 flex-col justify-start items-center gap-10 inline-flex",["className",e]),(t=[d("div",C(y([["className","max-w-96 w-full flex-col justify-start items-center gap-6 flex"],(n=[C3,d("div",{className:"self-stretch h-14 flex-col justify-start items-center gap-2 flex",children:b.Children.toArray([Rh,Rh])})],["children",b.Children.toArray(Array.from(n))])]))),S3,k3],["children",b.Children.toArray(Array.from(t))])])))];return d(Me,{},...r)})();function I3(e){let t;const n=e.accessToken,r=e.appMode;let s;const i=NC(n);s=tl(()=>Oi(()=>i,(c,p)=>LC(n,r,c,p),(c,p)=>{}),void 0,[]);const o=s[0],a=s[1];ii(ub(()=>EC(o.ProcessInstanceId,n),c=>{a(new H(0,[c]))}),[]),ii(()=>{xg()},[]),ii(()=>{const c=o.CurrentView;let p;switch(o.WorkflowDetail.tag===2?c.tag===2?O(c.fields[0].Id,new xe(4,[]))?(p=0,c.fields[0]):O(c.fields[0].Id,new xe(5,[]))?(p=1,c.fields[0]):p=2:p=2:p=3,p){case 0:break;case 1:break;case 2:{ol(E(ll(r)),2);break}}},[o.CurrentView,o.WorkflowDetail]),hr(()=>{window.addEventListener("step-completion",c=>{a(new H(3,[c]))})});const l=o.WorkflowDetail;let u,f;switch(l.tag){case 2:{l.fields[0].tag===1?u=2:(u=1,f=l.fields[0].fields[0]);break}case 3:{u=2;break}default:u=0}switch(u){case 0:return d("div",{children:["Please wait..."]});case 1:{const c=f.JourneyType;return d("div",C(y([["className","w-full min-h-[600px] mx-auto bg-white"],(t=ge(T(()=>W(Ie(p=>d("style",{children:[p]}),o.CssOverrides),T(()=>{const p=o.CurrentView;switch(p.tag){case 1:return W(_(d(JC,{detail:f,dispatch:a})),T(()=>(un(0),cr())));case 2:{const m=p.fields[0];let $;const g=m.Id;return $=g.tag===4?d(Th,{step:new xe(4,[]),props:[new zi(1,[n]),new zi(0,[`${Vn}/super-selection/backend/v1.0/`]),new ZC(ll(r))],effect:()=>{a(new H(12,[])),un(2500)},children:[]}):d(Th,{step:g,props:[new zi(1,[n]),new zi(0,[Vn]),new XC(rn(mr(o.ProcessInstanceId)))],effect:()=>{un(1500)},children:[]}),_(d(m3,{dispatch:a,detail:f,currentStep:m,body:$}))}case 3:return W(_(d(b3,{wd:f,dispatch:a})),T(()=>(un(0),cr())));case 4:return W(_(d("div",{className:"text-center mt-5",children:"We had an issue. Please try again shortly."})),T(()=>(un(0),cr())));case 5:{const m=Be(j_,f.Branding);let $;if(f.AppMode.tag===0)$=0;else switch(c.tag){case 1:{$=2;break}case 2:{$=3;break}case 3:case 4:{$=4;break}default:$=1}switch($){case 0:return _(x3);case 1:return _(Ss(ml(m,"onboarding")));case 2:return _(Ss(ml(m,"information request")));case 3:return _(Ss($h()));default:return _(Ss(li()))}}default:return _(d("div",{children:["Please wait..."]}))}})))),["children",b.Children.toArray(Array.from(t))])])))}default:return Ss(li())}}function A3(e){return{render:function(t){Os(t,e)},unmount:function(){po(e)}}}class E3 extends F{constructor(t,n,r){super(),this.model=t,this.render=n,this.equal=r}}class T3 extends lt{constructor(t){super(t)}shouldComponentUpdate(t,n){const r=this;return!r.props.equal(r.props.model,t.model)}render(){return this.props.render()}}function P3(e,t,n,r){const s=new E3(n,()=>t(n,r),e);return d(T3,s)}const M3=(()=>{try{return Ho(_u.slice(void 0,2),511,!1,32)>=18}catch{return!1}})();function O3(e,t,n){let r;return m0(re(M3?(r=A3(document.getElementById(t)),s=>i=>{r.render(e(o=>a=>o===a,p0(n),s,i))}):s=>i=>{Os(e(o=>a=>o===a,p0(n),s,i),document.getElementById(t))}),n)}function D3(e,t){return O3((n,r,s,i)=>P3(re(n),re(r),s,i),e,t)}function N3(e,t){const n=encodeURIComponent(jv(t)),r=encodeURIComponent(k2),s=encodeURIComponent(x2(new Ar(0,[])));return A.Delay(()=>{let i,o;const a=ps(pn(new Zt(1,[`grant_type=authorization_code&code=${n}&client_id=${r}&redirect_uri=${s}`]),(i=Kt(new Bt(1,[]),Xt(`${b2}/connect/token`)),Fi(fl("application/x-www-form-urlencoded"),i))));return o=A.Bind(a,l=>A.Return(new h(0,[l]))),A.Bind(o,l=>{const u=l;if(u.tag===1)return A.Return(new h(1,[u.fields[0]]));{const f=u.fields[0];if(f.statusCode===200){const c=en(re(tn(hl(),void 0)),f.responseText);return A.Return(c)}else return A.Return(new h(1,["Unexpected result from backend"]))}})})}function R3(){return new Ir(0,[])}function xl(e){return $i(e)}function L3(e,t){return A.Delay(()=>{let n;return A.Bind(gg([(n=N3(e,t),A.Bind(n,r=>A.Return(r))),A.Delay(()=>A.Bind(xl(2e3),()=>A.Return(void 0)))]),r=>A.Return(se(0,r)))})}function B3(e,t,n){let r;switch(e.tag){case 1:switch(t.tag){case 1:return[t,Ka(s=>{qe(s)},xl,1e3,()=>new jn(1,[]))];case 2:return t.fields[0].tag===1?[t,te()]:[t,Ka(s=>{qe(s)},xl,2e3,()=>new jn(2,[]))];default:return[new Ir(2,[new h(1,["No current authenticated user"])]),te()]}case 2:return[t,(r=window.location.pathname,f0(s=>{ol(E(r),1)}))];default:return e.fields[0].tag===1?e.fields[0].fields[0].tag===1?[new Ir(2,[new h(1,[`SignIn failed: ${e.fields[0].fields[0].fields[0]}`])]),te()]:(window.gtag&&window.gtag("event","oidc_sign_in",{}),[new Ir(2,[new h(0,[e.fields[0].fields[0].fields[0]])]),e.fields[2]?te():E(s=>{s(new jn(2,[]))})]):[new Ir(1,[]),St(s=>{qe(s)},s=>L3(s[0],s[1]),[n,e.fields[1]],s=>{const i=[new Se(1,[s]),e.fields[1],e.fields[2]];return new jn(0,[i[0],i[1],i[2]])},s=>{const i=[new Se(1,[new h(1,[s.message])]),e.fields[1],e.fields[2]];return new jn(0,[i[0],i[1],i[2]])})]}}function V3(){const e=qu(window.sessionStorage.getItem("credentials"));if(e!=null){const t=e,n=en(re(tn(hl(),void 0)),t);return n.tag===1?void 0:n.fields[0]}}function F3(e){let t;const n=["credentials",(t=new ph(e.id_token,e.access_token,e.expires_in,void 0,e.scope,e.token_type),$n(0,gn(hl(),void 0,void 0,void 0)(t)))];window.sessionStorage.setItem(n[0],n[1])}function Lh(e,t){return Xa(n=>new wn(3,[n]),E(n=>{n(new jn(0,[new Se(0,[]),e,t]))}))}function Il(e){return Lh(e,!1)}function W3(e){return Lh(e,!0)}function j3(){const e=gh(T0(window.location.pathname+window.location.search,2)),t=e[0],n=e[1],r=new zn(t,R3(),n);switch(t.tag){case 4:case 1:case 2:case 5:case 6:return[r,te()];case 0:{const s=V3();let i;switch(n.tag){case 0:case 2:{i=1;break}default:s==null?i=1:i=0}switch(i){case 0:return[new zn(r.CurrentPage,new Ir(2,[new h(0,[s])]),r.AppMode),te()];default:return[r,E(o=>{o(new wn(5,[]))})]}}default:return[r,Il(t.fields[0])]}}function U3(e,t){switch(e.tag){case 1:{const n=e.fields[0];return[new zn(new U(3,[n]),t.Credentials,t.AppMode),Il(n)]}case 2:return[new zn(new U(4,[]),t.Credentials,t.AppMode),Xa(n=>new wn(3,[n]),E(n=>{n(new jn(1,[]))}))];case 3:{const n=B3(e.fields[0],t.Credentials,t.AppMode),r=n[0];let s,i;switch(r.tag===2&&r.fields[0].tag===0&&t.AppMode.tag===1?(s=0,i=r.fields[0].fields[0]):s=1,s){case 0:{F3(i);break}}return[new zn(t.CurrentPage,r,t.AppMode),Xa(o=>new wn(3,[o]),n[1])]}case 4:return[t,W3(e.fields[0])];case 5:return[new zn(new U(6,[]),t.Credentials,t.AppMode),te()];default:{const n=gh(e.fields[0])[0],r=new zn(n,t.Credentials,t.AppMode);return n.tag===3?[r,Il(n.fields[0])]:[r,te()]}}}const Bh=d("div",C(y([["className","flex flex-col justify-center items-center pt-10"],(()=>{const e=[li()];return["children",b.Children.toArray(Array.from(e))]})()])));function z3(e){switch(e.CurrentPage.tag){case 3:case 4:case 2:return E("bg-white h-full");default:return de()}}function H3(e){switch(e.tag){case 1:return d("style",{children:[`
809
+ `))(c);return m=>p(m)}}else if(Vu(r))if(Eo(r)){const f=ir(c=>xt(e,t,!1,c),Uu(r));return c=>p=>Array.isArray(p)?_t(m=>Gm(ar(m)),dh(0,f,c,p)):new h(1,[[c,new V(0,["an array",p])]])}else switch(ye(Fu(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=xt(e,t,!0,se(0,tt(r))),c=>p=>Cv(re(s),c,p);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=xt(e,t,!1,se(0,tt(r))),c=>p=>uh(re(i),c,p);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=xt(e,t,!1,se(0,tt(r))),c=>p=>Sv(re(o),c,p);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const c=xt(e,t,!1,se(0,tt(r))),p=xt(e,t,!1,se(1,tt(r)));let m;const $=y([g=>w=>Mv(re(c),re(p),g,w),(a=Av(re(c),re(p)),g=>w=>uh(re(a),g,w))]);return m=g=>w=>kv($,g,w),g=>w=>Iv(Ev,re(m),g,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const c=xt(e,t,!1,se(0,tt(r)));return p=>m=>{const $=ch(re(c),p,m);return $.tag===0?new h(0,[Tv($.fields[0])]):new h(1,[$.fields[0]])}}default:return mh(e,t,n,r)}else switch(l){case"System.Boolean":return f=>c=>gv(f,c);case"Microsoft.FSharp.Core.Unit":return f=>c=>$v(f,c);case"System.String":return f=>c=>th(f,c);case"System.Char":return f=>c=>mv(f,c);case"System.SByte":return nh;case"System.Byte":return rh;case"System.Int16":return sh;case"System.UInt16":return ih;case"System.Int32":return oh;case"System.UInt32":return ah;case"System.Double":return f=>c=>wv(f,c);case"System.Single":return f=>c=>yv(f,c);case"System.DateTime":return f=>c=>_v(f,c);case"System.DateTimeOffset":return f=>c=>vv(f,c);case"System.TimeSpan":return f=>c=>bv(f,c);case"System.Guid":return f=>c=>pv(f,c);case"System.Object":return f=>c=>new h(0,[c]);default:return mh(e,t,n,r)}else{const f=u;return c=>p=>f.contents(c)(p)}}function Ov(e){return cl({Compare:Ls})}function tn(e,t,n){const r=Te(t,new He(0,[]));return xt(Ov(),r,!1,e)}class Dv{constructor(t){this.magicLink=t,this.backendUrl=`${Vn}/workflows/public-backend/invites/${this.magicLink.InviteToken}`}}function Nv(e){return new Dv(e)}function Rv(e){return A.Delay(()=>{let t,n;const r=ws(e,(t=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/magic-link/validate`)),pn(new Zt(1,[(n=new S0(e.magicLink.MagicCode),$n(0,gn(U_(),new He(1,[]),void 0,void 0)(n)))]),t)));return A.Bind(r,s=>{const i=s;if(i.tag===1)return A.Return(new h(1,[i.fields[0]]));{let o;const a=i.fields[0];return o=a.statusCode===200?en(re(tn(J_(),new He(1,[]))),a.responseText):new h(1,["Unexpected response from backend"]),A.Return(o)}})})}function Lv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/magic-link/reissue`)),pn(new Zt(1,[(r=new k0(e.magicLink.MagicCode,t),$n(0,gn(Z_(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(e2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Bv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/one-time-code/issue`)),pn(new Zt(1,[(r=new x0(e.magicLink.MagicCode,t),$n(0,gn(t2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(i2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Vv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/one-time-code/validate`)),pn(new Zt(1,[(r=new I0(t),$n(0,gn(o2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(c2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function Fv(e,t){return A.Delay(()=>{let n,r;const s=ws(e,(n=Kt(new Bt(1,[]),Xt(`${e.backendUrl}/progress`)),pn(new Zt(1,[(r=new A0(e.magicLink.MagicCode,t),$n(0,gn(f2(),new He(1,[]),void 0,void 0)(r)))]),n)));return A.Bind(s,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?en(re(tn(p2(),new He(1,[]))),l.responseText):new h(1,["Unexpected response from backend"]),A.Return(a)}})})}function ws(e,t){return A.Delay(()=>{let n;const r=ps(t);return n=A.Bind(r,s=>A.Return(new h(0,[s]))),A.Bind(n,s=>{const i=s;if(i.tag===1)return A.Return(new h(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===429||o.statusCode>=500){let a;const l=$i(2e3);return a=A.Bind(l,u=>A.Return(new h(0,[u]))),A.Bind(a,u=>{const f=u;if(f.tag===1)return A.Return(new h(1,[f.fields[0]]));{const c=ps(t);return A.Bind(c,p=>A.Return(new h(0,[p])))}})}else return A.Return(new h(0,[o]))}})})}class Wv extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AuthCode"]}}function dl(e){return new Wv(e)}function jv(e){return e.fields[0]}class ph extends F{constructor(t,n,r,s,i,o){super(),this.id_token=t,this.access_token=n,this.expires_in=r,this.refresh_token=s,this.scope=i,this.token_type=o}}function hl(){return fe("Workflows.UI.Auth.Types.Credentials",[],ph,()=>[["id_token",G],["access_token",G],["expires_in",Fm],["refresh_token",X(G)],["scope",G],["token_type",G]])}let jn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SignIn","SignInWithCurrentAuth","NavigateToOnboarding"]}};function Uv(){return[new sl(de(),new q(0,[]),void 0,new b0(0,[new C0(void 0)])),E(e=>{e(new z(1,[new Se(0,[])]))})]}function zv(e,t,n,r,s){let i,o,a,l,u,f,c;const p=Nv(e);switch(r.tag){case 1:if(r.fields[0].tag===1){if(r.fields[0].fields[0].tag===1)return[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})];{let m;const $=r.fields[0].fields[0].fields[0].Outcome;switch($.tag){case 1:{const g=$.fields[0],w=g.OneTimeCodeOptionAvailable;m=g.IsInitialMagicLinkUsed?w?new z(0,[new q(1,[g.FirstName,new rl(1,[])])]):new z(0,[new q(1,[g.FirstName,new rl(0,[])])]):w?new z(3,[!1,new Se(0,[])]):new z(0,[new q(4,[])]);break}case 4:{m=new z(0,[new q(5,[])]);break}case 2:case 7:{m=new z(0,[new q(6,[new ie(2,[])])]);break}case 3:{m=new z(0,[new q(6,[new ie(4,[])])]);break}case 5:{m=new z(0,[new q(6,[new ie(3,[])])]);break}case 6:{m=new z(0,[new q(6,[new ie(1,[])])]);break}default:{const g=$.fields[0];g.IsInitialMagicLinkUsed?(n(dl(g.AuthCode)),m=new z(0,[new q(1,[g.FirstName,new rl(2,[])])])):m=new z(6,[g.AuthCode])}}return[new sl(r.fields[0].fields[0].fields[0].CssOverrides,s.Page,G_(r.fields[0].fields[0].fields[0].Outcome),Te(q_(r.fields[0].fields[0].fields[0].Outcome),s.JourneyType)),E(g=>{g(m)})]}}else return[s,St(m=>{qe(m)},()=>Rv(p),void 0,m=>new z(1,[new Se(1,[m])]),m=>new z(1,[new Se(1,[new h(1,[m.message])])]))];case 2:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(i=new z(0,[(o=r.fields[1].fields[0].fields[0].Outcome,o.tag===2?new q(2,[o.fields[0].MaskedEmail]):o.tag===1?new q(6,[new ie(2,[])]):o.tag===5?new q(6,[new ie(2,[])]):o.tag===3?new q(6,[new ie(4,[])]):o.tag===4?new q(6,[new ie(1,[])]):o.tag===6?new q(5,[]):o.tag===7?new q(6,[new ie(3,[])]):new q(2,[o.fields[0].MaskedEmail]))]),E(m=>{m(i)}))]:[s,St(m=>{qe(m)},m=>Lv(p,m),r.fields[0],m=>new z(2,[r.fields[0],new Se(1,[m])]),m=>new z(2,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 3:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(a=new z(0,[(l=r.fields[1].fields[0].fields[0].Outcome,l.tag===1?new q(4,[]):l.tag===2?new q(6,[new ie(0,[])]):l.tag===3?r.fields[0]?s.Page:new q(3,[l.fields[0].MaskedPhone]):l.tag===4?new q(6,[new ie(2,[])]):l.tag===7?new q(6,[new ie(2,[])]):l.tag===5?new q(6,[new ie(4,[])]):l.tag===6?new q(6,[new ie(1,[])]):l.tag===8?new q(5,[]):l.tag===9?new q(6,[new ie(3,[])]):r.fields[0]?s.Page:new q(3,[l.fields[0].MaskedPhone]))]),E(m=>{m(a)}))]:[s,St(m=>{qe(m)},m=>Bv(p,m),r.fields[0],m=>new z(3,[r.fields[0],new Se(1,[m])]),m=>new z(3,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 4:return r.fields[2].tag===1?r.fields[2].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(u=r.fields[2].fields[0].fields[0].Outcome,u.tag===1?u.fields[0].RemainingAttempts>0?(r.fields[1]({AttemptsRemaining:u.fields[0].RemainingAttempts}),te()):E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):u.tag===5?E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):u.tag===2?(r.fields[1]({}),te()):u.tag===3?(r.fields[1]({}),te()):u.tag===4?(r.fields[1]({}),te()):u.tag===6?E(m=>{m(new z(0,[new q(6,[new ie(4,[])])]))}):u.tag===7?E(m=>{m(new z(0,[new q(6,[new ie(1,[])])]))}):u.tag===8?E(m=>{m(new z(0,[new q(6,[new ie(2,[])])]))}):u.tag===9?E(m=>{m(new z(0,[new q(5,[])]))}):u.tag===10?E(m=>{m(new z(0,[new q(6,[new ie(0,[])])]))}):E(m=>{m(new z(6,[u.fields[0].AuthCode]))}))]:[s,St(m=>{qe(m)},m=>Vv(p,m),r.fields[0],m=>new z(4,[r.fields[0],r.fields[1],new Se(1,[m])]),m=>new z(4,[r.fields[0],r.fields[1],new Se(1,[new h(1,[m.message])])]))];case 5:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,E(m=>{m(new z(0,[new q(6,[new ie(5,[])])]))})]:[s,(f=(c=r.fields[1].fields[0].fields[0].Outcome,c.tag===1?new z(0,[new q(6,[new ie(2,[])])]):c.tag===4?new z(0,[new q(6,[new ie(2,[])])]):c.tag===2?new z(0,[new q(6,[new ie(4,[])])]):c.tag===3?new z(0,[new q(6,[new ie(1,[])])]):c.tag===5?new z(0,[new q(5,[])]):c.tag===6?new z(0,[new q(6,[new ie(0,[])])]):r.fields[0].tag===1?new z(3,[!1,new Se(0,[])]):r.fields[0].tag===2?new z(6,[void 0]):new z(2,[!1,new Se(0,[])])),E(m=>{m(f)}))]:[s,St(m=>{qe(m)},m=>Fv(p,m),r.fields[0].tag===1?!1:r.fields[0].tag===2,m=>new z(5,[r.fields[0],new Se(1,[m])]),m=>new z(5,[r.fields[0],new Se(1,[new h(1,[m.message])])]))];case 6:return t(Be(dl,r.fields[0])),[s,te()];default:return[new sl(s.CssOverrides,r.fields[0],s.Branding,s.JourneyType),te()]}}function Hv(e,t,n,r){const s=oi(!1),i=Be(l=>d("span",{className:"font-semibold",children:`${l}`}),on(l=>l.CompanyName,t)),o=n.tag===1?`Hi, ${e}`:n.tag===2?`${e}, join your workplace benefits program`:`Welcome, ${e}`,a=ge(T(()=>{let l,u;return W((l=n,l.tag===1?_(Sc([])):l.tag===2?_(d("div",C(y([["className","sm:w-[700px]"],(u=[d("img",{src:"/workflows/app/app-invite/welcome.png"})],["children",b.Children.toArray(Array.from(u))])])))):_(Sc([]))),T(()=>W(_(An(o)),T(()=>{let f;return W(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(f=ge(T(()=>{let c;return n.tag===1?W(_(Te(i,d("span",{children:["Your employer"]}))),T(()=>W(_(d("span",{children:[" has requested additional information from you."]})),T(()=>_(d("p",{children:["Sign in to complete your information request."]})))))):n.tag===2?_((c="Your employer has partnered with Flare Benefits to give you exclusive access to savings and perks from Australia’s most-loved brands, plus special offers to help you save on bigger expenses like household utilities, health insurance and more.",d("p",{children:[c]}))):W(_(d("p",{children:["Congratulations on the new role!"]})),T(()=>{let p;return _((p=y([d("span",{children:["Sign in to complete your onboarding with "]}),Te(i,d("span",{children:["your employer"]})),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})))}))})),["children",b.Children.toArray(Array.from(f))])])))),T(()=>_(Go(void 0,()=>{s[1](!0),r()},s[0],[d("span",{children:[n.tag===1?"Sign in":n.tag===2?"Continue":"Sign in"]})]))))}))))}));return d(Me,{},...a)}function Gv(e,t){let n,r,s,i;const o=[gp([]),An("Check your inbox"),d("div",C(y([(n="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",n]),(r=[(s=y([d("span",{children:["We’ve sent a temporary access link to "]}),d("span",{className:"font-semibold",children:dc(e,"*","•")}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(s))})),d("p",{children:["Click the link to confirm your email address and sign in. The link is valid for 5 minutes."]})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","text-sm text-gray-900 whitespace-pre-wrap mt-10 sm:mt-14 space-y-4 leading-5"],(i=ge(T(()=>W(_(d("p",{children:["Can’t see the email? Check your spam folder."]})),T(()=>{const a=t;return a==null?_(ne()):_(si(a))})))),["children",b.Children.toArray(Array.from(i))])])))];return d(Me,{},...o)}let nn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ResendTimerTick","SignIn","IncorrectOneTimeCodeCallback","SetCodeInvalid","SetCodeInputValue","SetReissueLinkInProgress"]}},Un=class extends F{constructor(t,n,r,s,i,o){super(),this.AttemptsRemaining=t,this.CodeInvalid=n,this.CodeInputValue=r,this.ResendTimer=s,this.SignInInProgress=i,this.ReissueLinkInProgress=o}};function qv(){return[new Un(void 0,!1,"",void 0,!1,!1),te()]}function Yv(e,t,n){let r;switch(t.tag){case 1:{const s=Do(ea,n.CodeInputValue);return s.length===6?(e([Ho(s,511,!1,32),t.fields[0]]),[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,!0,n.ReissueLinkInProgress),te()]):[n,E(i=>{i(new nn(3,[!0]))})]}case 2:return[new Un(t.fields[0],n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),E(s=>{s(new nn(3,[!0]))})];case 3:{const s=t.fields[0];return[new Un(n.AttemptsRemaining,s,s?"":n.CodeInputValue,n.ResendTimer,!1,n.ReissueLinkInProgress),te()]}case 4:return[new Un(n.AttemptsRemaining,n.CodeInvalid,t.fields[0],n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),te()];case 5:return[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,!0),te()];default:{const s=Ka(a=>{qe(a)},()=>A.Delay(()=>A.Bind($i(1e3),()=>A.Return(void 0))),void 0,()=>new nn(0,[]));let i;const o=n.ResendTimer;return i=o!=null?o>0?(r=o|0,[r-1,s]):[void 0,te()]:[20,s],[new Un(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,i[0],n.SignInInProgress,n.ReissueLinkInProgress),i[1]]}}}function ji(e){e.target.id==="one-time-code-input"||e.key!=="Enter"&&document.getElementById("one-time-code-input").focus()}function Jv(){document.addEventListener("keypress",e=>{ji(e)}),document.addEventListener("paste",e=>{ji(e)})}const Zv={Dispose(){document.removeEventListener("keypress",e=>{ji(e)}),document.removeEventListener("paste",e=>{ji(e)})}};function Xv(e){const t=e.reissueLink,n=e.reissueOneTimeCode,r=e.validateOneTimeCode,s=e.maskedPhone,i=tl(()=>Oi(qv,(f,c)=>Yv(r,f,c),(f,c)=>{}),void 0,void 0),o=i[0],a=i[1];qo(()=>(Jv(),Zv),new Array(0));const l=()=>{a(new nn(1,[f=>{a(new nn(2,[f.AttemptsRemaining]))}]))},u=ge(T(()=>W(_($p([])),T(()=>W(_(An("Enter your security code")),T(()=>{let f,c,p;return W(_(d("div",C(y([(f="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",f]),(c=[(p=y([d("span",{children:["We’ve sent a security code to your mobile number ending in •••"]}),d("span",{className:"font-semibold",children:Do(ea,s)}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})),d("p",{children:["Enter your code to sign in."]})],["children",b.Children.toArray(Array.from(c))])])))),T(()=>{let m;return W(_(d("div",C(y([["className","mt-8 flex relative"],(m=ge(T(()=>{let $;return W(_(d("input",C(y([["className","absolute w-full h-full peer z-10 opacity-0"],["id","one-time-code-input"],["type","text"],["autoComplete","one-time-code"],["maxLength",6],["onClick",g=>{const w=g.target;w.selectionStart=o.CodeInputValue.length|0,w.selectionEnd=o.CodeInputValue.length|0,a(new nn(3,[!1]))}],["onChange",g=>{const w=Do(ea,g.target.value);a(new nn(4,[w])),w.length===6&&l()}],($=o.CodeInputValue,["ref",g=>{g!=null&&!O(g.value,$)&&(g.value=$)}])])))),T(()=>Cc(g=>{const w=Be(S=>S,pc(g,o.CodeInputValue.split(""))),v=Be(S=>S,pc(g-1,o.CodeInputValue.split("")));return _(d("div",{key:g,className:ve(" ",ge(T(()=>W(_("flex justify-center items-center text-xl w-10 h-12 rounded-md ring-inset ring-1 transition ease-in"),T(()=>W(o.CodeInvalid?_("ring-red-600"):_("ring-gray-400"),T(()=>W(_(g===2?"mr-4":g===5?"":"mr-2"),T(()=>w!=null||v!=null||g===0?_("peer-focus:ring-2 peer-focus:ring-primary-base"):cr()))))))))),children:Te(w,"")}))},d0(0,1,5))))})),["children",b.Children.toArray(Array.from(m))])])))),T(()=>{let $;return W(o.CodeInvalid?_(d("p",C(y([["className","w-[288px] text-red-600 mt-2 leading-5"],($=ge(T(()=>W(_("The code you entered is invalid"),T(()=>{let g;return W((g=o.AttemptsRemaining,g==null?_(ne()):_(`, you have ${g} attempts remaining`)),T(()=>W(_("."),T(()=>o.AttemptsRemaining==null?_(" Try again or click on the link below to resend the code."):_(ne())))))})))),["children",b.Children.toArray(Array.from($))])])))):cr(),T(()=>W(_(Go("sm:w-[288px] mt-6",l,o.SignInInProgress,[d("span",{children:["Continue"]})])),T(()=>{let g;return _(d("div",C(y([["className","mt-8 sm:mt-14 text-sm text-gray-900 whitespace-pre-wrap leading-5 space-y-4"],(g=ge(T(()=>{let w,v;return W((w=o.ResendTimer,w!=null?_(d("p",{children:[`Message sent. Wait ${w} seconds before trying again.`]})):_((v=y([d("span",{children:["Didn’t get the code? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:S=>{n(),a(new nn(0,[]))},children:"Resend message"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(v))})))),T(()=>{let S;return _((S=y([d("span",{children:["Still having trouble? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:N=>{o.ReissueLinkInProgress||(a(new nn(5,[])),t())},children:"Sign in with email instead"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(S))})))}))})),["children",b.Children.toArray(Array.from(g))])]))))}))))}))}))}))))));return d(Me,{},...u)}function Kv(e){const t=e.reissueLink,n=e.brandingOption,r=oi(!1),s=ge(T(()=>W(_(wp([])),T(()=>W(_(An("Access link timed-out")),T(()=>{let i,o;return W(_(d("div",C(y([(i="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",i]),(o=[d("p",{children:["Your 5-minute temporary access link has timed-out."]}),d("p",{children:["Get a new link to continue."]})],["children",b.Children.toArray(Array.from(o))])])))),T(()=>W(_(Go("mt-8 mb-8 sm:mb-14",()=>{r[1](!0),t()},r[0],[d("span",{children:["Get a new link"]})])),T(()=>{const a=n;return a==null?_(ne()):_(si(a))}))))}))))));return d(Me,{},...s)}function ml(e,t){const n=Te(on(s=>s.CompanyName,e),"your employer"),r=ge(T(()=>W(_(kc([])),T(()=>W(_(An("You’re all done")),T(()=>{let s;return W(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(s=[d("p",{children:[`Your ${t} is now complete and your pay information has now been submitted to ${n}.`]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(s))])])))),T(()=>{const i=e;return i==null?_(ne()):_(si(i))}))}))))));return d(Me,{},...r)}function $h(){let e,t,n,r,s,i,o,a,l;return d("div",C(y([["className","flex lg:min-w-[1024px] xl:min-w-[1280px] max-w-screen-xl justify-center"],(e=[d("div",C(y([["className","flex flex-col justify-center items-center"],(t=[kc([]),An("You’re all set!"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(n=[d("p",{children:["Access your exclusive benefits by downloading the Flare app."]}),d("div",C(y([["className","hidden lg:flex justify-center lg:py-8"],(r=[d("img",{className:"h-40",src:"/workflows/app/app-invite/qr.png"})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","flex items-center justify-center lg:hidden"],(s=[d("img",{className:"w-[280px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(s))])]))),d("p",C(y([["className","font-semibold pt-5 lg:pt-0"],(i=[d("span",{className:"lg:hidden",children:"Download the Flare App"}),d("span",{className:"hidden lg:block",children:"Scan to download"})],["children",b.Children.toArray(Array.from(i))])]))),d("p",{children:"Available on iOS and Android"})],["children",b.Children.toArray(Array.from(n))])]))),d("div",C(y([["className","flex space-x-6"],(o=[d("a",C(y([["href","https://apps.apple.com/us/app/flare/id1587276031"],["target","_blank"],["rel","noreferrer"],(a=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/app-store.png"})],["children",b.Children.toArray(Array.from(a))])]))),d("a",C(y([["href","https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits"],["target","_blank"],["rel","noreferrer"],(l=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/google-play.png"})],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(t))])]))),d("img",{className:"hidden lg:block w-[640px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(e))])])))}function Qv(e){switch(e.tag){case 1:return"information request";case 2:return"workflow";default:return"onboarding"}}function eb(e){const t=e.startAuthCodeExchangeBackground,n=e.navigateAuthCodeExchangePage,r=e.magicLink,s=tl(()=>Oi(Uv,(l,u)=>zv(r,n,t,l,u),(l,u)=>{}),void 0,void 0),i=s[0],o=s[1],a=ge(T(()=>W(Ie(l=>d("style",{children:[l]}),i.CssOverrides),T(()=>{const l=i.Page;switch(l.tag){case 1:return _(Hv(l.fields[0],i.Branding,i.JourneyType,()=>{o(new z(5,[l.fields[1],new Se(0,[])]))}));case 2:return _(Gv(l.fields[0],i.Branding));case 3:return _(d(Xv,{maskedPhone:l.fields[0],validateOneTimeCode:u=>{o(new z(4,[u[0],u[1],new Se(0,[])]))},reissueOneTimeCode:()=>{o(new z(3,[!0,new Se(0,[])]))},reissueLink:()=>{o(new z(2,[!0,new Se(0,[])]))}}));case 4:return _(d(Kv,{brandingOption:Gs(i.Branding),reissueLink:()=>{o(new z(2,[!1,new Se(0,[])]))}}));case 5:switch(i.JourneyType.tag){case 2:return _($h());default:return _(ml(i.Branding,Qv(i.JourneyType)))}case 6:return l.fields[0].tag===1?_(Wp()):l.fields[0].tag===0?_(d(Fp,{reissueMagicLink:()=>{o(new z(2,[!0,new Se(0,[])]))}})):l.fields[0].tag===5?_(li()):l.fields[0].tag===2?_(Pc(i.Branding)):l.fields[0].tag===3?_(jp(i.Branding)):_(Up(i.Branding));default:return _(Ip)}}))));return d(Me,{},...a)}function tb(e){let t,n,r;const s=e.startAuthCodeExchangeBackground,i=e.navigateAuthCodeExchangePage,o=e.inviteCode;return hr(()=>{un(0)}),d("div",C(y([(t="min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",C(y([["className","flex flex-col items-center justify-center sm:max-w-[640px]"],(r=ge(T(()=>{const a=g2(o);return a.tag===0?_(d(eb,{magicLink:a.fields[0],navigateAuthCodeExchangePage:i,startAuthCodeExchangeBackground:s})):_(Pc(void 0))})),["children",b.Children.toArray(Array.from(r))])]))),Xo],["children",b.Children.toArray(Array.from(n))])])))}class U extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Home","LegacyInvite","InviteV2","AuthCodeExchange","AuthCodeExchangeWithCurrentAuth","NotFound","LoggedOut"]}}function nb(e){let t,n,r;if(M(e))t=2;else if(k(e)==="workflows")if(M(P(e)))t=2;else switch(k(P(e))){case"app":{t=0,n=P(P(e));break}case"embed":{M(P(P(e)))?t=2:k(P(P(e)))==="v1.0"?(t=1,r=P(P(P(e)))):t=2;break}default:t=2}else t=2;switch(t){case 0:return new ua(1,[n]);case 1:return new ua(0,[r]);default:return new ua(2,[void 0])}}function rb(e){const t=mn(e);if(t!=null)return Be(r=>r[1],Xr(r=>r[0]==="code",t))}function gh(e){let t,n,r,s,i,o,a;const l=nb(e);switch(l.tag){case 1:return[M(l.fields[0])?M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):(t=mn(k(l.fields[0])),t!=null?M(t)?M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):k(t)[0]==="invite"?M(P(t))?M(P(l.fields[0]))?(n=k(t)[1],r=Uc(n),r.tag===1?new U(5,[]):new U(1,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[])):M(l.fields[0])?new U(0,[]):(s=mn(k(l.fields[0])),s!=null?M(s)?new U(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new U(2,[i])):new U(0,[]):new U(0,[]):new U(0,[]):new U(0,[]))),new Ar(1,[])];case 2:return[new U(5,[]),new Ar(2,[])];default:return[M(l.fields[0])?new U(0,[]):M(P(l.fields[0]))?new U(0,[]):(o=rb(k(P(l.fields[0]))),o!=null?M(P(P(l.fields[0])))?(a=o,new U(3,[dl(a)])):new U(0,[]):new U(0,[])),new Ar(0,[])]}}let zn=class extends F{constructor(t,n,r){super(),this.CurrentPage=t,this.Credentials=n,this.AppMode=r}},wn=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UrlChanged","NavigateAuthCodeExchangePage","NavigateAuthCodeExchangePageWithCurrentAuth","AuthMsg","StartAuthCodeExchangeBackground","DisplayLoggedOut"]}};function sb(){let e;return hr(()=>{un(0)}),d("div",C(y([["className","w-full sm:max-w-md mt-5 mx-1 text-center mx-auto"],(e=[d("h4",{className:"text-2xl",children:"You have been logged out of your onboarding due to inactivity"}),d("br",{}),d("p",{children:["To continue your onboarding, please find your onboarding invite email and click the link again."]})],["children",b.Children.toArray(Array.from(e))])])))}class ys extends Error{}ys.prototype.name="InvalidTokenError";function ib(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function ob(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return ib(t)}catch{return atob(t)}}function ab(e,t){if(typeof e!="string")throw new ys("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new ys(`Invalid token specified: missing part #${n+1}`);let s;try{s=ob(r)}catch(i){throw new ys(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ys(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}class ke extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function lb(e,t){switch(t.tag){case 1:return new ke(1,[]);case 3:return new ke(3,[t.fields[0]]);case 2:try{return new ke(2,[e(t.fields[0])])}catch(n){return new ke(3,[n])}default:return new ke(0,[])}}function ub(e,t){const n=Yo(hg());return Ec(()=>es(()=>{mg(n.current)})),Tc(r=>{pg(n.current)||fa(A.Delay(()=>A.TryWith(A.Delay(()=>(t(new ke(1,[])),A.Bind(e(r),s=>(t(new ke(2,[s])),A.Zero())))),s=>(t(new ke(3,[s])),A.Zero()))),n.current)})}function cb(e,t,n){e:for(;;){const r=e,s=t,i=n;if(M(i)){const o=r;return o.tag===1?new h(1,[o.fields[0]]):new h(0,[lr(o.fields[0])])}else{let o;const a=s(k(i));if(a.tag===1)o=new h(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new h(1,[l.fields[0]]):new h(0,[Qe(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=P(i);continue e}}}function fb(e,t){return cb(new h(0,[de()]),e,t)}function Pr(e){return fb(t=>t,e)}class db extends F{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function hb(){return fe("Workflows.Business.Aggregates.CommonDto.InviteBrandingDto",[],db,()=>[["CompanyName",X(G)],["Logo",X(G)],["Support",X(pb())]])}class mb extends F{constructor(t,n){super(),this.Email=t,this.Phone=n}}function pb(){return fe("Workflows.Business.Aggregates.CommonDto.SupportDto",[],mb,()=>[["Email",X(G)],["Phone",X(G)]])}function $b(e){let t;const n=e.Email;if(n!=null){const r=Gc(n);t=r.tag===1?new h(1,[r.fields[0]]):new h(0,[r.fields[0]])}else t=new h(0,[void 0]);if(t.tag===1)return new h(1,[t.fields[0]]);{let r;const s=e.Phone;if(s!=null){const i=qc(s);r=i.tag===1?new h(1,[i.fields[0]]):new h(0,[i.fields[0]])}else r=new h(0,[void 0]);return r.tag===1?new h(1,[r.fields[0]]):new h(0,[new Hc(t.fields[0],r.fields[0])])}}function gb(e){let t;const n=e.Logo;if(n!=null){const r=Jc(n);t=r.tag===1?new h(1,[r.fields[0]]):new h(0,[r.fields[0]])}else t=new h(0,[void 0]);if(t.tag===1)return new h(1,[t.fields[0]]);{let r;const s=e.CompanyName;if(s!=null){const i=Yc(s);r=i.tag===1?new h(1,[i.fields[0]]):new h(0,[i.fields[0]])}else r=new h(0,[void 0]);if(r.tag===1)return new h(1,[r.fields[0]]);{let i;const o=e.Support;if(o!=null){const a=$b(o);i=a.tag===1?new h(1,[a.fields[0]]):new h(0,[a.fields[0]])}else i=new h(0,[void 0]);return i.tag===1?new h(1,[i.fields[0]]):new h(0,[new zc(r.fields[0],t.fields[0],i.fields[0])])}}}class wb extends F{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.NumberOfAttempts=r|0,this.DateOfLastAttempt=s}}function yb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.SecondFactorDto",[],wb,()=>[["Code",G],["DateIssued",zt("System.DateTime")],["NumberOfAttempts",Hs],["DateOfLastAttempt",X(zt("System.DateTime"))]])}function _b(e){return new v$(_$(e.Code),e.DateIssued,e.NumberOfAttempts,e.DateOfLastAttempt)}class vb extends F{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.SecondFactor=r,this.Branding=s}}function bb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.InviteDto",[],vb,()=>[["Code",G],["DateIssued",zt("System.DateTime")],["SecondFactor",X(yb())],["Branding",X(hb())]])}function Cb(e){const t=Uc(e.Code);if(t.tag===1)return new h(1,[t.fields[0]]);{let n;const r=e.SecondFactor;n=r==null?void 0:_b(r);let s;const i=e.Branding;if(i!=null){const o=gb(i);s=o.tag===1?new h(1,[o.fields[0]]):new h(0,[o.fields[0]])}else s=new h(0,[void 0]);return s.tag===1?new h(1,[s.fields[0]]):new h(0,[new b$(t.fields[0],e.DateIssued,n,s.fields[0])])}}class Sb extends F{constructor(t,n,r){super(),this.Id=t,this.DisplayName=n,this.ComponentTagName=r}}function kb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessStepConfigDto",[],Sb,()=>[["Id",G],["DisplayName",G],["ComponentTagName",G]])}function xb(e){return new h(0,[new Dt(Zc(e.Id),e.DisplayName,e.ComponentTagName)])}function Ib(e){return Pr(et(xb,e))}class Ab extends F{constructor(t,n){super(),this.ActivatedDates=t,this.CompletedSteps=n}}function Eb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ActiveProcessInstanceDto",[],Ab,()=>[["ActivatedDates",sn(zt("System.DateTime"))],["CompletedSteps",sn(Bm(G,zt("System.DateTime")))]])}function Tb(e){const t=Pr(et(n=>new h(0,[[Zc(n[0]),n[1]]]),e.CompletedSteps));return t.tag===1?new h(1,[t.fields[0]]):new h(0,[new mf(e.ActivatedDates,t.fields[0])])}class Pb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Inactive","Active","Complete","Abandoned"]}}function Mb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceStatusDto",[],Pb,()=>[[],[["Item",Eb()]],[["Item",zt("System.DateTime")]],[["Item",zt("System.DateTime")]]])}function Ob(e){switch(e.tag){case 1:{const t=Tb(e.fields[0]);return t.tag===1?new h(1,[t.fields[0]]):new h(0,[new ss(1,[t.fields[0]])])}case 2:return new h(0,[new ss(2,[e.fields[0]])]);case 3:return new h(0,[new ss(3,[e.fields[0]])]);default:return new h(0,[new ss(0,[])])}}class Db extends F{constructor(t,n,r){super(),this.Id=t,this.Name=n,this.Steps=r}}function Nb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessConfigDto",[],Db,()=>[["Id",zt("System.Guid")],["Name",G],["Steps",sn(kb())]])}function Rb(e){const t=Ib(e.Steps);if(t.tag===1)return new h(1,[t.fields[0]]);{const n=x$(e.Id);return n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Le(n.fields[0],e.Name,t.fields[0])])}}class Lb extends F{constructor(t,n){super(),this.Name=t,this.Value=n}}function Bb(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.TagDto",[],Lb,()=>[["Name",G],["Value",G]])}function Vb(e){return O$(e.Name,e.Value)}class Fb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WhenEnabled","Always"]}}function Wb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.BenefitsOnboardingShowOptionsDto",[],Fb,()=>[[],[]])}class jb extends F{constructor(t){super(),this.BenefitsOnboarding=t}}function Ub(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.StepsConfigurationDto",[],jb,()=>[["BenefitsOnboarding",X(Ke(["Show",Wb()]))]])}function zb(e){let t,n;return new N$((t=e.BenefitsOnboarding,t==null?void 0:(n=t,{Show:n.Show.tag===1?new gf(1,[]):new gf(0,[])})))}class Hb extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Default","InfoRequest","AppInvite","BenefitsExisting","BenefitsOnboarding"]}}function Gb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDto",[],Hb,()=>[[["Item",_s()]],[["Item",_s()]],[["Item",_s()]],[["Item",_s()]],[["Item",_s()]]])}class qb extends F{constructor(t){super(),this.Category=t}}function _s(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDetailsDto",[],qb,()=>[["Category",X(G)]])}function vs(e){return new $f(e.Category)}function Yb(e){if(e==null)return new pr(0,[new $f(void 0)]);switch(e.tag){case 1:{const t=e.fields[0];return new pr(1,[vs(t)])}case 2:{const t=e.fields[0];return new pr(2,[vs(t)])}case 3:{const t=e.fields[0];return new pr(3,[vs(t)])}case 4:{const t=e.fields[0];return new pr(4,[vs(t)])}default:{const t=e.fields[0];return new pr(0,[vs(t)])}}}class Jb extends F{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.Id=t|0,this.DateCreated=n,this.Configuration=r,this.Status=s,this.Invite=i,this.Tags=o,this.Creator=a,this.StepsConfiguration=l,this.JourneyType=u,this.IsBenefitsStepEnabled=f,this.PaySetupComplete=c}}function wh(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceDto",[],Jb,()=>[["Id",Hs],["DateCreated",zt("System.DateTime")],["Configuration",Nb()],["Status",Mb()],["Invite",X(bb())],["Tags",X(sn(Bb()))],["Creator",X(G)],["StepsConfiguration",X(Ub())],["JourneyType",X(Gb())],["IsBenefitsStepEnabled",X(ct)],["PaySetupComplete",X(ct)]])}function yh(e){let t,n;const r=Rb(e.Configuration);if(r.tag===1)return new h(1,[r.fields[0]]);{const s=r.fields[0],i=Ob(e.Status);if(i.tag===1)return new h(1,[i.fields[0]]);{const o=i.fields[0];let a;if(o.tag===1){const l=o.fields[0],u=Pr(et(f=>{const c=[f[0],f[1]],p=c[0];return yc(m=>O(m.Id,p),s.Steps)?new h(0,[[p,c[1]]]):new h(1,["Step id is not configured for this Process Instance."])},l.CompletedSteps));a=u.tag===1?new h(1,[u.fields[0]]):new h(0,[new ss(1,[new mf(l.ActivatedDates,u.fields[0])])])}else a=new h(0,[o]);if(a.tag===1)return new h(1,[a.fields[0]]);{let l;const u=e.Invite;if(u!=null){const f=Cb(u);l=f.tag===1?new h(1,[f.fields[0]]):new h(0,[f.fields[0]])}else l=new h(0,[void 0]);if(l.tag===1)return new h(1,[l.fields[0]]);{let f;const c=e.Tags;if(c!=null){const p=Pr(et(Vb,c));f=p.tag===1?new h(1,[p.fields[0]]):new h(0,[p.fields[0]])}else f=new h(0,[void 0]);return f.tag===1?new h(1,[f.fields[0]]):new h(0,[new D$(pf(e.Id),s,e.DateCreated,a.fields[0],l.fields[0],f.fields[0],(t=e.Creator,t==null?void 0:Wc(t)),(n=e.StepsConfiguration,n==null?void 0:zb(n)),Yb(e.JourneyType),e.IsBenefitsStepEnabled,e.PaySetupComplete)])}}}}}class bs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}class Zb extends F{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstance=n,this.IsBenefitsEnabled=r,this.Branding=s}}class Hn extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}function Xb(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.ProcessInstanceCommandDto",[],Hn,()=>[[["Item",G]],[["Item",G]],[],[["Item",ct]],[["Item",ct]],[["Item",ct]]])}function Kb(e){switch(e.tag){case 1:return new Hn(1,[fi(e.fields[0])]);case 2:return new Hn(2,[]);case 3:return new Hn(3,[e.fields[0]]);case 4:return new Hn(4,[e.fields[0]]);case 5:return new Hn(5,[e.fields[0]]);default:return new Hn(0,[fi(e.fields[0])])}}const Qb=yh;class eC extends F{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstanceDto=n,this.IsBenefitsEnabled=r,this.Branding=s}}function tC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.ProcessInstanceContextDto",[],eC,()=>[["CssOverrides",sn(G)],["ProcessInstanceDto",wh()],["IsBenefitsEnabled",ct],["Branding",X(rC())]])}class nC extends F{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function rC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Branding",[],nC,()=>[["CompanyName",X(G)],["Logo",X(G)],["Support",X(iC())]])}class sC extends F{constructor(t,n){super(),this.Email=t,this.Phone=n}}function iC(){return fe("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Support",[],sC,()=>[["Email",X(G)],["Phone",X(G)]])}function oC(e){let t,n,r,s,i,o,a,l,u,f,c,p,m,$,g,w,v,S;return new zc((t=(n=(r=e.CompanyName,r==null?void 0:Yc(r)),n!=null?(s=n,s.tag===1?new h(1,[s.fields[0]]):new h(0,[s.fields[0]])):new h(0,[void 0])),t.tag===1?void 0:t.fields[0]),(i=(o=(a=e.Logo,a==null?void 0:Jc(a)),o!=null?(l=o,l.tag===1?new h(1,[l.fields[0]]):new h(0,[l.fields[0]])):new h(0,[void 0])),i.tag===1?void 0:i.fields[0]),(u=e.Support,u==null?void 0:(f=u,new Hc((c=(p=(m=f.Email,m==null?void 0:Gc(m)),p!=null?($=p,$.tag===1?new h(1,[$.fields[0]]):new h(0,[$.fields[0]])):new h(0,[void 0])),c.tag===1?void 0:c.fields[0]),(g=(w=(v=f.Phone,v==null?void 0:qc(v)),w!=null?(S=w,S.tag===1?new h(1,[S.fields[0]]):new h(0,[S.fields[0]])):new h(0,[void 0])),g.tag===1?void 0:g.fields[0])))))}function aC(e){let t,n;return new Zb(e.CssOverrides,(t=yh(e.ProcessInstanceDto),t.tag===1?(()=>{throw new Error(t.fields[0])})():t.fields[0]),e.IsBenefitsEnabled,(n=e.Branding,n==null?void 0:oC(n)))}class Ui extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WorkflowInstanceStepActivated","BenefitsStepActivated","BenefitsStepCompleted"]}}function lC(){return $t("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Write.WorkflowAnalyticsEventDto",[],Ui,()=>[[["Item",G]],[],[]])}class xe extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PersonalDetails","EmergencyContacts","Bank","Tax","Super","WorkplaceLinking","BenefitsOnboarding","WorkplacePolicies","DiscreteBenefits"]}}class Cs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Hidden","Incomplete","Complete"]}}function pl(e){return e?new Cs(1,[]):new Cs(0,[])}class le extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Disabled","Active","Locked","CompletedAndDisabled"]}}function _h(e){return O(e,Ge)?new h(0,[new xe(0,[])]):O(e,ft)?new h(0,[new xe(1,[])]):O(e,dt)?new h(0,[new xe(2,[])]):O(e,ht)?new h(0,[new xe(3,[])]):O(e,Ne)?new h(0,[new xe(4,[])]):O(e,Tn)?new h(0,[new xe(5,[])]):O(e,Ht)?new h(0,[new xe(7,[])]):O(e,Pn)?new h(0,[new xe(8,[])]):new h(1,["Invalid step"])}function uC(e){switch(e.tag){case 1:return ft;case 2:return dt;case 3:return ht;case 4:return Ne;case 5:return Tn;case 6:return ci;case 7:return Ht;case 8:return Pn;default:return Ge}}function vh(e){switch(e.tag){case 1:return"Emergency contacts";case 2:return"Bank details";case 3:return"Tax declaration";case 4:return"Super nomination";case 5:return Tn.DisplayName;case 6:return"Workplace benefits";case 7:return"Fair Work";case 8:return Pn.DisplayName;default:return"Employee profile"}}function bh(e){switch(e.tag){case 1:return"Contacts";case 2:return"Bank";case 3:return"Tax";case 4:return"Super";case 5:return Tn.DisplayName;case 6:return"Benefits";case 7:return"Fair Work";case 8:return Pn.DisplayName;default:return"Profile"}}function Ch(e){switch(e.tag){case 1:return ft;case 2:return dt;case 3:return ht;case 4:return Ne;case 5:return Tn;case 6:return ci;case 7:return Ht;case 8:return Pn;default:return Ge}}function cC(e){switch(e.tag){case 5:case 6:case 8:return!1;default:return!0}}function fC(e,t){return e.tag===0?t:wt(t,E(new xe(6,[])))}class Mr extends F{constructor(t,n){super(),this.Id=t,this.Status=n}}function Gn(e){return vh(e.Id)}function dC(e){return bh(e.Id)}function hC(e){return Ch(e.Id).ComponentTagName}function mC(e){return Ch(e.Id).Id}function pC(e){return cC(e.Id)}function $C(e){if(e.Id.tag===0)return e}function gC(e){if(e.Id.tag===1)return e}function wC(e){return Xr(t=>O(t.Status,new le(2,[])),e)}function yC(e){return((n,r)=>{e:for(;;){const s=n,i=r;if(M(s))return i;if(O(k(s).Status,new le(2,[])))return Lo([i,E(k(s)),P(s)]);if(O(k(s).Status,new le(1,[])))return Lo([i,E(new Mr(k(s).Id,new le(2,[]))),P(s)]);n=P(s),r=wt(i,E(k(s)));continue e}})(e,de())}function $l(e,t){const n=Te(e.PaySetupComplete,!1);let r;const s=Pr(et(_h,e.Configuration.Steps));if(r=s.tag===1?new h(1,[s.fields[0]]):new h(0,[fC(t,s.fields[0])]),r.tag===1)return new h(1,[r.fields[0]]);{const i=Pr(et(_h,L$(e)));return i.tag===1?new h(1,[i.fields[0]]):new h(0,[yC(et(o=>n&&pC(o)&&O(o.Status,new le(0,[]))?new Mr(o.Id,new le(4,[])):o,et(o=>yc(a=>O(a,o.Id),i.fields[0])?new Mr(o.Id,new le(0,[])):o,et(o=>O(o.Id,new xe(6,[]))&&!n?new Mr(o.Id,new le(3,[])):o,et(o=>new Mr(o,new le(1,[])),r.fields[0])))))])}}class Sh extends F{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.AppMode=t,this.JourneyType=n,this.Branding=r,this.IsBenefitsStepEnabled=s,this.IsPaySetupCompatible=i,this.IsPaySetupComplete=o,this.Status=a,this.ProcessInstanceId=l,this.InstanceName=u,this.ProcessConfigId=f,this.Steps=c}}function kh(e){switch(e.Status.tag){case 3:return!1;case 0:return!1;case 1:return Te(e.PaySetupComplete,!1);default:return!0}}function _C(e,t){let n;const r=[t.ProcessInstance,pl(t.IsBenefitsEnabled)];return n=$l(r[0],r[1]),n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Sh(e,t.ProcessInstance.JourneyType,t.Branding,t.IsBenefitsEnabled,k$(t.ProcessInstance.Configuration),kh(t.ProcessInstance),t.ProcessInstance.Status,t.ProcessInstance.Id,t.ProcessInstance.Configuration.Name,t.ProcessInstance.Configuration.Id,n.fields[0])])}function gl(e,t){let n;const r=[t,pl(e.IsBenefitsStepEnabled)];return n=$l(r[0],r[1]),n.tag===1?new h(1,[n.fields[0]]):new h(0,[new Sh(e.AppMode,e.JourneyType,e.Branding,e.IsBenefitsStepEnabled,e.IsPaySetupCompatible,kh(t),t.Status,e.ProcessInstanceId,e.InstanceName,e.ProcessConfigId,n.fields[0])])}let oe=class extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","StepList","Step","PaySetupCompleteConfirmation","Oops","AllDone"]}};class H extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ActivateCallback","ChangeCurrentView","CloseStepListView","StepCompletionEventCallback","CompleteStep","ConfirmPaySetupComplete","ResumePaySetup","CompletePaySetup","PaySetupCompleted","CompleteWorkflow","ShowAllDoneAndNotifyComplete","SendAnalyticsEvent","AppendTrailingSlashToUrl","CompleteBenefitsOnboardingStep","CommandSuccess","CommandFailure"]}}class It extends F{constructor(t,n,r,s,i,o){super(),this.ProfileId=t,this.ProcessInstanceId=n,this.WorkflowDetail=r,this.CurrentView=s,this.CssOverrides=i,this.BenefitsOnboarding=o}}function wl(e){switch(e.tag){case 1:return"Information request";case 2:return"Workflow";case 3:return"Benefits Onboarding";case 4:return"Benefits Onboarding";default:return"Onboarding"}}function yl(e){if(e<640)return Ee(void 0)}function _l(e){return((n,r)=>{e:for(;;){const s=n,i=r;let o,a,l,u;if(M(s))o=0;else{const f=$C(k(s));if(f!=null)if(M(P(s)))o=2;else{const c=gC(k(P(s)));c!=null?(o=1,a=c,l=f,u=P(P(s))):o=2}else o=2}switch(o){case 0:return i;case 1:{n=u,r=wt(i,E(O(a.Status,new le(2,[]))?new Mr(l.Id,new le(2,[])):l));continue e}default:if(M(s))throw new Error("Match failure");n=P(s),r=wt(i,E(k(s)));continue e}}})(e,de())}function Ss(e){let t,n;return d("div",C(y([(t="absolute inset-0 min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",{className:"mt-5 px-4 flex flex-col items-center justify-center sm:max-w-[640px]",children:b.Children.toArray([e])}),Xo],["children",b.Children.toArray(Array.from(n))])])))}function vC(e,t){let n;const r=e.tag===2?e.fields[0]:void 0;let s;if(r==null)s=void 0;else{const u=r;s=on(f=>V1(f+1,t.Steps),ni(f=>O(u,f),t.Steps))}const i=Be(u=>new H(1,[new oe(2,[u])]),Xr(u=>O(u.Status,new le(2,[])),t.Steps));let o,a,l;switch(r!=null&&s!=null?(n=s,O(r.Status,new le(2,[]))&&(O(n.Status,new le(1,[]))?!0:O(n.Status,new le(3,[])))?(o=0,a=r):(o=1,l=s)):o=2,o){case 0:return new H(1,[new oe(2,[a])]);case 1:return O(l.Status,new le(3,[]))?void 0:new H(1,[new oe(2,[l])]);default:return i}}function bC(e,t){const n=e.IsPaySetupCompatible&&!e.IsPaySetupComplete&&or(e.Steps)!==1;let r;if(n)switch(t.tag){case 1:case 0:{r=0;break}default:r=1}else r=1;switch(r){case 0:return new H(5,[{Branding:Gs(e.Branding),InjectedBenefits:e.IsBenefitsStepEnabled}]);default:return}}function CC(e){if(ra(e.Status))return new H(10,[e])}function vl(e,t,n){return Te(Yu(Yu(CC(t),vC(e,t)),bC(t,n)),new H(9,[new ke(0,[])]))}function SC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/%i"))(Vn)(t)}function kC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/process-instances/%i/activate"))(Vn)(t)}function xC(e){const t=mr(e)|0;return je(We("%s/workflows/backend/process-instances/%i/analytics-events"))(Vn)(t)}function bl(e,t){return A.Delay(()=>{const n=Fi(H2(je(We("Bearer %s"))(e)),t);let r;const s=ps(n);return r=A.Bind(s,i=>A.Return(new h(0,[i]))),A.Bind(r,i=>{const o=i;if(o.tag===1)return A.Return(new h(1,[o.fields[0]]));{const a=o.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=ps(n);return A.Bind(l,u=>A.Return(new h(0,[u])))}else return A.Return(new h(0,[a]))}})})}function ks(e,t,n){return A.Delay(()=>{let r,s;const i=bl(n,(r=pn(new Zt(1,[(s=E(Kb(e)),$n(0,gn(sn(Xb()),new He(1,[]),void 0,void 0)(s)))]),Kt(new Bt(1,[]),Xt(SC(t)))),Fi(fl("application/json"),r)));return A.Bind(i,o=>{const a=o;if(a.tag===1)return A.Return(new h(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let u;const f=en(re(tn(wh(),new He(1,[]))),l.responseText);return u=f.tag===1?new h(1,[f.fields[0]]):Qb(f.fields[0]),A.Return(u)}else return A.Return(new h(1,["Unexpected response from backend"]))}})})}function IC(e,t){return A.Delay(()=>{const n=bl(t,Kt(new Bt(1,[]),Xt(kC(e))));return A.Bind(n,r=>{const s=r;if(s.tag===1)return A.Return(new h(1,[s.fields[0]]));{const i=s.fields[0];if(i.statusCode===200){let o;const a=en(re(tn(tC(),new He(1,[]))),i.responseText);return o=a.tag===1?new h(1,[a.fields[0]]):new h(0,[aC(a.fields[0])]),A.Return(o)}else return A.Return(new h(1,["Unexpected response from backend"]))}})})}function AC(e,t,n){let r;const s=A.Delay(()=>{let i;return bl(e,(i=pn(new Zt(1,[$n(0,gn(sn(lC()),new He(1,[]),void 0,void 0)(E(n)))]),Kt(new Bt(1,[]),Xt(xC(t)))),Fi(fl("application/json"),i)))});return r=A.Bind(s,i=>{let o;const a=i;return o=a.tag===1?new h(1,[a.fields[0]]):new h(0,[void a.fields[0]]),A.Return(o)}),A.Bind(r,i=>{const o=i;return o.tag===1||o.fields[0],A.Return()})}function EC(e,t){return IC(e,t)}function TC(e,t,n){return ks(new bs(1,[t]),e,n)}function PC(e,t,n){return ks(new bs(3,[n]),e,t)}function MC(e,t,n){return ks(new bs(4,[n]),e,t)}function OC(e,t,n){return ks(new bs(5,[n]),e,t)}function DC(e,t){return ks(new bs(2,[]),e,t)}function NC(e){const t=ab(e);return[new It(Wc(t.sub),pf(t.workflow.instanceId),new ke(0,[]),new oe(0,[]),de(),new Cs(0,[])),te()]}function RC(e,t,n,r,s){let i,o,a,l,u,f,c,p,m,$,g,w,v,S,N,Q,Z,Ae,at;switch(r.tag){case 1:{const x=r.fields[0];return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,x,s.CssOverrides,s.BenefitsOnboarding),x.tag===2?(i=uC(x.fields[0].Id),O(i.Id,ci.Id)?E(R=>{R(new H(11,[s.ProcessInstanceId,new Ui(1,[])]))}):(o=new H(11,[s.ProcessInstanceId,new Ui(0,[fi(i.Id)])]),E(R=>{R(o)}))):te()]}case 2:{const x=s.WorkflowDetail;let R,B;switch(x.tag===2&&x.fields[0].tag===0?(R=0,B=x.fields[0].fields[0]):R=1,R){case 0:{const ee=vl(s.CurrentView,B,s.BenefitsOnboarding);return[s,E(he=>{he(ee)})]}default:return[s,te()]}}case 11:return qe(AC(t,r.fields[0],r.fields[1])),[s,te()];case 3:{const x=s.WorkflowDetail;let R,B;switch(x.tag===2&&x.fields[0].tag===0?(R=0,B=x.fields[0].fields[0]):R=1,R){case 0:return[s,(a=r.fields[0].target,l=Xr(ee=>m1(hC(ee),a.tagName,5)===0,B.Steps),l==null?te():O(l.Id,new xe(6,[]))?E(ee=>{ee(new H(13,[]))}):(u=l,f=new H(4,[mC(u),new ke(0,[])]),E(ee=>{ee(f)})))];default:return[s,te()]}}case 13:{const x=s.WorkflowDetail;let R;switch(x.tag===2&&x.fields[0].tag===0?O(s.BenefitsOnboarding,new Cs(0,[]))?R=1:R=0:R=1,R){case 0:return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,s.CurrentView,s.CssOverrides,new Cs(2,[])),c0(y([E(B=>{B(new H(11,[s.ProcessInstanceId,new Ui(2,[])]))}),E(B=>{B(new H(9,[new ke(0,[])]))}),E(B=>{B(new H(1,[new oe(5,[])]))})]))];default:return[s,te()]}}case 4:{const x=r.fields[0],R=r.fields[1];switch(R.tag){case 1:return[s,te()];case 2:{const B=R.fields[0],ee=B;ee.tag===1?ee.fields[0]:Ig(x,ee.fields[0],s.ProfileId);let he;const At=s.WorkflowDetail;let qn,Yn;switch(At.tag===2&&At.fields[0].tag===0?(qn=0,Yn=At.fields[0].fields[0]):qn=1,qn){case 0:{he=new ke(2,[(c=B,c.tag===1?new h(1,[c.fields[0]]):gl(Yn,c.fields[0]))]);break}default:he=s.WorkflowDetail}return[new It(s.ProfileId,s.ProcessInstanceId,he,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(p=he.tag===2?he.fields[0].tag===1?new H(1,[new oe(4,[he.fields[0].fields[0]])]):vl(s.CurrentView,he.fields[0].fields[0],s.BenefitsOnboarding):he.tag===3?new H(1,[new oe(4,[he.fields[0].message])]):new H(1,[new oe(4,["Process Instance not resolved"])]),E(Yi=>{Yi(p)}))]}case 3:{const B=R.fields[0];return[new It(s.ProfileId,s.ProcessInstanceId,new ke(3,[B]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(m=new H(1,[new oe(4,[B.message])]),E(ee=>{ee(m)}))]}default:return[s,St(B=>{qe(B)},B=>TC(s.ProcessInstanceId,x,B),t,B=>new H(4,[x,new ke(2,[B])]),B=>new H(4,[x,new ke(3,[B])]))]}}case 5:return[new It(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,new oe(3,[]),s.CssOverrides,s.BenefitsOnboarding),St(x=>{qe(x)},x=>PC(s.ProcessInstanceId,t,x),r.fields[0].InjectedBenefits,x=>new H(14,[]),x=>new H(15,[x]))];case 6:return[s,c0(y([St(x=>{qe(x)},x=>OC(s.ProcessInstanceId,t,x),r.fields[0].InjectedBenefits,x=>new H(14,[]),x=>new H(15,[x])),($=s.WorkflowDetail,$.tag===2?$.fields[0].tag===0?(g=new H(1,[new oe(2,[P1(Bo(x=>O(x.Status,new le(0,[]))?!0:O(x.Status,new le(4,[])),$.fields[0].fields[0].Steps))])]),E(x=>{x(g)})):E(x=>{x(new H(1,[new oe(4,["Process Instance not resolved"])]))}):E(x=>{x(new H(1,[new oe(4,["Process Instance not resolved"])]))}))]))];case 7:return[s,St(x=>{qe(x)},Vs(e)(s.ProcessInstanceId)(t),r.fields[0].InjectedBenefits,x=>new H(8,[x]),x=>new H(15,[x]))];case 8:{let x;const R=s.WorkflowDetail;let B,ee;switch(R.tag===2&&R.fields[0].tag===0?(B=0,ee=R.fields[0].fields[0]):B=1,B){case 0:{x=new ke(2,[(w=r.fields[0],w.tag===1?new h(1,[w.fields[0]]):gl(ee,w.fields[0]))]);break}default:x=s.WorkflowDetail}return[new It(s.ProfileId,s.ProcessInstanceId,x,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(v=x.tag===2?x.fields[0].tag===1?new H(1,[new oe(4,[x.fields[0].fields[0]])]):vl(s.CurrentView,x.fields[0].fields[0],s.BenefitsOnboarding):x.tag===3?new H(1,[new oe(4,[x.fields[0].message])]):new H(1,[new oe(4,["Process Instance not resolved"])]),E(he=>{he(v)}))]}case 9:{const x=r.fields[0];switch(x.tag){case 1:return[s,te()];case 2:return x.fields[0].tag===1?[new It(s.ProfileId,s.ProcessInstanceId,new ke(2,[new h(1,[x.fields[0].fields[0]])]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),E(R=>{R(new H(1,[new oe(4,[x.fields[0].fields[0]])]))})]:(ha(x.fields[0].fields[0].Id,x.fields[0].fields[0].Configuration.Name,x.fields[0].fields[0].Configuration.Id,s.ProfileId),[new It(s.ProfileId,s.ProcessInstanceId,lb(R=>{const B=R;return B.tag===1?new h(1,[B.fields[0]]):gl(B.fields[0],x.fields[0].fields[0])},s.WorkflowDetail),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),E(R=>{R(new H(1,[new oe(5,[])]))})]);case 3:return[new It(s.ProfileId,s.ProcessInstanceId,new ke(3,[x.fields[0]]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(S=new H(1,[new oe(4,[x.fields[0].message])]),E(R=>{R(S)}))];default:{const R=s.WorkflowDetail;let B,ee;switch(R.tag===2&&R.fields[0].tag===0&&ra(R.fields[0].fields[0].Status)?(B=0,ee=R.fields[0].fields[0]):B=1,B){case 0:return ha(ee.ProcessInstanceId,ee.InstanceName,ee.ProcessConfigId,s.ProfileId),[s,te()];default:return[s,St(he=>{qe(he)},he=>DC(s.ProcessInstanceId,he),t,he=>new H(9,[new ke(2,[he])]),he=>new H(9,[new ke(3,[he])]))]}}}}case 10:{const x=r.fields[0];return ha(x.ProcessInstanceId,x.InstanceName,x.ProcessConfigId,s.ProfileId),[s,E(R=>{R(new H(1,[new oe(5,[])]))})]}case 12:return[s,(N=window.location.pathname+"/"+window.location.search+window.location.hash,f0(x=>{ol(E(N),1)}))];case 14:return[s,te()];case 15:return[s,te()];default:{const x=r.fields[0];let R;switch(x.tag){case 3:{R=[s,(Q=new H(1,[new oe(4,[x.fields[0].message])]),E(B=>{B(Q)}))];break}case 0:case 1:{R=[s,te()];break}default:{let B,ee;const he=x.fields[0];if(he.tag===1)ee=new h(1,[he.fields[0]]);else{const At=he.fields[0],qn=pl(At.IsBenefitsEnabled);let Yn;const Yi=[At.ProcessInstance,qn];if(Yn=$l(Yi[0],Yi[1]),Yn.tag===1)ee=new h(1,[Yn.fields[0]]);else{const Vh=Yn.fields[0],Al=_C(n,At);if(Al.tag===1)ee=new h(1,[Al.fields[0]]);else{const Fh=Al.fields[0],q3=ra(At.ProcessInstance.Status);let Ji;const Wh=wC(Vh);Ji=Wh==null?Fh.IsPaySetupComplete?q3?new h(0,[new oe(5,[])]):new h(0,[new oe(4,["Something went wrong"])]):new h(0,[new oe(3,[])]):new h(0,[(Z=Wh,Ae=al.clientWidth,at=or(Vh)|0,at===1?(document.title=Gn(Z),new oe(2,[Z])):yl(Ae)!=null?new oe(1,[]):new oe(2,[Z]))]),ee=Ji.tag===1?new h(1,[Ji.fields[0]]):new h(0,[[new It(s.ProfileId,s.ProcessInstanceId,new ke(2,[new h(0,[Fh])]),s.CurrentView,At.CssOverrides,qn),Ji.fields[0]]])}}}B=ee.tag===1?[s,new oe(4,[ee.fields[0]])]:ee.fields[0],R=[B[0],E(At=>{At(new H(1,[B[1]]))})]}}return[R[0],R[1]]}}}function LC(e,t,n,r){return RC(MC,e,t,n,r)}const BC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=E(d("g",C(E((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:16,fill:"currentColor"}),d("path",C(y([(n="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",n]),["fill","white"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()]))),VC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n,r;const s=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=E(d("g",C(E((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"currentColor",strokeWidth:2}),d("path",C(y([(n="M16.616 12.6769L11.146 18.1459C11.0908 18.2022 11.0497 18.2707 11.026 18.3459L10.026 21.3459C10.0018 21.4208 9.99555 21.5004 10.0079 21.5781C10.0202 21.6559 10.0507 21.7296 10.0969 21.7934C10.1431 21.8571 10.2036 21.909 10.2737 21.9449C10.3438 21.9808 10.4213 21.9997 10.5 21.9999C10.5538 22.0002 10.6072 21.9914 10.658 21.9739L13.658 20.9739C13.7332 20.9503 13.8017 20.9091 13.858 20.8539L19.327 15.3839L16.616 12.6769Z",["d",n]),["fill","currentColor"]]))),d("path",C(y([(r="M21.8545 12.146L19.8545 10.146C19.808 10.0994 19.7529 10.0625 19.6921 10.0373C19.6314 10.0121 19.5663 9.99908 19.5005 9.99908C19.4347 9.99908 19.3696 10.0121 19.3089 10.0373C19.2481 10.0625 19.1929 10.0994 19.1465 10.146L17.6775 11.616L20.3845 14.323L21.8545 12.854C21.9011 12.8075 21.938 12.7524 21.9632 12.6916C21.9884 12.6309 22.0014 12.5657 22.0014 12.5C22.0014 12.4342 21.9884 12.3691 21.9632 12.3083C21.938 12.2476 21.9011 12.1924 21.8545 12.146Z",["d",r]),["fill","currentColor"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(s))]})()]))),FC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t,n;const r=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M15 13C15 12.7348 15.1054 12.4804 15.2929 12.2929C15.4804 12.1054 15.7348 12 16 12C16.2652 12 16.5196 12.1054 16.7071 12.2929C16.8946 12.4804 17 12.7348 17 13V15H19V13C19 12.2044 18.6839 11.4413 18.1213 10.8787C17.5587 10.3161 16.7956 10 16 10C15.2044 10 14.4413 10.3161 13.8787 10.8787C13.3161 11.4413 13 12.2044 13 13V15H15V13Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M19.6 16H12.4C11.9029 16 11.5 16.3731 11.5 16.8333V20.1667C11.5 20.6269 11.9029 21 12.4 21H19.6C20.0971 21 20.5 20.6269 20.5 20.1667V16.8333C20.5 16.3731 20.0971 16 19.6 16Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(r))]})()]))),xh=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2})]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(t))]})()]))),WC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=E(d("g",C(E((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",t]),["fill","#D1D5DB"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function Cl(e,t){let n;return d("div",C(y([["className","w-full h-6 rounded justify-start items-center inline-flex"],(n=[d("div",{className:ve(" ",[e,"text-lg font-medium leading-normal"]),children:t})],["children",b.Children.toArray(Array.from(n))])])))}function jC(e){return Cl("text-gray-900",e)}function Sl(e){return Cl("text-gray-500",e)}function UC(e){return Cl("text-primary-base",e)}function zC(e){switch(e.Status.tag){case 0:return jC(Gn(e));case 1:return Sl(Gn(e));case 3:return Sl(Gn(e));case 4:return Sl(Gn(e));default:return UC(Gn(e))}}function Ih(e){let t;return d("div",C(y([["className","w-8 h-6 flex-col justify-center items-center inline-flex"],(t=[d("div",{className:ve(" ",[e,"w-0.5 h-6 relative"])})],["children",b.Children.toArray(Array.from(t))])])))}const HC=Ih("bg-gray-300"),Ah=Ih("bg-primary-base");function GC(e){const t=O(e.Id,new xe(6,[])),n=e.Status;let r;if(t)r=2;else switch(n.tag){case 0:{r=0;break}case 2:{r=1;break}default:r=2}switch(r){case 0:return Ah;case 1:return Ah;default:return HC}}function Eh(e,t){let n,r,s;const i=O(t.Status,new le(0,[]))?!0:O(t.Status,new le(2,[]));return d("button",C(y([["className",ve(" ",["group h-8 justify-start items-center space-x-4 inline-flex focus:outline-none"])],["type","button"],["disabled",!i],["onClick",o=>{e(new H(1,[new oe(2,[t])]))}],(n=[d("div",C(y([["className","w-8 h-8 relative"],(r=ge(T(()=>{const o=t.Status;return o.tag===0?_(BC):o.tag===1?_(xh):o.tag===3?O(t.Id,new xe(6,[]))?_(FC):_(xh):o.tag===4?_(WC):_(VC)})),["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className",ve(" ",ge(T(()=>W(_("rounded justify-start items-center flex"),T(()=>i?_("group-focus:outline-none group-focus:ring-2 group-focus:ring-offset-4 group-focus:ring-primary-focus"):cr())))))],(s=[zC(t)],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function qC(e){let t,n,r,s=!1,i=0;const o=$e(e.Steps);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const u=o["System.Collections.Generic.IEnumerator`1.get_Current"]();switch(u.Id.tag){case 0:case 1:{s=O(u.Status,new le(0,[]))?!0:O(u.Status,new le(4,[]));break}default:(O(u.Status,new le(0,[]))||O(u.Status,new le(4,[])))&&(i=i+1|0)}}}finally{ue(o)}r=i+(s?1:0);const a=or(_l(e.Steps))|0,l=u=>d("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:u});return d("div",C(y([(t="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start inline-flex cursor-default",["className",t]),(n=ge(T(()=>{let u,f;return W((u=e.Branding,O(e.AppMode,new Ar(0,[]))?_(ne()):u!=null&&u.CompanyName!=null?(f=u.CompanyName,_(l(rs(f)))):_(l(wl(e.JourneyType)))),T(()=>_(d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:`${r}/${a} sections complete`}))))})),["children",b.Children.toArray(Array.from(n))])])))}function YC(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(M(i))return o;if(M(P(i)))return wt(o,E(Eh(e,k(i))));r=Qe(k(P(i)),P(P(i))),s=wt(o,y([Eh(e,k(i)),GC(k(P(i)))]));continue e}})(_l(t.Steps),de())}function JC(e){let t,n,r;const s=e.dispatch,i=e.detail,o=Yo(void 0),a=oi(!1);return Rp(()=>{const l=window.ResizeObserver?new window.ResizeObserver(()=>{const u=document.body.offsetWidth;yl(u)!=null||a[0]===!1&&(a[1](!0),s(new H(2,[])))}):new Nf(()=>{const u=document.body.offsetWidth;yl(u)!=null||a[0]===!1&&(a[1](!0),s(new H(2,[])))});return xn(u=>{l.observe(u)},qs(o.current)),{Dispose(){l.disconnect()}}}),d("div",C(y([["ref",o],["className","absolute top-0 bottom-0 left-0 right-0"],(t=[d("div",C(y([["className","w-full h-full bg-white flex-col justify-start items-start inline-flex"],(n=[qC(i),d("div",C(y([["className","p-6 bg-white flex-col justify-start items-start inline-flex"],(r=YC(s,i),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class zi extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token"]}}class ZC extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["app-base-url"]}}class XC extends L{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["workflows-instance-id"]}}function Th(e){const t=e.children,n=e.effect,r=e.props,s=e.step;hr(n);const i=s.tag===1?ft.ComponentTagName:s.tag===2?dt.ComponentTagName:s.tag===3?ht.ComponentTagName:s.tag===4?Ne.ComponentTagName:s.tag===5?Tn.ComponentTagName:s.tag===6?ci.ComponentTagName:s.tag===7?Ht.ComponentTagName:s.tag===8?Pn.ComponentTagName:Ge.ComponentTagName;return d(i,yt(r,1),...t)}class xs extends L{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Mobile","MobileLandscape","Tablet","Desktop","WideScreen"]}}class KC extends F{constructor(t,n,r,s){super(),this.MobileLandscape=t|0,this.Tablet=n|0,this.Desktop=r|0,this.WideScreen=s|0}}const QC=new KC(576,768,1024,1216);function e3(e){return["(max-width: "+e.MobileLandscape+"px)","(max-width: "+e.Tablet+"px)","(max-width: "+e.Desktop+"px)","(max-width: "+e.WideScreen+"px)"]}function Hi(e){const t=Np(()=>window.matchMedia(e).matches);return qo(()=>{const n=window.matchMedia(e),r=()=>{t[1](n.matches)};return r(),n.addListener(r),es(()=>{n.removeListener(r)})},[e]),t[0]}function t3(e){const t=e3(Te(e,QC)),n=Hi(t[0]),r=Hi(t[1]),s=Hi(t[2]),i=Hi(t[3]);return n?new xs(0,[]):r?new xs(1,[]):s?new xs(2,[]):i?new xs(3,[]):new xs(4,[])}const n3=d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=E(d("g",C(E((e=y([d("rect",{width:16,height:16,fill:"white"}),d("path",C(y([(t="M15 6.99992H3.41403L6.70703 3.70692C6.88919 3.51832 6.98998 3.26571 6.9877 3.00352C6.98543 2.74132 6.88026 2.49051 6.69485 2.3051C6.50944 2.11969 6.25863 2.01452 5.99643 2.01224C5.73423 2.00997 5.48163 2.11076 5.29303 2.29292L0.293031 7.29292C0.10556 7.48045 0.000244141 7.73475 0.000244141 7.99992C0.000244141 8.26508 0.10556 8.51939 0.293031 8.70692L5.29303 13.7069C5.38528 13.8024 5.49562 13.8786 5.61763 13.931C5.73963 13.9834 5.87085 14.011 6.00363 14.0122C6.13641 14.0133 6.26809 13.988 6.39098 13.9377C6.51388 13.8875 6.62553 13.8132 6.71943 13.7193C6.81332 13.6254 6.88757 13.5138 6.93785 13.3909C6.98813 13.268 7.01343 13.1363 7.01228 13.0035C7.01113 12.8707 6.98354 12.7395 6.93113 12.6175C6.87872 12.4955 6.80254 12.3852 6.70703 12.2929L3.41403 8.99992H15C15.2652 8.99992 15.5196 8.89456 15.7071 8.70703C15.8947 8.51949 16 8.26514 16 7.99992C16 7.7347 15.8947 7.48035 15.7071 7.29281C15.5196 7.10528 15.2652 6.99992 15 6.99992Z",["d",t]),["fill","#212121"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function r3(e,t,n){let r,s,i,o,a,l;const u=R1(m=>O(m.Id,n.Id),t)/or(t)*100;l=je(We("%.0f%%"))(u);let f;const c=B1(m=>O(m.Status,new le(2,[]))?!0:O(m.Status,new le(0,[])),t)/or(t)*100;f=je(We("%.0f%%"))(c);const p=O(n.Id,new xe(1,[]))?vh(new xe(0,[])):Gn(n);return d("div",C(y([(r="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start space-y-3 inline-flex sticky left-0 right-0 top-0 z-50",["className",r]),(s=[d("div",C(y([["className","self-stretch justify-start items-center space-x-3 inline-flex"],(i=[d("button",{type:"button",className:"w-4 h-4 rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",onClick:m=>{e(new H(1,[new oe(1,[])]))},children:b.Children.toArray([n3])}),d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:p})],["children",b.Children.toArray(Array.from(i))])]))),d("div",C(y([["className","w-full h-2 relative rounded-sm"],(o=[d("div",{className:"w-full h-0.5 left-0 top-[3px] absolute bg-gray-300 rounded-sm"}),d("div",C(y([["className","w-full left-0 top-0 absolute"],(a=[d("div",{className:"h-0.5 left-0 top-[3px] absolute bg-primary-base rounded-sm",style:{width:f}}),d("div",{className:"w-2 h-2 top-0 absolute bg-primary-base rounded-full",style:{left:l}})],["children",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))}const s3=d("div",C(y([["className","relative h-4 w-2 z-50"],(()=>{const e=[d("div",{className:"absolute left-0 top-1 h-2 w-2 rounded-full bg-primary-base"})];return["children",b.Children.toArray(Array.from(e))]})()]))),i3=d("div",{className:"relative h-0.5 w-2 bg-gray-300"}),Ph=d("div",{className:"relative h-0.5 w-2 bg-primary-base"}),o3=d("div",C(y([["className","w-4 h-4 relative"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(e=y([d("path",C(y([(t="M7 5C7 4.73478 7.10536 4.48043 7.29289 4.29289C7.48043 4.10536 7.73478 4 8 4C8.26522 4 8.51957 4.10536 8.70711 4.29289C8.89464 4.48043 9 4.73478 9 5V7H11V5C11 4.20435 10.6839 3.44129 10.1213 2.87868C9.55871 2.31607 8.79565 2 8 2C7.20435 2 6.44129 2.31607 5.87868 2.87868C5.31607 3.44129 5 4.20435 5 5V7H7V5Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M11.6 8H4.4C3.90294 8 3.5 8.3731 3.5 8.83333V12.1667C3.5 12.6269 3.90294 13 4.4 13H11.6C12.0971 13 12.5 12.6269 12.5 12.1667V8.83333C12.5 8.3731 12.0971 8 11.6 8Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()])));function Mh(e,t,n){let r;if(e)r=0;else switch(n.tag){case 0:case 4:{r=2;break}case 1:{r=4;break}case 3:{t?r=3:r=4;break}default:r=1}switch(r){case 0:return s3;case 1:return Ph;case 2:return Ph;case 3:return o3;default:return i3}}const Oh=d("div",{className:"relative h-0.5 w-full"}),a3=d("div",{className:"relative h-0.5 w-full bg-gray-300"}),l3=d("div",{className:"relative h-0.5 w-full bg-primary-base"});function kl(e){let t;if(e==null)t=1;else switch(e.tag){case 0:case 4:case 2:{t=0;break}default:t=2}switch(t){case 0:return l3;case 1:return Oh;default:return a3}}function Dh(e){let t,n;return d("div",C(y([["className","inline-flex h-11 w-10 flex-col items-center justify-start"],(t=[d("div",C(y([["className","inline-flex h-4 items-center justify-center self-stretch"],(n=[d("div",{className:ve(" ",[e,"relative h-0.5 w-10"])})],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}const u3=Dh("bg-gray-300"),c3=Dh("bg-primary-base");function f3(e){switch(e.tag){case 0:case 4:case 2:return c3;default:return u3}}function Nh(e,t,n,r){let s,i;const o=!e&&(O(n.Status,new le(0,[]))?!0:O(n.Status,new le(2,[]))),a=e?"text-primary-base":O(n.Status,new le(2,[]))||O(n.Status,new le(0,[]))?"text-gray-900 group-hover:text-primary-base":"text-gray-500",l=d("div",{className:"absolute inset-0 group-hover:bg-primary-base group-hover:opacity-10 rounded"});let u;const f=dc(bh(n.Id).toLocaleLowerCase()," ","-");return u=je(We("step-%s"))(f),d("div",C(y([["className",ve(" ",["h-11 flex-col justify-start items-center inline-flex"])],(s=[d("div",{className:"h-4 inline-flex items-center justify-center self-stretch",children:b.Children.toArray(Array.from(r))}),d("button",C(y([["type","button"],["disabled",!o],["data-testid",u],["className",ve(" ",["relative group h-7 px-2 py-1 justify-center items-center gap-2 inline-flex rounded","focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-primary-focus"])],["onClick",Et(t)(n)],(i=ge(T(()=>W(_(o?l:ne()),T(()=>_(d("div",{className:ve(" ",[a,"text-sm font-medium leading-tight whitespace-nowrap"]),children:dC(n)})))))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function d3(e,t,n){const r=O(n.Id,new xe(1,[]))?new xe(0,[]):n.Id,s=(o,a)=>{e(new H(1,[new oe(2,[o])]))};return lr(((o,a,l)=>{e:for(;;){const u=o,f=a,c=l;if(M(u))return c;if(M(P(u))){const p=kl(f),m=O(k(u).Id,r);return wt(c,E(Nh(m,s,k(u),y([Oh,Mh(m,O(k(u).Id,new xe(6,[])),k(u).Status),p]))))}else{const p=kl(f),m=O(k(u).Id,r),$=Mh(m,O(k(u).Id,new xe(6,[])),k(u).Status);o=P(u),a=k(u).Status,l=wt(c,y([Nh(m,s,k(u),y([kl(k(u).Status),$,p])),f3(k(u).Status)]));continue e}}})(lr(_l(t)),void 0,de()))}function h3(e,t,n){let r,s,i;const o=d("div",C(y([["className","grow shrink basis-0 flex-col justify-start items-start inline-flex"],(r=[d("div",{className:"hidden lg:inline text-gray-500 text-sm font-medium leading-tight",children:wl(t.JourneyType)}),Te(Be(l=>d("div",{className:"hidden lg:inline text-center text-gray-900 text-base font-semibold leading-normal",children:l}),Be(rs,on(l=>l.CompanyName,t.Branding))),ne())],["children",b.Children.toArray(Array.from(r))])]))),a=d("div",{className:"grow shrink basis-0"});return d("div",C(y([(s="w-full h-20 px-8 py-4 bg-white border-b border-gray-300 justify-between items-center inline-flex sticky left-0 right-0 top-0 z-50",["className",s]),(i=ge(T(()=>W(O(t.AppMode,new Ar(0,[]))?_(a):_(o),T(()=>{let l;return W(_(d("div",C(y([["className","bg-white justify-center items-start flex"],(l=d3(e,t.Steps,n),["children",b.Children.toArray(Array.from(l))])])))),T(()=>_(d("div",{className:"grow shrink basis-0"}))))})))),["children",b.Children.toArray(Array.from(i))])])))}function m3(e){let t;const n=e.body,r=e.currentStep,s=e.detail,i=e.dispatch;return d("div",C(y([["className","w-full flex-col justify-start items-center inline-flex bg-white"],(t=ge(T(()=>W(or(s.Steps)===1?_(ne()):t3().tag===0?_(r3(i,s.Steps,r)):_(h3(i,s,r)),T(()=>_(d("div",{className:"p-4 max-w-7xl mx-auto w-full",children:n})))))),["children",b.Children.toArray(Array.from(t))])])))}const p3=e=>d("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M16 16V30",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 21L16 16L21 21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 29H4C3.20435 29 2.44129 28.6839 1.87868 28.1213C1.31607 27.5587 1 26.7956 1 26V2H12L15 7H31V26C31 26.7956 30.6839 27.5587 30.1213 28.1213C29.5587 28.6839 28.7956 29 28 29H21",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$3=e=>d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M19.7 4.3C19.3 3.9 18.7 3.9 18.3 4.3L12 10.6L5.7 4.3C5.3 3.9 4.7 3.9 4.3 4.3C3.9 4.7 3.9 5.3 4.3 5.7L10.6 12L4.3 18.3C3.9 18.7 3.9 19.3 4.3 19.7C4.5 19.9 4.7 20 5 20C5.3 20 5.5 19.9 5.7 19.7L12 13.4L18.3 19.7C18.5 19.9 18.8 20 19 20C19.2 20 19.5 19.9 19.7 19.7C20.1 19.3 20.1 18.7 19.7 18.3L13.4 12L19.7 5.7C20.1 5.3 20.1 4.7 19.7 4.3Z",fill:"#9CA3AF"}));function g3(e){const t=yt(e,1);return d(p3,t)}function w3(e){const t=yt(e,1);return d($3,t)}function y3(e){return d("div",{className:"absolute top-0 bottom-0 left-0 right-0",children:b.Children.toArray([e])})}function _3(e,t){let n;return d("button",C(y([["type","button"],["data-testid","submit-btn"],["className",ve(" ",["self-stretch md:self-auto md:w-60 px-4 py-2 bg-primary-base hover:bg-primary-hover rounded-md shadow","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer","justify-center items-center inline-flex"])],["onClick",t],(n=[d("div",{className:"text-white text-base font-semibold leading-normal",children:e})],["children",b.Children.toArray(Array.from(n))])])))}function v3(e,t){let n;return d("button",C(y([["type","button"],["className",ve(" ",["relative group self-stretch md:self-auto md:w-60 px-4 py-2 rounded-md shadow justify-center items-center inline-flex","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer"])],["onClick",t],(n=[d("div",{className:"text-primary-dark text-base font-semibold leading-normal z-[1]",children:e}),d("div",{className:"absolute w-full h-full rounded-md z-[0] bg-primary-base opacity-10 group-hover:opacity-20"})],["children",b.Children.toArray(Array.from(n))])])))}function Gi(e,t,n,r,s){let i,o,a,l,u,f,c,p,m,$,g,w,v,S,N;return y3(d("div",C(y([["className","w-full h-full md:pb-8 bg-white flex-col justify-start items-start md:items-center inline-flex"],(i=[d("div",C(y([(o="w-full md:self-stretch p-4 bg-white border-gray-200 flex-col justify-start items-end space-x-4 space-y-4 flex",["className",o]),(a=[d("button",C(y([["type","button"],(l="w-6 h-6 relative rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",["className",l]),["onClick",Q=>{s(new H(6,[{InjectedBenefits:r}]))}],(u=[w3([])],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(a))])]))),d("div",C(y([(f="w-full md:w-[560px] grow shrink basis-0 px-4 md:px-0 pb-8 md:pb-0 bg-white flex-col justify-between md:justify-start items-center md:space-y-14 flex",["className",f]),(c=[d("div",C(y([["className","self-stretch h-64 md:h-56 flex-col justify-start items-center space-y-8 flex"],(p=[d("div",C(y([["className","self-stretch h-64 flex-col justify-start items-center space-y-6 flex"],(m=[d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex"],($=[d("div",C(y([["className","w-12 h-12 relative rounded-lg"],(g=[d("div",{className:"w-12 h-12 relative bg-primary-base opacity-10 rounded-lg"}),d("div",C(y([["className","w-8 h-8 left-2 top-2 absolute"],(w=[d("div",C(y([["className","w-7 h-7 left-px top-0.5 absolute"],(v=[g3([["className","text-primary-base"]])],["children",b.Children.toArray(Array.from(v))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(g))])]))),d("div",{className:"self-stretch text-center text-gray-900 text-2xl md:text-3xl font-bold leading-7 md:leading-9",children:e})],["children",b.Children.toArray(Array.from($))])]))),d("div",C(y([["className","self-stretch h-40 md:h-24 flex-col justify-start items-center space-y-3 md:space-y-4 flex"],(S=[d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:t}),d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:n})],["children",b.Children.toArray(Array.from(S))])])))],["children",b.Children.toArray(Array.from(m))])])))],["children",b.Children.toArray(Array.from(p))])]))),d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex cursor-pointer"],(N=[_3(r?"Submit and continue":"Submit",Q=>{s(new H(7,[{InjectedBenefits:r}]))}),v3("Keep editing",Q=>{s(new H(6,[{InjectedBenefits:r}]))})],["children",b.Children.toArray(Array.from(N))])])))],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(i))])]))))}function b3(e){let t,n;const r=e.dispatch,s=e.wd,i=s.IsBenefitsStepEnabled;return s.AppMode.tag===1?i?Gi("Before you continue",(t=on(o=>o.CompanyName,s.Branding),t==null?"Submit to finalise your pay information to your employer and continue to access your workplace benefits":`Submit to finalise your pay information to ${rs(t)} and continue to access your workplace benefits`),"Once you submit, you’ll be unable to view or edit your details",!0,r):Gi("Submit your details",(n=on(o=>o.CompanyName,s.Branding),n==null?"Submit to finalise your pay information to your employer":`Submit to finalise your pay information to ${rs(n)}`),"Once you submit, you’ll be unable to view or edit your details.",!1,r):i?Gi("Before you continue","Submit to finalise your pay information to your employer and continue to access your workplace benefits","",!0,r):Gi("Submit your details","Submit to finalise your pay information to your employer","",!1,r)}function qi(e,t){let n;return d("div",C(y([["className",ve(" ",["animate-pulse w-full relative",e,t])],(n=[d("div",{className:ve(" ",["w-full left-0 top-0 absolute bg-gray-200 rounded",e])})],["children",b.Children.toArray(Array.from(n))])])))}const C3=qi("h-9","max-w-96"),Rh=qi("h-6","max-w-96"),S3=qi("h-80","max-w-96"),k3=qi("h-10","max-w-48"),x3=(()=>{let e,t,n;const r=[d("div",C(y([(e="w-full h-full px-8 py-20 bg-white rounded border border-zinc-200 flex-col justify-start items-center gap-10 inline-flex",["className",e]),(t=[d("div",C(y([["className","max-w-96 w-full flex-col justify-start items-center gap-6 flex"],(n=[C3,d("div",{className:"self-stretch h-14 flex-col justify-start items-center gap-2 flex",children:b.Children.toArray([Rh,Rh])})],["children",b.Children.toArray(Array.from(n))])]))),S3,k3],["children",b.Children.toArray(Array.from(t))])])))];return d(Me,{},...r)})();function I3(e){let t;const n=e.accessToken,r=e.appMode;let s;const i=NC(n);s=tl(()=>Oi(()=>i,(c,p)=>LC(n,r,c,p),(c,p)=>{}),void 0,[]);const o=s[0],a=s[1];ii(ub(()=>EC(o.ProcessInstanceId,n),c=>{a(new H(0,[c]))}),[]),ii(()=>{xg()},[]),ii(()=>{const c=o.CurrentView;let p;switch(o.WorkflowDetail.tag===2?c.tag===2?O(c.fields[0].Id,new xe(4,[]))?(p=0,c.fields[0]):O(c.fields[0].Id,new xe(5,[]))?(p=1,c.fields[0]):p=2:p=2:p=3,p){case 0:break;case 1:break;case 2:{ol(E(ll(r)),2);break}}},[o.CurrentView,o.WorkflowDetail]),hr(()=>{window.addEventListener("step-completion",c=>{a(new H(3,[c]))})});const l=o.WorkflowDetail;let u,f;switch(l.tag){case 2:{l.fields[0].tag===1?u=2:(u=1,f=l.fields[0].fields[0]);break}case 3:{u=2;break}default:u=0}switch(u){case 0:return d("div",{children:["Please wait..."]});case 1:{const c=f.JourneyType;return d("div",C(y([["className","w-full min-h-[600px] mx-auto bg-white"],(t=ge(T(()=>W(Ie(p=>d("style",{children:[p]}),o.CssOverrides),T(()=>{const p=o.CurrentView;switch(p.tag){case 1:return W(_(d(JC,{detail:f,dispatch:a})),T(()=>(un(0),cr())));case 2:{const m=p.fields[0];let $;const g=m.Id;return $=g.tag===4?d(Th,{step:new xe(4,[]),props:[new zi(1,[n]),new zi(0,[`${Vn}/super-selection/backend/v1.0/`]),new ZC(ll(r))],effect:()=>{a(new H(12,[])),un(2500)},children:[]}):d(Th,{step:g,props:[new zi(1,[n]),new zi(0,[Vn]),new XC(rn(mr(o.ProcessInstanceId)))],effect:()=>{un(1500)},children:[]}),_(d(m3,{dispatch:a,detail:f,currentStep:m,body:$}))}case 3:return W(_(d(b3,{wd:f,dispatch:a})),T(()=>(un(0),cr())));case 4:return W(_(d("div",{className:"text-center mt-5",children:"We had an issue. Please try again shortly."})),T(()=>(un(0),cr())));case 5:{const m=Be(j_,f.Branding);let $;if(f.AppMode.tag===0)$=0;else switch(c.tag){case 1:{$=2;break}case 2:{$=3;break}case 3:case 4:{$=4;break}default:$=1}switch($){case 0:return _(x3);case 1:return _(Ss(ml(m,"onboarding")));case 2:return _(Ss(ml(m,"information request")));case 3:return _(Ss($h()));default:return _(Ss(li()))}}default:return _(d("div",{children:["Please wait..."]}))}})))),["children",b.Children.toArray(Array.from(t))])])))}default:return Ss(li())}}function A3(e){return{render:function(t){Os(t,e)},unmount:function(){po(e)}}}class E3 extends F{constructor(t,n,r){super(),this.model=t,this.render=n,this.equal=r}}class T3 extends lt{constructor(t){super(t)}shouldComponentUpdate(t,n){const r=this;return!r.props.equal(r.props.model,t.model)}render(){return this.props.render()}}function P3(e,t,n,r){const s=new E3(n,()=>t(n,r),e);return d(T3,s)}const M3=(()=>{try{return Ho(_u.slice(void 0,2),511,!1,32)>=18}catch{return!1}})();function O3(e,t,n){let r;return m0(re(M3?(r=A3(document.getElementById(t)),s=>i=>{r.render(e(o=>a=>o===a,p0(n),s,i))}):s=>i=>{Os(e(o=>a=>o===a,p0(n),s,i),document.getElementById(t))}),n)}function D3(e,t){return O3((n,r,s,i)=>P3(re(n),re(r),s,i),e,t)}function N3(e,t){const n=encodeURIComponent(jv(t)),r=encodeURIComponent(k2),s=encodeURIComponent(x2(new Ar(0,[])));return A.Delay(()=>{let i,o;const a=ps(pn(new Zt(1,[`grant_type=authorization_code&code=${n}&client_id=${r}&redirect_uri=${s}`]),(i=Kt(new Bt(1,[]),Xt(`${b2}/connect/token`)),Fi(fl("application/x-www-form-urlencoded"),i))));return o=A.Bind(a,l=>A.Return(new h(0,[l]))),A.Bind(o,l=>{const u=l;if(u.tag===1)return A.Return(new h(1,[u.fields[0]]));{const f=u.fields[0];if(f.statusCode===200){const c=en(re(tn(hl(),void 0)),f.responseText);return A.Return(c)}else return A.Return(new h(1,["Unexpected result from backend"]))}})})}function R3(){return new Ir(0,[])}function xl(e){return $i(e)}function L3(e,t){return A.Delay(()=>{let n;return A.Bind(gg([(n=N3(e,t),A.Bind(n,r=>A.Return(r))),A.Delay(()=>A.Bind(xl(2e3),()=>A.Return(void 0)))]),r=>A.Return(se(0,r)))})}function B3(e,t,n){let r;switch(e.tag){case 1:switch(t.tag){case 1:return[t,Ka(s=>{qe(s)},xl,1e3,()=>new jn(1,[]))];case 2:return t.fields[0].tag===1?[t,te()]:[t,Ka(s=>{qe(s)},xl,2e3,()=>new jn(2,[]))];default:return[new Ir(2,[new h(1,["No current authenticated user"])]),te()]}case 2:return[t,(r=window.location.pathname,f0(s=>{ol(E(r),1)}))];default:if(e.fields[0].tag===1)return e.fields[0].fields[0].tag===1?[new Ir(2,[new h(1,[`SignIn failed: ${e.fields[0].fields[0].fields[0]}`])]),te()]:(window.gtag&&window.gtag("event","oidc_sign_in",{}),[new Ir(2,[new h(0,[e.fields[0].fields[0].fields[0]])]),e.fields[2]?te():E(s=>{s(new jn(2,[]))})]);switch(t.tag){case 1:return[t,te()];default:return[new Ir(1,[]),St(s=>{qe(s)},s=>L3(s[0],s[1]),[n,e.fields[1]],s=>{const i=[new Se(1,[s]),e.fields[1],e.fields[2]];return new jn(0,[i[0],i[1],i[2]])},s=>{const i=[new Se(1,[new h(1,[s.message])]),e.fields[1],e.fields[2]];return new jn(0,[i[0],i[1],i[2]])})]}}}function V3(){const e=qu(window.sessionStorage.getItem("credentials"));if(e!=null){const t=e,n=en(re(tn(hl(),void 0)),t);return n.tag===1?void 0:n.fields[0]}}function F3(e){let t;const n=["credentials",(t=new ph(e.id_token,e.access_token,e.expires_in,void 0,e.scope,e.token_type),$n(0,gn(hl(),void 0,void 0,void 0)(t)))];window.sessionStorage.setItem(n[0],n[1])}function Lh(e,t){return Xa(n=>new wn(3,[n]),E(n=>{n(new jn(0,[new Se(0,[]),e,t]))}))}function Il(e){return Lh(e,!1)}function W3(e){return Lh(e,!0)}function j3(){const e=gh(T0(window.location.pathname+window.location.search,2)),t=e[0],n=e[1],r=new zn(t,R3(),n);switch(t.tag){case 4:case 1:case 2:case 5:case 6:return[r,te()];case 0:{const s=V3();let i;switch(n.tag){case 0:case 2:{i=1;break}default:s==null?i=1:i=0}switch(i){case 0:return[new zn(r.CurrentPage,new Ir(2,[new h(0,[s])]),r.AppMode),te()];default:return[r,E(o=>{o(new wn(5,[]))})]}}default:return[r,Il(t.fields[0])]}}function U3(e,t){switch(e.tag){case 1:{const n=e.fields[0];return[new zn(new U(3,[n]),t.Credentials,t.AppMode),Il(n)]}case 2:return[new zn(new U(4,[]),t.Credentials,t.AppMode),Xa(n=>new wn(3,[n]),E(n=>{n(new jn(1,[]))}))];case 3:{const n=B3(e.fields[0],t.Credentials,t.AppMode),r=n[0];let s,i;switch(r.tag===2&&r.fields[0].tag===0&&t.AppMode.tag===1?(s=0,i=r.fields[0].fields[0]):s=1,s){case 0:{F3(i);break}}return[new zn(t.CurrentPage,r,t.AppMode),Xa(o=>new wn(3,[o]),n[1])]}case 4:return[t,W3(e.fields[0])];case 5:return[new zn(new U(6,[]),t.Credentials,t.AppMode),te()];default:{const n=gh(e.fields[0])[0],r=new zn(n,t.Credentials,t.AppMode);return n.tag===3?[r,Il(n.fields[0])]:[r,te()]}}}const Bh=d("div",C(y([["className","flex flex-col justify-center items-center pt-10"],(()=>{const e=[li()];return["children",b.Children.toArray(Array.from(e))]})()])));function z3(e){switch(e.CurrentPage.tag){case 3:case 4:case 2:return E("bg-white h-full");default:return de()}}function H3(e){switch(e.tag){case 1:return d("style",{children:[`
810
810
  html {
811
811
  height: 100%;
812
812
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/workflows-app",
3
- "version": "0.1.3111",
3
+ "version": "0.1.3113",
4
4
  "description": "Flare Workflows App",
5
5
  "license": "UNLICENSED",
6
6
  "files": [