@passflow/react 0.17.0 → 0.18.0
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.
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +146 -133
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.cts +2 -0
- package/dist/src/components/form/reset-password/index.d.ts +2 -0
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.cts +1 -0
- package/dist/src/components/provider/passflow-provider.d.ts +1 -0
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/button/index.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-otp.d.cts +3 -1
- package/dist/src/components/ui/fields/field-otp.d.ts +3 -1
- package/dist/src/components/ui/fields/field-otp.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/email-code.d.cts +10 -0
- package/dist/src/components/ui/login-screen/email-code.d.ts +10 -0
- package/dist/src/components/ui/login-screen/email-code.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/index.d.cts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/login-screen.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/new-password.d.cts +10 -0
- package/dist/src/components/ui/login-screen/new-password.d.ts +10 -0
- package/dist/src/components/ui/login-screen/new-password.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/status.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/types.d.cts +62 -3
- package/dist/src/components/ui/login-screen/types.d.ts +62 -3
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/hooks/index.d.cts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-email-code-step.d.cts +39 -0
- package/dist/src/hooks/use-email-code-step.d.ts +39 -0
- package/dist/src/hooks/use-email-code-step.d.ts.map +1 -0
- package/dist/src/hooks/use-join-invite.d.ts.map +1 -1
- package/dist/src/hooks/use-reset-password.d.cts +14 -1
- package/dist/src/hooks/use-reset-password.d.ts +14 -1
- package/dist/src/hooks/use-reset-password.d.ts.map +1 -1
- package/dist/src/hooks/use-signin.d.cts +6 -0
- package/dist/src/hooks/use-signin.d.ts +6 -0
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.cts +6 -0
- package/dist/src/hooks/use-signup.d.ts +6 -0
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- package/dist/src/index.d.cts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/email-verification.d.cts +18 -0
- package/dist/src/types/email-verification.d.ts +18 -0
- package/dist/src/types/email-verification.d.ts.map +1 -0
- package/dist/src/types/index.d.cts +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +46 -0
- package/dist/src/utils/auth-error.d.ts +46 -0
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/email-verification.d.cts +44 -0
- package/dist/src/utils/email-verification.d.ts +44 -0
- package/dist/src/utils/email-verification.d.ts.map +1 -0
- package/dist/src/utils/get-url-errors.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +2 -1
- package/dist/src/utils/index.d.ts +2 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=Object.create,s=Object.defineProperty,t=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,i=(i,n,l)=>(l=null!=i?e(r(i)):{},((e,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(var l,c=a(r),d=0,p=c.length;d<p;d++)l=c[d],o.call(e,l)||l===i||s(e,l,{get:(e=>r[e]).bind(null,l),enumerable:!(n=t(r,l))||n.enumerable});return e})(!n&&i&&i.__esModule&&o.call(i,"default")?l:s(l,"default",{value:i,enumerable:!0}),i));let n=require("@passflow/core"),l=require("react");l=i(l,1);let c=require("clsx");c=i(c,1),require("dayjs");let d=require("yup");d=i(d,1);let p=require("react/jsx-runtime"),u=require("@radix-ui/react-dialog");u=i(u,1);let h=require("input-otp"),m=require("countries-and-timezones"),f=require("react-international-phone"),g=require("query-string");g=i(g,1);let w=require("phone"),x=require("react-hook-form"),y=require("@radix-ui/react-popover");y=i(y,1);let v=require("react-error-boundary");"undefined"!=typeof window&&(window.passflowReactAppVersion=()=>{console.log("App Version: 0.17.0")});var C={"sign-in":{password:{message:"We couldn't sign you in. Check your details and try again.",scope:"credentials"},passwordless:{message:"We couldn't start passwordless sign-in. Check your connection and try again.",scope:"form"},passkey:{message:"We couldn't complete passkey sign-in. Try again or use another sign-in method.",scope:"form"}},"sign-up":{password:{message:"We couldn't create your account. Check the information you entered and try again.",scope:"form"},passwordless:{message:"We couldn't start passwordless registration. Check your connection and try again.",scope:"form"},passkey:{message:"We couldn't create your account with a passkey. Try again or choose another method.",scope:"form"}}},b="We couldn't continue this authentication request. Return to the app and try again.",k="This verification link is invalid or incomplete. Request a new link or code and try again.",j="This verification request is no longer available. Start again to request a new link or code.",M=(e,s)=>C[e][s],S={code_required:"Enter the code shown on your device to continue.",code_invalid:"That code isn't right. Check the code on your device and enter it again.",code_expired:"This code has expired. Start again on your device to get a new one.",code_declined:"This request was already declined. Start again on your device if you still want to sign in.",code_already_approved:"This device is already signed in. You can close this page and head back to it.",too_many_attempts:"Too many incorrect codes were entered. Wait a few minutes, then try again.",mode_disabled:"This app can't be signed in to this way. Ask whoever set it up to turn on QR sign-in, or sign in from your computer instead.",app_unavailable:"The app that asked you to sign in is no longer available. Start again from your device.",bad_credentials:"That email or password isn't right.",missing_credentials:"Enter your email and password to continue.",second_factor_invalid:"That code isn't right. Check it and enter it again.",missing_second_factor:"Enter the code to continue.",account_blocked:"This account has been blocked. Contact whoever manages it for help.",passkey_failed:"We couldn't confirm your passkey. You may have cancelled it, waited too long, or there may be no passkey for this site on this device.",passkey_unsupported:"This device can't use a passkey to sign in here. Use a device you've set up a passkey on, or return to the app that asked you to sign in and start again.",offline:"We couldn't reach the server. Check your connection and try again.",generic:"Something went wrong on our end. Refresh the page and try again."},E=new Set(["code_required","code_invalid","bad_credentials","missing_credentials","second_factor_invalid","missing_second_factor","passkey_failed","offline","generic"]),N={code_required:"code_required",invalid_user_code:"code_invalid",unknown_user_code:"code_invalid",expired_user_code:"code_expired",denied:"code_declined",already_approved:"code_already_approved",too_many_attempts:"too_many_attempts",mode_disabled:"mode_disabled",unknown_client:"app_unavailable",passkey_unavailable:"app_unavailable",unavailable:"app_unavailable",bad_credentials:"bad_credentials",missing_credentials:"missing_credentials",second_factor_invalid:"second_factor_invalid",missing_second_factor:"missing_second_factor",blocked:"account_blocked",passkey_failed:"passkey_failed"},_={NotAllowedError:"passkey_failed",AbortError:"passkey_failed",TimeoutError:"passkey_failed",UnknownError:"passkey_failed",NotSupportedError:"passkey_unsupported",InvalidStateError:"passkey_unsupported",ConstraintError:"passkey_unsupported",SecurityError:"passkey_unsupported"},L=["resident credentials","allowcredentials","not supported at this time","discoverable credentials","is not supported"],I=class extends Error{reason;code;status;constructor(e){super(e.description||e.code||`device request failed (${e.status})`),this.name="DeviceApiError",this.reason=e.reason,this.code=e.code,this.status=e.status}},A=(e,s)=>({type:e,message:S[e],detail:s,isRecoverable:E.has(e)});function P(e){if(e instanceof I){const s=N[e.reason]??"generic";return A(s,`${e.code}${e.reason?`/${e.reason}`:""}: ${e.message}`)}if((e=>"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name)(e)){const s=e.name,t="string"==typeof e.message?e.message:"",a=t?`${s}: ${t}`:s,r=t.toLowerCase();if(L.some(e=>r.includes(e)))return A("passkey_unsupported",a);const o=_[s];return A(o?o:"TypeError"===s?"offline":"generic",a)}return A("generic","string"==typeof e?e:void 0)}function F(e,s){return A(e,s)}var T={expired:["2FA verification expired or not required","verification expired","session expired","verification not required"],not_enabled:["Two-factor authentication is not enabled for this user","2FA is not enabled","two-factor not enabled"],invalid_code:["invalid code","incorrect code","code mismatch","wrong code","invalid 2fa code"]};function R(e){switch(e.type){case"expired":return"Your session has expired. Redirecting to sign in...";case"not_enabled":return"Two-factor authentication is not enabled for your account. Please contact your administrator to enable 2FA.";case"invalid_code":return"Invalid code. Please check your authenticator app and try again.";default:return e.message}}var U=(...e)=>(0,c.default)(e),Y=e=>{const s={internal:{username:{password:!1},email:{password:!1,otp:!1,magicLink:!1},phone:{password:!1,otp:!1,magicLink:!1}},fim:{providers:[]},passkey:!1,hasEmailMethods:!1,hasSignInEmailMethods:!1,hasPhoneMethods:!1,hasSignInPhoneMethods:!1,hasUsernameMethods:!1,hasSignInUsernameMethods:!1};if(!e)return s;for(const t of e){const{identity:e,challenge:a,fim_type:r}=t.strategy;switch(t.type){case"internal":switch(e){case"email":"magic_link"===a?s.internal.email.magicLink=!0:s.internal.email[a]=!0,s.hasEmailMethods=!0,(s.internal.email.magicLink||s.internal.email.otp||s.internal.email.password)&&(s.hasSignInEmailMethods=!0);break;case"phone":"magic_link"===a?s.internal.phone.magicLink=!0:s.internal.phone[a]=!0,s.hasPhoneMethods=!0,(s.internal.phone.magicLink||s.internal.phone.otp||s.internal.phone.password)&&(s.hasSignInPhoneMethods=!0);break;case"username":s.internal.username[a]=!0,s.hasUsernameMethods=!0,s.internal.username.password&&(s.hasSignInUsernameMethods=!0);break;default:throw new Error(`Unsupported identity type: ${e}`)}break;case"fim":s.fim.providers.push(r);break;case"passkey":s.passkey=!0;break;default:throw new Error(`Unsupported strategy type: ${t.type}`)}}return s},z=(e,s)=>e.hasSignInEmailMethods&&e.hasSignInUsernameMethods?"label"===s?"Email or username":"Use email or username":e.hasSignInEmailMethods?"label"===s?"Email":"Use email":e.hasSignInUsernameMethods?"label"===s?"Username":"Use username":null,V=(e,s)=>{if("phone"===s){if(e.internal.phone.otp)return{label:"SMS code",challengeType:"otp"};if(e.internal.phone.magicLink)return{label:"SMS link",challengeType:"magic_link"}}if("email_or_username"===s){if(e.internal.email.otp)return{label:"email code",challengeType:"otp"};if(e.internal.email.magicLink)return{label:"email link",challengeType:"magic_link"}}return null},D=e=>{const s=new URLSearchParams(e?e.split("?")[1]:window.location.search),t=s.get("error"),a=s.get("message");return{error:t,message:a?decodeURIComponent(a):null}},G=async(e,s,t="hash")=>{const a=await e.getTokens(!1);if(a){a.scopes=void 0;const e=Object.entries(a).filter(([e,s])=>s).map(([e,s])=>`${e}=${encodeURIComponent(s)}`).join("&");return"hash"===t?`${s}#${e}`:`${s}?${e}`}return s};function B(e){return s=>{try{return e(s)}catch(t){return}}}var O={"sign-in":{title:"Sign in",completion:"sign in"},"sign-up":{title:"Create your account",completion:"create your account"}},H=(e,s)=>{if(!e)return null;const t=B(n.parseToken)(e),a=t?.tenant_name?.trim(),r=t?.inviter_name?.trim(),o=O[s];return{title:a?`${o.title} to join ${a}.`:`${o.title} to continue your invitation.`,subtitle:r?`${r} invited you. After you ${o.completion}, you'll continue to the invitation.`:`After you ${o.completion}, you'll continue to the invitation.`}},Z=(e,s,t)=>!!e.isTwoFactorVerificationRequired()&&(s({to:t}),!0),q=()=>!("undefined"==typeof window||!window.location.hash)&&new URLSearchParams(window.location.hash.substring(1)).has("tfa_token"),J="passflow_2fa",W=`${J}_redirect_count`,K=`${J}_last_error_type`,Q={canRedirect(){try{return this.getRedirectCount()<3}catch{return!0}},incrementRedirect(){try{const e=this.getRedirectCount();sessionStorage.setItem(W,String(e+1))}catch{}},getRedirectCount(){try{const e=sessionStorage.getItem(W);return e?Number.parseInt(e,10):0}catch{return 0}},reset(){try{sessionStorage.removeItem(W),sessionStorage.removeItem(K)}catch{}},setLastErrorType(e){try{sessionStorage.setItem(K,e)}catch{}},getLastErrorType(){try{return sessionStorage.getItem(K)}catch{return null}},isRepeatingError(e){return this.getLastErrorType()===e&&this.getRedirectCount()>0},getLoopDetectedMessage:()=>"Unable to complete authentication. This may be a configuration issue. Please contact support."},X=null,$=null,ee=e=>(X=e,$=null,()=>{$=e,queueMicrotask(()=>{$===e&&($=null,se(e))})}),se=e=>{X===e&&(X=null)},te=e=>{if(null===X)throw new Error(`[passflow] ${e}() needs a mounted <PassflowProvider>: the interception scope is bound to a configured Passflow instance. Call it from inside your app (an effect or a component), or use passflow.${e}() from usePassflow().`);return X},ae={read:()=>window.location.search,write:(e,{replace:s})=>{const t=`${window.location.pathname}${e}${window.location.hash}`;s?window.history.replaceState(null,"",t):window.history.pushState(null,"",t)}},re=(0,l.createContext)(ae),oe=()=>(0,l.useContext)(re),ie=e=>e.toString()?`?${e.toString()}`:"",ne=e=>{const s=oe(),t=(a=s.read(),(new DOMParser).parseFromString(a,"text/html").documentElement.textContent||"");var a;const r=new URLSearchParams(t);if(e){let t=!1;for(const[s,a]of Object.entries(e))r.has(s)||""===a||(r.set(s,a),t=!0);t&&s.write(ie(r),{replace:!0})}return{getAll:()=>{const e={};for(const[s,t]of r.entries())e[s]=t;return e},get:e=>{const s=r.get(e);return""===s?null:s},set:e=>{const t=new URLSearchParams(s.read());for(const[s,a]of Object.entries(e))null==a||""===a?t.delete(s):t.set(s,a);s.write(ie(t),{replace:!1})}}},le=e=>{try{const s=new URL(e);return"http:"===s.protocol||"https:"===s.protocol}catch{return!1}},ce=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,de=e=>d.string().required().test({test:s=>{const t=[];if(e){const{min_password_length:a,require_lowercase:r,require_number:o,require_symbol:i,require_uppercase:n}=e;(s??"").length<a&&t.push("length"),n&&!/[A-Z]/.test(s)&&t.push("uppercase"),r&&!/[a-z]/.test(s)&&t.push("lowercase"),o&&!/\d/.test(s)&&t.push("number"),i&&!/[!@#$%^&*()_+{}[\]:;<>,.?~\\-]/.test(s)&&t.push("symbol")}if(t.length>0){const e={errors:t,inner:!0,path:"password",field:"password",message:t,value:s,name:"ValidationError"};return new d.ValidationError(e,s,"password")}return!0}}),pe=({size:e,x:s,y:t})=>(0,p.jsx)("span",{className:"passflow-ripple passflow-ripple-effect",style:{width:e,height:e,left:s,top:t}}),ue=({size:e,variant:s,type:t,onClick:a,withIcon:r=!1,asIcon:o=!1,className:i="",children:n,withRipple:c=!0,description:d,pressed:u,...h})=>{const[m,f]=(0,l.useState)(),g={"passflow-button passflow-button--big":"big"===e,"passflow-button passflow-button--medium":"medium"===e,"passflow-button passflow-button--small":"small"===e,"passflow-button--primary":"primary"===s,"passflow-button--secondary":"secondary"===s,"passflow-button--outlined":"outlined"===s,"passflow-button--warning":"warning"===s,"passflow-button--clean":"clean"===s,"passflow-button--provider":"provider"===s,"passflow-button--dark":"dark"===s,"passflow-button--option":"option"===s,"passflow-button--link":"link"===s,"passflow-button--with-icon":r,"passflow-button--as-icon":o};return(0,l.useEffect)(()=>{let e;return m&&(e=setTimeout(()=>{f(void 0)},1e3)),()=>clearTimeout(e)},[m]),(0,p.jsxs)("button",{className:U(g,i),type:t,"aria-pressed":u,onClick:e=>{const s=e.currentTarget.getBoundingClientRect(),t=Math.max(s.width,s.height),r=e.clientX-s.left-t/2,o=e.clientY-s.top-t/2,i=(0,p.jsx)(pe,{size:t,x:r,y:o},Date.now());f(e=>e?[...e,i]:[i]),a?.(e)},...h,children:["option"===s?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"passflow-button__option-label",children:n}),d?(0,p.jsxs)(p.Fragment,{children:[" ",(0,p.jsx)("span",{className:"passflow-button__option-hint",children:d})]}):null]}):n,c&&"link"!==s&&(0,p.jsx)("div",{"aria-hidden":!0,className:"passflow-ripple-container",children:m})]})},he=({appName:e})=>(0,p.jsx)("div",{className:"passflow-continuing-status",role:"status",children:e?`Continuing to ${e}…`:"Continuing…"}),me={ad:"-48px -27px",ae:"-72px -27px",af:"-96px -27px",ag:"-120px -27px",ai:"-144px -27px",al:"-168px -27px",am:"-192px -27px",an:"-216px -27px",ao:"-240px -27px",aq:"-264px -27px",ar:"-288px -27px",as:"-312px -27px",at:"-336px -27px",au:"-360px -27px",aw:"-384px -27px",ax:"-0px -51px",az:"-24px -51px",ba:"-48px -51px",bb:"-72px -51px",bd:"-96px -51px",be:"-120px -51px",bf:"-144px -51px",bg:"-168px -51px",bh:"-192px -51px",bi:"-216px -51px",bj:"-240px -51px",bl:"-264px -51px",bm:"-288px -51px",bn:"-312px -51px",bo:"-336px -51px",br:"-360px -51px",bs:"-384px -51px",bt:"-0px -75px",bw:"-24px -75px",by:"-48px -75px",bz:"-72px -75px",ca:"-96px -75px",cc:"-120px -75px",cd:"-144px -75px",cf:"-168px -75px",cg:"-192px -75px",ch:"-216px -75px",ci:"-240px -75px",ck:"-264px -75px",cl:"-288px -75px",cm:"-312px -75px",cn:"-336px -75px",co:"-360px -75px",cr:"-384px -75px",cu:"-0px -99px",cv:"-24px -99px",cw:"-48px -99px",cx:"-72px -99px",cy:"-96px -99px",cz:"-120px -99px",de:"-144px -99px",dj:"-168px -99px",dk:"-192px -99px",dm:"-216px -99px",do:"-240px -99px",dz:"-264px -99px",ec:"-288px -99px",ee:"-312px -99px",eg:"-336px -99px",eh:"-360px -99px",er:"-384px -99px",es:"-0px -123px",et:"-24px -123px",eu:"-48px -123px",fi:"-72px -123px",fj:"-96px -123px",fk:"-120px -123px",fm:"-144px -123px",fo:"-168px -123px",fr:"-192px -123px",ga:"-216px -123px",gb:"-240px -123px",gd:"-264px -123px",ge:"-288px -123px",gg:"-312px -123px",gh:"-336px -123px",gi:"-360px -123px",gl:"-384px -123px",gm:"-0px -147px",gn:"-24px -147px",gq:"-48px -147px",gr:"-72px -147px",gs:"-96px -147px",gt:"-120px -147px",gu:"-144px -147px",gw:"-168px -147px",gy:"-192px -147px",hk:"-216px -147px",hn:"-240px -147px",hr:"-264px -147px",ht:"-288px -147px",hu:"-312px -147px",ic:"-336px -147px",id:"-360px -147px",ie:"-384px -147px",il:"-0px -171px",im:"-24px -171px",in:"-48px -171px",iq:"-72px -171px",ir:"-96px -171px",is:"-120px -171px",it:"-144px -171px",je:"-168px -171px",jm:"-192px -171px",jo:"-216px -171px",jp:"-240px -171px",ke:"-264px -171px",kg:"-288px -171px",kh:"-312px -171px",ki:"-336px -171px",xk:"-144px 3px",km:"-360px -171px",kn:"-384px -171px",kp:"-0px -195px",kr:"-24px -195px",kw:"-48px -195px",ky:"-72px -195px",kz:"-96px -195px",la:"-120px -195px",lb:"-144px -195px",lc:"-168px -195px",li:"-192px -195px",lk:"-216px -195px",lr:"-240px -195px",ls:"-264px -195px",lt:"-288px -195px",lu:"-312px -195px",lv:"-336px -195px",ly:"-360px -195px",ma:"-384px -195px",mc:"-0px -219px",md:"-24px -219px",me:"-48px -219px",mf:"-72px -219px",mg:"-96px -219px",mh:"-120px -219px",mk:"-144px -219px",ml:"-168px -219px",mm:"-192px -219px",mn:"-216px -219px",mo:"-240px -219px",mp:"-264px -219px",mq:"-288px -219px",mr:"-312px -219px",ms:"-336px -219px",mt:"-360px -219px",mu:"-384px -219px",mv:"-0px -243px",mw:"-24px -243px",mx:"-48px -243px",my:"-72px -243px",mz:"-96px -243px",na:"-120px -243px",nc:"-144px -243px",ne:"-168px -243px",nf:"-192px -243px",ng:"-216px -243px",ni:"-240px -243px",nl:"-264px -243px",no:"-288px -243px",np:"-312px -243px",nr:"-336px -243px",nu:"-360px -243px",nz:"-384px -243px",om:"-0px -267px",pa:"-24px -267px",pe:"-48px -267px",pf:"-72px -267px",pg:"-96px -267px",ph:"-120px -267px",pk:"-192px -267px",pl:"-216px -267px",pn:"-240px -267px",pr:"-264px -267px",ps:"-288px -267px",pt:"-312px -267px",pw:"-336px -267px",py:"-360px -267px",qa:"-384px -267px",ro:"-0px -291px",rs:"-24px -291px",ru:"-48px -291px",rw:"-72px -291px",sa:"-96px -291px",sb:"-120px -291px",sc:"-144px -291px",sd:"-168px -291px",se:"-192px -291px",sg:"-216px -291px",sh:"-240px -291px",si:"-264px -291px",sk:"-288px -291px",sl:"-312px -291px",sm:"-336px -291px",sn:"-360px -291px",so:"-384px -291px",sr:"-0px -315px",ss:"-24px -315px",st:"-48px -315px",sv:"-72px -315px",sy:"-96px -315px",sz:"-120px -315px",tc:"-144px -315px",td:"-168px -315px",tf:"-192px -315px",tg:"-216px -315px",th:"-240px -315px",tj:"-264px -315px",tk:"-288px -315px",tl:"-312px -315px",tm:"-336px -315px",tn:"-360px -315px",to:"-384px -315px",tr:"-0px -339px",tt:"-24px -339px",tv:"-48px -339px",tw:"-72px -339px",tz:"-96px -339px",ua:"-120px -339px",ug:"-144px -339px",us:"-168px -339px",uy:"-192px -339px",uz:"-216px -339px",va:"-240px -339px",vc:"-264px -339px",ve:"-288px -339px",vg:"-312px -339px",vi:"-336px -339px",vn:"-360px -339px",vu:"-384px -339px",wf:"-0px -363px",ws:"-24px -363px",ye:"-48px -363px",za:"-96px -363px",zm:"-120px -363px",zw:"-144px -363px"},fe={bq:"nl",gf:"fr",gp:"fr",io:"gb",pm:"fr",re:"fr",yt:"fr"},ge=({iso2:e,className:s})=>{const t=(e=>{const s=e.trim().toLowerCase(),t=fe[s]??s;return t in me?t:null})(e);if(!t)return(0,p.jsx)("span",{"aria-hidden":"true",className:U("passflow-country-flag passflow-country-flag--fallback",s),"data-country-flag":e.toLowerCase(),children:e.slice(0,2).toUpperCase()||"–"});const a={backgroundImage:"url(data:image/png;base64,iVBORw0KG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nhN76UxS0GN/7xxvHx8c+9XtDki6uUYTGhgyiolTIeofkritFRYYVV2KH/L3eOjztLvD47jMqE5n8hvfnTxZSPjIwMas0fgiJuHPGKgdoV9JaMj5eM5/mCcCQbLpdV3yqgJAbYPTrvhB8uszPK1zkn/D4lLjFMENx4PB67HXZgJchgMUJcVoKPmGK0CaYAsVwK7+NPTBCGy/agNwgPO75vKpsYIi4xxWinZMjEPA46CDdxiQHACAb8MAzXS4i4xBSjncSkNv/Eegx9tEbEJaYY7bS/hoaGhobGP8xff9MS7Xw+B5wAAAAASUVORK5CYII=)",backgroundPosition:me[t]};return(0,p.jsx)("span",{"aria-hidden":"true",className:U("passflow-country-flag",s),"data-country-flag":e.toLowerCase(),style:a})},we=u.Root,xe=u.Trigger,ye=u.Portal,ve=u.Close,Ce=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Overlay,{ref:t,className:U("passflow-dialog-overlay",e),...s}));Ce.displayName=u.Overlay.displayName;var be=(0,l.forwardRef)(({className:e,children:s,...t},a)=>(0,p.jsxs)(ye,{children:[(0,p.jsx)(Ce,{}),(0,p.jsx)(u.Content,{ref:a,className:U("passflow-dialog-content",e),...t,children:s})]}));be.displayName=u.Content.displayName;var ke=({className:e,...s})=>(0,p.jsx)("div",{className:U("passflow-dialog-header",e),...s});ke.displayName="DialogHeader";var je=({className:e,...s})=>(0,p.jsx)("div",{className:U("passflow-dialog-footer",e),...s});je.displayName="DialogFooter";var Me=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Title,{ref:t,className:U("passflow-dialog-title",e),...s}));Me.displayName=u.Title.displayName;var Se=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Description,{ref:t,className:U("passflow-dialog-description",e),...s}));Se.displayName=u.Description.displayName;var Ee={numeric:{pattern:h.REGEXP_ONLY_DIGITS,inputMode:"numeric"},alphanumeric:{pattern:h.REGEXP_ONLY_DIGITS_AND_CHARS,inputMode:"text"}},Ne=({char:e,isActive:s,hasFakeCaret:t,state:a})=>(0,p.jsxs)("div",{className:U("passflow-field-otp",{"passflow-field-otp--active":s,"passflow-field-otp--error":"error"===a,"passflow-field-otp--disabled":"disabled"===a}),children:[e,t?(0,p.jsx)("span",{className:"passflow-field-otp__caret"}):null]}),_e=({id:e,name:s,length:t,value:a,onChange:r,onComplete:o,charset:i="numeric",state:n="default",label:l,labelledBy:c,describedBy:d,autoFocus:u=!1})=>{const{pattern:m,inputMode:f}=Ee[i],g=(0,p.jsx)(h.OTPInput,{id:e,name:s,maxLength:t,value:a,onChange:r,onComplete:o,pattern:m,inputMode:f,autoComplete:"one-time-code",disabled:"disabled"===n,"aria-labelledby":c,"aria-describedby":d,"aria-invalid":"error"===n||void 0,autoFocus:u,noScriptCSSFallback:null,containerClassName:U("passflow-field-otp-group",{"passflow-field-otp-group--disabled":"disabled"===n}),render:({slots:e})=>(0,p.jsx)("div",{className:"passflow-field-otp-slots","aria-hidden":!0,children:e.map((e,s)=>(0,p.jsx)(Ne,{...e,state:n},s))})});return void 0===l?g:(0,p.jsxs)("div",{className:"passflow-field-otp-field",children:[(0,p.jsx)("label",{htmlFor:e,className:"passflow-field-label",children:l}),g]})},Le=e=>{const s={requireNumber:"number",requireSymbol:"symbol",requireLowerCase:"lowercase letter",requireUpperCase:"uppercase letter"},t=Object.keys(e).filter(s=>e[s]);return`Must contain a ${new Intl.ListFormat("en").format(t.map(e=>s[e]))}`},Ie=(0,l.forwardRef)(({id:e,value:s,passwordPolicy:t,withMessages:a=!1,validationErrors:r=[],isError:o=!1,className:i="",disabled:n=!1,...c},d)=>{const[u,h]=(0,l.useState)(!1),m={"passflow-field--error":o},f=e=>s.length>0&&!e.some(e=>r.includes(e))?"passflow-password-validation-item--success":null,g=e=>s.length>0&&!e.some(e=>r.includes(e))?"check":"close",w=()=>h(e=>!e),x=t?.min_password_length??0,y=t?.require_lowercase??!1,v=t?.require_number??!1,C=t?.require_symbol??!1,b=t?.require_uppercase??!1;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"passflow-field-wrapper",children:[(0,p.jsx)("input",{ref:d,id:e,value:s,type:u?"text":"password",className:U("passflow-field-input passflow-field--focused passflow-field-input--with-icon",m,i),disabled:n,...c}),u?(0,p.jsx)(ue,{className:"passflow-button-display-password passflow-field-icon-button",size:"small",type:"button",variant:"clean",asIcon:!0,withIcon:!0,disabled:n,"aria-label":"Hide password",onClick:w,children:(0,p.jsx)(Ss,{size:"small",type:"general",id:"eye-on",decorative:!0})}):(0,p.jsx)(ue,{className:"passflow-button-display-password passflow-field-icon-button",size:"small",type:"button",variant:"clean",asIcon:!0,withIcon:!0,disabled:n,"aria-label":"Show password",onClick:w,children:(0,p.jsx)(Ss,{size:"small",type:"general",id:"eye-off",decorative:!0})})]}),a&&t&&(0,p.jsxs)("div",{className:"passflow-password-validation",children:[(0,p.jsxs)("p",{className:U("passflow-password-validation-item",f(["length"])),children:[(0,p.jsx)(Ss,{size:"small",id:g(["length"]),type:"general",className:U(f(["length"]))}),"At least ",x," characters"]}),(0,p.jsxs)("p",{className:U("passflow-password-validation-item",f(["uppercase","lowercase","number","symbol"])),children:[(0,p.jsx)(Ss,{size:"small",id:g(["uppercase","lowercase","number","symbol"]),type:"general",className:U(f(["uppercase","lowercase","number","symbol"]))}),Le({requireNumber:v,requireSymbol:C,requireLowerCase:y,requireUpperCase:b})]})]})]})}),Ae=()=>{const e=(0,l.useContext)(Ye);if(!e)throw new Error("useAuth must be used within an PassflowProvider");const{passflow:s}=e;return s},Pe=(0,l.createContext)(void 0),Fe=({children:e,onSessionExpired:s})=>{const t=Ae(),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);(0,l.useEffect)(()=>{const e={onAuthChange:(e,t)=>{if(e===n.PassflowEvent.SessionExpired){const e=t?.reason??"refresh_failed";i(!0),s?.(e)}else e!==n.PassflowEvent.SignIn&&e!==n.PassflowEvent.Register||i(!1)}};return t.subscribe(e,[n.PassflowEvent.SessionExpired,n.PassflowEvent.SignIn,n.PassflowEvent.Register]),()=>{t.unsubscribe(e)}},[t,s]);const c=(0,l.useCallback)(()=>t.isAuthenticated(),[t]),d=(0,l.useCallback)(async e=>{r(!0);try{const s=await t.getTokens(e);return{tokens:s,parsedTokens:s?t.getParsedTokens():void 0}}catch(s){return{tokens:void 0,parsedTokens:void 0}}finally{r(!1)}},[t]),u={isAuthenticated:c,logout:(0,l.useCallback)(async()=>{await t.logOut()},[t]),isLoading:a,isSessionExpired:o,getTokens:d};return(0,p.jsx)(Pe.Provider,{value:u,children:e})},Te=({to:e,search:s,replace:t})=>{const a=s?s.startsWith("?")?s:`?${s}`:"";t?window.location.replace(`${e}${a}`):window.location.href=`${e}${a}`},Re=(0,l.createContext)({navigate:Te,setNavigate:()=>{},router:"default"}),Ue={appSettings:null,passwordPolicy:null,url:void 0,appId:void 0,scopes:void 0,createTenantForNewUser:void 0,parseQueryParams:!0,isDiscoveringAppId:!1,hasSettingsError:!1},Ye=(0,l.createContext)(void 0),ze=(e,s)=>"SET_PASSFLOW_STATE"===s.type?{...e,...s.payload}:e,Ve={signin:{path:"/signin"},signup:{path:"/signup"},verify_otp:{path:"/verify-challenge-otp"},verify_magic_link:{path:"/verify-challenge-magic-link"},forgot_password:{path:"/forgot-password"},forgot_password_success:{path:"/forgot-password/success"},reset_password:{path:"/password/reset"},invitation:{path:"/invitation"},passkey:{path:"/passkeysss"},two_factor_verify:{path:"/two-factor-verify"},two_factor_recovery:{path:"/two-factor-recovery"},two_factor_setup:{path:"/two-factor-setup"},two_factor_setup_magic_link:{path:"/two-factor-setup-magic-link/:token"}},De=(0,l.createContext)(void 0),Ge=()=>{},Be={enabled:!1,state:{status:"idle"},prompt:null,selectedFactor:null,selectFactor:Ge,submit:Ge,cancel:Ge,dismiss:Ge,elevate:()=>Promise.resolve({status:"idle"})},Oe=e=>"string"==typeof e&&e.trim()?e.trim():null,He=e=>{if("string"!=typeof e)return null;const s=Oe(e);return s?`url(${s})`:"none"},Ze=(e,s)=>{for(const[t,a]of Object.entries((e=>({"--passflow-primary-color":Oe(e.primary_color),"--passflow-text-color":Oe(e.text_color)??Oe(e.content_color),"--passflow-secondary-text-color":Oe(e.secondary_text_color),"--passflow-background-color":Oe(e.background_color),"--passflow-background-image":He(e.background_image),"--passflow-card-color":Oe(e.card_color),"--passflow-branding-background-color":Oe(e.card_color),"--passflow-input-background-color":Oe(e.input_background_color),"--passflow-input-border-color":Oe(e.input_border_color),"--passflow-button-text-color":Oe(e.button_text_color),"--passflow-passkey-button-text-color":Oe(e.passkey_button_text_color),"--passflow-passkey-button-background-color":Oe(e.passkey_button_background_color),"--passflow-divider-color":Oe(e.divider_color),"--passflow-federated_button_background_color":Oe(e.federated_button_background_color),"--passflow-federated_button_text_color":Oe(e.federated_button_text_color)}))(s)))null===a?e.style.removeProperty(t):e.style.setProperty(t,a)},qe=()=>{const e=Ae(),s=(0,l.useContext)(Ye),[t,a]=(0,l.useState)(!1),[r,o]=(0,l.useState)(""),[i,n]=(0,l.useState)(!1),c=(0,l.useRef)(!1);if(!s)throw new Error("useAppSetting must be used within an PassflowProvider");const{state:d,dispatch:p}=s;(0,l.useLayoutEffect)(()=>{if(!d.appSettings&&!d.hasSettingsError&&!c.current){(async()=>{c.current=!0,n(!0);try{if(!e.appId&&!d.isDiscoveringAppId){p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!0}});try{const s=["/settings"];e.url&&s.push(`${e.url}/settings`);let t=null;for(const e of s)try{const s=await fetch(e);if(s.ok){t=s;break}}catch{}if(t?.ok){const s=await t.json(),a=s.login_app?.app_id||s.appId;if(a){e.setAppId(a);const t={appId:a};if(!d.scopes){const e=s.login_app?.scopes||s.scopes;e&&(t.scopes=e)}if(void 0===d.createTenantForNewUser){const e=s.login_app?.create_tenant_for_new_user??s.createTenantForNewUser;void 0!==e&&(t.createTenantForNewUser=e)}p({type:"SET_PASSFLOW_STATE",payload:{...d,...t,isDiscoveringAppId:!1}})}else p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})}}catch(t){console.warn("Failed to discover appId from /settings:",t),p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})}}let a={};e.appId&&(a=await e.getAppSettings());const r={appSettings:a};d.scopes||(r.scopes=a.defaults?.scopes),void 0===d.createTenantForNewUser&&(r.createTenantForNewUser=a.defaults?.create_tenant_for_new_user);let o=null;a.auth_strategies&&(s=a.auth_strategies,s?.some(e=>"internal"===e.type&&"password"===e.strategy?.challenge))&&(o=await e.getPasswordPolicySettings()),r.passwordPolicy=o,p({type:"SET_PASSFLOW_STATE",payload:{...d,...r}})}catch(r){a(!0),o(r.message),p({type:"SET_PASSFLOW_STATE",payload:{...d,hasSettingsError:!0}})}finally{n(!1),c.current=!1}var s})()}},[p,d.appSettings,d.hasSettingsError,d.isDiscoveringAppId,e]);const u=(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return"system"===d.appSettings?.login_app_theme?.color_scheme?e:d.appSettings?.login_app_theme?.color_scheme??e})(),h=d.appSettings?.login_app_theme?"dark"===u?d.appSettings?.login_app_theme.dark_style:d.appSettings?.login_app_theme.light_style:null;var m;return h&&(m=h,Ze(document.documentElement,m)),{appSettings:d.appSettings,scopes:d.scopes??[],createTenantForNewUser:d.createTenantForNewUser??!1,loginAppTheme:d.appSettings?.login_app_theme,passwordPolicy:d.passwordPolicy,currentStyles:h,currentTheme:u,isLoading:i,isError:t,error:r,reset:()=>{a(!1),o(""),n(!1),p({type:"SET_PASSFLOW_STATE",payload:{...d,hasSettingsError:!1}})}}},Je=()=>new URLSearchParams(window.location.search).get("parent_challenge_id")??"",We=e=>`/oidc/requests/${encodeURIComponent(e)}`,Ke=()=>{const e=(0,l.useMemo)(Je,[]),[s,t]=(0,l.useState)("loading"),[a,r]=(0,l.useState)(null),[o,i]=(0,l.useState)(new Set),[n,c]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!e)return t("invalid"),void c({message:"Invalid consent link",description:"This consent link is missing required information. Please return to the application and try again."});let s=!1;return(async()=>{try{const a=await fetch(We(e),{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(s)return;if(!a.ok){const e=await a.json().catch(()=>({}))??{};return t("invalid"),void c({message:a.status>=500?"Something went wrong":"Consent request unavailable",description:e.error_description||"We could not load this consent request. Please return to the application and try again."})}const o=await a.json();if(s)return;r(o),i(new Set(o.requested_scopes)),t("ready")}catch(a){if(s)return;t("invalid"),c({message:"Connection error",description:a instanceof Error?a.message:"Could not reach the server. Please check your connection."})}})(),()=>{s=!0}},[e]);const d=(0,l.useCallback)(e=>{i(s=>{const t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t}),c(null)},[]),p=(0,l.useCallback)(async s=>{if(!a)return;t("working"),c(null);const r=We(e),i="allow"===s?`${r}/consent`:`${r}/reject`,n="allow"===s?{granted_scopes:a.requested_scopes.filter(e=>o.has(e))}:{error:"access_denied",error_description:"User denied consent"};try{const e=await fetch(i,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Passflow-CSRF":a.csrf_token},body:JSON.stringify(n)});if(!e.ok){const s=await e.json().catch(()=>({}))??{};return t("ready"),void c({message:s.error_description||"Could not submit your decision. Please try again."})}const s=await e.json();if("redirect"===s.kind)return t("redirecting"),void(window.location.href=s.url);if("form_post"===s.kind)return t("redirecting"),void((e,s)=>{const t=document.createElement("form");t.method="POST",t.action=e,t.style.display="none";for(const[a,r]of Object.entries(s)){const e=document.createElement("input");e.type="hidden",e.name=a,e.value=r,t.appendChild(e)}document.body.appendChild(t),t.submit()})(s.action,s.fields);t("ready"),c({message:"Unexpected response from server."})}catch(l){t("ready"),c({message:l instanceof Error?l.message:"Could not reach the server. Please try again."})}},[o,a,e]),u=(0,l.useCallback)(()=>p("allow"),[p]),h=(0,l.useCallback)(()=>p("deny"),[p]),m=(0,l.useMemo)(()=>new Map((a?.scope_metadata??[]).map(e=>[e.scope,e])),[a]),f=(0,l.useCallback)(e=>m.get(e)??{scope:e,label:e,description:""},[m]);return{status:s,info:a,grantedScopes:(0,l.useMemo)(()=>(a?.requested_scopes??[]).filter(e=>o.has(e)),[o,a]),error:n,scopeMetadata:f,toggleScope:d,allow:u,deny:h}},Qe="/oidc/device/info",Xe="/oidc/device/authenticate",$e="/oidc/device/approve",es="/oidc/device/passkey/start",ss="/oidc/device/second-factor",ts=["totp","recovery_codes"],as=async e=>{const s=await e.json().catch(()=>({}))??{};if(!e.ok)throw new I({reason:"string"==typeof s.reason?s.reason:"",code:"string"==typeof s.error?s.error:"",status:e.status,description:"string"==typeof s.error_description?s.error_description:""});return s},rs=()=>{const[e,s]=(0,l.useState)("loading"),[t,a]=(0,l.useState)(null),[r,o]=(0,l.useState)(null),[i,n]=(0,l.useState)(null),[c,d]=(0,l.useState)(()=>new URLSearchParams(window.location.search).get("user_code")??""),p=(0,l.useRef)(null),u=(0,l.useRef)(null),h=(0,l.useRef)(!1),[m,f]=(0,l.useState)([]),g=(0,l.useRef)(!0);(0,l.useEffect)(()=>(g.current=!0,()=>{g.current=!1}),[]);const w=t?.csrf_token??"",x=(0,l.useCallback)(async(e,s)=>{const t=await fetch(e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Passflow-CSRF":w},body:JSON.stringify({...s,user_code:c})});return as(t)},[w,c]),y=(0,l.useCallback)((e,t=null)=>{const a=P(e);a.detail&&console.error("[passflow] device verification:",a.detail,e),g.current&&(o(a),s(t||("mode_disabled"===a.type?"refused":u.current?"second_factor":p.current?"signed_in":"ready")))},[]),v=(0,l.useCallback)(async e=>{if(!e)return s("code_entry"),void o(null);s("loading"),o(null);try{const t=await fetch(`${Qe}?user_code=${encodeURIComponent(e)}`,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}),r=await as(t);if(!g.current)return;a(r),s("ready")}catch(t){const e=P(t);if(e.detail&&console.error("[passflow] device verification:",e.detail,t),!g.current)return;if("code_required"===e.type)return o(null),void s("code_entry");o(e),s("mode_disabled"===e.type?"refused":"failed")}},[]);(0,l.useEffect)(()=>{v(c)},[v,c]);const C=(0,l.useCallback)(e=>{d(e.trim())},[]),b=(0,l.useCallback)(e=>e.second_factor_required?(u.current=e.approval_ticket,p.current=null,g.current&&f((e=>{const s=(e??[]).filter(e=>ts.includes(e));return s.length>0?s:["totp"]})(e.second_factor_methods)),!0):(u.current=null,p.current=e.approval_ticket,!1),[]),k=(0,l.useCallback)(async(e,s)=>{const t=await x(Xe,{method:"password",email:e,password:s}),a=b(t);return g.current&&n(t.email??e),a},[x,b]),j=(0,l.useCallback)(async()=>{if("undefined"==typeof window||!window.PublicKeyCredential)throw new DOMException("this browser does not implement PublicKeyCredential","NotSupportedError");const e=await x(es,{}),{startAuthentication:s}=await(import("@simplewebauthn/browser")),t=await s({optionsJSON:e.publicKey}),a=await x(Xe,{method:"passkey",passkey_challenge_id:e.passkey_challenge_id,passkey_data:t}),r=b(a);return g.current&&n(a.email??null),r},[x,b]),M=(0,l.useCallback)(async()=>{await x($e,{approval_ticket:p.current}),g.current&&s("done")},[x]),S=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{const a=await k(e,t);if(!g.current)return;h.current=!1,s(a?"second_factor":"signed_in")}catch(a){y(a)}},[k,y]),E=(0,l.useCallback)(async()=>{s("working"),o(null);try{const e=await j();if(!g.current)return;h.current=!1,s(e?"second_factor":"signed_in")}catch(e){y(e)}},[j,y]),N=(0,l.useCallback)(async()=>{s("working"),o(null);try{await M()}catch(e){y(e)}},[M,y]),_=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{if(!p.current&&await k(e,t))return h.current=!0,void(g.current&&s("second_factor"));await M()}catch(a){y(a)}},[k,M,y]),L=(0,l.useCallback)(async()=>{s("working"),o(null);try{if(await j())return h.current=!0,void(g.current&&s("second_factor"));await M()}catch(e){y(e)}},[j,M,y]),I=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{const a=await x(ss,{approval_ticket:u.current,method:e,code:t});if(p.current=a.approval_ticket,u.current=null,h.current)return void(await M());g.current&&s("signed_in")}catch(a){y(a)}},[x,M,y]),A=(0,l.useCallback)(()=>o(null),[]);return{status:e,info:t,error:r,email:i,isAuthenticated:null!==p.current,isSecondFactorPending:null!==u.current,secondFactorMethods:m,submitCode:C,signInWithPassword:S,signInWithPasskey:E,approve:N,confirmWithPassword:_,confirmWithPasskey:L,submitSecondFactor:I,clearError:A}},os=()=>{const e=Ae(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{try{return i(!0),await e.sendPasswordResetEmail(s),i(!1),!0}catch(a){return t(!0),r(a.message),!1}},[e.sendPasswordResetEmail]),isLoading:o,isError:s,error:a,reset:()=>{t(!1),r(""),i(!1)}}},is=()=>{const e=Ae(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{i(!0),r(!1),t("");try{return await e.joinInvitation(s),!0}catch(a){return console.error("[passflow] accepting invitation failed",a),r(!0),t("We couldn't accept this invitation. Try again."),!1}finally{i(!1)}},[e.joinInvitation]),isLoading:o,isError:a,error:s}},ns=e=>{if(!e)return{};const s=g.default.parse(e.startsWith("?")?e.slice(1):e);return Object.fromEntries(Object.entries(s).map(([e,s])=>[e,String(s)]))},ls=()=>{const{navigate:e,setNavigate:s,router:t,twoFactorVerifyPath:a,setTwoFactorVerifyPath:r}=(0,l.useContext)(Re);return{navigate:e,setNavigate:(0,l.useCallback)(e=>{if(!e)return void s(null);s(s=>{const{to:a,search:r="",replace:o=!1}=s;switch(t){case"react-router":e({pathname:a,search:r.startsWith("?")?r:`?${r}`,replace:o});break;case"tanstack-router":e({to:a,search:ns(r),replace:o});break;case"wouter":e({to:`${a}${r?r.startsWith("?")?r:`?${r}`:""}`,replace:o});break;default:{const e=r?r.startsWith("?")?r:`?${r}`:"";o?window.location.replace(`${a}${e}`):window.location.href=`${a}${e}`}}})},[s,t]),router:t,twoFactorVerifyPath:a,setTwoFactorVerifyPath:r}},cs=(e,s)=>{(0,l.useEffect)(()=>{const t=t=>{e.current&&!e.current.contains(t.target)&&s&&s()};return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}},[s,e])},ds=()=>{const e=Ae(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{i(!0),r(!1),t("");try{return await e.passwordlessSignInComplete(s)}catch(a){return console.error("[passflow] passwordless verification failed",a),r(!0),t(j),null}finally{i(!1)}},[e]),isLoading:o,isError:a,error:s,reset:()=>{r(!1),t(""),i(!1)}}},ps=e=>e&&le(e)?e:e?`${window.location.origin}${e.startsWith("/")?"":"/"}${e}`:"",us=(e,s)=>{const t=Ae(),a=(0,l.useContext)(Ye),r={redirect_url:ps(e),scopes:a?.state.scopes,create_tenant:s};return{federatedWithPopup:(e,s)=>t.federatedAuthWithPopup({provider:e,invite_token:s,...r}),federatedWithRedirect:(e,s)=>t.federatedAuthWithRedirect({provider:e,invite_token:s,...r})}},hs={isFailing:!1,since:null,nextRetryAt:null},ms=[n.PassflowEvent.RefreshFailing,n.PassflowEvent.RefreshRecovered,n.PassflowEvent.SessionExpired,n.PassflowEvent.SignOut,n.PassflowEvent.SignIn,n.PassflowEvent.Register];var fs=()=>{const e=Ae(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{try{return i(!0),await e.resetPassword(s),i(!1),!0}catch(a){return t(!0),r(a.message),!1}},[e.resetPassword]),isLoading:o,isError:s,error:a,reset:()=>{t(!1),r(""),i(!1)}}};var gs=()=>{const e=Ae(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),n=(0,l.useCallback)(async(a,o)=>{i(!0),r(!1),t(null);try{if("password"===o)await e.signIn(a);else{if("passkey"!==o)return await e.passwordlessSignIn(a);await e.passkeyAuthenticate(a)}return!0}catch(s){return console.error(`[passflow] ${o} sign-in failed`,s),r(!0),t(M("sign-in",o)),!1}finally{i(!1)}},[e.passkeyAuthenticate,e.passwordlessSignIn,e.signIn]);return{fetch:n,isLoading:o,isError:a,error:s,reset:()=>{r(!1),t(null),i(!1)}}},ws=()=>{const e=Ae(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(null),[o,i]=(0,l.useState)(!1),n=(0,l.useCallback)(async(s,o)=>{i(!0),t(!1),r(null);const n=()=>i(!1);try{if("password"===o)await e.signUp(s);else{if("passkey"!==o){const t=await e.passwordlessSignIn(s);return n(),t}await e.passkeyRegister(s)}return n(),!0}catch(a){return console.error(`[passflow] ${o} sign-up failed`,a),t(!0),r(M("sign-up",o)),n(),!1}finally{n()}},[e.signUp,e.passkeyRegister,e.passwordlessSignIn]);return{fetch:n,isLoading:o,isError:s,error:a,reset:()=>{t(!1),r(null),i(!1)}}},xs=()=>{const e=Ae(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)(null),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(null);return{challenge:s,isLoading:o,error:n,requestChallenge:(0,l.useCallback)(async s=>{i(!0),c(null);try{const a=await e.twoFactor.requestChallenge({first_factor_method:s});t(a),r(a.method)}catch(a){c(a),t(null)}finally{i(!1)}},[e]),verify:(0,l.useCallback)(async(t,r=!1)=>{if(!s?.challenge_id)return c(new Error("No active challenge session")),null;i(!0),c(null);try{return await e.twoFactor.verifyV2({challenge_id:s.challenge_id,method:a||s.method,response:t,trust_device:r})}catch(o){return c(o),null}finally{i(!1)}},[e,s,a]),switchMethod:(0,l.useCallback)(async a=>{if(s?.challenge_id){i(!0),c(null);try{const o=await e.twoFactor.switchToAlternative({challenge_id:s.challenge_id,method:a});t(o),r(a)}catch(o){c(o)}finally{i(!1)}}else c(new Error("No active challenge session"))},[e,s]),selectedMethod:a,reset:(0,l.useCallback)(()=>{t(null),r(null),c(null),i(!1)},[])}},ys=()=>{const e=Ae(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)([]),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(!1),[d,p]=(0,l.useState)(""),[u,h]=(0,l.useState)("idle");return{setupData:s,recoveryCodes:a,step:u,beginSetup:(0,l.useCallback)(async()=>{i(!0),c(!1),p("");try{const s=await e.beginTwoFactorSetup();return t(s),h("setup"),s}catch(s){return c(!0),p(s.message),null}finally{i(!1)}},[e]),confirmSetup:(0,l.useCallback)(async s=>{i(!0),c(!1),p("");try{const t=await e.confirmTwoFactorSetup(s);return r(t.recovery_codes),h("complete"),t}catch(t){return c(!0),p(t.message),null}finally{i(!1)}},[e]),reset:(0,l.useCallback)(()=>{t(null),r([]),c(!1),p(""),h("idle")},[]),isLoading:o,isError:n,error:d}},vs=e=>{const s=Ae(),[t,a]=(0,l.useState)(!0),[r,o]=(0,l.useState)(!1),[i,n]=(0,l.useState)(!1),[c,d]=(0,l.useState)(null),[p,u]=(0,l.useState)(null),[h,m]=(0,l.useState)(null),[f,g]=(0,l.useState)(null),[w,x]=(0,l.useState)(null),[y,v]=(0,l.useState)(null),[C,b]=(0,l.useState)(null),k=(0,l.useRef)(!0),j=(0,l.useRef)(null),M=(0,l.useCallback)(e=>{j.current&&clearInterval(j.current),v(e),j.current=setInterval(()=>{v(e=>null===e||e<=1?(j.current&&(clearInterval(j.current),j.current=null),null):e-1)},1e3)},[]),S=(0,l.useCallback)(async(t=!1)=>{if(t||C!==e||!i){t?o(!0):a(!0),d(null);try{const t=await s.validateTwoFactorSetupMagicLink(e);t.success&&t.sessionToken&&t.userId?(u(t.sessionToken),m(t.userId),g(t.appId??null),x(t.expiresIn??null),n(!0),b(e),v(null),k.current=!1):t.error&&(d(t.error),n(!1),k.current=!0,"RATE_LIMITED"===t.error.code&&t.error.retryAfter&&M(t.error.retryAfter))}catch(r){d({code:"SERVER_ERROR",message:r instanceof Error?r.message:"An unexpected error occurred"}),n(!1),k.current=!0}finally{a(!1),o(!1)}}},[e,C,i,s,M]),E=(0,l.useCallback)(async()=>{null!==y&&y>0||(b(null),await S(!0))},[S,y]);return(0,l.useEffect)(()=>{if(!e)return d({code:"INVALID_TOKEN",message:"No token provided"}),void a(!1);e!==C&&S()},[e,C,S]),(0,l.useEffect)(()=>()=>{j.current&&clearInterval(j.current),k.current&&s.clearMagicLinkSession?.()},[s]),{isLoading:t,isRetrying:r,isValidated:i,error:c,sessionToken:p,userId:h,appId:f,expiresIn:w,retryCountdown:y,retry:E}},Cs=()=>{const e=Ae(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(""),[n,c]=(0,l.useState)(null),[d,p]=(0,l.useState)(null),u=(0,l.useCallback)(()=>e.isTwoFactorVerificationRequired(),[e]),h=(0,l.useCallback)(e=>{const s=e,t=function(e){const s=e.toLowerCase();return T.expired.some(e=>s.includes(e.toLowerCase()))?{type:"expired",message:e,isRecoverable:!0,shouldAutoRedirect:!0}:T.not_enabled.some(e=>s.includes(e.toLowerCase()))?{type:"not_enabled",message:e,isRecoverable:!1,shouldAutoRedirect:!1}:T.invalid_code.some(e=>s.includes(e.toLowerCase()))?{type:"invalid_code",message:e,isRecoverable:!0,shouldAutoRedirect:!1}:{type:"generic",message:e,isRecoverable:!0,shouldAutoRedirect:!1}}(s.message);r(!0),i(s.message),c(t.type),p(t)},[]);return{isVerificationRequired:u,verify:(0,l.useCallback)(async(s,a)=>{t(!0),r(!1),i(""),c(null),p(null);try{return await e.verifyTwoFactor(s,a)}catch(o){return h(o),null}finally{t(!1)}},[e,h]),useRecoveryCode:(0,l.useCallback)(async(s,a)=>{t(!0),r(!1),i(""),c(null),p(null);try{return await e.useTwoFactorRecoveryCode(s,a)}catch(o){return h(o),null}finally{t(!1)}},[e,h]),reset:(0,l.useCallback)(()=>{r(!1),i(""),c(null),p(null)},[]),isLoading:s,isError:a,error:o,errorType:n,errorDetails:d}},bs=[],ks=({id:e,name:s,onChange:t,isError:a=!1,className:r="",disabled:o=!1,...i})=>{const[n,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(""),[h,g]=(0,l.useState)(!1),w=(0,l.useRef)(null),x=(0,l.useRef)(null);(0,l.useEffect)(()=>{n&&x.current?.focus()},[n]),cs(w,()=>{c(!1),u("")});const y=Intl.DateTimeFormat().resolvedOptions().timeZone,v=(0,m.getCountryForTimezone)(y),{inputValue:C,country:b,setCountry:k,handlePhoneValueChange:j,inputRef:M}=(0,f.usePhoneInput)({defaultCountry:v?.id.toLocaleLowerCase()||"us"}),S=(0,l.useMemo)(()=>f.defaultCountries.filter(e=>{const{name:s}=(0,f.parseCountry)(e);return s.toLowerCase().includes(d.toLowerCase())}),[d]),E=(0,l.useMemo)(()=>f.defaultCountries.filter(e=>{const{iso2:s}=(0,f.parseCountry)(e);return s===v?.id.toLocaleLowerCase()}),[v?.id]),N=(0,l.useMemo)(()=>{if(d)return S;const e=new Set(E.map(e=>(0,f.parseCountry)(e).iso2));return S.filter(s=>!e.has((0,f.parseCountry)(s).iso2))},[d,S,E]),_=(e=!1)=>{c(!1),u(""),e&&w.current?.querySelector(".passflow-button-show-country")?.focus()},L=e=>{k(e),_(!0)},I=e=>{const{name:s,dialCode:t,iso2:a}=(0,f.parseCountry)(e);return(0,p.jsxs)("div",{role:"option","aria-selected":a===b.iso2,tabIndex:0,title:s,onClick:()=>L(a),onKeyDown:e=>((e,s)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void L(s);if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;e.preventDefault();const t=Array.from(w.current?.querySelectorAll('[role="option"]')??[]),a=t.indexOf(e.currentTarget);t["ArrowDown"===e.key?Math.min(a+1,t.length-1):Math.max(a-1,0)]?.focus()})(e,a),className:"passflow-country-search-item",children:[(0,p.jsx)(ge,{iso2:a,className:"passflow-country-search-flag"}),(0,p.jsx)("span",{className:"passflow-country-search-name",children:s}),(0,p.jsxs)("span",{className:"passflow-country-search-code",children:["+",t]})]},a)};return(0,p.jsxs)("div",{ref:w,className:U("passflow-field-phone-wrapper",{"passflow-field-phone-wrapper--focus":h,"passflow-field-phone-wrapper--error":a},r),children:[(0,p.jsxs)(ue,{type:"button",variant:"clean",onClick:()=>n?_(!0):c(!0),size:"big",className:"passflow-button-show-country",disabled:o,"aria-label":`Select country, current ${b.iso2.toUpperCase()}`,"aria-haspopup":"listbox","aria-expanded":n,"aria-controls":"passflow-country-options",children:[(0,p.jsx)(ge,{iso2:b.iso2}),(0,p.jsx)(Ss,{type:"general",id:"caret-down",size:"small"})]}),n?(0,p.jsxs)("div",{className:"passflow-field-country-search-wrapper",children:[(0,p.jsx)("input",{ref:x,role:"combobox","aria-label":"Search countries","aria-expanded":"true","aria-controls":"passflow-country-options","aria-autocomplete":"list",value:d,onChange:e=>u(e.target.value),onKeyDown:e=>{"Escape"===e.key&&_(!0),"ArrowDown"===e.key&&(e.preventDefault(),w.current?.querySelector('[role="option"]')?.focus())},className:"passflow-field-country-search",onFocus:()=>g(!0),onBlur:()=>g(!1),placeholder:"Search for a country"}),(0,p.jsx)("div",{className:"passflow-field-country-search-icon",children:(0,p.jsx)(Ss,{type:"general",id:"search",size:"small"})})]}):(0,p.jsx)("input",{...i,id:e,name:s,ref:M,type:"tel",value:C,disabled:o,"aria-invalid":a,onChange:e=>{j(e),t(e)},onFocus:()=>g(!0),onBlur:()=>g(!1),className:"passflow-field-phone-input"}),(0,p.jsx)("div",{id:"passflow-country-options",role:"listbox",tabIndex:-1,"aria-label":"Countries","aria-hidden":!n,className:U("passflow-country-search-wrapper",{"passflow-country-search-wrapper--show":n,"passflow-country-search-wrapper--hidden":!n,"passflow-country-search-wrapper--without-preferred":!!d||0===E.length}),children:S.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{role:"presentation","aria-hidden":"true",className:"passflow-country-search-sticky-top"}),!d&&E.length>0?(0,p.jsxs)(p.Fragment,{children:[E.map(I),(0,p.jsx)("div",{role:"presentation",className:"passflow-country-search-divider",children:"All countries"})]}):null,N.map(I),(0,p.jsx)("div",{role:"presentation","aria-hidden":"true",className:"passflow-country-search-sticky-bottom"})]}):(0,p.jsx)("div",{role:"presentation",className:"passflow-country-search-no-matches",children:"No matches"})})]})},js=(0,l.forwardRef)(({id:e,isError:s=!1,className:t="",disabled:a=!1,...r},o)=>(0,p.jsx)("input",{ref:o,id:e,type:"text",className:U("passflow-field-input passflow-field--focused",{"passflow-field--error":s},t),disabled:a,...r})),Ms="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.9289%2012.9289H10.8545V9.68033C10.8545%208.90563%2010.8407%207.90839%209.77562%207.90839C8.69517%207.90839%208.52983%208.7524%208.52983%209.62391V12.9287H6.45547V6.24817H8.44688V7.16113H8.47481C8.88025%206.46785%209.63695%206.05224%2010.4396%206.08204C12.5421%206.08204%2012.9297%207.46497%2012.9297%209.2641L12.9289%2012.9289ZM4.11485%205.33497C3.45446%205.33497%202.91079%204.79161%202.91079%204.1312C2.91079%203.47081%203.45421%202.92738%204.1146%202.92738C4.77493%202.92738%205.31829%203.47068%205.31841%204.13096C5.31841%204.79123%204.77512%205.33491%204.11485%205.33497ZM5.15203%2012.9289H3.07549V6.24817H5.15203V12.9289ZM13.963%201.00097H2.03305C1.47303%200.994641%201.00683%201.45002%201%202.01004V13.9897C1.00658%2014.55%201.47272%2015.0059%202.03305%2014.9999H13.963C14.5247%2015.007%2014.9925%2014.5511%2015%2013.9897V2.00923C14.9925%201.44802%2014.5241%200.992699%2013.963%201.00009V1.00097Z'%20fill='%230A66C2'/%3e%3c/svg%3e",Ss=({type:e,id:s,size:t,className:a="",decorative:r=!1,matchTextColor:o=!1})=>{const i={"passflow-icon--small":"small"===t,"passflow-icon--medium":"medium"===t,"passflow-icon--big":"big"===t,"passflow-icon--large":"large"===t},n={general:{logo:"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='8'%20fill='%231E1E1E'%20/%3e%3cpath%20d='M21.2532%2031H13.6932V12.52H24.9012C25.9252%2012.52%2026.8612%2012.72%2027.7092%2013.12C28.5732%2013.504%2029.2612%2014.184%2029.7732%2015.16C30.2852%2016.12%2030.5412%2017.456%2030.5412%2019.168C30.5412%2020.848%2030.2772%2022.184%2029.7492%2023.176C29.2212%2024.152%2028.5252%2024.856%2027.6612%2025.288C26.8132%2025.704%2025.8932%2025.912%2024.9012%2025.912H21.2532V31ZM23.1252%2018.592H20.8212V19.888H23.1972C23.3252%2019.888%2023.4612%2019.848%2023.6052%2019.768C23.7652%2019.688%2023.8452%2019.52%2023.8452%2019.264C23.8452%2018.992%2023.7572%2018.816%2023.5812%2018.736C23.4052%2018.64%2023.2532%2018.592%2023.1252%2018.592Z'%20fill='white'%20/%3e%3c/svg%3e","logo-red":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='8'%20fill='%23D85D5D'%20/%3e%3cpath%20d='M21.2532%2031H13.6932V12.52H24.9012C25.9252%2012.52%2026.8612%2012.72%2027.7092%2013.12C28.5732%2013.504%2029.2612%2014.184%2029.7732%2015.16C30.2852%2016.12%2030.5412%2017.456%2030.5412%2019.168C30.5412%2020.848%2030.2772%2022.184%2029.7492%2023.176C29.2212%2024.152%2028.5252%2024.856%2027.6612%2025.288C26.8132%2025.704%2025.8932%2025.912%2024.9012%2025.912H21.2532V31ZM23.1252%2018.592H20.8212V19.888H23.1972C23.3252%2019.888%2023.4612%2019.848%2023.6052%2019.768C23.7652%2019.688%2023.8452%2019.52%2023.8452%2019.264C23.8452%2018.992%2023.7572%2018.816%2023.5812%2018.736C23.4052%2018.64%2023.2532%2018.592%2023.1252%2018.592Z'%20fill='white'%20/%3e%3c/svg%3e",warning:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_823)'%3e%3cpath%20d='M7.99992%205.33334V8M7.99992%2010.6667H8.00659M14.6666%208C14.6666%2011.6819%2011.6818%2014.6667%207.99992%2014.6667C4.31802%2014.6667%201.33325%2011.6819%201.33325%208C1.33325%204.3181%204.31802%201.33334%207.99992%201.33334C11.6818%201.33334%2014.6666%204.3181%2014.6666%208Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_823'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",mail:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.33337%204.66666L6.77665%208.47696C7.21743%208.78551%207.43783%208.93978%207.67755%208.99954C7.8893%209.05232%208.11078%209.05232%208.32253%208.99954C8.56226%208.93978%208.78265%208.78551%209.22343%208.47696L14.6667%204.66666M4.53337%2013.3333H11.4667C12.5868%2013.3333%2013.1469%2013.3333%2013.5747%2013.1153C13.951%2012.9236%2014.257%2012.6176%2014.4487%2012.2413C14.6667%2011.8135%2014.6667%2011.2534%2014.6667%2010.1333V5.86666C14.6667%204.74656%2014.6667%204.18651%2014.4487%203.75868C14.257%203.38236%2013.951%203.0764%2013.5747%202.88465C13.1469%202.66666%2012.5868%202.66666%2011.4667%202.66666H4.53337C3.41327%202.66666%202.85322%202.66666%202.42539%202.88465C2.04907%203.0764%201.74311%203.38236%201.55136%203.75868C1.33337%204.18651%201.33337%204.74656%201.33337%205.86666V10.1333C1.33337%2011.2534%201.33337%2011.8135%201.55136%2012.2413C1.74311%2012.6176%202.04907%2012.9236%202.42539%2013.1153C2.85322%2013.3333%203.41327%2013.3333%204.53337%2013.3333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",edit:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.6231%206.86026L9.13975%204.37687M2%2014L4.10117%2013.7665C4.35789%2013.738%204.48624%2013.7238%204.60622%2013.6849C4.71266%2013.6505%204.81395%2013.6018%204.90735%2013.5402C5.01263%2013.4708%205.10395%2013.3794%205.28659%2013.1968L13.4857%204.99772C14.1714%204.31195%2014.1714%203.2001%2013.4857%202.51433C12.7999%201.82856%2011.6881%201.82856%2011.0023%202.51433L2.80321%2010.7134C2.62056%2010.896%202.52924%2010.9874%202.45982%2011.0926C2.39823%2011.186%202.34955%2011.2873%202.31509%2011.3938C2.27625%2011.5138%202.26199%2011.6421%202.23346%2011.8988L2%2014Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","eye-on":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.61342%208.47545C1.52262%208.33169%201.47723%208.25981%201.45182%208.14895C1.43273%208.06567%201.43273%207.93434%201.45182%207.85106C1.47723%207.74019%201.52262%207.66831%201.61341%207.52455C2.36369%206.33656%204.59693%203.33334%208.00027%203.33334C11.4036%203.33334%2013.6369%206.33656%2014.3871%207.52455C14.4779%207.66831%2014.5233%207.74019%2014.5487%207.85106C14.5678%207.93434%2014.5678%208.06567%2014.5487%208.14895C14.5233%208.25981%2014.4779%208.33169%2014.3871%208.47545C13.6369%209.66344%2011.4036%2012.6667%208.00027%2012.6667C4.59693%2012.6667%202.36369%209.66344%201.61342%208.47545Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00027%2010C9.10484%2010%2010.0003%209.10457%2010.0003%208C10.0003%206.89543%209.10484%206%208.00027%206C6.8957%206%206.00027%206.89543%206.00027%208C6.00027%209.10457%206.8957%2010%208.00027%2010Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","eye-off":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.16196%203.39488C7.4329%203.35482%207.7124%203.33333%208.00028%203.33333C11.4036%203.33333%2013.6369%206.33656%2014.3871%207.52455C14.4779%207.66833%2014.5233%207.74023%2014.5488%207.85112C14.5678%207.93439%2014.5678%208.06578%2014.5487%208.14905C14.5233%208.25993%2014.4776%208.3323%2014.3861%208.47705C14.1862%208.79343%2013.8814%209.23807%2013.4777%209.7203M4.48288%204.47669C3.0415%205.45447%202.06297%206.81292%201.61407%207.52352C1.52286%207.66791%201.47725%207.74011%201.45183%207.85099C1.43273%207.93426%201.43272%208.06563%201.45181%208.14891C1.47722%208.25979%201.52262%208.33168%201.61342%208.47545C2.36369%209.66344%204.59694%2012.6667%208.00028%2012.6667C9.37255%2012.6667%2010.5546%2012.1784%2011.5259%2011.5177M2.00028%202L14.0003%2014M6.58606%206.58579C6.22413%206.94772%206.00028%207.44772%206.00028%208C6.00028%209.10457%206.89571%2010%208.00028%2010C8.55256%2010%209.05256%209.77614%209.41449%209.41421'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",search:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014L11.1%2011.1M12.6667%207.33333C12.6667%2010.2789%2010.2789%2012.6667%207.33333%2012.6667C4.38781%2012.6667%202%2010.2789%202%207.33333C2%204.38781%204.38781%202%207.33333%202C10.2789%202%2012.6667%204.38781%2012.6667%207.33333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","caret-down":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%206L8%2010L12%206H4Z'%20fill='%236B6F76'/%3e%3c/svg%3e",label:"data:image/svg+xml,%3csvg%20width='43'%20height='10'%20viewBox='0%200%2043%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.91%209H5.346L5.236%207.988H3.674L3.564%209H0L2.178%200.53H6.732L8.91%209ZM4.158%203.665L4.037%204.721H4.873L4.752%203.665H4.158ZM16.6389%206.712C16.5215%207.482%2016.1145%208.087%2015.4179%208.527C14.7212%208.95967%2013.8082%209.176%2012.6789%209.176C11.5495%209.176%2010.6365%208.95967%209.93988%208.527C9.25054%208.09433%208.84354%207.49667%208.71888%206.734C8.68954%206.52867%208.66388%206.25367%208.64188%205.909C8.62721%205.557%208.61988%205.17933%208.61988%204.776C8.61988%204.38733%208.62721%204.028%208.64188%203.698C8.66388%203.36067%208.68954%203.09667%208.71888%202.906C8.84354%202.09933%209.25421%201.47233%209.95088%201.025C10.6475%200.577666%2011.5569%200.354%2012.6789%200.354C13.8082%200.354%2014.7212%200.577666%2015.4179%201.025C16.1145%201.465%2016.5215%202.07733%2016.6389%202.862C16.6682%203.05267%2016.6902%203.31667%2016.7049%203.654C16.7269%203.984%2016.7379%204.347%2016.7379%204.743C16.7379%205.161%2016.7269%205.54233%2016.7049%205.887C16.6902%206.23167%2016.6682%206.50667%2016.6389%206.712ZM12.9759%206.206V3.324C12.9759%203.126%2012.8769%203.027%2012.6789%203.027C12.4809%203.027%2012.3819%203.126%2012.3819%203.324V6.206C12.3819%206.404%2012.4809%206.503%2012.6789%206.503C12.8769%206.503%2012.9759%206.404%2012.9759%206.206ZM25.1574%206.712C25.0401%207.482%2024.6331%208.087%2023.9364%208.527C23.2398%208.95967%2022.3268%209.176%2021.1974%209.176C20.0681%209.176%2019.1551%208.95967%2018.4584%208.527C17.7691%208.09433%2017.3621%207.49667%2017.2374%206.734C17.2081%206.52867%2017.1824%206.25367%2017.1604%205.909C17.1458%205.557%2017.1384%205.17933%2017.1384%204.776C17.1384%204.38733%2017.1458%204.028%2017.1604%203.698C17.1824%203.36067%2017.2081%203.09667%2017.2374%202.906C17.3621%202.09933%2017.7728%201.47233%2018.4694%201.025C19.1661%200.577666%2020.0754%200.354%2021.1974%200.354C22.3268%200.354%2023.2398%200.577666%2023.9364%201.025C24.6331%201.465%2025.0401%202.07733%2025.1574%202.862C25.1868%203.05267%2025.2088%203.31667%2025.2234%203.654C25.2454%203.984%2025.2564%204.347%2025.2564%204.743C25.2564%205.161%2025.2454%205.54233%2025.2234%205.887C25.2088%206.23167%2025.1868%206.50667%2025.1574%206.712ZM21.4944%206.206V3.324C21.4944%203.126%2021.3954%203.027%2021.1974%203.027C20.9994%203.027%2020.9004%203.126%2020.9004%203.324V6.206C20.9004%206.404%2020.9994%206.503%2021.1974%206.503C21.3954%206.503%2021.4944%206.404%2021.4944%206.206ZM33.555%200.53V3.797H31.432V9H27.769V3.797H25.635V0.53H33.555ZM38.4495%202.906V0.53H42.0135V9H38.4495V6.272H37.5585V9H33.9945V0.53H37.5585V2.906H38.4495Z'%20fill='%236B6F76'/%3e%3c/svg%3e",close:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6666%2010.6667L7.99993%208.00001M7.99993%208.00001L5.33325%205.33333M7.99993%208.00001L10.6666%205.33333M7.99993%208.00001L5.33325%2010.6667'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",check:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%208L6.82843%2010.8284L12.4847%205.17155'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",key:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.1111%206.1333C11.1111%205.81483%2010.9896%205.49636%2010.7466%205.25338C10.5037%205.01039%2010.1852%204.88889%209.86669%204.88889M9.86669%209.86667C11.9286%209.86667%2013.6%208.1952%2013.6%206.13333C13.6%204.07147%2011.9286%202.4%209.86669%202.4C7.80483%202.4%206.13336%204.07147%206.13336%206.13333C6.13336%206.30362%206.14476%206.47125%206.16684%206.63549C6.20316%206.90562%206.22131%207.04069%206.20909%207.12615C6.19636%207.21516%206.18015%207.26313%206.13627%207.34163C6.09416%207.41698%206.01993%207.4912%205.87148%207.63965L2.69162%2010.8195C2.584%2010.9271%202.53019%2010.9809%202.49171%2011.0437C2.4576%2011.0994%202.43246%2011.1601%202.41722%2011.2236C2.40002%2011.2952%202.40002%2011.3713%202.40002%2011.5235V12.6044C2.40002%2012.9529%202.40002%2013.1272%202.46784%2013.2603C2.5275%2013.3773%202.62269%2013.4725%202.73976%2013.5322C2.87286%2013.6%203.0471%2013.6%203.39558%2013.6H4.88891V12.3556H6.13336V11.1111H7.3778L8.36037%2010.1285C8.50882%209.98009%208.58305%209.90587%208.6584%209.86375C8.73689%209.81988%208.78486%209.80367%208.87388%209.79093C8.95933%209.77871%209.0944%209.79687%209.36453%209.83319C9.52878%209.85527%209.6964%209.86667%209.86669%209.86667Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",phone:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.49998%2011.6666H8.50665M5.96665%2014.6666H11.0333C11.78%2014.6666%2012.1534%2014.6666%2012.4386%2014.5213C12.6895%2014.3934%2012.8935%2014.1895%2013.0213%2013.9386C13.1666%2013.6534%2013.1666%2013.28%2013.1666%2012.5333V3.46659C13.1666%202.71985%2013.1666%202.34648%2013.0213%202.06126C12.8935%201.81038%2012.6895%201.60641%2012.4386%201.47858C12.1534%201.33325%2011.78%201.33325%2011.0333%201.33325H5.96665C5.21991%201.33325%204.84654%201.33325%204.56133%201.47858C4.31044%201.60641%204.10647%201.81038%203.97864%202.06126C3.83331%202.34648%203.83331%202.71985%203.83331%203.46659V12.5333C3.83331%2013.28%203.83331%2013.6534%203.97864%2013.9386C4.10647%2014.1895%204.31044%2014.3934%204.56133%2014.5213C4.84654%2014.6666%205.21991%2014.6666%205.96665%2014.6666ZM8.83331%2011.6666C8.83331%2011.8507%208.68407%2011.9999%208.49998%2011.9999C8.31588%2011.9999%208.16665%2011.8507%208.16665%2011.6666C8.16665%2011.4825%208.31588%2011.3333%208.49998%2011.3333C8.68407%2011.3333%208.83331%2011.4825%208.83331%2011.6666Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","one-password":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cg%20clip-path='url(%23clip0_2691_4730)'%3e%3cpath%20d='M20.8039%2020.4084V18.2344C20.8039%2017.9893%2021.0026%2017.7906%2021.2477%2017.7906H22.7785C23.0236%2017.7906%2023.2222%2017.9893%2023.2222%2018.2344V22.2139C23.2222%2022.2748%2023.1918%2022.3212%2023.1614%2022.3669L22.7785%2022.7498C22.6864%2022.8419%2022.6864%2022.9797%2022.7785%2023.0558L23.1614%2023.4386C23.1819%2023.4582%2023.198%2023.4821%2023.2086%2023.5085C23.2191%2023.5349%2023.2237%2023.5633%2023.2222%2023.5916V25.7648C23.2222%2025.8825%2023.1755%2025.9954%2023.0923%2026.0786C23.009%2026.1618%2022.8962%2026.2086%2022.7785%2026.2086H21.2477C21.13%2026.2086%2021.0171%2026.1618%2020.9339%2026.0786C20.8507%2025.9954%2020.8039%2025.8825%2020.8039%2025.7648V21.7853C20.8039%2021.7244%2020.8344%2021.678%2020.8648%2021.6323L21.2477%2021.2494C21.3398%2021.1573%2021.3398%2021.0195%2021.2477%2020.9434L20.8648%2020.5606C20.8443%2020.5411%2020.8282%2020.5174%2020.8177%2020.4911C20.8072%2020.4649%2020.8025%2020.4366%2020.8039%2020.4084ZM27.7064%2022C27.7064%2021.2503%2027.5587%2020.5079%2027.2718%2019.8153C26.9849%2019.1227%2026.5644%2018.4933%2026.0343%2017.9632C25.5042%2017.4331%2024.8748%2017.0126%2024.1822%2016.7257C23.4895%2016.4388%2022.7472%2016.2911%2021.9975%2016.2911C21.2478%2016.2911%2020.5054%2016.4388%2019.8128%2016.7257C19.1201%2017.0126%2018.4908%2017.4331%2017.9607%2017.9632C17.4305%2018.4933%2017.01%2019.1227%2016.7231%2019.8153C16.4362%2020.5079%2016.2886%2021.2503%2016.2886%2022C16.2886%2023.5141%2016.89%2024.9662%2017.9607%2026.0368C19.0313%2027.1074%2020.4834%2027.7089%2021.9975%2027.7089C23.5116%2027.7089%2024.9637%2027.1074%2026.0343%2026.0368C27.1049%2024.9662%2027.7064%2023.5141%2027.7064%2022ZM29.5127%2022C29.5127%2026.1477%2026.1452%2029.5%2022.0127%2029.5C17.865%2029.5%2014.5127%2026.1325%2014.5127%2022C14.5127%2017.8523%2017.8802%2014.5%2022.0127%2014.5C26.1452%2014.5%2029.5127%2017.8523%2029.5127%2022Z'%20fill='%237F7F7F'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2691_4730'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(14%2014)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e","browser-chrome":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cg%20clip-path='url(%23clip0_2691_4741)'%3e%3cpath%20d='M21.9999%2019.3334C20.5272%2019.3334%2019.3333%2020.5273%2019.3333%2022C19.3333%2023.4728%2020.5272%2024.6667%2021.9999%2024.6667C23.4727%2024.6667%2024.6666%2023.4728%2024.6666%2022C24.6666%2020.5273%2023.4727%2019.3334%2021.9999%2019.3334ZM21.9999%2019.3334H28.1133M16.6333%2018.04L19.6933%2023.3334M21.2533%2028.6267L24.3066%2023.3334M28.6666%2022C28.6666%2025.6819%2025.6818%2028.6667%2021.9999%2028.6667C18.318%2028.6667%2015.3333%2025.6819%2015.3333%2022C15.3333%2018.3181%2018.318%2015.3334%2021.9999%2015.3334C25.6818%2015.3334%2028.6666%2018.3181%2028.6666%2022Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2691_4741'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(14%2014)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",passkey:"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cpath%20d='M25.3333%2020C25.3333%2019.6587%2025.2031%2019.3175%2024.9428%2019.0572C24.6825%2018.7968%2024.3412%2018.6667%2024%2018.6667M24%2024C26.2091%2024%2028%2022.2091%2028%2020C28%2017.7909%2026.2091%2016%2024%2016C21.7909%2016%2020%2017.7909%2020%2020C20%2020.1825%2020.0122%2020.3621%2020.0359%2020.538C20.0748%2020.8275%2020.0942%2020.9722%2020.0811%2021.0637C20.0675%2021.1591%2020.0501%2021.2105%2020.0031%2021.2946C19.958%2021.3753%2019.8785%2021.4549%2019.7194%2021.6139L16.3124%2025.0209C16.1971%2025.1362%2016.1395%2025.1939%2016.0982%2025.2611C16.0617%2025.3208%2016.0348%2025.3858%2016.0184%2025.4538C16%2025.5306%2016%2025.6121%2016%2025.7752V26.9333C16%2027.3067%2016%2027.4934%2016.0727%2027.636C16.1366%2027.7614%2016.2386%2027.8634%2016.364%2027.9273C16.5066%2028%2016.6933%2028%2017.0667%2028H18.6667V26.6667H20V25.3333H21.3333L22.3861%2024.2806C22.5451%2024.1215%2022.6247%2024.042%2022.7054%2023.9969C22.7895%2023.9499%2022.8409%2023.9325%2022.9363%2023.9189C23.0278%2023.9058%2023.1725%2023.9252%2023.462%2023.9641C23.6379%2023.9878%2023.8175%2024%2024%2024Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","dots-vertical":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.00004%208.66667C8.36823%208.66667%208.66671%208.36819%208.66671%208C8.66671%207.63181%208.36823%207.33333%208.00004%207.33333C7.63185%207.33333%207.33337%207.63181%207.33337%208C7.33337%208.36819%207.63185%208.66667%208.00004%208.66667Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00004%204C8.36823%204%208.66671%203.70152%208.66671%203.33333C8.66671%202.96514%208.36823%202.66667%208.00004%202.66667C7.63185%202.66667%207.33337%202.96514%207.33337%203.33333C7.33337%203.70152%207.63185%204%208.00004%204Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00004%2013.3333C8.36823%2013.3333%208.66671%2013.0349%208.66671%2012.6667C8.66671%2012.2985%208.36823%2012%208.00004%2012C7.63185%2012%207.33337%2012.2985%207.33337%2012.6667C7.33337%2013.0349%207.63185%2013.3333%208.00004%2013.3333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",trash:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%202H10M2%204H14M12.6667%204L12.1991%2011.0129C12.129%2012.065%2012.0939%2012.5911%2011.8667%2012.99C11.6666%2013.3412%2011.3648%2013.6235%2011.0011%2013.7998C10.588%2014%2010.0607%2014%209.00623%2014H6.99377C5.93927%2014%205.41202%2014%204.99889%2013.7998C4.63517%2013.6235%204.33339%2013.3412%204.13332%2012.99C3.90607%2012.5911%203.871%2012.065%203.80086%2011.0129L3.33333%204M6.66667%207V10.3333M9.33333%207V10.3333'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},providers:{google:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.7%208.15554C14.7%207.57997%2014.6533%207.15997%2014.5523%206.72443H7.97998V9.32218H11.8377C11.76%209.96777%2011.34%2010.94%2010.4066%2011.5933L10.3936%2011.6803L12.4716%2013.2901L12.6155%2013.3045C13.9378%2012.0834%2014.7%2010.2867%2014.7%208.15554Z'%20fill='%234285F4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.98022%2015C9.87019%2015%2011.4568%2014.3778%2012.6158%2013.3045L10.4069%2011.5933C9.81576%2012.0055%209.02242%2012.2933%207.98022%2012.2933C6.12911%2012.2933%204.558%2011.0722%203.99793%209.38446L3.91586%209.39143L1.75507%2011.0637L1.72681%2011.1422C2.87791%2013.4289%205.2424%2015%207.98022%2015Z'%20fill='%2334A853'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.9977%209.38448C3.84994%208.94893%203.76439%208.48223%203.76439%208.00002C3.76439%207.51778%203.8499%207.05111%203.98993%206.61557L3.98602%206.52279L1.79819%204.82367L1.72662%204.85773C1.25218%205.80664%200.97998%206.87219%200.97998%207.99998C0.97998%209.12777%201.25223%2010.1933%201.72662%2011.1422L3.99774%209.38443'%20fill='%23FBBC04'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.98022%203.70662C9.29466%203.70662%2010.1813%204.27442%2010.6869%204.7489L12.6625%202.82C11.4492%201.69221%209.87019%201%207.98022%201C5.2424%201%202.87795%202.5711%201.72681%204.85776L3.99016%206.6156C4.558%204.92782%206.12911%203.70666%207.98022%203.70666'%20fill='%23EA4335'/%3e%3c/svg%3e",gitlab:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_834)'%3e%3cpath%20d='M7.99957%2015.3683L10.9471%206.30157H5.05627L7.99957%2015.3683Z'%20fill='%23E24329'/%3e%3cpath%20d='M0.92752%206.30157L0.0299048%209.05617C-0.0513217%209.30625%200.0363974%209.58242%200.25079%209.73834L7.99948%2015.3683L0.92752%206.30157Z'%20fill='%23FCA326'/%3e%3cpath%20d='M0.92749%206.30164H5.05611L3.27927%200.841173C3.18833%200.561813%202.792%200.561813%202.69779%200.841173L0.92749%206.30164Z'%20fill='%23E24329'/%3e%3cpath%20d='M15.0757%206.30157L15.9701%209.05617C16.0513%209.30625%2015.9636%209.58242%2015.7492%209.73834L7.99939%2015.3683L15.0757%206.30157Z'%20fill='%23FCA326'/%3e%3cpath%20d='M15.0757%206.30164H10.947L12.7206%200.841173C12.8116%200.561813%2013.2079%200.561813%2013.3021%200.841173L15.0757%206.30164Z'%20fill='%23E24329'/%3e%3cpath%20d='M7.99939%2015.3683L10.947%206.30157H15.0757L7.99939%2015.3683Z'%20fill='%23FC6D26'/%3e%3cpath%20d='M7.9994%2015.3683L0.92749%206.30157H5.05611L7.9994%2015.3683Z'%20fill='%23FC6D26'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_834'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",apple:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.6167%204.77308C13.5312%204.83608%2012.0218%205.64397%2012.0218%207.44037C12.0218%209.51818%2013.9425%2010.2533%2014%2010.2715C13.9912%2010.3162%2013.6948%2011.2781%2012.9873%2012.2583C12.3564%2013.1207%2011.6976%2013.9818%2010.6952%2013.9818C9.69291%2013.9818%209.43498%2013.4287%208.27784%2013.4287C7.15021%2013.4287%206.74928%2014%205.83245%2014C4.9156%2014%204.27588%2013.2019%203.54034%2012.2218C2.68836%2011.0709%202%209.28291%202%207.58597C2%204.86409%203.86316%203.42054%205.69684%203.42054C6.67116%203.42054%207.48335%204.02821%208.09508%204.02821C8.67726%204.02821%209.58531%203.38414%2010.6937%203.38414C11.1139%203.38414%2012.6233%203.42054%2013.6167%204.77308ZM10.1676%202.23182C10.6259%201.71517%2010.9503%200.998298%2010.9503%200.281428C10.9503%200.182018%2010.9414%200.0812084%2010.9223%200C10.1764%200.0266027%209.28899%200.471848%208.75398%201.0613C8.33385%201.51495%207.94176%202.23182%207.94176%202.95849C7.94176%203.06771%207.96092%203.17691%207.9698%203.21192C8.01697%203.22032%208.09361%203.23012%208.17025%203.23012C8.83946%203.23012%209.68112%202.80448%2010.1676%202.23182Z'%20fill='black'/%3e%3c/svg%3e",atlassian:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.14981%207.46537C4.94085%207.24181%204.61205%207.2541%204.47223%207.54219L1.03899%2014.4048C1.00767%2014.4674%200.992879%2014.5369%200.996019%2014.6068C0.999159%2014.6768%201.02013%2014.7447%201.05693%2014.8042C1.09373%2014.8637%201.14514%2014.9128%201.20627%2014.9469C1.26741%2014.9809%201.33623%2014.9987%201.4062%2014.9987H6.18693C6.26393%2015.0002%206.33969%2014.9792%206.40492%2014.9382C6.47014%2014.8973%206.52201%2014.8382%206.55414%2014.7682C7.58512%2012.641%206.96054%209.39978%205.14981%207.46537Z'%20fill='url(%23paint0_linear_2502_832)'/%3e%3cpath%20d='M7.66883%201.22039C5.74824%204.2626%205.875%207.63208%207.14029%2010.1611L9.44499%2014.7705C9.47857%2014.8394%209.53076%2014.8975%209.59567%2014.9382C9.66057%2014.979%209.73558%2015.0007%209.81221%2015.001H14.5929C14.6629%2015.001%2014.7317%2014.9832%2014.7929%2014.9492C14.854%2014.9151%2014.9054%2014.866%2014.9422%2014.8065C14.979%2014.747%2015%2014.6791%2015.0031%2014.6092C15.0063%2014.5393%2014.9915%2014.4697%2014.9601%2014.4071C14.9601%2014.4071%208.52849%201.53844%208.37023%201.21808C8.22196%200.929997%207.85474%200.923851%207.66883%201.22039Z'%20fill='%232681FF'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_832'%20x1='7.03199'%20y1='8.52553'%20x2='3.40822'%20y2='14.802'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230052CC'/%3e%3cstop%20offset='0.92'%20stop-color='%232684FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",bitbucket:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_831)'%3e%3cpath%20d='M0.519254%200.768994C0.44444%200.768029%200.370321%200.783452%200.302102%200.814182C0.233882%200.84491%200.173216%200.890198%200.124362%200.94687C0.0755086%201.00354%200.0396522%201.07021%200.0193102%201.14222C-0.00103186%201.21422%20-0.00536625%201.28981%200.00661131%201.36366L2.18278%2014.5745C2.2099%2014.7362%202.2931%2014.883%202.41779%2014.9894C2.54249%2015.0959%202.70068%2015.155%202.8646%2015.1563H13.3046C13.4274%2015.1579%2013.5468%2015.1153%2013.6409%2015.0362C13.735%2014.9572%2013.7976%2014.847%2013.8172%2014.7257L15.9934%201.36622C16.0054%201.29237%2016.001%201.21678%2015.9807%201.14478C15.9603%201.07278%2015.9245%201.0061%2015.8756%200.94943C15.8268%200.892766%2015.7661%200.84747%2015.6979%200.816742C15.6297%200.786016%2015.5556%200.770592%2015.4807%200.771557L0.519254%200.768994ZM9.68272%2010.317H6.35057L5.44832%205.60322H10.4902L9.68272%2010.317Z'%20fill='%232684FF'/%3e%3cpath%20d='M15.3013%205.60321H10.4902L9.68272%2010.3169H6.35055L2.41602%2014.9871C2.54072%2015.0949%202.69972%2015.1549%202.86458%2015.1563H13.3071C13.43%2015.1579%2013.5494%2015.1153%2013.6434%2015.0362C13.7375%2014.9572%2013.8001%2014.847%2013.8198%2014.7257L15.3013%205.60321Z'%20fill='url(%23paint0_linear_2502_831)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_831'%20x1='16.4138'%20y1='6.92327'%20x2='8.46264'%20y2='13.1288'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.18'%20stop-color='%230052CC'/%3e%3cstop%20offset='1'%20stop-color='%232684FF'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_2502_831'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",discord:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_836)'%3e%3cpath%20d='M13.5535%202.79193C12.5178%202.30734%2011.4104%201.95517%2010.2526%201.75464C10.1104%202.01171%209.94432%202.35748%209.82976%202.63254C8.59904%202.44745%207.37956%202.44745%206.17144%202.63254C6.05693%202.35748%205.88704%202.01171%205.74358%201.75464C4.58454%201.95517%203.47584%202.30864%202.44013%202.79449C0.351095%205.95129%20-0.215207%209.02968%200.0679444%2012.0644C1.4535%2013.099%202.79627%2013.7276%204.11638%2014.139C4.44233%2013.6903%204.73302%2013.2134%204.98345%2012.7109C4.5065%2012.5297%204.04969%2012.306%203.61805%2012.0464C3.73256%2011.9615%203.84457%2011.8729%203.95278%2011.7816C6.58546%2013.013%209.44592%2013.013%2012.0471%2011.7816C12.1566%2011.8729%2012.2686%2011.9615%2012.3819%2012.0464C11.949%2012.3073%2011.491%2012.531%2011.014%2012.7122C11.2644%2013.2134%2011.5538%2013.6916%2011.881%2014.1402C13.2024%2013.7289%2014.5464%2013.1004%2015.932%2012.0644C16.2642%208.5464%2015.3645%205.49628%2013.5535%202.79193ZM5.34212%2010.1981C4.55182%2010.1981%203.9037%209.46024%203.9037%208.56184C3.9037%207.66337%204.53798%206.92429%205.34212%206.92429C6.14628%206.92429%206.79438%207.66207%206.78054%208.56184C6.78178%209.46024%206.14628%2010.1981%205.34212%2010.1981ZM10.6578%2010.1981C9.86752%2010.1981%209.21944%209.46024%209.21944%208.56184C9.21944%207.66337%209.85368%206.92429%2010.6578%206.92429C11.462%206.92429%2012.1101%207.66207%2012.0962%208.56184C12.0962%209.46024%2011.462%2010.1981%2010.6578%2010.1981Z'%20fill='%235865F2'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_836'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",dropbox:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.01032%204.15504L4.00518%206.71006L8.01032%209.26513L4.00518%2011.8201L0%209.25129L4.00518%206.69625L0%204.15504L4.00518%201.60001L8.01032%204.15504ZM3.98446%2012.6418L7.98964%2010.0868L11.9948%2012.6418L7.98964%2015.1969L3.98446%2012.6418ZM8.01032%209.25129L12.0155%206.69625L8.01032%204.15504L11.9948%201.60001L16%204.15504L11.9948%206.71006L16%209.26513L11.9948%2011.8201L8.01032%209.25129Z'%20fill='%230061FF'/%3e%3c/svg%3e",facebook:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2015C11.866%2015%2015%2011.866%2015%207.99997C15%204.13401%2011.866%201%208%201C4.134%201%201%204.13401%201%207.99997C1%2011.866%204.134%2015%208%2015Z'%20fill='%231977F3'/%3e%3cpath%20d='M10.6065%2010.1416L10.9172%208.16548H8.97241V6.88336C8.97241%206.34321%209.24363%205.81556%2010.1154%205.81556H11V4.1336C11%204.1336%2010.1973%204%209.43%204C7.82844%204%206.78107%204.94574%206.78107%206.65942V8.16548H5V10.1416H6.78107V14.9174C7.13809%2014.9721%207.50398%2015%207.87671%2015C8.24951%2015%208.6154%2014.9712%208.97241%2014.9174V10.1416H10.6065Z'%20fill='white'/%3e%3c/svg%3e",github:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.97914%201C4.11986%201%201%204.20833%201%208.17748C1%2011.3502%202.999%2014.0359%205.77214%2014.9864C6.11886%2015.0579%206.24586%2014.832%206.24586%2014.642C6.24586%2014.4756%206.23443%2013.9052%206.23443%2013.311C4.293%2013.7388%203.88871%2012.4554%203.88871%2012.4554C3.57671%2011.6235%203.11443%2011.4097%203.11443%2011.4097C2.479%2010.97%203.16071%2010.97%203.16071%2010.97C3.86557%2011.0176%204.23543%2011.7068%204.23543%2011.7068C4.85929%2012.8%205.86457%2012.4911%206.269%2012.3009C6.32671%2011.8375%206.51171%2011.5166%206.70814%2011.3384C5.15971%2011.172%203.53057%2010.5541%203.53057%207.79715C3.53057%207.01285%203.80771%206.37119%204.24686%205.87215C4.17757%205.69394%203.93486%204.95704%204.31629%203.97077C4.31629%203.97077%204.90557%203.7806%206.23429%204.70752C6.80316%204.55041%207.38982%204.47049%207.97914%204.46981C8.56843%204.46981%209.16914%204.55308%209.72386%204.70752C11.0527%203.7806%2011.642%203.97077%2011.642%203.97077C12.0234%204.95704%2011.7806%205.69394%2011.7113%205.87215C12.162%206.37119%2012.4277%207.01285%2012.4277%207.79715C12.4277%2010.5541%2010.7986%2011.1601%209.23857%2011.3384C9.49286%2011.5642%209.71229%2011.9919%209.71229%2012.6693C9.71229%2013.6318%209.70086%2014.4043%209.70086%2014.6418C9.70086%2014.832%209.828%2015.0579%2010.1746%2014.9866C12.9477%2014.0358%2014.9467%2011.3502%2014.9467%208.17748C14.9581%204.20833%2011.8269%201%207.97914%201Z'%20fill='%2324292F'/%3e%3c/svg%3e",hubspot:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.013%205.51301V3.9479C11.4349%203.74999%2011.7057%203.32811%2011.7083%202.86197V2.82551C11.7083%202.15884%2011.1667%201.61978%2010.5026%201.61978H10.4661C9.79948%201.61978%209.26042%202.15884%209.26042%202.82551V2.86197C9.26302%203.32811%209.53385%203.74999%209.95573%203.9479V5.51301C9.35937%205.60415%208.79948%205.85155%208.33073%206.22915L4.03646%202.8828C4.06771%202.77343%204.08333%202.65884%204.08594%202.54426C4.08594%201.79426%203.47917%201.18488%202.72917%201.18488C1.97917%201.18228%201.36979%201.78905%201.36719%202.53905C1.36719%203.29165%201.97396%203.90103%202.72396%203.90103C2.96094%203.90103%203.1901%203.83593%203.39323%203.71874L7.6224%207.0104C6.84635%208.18488%206.86719%209.71353%207.67448%2010.8672L6.38802%2012.1536C6.28646%2012.1198%206.17708%2012.1042%206.06771%2012.1016C5.45313%2012.1016%204.95313%2012.6016%204.95313%2013.2187C4.95313%2013.8333%205.45313%2014.3333%206.06771%2014.3333C6.6849%2014.3333%207.1849%2013.8333%207.1849%2013.2187C7.18229%2013.1094%207.16406%2013%207.13281%2012.8958L8.40365%2011.625C9.54167%2012.5%2011.1016%2012.5755%2012.3177%2011.8125C13.5339%2011.0521%2014.1484%209.61457%2013.8568%208.20832C13.5651%206.80468%2012.4297%205.72915%2011.013%205.51301ZM10.4844%2010.6641C9.84375%2010.6797%209.24479%2010.3489%208.92187%209.79686C8.59635%209.24478%208.59635%208.56249%208.92187%208.0104C9.24479%207.45832%209.84375%207.12759%2010.4844%207.14322C11.4323%207.17707%2012.1823%207.95572%2012.1823%208.90363C12.1849%209.84895%2011.4349%2010.6276%2010.487%2010.6614'%20fill='%23FF7A59'/%3e%3c/svg%3e",linear:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2502_833'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='1'%20y='1'%20width='14'%20height='14'%3e%3cpath%20d='M15%201H1V15H15V1Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2502_833)'%3e%3cpath%20d='M1.17156%209.61322C1.14041%209.48043%201.2986%209.39678%201.39505%209.49324L6.50679%2014.6049C6.60323%2014.7014%206.5196%2014.8596%206.38681%2014.8284C3.80721%2014.2233%201.77669%2012.1928%201.17156%209.61322ZM1.00026%207.56447C0.997795%207.60414%201.01271%207.64286%201.0408%207.67096L8.32907%2014.9592C8.35714%2014.9873%208.39585%2015.0022%208.43554%2014.9997C8.7672%2014.9791%209.09263%2014.9353%209.41029%2014.8701C9.51732%2014.8481%209.55449%2014.7166%209.47721%2014.6394L1.36063%206.52279C1.28337%206.44552%201.15187%206.48271%201.12989%206.58974C1.06466%206.90734%201.02092%207.23279%201.00026%207.56447ZM1.58953%205.15876C1.56622%205.21109%201.57809%205.27224%201.6186%205.31276L10.6872%2014.3814C10.7278%2014.4219%2010.7889%2014.4338%2010.8412%2014.4105C11.0913%2014.2991%2011.3336%2014.1735%2011.5672%2014.0347C11.6445%2013.9888%2011.6565%2013.8826%2011.5929%2013.819L2.18099%204.40714C2.11742%204.34356%202.01121%204.35549%201.96529%204.43279C1.8265%204.66636%201.70091%204.9087%201.58953%205.15876ZM2.77222%203.53036C2.7204%203.47855%202.7172%203.39544%202.76602%203.34079C4.04913%201.9043%205.9156%201%207.99327%201C11.863%201%2015%204.13702%2015%208.00672C15%2010.0844%2014.0957%2011.9509%2012.6592%2013.234C12.6046%2013.2828%2012.5214%2013.2796%2012.4696%2013.2278L2.77222%203.53036Z'%20fill='url(%23paint0_linear_2502_833)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_833'%20x1='8'%20y1='1'%20x2='8'%20y2='15'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%235C6BF1'/%3e%3cstop%20offset='1'%20stop-color='%23283188'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",linkedin:Ms,linledin:Ms,microsoft:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201H15V15H1V1Z'%20fill='%23F3F3F3'/%3e%3cpath%20d='M2%202H8V8H2V2Z'%20fill='%23F35325'/%3e%3cpath%20d='M8%202H14V8H8V2Z'%20fill='%2381BC06'/%3e%3cpath%20d='M2%208H8V14H2V8Z'%20fill='%2305A6F0'/%3e%3cpath%20d='M8%208H14V14H8V8Z'%20fill='%23FFBA08'/%3e%3c/svg%3e",notion:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33281%201.60396L10.0795%201.03183C11.031%200.95016%2011.2756%201.00523%2011.8738%201.44016L14.3467%203.18223C14.7546%203.48183%2014.8904%203.5635%2014.8904%203.8897V13.4438C14.8904%2014.0425%2014.6729%2014.3967%2013.9118%2014.4509L4.91582%2014.9955C4.34462%2015.0225%204.07255%2014.9409%203.77341%2014.5596L1.95248%2012.1917C1.62581%2011.7559%201.49048%2011.4297%201.49048%2011.0484V2.55596C1.49048%202.06643%201.70795%201.65809%202.33281%201.60396Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0795%201.03183L2.33281%201.60396C1.70795%201.65809%201.49048%202.06643%201.49048%202.55596V11.0484C1.49048%2011.4297%201.62581%2011.7559%201.95248%2012.1917L3.77341%2014.5596C4.07255%2014.9409%204.34462%2015.0225%204.91582%2014.9955L13.9118%2014.4509C14.6724%2014.3967%2014.8904%2014.0425%2014.8904%2013.4438V3.8897C14.8904%203.5803%2014.7681%203.49116%2014.4083%203.22703C14.3876%203.21212%2014.3669%203.19718%2014.3462%203.18223L11.8738%201.44016C11.2756%201.00523%2011.031%200.95016%2010.0795%201.03183ZM5.11929%203.73336C4.38475%203.78283%204.21815%203.79403%203.80095%203.45476L2.74021%202.61103C2.63241%202.50183%202.68654%202.36556%202.95814%202.33849L10.4052%201.79436C11.0306%201.73976%2011.3563%201.95769%2011.6008%202.14809L12.8781%203.07349C12.9327%203.10103%2013.0685%203.26389%2012.9052%203.26389L5.21449%203.72683L5.11929%203.73336ZM4.26295%2013.3621V5.25144C4.26295%204.89724%204.37168%204.7339%204.69742%204.70637L13.5305%204.1893C13.8301%204.16223%2013.9654%204.35263%2013.9654%204.70637V12.7629C13.9654%2013.1171%2013.9108%2013.4167%2013.4218%2013.4438L4.96902%2013.9338C4.47995%2013.9609%204.26295%2013.798%204.26295%2013.3621ZM12.607%205.68637C12.6611%205.93137%2012.607%206.17637%2012.362%206.20437L11.9546%206.2851V12.2734C11.6008%2012.4638%2011.2751%2012.5725%2011.003%2012.5725C10.5681%2012.5725%2010.4593%2012.4363%2010.1336%2012.0284L7.46942%207.83677V11.8921L8.31224%2012.083C8.31224%2012.083%208.31224%2012.573%207.63229%2012.573L5.75769%2012.6817C5.70309%2012.5725%205.75769%2012.3005%205.94762%2012.2463L6.43716%2012.1105V6.7485L5.75769%206.69344C5.70309%206.44844%205.83889%206.0947%206.21969%206.06717L8.23104%205.93184L11.003%2010.1776V6.42137L10.2965%206.34017C10.2419%206.0401%2010.4593%205.82217%2010.7309%205.79557L12.607%205.68637Z'%20fill='black'/%3e%3c/svg%3e",slack:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.94137%209.84695C3.94137%2010.6564%203.28013%2011.3176%202.47069%2011.3176C1.66124%2011.3176%201%2010.6564%201%209.84695C1%209.03747%201.66124%208.37625%202.47069%208.37625H3.94137V9.84695Z'%20fill='%23E01E5A'/%3e%3cpath%20d='M4.68237%209.84695C4.68237%209.03747%205.34361%208.37625%206.15306%208.37625C6.9625%208.37625%207.62374%209.03747%207.62374%209.84695V13.5293C7.62374%2014.3388%206.9625%2015%206.15306%2015C5.34361%2015%204.68237%2014.3388%204.68237%2013.5293V9.84695Z'%20fill='%23E01E5A'/%3e%3cpath%20d='M6.15306%203.94137C5.34361%203.94137%204.68237%203.28013%204.68237%202.47069C4.68237%201.66124%205.34361%201%206.15306%201C6.9625%201%207.62374%201.66124%207.62374%202.47069V3.94137H6.15306Z'%20fill='%2336C5F0'/%3e%3cpath%20d='M6.15309%204.68237C6.96254%204.68237%207.62378%205.34361%207.62378%206.15306C7.62378%206.9625%206.96254%207.62374%206.15309%207.62374H2.47069C1.66124%207.62374%201%206.9625%201%206.15306C1%205.34361%201.66124%204.68237%202.47069%204.68237H6.15309Z'%20fill='%2336C5F0'/%3e%3cpath%20d='M12.0585%206.15306C12.0585%205.34361%2012.7197%204.68237%2013.5291%204.68237C14.3386%204.68237%2014.9998%205.34361%2014.9998%206.15306C14.9998%206.9625%2014.3386%207.62374%2013.5291%207.62374H12.0585V6.15306Z'%20fill='%232EB67D'/%3e%3cpath%20d='M11.3176%206.15309C11.3176%206.96254%2010.6563%207.62378%209.84685%207.62378C9.03744%207.62378%208.37622%206.96254%208.37622%206.15309V2.47069C8.37622%201.66124%209.03744%201%209.84685%201C10.6563%201%2011.3176%201.66124%2011.3176%202.47069V6.15309Z'%20fill='%232EB67D'/%3e%3cpath%20d='M9.84685%2012.0586C10.6563%2012.0586%2011.3176%2012.7199%2011.3176%2013.5293C11.3176%2014.3388%2010.6563%2015%209.84685%2015C9.03744%2015%208.37622%2014.3388%208.37622%2013.5293V12.0586H9.84685Z'%20fill='%23ECB22E'/%3e%3cpath%20d='M9.84685%2011.3176C9.03744%2011.3176%208.37622%2010.6564%208.37622%209.84695C8.37622%209.03747%209.03744%208.37625%209.84685%208.37625H13.5293C14.3388%208.37625%2015%209.03747%2015%209.84695C15%2010.6564%2014.3388%2011.3176%2013.5293%2011.3176H9.84685Z'%20fill='%23ECB22E'/%3e%3c/svg%3e",tiktok:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.60974%205.91839V5.33278C6.40646%205.30058%206.20114%205.28293%205.99535%205.27998C4.00296%205.27577%202.23902%206.56688%201.64074%208.46732C1.04245%2010.3678%201.74866%2012.4365%203.38415%2013.5744C2.15905%2012.2633%201.81888%2010.3546%202.51559%208.70096C3.21229%207.0473%204.81576%205.95753%206.60974%205.91839Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M6.72004%2012.552C7.834%2012.5505%208.74966%2011.6729%208.79844%2010.56V0.6288H10.6128C10.5758%200.421288%2010.5581%200.210783%2010.56%200H8.07844V9.9216C8.03716%2011.0402%207.11934%2011.9262%206.00004%2011.928C5.66555%2011.9252%205.33652%2011.8429%205.04004%2011.688C5.42976%2012.2279%206.05416%2012.5491%206.72004%2012.552Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M14.0014%203.9984V3.4464C13.3337%203.44663%2012.6808%203.24959%2012.1246%202.88C12.6122%203.44675%2013.271%203.83934%2014.0014%203.9984Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M12.125%202.87999C11.5772%202.25615%2011.2752%201.45422%2011.2754%200.623993H10.613C10.786%201.55168%2011.3327%202.36746%2012.125%202.87999Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M5.99519%207.7616C5.03925%207.76652%204.20933%208.42142%203.98229%209.34998C3.75525%2010.2786%204.18936%2011.2426%205.03519%2011.688C4.57688%2011.0552%204.51214%2010.219%204.86761%209.5232C5.22308%208.82744%205.9387%208.3898%206.71999%208.3904C6.92831%208.39298%207.13519%208.42532%207.33439%208.4864V5.9616C7.13099%205.93112%206.92567%205.91509%206.71999%205.9136H6.60959V7.8336C6.40937%207.7799%206.20243%207.75566%205.99519%207.7616Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M14.0015%203.99841V5.91841C12.7654%205.91603%2011.5613%205.52475%2010.5599%204.80001V9.84481C10.5546%2012.3621%208.51245%2014.4%205.99511%2014.4C5.06025%2014.4017%204.1479%2014.1132%203.38391%2013.5744C4.6589%2014.9457%206.64315%2015.3971%208.38585%2014.7123C10.1285%2014.0275%2011.2747%2012.346%2011.2751%2010.4736V5.44321C12.2799%206.16321%2013.4854%206.54937%2014.7215%206.54721V4.07521C14.4795%204.07445%2014.2382%204.04871%2014.0015%203.99841Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M10.56%209.8448V4.79999C11.5645%205.52056%2012.7702%205.9068%2014.0064%205.90399V3.98399C13.2761%203.82977%2012.6157%203.4423%2012.1248%202.87999C11.3324%202.36746%2010.7857%201.55168%2010.6128%200.623993H8.7984V10.56C8.7621%2011.4464%208.16834%2012.2126%207.31904%2012.4691C6.46968%2012.7255%205.55115%2012.4159%205.03038%2011.6976C4.18454%2011.2522%203.75043%2010.2882%203.97747%209.35958C4.20452%208.43102%205.03444%207.77612%205.99038%207.7712C6.19878%207.77306%206.40578%207.8054%206.6048%207.8672V5.94719C4.80073%205.97776%203.18515%207.07136%202.48647%208.73486C1.78778%2010.3984%202.13799%2012.3176%203.37918%2013.6272C4.1507%2014.1482%205.06437%2014.4181%205.99518%2014.4C8.5125%2014.4%2010.5547%2012.3621%2010.56%209.8448Z'%20fill='black'/%3e%3c/svg%3e",twitch:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%207.94593L11.75%2010.1081H9.5L7.53124%2012V10.1081H5V2H14V7.94593Z'%20fill='white'/%3e%3cpath%20d='M4.70834%201L2%203.67857V13.3215H5.25V16L7.95833%2013.3215H10.125L15%208.5V1H4.70834ZM13.9166%207.96428L11.75%2010.1072H9.5833L7.6875%2011.9822V10.1072H5.25V2.07143H13.9166V7.96428Z'%20fill='%239146FF'/%3e%3cpath%20d='M12%204H11V7H12V4Z'%20fill='%239146FF'/%3e%3cpath%20d='M9%204H8V7H9V4Z'%20fill='%239146FF'/%3e%3c/svg%3e",twitter:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.14163%206.50461L13.6089%201H12.5503L8.67137%205.77958L5.57328%201H2L6.68492%208.22757L2%2014H3.05866L7.15491%208.9526L10.4267%2014H14L9.14137%206.50461H9.14163ZM7.69165%208.29124L7.21697%207.57154L3.44011%201.84479H5.06615L8.11412%206.46646L8.5888%207.18616L12.5508%2013.1936H10.9248L7.69165%208.29152V8.29124Z'%20fill='black'%20stroke='black'%20stroke-width='0.5'/%3e%3c/svg%3e",xero:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2502_830'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='1'%20y='1'%20width='14'%20height='14'%3e%3cpath%20d='M15%201H1V15H15V1Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2502_830)'%3e%3cpath%20d='M7.99994%2014.9733C11.8512%2014.9733%2014.9732%2011.8513%2014.9732%207.99997C14.9732%204.14873%2011.8512%201.02667%207.99994%201.02667C4.14867%201.02667%201.02661%204.14873%201.02661%207.99997C1.02661%2011.8513%204.14867%2014.9733%207.99994%2014.9733Z'%20fill='%231AB4D7'/%3e%3cpath%20d='M4.36467%207.97988L5.55473%206.78688C5.59418%206.74667%205.61619%206.69343%205.61619%206.63697C5.61619%206.5193%205.52054%206.42374%205.40287%206.42374C5.34555%206.42374%205.29181%206.44621%205.2513%206.48723L4.06231%207.67564L2.86801%206.48544C2.82765%206.44566%202.77418%206.42374%202.71748%206.42374C2.59995%206.42374%202.50427%206.51925%202.50427%206.6368C2.50427%206.69415%202.52716%206.74796%202.56825%206.7885L3.75814%207.97822L2.56887%209.16973C2.52707%209.21089%202.50427%209.26479%202.50427%209.3224C2.50427%209.44007%202.59995%209.53548%202.71748%209.53548C2.77428%209.53548%202.8278%209.51343%202.86801%209.47325L4.06046%208.28241L5.24838%209.46891C5.29051%209.51245%205.34487%209.53562%205.40287%209.53562C5.52042%209.53562%205.61608%209.44007%205.61608%209.3224C5.61608%209.26563%205.59409%209.21229%205.55406%209.17211L4.36467%207.97988Z'%20fill='white'/%3e%3cpath%20d='M11.4393%207.97953C11.4393%208.19316%2011.6131%208.36697%2011.827%208.36697C12.0404%208.36697%2012.2142%208.19316%2012.2142%207.97953C12.2142%207.76582%2012.0404%207.59204%2011.827%207.59204C11.6131%207.59204%2011.4393%207.76582%2011.4393%207.97953Z'%20fill='white'/%3e%3cpath%20d='M10.7045%207.97969C10.7045%207.36096%2011.2078%206.85753%2011.8266%206.85753C12.4451%206.85753%2012.9485%207.36096%2012.9485%207.97969C12.9485%208.59828%2012.4451%209.10151%2011.8266%209.10151C11.2078%209.10151%2010.7045%208.59828%2010.7045%207.97969ZM10.2631%207.97969C10.2631%208.84167%2010.9645%209.543%2011.8266%209.543C12.6887%209.543%2013.3905%208.84167%2013.3905%207.97969C13.3905%207.11757%2012.6887%206.41608%2011.8266%206.41608C10.9645%206.41608%2010.2631%207.11757%2010.2631%207.97969Z'%20fill='white'/%3e%3cpath%20d='M10.152%206.44279L10.0864%206.4426C9.88947%206.4426%209.69956%206.50471%209.54094%206.62696C9.52001%206.5313%209.43447%206.45933%209.33269%206.45933C9.21544%206.45933%209.1215%206.55325%209.12122%206.67071L9.12192%209.3041C9.12227%209.42135%209.21789%209.51662%209.33514%209.51662C9.45246%209.51662%209.54808%209.42135%209.54836%209.30382L9.54843%207.68463C9.54843%207.14496%209.59778%206.927%2010.0601%206.86923C10.1028%206.86392%2010.1494%206.86475%2010.1494%206.86475C10.276%206.86041%2010.3659%206.77348%2010.3659%206.656C10.3659%206.53844%2010.2699%206.44279%2010.152%206.44279Z'%20fill='white'/%3e%3cpath%20d='M6.05791%207.72227C6.05791%207.71643%206.05836%207.71035%206.05864%207.70435C6.18243%207.215%206.62563%206.85287%207.15344%206.85287C7.68764%206.85287%208.13489%207.2239%208.25235%207.72227H6.05791ZM8.689%207.682C8.59709%207.24697%208.35895%206.88964%207.99626%206.66016C7.46613%206.32358%206.76607%206.3422%206.25401%206.70635C5.83632%207.00349%205.59521%207.48958%205.59521%207.9903C5.59521%208.11586%205.61035%208.24256%205.64186%208.3673C5.79957%208.98778%206.33294%209.45741%206.96885%209.53525C7.15754%209.55814%207.34122%209.54715%207.53141%209.49794C7.69485%209.45818%207.85299%209.39189%207.99871%209.29851C8.14993%209.20128%208.27628%209.07304%208.39864%208.9196C8.40116%208.9168%208.40361%208.91428%208.40613%208.91134C8.49104%208.80599%208.47529%208.65619%208.38198%208.58465C8.30323%208.52438%208.17107%208.49988%208.06712%208.63309C8.04472%208.66487%208.0198%208.69763%207.99238%208.73039C7.90969%208.82181%207.80712%208.91029%207.6842%208.97896C7.52779%209.06254%207.34955%209.11028%207.16006%209.11133C6.53986%209.1044%206.20799%208.67152%206.08993%208.36254C6.06932%208.30479%206.05342%208.24494%206.04234%208.18334C6.0409%208.17179%206.03983%208.16066%206.0394%208.15044C6.16763%208.15044%208.26501%208.15009%208.26501%208.15009C8.57014%208.14365%208.73436%207.92828%208.689%207.682Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e"}};if(o&&"general"===e){const e={"--passflow-icon-mask":`url("${n.general[s]}")`};return(0,p.jsx)("span",{className:U("passflow-icon passflow-icon--match-text",i,a),style:e,role:r?void 0:"img","aria-label":r?void 0:s,"aria-hidden":r||void 0})}return"flags"!==e?(0,p.jsx)("img",{className:U("passflow-icon",i,a),src:n[e][s],alt:r?"":s}):(0,p.jsx)("div",{className:U("passflow-icon",i,a),children:(0,p.jsx)(ge,{iso2:s})})},Es=({to:e,search:s,replace:t=!1,children:a,className:r,onClick:o,...i})=>{const{navigate:n}=ls();return(0,p.jsx)("a",{href:`${e}${s?s.startsWith("?")?s:`?${s}`:""}`,onClick:a=>{a.preventDefault(),o&&o(a),n({to:e,search:s,replace:t})},className:r,...i,children:a})},Ns=({message:e,id:s})=>e?(0,p.jsxs)("div",{id:s,className:"passflow-form-error",role:"alert",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning",decorative:!0}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:e})]}):null,_s=({label:e})=>(0,p.jsxs)("div",{className:"passflow-form-divider","aria-hidden":"true",children:[(0,p.jsx)("div",{className:"passflow-form-divider__line-left"}),(0,p.jsx)("span",{className:"passflow-form-divider__text",children:e}),(0,p.jsx)("div",{className:"passflow-form-divider__line-right"})]}),Ls=({children:e})=>(0,p.jsx)("div",{className:"passflow-login-screen-actions",children:e}),Is=({message:e})=>(0,p.jsxs)("div",{className:"passflow-login-screen-status",role:"status","aria-live":"polite",children:[(0,p.jsx)("div",{className:"passflow-login-screen-spinner passflow-login-screen-spinner--small","aria-hidden":"true"}),(0,p.jsx)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:e})]}),As=({code:e,appName:s,message:t,codeTestId:a,appNameTestId:r})=>(0,p.jsxs)("div",{className:"passflow-login-screen-notice",role:"note",children:[e?(0,p.jsx)("div",{className:"passflow-login-screen-code","data-testid":a,children:e}):null,(0,p.jsxs)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:[(0,p.jsx)("span",{className:"passflow-login-screen-app-name","data-testid":r,children:s})," ",t]})]}),Ps=({label:e="Code",initialCode:s="",error:t,busy:a=!1,submitLabel:r="Continue",testId:o,onSubmit:i})=>{const[n,c]=(0,l.useState)(s);return(0,p.jsxs)("form",{className:"passflow-form","data-testid":o,"aria-busy":a,onSubmit:e=>{e.preventDefault();const s=n.trim();s&&i(s)},children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"device-user-code",className:"passflow-field-label",children:e})}),(0,p.jsx)(js,{id:"device-user-code",name:"user_code",type:"text",autoCapitalize:"characters",autoComplete:"off",autoCorrect:"off",spellCheck:!1,inputMode:"text",className:"passflow-login-screen-code-input",value:n,disabled:a,"aria-invalid":Boolean(t),"aria-describedby":t?"device-user-code-error":void 0,isError:Boolean(t),onChange:e=>c(e.target.value)})]}),(0,p.jsx)(Ns,{id:"device-user-code-error",message:t})]}),a?(0,p.jsx)(Is,{message:"Checking the code…"}):null,(0,p.jsx)(ue,{size:"big",variant:"primary",type:"submit",disabled:a||0===n.trim().length,children:a?"Checking…":r})]})},Fs=({label:e,checked:s,disabled:t=!1,id:a,onChange:r})=>{const o=(0,l.useId)(),i=a??o;return(0,p.jsxs)("label",{className:U("passflow-switch-wrapper",{"passflow-switch-wrapper--disabled":t}),htmlFor:i,children:[(0,p.jsx)("span",{className:"passflow-switch-label",children:e}),(0,p.jsx)("input",{id:i,type:"checkbox",className:"passflow-switch-input",checked:s,disabled:t,onChange:r}),(0,p.jsx)("div",{className:"passflow-switch-track"})]})},Ts=({appName:e,scopes:s,prompt:t="wants to access your account.",busy:a=!1,error:r,allowLabel:o="Allow",denyLabel:i="Deny",busyLabel:n="Submitting…",testId:l,allowTestId:c,denyTestId:d,appNameTestId:u,onToggleScope:h,onAllow:m,onDeny:f})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":l,"aria-busy":a,children:[(0,p.jsx)(As,{appName:e,message:t,appNameTestId:u}),(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)(Ns,{message:r}),s.length?(0,p.jsx)("ul",{className:"passflow-consent-scopes",children:s.map(e=>(0,p.jsxs)("li",{className:"passflow-consent-scope","data-testid":`consent-scope-${e.scope}`,children:[(0,p.jsx)(Fs,{label:e.label,checked:e.granted,disabled:a,onChange:()=>h(e.scope)}),e.description?(0,p.jsx)("p",{className:"passflow-consent-scope-description",children:e.description}):null]},e.scope))}):(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"This application is not requesting access to any of your data."})]}),a?(0,p.jsx)(Is,{message:n}):null,(0,p.jsxs)("div",{className:"passflow-consent-actions",children:[(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button","data-testid":c,disabled:a,onClick:m,children:o}),(0,p.jsx)(ue,{size:"big",variant:"outlined",type:"button","data-testid":d,disabled:a,onClick:f,children:i})]})]}),Rs=({providers:e,onClick:s,className:t=""})=>{const a={"passflow-providers-box--grid":e.length>1};return(0,p.jsx)("div",{className:U("passflow-providers-box",a,t),children:e.map(t=>(0,p.jsxs)(ue,{onClick:()=>s(t),size:"big",variant:"provider",type:"button",withIcon:!0,className:"passflow-provider-item",children:[(0,p.jsx)(Ss,{size:"small",type:"providers",id:t,decorative:e.length<=2}),e.length<=2&&(0,p.jsx)("p",{className:"passflow-provider-text",children:t})]},t))})},Us={email_or_username:"",phone:"",password:""},Ys=e=>{const{methods:s}=e,t=(e=>void 0!==e.initialMethod&&e.methods.identities.some(s=>s.id===e.initialMethod)?e.initialMethod:e.methods.identities[0]?.id??null)(e),[a,r]=(0,l.useState)(t),[o,i]=(0,l.useState)(Boolean(e.forcePasskey)),n=(0,l.useRef)(t),c=(0,l.useRef)(Boolean(e.forcePasskey)),{control:d,getValues:u,reset:h,trigger:m,watch:f,formState:{errors:g,isDirty:y,isValid:v},handleSubmit:C}=(0,x.useForm)({defaultValues:Us,mode:"onChange"});(0,l.useEffect)(()=>{n.current!==t&&(n.current=t,r(t),h(Us))},[t,h]),(0,l.useEffect)(()=>{const s=Boolean(e.forcePasskey);c.current!==s&&(c.current=s,i(s))},[e.forcePasskey]);const b=s.identities.find(e=>e.id===a),k=Boolean(b?.password),j=Boolean(b?.passwordlessLabel),M=s.passkey,S=Boolean(b),E=!o&&S,N=M&&(o||!S),_=k||j||M,L=Boolean(e.busy||e.disabled),I=e.error?.scope,A="identity"===I||"credentials"===I,P="password"===I||"credentials"===I,F="sign-up"===e.credentialPurpose,T=e=>({method:a,emailOrUsername:e.email_or_username,phone:e.phone,password:e.password}),R=()=>{h(Us),e.onReset?.()},Y=e=>{r(e),R()},z=C(s=>{k?e.onPassword?.(T(s)):j&&e.onPasswordless?.(T(s))}),V=f("phone"===a?"phone":"email_or_username"),D=s.identities.find(e=>e.id!==a);return(0,p.jsxs)(p.Fragment,{children:[e.notice?(0,p.jsx)(As,{...e.notice}):null,e.allowPasskeyToggle&&M&&S&&(k||j)?(0,p.jsx)("div",{className:"passflow-form-switch",children:(0,p.jsx)(Fs,{label:"Passwordless experience",checked:o,disabled:L,onChange:e=>{return s=e.target.checked,i(s),void R();var s}})}):null,(0,p.jsxs)("form",{className:"passflow-form","data-testid":e.testId,"aria-busy":L&&Boolean(e.busy),onSubmit:z,children:[e.busy?(0,p.jsx)(Is,{message:e.primaryLabel??"Signing in…"}):null,E?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:["email_or_username"===a?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"email_or_username",className:U("passflow-field-label",{"passflow-field-label--error":A||Boolean(g.email_or_username)}),children:b?.label}),D?(0,p.jsx)(ue,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:L,onClick:()=>Y(D.id),children:D.selectLabel}):null]}),(0,p.jsx)(x.Controller,{name:"email_or_username",control:d,rules:{required:b?.requiredMessage??"Identity is required",..."email"===b?.format?{pattern:{value:ce,message:"Invalid email"}}:void 0},render:({field:e})=>(0,p.jsx)(js,{...e,id:"email_or_username",type:"email"===b?.format?"email":"text",autoComplete:"email"===b?.format?"email":"username","aria-invalid":Boolean(g.email_or_username),"aria-describedby":g.email_or_username?"email_or_username-error":void 0,isError:A||Boolean(g.email_or_username),disabled:L})}),g.email_or_username?.message?(0,p.jsx)(Ns,{id:"email_or_username-error",message:g.email_or_username.message}):null]}):null,"phone"===a?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"phone",className:U("passflow-field-label",{"passflow-field-label--error":A||Boolean(g.phone)}),children:"Phone number"}),D?(0,p.jsx)(ue,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:L,onClick:()=>Y(D.id),children:D.selectLabel}):null]}),(0,p.jsx)(x.Controller,{name:"phone",control:d,rules:{required:"Phone number is required",validate:e=>(0,w.phone)(e).isValid||"Invalid phone number"},render:({field:e})=>(0,p.jsx)(ks,{id:"phone",name:"phone",onChange:e.onChange,"aria-describedby":g.phone?"phone-error":void 0,isError:A||Boolean(g.phone),disabled:L,ref:null})}),g.phone?.message?(0,p.jsx)(Ns,{id:"phone-error",message:g.phone.message}):null]}):null,k?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"password",className:U("passflow-field-label",{"passflow-field-label--error":P||Boolean(g.password)}),children:"Password"}),e.forgotPassword?(0,p.jsx)(Es,{to:e.forgotPassword.to,search:e.forgotPassword.getSearch?.(a),className:"passflow-field-label-button",children:"Forgot Password?"}):null]}),(0,p.jsx)(x.Controller,{name:"password",control:d,rules:{required:"Password is required",validate:s=>{if(!F)return!0;try{return de(e.passwordPolicy).validateSync(s),!0}catch(t){return t.errors?.join(", ")??"Password does not meet the requirements"}}},render:({field:s})=>(0,p.jsx)(Ie,{...s,id:"password",name:"password","aria-invalid":Boolean(g.password),"aria-describedby":g.password&&!F?"password-error":void 0,isError:P||Boolean(g.password),passwordPolicy:e.passwordPolicy,withMessages:F,validationErrors:F&&g.password?.message?g.password.message.split(", "):void 0,autoComplete:F?"new-password":"current-password",disabled:L})}),!F&&g.password?.message?(0,p.jsx)(Ns,{id:"password-error",message:g.password.message}):null]}):null,(0,p.jsx)(Ns,{message:e.error?.message})]}),(0,p.jsxs)(Ls,{children:[k&&e.onPassword?(0,p.jsx)(ue,{size:"big",variant:"primary",type:"submit",disabled:L||!y||!v,className:"passflow-button-signin","data-testid":e.primaryTestId,children:e.primaryLabel??"Sign In"}):null,j&&e.onPasswordless?(0,p.jsxs)(ue,{size:"big",variant:k?"outlined":"primary",type:"button",className:U("passflow-button-passwordless",{"passflow-button-passwordless--active":k}),disabled:L||0===V.trim().length,onClick:()=>{(async()=>{a&&e.onPasswordless&&await m("phone"===a?"phone":"email_or_username")&&e.onPasswordless(T(u()))})()},children:[e.passwordlessLabelPrefix??"Sign In with"," ",b?.passwordlessLabel]}):null,M&&e.onPasskey?(0,p.jsxs)(ue,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,disabled:L,onClick:e.onPasskey,children:[(0,p.jsx)(Ss,{id:"key",size:"small",type:"general",className:"passflow-button-passkey-icon",decorative:!0,matchTextColor:!0}),e.passkeyLabel??"Sign In with a Passkey"]}):null]})]}):null,N?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ns,{message:e.error?.message}),e.onPasskey?(0,p.jsx)(Ls,{children:(0,p.jsxs)(ue,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,disabled:L,onClick:e.onPasskey,children:[(0,p.jsx)(Ss,{id:"key",size:"small",type:"general",className:"passflow-button-passkey-icon",decorative:!0,matchTextColor:!0}),e.passkeyLabel??"Sign In with a Passkey"]})}):null]}):null,e.footer?(0,p.jsx)("div",{className:U("passflow-form-actions",{"passflow-form-actions--top-space":_}),children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:[e.footer.prompt," ",(0,p.jsx)(Es,{to:e.footer.to,search:e.footer.search,className:"passflow-link",children:e.footer.label})]})}):null,s.providers.length>0&&e.onProvider?(0,p.jsxs)("div",{className:"passflow-form-providers",children:[_?(0,p.jsx)(_s,{label:"Or continue with"}):null,(0,p.jsx)(Rs,{providers:s.providers,onClick:e.onProvider})]}):null]})]})},zs=({appName:e,code:s,identity:t,busy:a=!1,error:r,actionLabel:o="Approve this device",busyLabel:i="Approving…",testId:n,actionTestId:l,codeTestId:c,appNameTestId:d,onApprove:u})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":n,"aria-busy":a,children:[(0,p.jsx)(As,{code:s,appName:e,message:"requested this sign-in. Confirm that the code matches your terminal.",codeTestId:c,appNameTestId:d}),(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[(0,p.jsxs)("div",{className:"passflow-login-screen-success",role:"status","aria-live":"polite",children:[(0,p.jsx)(Ss,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}),(0,p.jsx)("p",{className:"passflow-login-screen-text",children:t?(0,p.jsxs)(p.Fragment,{children:["Signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:t}),"."]}):"Signed in successfully."})]}),(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"Approve this request to finish signing in on the device."}),(0,p.jsx)(Ns,{message:r})]}),a?(0,p.jsx)(Is,{message:i}):null,(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button",autoFocus:!a,"data-testid":l,disabled:a,onClick:u,children:a?i:o})]}),Vs=({message:e,detail:s="Go back to start again.",actionLabel:t="Go back",testId:a,onAction:r})=>(0,p.jsxs)("div",{className:"passflow-error-container","data-testid":a,children:[(0,p.jsxs)("div",{className:"passflow-error-container-text-wrapper",role:"alert","aria-live":"assertive",children:[e?(0,p.jsx)("h1",{className:"passflow-error-container-text",children:e}):null,(0,p.jsx)("p",{className:"passflow-error-container-text-secondary",children:s})]}),(0,p.jsx)(ue,{size:"big",type:"button",variant:"primary",onClick:r,className:"passflow-button-go-back-error",children:t})]}),Ds=({identity:e,inviterName:s,busy:t=!1,error:a,acceptLabel:r="Accept invitation",busyLabel:o="Accepting invitation…",switchAccountLabel:i="Switch account",createAccountLabel:n="Create a new account",testId:l,acceptTestId:c,onAccept:d,onSwitchAccount:u,onCreateAccount:h})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":l,"aria-busy":t,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[s?(0,p.jsxs)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:[(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:s})," sent this invitation."]}):null,(0,p.jsx)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:e?(0,p.jsxs)(p.Fragment,{children:["You're signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:e}),"."]}):"You’re already signed in."}),(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"Continue with this account, or switch accounts?"}),(0,p.jsx)(Ns,{message:a})]}),t?(0,p.jsx)(Is,{message:o}):null,(0,p.jsxs)(Ls,{children:[(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button",autoFocus:!t,"data-testid":c,disabled:t,onClick:d,children:t?o:r}),(0,p.jsx)(ue,{size:"big",variant:"outlined",type:"button",disabled:t,onClick:u,children:i}),(0,p.jsx)(ue,{size:"big",variant:"clean",type:"button",disabled:t,onClick:h,children:n})]})]}),Gs=({working:e,message:s,actionLabel:t="Continue with a passkey",error:a,recoverable:r=!1,retryLabel:o="Try again",testId:i,onAction:n,onRetry:l})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":i,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[(0,p.jsxs)("div",{className:"passflow-login-screen-status",role:"status",children:[e?(0,p.jsx)("div",{className:"passflow-login-screen-spinner","aria-hidden":"true"}):null,(0,p.jsx)("p",{className:"passflow-login-screen-text",children:s})]}),(0,p.jsx)(Ns,{message:a})]}),!e&&n?(0,p.jsxs)(ue,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,onClick:n,children:[(0,p.jsx)(Ss,{id:"key",size:"small",type:"general",className:"icon-white passflow-button-passkey-icon",decorative:!0}),t]}):!e&&a&&r&&l?(0,p.jsxs)(ue,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,onClick:l,children:[(0,p.jsx)(Ss,{id:"key",size:"small",type:"general",className:"icon-white passflow-button-passkey-icon",decorative:!0}),o]}):null]}),Bs={totp:{label:"Authenticator code",hint:"Enter the 6-digit code from your authenticator app.",switchLabel:"Use authenticator app"},recovery_codes:{label:"Recovery code",hint:"Enter one of your recovery codes.",switchLabel:"Use recovery code"}},Os=({methods:e,identity:s,busy:t=!1,error:a,submitLabel:r="Verify",testId:o,onSubmit:i,onMethodChange:n})=>{const[c,d]=(0,l.useState)(e[0]??"totp"),[u,h]=(0,l.useState)(""),m=e.find(e=>e!==c),f=Bs[c],g="totp"===c;return(0,p.jsxs)("form",{className:"passflow-form","data-testid":o,"aria-busy":t,onSubmit:e=>{e.preventDefault();const s=u.trim();s&&i(c,s)},children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[s?(0,p.jsxs)("p",{className:"passflow-login-screen-hint",children:["Signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:s}),"."]}):null,(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"second-factor-code",className:"passflow-field-label",children:f.label}),m?(0,p.jsx)(ue,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:t,onClick:()=>(d(m),h(""),void n?.()),children:Bs[m].switchLabel}):null]}),(0,p.jsx)(js,{id:"second-factor-code",name:g?"otp":"recovery_code",type:"text",autoComplete:g?"one-time-code":"off",autoCapitalize:g?"off":"characters",autoCorrect:"off",spellCheck:!1,inputMode:g?"numeric":"text",autoFocus:!0,className:"passflow-login-screen-code-input",value:u,disabled:t,"aria-invalid":Boolean(a),"aria-describedby":a?"second-factor-code-error":"second-factor-code-hint",isError:Boolean(a),onChange:e=>h(e.target.value)}),(0,p.jsx)("p",{id:"second-factor-code-hint",className:"passflow-login-screen-hint",children:f.hint})]}),(0,p.jsx)(Ns,{id:"second-factor-code-error",message:a})]}),t?(0,p.jsx)(Is,{message:"Checking the code…"}):null,(0,p.jsx)(ue,{size:"big",variant:"primary",type:"submit",disabled:t||0===u.trim().length,children:t?"Checking…":r})]})},Hs=({iconId:e="logo",title:s="",subtitle:t="",className:a="",children:r,customCss:o,customLogo:i,customLogoAlt:n="Application logo",removeBranding:l=!1})=>(0,p.jsxs)("div",{id:"passflow-wrapper",className:"passflow-wrapper",children:[o?(0,p.jsx)("style",{className:"psfw-custom-styles","data-passflow-style-layer":"custom",children:o}):null,(0,p.jsxs)("main",{className:U("passflow-form-main-wrapper",a),children:[(0,p.jsxs)("div",{className:"passflow-form-main-container",children:[i?(0,p.jsx)("img",{src:i,alt:n,className:"passflow-form-main-container-logo"}):(0,p.jsx)(Ss,{id:e,size:"large",type:"general",decorative:!0}),s?(0,p.jsxs)("div",{className:"passflow-form-header",children:[(0,p.jsx)("h1",{className:"passflow-form-title",children:s}),t?(0,p.jsx)("span",{className:"passflow-form-subtitle",children:t}):null]}):null]}),r]}),l?null:(0,p.jsx)("footer",{className:"passflow-branding",children:(0,p.jsxs)("p",{className:"passflow-branding-text",children:["Secured by ",(0,p.jsx)("span",{className:"passflow-branding-text-secondary passflow-secondary-font",children:"PASSFLOW"})]})})]}),Zs=({tone:e,message:s,detail:t,recoverable:a=!1,retryLabel:r="Try again",testId:o,onRetry:i,primaryAction:n})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":o,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:["success"===e?(0,p.jsxs)("div",{className:"passflow-login-screen-success",role:"status",children:[(0,p.jsx)(Ss,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}),(0,p.jsx)("span",{className:"passflow-login-screen-success-text",children:s})]}):(0,p.jsx)(Ns,{message:s}),t?(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:t}):null]}),n?(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button",onClick:n.onClick,children:n.label}):"error"===e&&a&&i?(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button",onClick:i,children:r}):null]}),qs=({chrome:e,state:s})=>{const t=(()=>{switch(s.kind){case"credentials":return(0,p.jsx)(Ys,{...s});case"code-entry":return(0,p.jsx)(Ps,{...s});case"passkey-progress":return(0,p.jsx)(Gs,{...s});case"device-approval":return(0,p.jsx)(zs,{...s});case"second-factor":return(0,p.jsx)(Os,{...s});case"invitation":return(0,p.jsx)(Ds,{...s});case"general-error":return(0,p.jsx)(Vs,{...s});case"consent":return(0,p.jsx)(Ts,{...s});case"status":return(0,p.jsx)(Zs,{...s})}})(),a="general-error"===s.kind||"status"===s.kind&&"error"===s.tone,r="general-error"===s.kind?"passflow-error-wrapper":"sign-in"===e.variant?"passflow-signin-wrapper":void 0;return(0,p.jsx)(Hs,{iconId:a?"logo-red":"logo",title:e.title,subtitle:e.subtitle,className:r,customCss:e.customCss,customLogo:e.customLogo,customLogoAlt:e.customLogoAlt,removeBranding:e.removeBranding,children:t})},Js=y.Root,Ws=y.Trigger,Ks=y.Anchor,Qs=(0,l.forwardRef)(({className:e,align:s="center",sideOffset:t=4,...a},r)=>(0,p.jsx)(y.Portal,{children:(0,p.jsx)(y.Content,{ref:r,align:s,sideOffset:t,className:U("passflow-popover-content",e),...a})}));Qs.displayName=y.Content.displayName;var Xs=({size:e="medium",label:s})=>(0,p.jsx)("span",{className:U("passflow-spinner",{"passflow-spinner--small":"small"===e}),role:void 0===s?void 0:"status","aria-label":s,"aria-hidden":void 0===s||void 0}),$s=({factors:e,selected:s,disabled:t=!1,label:a="Other verification methods",onSelect:r})=>(0,p.jsx)("ul",{className:"passflow-upgrade-dialog__alternatives","aria-label":a,children:e.map(e=>(0,p.jsx)("li",{className:"passflow-upgrade-dialog__alternative",children:(0,p.jsx)(ue,{size:"big",variant:"option",type:"button",disabled:t,pressed:e.type===s,description:e.hint,"data-testid":`upgrade-dialog-factor-${e.type}`,onClick:()=>r(e.type),children:e.label})},e.type))}),et="passflow-upgrade-code",st="passflow-upgrade-code-error",tt=({factors:e,selected:s,busy:t=!1,error:a,showAlternatives:r=!1,submitLabel:o="Verify",cancelLabel:i="Cancel",alternativesLabel:n="Use another way",testId:c,onSelectFactor:d,onToggleAlternatives:u,onSubmit:h,onCancel:m})=>{const[f,g]=(0,l.useState)(""),w=(0,l.useRef)(null),x=e.find(e=>e.type===s)??e[0],y="code"===x?.input?x.code:void 0,v=void 0!==y,C=e.length>1,b=e=>{w.current!==e&&(w.current=e,d(e))};return(0,p.jsxs)("form",{className:"passflow-upgrade-dialog__form","data-testid":c,"aria-busy":t,onSubmit:e=>{if(e.preventDefault(),!x)return;const s=f.trim();v&&0===s.length||(b(x.type),h(v?s:void 0))},noValidate:!0,children:[x?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__factor",children:[(0,p.jsx)("span",{className:"passflow-upgrade-dialog__factor-label",children:x.label}),x.hint?(0,p.jsx)("span",{className:"passflow-upgrade-dialog__factor-hint",children:x.hint}):null]}):null,y?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__field",children:[(0,p.jsx)("label",{htmlFor:et,className:"passflow-field-label",children:"Verification code"}),(0,p.jsx)(js,{id:et,name:"upgrade_code",type:"text",inputMode:y.inputMode,autoComplete:y.autoComplete,autoCorrect:"off",autoCapitalize:y.autoCapitalize,spellCheck:!1,maxLength:y.maxLength,value:f,disabled:t,isError:Boolean(a),"aria-invalid":Boolean(a),"aria-describedby":a?st:void 0,"data-testid":"upgrade-dialog-code",onChange:e=>g(e.target.value)})]}):null,(0,p.jsx)(Ns,{id:st,message:a}),(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__actions",children:[(0,p.jsx)(ue,{size:"big",variant:"primary",type:"submit",disabled:t||!x||v&&0===f.trim().length,"data-testid":"upgrade-dialog-submit",children:t?"Verifying…":o}),C?(0,p.jsx)(ue,{size:"big",variant:"clean",type:"button",disabled:t,"aria-expanded":r,"data-testid":"upgrade-dialog-alternatives",onClick:u,children:n}):null,r&&C?(0,p.jsx)($s,{factors:e,selected:s,disabled:t,onSelect:e=>{g(""),b(e)}}):null,(0,p.jsx)(ue,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-cancel",onClick:m,children:i})]})]})},at={totp:{label:"Authenticator app",hint:"Enter the code from your authenticator app"},passkey:{label:"Passkey",hint:"Confirm with your device"},recovery_codes:{label:"Recovery code",hint:"Enter one of your single-use recovery codes"},email_otp:{label:"Email code",hint:"Enter the code we emailed you"},sms_otp:{label:"SMS code",hint:"Enter the code we texted you"}},rt=Object.freeze({maxLength:6,inputMode:"numeric",autoComplete:"one-time-code",autoCapitalize:"off"}),ot=Object.freeze({totp:rt,email_otp:rt,sms_otp:rt,recovery_codes:Object.freeze({maxLength:16,inputMode:"text",autoComplete:"off",autoCapitalize:"characters"}),passkey:null}),it=(e,s)=>e.map(e=>{const t=at[e.type],a=s?.[e.type],r={type:e.type,label:a?.label??t.label,hint:a?.hint??t.hint};return"code"===e.input?{...r,input:"code",code:(o=e.type,ot[o]??rt)}:{...r,input:"none"};var o}),nt=e=>"string"==typeof e&&e?e:void 0,lt=e=>"object"==typeof e&&null!==e?e:void 0,ct=Object.freeze({wrong_code:"rejected",challenge_spent:"rejected",not_registered:"rejected",prepare_not_required:"rejected",exhausted:"exhausted",attempts_exhausted:"exhausted",unavailable:"unavailable",session_changed:"session-changed",fatal:"transport",protocol:"transport",network:"transport"}),dt=(e,s)=>{const t=nt(s.kind);return void 0!==(a=t)&&Object.hasOwn(ct,a)?t:(e=>"number"==typeof e.status||"string"==typeof e.id||void 0!==lt(e.response))(s)?(0,n.classifyUpgradeError)(e,"refresh").kind:void 0;var a},pt=e=>{const s=lt(e);if(!s)return"rejected";const t=nt(s.code),a=nt(s.name);if("upgrade_cancelled"===t||"UpgradeCancelledError"===a||!0===s.cancelled)return"cancelled";if("upgrade_unsatisfiable"===t||"UpgradeUnsatisfiableError"===a)return"unsatisfiable";if("upgrade_unavailable"===t||"UpgradeUnavailableError"===a)return"unavailable";if("upgrade_exhausted"===t||"UpgradeExhaustedError"===a)return"exhausted";if("upgrade_insufficient"===t||"UpgradeInsufficientError"===a)return"insufficient";if("upgrade_session_changed"===t||"UpgradeSessionChangedError"===a)return"session-changed";const r=dt(e,s);return void 0===r?"rejected":ct[r]},ut=e=>{const s=lt(e);if(!s)return;const t={};return"string"==typeof s.acrValues&&(t.acrValues=s.acrValues),"number"==typeof s.level&&(t.level=s.level),"number"==typeof s.maxAge&&(t.maxAge=s.maxAge),void 0===t.acrValues&&void 0===t.level&&void 0===t.maxAge?void 0:t},ht=e=>{if(!e)return"an unknown level";const s=[];return void 0!==e.level?s.push(`AAL${e.level}`):e.acrValues&&s.push(`acr ${e.acrValues}`),void 0!==e.maxAge&&s.push(`verified within ${e.maxAge}s`),s.length>0?s.join(", "):"an unknown level"},mt=e=>ut({acrValues:e.acrValues,level:e.requiredLevel,maxAge:e.maxAge}),ft=(e,s)=>{const t=lt(e);return nt(t?.message)??s},gt=(e,s)=>{const{handlers:t,testId:a}=e;switch(pt(s)){case"cancelled":return{kind:"cancelled",message:"Verification cancelled",detail:"The action that needed extra verification was not completed.",testId:a,onDismiss:t.onDismiss};case"exhausted":return{kind:"exhausted",message:"Too many attempts",detail:ft(s,"No attempts are left for this verification. Start the action again to retry."),testId:a,onDismiss:t.onDismiss};case"unsatisfiable":return{kind:"unsatisfiable",message:"No usable verification method",detail:ft(s,"None of your verification methods can answer this request."),required:e.prompt?mt(e.prompt.challenge):void 0,testId:a,onDismiss:t.onDismiss};case"unavailable":return{kind:"unavailable",message:"Verification is unavailable",detail:ft(s,"This deployment cannot raise your assurance level right now."),testId:a,onDismiss:t.onDismiss};case"session-changed":return{kind:"cancelled",message:"Verification stopped",detail:ft(s,"Your session changed while verifying, so the request was abandoned."),testId:a,onDismiss:t.onDismiss};case"insufficient":{const e=lt(s);return{kind:"insufficient",message:ft(s,"Verified, but not enough for this action"),obtained:ut(e?.obtained)??{},required:ut(e?.required)??{},testId:a,onDismiss:t.onDismiss}}default:return{kind:"transport",message:"Verification could not be completed",detail:ft(s,"The verification request failed before it reached the server."),retryable:!0===lt(s)?.retryable,testId:a,onRetry:t.onRetry,onDismiss:t.onDismiss}}},wt=e=>{const{prompt:s,outcome:t,ui:a,labels:r,handlers:o,testId:i}=e;if(t)switch(t.kind){case"elevated":return{kind:"success",message:"Verification complete",detail:"Your request is continuing.",testId:i,onDismiss:o.onDismiss};case"insufficient":return{kind:"insufficient",message:`Verified to ${ht(t.obtained)}; this action requires ${ht(t.required)}`,obtained:t.obtained,required:t.required,detail:"The elevation succeeded but the action was challenged again. Nothing was completed.",testId:i,onDismiss:o.onDismiss};case"cancelled":return{kind:"cancelled",message:"Verification cancelled",detail:"The action that needed extra verification was not completed.",testId:i,onDismiss:o.onDismiss};default:return gt(e,t.error)}if(!s)return{kind:"working",message:"Preparing verification…",testId:i,onCancel:o.onCancel};const n=void 0===s.previousError?void 0:pt(s.previousError);if(void 0!==n&&"rejected"!==n)return gt(e,s.previousError);const l=it(s.factors,r),c=mt(s.challenge),d=l[0];if(void 0===d)return{kind:"unsatisfiable",message:"No usable verification method",detail:`This action requires ${ht(c)}, and no verification method is available to answer it.`,required:c,testId:i,onDismiss:o.onDismiss};const p=l.find(e=>e.type===a?.selected)?.type??d.type,u=l.find(e=>e.type===p),h=!0===a?.busy;return h&&"none"===u?.input?{kind:"working",message:"Waiting for your passkey…",detail:"Follow the prompt from your device to confirm it is you.",testId:i,onCancel:o.onCancel}:{kind:"challenge",factors:l,selected:p,reason:"This action needs extra verification",busy:h,error:"rejected"===n?ft(s.previousError,"That code was not accepted. Try again."):null,showAlternatives:!0===a?.showAlternatives,testId:i,onSelectFactor:o.onSelectFactor,onToggleAlternatives:o.onToggleAlternatives,onSubmit:o.onSubmit,onCancel:o.onCancel}},xt=e=>{switch(e.kind){case"challenge":case"working":return e.onCancel;default:return e.onDismiss}},yt={working:"working",success:"success",insufficient:"problem",unsatisfiable:"problem",unavailable:"problem",exhausted:"problem",transport:"problem",cancelled:"neutral"},vt=({term:e,bar:s})=>(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__bar",children:[(0,p.jsx)("span",{className:"passflow-upgrade-dialog__bar-term",children:e}),(0,p.jsx)("span",{className:"passflow-upgrade-dialog__bar-value",children:ht(s)})]}),Ct=e=>{const s=yt[e.kind],{detail:t}=e,a="success"===e.kind?e.autoCloseMs??1800:0,r="success"===e.kind?e.onDismiss:void 0;return(0,l.useEffect)(()=>{if(void 0===r||a<=0)return;const e=setTimeout(r,a);return()=>clearTimeout(e)},[a,r]),(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__status","data-testid":e.testId,"data-upgrade-state":e.kind,children:[(0,p.jsxs)("div",{className:`passflow-upgrade-dialog__status-head passflow-upgrade-dialog__status-head--${s}`,role:"problem"===s?"alert":"status","aria-live":"problem"===s?"assertive":"polite",children:["working"===s?(0,p.jsx)(Xs,{size:"small"}):null,"success"===s?(0,p.jsx)(Ss,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}):null,"problem"===s?(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning",decorative:!0}):null,(0,p.jsx)("span",{className:"passflow-upgrade-dialog__status-message",children:e.message})]}),t?(0,p.jsx)("p",{className:"passflow-upgrade-dialog__status-detail",children:t}):null,"insufficient"===e.kind?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__bars","data-testid":"upgrade-dialog-bars",children:[(0,p.jsx)(vt,{term:"Verified",bar:e.obtained}),(0,p.jsx)(vt,{term:"Required",bar:e.required})]}):null,"unsatisfiable"===e.kind&&e.required?(0,p.jsx)("div",{className:"passflow-upgrade-dialog__bars","data-testid":"upgrade-dialog-bars",children:(0,p.jsx)(vt,{term:"Required",bar:e.required})}):null,(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__actions",children:["transport"===e.kind&&e.retryable&&e.onRetry?(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button","data-testid":"upgrade-dialog-retry",onClick:e.onRetry,children:e.retryLabel??"Try again"}):null,"working"===e.kind&&e.onCancel?(0,p.jsx)(ue,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-cancel",onClick:e.onCancel,children:"Cancel"}):null,"working"!==e.kind?(0,p.jsx)(ue,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-dismiss",onClick:e.onDismiss,children:e.dismissLabel??("success"===e.kind?"Done":"Close")}):null]})]})},bt="passflow-upgrade-dialog-description",kt=({open:e,title:s="Extra verification required",state:t})=>{const a=xt(t),r="challenge"===t.kind?t.reason:void 0;return(0,p.jsx)(we,{open:e,onOpenChange:e=>{e||a?.()},children:(0,p.jsxs)(be,{className:"passflow-upgrade-dialog","data-testid":"upgrade-dialog","aria-describedby":r?bt:void 0,children:[(0,p.jsxs)(ke,{className:"passflow-upgrade-dialog__header",children:[(0,p.jsx)(Me,{children:s}),r?(0,p.jsx)(Se,{id:bt,children:r}):null]}),"challenge"===t.kind?(0,p.jsx)(tt,{...t}):(0,p.jsx)(Ct,{...t})]})})},jt=e=>e?{message:e.message,scope:"bad_credentials"===e.type||"missing_credentials"===e.type?"credentials":"form"}:null,Mt=e=>{if("loading"===e.status)return null;if("code_entry"===e.status)return{chrome:{title:"Enter the code",subtitle:"Type the code shown on your device."},state:{kind:"code-entry",error:e.error?.message,testId:"device-code-entry",onSubmit:e.submitCode}};if("done"===e.status)return{chrome:{title:e.info?.app_name?`You're signed in to ${e.info.app_name}`:"You're signed in",subtitle:"Head back to your terminal — it's ready to go."},state:{kind:"status",tone:"success",message:"This device is approved",detail:"You can close this page.",testId:"passkey"===e.info?.mode?"device-auto-passkey-done":"device-done"}};if("refused"===e.status)return{chrome:{title:"Sign-in isn't available this way"},state:{kind:"status",tone:"disabled",message:(e.error??F("mode_disabled")).message,detail:"Nothing was approved, and nothing was sent to the device that showed you this code.",testId:"device-mode-disabled"}};if("failed"===e.status){const s=e.error??F("generic");return{chrome:{title:"That didn't work"},state:{kind:"status",tone:"error",message:s.message,recoverable:s.isRecoverable,testId:"device-failed",onRetry:s.isRecoverable?()=>e.submitCode(""):void 0}}}if(!e.info)return null;if("second_factor"===e.status||"working"===e.status&&e.isSecondFactorPending)return{chrome:{title:"Two-Factor Authentication",subtitle:`One more step to approve ${e.info.app_name}.`},state:{kind:"second-factor",methods:e.secondFactorMethods,identity:e.email,busy:"working"===e.status,error:e.error?.message,testId:"device-second-factor",onSubmit:(s,t)=>{e.submitSecondFactor(s,t)},onMethodChange:e.clearError}};if("passkey"===e.info.mode){const s=("ready"===e.status||"working"===e.status)&&!e.error;return{chrome:{title:`Sign in to ${e.info.app_name}`,subtitle:"Confirm with your passkey to finish this device sign-in."},state:{kind:"passkey-progress",working:s,message:e.error?"Passkey sign-in couldn't continue.":"Waiting for your passkey — follow the prompt on your device.",error:e.error?.message,recoverable:e.error?.isRecoverable,testId:"device-auto-passkey",onRetry:e.error?.isRecoverable?()=>{e.confirmWithPasskey()}:void 0}}}const s="working"===e.status,t=e.isAuthenticated||"signed_in"===e.status,a=(e=>({identities:e.info?.methods.password?[{id:"email_or_username",label:"Email",selectLabel:"Use email",requiredMessage:"Email is required",format:"email",password:!0}]:[],passkey:Boolean(e.info?.methods.passkey),providers:[]}))(e),r=(e=>{if(e.info)return{code:e.info.user_code,appName:e.info.app_name,message:"requested this sign-in. Confirm that the code matches your terminal. If it doesn't, close this page.",codeTestId:"device-consent-user-code",appNameTestId:"device-consent-app-name"}})(e);return"full_login"===e.info.mode?t?{chrome:{title:`Approve sign-in to ${e.info.app_name}`,subtitle:"Confirm that the code matches your terminal before approving."},state:{kind:"device-approval",appName:e.info.app_name,code:e.info.user_code,identity:e.email,busy:s,error:e.error?.message,testId:"device-full-login-approval",actionTestId:"device-confirm",codeTestId:"device-consent-user-code",appNameTestId:"device-consent-app-name",onApprove:()=>{e.approve()}}}:{chrome:{title:`Sign in to approve ${e.info.app_name}`,subtitle:"Confirm the code, then sign in to continue.",variant:"sign-in"},state:{kind:"credentials",methods:a,passwordPolicy:null,notice:r,busy:s,error:jt(e.error),primaryLabel:s?"Signing in…":"Sign In",passkeyLabel:"Sign In with a Passkey",testId:"device-full-login",onPassword:s=>{e.signInWithPassword(s.emailOrUsername,s.password)},onPasskey:()=>{e.signInWithPasskey()}}}:{chrome:{title:`Approve sign-in to ${e.info.app_name}`,subtitle:"Confirm the code, then sign in to approve this request.",variant:"sign-in"},state:{kind:"credentials",methods:a,passwordPolicy:null,notice:r,busy:s,error:jt(e.error),primaryLabel:s?"Approving…":"Approve",primaryTestId:"device-confirm",passkeyLabel:"Approve with a Passkey",testId:"device-consent",onPassword:s=>{e.confirmWithPassword(s.emailOrUsername,s.password)},onPasskey:()=>{e.confirmWithPasskey()}}}},St=({onComplete:e,onCancel:s,numInputs:t})=>{const[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1),{setupData:n,recoveryCodes:c,step:d,beginSetup:u,confirmSetup:h,reset:m,isLoading:f,isError:g,error:w}=ys(),x=(0,l.useId)(),y=`${x}-label`,v=`${x}-error`,C=t??6;return"idle"===d?(0,p.jsx)(Hs,{title:"Enable Two-Factor Authentication",subtitle:"Add an extra layer of security to your account",className:"passflow-2fa-setup",children:(0,p.jsxs)("div",{className:"passflow-2fa-setup-start",children:[(0,p.jsx)(ue,{size:"big",type:"button",variant:"primary",onClick:()=>u(),disabled:f,children:f?"Loading...":"Get Started"}),s&&(0,p.jsx)("button",{type:"button",className:"passflow-link-button",onClick:s,children:"Cancel"}),g&&(0,p.jsxs)("div",{className:"passflow-field-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-field-error-text",children:w})]})]})}):"setup"===d&&n?(0,p.jsx)(Hs,{title:"Scan QR Code",subtitle:"Scan this code with your authenticator app (Google Authenticator, Authy, etc.)",className:"passflow-2fa-setup",children:(0,p.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),await h(a)},className:"passflow-2fa-setup-qr",children:[(0,p.jsx)("div",{className:"passflow-2fa-qr-container",children:(0,p.jsx)("img",{src:`data:image/png;base64,${n.qr_code}`,alt:"2FA QR Code",className:"passflow-2fa-qr-image"})}),(0,p.jsxs)("div",{className:"passflow-2fa-secret-toggle",children:[(0,p.jsx)("button",{type:"button",className:"passflow-link-button",onClick:()=>i(!o),children:o?"Hide manual code":"Can't scan? Enter code manually"}),o&&(0,p.jsx)("code",{className:"passflow-2fa-secret-code",children:n.secret})]}),(0,p.jsxs)("div",{className:"passflow-2fa-confirm-section",children:[(0,p.jsxs)("p",{id:y,className:"passflow-2fa-confirm-label",children:["Enter the ",C,"-digit code from your app to confirm:"]}),(0,p.jsxs)("div",{id:"otp-wrapper",className:"passflow-verify-otp-wrapper",children:[(0,p.jsx)(_e,{id:x,name:"code",length:C,value:a,onChange:e=>{r(e)},state:g?"error":"default",labelledBy:y,describedBy:g?v:void 0,autoFocus:!0}),g&&(0,p.jsxs)("div",{className:"passflow-verify-otp-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:v,className:"passflow-verify-otp-error-text",children:w})]})]})]}),(0,p.jsx)(ue,{size:"big",type:"submit",variant:"primary",disabled:a.length!==C||f,children:f?"Confirming...":"Confirm & Enable"})]})}):"complete"===d&&c.length>0?(0,p.jsx)(Hs,{title:"Save Your Recovery Codes",subtitle:"Store these codes in a safe place. You'll need them if you lose access to your authenticator.",className:"passflow-2fa-setup",children:(0,p.jsxs)("div",{className:"passflow-2fa-setup-complete",children:[(0,p.jsxs)("div",{className:"passflow-2fa-warning",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{children:"These codes will only be shown once. Make sure to save them!"})]}),(0,p.jsx)("div",{className:"passflow-2fa-recovery-codes",children:c.map(e=>(0,p.jsx)("code",{className:"passflow-2fa-recovery-code",children:e},e))}),(0,p.jsx)(ue,{size:"big",type:"button",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(c.join("\n"))},children:"Copy to Clipboard"}),(0,p.jsx)(ue,{size:"big",type:"button",variant:"primary",onClick:()=>{e?.(c),m()},children:"I've Saved These Codes"})]})}):null},Et=({twoFactorVerifyPath:e=Ve.two_factor_verify.path,signInPath:s=Ve.signin.path})=>{const[t,a]=(0,l.useState)(!1),{navigate:r}=ls(),o=Ae();(0,l.useEffect)(()=>{o.isTwoFactorVerificationRequired()||(Q.canRedirect()?(Q.incrementRedirect(),r({to:s}),a(!0)):a(!1))},[o,r,s]);return t||!o.isTwoFactorVerificationRequired()&&Q.canRedirect()?null:(0,p.jsx)(St,{onComplete:()=>{r({to:e})},onCancel:()=>{Q.reset(),r({to:s})}})},Nt=/\/two-factor-setup-magic-link\/([^/?#]+)/,_t=({token:e,onSuccess:s,onError:t,redirectOnSuccess:a=!0,signInPath:r=Ve.signin.path})=>{const o=e??(()=>{const e=Nt.exec(window.location.pathname)??Nt.exec(window.location.hash);if(!e?.[1])return"";try{return decodeURIComponent(e[1])}catch{return e[1]}})(),{navigate:i}=ls(),{isLoading:n,isRetrying:c,isValidated:d,error:u,retry:h,retryCountdown:m}=vs(o);(0,l.useEffect)(()=>{u&&t?.(u)},[u,t]);if(n)return(0,p.jsx)(Hs,{title:"Validating Magic Link",subtitle:"Please wait while we verify your link...",className:"passflow-2fa-magic-link-loading",children:(0,p.jsxs)("div",{className:"passflow-loading-container",role:"status","aria-live":"polite","aria-busy":"true",children:[(0,p.jsx)(Ss,{id:"logo",type:"general",size:"large",className:"passflow-loading-spinner"}),(0,p.jsx)("p",{className:"passflow-loading-text",children:"Validating your magic link..."})]})});if(u){const e="SERVER_ERROR"===u.code||"RATE_LIMITED"===u.code,s="RATE_LIMITED"===u.code&&null!==m&&m>0;return(0,p.jsx)(Hs,{title:"Magic Link Validation Failed",subtitle:Lt(u.code),className:"passflow-2fa-magic-link-error",children:(0,p.jsxs)("div",{className:"passflow-error-container",role:"alert","aria-live":"assertive",children:[(0,p.jsx)("div",{className:"passflow-error-icon",children:(0,p.jsx)(Ss,{id:"warning",type:"general",size:"large"})}),(0,p.jsx)("p",{className:"passflow-error-message",id:"error-message",children:u.message}),(0,p.jsxs)("div",{className:"passflow-error-actions",children:[e&&(0,p.jsx)(ue,{size:"big",type:"button",variant:"primary",onClick:h,disabled:s||c,"aria-describedby":"error-message",children:c?"Retrying...":s?`Try again in ${It(m)}`:"Try Again"}),(0,p.jsx)(ue,{size:"big",type:"button",variant:"secondary",onClick:()=>i({to:r}),children:"Back to Sign In"})]}),!e&&(0,p.jsx)("p",{className:"passflow-error-help-text",children:"Please contact your administrator to request a new magic link."})]})})}return d?(0,p.jsx)(St,{onComplete:()=>{s?.(),a&&i({to:r})},onCancel:()=>{i({to:r})}}):null};function Lt(e){switch(e){case"EXPIRED_TOKEN":return"This magic link has expired";case"INVALID_TOKEN":return"This magic link is invalid";case"REVOKED_TOKEN":return"This magic link has been revoked";case"RATE_LIMITED":return"Too many attempts";case"SERVER_ERROR":return"Something went wrong";default:return"An error occurred"}}function It(e){return null===e?"":`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`}var At={totp:"Authenticator App",email_otp:"Email Code",sms_otp:"SMS Code",passkey:"Passkey",recovery_codes:"Recovery Code",push_fcm:"Push Notification (FCM)",push_webpush:"Push Notification (Web)"},Pt={totp:"📱",email_otp:"✉️",sms_otp:"💬",passkey:"🔑",recovery_codes:"🔒",push_fcm:"🔔",push_webpush:"🔔"},Ft=({availableMethods:e,currentMethod:s,onSelectMethod:t,isOpen:a,onClose:r})=>(0,p.jsx)(u.Root,{open:a,onOpenChange:e=>!e&&r(),children:(0,p.jsxs)(u.Portal,{children:[(0,p.jsx)(u.Overlay,{className:"pf-dialog-overlay"}),(0,p.jsxs)(u.Content,{className:"pf-dialog-content pf-method-selector-dialog",children:[(0,p.jsx)(u.Title,{className:"pf-dialog-title",children:"Choose Verification Method"}),(0,p.jsx)(u.Description,{className:"pf-dialog-description",children:"Select an alternative method to verify your identity"}),(0,p.jsx)("div",{className:"pf-method-selector-list",children:e.map(e=>(0,p.jsxs)("button",{type:"button",className:"pf-method-selector-item "+(e===s?"pf-method-selector-item-active":""),onClick:()=>(e=>{t(e),r()})(e),disabled:e===s,children:[(0,p.jsx)("span",{className:"pf-method-icon",children:Pt[e]||"🔐"}),(0,p.jsx)("span",{className:"pf-method-label",children:At[e]||e}),e===s&&(0,p.jsx)("span",{className:"pf-method-current-badge",children:"Current"})]},e))}),(0,p.jsx)(u.Close,{asChild:!0,children:(0,p.jsx)("button",{type:"button",className:"pf-dialog-close","aria-label":"Close",children:"×"})})]})]})}),Tt=({firstFactorMethod:e,onSuccess:s,onError:t,trustDevice:a=!1})=>{const{challenge:r,isLoading:o,error:i,requestChallenge:n,verify:c,switchMethod:d,selectedMethod:u}=xs(),[h,m]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),w=(0,l.useId)(),x=`${w}-label`,y=`${w}-error`;(0,l.useEffect)(()=>{n(e)},[n,e]),(0,l.useEffect)(()=>{i&&t&&t(i)},[i,t]);const v=async()=>{h&&await c(h,a)&&s?.()},C=e=>{m(e),6===e.length&&setTimeout(()=>{c(e,a).then(e=>{e&&s?.()})},100)};if(!r)return(0,p.jsx)("div",{className:"pf-two-factor-challenge pf-loading",children:(0,p.jsx)("p",{children:"Loading challenge..."})});const b=u||r.method,k=[r.method,...r.alternative_methods||[]];return(0,p.jsxs)("div",{className:"pf-two-factor-challenge",children:[(0,p.jsxs)("div",{className:"pf-challenge-method-info",children:[(0,p.jsx)("h3",{children:"Two-Factor Authentication"}),(0,p.jsx)("p",{id:x,children:"Enter the verification code"})]}),(()=>{switch(b){case"totp":case"email_otp":case"sms_otp":return(0,p.jsxs)("div",{className:"pf-challenge-input-wrapper",children:[(0,p.jsx)(_e,{id:w,name:"code",length:6,value:h,onChange:C,state:o?"disabled":i?"error":"default",labelledBy:x,describedBy:i?y:void 0,autoFocus:!0}),i&&(0,p.jsx)("div",{id:y,className:"pf-otp-error",children:i.message}),"email_otp"===b&&r.code_sent_to&&(0,p.jsxs)("p",{className:"pf-challenge-hint",children:["Code sent to ",r.code_sent_to]}),"sms_otp"===b&&r.code_sent_to&&(0,p.jsxs)("p",{className:"pf-challenge-hint",children:["Code sent to ",r.code_sent_to]}),(0,p.jsx)("button",{type:"button",onClick:v,disabled:o||6!==h.length,className:"pf-button pf-button-primary",children:o?"Verifying...":"Verify"})]});case"passkey":return(0,p.jsx)("div",{className:"pf-challenge-input-wrapper",children:(0,p.jsx)("button",{type:"button",onClick:v,disabled:o,className:"pf-button pf-button-primary",children:o?"Verifying...":"Use Passkey"})});case"recovery_codes":return(0,p.jsxs)("div",{className:"pf-challenge-input-wrapper",children:[(0,p.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"Enter recovery code",disabled:o,className:"pf-input"}),(0,p.jsx)("button",{type:"button",onClick:v,disabled:o||!h,className:"pf-button pf-button-primary",children:o?"Verifying...":"Verify"})]});default:return(0,p.jsxs)("p",{children:["Unsupported method: ",b]})}})(),k.length>1&&(0,p.jsx)("button",{type:"button",onClick:()=>g(!0),className:"pf-button pf-button-secondary pf-button-switch-method",children:"Use different method"}),(0,p.jsx)(Ft,{availableMethods:k,currentMethod:b,onSelectMethod:async e=>{m(""),await d(e)},isOpen:f,onClose:()=>g(!1)})]})},Rt=({onSuccess:e,onBack:s,title:t="Use Recovery Code",subtitle:a="Enter one of your recovery codes",signInPath:r,trustDeviceLabel:o="Trust this device"})=>{const[i,n]=(0,l.useState)(""),[c,d]=(0,l.useState)(!1),{useRecoveryCode:u,isLoading:h,isError:m,errorDetails:f,reset:g}=Cs(),w=()=>{Q.reset(),window.location.href=r||"/signin"},x=!Q.canRedirect(),y=h||"not_enabled"===f?.type||"expired"===f?.type||x;return(0,p.jsx)(Hs,{title:t,subtitle:a,className:"passflow-2fa-recovery",children:(0,p.jsxs)("form",{onSubmit:async s=>{s.preventDefault(),await u(i,(e=>e?{trustDevice:!0}:void 0)(c))&&e?.()},className:"passflow-form",children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)("div",{className:"passflow-form-field",children:(0,p.jsx)(Fs,{label:o,checked:c,disabled:y,onChange:e=>d(e.target.checked)})}),(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("label",{htmlFor:"recovery-code",className:U("passflow-field-label",m&&"passflow-field-label--error"),children:"Recovery Code"}),(0,p.jsx)("input",{id:"recovery-code",type:"text",value:i,onChange:e=>{g(),n(e.target.value.toUpperCase().replace(/\s/g,""))},placeholder:"XXXX-XXXX",className:U("passflow-field passflow-field--text passflow-field--focused",m&&"passflow-field--error",y&&"passflow-field--disabled"),autoComplete:"off",disabled:y}),m&&f?x?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--critical",children:[(0,p.jsx)(Ss,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{className:"passflow-form-error-text",children:Q.getLoopDetectedMessage()}),r&&(0,p.jsx)(ue,{type:"button",size:"medium",variant:"secondary",onClick:w,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"not_enabled"===f.type?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--persistent",children:[(0,p.jsx)(Ss,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{className:"passflow-form-error-text",children:R(f)}),r&&(0,p.jsx)(ue,{type:"button",size:"medium",variant:"secondary",onClick:w,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"expired"===f.type?(0,p.jsxs)("div",{className:"passflow-form-info",children:[(0,p.jsx)(Ss,{size:"small",id:"info",type:"general",className:"icon-info"}),(0,p.jsx)("span",{className:"passflow-form-info-text",children:R(f)})]}):(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:R(f)})]}):null]})]}),!y&&(0,p.jsx)(ue,{size:"big",type:"submit",variant:"primary",disabled:i.length<8||h,className:"passflow-button-signin",children:h?"Verifying...":"Verify"}),s&&!y&&(0,p.jsx)("div",{className:"passflow-form-actions",children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:["Have your device?"," ",(0,p.jsx)(ue,{type:"button",size:"small",variant:"link",onClick:s,children:"Use authenticator code"})]})})]})})},Ut=e=>e?{trustDevice:!0}:void 0,Yt=({onSuccess:e,onUseRecovery:s,title:t="Two-Factor Authentication",subtitle:a,numInputs:r,shouldAutoFocus:o=!0,signInPath:i,twoFactorSetupPath:n,trustDeviceLabel:c="Trust this device"})=>{const[d,u]=(0,l.useState)(""),[h,m]=(0,l.useState)(!1),{verify:f,isLoading:g,isError:w,errorDetails:x,reset:y}=Cs(),v=(0,l.useId)(),C=`${v}-error`,b=r??6,k=a??`Enter the ${b}-digit code from your authenticator app`,j=()=>{Q.reset(),window.location.href=i||"/signin"},M=()=>{window.location.href=n||"/two-factor-setup"},S=!Q.canRedirect(),E=g||"not_enabled"===x?.type||"expired"===x?.type||S;return(0,p.jsx)(Hs,{title:t,subtitle:k,className:"passflow-2fa-verify",children:(0,p.jsxs)("form",{onSubmit:async s=>{s.preventDefault(),await f(d,Ut(h))&&e?.()},className:"passflow-form",children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)("div",{className:"passflow-form-field",children:(0,p.jsx)(Fs,{label:c,checked:h,disabled:E,onChange:e=>m(e.target.checked)})}),(0,p.jsx)("div",{className:"passflow-verify-otp-wrapper",children:(0,p.jsx)(_e,{id:v,name:"code",length:b,value:d,onChange:async s=>{(e=>{y(),u(e)})(s),s.length===b&&await f(s,Ut(h))&&e?.()},state:E?"disabled":w?"error":"default",label:"Verification code",describedBy:w&&x?C:void 0,autoFocus:o&&!E})}),w&&x?S?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--critical",children:[(0,p.jsx)(Ss,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:Q.getLoopDetectedMessage()}),i&&(0,p.jsx)(ue,{type:"button",size:"medium",variant:"secondary",onClick:j,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"not_enabled"===x.type?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--persistent",children:[(0,p.jsx)(Ss,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:"You need to set up two-factor authentication first."}),(0,p.jsxs)("div",{className:"passflow-form-error-actions",children:[n&&(0,p.jsx)(ue,{type:"button",size:"medium",variant:"primary",onClick:M,className:"passflow-button-setup-2fa",children:"Set Up 2FA"}),i&&(0,p.jsx)(ue,{type:"button",size:"medium",variant:"secondary",onClick:j,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]})]}):"expired"===x.type?(0,p.jsxs)("div",{className:"passflow-form-info",children:[(0,p.jsx)(Ss,{size:"small",id:"info",type:"general",className:"icon-info"}),(0,p.jsx)("span",{id:C,className:"passflow-form-info-text",children:R(x)})]}):(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:R(x)})]}):null]}),!E&&(0,p.jsx)(ue,{size:"big",type:"submit",variant:"primary",disabled:d.length!==b||g,className:"passflow-button-signin",children:g?"Verifying...":"Verify"}),s&&!E&&(0,p.jsx)("div",{className:"passflow-form-actions",children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:["Lost your device?"," ",(0,p.jsx)(ue,{type:"button",size:"small",variant:"link",onClick:s,children:"Use recovery code"})]})})]})})},zt=e=>{switch(pt(e)){case"cancelled":case"session-changed":return{status:"idle"};case"insufficient":return{status:"insufficient",obtained:ut(e.obtained)??{},required:ut(e.required)??{}};case"exhausted":return{status:"error",kind:"exhausted",error:e};case"unsatisfiable":return{status:"error",kind:"unsatisfiable",error:e};case"unavailable":return{status:"error",kind:"unavailable",error:e};default:return{status:"error",kind:"transport",error:e}}},Vt=e=>e.error??("failed"===e.proof.status?e.proof.reason:void 0)??new Error("The verification flight failed without reporting a reason."),Dt=e=>void 0===e?"\0default":e.map(e=>e.type).join("\0"),Gt=e=>void 0===e?"none":"string"==typeof e?`mode:${e}`:"function"==typeof e?"fn":`limits:${e.maxBodyBytes??""}:${e.allowStreamingBody??""}`,Bt=({children:e,enabled:s=!0,backend:t,interceptFetch:a=!1,requireChallengeChannel:r,shouldIntercept:o,replay:i,onCancel:c,onUpgradeDiagnostic:d,factors:u,maxAttempts:h,relyingPartyId:m,labels:f,title:g,renderDialog:w})=>{const x=Ae(),[y,v]=(0,l.useState)(null),[C,b]=(0,l.useState)({status:"idle"}),[k,j]=(0,l.useState)(null),[M,S]=(0,l.useState)(!1),[E,N]=(0,l.useState)(!1),[_,L]=(0,l.useState)(void 0),[I,A]=(0,l.useState)(!1),P=(0,l.useRef)(void 0),F=(0,l.useRef)(null),T=(0,l.useRef)(!1),R=(0,l.useRef)(!1),U=(0,l.useRef)(!1),Y=(0,l.useRef)(o),z=(0,l.useRef)(d);Y.current=o,z.current=d;const V=(0,l.useRef)(u),D=(0,l.useRef)(i);V.current=u,D.current=i;const G=(0,l.useCallback)(e=>{const s=D.current;return"function"!=typeof s||s(e)},[]),B=(0,l.useCallback)(e=>{const s=P.current;return void 0!==s&&(P.current=void 0,s(e),!0)},[]),O=(0,l.useCallback)(()=>{F.current=null,T.current=!1,v(null),j(null),N(!1),S(!1)},[]),H=(0,l.useCallback)(e=>new Promise(s=>{U.current?s({type:"cancel"}):(e.onRequirementRaised=s=>{v({challenge:s.challenge,factors:s.factors,previousError:e.previousError}),b({status:"challenged",challenge:s.challenge,factors:s.factors.map(e=>e.type)})},P.current=s,F.current=e,T.current=!1,R.current=!1,L(void 0),j(null),N(!1),S(!1),v({challenge:e.challenge,factors:e.factors,previousError:e.previousError}),b({status:"challenged",challenge:e.challenge,factors:e.factors.map(e=>e.type)}))}),[]),Z=(0,l.useCallback)(e=>{U.current=!1,b((e=>"success"===e.terminal?{status:"success"}:"insufficient"===e.terminal?{status:"insufficient",obtained:e.insufficient?.obtained??{},required:e.insufficient?.required??{}}:zt(Vt(e)))(e)),L(R.current?void 0:(e=>"success"===e.terminal?{kind:"elevated"}:"insufficient"===e.terminal?{kind:"insufficient",obtained:e.insufficient?.obtained??{},required:e.insufficient?.required??{}}:{kind:"failed",error:Vt(e)})(e)),O()},[O]);(0,l.useEffect)(()=>{if(!s)return void A(!1);const e=x.upgrade.enable({prompt:H,backend:t,interceptFetch:a,requireChallengeChannel:r,shouldIntercept:void 0===o?void 0:e=>!1!==Y.current?.(e),replay:"function"==typeof D.current?G:D.current,onCancel:c,onUpgradeDiagnostic:void 0===d?void 0:e=>z.current?.(e),factors:V.current,maxAttempts:h,relyingPartyId:m,onFlightSettled:Z});return A(!0),()=>{B({type:"cancel"}),e(),A(!1)}},[x,s,Array.isArray(t)?t.join("\0"):t,a,r,void 0===o,void 0===d,Gt(i),G,c,Dt(u),h,m,H,Z,B]),X!==x&&ee(x),(0,l.useEffect)(()=>ee(x),[x]),(0,l.useEffect)(()=>{const e={onAuthChange:()=>{U.current=!1,B({type:"cancel"}),O(),L(void 0),b({status:"idle"})}},s=[n.PassflowEvent.SignIn,n.PassflowEvent.SignOut];return x.subscribe(e,s),()=>x.unsubscribe(e,s)},[x,B,O]);const q=(0,l.useCallback)(e=>{j(e),F.current?.onFactorSelected(e),T.current=!0},[]),J=(0,l.useCallback)(e=>{const s=F.current;if(null===s||void 0===P.current)return;const t=k??s.factors[0]?.type;void 0!==t&&(T.current||(s.onFactorSelected(t),T.current=!0),S(!0),b({status:"submitting"}),B({type:"submit",factor:t,code:e}))},[k,B]),W=(0,l.useCallback)(()=>{R.current=!0,U.current=!0,B({type:"cancel"})||L(void 0),O(),b({status:"idle"})},[B,O]),K=(0,l.useCallback)(()=>{L(void 0)},[]),Q=(0,l.useCallback)(()=>{N(e=>!e)},[]),$=(0,l.useCallback)(async e=>{const s=(e=>{if(void 0!==e)return ut({acrValues:e.acrValues,level:(0,n.requiredAcrLevel)(e.acrValues),maxAge:e.maxAge})})(e),t=void 0===s?{kind:"imperative"}:{kind:"imperative",requested:s};try{return await x.upgrade.elevate((e=>({acrValues:e?.acrValues,requiredLevel:(0,n.requiredAcrLevel)(e?.acrValues),maxAge:e?.maxAge,status:403,channels:[]}))(e),t),{status:"success"}}catch(a){return"cancelled"===pt(a)?null:zt((e=>e instanceof Error?e:new Error(String(e)))(a))}},[x]),se=(0,l.useMemo)(()=>({enabled:s&&I,state:C,prompt:y,selectedFactor:k,selectFactor:q,submit:J,cancel:W,dismiss:K,elevate:$}),[s,I,C,y,k,q,J,W,K,$]),te=wt({prompt:null===y?null:{challenge:y.challenge,factors:y.factors,previousError:y.previousError},outcome:_,ui:{selected:k,busy:M,showAlternatives:E},labels:f,handlers:{onSelectFactor:q,onToggleAlternatives:Q,onSubmit:J,onCancel:W,onDismiss:K}}),ae={open:null!==y||void 0!==_,title:g,state:te};return(0,p.jsxs)(De.Provider,{value:se,children:[e,void 0===w?(0,p.jsx)(kt,{...ae}):w(ae)]})};var Ot=/\/auth\/(login|register|passwordless|passkey|2fa|session\/exchange)\b|\/auth\/federated\/start\b/,Ht=()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search);return new URLSearchParams(Array.from(e,([e,s])=>[e.toLowerCase(),s])).get("parent_challenge_id")||void 0},Zt=Ht(),qt=!1,Jt=()=>qt,Wt=e=>{(0,l.useEffect)(()=>{if(!e||"undefined"==typeof window)return;const s=e=>Ot.test(e),t=s=>{if(s)try{const t=JSON.parse(s);if("parent_challenge_id"in t)return;return t.parent_challenge_id=e,JSON.stringify(t)}catch{return}},a=e=>{if(e)try{const s=JSON.parse(e);"string"==typeof s.redirect_url&&s.redirect_url&&(qt=!0,window.location.assign(s.redirect_url))}catch{}},r=(0,n.registerFetchMiddleware)(async(e,r,o)=>{let i="";"string"==typeof r?i=r:r instanceof URL?i=r.toString():r instanceof Request&&(i=r.url);const n=o?.method?.toUpperCase()??"GET";let l=o;if("POST"===n&&s(i)&&"string"==typeof o?.body){const e=t(o.body);void 0!==e&&(l={...o,body:e})}const c=await e(r,l);if(c.ok&&s(i))try{const e=await c.clone().text();a(e)}catch{}return c},{priority:n.FETCH_PRIORITY_OIDC,name:"passflow-oidc-authflow"}),o=XMLHttpRequest.prototype.open,i=XMLHttpRequest.prototype.send,l=new WeakMap;return XMLHttpRequest.prototype.open=function(e,t,...r){const i="string"==typeof t?t:t.toString();l.set(this,{method:e?.toUpperCase(),url:i,isAuth:s(i)}),this.addEventListener("load",()=>{l.get(this)?.isAuth&&this.status>=200&&this.status<300&&a("string"==typeof this.responseText?this.responseText:null)}),o.call(this,e,t,...r)},XMLHttpRequest.prototype.send=function(e){const s=l.get(this);let a=e;if(s?.isAuth&&"POST"===s.method&&"string"==typeof e){const s=t(e);void 0!==s&&(a=s)}i.call(this,a)},()=>{r(),XMLHttpRequest.prototype.open=o,XMLHttpRequest.prototype.send=i}},[e])},Kt=(e,s,t,a)=>{const[r,o]=(0,l.useState)("idle"),[i,n]=(0,l.useState)(void 0),c=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(!e||c.current)return;if("undefined"!=typeof window&&"/oidc/device"===window.location.pathname)return;if(!a)return;c.current=!0;(async()=>{let r;try{const s=`${t??""}/oidc/requests/${encodeURIComponent(e)}`,a=await fetch(s);a.ok&&(r=await a.json(),n(r))}catch{}if(r?.oidc_prompt_login)o("fallback_to_login");else{if(r?.max_age&&r.max_age>0){const e=s.getParsedTokens?.(),t=e?.access_token?.payload,a=e?.id_token?.payload,i=t?.auth_time??a?.auth_time;if(i&&"number"==typeof i&&Math.floor(Date.now()/1e3)-i>r.max_age)return void o("fallback_to_login")}o("exchanging");try{let i;try{i=(await s.getTokens(!1))?.access_token}catch{}const n=t??"",l={"Content-Type":"application/json"};i&&(l.Authorization=`Bearer ${i}`),a&&(l["X-Passflow-ClientID"]=a);const c=await fetch(`${n}/auth/session/exchange`,{method:"POST",credentials:"include",headers:l,body:JSON.stringify({parent_challenge_id:e})});if(c.ok){try{if((await c.json()).redirect_url)return}catch{}return void o("fallback_to_login")}if(403===c.status)return void o("fallback_to_login");if(401===c.status||400===c.status){if(r?.oidc_prompt_none&&r.redirect_uri){const e=new URL(r.redirect_uri);return e.searchParams.set("error","login_required"),e.searchParams.set("error_description","user is not authenticated"),r.state&&e.searchParams.set("state",r.state),void window.location.assign(e.toString())}return void o("fallback_to_login")}o("fallback_to_login")}catch{o("fallback_to_login")}}})()},[e,s,t,a]),{exchangeState:r,parentMeta:i}},Qt=l.default.createContext({exchangeState:"idle"}),Xt=({successAuthRedirect:e,signInPath:s=Ve.signin.path,twoFactorSetupPath:t=Ve.two_factor_setup?.path??"/two-factor-setup",useV2Flow:a=!1})=>{const[r,o]=(0,l.useState)("verify"),[i,n]=(0,l.useState)(!1),{navigate:c}=ls(),d=Ae(),{errorType:u}=Cs();(0,l.useEffect)(()=>{d.isTwoFactorVerificationRequired()||(Q.canRedirect()?(Q.incrementRedirect(),c({to:s}),n(!0)):n(!1))},[d,c,s]),(0,l.useEffect)(()=>{"expired"===u?Q.canRedirect()&&(Q.incrementRedirect(),Q.setLastErrorType("expired"),setTimeout(()=>{c({to:s})},1500)):"not_enabled"===u&&Q.setLastErrorType("not_enabled")},[u,c,s]);const h=async()=>{Q.reset(),Jt()||e&&(le(e)?window.location.href=await G(d,e):c({to:e}))};return i||!d.isTwoFactorVerificationRequired()&&Q.canRedirect()?null:a?(0,p.jsx)(Tt,{onSuccess:h}):(0,p.jsx)(p.Fragment,{children:"verify"===r?(0,p.jsx)(Yt,{onSuccess:h,onUseRecovery:()=>{o("recovery")},signInPath:s,twoFactorSetupPath:t}):(0,p.jsx)(Rt,{onSuccess:h,onBack:()=>{o("verify")},signInPath:s})})},$t={email_or_username:"",phone:""},ea=d.object().shape({defaultMethod:d.string().oneOf(["email_or_username","phone"]).required()}),sa=({successResetRedirect:e,signInPath:s=Ve.signin.path,forgotPasswordSuccessPath:t=Ve.forgot_password_success.path})=>{const{getValues:a,control:r,register:o,formState:{errors:i,isDirty:n,isValid:c}}=(0,x.useForm)({defaultValues:$t}),{appSettings:d,currentStyles:u,isError:h,error:m,loginAppTheme:f}=qe();if(h)throw new Error(m);const y=(0,l.useMemo)(()=>Y(d?.auth_strategies),[d]),{navigate:v}=ls(),C=oe(),{get:b}=ne({default_method:""}),k={defaultMethod:b("default_method")};try{ea.validateSync(k,{abortEarly:!1})}catch(I){throw new Error("Invalid default method param")}const{defaultMethod:j}=k,{fetch:M,error:S,isError:E,isLoading:N}=os(),_="email_or_username"===j?"Enter the email address you used when you joined and we’ll send you instructions to reset your password.":"Enter the mobile phone number you used when you joined and we’ll send you the reset link.",L="email_or_username"===j?"For security reasons, we do NOT store your password. So rest assured that we will never send your password via email.":"For security reasons, we do NOT store your password. So rest assured that we will never send your password via SMS.";return(0,p.jsxs)(Hs,{title:"Forgot password?",subtitle:_,className:"passflow-forgot-password-wrapper",customCss:u?.custom_css,customLogo:u?.logo_url,removeBranding:f?.remove_passflow_logo,children:[(0,p.jsx)("span",{className:"passflow-form-subscriptions",children:L}),(0,p.jsxs)("form",{onSubmit:e=>e.preventDefault(),className:"passflow-form",children:[(0,p.jsx)("div",{className:"passflow-form-container",children:(0,p.jsxs)("div",{className:"passflow-form-field",children:["email_or_username"===j&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"identity",className:U("passflow-field-label",{"passflow-field-label--error":E}),children:z(y,"label")})}),(0,p.jsx)(x.Controller,{name:"email_or_username",control:r,rules:{required:"Email is required",pattern:{value:ce,message:"Invalid email"}},render:({field:e})=>(0,p.jsx)(js,{...e,...o("email_or_username"),isError:E||Object.hasOwn(i,"email_or_username"),id:"email_or_username",type:"text",name:"email_or_username"})})]}),"phone"===j&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"phone",className:U("passflow-field-label",{"passflow-field-label--error":E}),children:"Phone"})}),(0,p.jsx)(x.Controller,{name:"phone",control:r,rules:{required:"Phone is required",validate:e=>!!(0,w.phone)(e).isValid||"Invalid phone number"},render:({field:e})=>(0,p.jsx)(ks,{...e,...o("phone"),onChange:s=>e.onChange(s),id:"phone",name:"phone",isError:E||Object.hasOwn(i,"phone"),ref:null})})]}),E&&(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:S})]})]})}),(0,p.jsxs)("div",{className:"passflow-send-reset-wrapper",children:[(0,p.jsx)(ue,{size:"big",variant:"primary",type:"button",disabled:!n||!c||N,className:"passflow-button-send-reset-password",onClick:async()=>{const s=a(),r=s.email_or_username.match(ce),o=!r&&s.email_or_username.length>0,i=(0,w.phone)(s.phone),n=i.isValid,l={...r&&{email:s.email_or_username},...o&&{username:s.email_or_username},...n&&{phone:i.phoneNumber},redirect_url:e??d?.defaults?.redirect};if(await M(l)){const e=new URLSearchParams(C.read()),s=g.default.stringify({...Object.fromEntries(e.entries()),...l});v({to:t,search:s})}},children:"Send reset instructions"}),(0,p.jsxs)("p",{className:"passflow-remember-password",children:["Remember your password?"," ",(0,p.jsx)(Es,{to:s??Ve.signin.path,className:"passflow-link",children:"Sign In"})," "]})]})]})]})},ta=d.object().shape({identity:d.string().oneOf(["email","phone"]).required(),identityValue:d.string().required(),redirectUrl:d.string().required()}),aa=()=>{const{currentStyles:e,loginAppTheme:s}=qe(),{fetch:t}=os(),{get:a}=ne(),r={identity:a("email")?"email":a("phone")?"phone":null,identityValue:a("email")?a("email"):a("phone")?a("phone"):null,redirectUrl:a("redirect_url")};try{ta.validateSync(r,{abortEarly:!1})}catch(o){throw console.error("[passflow] invalid password-reset confirmation link",o),new Error(k)}return(0,p.jsx)(Hs,{title:`Check your ${r.identity}`,className:"passflow-forgot-password-success-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsxs)("div",{className:"passflow-forgot-password-success-container",children:[(0,p.jsxs)("p",{className:"passflow-forgot-password-success-text",children:["We sent a link to ","phone"===r.identity?"phone number":"email address"," ",(0,p.jsx)("strong",{className:"passflow-forgot-password-success-text--strong",children:r.identityValue}),". Click the link to reset your password."]}),(0,p.jsxs)(ue,{size:"big",variant:"secondary",type:"button",className:"passflow-button-resend-reset-password",onClick:async()=>{const e={..."email"===r.identity?{email:r.identityValue}:void 0,..."phone"===r.identity?{phone:r.identityValue}:void 0,redirect_url:r.redirectUrl};await t(e)},children:["Resend ","email"===r.identity?"email":"SMS"]})]})})},ra=({error:e="Something went wrong",goBackRedirectTo:s})=>{const{navigate:t}=ls(),{currentStyles:a,loginAppTheme:r}=qe();return(0,p.jsx)(qs,{chrome:{title:"",customCss:a?.custom_css,customLogo:a?.logo_url,customLogoAlt:`${r?.application_name??"Application"} logo`,removeBranding:r?.remove_passflow_logo},state:{kind:"general-error",message:e,onAction:()=>{le(s)?window.location.href=s:t({to:s})}}})},oa=e=>e instanceof Error?e.message:String(e),ia=["verify-challenge-otp","password/reset","two-factor-verify","two-factor-recovery"],na=(e,s)=>t=>{const a=(0,l.useContext)(Ye),{successAuthRedirect:r}=t,{pathname:o}=window.location;return ia.some(e=>o.includes(e))?(0,p.jsx)(v.ErrorBoundary,{FallbackComponent:({error:e})=>(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:oa(e)}),children:(0,p.jsx)(e,{...t})}):a?.state.isDiscoveringAppId?null:a?.state.appId?(0,p.jsx)(v.ErrorBoundary,{FallbackComponent:({error:e})=>(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:oa(e)}),children:(0,p.jsx)(e,{...t})}):(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:"Missing appId"})},la=na(({signInPath:e=Ve.signin.path,signUpPath:s=Ve.signup.path,successAuthRedirect:t})=>{const{appSettings:a,currentStyles:r,loginAppTheme:o}=qe(),{navigate:i}=ls(),c=oe(),{get:d}=ne(),u=Ae(),{fetch:h,isLoading:m,error:f,isError:g}=is(),w=d("invite_token"),x=w?B(n.parseToken)(w):void 0,y=u.getParsedTokens(),v=Boolean(y?.access_token);if((0,l.useEffect)(()=>{x&&!v&&i({to:e,search:c.read()})},[v,x,i,c,e]),!x)throw console.error("[passflow] invitation token could not be parsed"),new Error("This invitation link is invalid or has expired.");if(!v)return null;const{inviter_name:C,tenant_name:b,redirect_url:k}=x;return(0,p.jsx)(qs,{chrome:{title:`You've been invited to join ${b}.`,subtitle:"Review the invitation before continuing.",customCss:r?.custom_css,customLogo:r?.logo_url,customLogoAlt:`${o?.application_name??"Application"} logo`,removeBranding:o?.remove_passflow_logo},state:{kind:"invitation",identity:y?.id_token?.email,inviterName:C||void 0,busy:m,error:g?f:null,testId:"invitation-join",acceptTestId:"invitation-accept",onAccept:()=>{(async()=>{if(!w)return;if(!(await h(w)))return;const e=k??t??a?.defaults?.redirect??"";le(e)?window.location.href=await G(u,e):i({to:e})})()},onSwitchAccount:()=>i({to:e,search:c.read()}),onCreateAccount:()=>i({to:s,search:c.read()})}})},ra),ca={password:""},da=d.object().shape({token:d.string().required()}),pa=({successAuthRedirect:e,twoFactorVerifyPath:s=Ve.two_factor_verify.path})=>{const{getValues:t,control:a,register:r,trigger:o,formState:{errors:i,isDirty:l,isValid:c},clearErrors:d,setError:u}=(0,x.useForm)({defaultValues:ca}),h=Ae(),{appSettings:m}=qe(),{fetch:f,error:g,isError:w,isLoading:y}=fs(),{navigate:v}=ls(),{get:C}=ne(),{passwordPolicy:b,currentStyles:k,isError:j,error:M,loginAppTheme:S}=qe();if(j)throw new Error(M);const E={token:C("token")};try{da.validateSync(E,{abortEarly:!1})}catch(L){throw new Error("Invalid reset token.")}const{token:N}=E,_=N?B(n.parseToken)(N):void 0;return(0,p.jsxs)(Hs,{title:"Reset password",subtitle:"Let’s get you back in.",className:"passflow-reset-password-wrapper",customCss:k?.custom_css,customLogo:k?.logo_url,removeBranding:S?.remove_passflow_logo,children:[(0,p.jsx)("span",{className:"passflow-reset-password-text",children:"Enter your new password below."}),(0,p.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(async()=>{const a=t(),r=_,o=await f(a.password);o&&Z(h,v,s)||o&&(le(r?.redirect_url??e??m?.defaults?.redirect)?window.location.href=await G(h,r?.redirect_url??e??m?.defaults?.redirect):v({to:r?.redirect_url??e??m?.defaults?.redirect}))})()},className:"passflow-form passflow-reset-password-form",children:[(0,p.jsx)("div",{className:"passflow-form-container",children:(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"password",className:U("passflow-field-label",{"passflow-field-label--error":w}),children:"New password"})}),(0,p.jsx)(x.Controller,{name:"password",control:a,rules:{required:"Password is required",validate:e=>{try{return de(b).validateSync(e),d("password"),!0}catch(L){const s=L;return u("password",{type:"manual",message:s.errors.join(", ")}),s.errors.join(", ")}}},render:({field:e})=>(0,p.jsx)(Ie,{...e,...r("password"),isError:w,passwordPolicy:b,validationErrors:Object.hasOwn(i,"password")&&i.password?.message?i.password.message.split(", "):void 0,id:"password",name:"password",withMessages:!0,onChange:s=>{e.onChange(s),(async()=>{await o(["password"])})()}})}),w&&(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:g})]})]})}),(0,p.jsx)(ue,{size:"big",variant:"primary",type:"submit",disabled:!l||!c||y,className:"passflow-button-reset-password",children:"Save new password"})]})]})},ua=({successAuthRedirect:e,relyingPartyId:s=window.location.hostname,signUpPath:t=Ve.signup.path,verifyOTPPath:a=Ve.verify_otp.path,verifyMagicLinkPath:r=Ve.verify_magic_link.path,forgotPasswordPath:o=Ve.forgot_password.path,twoFactorVerifyPath:i=Ve.two_factor_verify.path})=>{const n=Ae(),{navigate:c}=ls(),d=oe(),{appSettings:u,scopes:h,createTenantForNewUser:m,passwordPolicy:f,currentStyles:x,isError:y,error:v,loginAppTheme:C}=qe(),{federatedWithRedirect:k}=us(e,m);if(y)throw new Error(v);const j=(0,l.useMemo)(()=>Y(u?.auth_strategies),[u]),M=(0,l.useMemo)(()=>(e=>{const s=[];if(e.hasSignInEmailMethods||e.hasSignInUsernameMethods){const t=z(e,"label")??"Email or username";s.push({id:"email_or_username",label:t,selectLabel:z(e,"button")??"Use email",requiredMessage:`${t} is required`,format:e.hasSignInEmailMethods&&!e.hasSignInUsernameMethods?"email":void 0,password:e.internal.email.password||e.internal.username.password,passwordlessLabel:V(e,"email_or_username")?.label})}return e.hasSignInPhoneMethods&&s.push({id:"phone",label:"Phone number",selectLabel:"Use phone",requiredMessage:"Phone number is required",password:e.internal.phone.password,passwordlessLabel:V(e,"phone")?.label}),{identities:s,passkey:e.passkey,providers:e.fim.providers}})(j),[j]),{error:S,message:E}=D();if(S)throw console.error("[passflow] sign-in redirect returned an error",{error:S,message:E}),new Error(b);const{get:N}=ne({invite_token:""}),_=N("invite_token"),L=H(_,"sign-in"),{fetch:I,isError:A,error:P,reset:F,isLoading:T}=gs(),R=async()=>{if(Z(n,c,i??Ve.two_factor_verify.path))return;if(Jt()||(Ht()&&console.error("[passflow] login took the legacy token path while parent_challenge_id is present on the URL — the OIDC interceptor did not engage and the RP redirect will not happen"),0))return;const s=e??u?.defaults?.redirect??"";le(s)?window.location.href=await G(n,s):c({to:s})},U=async e=>{const s=Boolean(e.emailOrUsername.match(ce)),t="email_or_username"===e.method&&!s&&e.emailOrUsername.length>0,a=(0,w.phone)(e.phone),r={...s&&{email:e.emailOrUsername},...t&&{username:e.emailOrUsername},...a.isValid&&{phone:a.phoneNumber},scopes:h,password:e.password};await(async e=>{const s={...e,..._&&{invite_token:_}};await I(s,"password")&&await R()})(r)},B=async s=>{const t=Boolean(s.emailOrUsername.match(ce)),o=(0,w.phone)(s.phone),i={...t&&{email:s.emailOrUsername},...o.isValid&&{phone:o.phoneNumber},scopes:h};await(async(s,t)=>{const o=V(j,t)?.challengeType,i={...s,challenge_type:o,create_tenant:m,redirect_url:e??u?.defaults?.redirect,..._&&{invite_token:_}},n=await I(i,"passwordless");if(!n)return;const l=n,p=new URLSearchParams(d.read()),h=g.default.stringify({...Object.fromEntries(p.entries()),...i,...l,type:"passwordless",challenge_type:o,create_tenant:m});"otp"===o&&c({to:a??Ve.verify_otp.path,search:h}),"magic_link"===o&&c({to:r??Ve.verify_magic_link.path,search:h})})(i,s.method)},O=async()=>{await(async e=>{const s={...e,..._&&{invite_token:_}};await I(s,"passkey")&&await R()})({relying_party_id:s,scopes:h})};return(0,p.jsx)(qs,{chrome:{title:L?.title??"Sign In to your account",subtitle:L?.subtitle??"To Passflow by Madappgang",variant:"sign-in",customCss:x?.custom_css,customLogo:x?.logo_url,customLogoAlt:`${C?.application_name??"Application"} logo`,removeBranding:C?.remove_passflow_logo},state:{kind:"credentials",methods:M,passwordPolicy:f,forcePasskey:Boolean(u?.force_passwordless_login&&j.passkey),allowPasskeyToggle:!0,busy:T,primaryLabel:T?"Signing in…":"Sign In",error:A?P:null,forgotPassword:{to:o??Ve.forgot_password.path,getSearch:e=>g.default.stringify({...g.default.parse(d.read()),default_method:e})},footer:{prompt:"Don't have an account?",label:"Sign Up",to:t??Ve.signup.path,search:d.read()},onPassword:e=>{U(e)},onPasswordless:e=>{B(e)},onPasskey:()=>{O()},onProvider:e=>k(e,_??void 0),onReset:F}})},ha=na(ua,ra),ma=({successAuthRedirect:e,relyingPartyId:s=window.location.hostname,signInPath:t=Ve.signin.path,verifyOTPPath:a=Ve.verify_otp.path,verifyMagicLinkPath:r=Ve.verify_magic_link.path,twoFactorVerifyPath:o=Ve.two_factor_verify.path})=>{const i=Ae(),{navigate:n}=ls(),c=oe(),{appSettings:d,scopes:u,createTenantForNewUser:h,passwordPolicy:m,currentStyles:f,isError:x,error:y,loginAppTheme:v}=qe(),{federatedWithRedirect:C}=us(e,h);if(x)throw new Error(y);const k=(0,l.useMemo)(()=>Y(d?.auth_strategies),[d]),j=(0,l.useMemo)(()=>(e=>{const s=[];if(e.hasEmailMethods||e.hasUsernameMethods){const t=e.hasEmailMethods&&e.hasUsernameMethods?"Email or username":e.hasUsernameMethods?"Username":"Email";s.push({id:"email_or_username",label:t,selectLabel:e.hasUsernameMethods&&!e.hasEmailMethods?"Use username":"Use email",requiredMessage:`${t} is required`,format:e.hasEmailMethods&&!e.hasUsernameMethods?"email":void 0,password:e.internal.email.password||e.internal.username.password,passwordlessLabel:V(e,"email_or_username")?.label})}return e.hasPhoneMethods&&s.push({id:"phone",label:"Phone number",selectLabel:"Use phone",requiredMessage:"Phone number is required",password:e.internal.phone.password,passwordlessLabel:V(e,"phone")?.label}),{identities:s,passkey:e.passkey,providers:e.fim.providers}})(k),[k]),{error:M,message:S}=D();if(M)throw console.error("[passflow] sign-up redirect returned an error",{error:M,message:S}),new Error(b);const{get:E}=ne({invite_token:""}),N=E("invite_token"),_=H(N,"sign-up"),{fetch:L,isError:I,error:A,reset:P,isLoading:F}=ws(),T=async({oidcMayOwnRedirect:s=!1}={})=>{if(Z(i,n,o??Ve.two_factor_verify.path))return;if(s&&Jt())return;const t=e??d?.defaults?.redirect??"";le(t)?window.location.href=await G(i,t):n({to:t})},R=async e=>{const s=Boolean(e.emailOrUsername.match(ce)),t="email_or_username"===e.method&&!s&&e.emailOrUsername.length>0,a=(0,w.phone)(e.phone),r={...s?{email:e.emailOrUsername}:{},...t?{username:e.emailOrUsername}:{},...a.isValid?{phone_number:a.phoneNumber}:{},password:e.password,scopes:u};await(async e=>{const s={user:e,create_tenant:h,...N?{invite_token:N}:{}};await L(s,"password")&&await T({oidcMayOwnRedirect:!0})})(r)},U=async s=>{const t=Boolean(s.emailOrUsername.match(ce)),o=(0,w.phone)(s.phone),i={...t?{email:s.emailOrUsername}:{},...o.isValid?{phone:o.phoneNumber}:{},scopes:u};await(async(s,t)=>{const o=V(k,t)?.challengeType,i={...s,challenge_type:o,create_tenant:h,redirect_url:e??d?.defaults?.redirect,...N?{invite_token:N}:{}},l=await L(i,"passwordless");if(!l)return;const p=l,u=new URLSearchParams(c.read()),m=g.default.stringify({...Object.fromEntries(u.entries()),...i,...p,type:"passwordless",challenge_type:o,create_tenant:h});"otp"===o&&n({to:a??Ve.verify_otp.path,search:m}),"magic_link"===o&&n({to:r??Ve.verify_magic_link.path,search:m})})(i,s.method)};return(0,p.jsx)(qs,{chrome:{title:_?.title??"Create your account",subtitle:_?.subtitle??"For Passflow by Madappgang",variant:"sign-in",customCss:f?.custom_css,customLogo:f?.logo_url,customLogoAlt:`${v?.application_name??"Application"} logo`,removeBranding:v?.remove_passflow_logo},state:{kind:"credentials",methods:j,passwordPolicy:m,credentialPurpose:"sign-up",forcePasskey:Boolean(d?.force_passwordless_login&&k.passkey),allowPasskeyToggle:!0,busy:F,primaryLabel:F?"Creating account…":"Sign Up",passwordlessLabelPrefix:"Sign Up with",passkeyLabel:"Sign Up with a Passkey",error:I?A:null,footer:{prompt:"Already have an account?",label:"Sign In",to:t??Ve.signin.path,search:c.read()},onPassword:e=>{R(e)},onPasswordless:e=>{U(e)},onPasskey:()=>{(async()=>{const t={relying_party_id:s,create_tenant:h,redirect_url:e??d?.defaults?.redirect??"",...N?{invite_token:N}:{},scopes:u};await L(t,"passkey")&&await T({oidcMayOwnRedirect:!0})})()},onProvider:e=>C(e,N??void 0),onReset:P}})},fa=na(ma,ra),ga={email:"email address",phone:"phone number"},wa=()=>{const{currentStyles:e,loginAppTheme:s}=qe(),{fetch:t}=gs(),{get:a}=ne({identity:"",identity_value:"",challenge_type:"",type:"",redirect_url:""}),r=a("email")?"email":a("phone")?"phone":void 0,o=a("email")?a("email"):a("phone")?a("phone"):void 0,i=a("challenge_type"),n=a("type"),l=a("redirect_url");return(0,p.jsx)(Hs,{title:"Check your email",className:"passflow-verify-challenge-magic-link-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsxs)("div",{className:"passflow-verify-challenge-magic-link-container",children:[(0,p.jsxs)("p",{className:"passflow-verify-challenge-magic-link-text",children:["We sent a link to ",ga[r]," ",o&&(0,p.jsx)("strong",{className:"passflow-verify-challenge-magic-link-text--strong",children:o}),". Click on the link to confirm your registration."]}),"passwordless"===n&&(0,p.jsx)(ue,{size:"big",variant:"secondary",type:"button",className:"passflow-button-resend-magic-link",onClick:async()=>{const e={..."email"===r?{email:o}:void 0,..."phone"===r?{phone:o}:void 0,challenge_type:i,redirect_url:l};await t(e,n)},children:"Resend email"})]})})},xa=({totalSecond:e,onClick:s,className:t="",...a})=>{const[r,o]=(0,l.useState)(e);(0,l.useEffect)(()=>{const e=setInterval(()=>{r>0&&o(e=>e-1)},1e3);return()=>{clearInterval(e)}},[r]);return(0,p.jsxs)(ue,{disabled:r>0,size:"small",variant:"clean",type:"button",className:U("passflow-button-timer",{"passflow-button-timer--active":r>0,"passflow-button-timer--inactive":0===r},t),onClick:()=>{s(),o(e)},...a,children:["Resend ",r>0?`(${r})`:""]})},ya=()=>{const{currentStyles:e,loginAppTheme:s}=qe();return(0,p.jsx)(Hs,{iconId:"logo",className:"passflow-verify-challenge-success-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsx)("div",{className:"passflow-verify-challenge-success-wrapper",children:(0,p.jsxs)("div",{className:"passflow-verify-challenge-success-container",children:[(0,p.jsx)("p",{className:"passflow-verify-challenge-success-text",children:"Successful verification!"}),(0,p.jsx)("p",{className:"passflow-verify-challenge-success-text-secondary",children:"But there is no redirect URL for further redirect."})]})})})},va={email:"email address",phone:"phone number"},Ca=({identity:e,identityValue:s,challengeType:t,challengeId:a,type:r,numInputs:o,shouldAutoFocus:i,successAuthRedirect:n,signUpPath:c,twoFactorVerifyPath:d=Ve.two_factor_verify.path})=>{const u=Ae(),{appSettings:h,createTenantForNewUser:m,currentStyles:f,loginAppTheme:g}=qe(),{navigate:w}=ls(),{fetch:x}=gs(),{fetch:y,isError:v,error:C}=ds(),[b,k]=(0,l.useState)(""),[j,M]=(0,l.useState)(null),[S,E]=(0,l.useState)(!1),{set:N}=ne(),_=(0,l.useId)(),L=`${_}-error`;if((0,l.useEffect)(()=>{if(b.length===o&&a){const e={challenge_id:a,challenge_type:"otp",otp:b};(async()=>{const s=await y(e);if(s){if(Z(u,w,d))return;s.redirect_url?le(s.redirect_url)?window.location.href=await G(u,s.redirect_url):w({to:s.redirect_url}):E(!0)}})()}},[b,o,y,a,w,u,d]),j)throw new Error(j);if(S)return(0,p.jsx)(ya,{});return(0,p.jsxs)(Hs,{title:`Verify your ${e}`,subtitle:`We sent OTP code to your ${va[e]}`,className:"passflow-verify-otp",customCss:f?.custom_css,customLogo:f?.logo_url,removeBranding:g?.remove_passflow_logo,children:[(0,p.jsxs)("div",{className:"passflow-verify-otp-container",children:[s&&(0,p.jsxs)(ue,{size:"big",type:"button",variant:"outlined",className:"passflow-verify-otp-button",withIcon:!0,onClick:()=>w({to:c}),children:[(0,p.jsx)(Ss,{id:"email"===e?"mail":"phone",type:"general",size:"small"}),s,(0,p.jsx)(Ss,{id:"edit",type:"general",size:"small",className:"passflow-verify-otp-button-icon"})]}),(0,p.jsxs)("div",{id:"otp-wrapper",className:"passflow-verify-otp-wrapper",children:[(0,p.jsx)(_e,{id:_,name:"otp",length:o,value:b,onChange:e=>k(e),state:v?"error":"default",label:"Verification code",describedBy:v?L:void 0,autoFocus:i}),v&&(0,p.jsxs)("div",{className:"passflow-verify-otp-error",children:[(0,p.jsx)(Ss,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:L,className:"passflow-verify-otp-error-text",children:C})]})]})]}),"passwordless"===r&&(0,p.jsxs)("p",{className:"passflow-verify-otp-resend",children:["Don't receive a code?",(0,p.jsx)(xa,{totalSecond:30,onClick:()=>{(async()=>{if(r&&e&&s&&t){const a={create_tenant:m,challenge_type:t,redirect_url:n??h?.defaults?.redirect??"",..."email"===e?{email:s}:{phone:s}},o=await x(a,r);o?N({challenge_id:o.challenge_id}):M("Something went wrong. Please try again later.")}})()}})]})]})},ba=({otp:e,challengeId:s,appId:t,twoFactorVerifyPath:a=Ve.two_factor_verify.path})=>{const r=Ae(),{navigate:o}=ls(),[i,n]=(0,l.useState)(null),[c,d]=(0,l.useState)(!1),{fetch:u,isError:h,error:m,isLoading:f}=ds();if((0,l.useEffect)(()=>{(async()=>{if(!t||!e||!s){const a=[!t&&"app_id",!e&&"otp",!s&&"challenge_id"].filter(Boolean);return console.error("[passflow] passwordless verification redirect is missing required parameters",a),void n(k)}if(!f){const t=await u({otp:e,challenge_id:s});if(t){if(Z(r,o,a))return;t.redirect_url?le(t.redirect_url)?window.location.href=await G(r,t.redirect_url):o({to:t.redirect_url}):d(!0)}else n(j)}})()},[]),h&&m)throw new Error(m);if(i)throw new Error(i);return c?(0,p.jsx)(ya,{}):null},ka=d.object().shape({appId:d.string().required(),challengeId:d.string().required(),otp:d.string().required()}),ja=d.object().shape({challengeId:d.string().required(),identity:d.string().oneOf(["email","phone"]).required(),identityValue:d.string().required(),challengeType:d.string().required(),type:d.string().oneOf(["passwordless","passkey"]).optional()}),Ma=({successAuthRedirect:e,numInputs:s,shouldAutoFocus:t,signUpPath:a,twoFactorVerifyPath:r=Ve.two_factor_verify.path})=>{const{get:o}=ne({otp:"",app_id:"",challenge_id:"",identity:"",identity_value:"",challenge_type:"",type:""}),i=o("type");if("passwordless"!==i&&"passkey"!==i){const e={appId:o("app_id"),challengeId:o("challenge_id"),otp:o("otp")};try{ka.validateSync(e,{abortEarly:!1})}catch(m){throw console.error("[passflow] invalid passwordless verification redirect",m),new Error(k)}const{appId:s,otp:t,challengeId:a}=e;return(0,p.jsx)(ba,{appId:s,challengeId:a,otp:t,twoFactorVerifyPath:r})}const n={challengeId:o("challenge_id"),identity:o("email")?"email":o("phone")?"phone":null,identityValue:o("email")?o("email"):o("phone")?o("phone"):null,challengeType:o("challenge_type"),type:o("type")};try{ja.validateSync(n,{abortEarly:!1})}catch(m){throw console.error("[passflow] invalid passwordless verification link",m),new Error(k)}const{challengeId:l,identity:c,identityValue:d,challengeType:u,type:h}=n;if(!h)throw console.error("[passflow] passwordless verification link is missing its flow type"),new Error(k);return(0,p.jsx)(Ca,{identity:c,identityValue:d,challengeType:u,challengeId:l,type:h,numInputs:s,shouldAutoFocus:t,signUpPath:a,successAuthRedirect:e,twoFactorVerifyPath:r})},Sa=["signin","signup","verify_otp","verify_magic_link","forgot_password","forgot_password_success","reset_password","invitation","two_factor_verify","two_factor_setup","two_factor_setup_magic_link"],Ea=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Na=e=>e.split("/").map(e=>e.startsWith(":")?"([^/]+)":Ea(e)).join("/"),_a=e=>e.split("/").filter(e=>e.startsWith(":")).map(e=>e.slice(1)),La=[...Sa].sort((e,s)=>Ve[s].path.length-Ve[e].path.length),Ia=e=>{try{return decodeURIComponent(e)}catch{return e}},Aa=e=>{const s=(e??"").replace(/^\/+|\/+$/g,"");return s?`/${s}`:""},Pa=e=>e.length>1?e.replace(/\/+$/,""):e,Fa=(e,s,t={})=>`${s}${Ve[e].path.replace(/:(\w+)/g,(e,s)=>encodeURIComponent(t[s]??""))}`,Ta=e=>e&&!e.startsWith("?")?`?${e}`:e,Ra=e=>{let s=null;return()=>{const t=e();return s&&s.pathname===t.pathname&&s.search===t.search||(s=t),s}},Ua=e=>s=>{for(const t of e)window.addEventListener(t,s);return()=>{for(const t of e)window.removeEventListener(t,s)}},Ya=()=>window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state})),za=()=>{const e=window.location.hash.replace(/^#/,"")||"/",s=e.indexOf("?"),t=s>=0?e.slice(0,s):e;return{pathname:t.startsWith("/")?t:`/${t}`,search:s>=0?e.slice(s):""}},Va=e=>"hash"===e?{read:Ra(za),subscribe:Ua(["popstate","hashchange"]),navigate:({pathname:e,search:s},{replace:t})=>{const a=`${window.location.pathname}${window.location.search}#${e}${Ta(s)}`;t?window.history.replaceState(window.history.state,"",a):window.history.pushState(window.history.state,"",a),Ya()}}:"memory"===e?((e={pathname:"/",search:""})=>{const s=[e],t=new Set;return{read:()=>s[s.length-1],subscribe:e=>(t.add(e),()=>t.delete(e)),navigate:({pathname:e,search:a},{replace:r})=>{const o={pathname:e,search:Ta(a)};r?s[s.length-1]=o:s.push(o);for(const s of t)s()}}})():{read:Ra(()=>({pathname:window.location.pathname,search:window.location.search})),subscribe:Ua(["popstate"]),navigate:({pathname:e,search:s},{replace:t})=>{const a=`${e}${Ta(s)}`;t?window.history.replaceState(window.history.state,"",a):window.history.pushState(window.history.state,"",a),Ya()}},Da=({successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:t,pathPrefix:a,location:r,navigate:o})=>{const[i]=(0,l.useState)(()=>(e=>{const s=Pa(e);for(const t of La){const e=new RegExp(`^(.*?)${Na(Ve[t].path)}$`).exec(s);if(e)return Aa(e[1])}return Aa(s)})(r.pathname)),n=void 0===a?i:Aa(a),c=(0,l.useMemo)(()=>Object.fromEntries(Sa.map(e=>[e,Fa(e,n)])),[n]),d=(0,l.useRef)(o);d.current=o;const{setNavigate:u}=(0,l.useContext)(Re);(0,l.useEffect)(()=>{u(({to:e,search:s="",replace:t=!1})=>{const a=e.indexOf("?"),r=a>=0?e.slice(0,a):e,o=s||(a>=0?e.slice(a):"");d.current({pathname:r,search:Ta(o)},{replace:t})})},[u]);const{setTwoFactorVerifyPath:h}=ls();(0,l.useEffect)(()=>(h?.(c.two_factor_verify),()=>h?.(null)),[h,c.two_factor_verify]);const m=((e,s)=>{const t=Pa(e);for(const a of La){const e=Ve[a].path,r=new RegExp(`^${Ea(s)}${Na(e)}$`).exec(t);if(r){const s=_a(e);return{screen:a,params:Object.fromEntries(s.map((e,s)=>[e,Ia(r[s+1]??"")]))}}}return null})(r.pathname,n),f=!m&&((e,s)=>""===s||e===s||e.startsWith(`${s}/`))(r.pathname,n);(0,l.useEffect)(()=>{f&&d.current({pathname:c.signin,search:r.search},{replace:!0})},[f,c.signin,r.search]);const g=(0,l.useRef)(r.pathname);g.current=r.pathname;const w=(0,l.useMemo)(()=>({read:()=>r.search,write:(e,{replace:s})=>queueMicrotask(()=>d.current({pathname:g.current,search:e},{replace:s}))}),[r.search]);return m?(0,p.jsx)(re.Provider,{value:w,children:(0,p.jsx)(Ga,{match:m,paths:c,successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:t})}):null},Ga=({match:e,paths:s,successAuthRedirect:t,federatedDisplayMode:a,relyingPartyId:r})=>{switch(e.screen){case"signin":return(0,p.jsx)(ha,{successAuthRedirect:t,relyingPartyId:r,federatedDisplayMode:a,signUpPath:s.signup,forgotPasswordPath:s.forgot_password,verifyMagicLinkPath:s.verify_magic_link,verifyOTPPath:s.verify_otp,twoFactorVerifyPath:s.two_factor_verify});case"signup":return(0,p.jsx)(fa,{successAuthRedirect:t,relyingPartyId:r,federatedDisplayMode:a,signInPath:s.signin,verifyMagicLinkPath:s.verify_magic_link,verifyOTPPath:s.verify_otp,twoFactorVerifyPath:s.two_factor_verify});case"verify_otp":return(0,p.jsx)(Ma,{successAuthRedirect:t,numInputs:6,shouldAutoFocus:!0,signUpPath:s.signup,twoFactorVerifyPath:s.two_factor_verify});case"verify_magic_link":return(0,p.jsx)(wa,{});case"forgot_password":return(0,p.jsx)(sa,{successResetRedirect:t,signInPath:s.signin,forgotPasswordSuccessPath:s.forgot_password_success});case"forgot_password_success":return(0,p.jsx)(aa,{});case"reset_password":return(0,p.jsx)(pa,{successAuthRedirect:t,twoFactorVerifyPath:s.two_factor_verify});case"invitation":return(0,p.jsx)(la,{successAuthRedirect:t,signInPath:s.signin,signUpPath:s.signup});case"two_factor_verify":return(0,p.jsx)(Xt,{successAuthRedirect:t,signInPath:s.signin,twoFactorSetupPath:s.two_factor_setup});case"two_factor_setup":return(0,p.jsx)(Et,{successAuthRedirect:t,twoFactorVerifyPath:s.two_factor_verify,signInPath:s.signin});case"two_factor_setup_magic_link":return(0,p.jsx)(_t,{token:e.params.token??"",signInPath:s.signin})}},Ba=na(({successAuthRedirect:e,federatedDisplayMode:s="redirect",error:t,relyingPartyId:a=window.location.hostname,pathPrefix:r,routerType:o="browser",location:i,navigate:n})=>{const{error:c,message:d}=D(e),{location:u,navigate:h}=((e,s,t)=>{const a=(0,l.useMemo)(()=>Va(e),[e]),r=(0,l.useSyncExternalStore)(a.subscribe,a.read);return s&&t?{location:{pathname:s.pathname,search:Ta(s.search??"")},navigate:t}:{location:r,navigate:a.navigate}})(o,i,n);if(c)throw console.error("[passflow] authentication redirect returned an error",{error:c,message:d}),new Error(b);if(t)throw new Error(t);return(0,p.jsx)(Da,{successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:a,pathPrefix:r,location:u,navigate:h})},ra);exports.Button=ue,exports.ConsentFlow=()=>{const e=(e=>{if("loading"===e.status)return null;if("invalid"===e.status)return{chrome:{title:e.error?.message??"Consent request unavailable"},state:{kind:"general-error",message:e.error?.message,detail:e.error?.description,actionLabel:"Back to login",testId:"consent-invalid",onAction:()=>{window.location.href="/web"}}};if("redirecting"===e.status)return{chrome:{title:"Taking you back",subtitle:`Returning you to ${e.info?.app_name||"the application"}.`},state:{kind:"status",tone:"success",message:"Decision recorded",detail:"You can close this page if it does not continue on its own.",testId:"consent-redirecting"}};const s=e.info;if(!s)return null;const t=s.app_name||s.client_id,a="working"===e.status;return{chrome:{title:`Allow ${t} to access your account?`,subtitle:"Choose what this application may use, then allow or deny.",customLogo:s.app_logo_url||void 0,customLogoAlt:`${t} logo`},state:{kind:"consent",appName:t,scopes:s.requested_scopes.map(s=>{const t=e.scopeMetadata(s);return{scope:s,label:t.label||s,description:t.description||void 0,granted:e.grantedScopes.includes(s)}}),busy:a,error:e.error?.message,allowLabel:"Allow",denyLabel:"Deny",busyLabel:"Submitting…",testId:"consent-screen",allowTestId:"consent-allow",denyTestId:"consent-deny",appNameTestId:"consent-app-name",onToggleScope:e.toggleScope,onAllow:()=>{e.allow()},onDeny:()=>{e.deny()}}}})(Ke());return e?(0,p.jsx)(qs,{...e}):null},exports.ContinuingStatus=he,exports.CountryFlag=ge,exports.DEFAULT_FACTOR_LABELS=at,exports.DeviceVerifyFlow=()=>{const e=rs(),s=(0,l.useRef)(null),{confirmWithPasskey:t}=e,a=e.info?.csrf_token??null,r="passkey"===e.info?.mode&&"ready"===e.status&&!e.error;(0,l.useEffect)(()=>{r&&a&&s.current!==a&&(s.current=a,t())},[a,t,r]);const o=Mt(e);return o?(0,p.jsx)(qs,{...o}):null},exports.Dialog=we,exports.DialogClose=ve,exports.DialogContent=be,exports.DialogDescription=Se,exports.DialogFooter=je,exports.DialogHeader=ke,exports.DialogOverlay=Ce,exports.DialogPortal=ye,exports.DialogTitle=Me,exports.DialogTrigger=xe,exports.FieldOtp=_e,exports.FieldPassword=Ie,exports.FieldPhone=ks,exports.FieldText=js,exports.ForgotPassword=sa,exports.ForgotPasswordSuccess=aa,exports.INERT_UPGRADE_CONTEXT=Be,exports.Icon=Ss,exports.InvitationJoin=la,exports.Link=Es,exports.LoginAlert=Ns,exports.LoginScreen=qs,exports.PassflowFlow=Ba,exports.PassflowProvider=({children:e,navigate:s,router:t="default",backend:a,upgrade:r,twoFactorVerifyPath:o,...i})=>{const c=!i.appId,[d,u]=(0,l.useReducer)(ze,{...Ue,...i,isDiscoveringAppId:c}),[h,m]=(0,l.useState)(()=>s||Te),[f]=(0,l.useState)(q),g=(0,l.useMemo)(()=>new n.Passflow(d),[d]);!function(e){const s=(0,l.useRef)(null);(0,l.useEffect)(()=>{const t=s.current;return t&&(t.instance===e&&clearTimeout(t.timer),s.current=null),()=>{const t=setTimeout(()=>e.dispose(),0);s.current={instance:e,timer:t}}},[e])}(g);const w=(0,l.useMemo)(()=>Ht()??Zt,[]);Wt(w);const{exchangeState:x,parentMeta:y}=Kt(w,g,i.url,d.appId),v=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(c&&!v.current&&d.isDiscoveringAppId){v.current=!0;(async()=>{const e=["/settings"];i.url&&e.push(`${i.url}/settings`);for(const t of e)try{const e=await fetch(t);if(e.ok){const s=await e.json(),t=s.login_app?.app_id||s.appId;if(t)return g.setAppId(t),void u({type:"SET_PASSFLOW_STATE",payload:{...d,appId:t,scopes:s.login_app?.scopes||s.scopes||d.scopes,createTenantForNewUser:s.login_app?.create_tenant_for_new_user??s.createTenantForNewUser??d.createTenantForNewUser,isDiscoveringAppId:!1}})}}catch(s){}console.warn("Failed to discover appId from /settings"),u({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})})()}},[c,d.isDiscoveringAppId,i.url,g,d]);const C=(0,l.useMemo)(()=>({state:d,dispatch:u,passflow:g}),[d,g]),b=(0,l.useCallback)(e=>{m(()=>e||Te)},[]),[k,j]=(0,l.useState)(null),M=k??o??Ve.two_factor_verify.path;((e,s,t,a)=>{const[r,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(s.isAuthenticated()||(s.isTwoFactorVerificationRequired()||s.handleTokensRedirect(),s.isTwoFactorVerificationRequired()&&o(!0)))},[]),(0,l.useEffect)(()=>{r&&(o(!1),t({to:a,replace:!0}))},[r,t,a])})(f,g,h,M);const S=(0,l.useMemo)(()=>({navigate:h,setNavigate:b,router:t,twoFactorVerifyPath:M,setTwoFactorVerifyPath:j}),[h,b,t,M]),E=(0,l.useMemo)(()=>({parentChallengeId:w,parentMeta:y,exchangeState:x}),[w,y,x]),N=!1!==r&&(void 0!==r||void 0!==a),_=(0,l.useMemo)(()=>"object"==typeof r&&null!==r?r:{},[r]);return(0,p.jsx)(Ye.Provider,{value:C,children:(0,p.jsx)(Re.Provider,{value:S,children:(0,p.jsx)(Qt.Provider,{value:E,children:(0,p.jsx)(Fe,{children:(0,p.jsx)(Bt,{..._,enabled:N,backend:a,children:"exchanging"===x?(0,p.jsx)(he,{appName:y?.app_name}):e})})})})})},exports.Popover=Js,exports.PopoverAnchor=Ks,exports.PopoverContent=Qs,exports.PopoverTrigger=Ws,exports.ProvidersBox=Rs,exports.ResetPassword=pa,exports.SignIn=ha,exports.SignInForm=ua,exports.SignUp=fa,exports.SignUpForm=ma,exports.Spinner=Xs,exports.Switch=Fs,exports.TwoFactorChallenge=Tt,exports.TwoFactorRecoveryForm=Rt,exports.TwoFactorSetupForm=St,exports.TwoFactorSetupMagicLinkFlow=_t,exports.TwoFactorVerifyForm=Yt,exports.UPGRADE_FACTOR_CODE_CONTRACTS=ot,exports.UpgradeChallengeView=tt,exports.UpgradeContext=De,exports.UpgradeDialog=kt,exports.UpgradeFactorList=$s,exports.UpgradeProvider=Bt,exports.UpgradeStatus=Ct,exports.VerifyChallengeMagicLink=wa,exports.VerifyChallengeOTP=Ma,exports.attachAuth=e=>te("attachAuth").attachAuth(e),exports.describeAssuranceBar=ht,exports.dialogOutcomeFromError=pt,exports.readAssuranceBar=ut,exports.toDialogFactors=it,exports.toDialogState=wt,exports.upgradeDialogDismissHandler=xt,exports.useAppSettings=qe,exports.useAuth=()=>{const e=(0,l.useContext)(Pe);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},exports.useAuthCloudRedirect=e=>{const s=Ae();return()=>s.authRedirect({url:e})},exports.useConsent=Ke,exports.useDeviceVerify=rs,exports.useForgotPassword=os,exports.useJoinInvite=is,exports.useLogout=()=>{const e=Ae(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async()=>{try{return i(!0),await e.logOut(),i(!1),!0}catch(s){return r(!0),t(s.message),!1}},[e]),isLoading:o,isError:a,error:s}},exports.useNavigation=ls,exports.useOutsideClick=cs,exports.usePassflow=Ae,exports.usePasswordlessComplete=ds,exports.useProvider=us,exports.useRefreshStatus=function(){const e=Ae(),[s,t]=(0,l.useState)(hs);return(0,l.useEffect)(()=>{const s={onAuthChange:(e,s)=>{if(e===n.PassflowEvent.RefreshFailing){const e=s;t({isFailing:!0,since:e?.since??null,nextRetryAt:e?.nextRetryAt??null})}else t(hs)}};return e.subscribe(s,ms),()=>{e.unsubscribe(s)}},[e]),s},exports.useResetPassword=fs,exports.useSessionExpired=function(e){const s=Ae(),[t,a]=(0,l.useState)(!1),[r,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{const t={onAuthChange:(s,t)=>{if(s===n.PassflowEvent.SessionExpired){const s=t?.reason??"refresh_failed";a(!0),o(s),e?.onSessionExpired?.(s)}else s!==n.PassflowEvent.SignIn&&s!==n.PassflowEvent.Register||(a(!1),o(null))}};return s.subscribe(t,[n.PassflowEvent.SessionExpired,n.PassflowEvent.SignIn,n.PassflowEvent.Register]),()=>{s.unsubscribe(t)}},[s,e?.onSessionExpired]),{isSessionExpired:t,expiredReason:r,resetSessionExpired:()=>{a(!1),o(null)}}},exports.useSignIn=gs,exports.useSignUp=ws,exports.useTrustedDevices=()=>{const e=Ae(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(""),d=(0,l.useCallback)(e=>{i(!0),c(e.message)},[]),p=(0,l.useCallback)(async()=>{r(!0),i(!1),c("");try{const s=await e.getTrustedDevices();return t(s),s}catch(s){return d(s),null}finally{r(!1)}},[e,d]),u=(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{return await e.revokeTrustedDevice(s),t(e=>e.filter(e=>e.id!==s)),!0}catch(a){return d(a),!1}finally{r(!1)}},[e,d]);return(0,l.useLayoutEffect)(()=>{p()},[p]),{data:s,refetch:p,revoke:u,isLoading:a,isError:o,errorMessage:n}},exports.useTwoFactorChallenge=xs,exports.useTwoFactorManage=()=>{const e=Ae(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)("");return{recoveryCodes:s,disable:(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{return await e.disableTwoFactor(s),!0}catch(t){return i(!0),c(t.message),!1}finally{r(!1)}},[e]),regenerateCodes:(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{const a=await e.regenerateTwoFactorRecoveryCodes(s);return t(a.recovery_codes),a}catch(a){return i(!0),c(a.message),null}finally{r(!1)}},[e]),reset:(0,l.useCallback)(()=>{t([]),i(!1),c("")},[]),isLoading:a,isError:o,error:n}},exports.useTwoFactorMethods=()=>{const e=Ae(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)([]),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(null),d=(0,l.useCallback)(async()=>{i(!0),c(null);try{const s=await e.twoFactor.getRegisteredMethods();r(s);const a=s.map(e=>e.method);t(a)}catch(s){c(s),r([]),t([])}finally{i(!1)}},[e]);return{availableMethods:s,registeredMethods:a,isLoading:o,error:n,refresh:d,removeMethod:(0,l.useCallback)(async s=>{i(!0),c(null);try{await(e.twoFactor.removeMethod?.(s)),await d()}catch(t){c(t)}finally{i(!1)}},[e,d])}},exports.useTwoFactorSetup=ys,exports.useTwoFactorSetupMagicLink=vs,exports.useTwoFactorStatus=()=>{const e=Ae(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(""),d=(0,l.useCallback)(async()=>{r(!0),i(!1),c("");try{const s=await e.getTwoFactorStatus();return t(s),s}catch(s){return i(!0),c(s.message),null}finally{r(!1)}},[e]);return(0,l.useLayoutEffect)(()=>{d()},[d]),{data:s,refetch:d,isLoading:a,isError:o,errorMessage:n}},exports.useTwoFactorVerify=Cs,exports.useUpgrade=()=>{const{enabled:e,state:s,prompt:t,selectedFactor:a,selectFactor:r,submit:o,cancel:i,dismiss:n,elevate:c}=(0,l.useContext)(De)??Be;return(0,l.useMemo)(()=>{const l=(e=>null===e?bs:e.factors)(t);return{enabled:e,state:s,status:s.status,challenge:"challenged"===s.status?s.challenge:t?.challenge??null,factors:l,factorTypes:"challenged"===s.status?s.factors:l.map(e=>e.type),selectedFactor:a,insufficient:"insufficient"===s.status?{obtained:s.obtained,required:s.required}:null,error:"error"===s.status?s.error:null,errorKind:"error"===s.status?s.kind:null,previousError:t?.previousError??null,busy:"submitting"===s.status,selectFactor:r,submit:o,cancel:i,dismiss:n,elevate:c}},[e,s,t,a,r,o,i,n,c])},exports.useUserPasskeys=()=>{const e=Ae(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(""),[n,c]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{(async()=>{c(!0);try{const s=await e.getUserPasskeys();t(s)}catch(s){r(!0),i(s.message)}finally{c(!1)}})()},[e]);return{data:s,createUserPasskey:async(s,t,a)=>{c(!0);try{await e.addUserPasskey({relyingPartyId:s,passkeyUsername:t,passkeyDisplayName:a})}catch(o){r(!0),i(o.message)}finally{c(!1)}},editUserPasskey:async(s,a)=>{c(!0);try{if(await e.renameUserPasskey(s,a)){const s=await e.getUserPasskeys();t(s)}}catch(o){r(!0),i(o.message)}finally{c(!1)}},deleteUserPasskey:async s=>{c(!0);try{if(await e.deleteUserPasskey(s)){const s=await e.getUserPasskeys();t(s)}}catch(a){r(!0),i(a.message)}finally{c(!1)}},isLoading:n,isError:a,errorMessage:o}},exports.withAuth=e=>te("withAuth").withAuth(e),Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=Object.create,s=Object.defineProperty,t=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,i=(i,n,l)=>(l=null!=i?e(r(i)):{},((e,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(var l,c=a(r),d=0,p=c.length;d<p;d++)l=c[d],o.call(e,l)||l===i||s(e,l,{get:(e=>r[e]).bind(null,l),enumerable:!(n=t(r,l))||n.enumerable});return e})(!n&&i&&i.__esModule&&o.call(i,"default")?l:s(l,"default",{value:i,enumerable:!0}),i));let n=require("@passflow/core"),l=require("react");l=i(l,1);let c=require("clsx");c=i(c,1),require("dayjs");let d=require("yup");d=i(d,1);let p=require("react/jsx-runtime"),u=require("@radix-ui/react-dialog");u=i(u,1);let h=require("input-otp"),m=require("countries-and-timezones"),f=require("react-international-phone"),g=require("query-string");g=i(g,1);let w=require("phone"),x=require("react-hook-form"),y=require("@radix-ui/react-popover");y=i(y,1);let v=require("react-error-boundary");"undefined"!=typeof window&&(window.passflowReactAppVersion=()=>{console.log("App Version: 0.18.0")});var C={"sign-in":{password:{message:"We couldn't sign you in. Check your details and try again.",scope:"credentials"},passwordless:{message:"We couldn't start passwordless sign-in. Check your connection and try again.",scope:"form"},passkey:{message:"We couldn't complete passkey sign-in. Try again or use another sign-in method.",scope:"form"}},"sign-up":{password:{message:"We couldn't create your account. Check the information you entered and try again.",scope:"form"},passwordless:{message:"We couldn't start passwordless registration. Check your connection and try again.",scope:"form"},passkey:{message:"We couldn't create your account with a passkey. Try again or choose another method.",scope:"form"}}},b="This verification link is invalid or incomplete. Request a new link or code and try again.",k="This verification request is no longer available. Start again to request a new link or code.",j=new Set(["error.registration.email.domain_not_allowed","error.registration.email.required","error.registration.email.not_verified_by_provider","error.invite.email.domain_not_allowed","error.verification.code.rate_limited","error.otp.incorrect","error.otp.expired","error.otp.already.used","error.challenge.address.changed","error.challenge.app_mismatch","error.email.verification.required","error.registration.continuation.invalid"]),S=(e,s)=>"object"==typeof e&&null!==e?e[s]:void 0,M=e=>{if("string"==typeof S(e,"id"))return e;const s=S(e,"response"),t=S(S(s,"data"),"error");return"object"!=typeof t||null===t?e:{status:S(s,"status"),...t}},E=e=>{const s=M(e),t=S(s,"id"),a=S(s,"message");if("string"!=typeof t||!j.has(t))return null;if("string"!=typeof a)return null;const r=a.trim();return""===r?null:r},N=(e,s,t)=>{const a=E(e);return null===a?((e,s)=>C[e][s])(s,t):{message:a,scope:"form"}},_=(e,s)=>E({id:e,message:s})??"We couldn't continue this authentication request. Return to the app and try again.",I=e=>{const s=E(e);return null!==s?s:"error.not.found"===S(M(e),"id")?"This code is no longer valid. Request a new code.":!0===S(e,"isAxiosError")&&void 0===S(e,"response")?"We couldn't check the code. Try again.":"We couldn't verify the code. Go back and start again."},L="This link is invalid or has expired. Request a new one.",A=e=>{const s=M(e);return"error.verification.code.rate_limited"===S(s,"id")||429===S(s,"status")},P={code_required:"Enter the code shown on your device to continue.",code_invalid:"That code isn't right. Check the code on your device and enter it again.",code_expired:"This code has expired. Start again on your device to get a new one.",code_declined:"This request was already declined. Start again on your device if you still want to sign in.",code_already_approved:"This device is already signed in. You can close this page and head back to it.",too_many_attempts:"Too many incorrect codes were entered. Wait a few minutes, then try again.",mode_disabled:"This app can't be signed in to this way. Ask whoever set it up to turn on QR sign-in, or sign in from your computer instead.",app_unavailable:"The app that asked you to sign in is no longer available. Start again from your device.",bad_credentials:"That email or password isn't right.",missing_credentials:"Enter your email and password to continue.",second_factor_invalid:"That code isn't right. Check it and enter it again.",missing_second_factor:"Enter the code to continue.",account_blocked:"This account has been blocked. Contact whoever manages it for help.",passkey_failed:"We couldn't confirm your passkey. You may have cancelled it, waited too long, or there may be no passkey for this site on this device.",passkey_unsupported:"This device can't use a passkey to sign in here. Use a device you've set up a passkey on, or return to the app that asked you to sign in and start again.",offline:"We couldn't reach the server. Check your connection and try again.",generic:"Something went wrong on our end. Refresh the page and try again."},F=new Set(["code_required","code_invalid","bad_credentials","missing_credentials","second_factor_invalid","missing_second_factor","passkey_failed","offline","generic"]),T={code_required:"code_required",invalid_user_code:"code_invalid",unknown_user_code:"code_invalid",expired_user_code:"code_expired",denied:"code_declined",already_approved:"code_already_approved",too_many_attempts:"too_many_attempts",mode_disabled:"mode_disabled",unknown_client:"app_unavailable",passkey_unavailable:"app_unavailable",unavailable:"app_unavailable",bad_credentials:"bad_credentials",missing_credentials:"missing_credentials",second_factor_invalid:"second_factor_invalid",missing_second_factor:"missing_second_factor",blocked:"account_blocked",passkey_failed:"passkey_failed"},R={NotAllowedError:"passkey_failed",AbortError:"passkey_failed",TimeoutError:"passkey_failed",UnknownError:"passkey_failed",NotSupportedError:"passkey_unsupported",InvalidStateError:"passkey_unsupported",ConstraintError:"passkey_unsupported",SecurityError:"passkey_unsupported"},U=["resident credentials","allowcredentials","not supported at this time","discoverable credentials","is not supported"],Y=class extends Error{reason;code;status;constructor(e){super(e.description||e.code||`device request failed (${e.status})`),this.name="DeviceApiError",this.reason=e.reason,this.code=e.code,this.status=e.status}},V=(e,s)=>({type:e,message:P[e],detail:s,isRecoverable:F.has(e)});function z(e){if(e instanceof Y){const s=T[e.reason]??"generic";return V(s,`${e.code}${e.reason?`/${e.reason}`:""}: ${e.message}`)}if((e=>"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name)(e)){const s=e.name,t="string"==typeof e.message?e.message:"",a=t?`${s}: ${t}`:s,r=t.toLowerCase();if(U.some(e=>r.includes(e)))return V("passkey_unsupported",a);const o=R[s];return V(o?o:"TypeError"===s?"offline":"generic",a)}return V("generic","string"==typeof e?e:void 0)}function D(e,s){return V(e,s)}var B={expired:["2FA verification expired or not required","verification expired","session expired","verification not required"],not_enabled:["Two-factor authentication is not enabled for this user","2FA is not enabled","two-factor not enabled"],invalid_code:["invalid code","incorrect code","code mismatch","wrong code","invalid 2fa code"]};function G(e){switch(e.type){case"expired":return"Your session has expired. Redirecting to sign in...";case"not_enabled":return"Two-factor authentication is not enabled for your account. Please contact your administrator to enable 2FA.";case"invalid_code":return"Invalid code. Please check your authenticator app and try again.";default:return e.message}}var O=(...e)=>(0,c.default)(e),H=(e,s)=>"string"==typeof e&&""!==e.trim()?e.trim():s,q=e=>{if(!(0,n.isEmailVerificationStep)(e))return null;const s=e.challenge_id;return"string"==typeof s&&""!==s?{kind:"code",challengeId:s,message:H(e.message,"We sent a code to your email.")}:{kind:"link",message:H(e.message,"Check your email for a link to finish signing up.")}},Z={step:{kind:"none"},error:null},J=(e,s)=>{switch(s.type){case"ENTER":return{step:s.step,error:null};case"CANCEL":return Z;case"VERIFY_STARTED":case"VERIFY_OK":return"code"===e.step.kind&&null!==e.error?{...e,error:null}:e;case"VERIFY_FAILED":case"RESEND_FAILED":return"code"===e.step.kind?{...e,error:s.message}:e;case"RESENT":return"code"===e.step.kind?{step:{kind:"code",challengeId:s.challengeId,message:s.message},error:null}:e;case"LINK_SENT":return"code"===e.step.kind?{step:{kind:"link",message:s.message},error:null}:e;default:return s}},W=e=>{const s={internal:{username:{password:!1},email:{password:!1,otp:!1,magicLink:!1},phone:{password:!1,otp:!1,magicLink:!1}},fim:{providers:[]},passkey:!1,hasEmailMethods:!1,hasSignInEmailMethods:!1,hasPhoneMethods:!1,hasSignInPhoneMethods:!1,hasUsernameMethods:!1,hasSignInUsernameMethods:!1};if(!e)return s;for(const t of e){const{identity:e,challenge:a,fim_type:r}=t.strategy;switch(t.type){case"internal":switch(e){case"email":"magic_link"===a?s.internal.email.magicLink=!0:s.internal.email[a]=!0,s.hasEmailMethods=!0,(s.internal.email.magicLink||s.internal.email.otp||s.internal.email.password)&&(s.hasSignInEmailMethods=!0);break;case"phone":"magic_link"===a?s.internal.phone.magicLink=!0:s.internal.phone[a]=!0,s.hasPhoneMethods=!0,(s.internal.phone.magicLink||s.internal.phone.otp||s.internal.phone.password)&&(s.hasSignInPhoneMethods=!0);break;case"username":s.internal.username[a]=!0,s.hasUsernameMethods=!0,s.internal.username.password&&(s.hasSignInUsernameMethods=!0);break;default:throw new Error(`Unsupported identity type: ${e}`)}break;case"fim":s.fim.providers.push(r);break;case"passkey":s.passkey=!0;break;default:throw new Error(`Unsupported strategy type: ${t.type}`)}}return s},K=(e,s)=>e.hasSignInEmailMethods&&e.hasSignInUsernameMethods?"label"===s?"Email or username":"Use email or username":e.hasSignInEmailMethods?"label"===s?"Email":"Use email":e.hasSignInUsernameMethods?"label"===s?"Username":"Use username":null,Q=(e,s)=>{if("phone"===s){if(e.internal.phone.otp)return{label:"SMS code",challengeType:"otp"};if(e.internal.phone.magicLink)return{label:"SMS link",challengeType:"magic_link"}}if("email_or_username"===s){if(e.internal.email.otp)return{label:"email code",challengeType:"otp"};if(e.internal.email.magicLink)return{label:"email link",challengeType:"magic_link"}}return null},X=e=>{try{return decodeURIComponent(e)}catch{return e}},$=e=>{const s=new URLSearchParams(e?e.split("?")[1]:window.location.search),t=s.get("error"),a=s.get("message");return{error:t,message:a?X(a):null}},ee=async(e,s,t="hash")=>{const a=await e.getTokens(!1);if(a){a.scopes=void 0;const e=Object.entries(a).filter(([e,s])=>s).map(([e,s])=>`${e}=${encodeURIComponent(s)}`).join("&");return"hash"===t?`${s}#${e}`:`${s}?${e}`}return s};function se(e){return s=>{try{return e(s)}catch(t){return}}}var te={"sign-in":{title:"Sign in",completion:"sign in"},"sign-up":{title:"Create your account",completion:"create your account"}},ae=(e,s)=>{if(!e)return null;const t=se(n.parseToken)(e),a=t?.tenant_name?.trim(),r=t?.inviter_name?.trim(),o=te[s];return{title:a?`${o.title} to join ${a}.`:`${o.title} to continue your invitation.`,subtitle:r?`${r} invited you. After you ${o.completion}, you'll continue to the invitation.`:`After you ${o.completion}, you'll continue to the invitation.`}},re=(e,s,t)=>!!e.isTwoFactorVerificationRequired()&&(s({to:t}),!0),oe=()=>!("undefined"==typeof window||!window.location.hash)&&new URLSearchParams(window.location.hash.substring(1)).has("tfa_token"),ie="passflow_2fa",ne=`${ie}_redirect_count`,le=`${ie}_last_error_type`,ce={canRedirect(){try{return this.getRedirectCount()<3}catch{return!0}},incrementRedirect(){try{const e=this.getRedirectCount();sessionStorage.setItem(ne,String(e+1))}catch{}},getRedirectCount(){try{const e=sessionStorage.getItem(ne);return e?Number.parseInt(e,10):0}catch{return 0}},reset(){try{sessionStorage.removeItem(ne),sessionStorage.removeItem(le)}catch{}},setLastErrorType(e){try{sessionStorage.setItem(le,e)}catch{}},getLastErrorType(){try{return sessionStorage.getItem(le)}catch{return null}},isRepeatingError(e){return this.getLastErrorType()===e&&this.getRedirectCount()>0},getLoopDetectedMessage:()=>"Unable to complete authentication. This may be a configuration issue. Please contact support."},de=null,pe=null,ue=e=>(de=e,pe=null,()=>{pe=e,queueMicrotask(()=>{pe===e&&(pe=null,he(e))})}),he=e=>{de===e&&(de=null)},me=e=>{if(null===de)throw new Error(`[passflow] ${e}() needs a mounted <PassflowProvider>: the interception scope is bound to a configured Passflow instance. Call it from inside your app (an effect or a component), or use passflow.${e}() from usePassflow().`);return de},fe={read:()=>window.location.search,write:(e,{replace:s})=>{const t=`${window.location.pathname}${e}${window.location.hash}`;s?window.history.replaceState(null,"",t):window.history.pushState(null,"",t)}},ge=(0,l.createContext)(fe),we=()=>(0,l.useContext)(ge),xe=e=>e.toString()?`?${e.toString()}`:"",ye=e=>{const s=we(),t=(a=s.read(),(new DOMParser).parseFromString(a,"text/html").documentElement.textContent||"");var a;const r=new URLSearchParams(t);if(e){let t=!1;for(const[s,a]of Object.entries(e))r.has(s)||""===a||(r.set(s,a),t=!0);t&&s.write(xe(r),{replace:!0})}return{getAll:()=>{const e={};for(const[s,t]of r.entries())e[s]=t;return e},get:e=>{const s=r.get(e);return""===s?null:s},set:e=>{const t=new URLSearchParams(s.read());for(const[s,a]of Object.entries(e))null==a||""===a?t.delete(s):t.set(s,a);s.write(xe(t),{replace:!1})}}},ve=e=>{try{const s=new URL(e);return"http:"===s.protocol||"https:"===s.protocol}catch{return!1}},Ce=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,be=e=>d.string().required().test({test:s=>{const t=[];if(e){const{min_password_length:a,require_lowercase:r,require_number:o,require_symbol:i,require_uppercase:n}=e;(s??"").length<a&&t.push("length"),n&&!/[A-Z]/.test(s)&&t.push("uppercase"),r&&!/[a-z]/.test(s)&&t.push("lowercase"),o&&!/\d/.test(s)&&t.push("number"),i&&!/[!@#$%^&*()_+{}[\]:;<>,.?~\\-]/.test(s)&&t.push("symbol")}if(t.length>0){const e={errors:t,inner:!0,path:"password",field:"password",message:t,value:s,name:"ValidationError"};return new d.ValidationError(e,s,"password")}return!0}}),ke=({size:e,x:s,y:t})=>(0,p.jsx)("span",{className:"passflow-ripple passflow-ripple-effect",style:{width:e,height:e,left:s,top:t}}),je=({size:e,variant:s,type:t,onClick:a,withIcon:r=!1,asIcon:o=!1,className:i="",children:n,withRipple:c=!0,description:d,pressed:u,...h})=>{const[m,f]=(0,l.useState)(),g={"passflow-button passflow-button--big":"big"===e,"passflow-button passflow-button--medium":"medium"===e,"passflow-button passflow-button--small":"small"===e,"passflow-button--primary":"primary"===s,"passflow-button--secondary":"secondary"===s,"passflow-button--outlined":"outlined"===s,"passflow-button--warning":"warning"===s,"passflow-button--clean":"clean"===s,"passflow-button--provider":"provider"===s,"passflow-button--dark":"dark"===s,"passflow-button--option":"option"===s,"passflow-button--link":"link"===s,"passflow-button--with-icon":r,"passflow-button--as-icon":o},w=!0===h["aria-disabled"]||"true"===h["aria-disabled"];return(0,l.useEffect)(()=>{let e;return m&&(e=setTimeout(()=>{f(void 0)},1e3)),()=>clearTimeout(e)},[m]),(0,p.jsxs)("button",{className:O(g,i),type:t,"aria-pressed":u,onClick:e=>{if(w)return void e.preventDefault();const s=e.currentTarget.getBoundingClientRect(),t=Math.max(s.width,s.height),r=e.clientX-s.left-t/2,o=e.clientY-s.top-t/2,i=(0,p.jsx)(ke,{size:t,x:r,y:o},Date.now());f(e=>e?[...e,i]:[i]),a?.(e)},...h,children:["option"===s?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"passflow-button__option-label",children:n}),d?(0,p.jsxs)(p.Fragment,{children:[" ",(0,p.jsx)("span",{className:"passflow-button__option-hint",children:d})]}):null]}):n,c&&"link"!==s&&(0,p.jsx)("div",{"aria-hidden":!0,className:"passflow-ripple-container",children:m})]})},Se=({appName:e})=>(0,p.jsx)("div",{className:"passflow-continuing-status",role:"status",children:e?`Continuing to ${e}…`:"Continuing…"}),Me={ad:"-48px -27px",ae:"-72px -27px",af:"-96px -27px",ag:"-120px -27px",ai:"-144px -27px",al:"-168px -27px",am:"-192px -27px",an:"-216px -27px",ao:"-240px -27px",aq:"-264px -27px",ar:"-288px -27px",as:"-312px -27px",at:"-336px -27px",au:"-360px -27px",aw:"-384px -27px",ax:"-0px -51px",az:"-24px -51px",ba:"-48px -51px",bb:"-72px -51px",bd:"-96px -51px",be:"-120px -51px",bf:"-144px -51px",bg:"-168px -51px",bh:"-192px -51px",bi:"-216px -51px",bj:"-240px -51px",bl:"-264px -51px",bm:"-288px -51px",bn:"-312px -51px",bo:"-336px -51px",br:"-360px -51px",bs:"-384px -51px",bt:"-0px -75px",bw:"-24px -75px",by:"-48px -75px",bz:"-72px -75px",ca:"-96px -75px",cc:"-120px -75px",cd:"-144px -75px",cf:"-168px -75px",cg:"-192px -75px",ch:"-216px -75px",ci:"-240px -75px",ck:"-264px -75px",cl:"-288px -75px",cm:"-312px -75px",cn:"-336px -75px",co:"-360px -75px",cr:"-384px -75px",cu:"-0px -99px",cv:"-24px -99px",cw:"-48px -99px",cx:"-72px -99px",cy:"-96px -99px",cz:"-120px -99px",de:"-144px -99px",dj:"-168px -99px",dk:"-192px -99px",dm:"-216px -99px",do:"-240px -99px",dz:"-264px -99px",ec:"-288px -99px",ee:"-312px -99px",eg:"-336px -99px",eh:"-360px -99px",er:"-384px -99px",es:"-0px -123px",et:"-24px -123px",eu:"-48px -123px",fi:"-72px -123px",fj:"-96px -123px",fk:"-120px -123px",fm:"-144px -123px",fo:"-168px -123px",fr:"-192px -123px",ga:"-216px -123px",gb:"-240px -123px",gd:"-264px -123px",ge:"-288px -123px",gg:"-312px -123px",gh:"-336px -123px",gi:"-360px -123px",gl:"-384px -123px",gm:"-0px -147px",gn:"-24px -147px",gq:"-48px -147px",gr:"-72px -147px",gs:"-96px -147px",gt:"-120px -147px",gu:"-144px -147px",gw:"-168px -147px",gy:"-192px -147px",hk:"-216px -147px",hn:"-240px -147px",hr:"-264px -147px",ht:"-288px -147px",hu:"-312px -147px",ic:"-336px -147px",id:"-360px -147px",ie:"-384px -147px",il:"-0px -171px",im:"-24px -171px",in:"-48px -171px",iq:"-72px -171px",ir:"-96px -171px",is:"-120px -171px",it:"-144px -171px",je:"-168px -171px",jm:"-192px -171px",jo:"-216px -171px",jp:"-240px -171px",ke:"-264px -171px",kg:"-288px -171px",kh:"-312px -171px",ki:"-336px -171px",xk:"-144px 3px",km:"-360px -171px",kn:"-384px -171px",kp:"-0px -195px",kr:"-24px -195px",kw:"-48px -195px",ky:"-72px -195px",kz:"-96px -195px",la:"-120px -195px",lb:"-144px -195px",lc:"-168px -195px",li:"-192px -195px",lk:"-216px -195px",lr:"-240px -195px",ls:"-264px -195px",lt:"-288px -195px",lu:"-312px -195px",lv:"-336px -195px",ly:"-360px -195px",ma:"-384px -195px",mc:"-0px -219px",md:"-24px -219px",me:"-48px -219px",mf:"-72px -219px",mg:"-96px -219px",mh:"-120px -219px",mk:"-144px -219px",ml:"-168px -219px",mm:"-192px -219px",mn:"-216px -219px",mo:"-240px -219px",mp:"-264px -219px",mq:"-288px -219px",mr:"-312px -219px",ms:"-336px -219px",mt:"-360px -219px",mu:"-384px -219px",mv:"-0px -243px",mw:"-24px -243px",mx:"-48px -243px",my:"-72px -243px",mz:"-96px -243px",na:"-120px -243px",nc:"-144px -243px",ne:"-168px -243px",nf:"-192px -243px",ng:"-216px -243px",ni:"-240px -243px",nl:"-264px -243px",no:"-288px -243px",np:"-312px -243px",nr:"-336px -243px",nu:"-360px -243px",nz:"-384px -243px",om:"-0px -267px",pa:"-24px -267px",pe:"-48px -267px",pf:"-72px -267px",pg:"-96px -267px",ph:"-120px -267px",pk:"-192px -267px",pl:"-216px -267px",pn:"-240px -267px",pr:"-264px -267px",ps:"-288px -267px",pt:"-312px -267px",pw:"-336px -267px",py:"-360px -267px",qa:"-384px -267px",ro:"-0px -291px",rs:"-24px -291px",ru:"-48px -291px",rw:"-72px -291px",sa:"-96px -291px",sb:"-120px -291px",sc:"-144px -291px",sd:"-168px -291px",se:"-192px -291px",sg:"-216px -291px",sh:"-240px -291px",si:"-264px -291px",sk:"-288px -291px",sl:"-312px -291px",sm:"-336px -291px",sn:"-360px -291px",so:"-384px -291px",sr:"-0px -315px",ss:"-24px -315px",st:"-48px -315px",sv:"-72px -315px",sy:"-96px -315px",sz:"-120px -315px",tc:"-144px -315px",td:"-168px -315px",tf:"-192px -315px",tg:"-216px -315px",th:"-240px -315px",tj:"-264px -315px",tk:"-288px -315px",tl:"-312px -315px",tm:"-336px -315px",tn:"-360px -315px",to:"-384px -315px",tr:"-0px -339px",tt:"-24px -339px",tv:"-48px -339px",tw:"-72px -339px",tz:"-96px -339px",ua:"-120px -339px",ug:"-144px -339px",us:"-168px -339px",uy:"-192px -339px",uz:"-216px -339px",va:"-240px -339px",vc:"-264px -339px",ve:"-288px -339px",vg:"-312px -339px",vi:"-336px -339px",vn:"-360px -339px",vu:"-384px -339px",wf:"-0px -363px",ws:"-24px -363px",ye:"-48px -363px",za:"-96px -363px",zm:"-120px -363px",zw:"-144px -363px"},Ee={bq:"nl",gf:"fr",gp:"fr",io:"gb",pm:"fr",re:"fr",yt:"fr"},Ne=({iso2:e,className:s})=>{const t=(e=>{const s=e.trim().toLowerCase(),t=Ee[s]??s;return t in Me?t:null})(e);if(!t)return(0,p.jsx)("span",{"aria-hidden":"true",className:O("passflow-country-flag passflow-country-flag--fallback",s),"data-country-flag":e.toLowerCase(),children:e.slice(0,2).toUpperCase()||"–"});const a={backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZgAAAGACAMAAACnYISRAAADAFBMVEUAAAAxQ5cSO5wAOJP////OESYBAAAANJgAJ33SDzT80Rb/AADKAADzKDgEfj3bFRr/zgDoDi4JhQHuHCYAak0AlEIAaDt1qtv/3wAAN4rdKBAAN6lFjdwBMnwOrS3cIyADh1EAVqVLsdjCKC/44BUBeV0BcsIEm0oEKov84kLVBgcAH6UCrcoAZsPpKjv+yAABAHYAoVtysuEAZQAetTrfIA7VKCQBKGXoAxLiCxcAc89ZgbwdRIoLSqn7+fgCki+kMTYAAJcAAK0Almy/CS/+6AYiSaYAUMPiPShkz//vKi0MHIy1Bwb9mgQiXjn88u8AmQADUpP/xyIxjyyHxuMAot7p6Ob9uAs5XbXUIT352gHFCx4jnkQMsF83lQT2PzNwGT06dMQAjMPhFyf1gQPdG0c1qDQAcijw9fjrhoivGyfFICYAAM0Bf/7hZmk9dir65OWNJCrTrjnwsSwmQILmVgUAoeHUOkn2zM3fOwh9mcj/eQDRyc7+mTL//wAHaajh6vPxsbKpstft8e8EOLhJcLQCmbTW4O0AAP/789j51tgfHRDphSj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xey9/8z7zzzz/vtBDLJPaWLkYlK4LSIms30tXK2jdK16MUctlqPlRwPuNW5ruSXAiekBM0RoaGKGvl1fObT+271YDKo4rImhJyaFE7O2JQfsVK9NrJQtezObCA29lN0PaoYgNNzPCYYMMpJOPIjEkKUMyKmeRSnzeL3I0+DzeoNBD/J6PayYoWUhIjR0MXfcAdUMYNdlbQ3YRzUxRGIKbQjZCkUxmWvXwl5VMsCLz9vtsV996xVXXHG119Pg9Znw+7rGkBAakejNH6GR28+1mne8fpWUpBMPxIPF2Apt8BDFtLScql5Mg93X4PVecevExFNX2L3dPnsDK0anY0NDIhMDv1gN3/fII4/Az3Ef9d8Oo4gNy09wMclSIC4QGlFMdfUsxPi8dp/Xc/Wtn2y+9Wq7N2i3ByNi2NCoFlP07DL97c+WI1icI5J04kEXQ7yvVowvaPd5HigBHrD77EGfLy4x6KAr5JqEynjCi0nhN76UxS0GN/7xxvHx8c+9XtDki6uUYTGhgyiolTIeofkritFRYYVV2KH/L3eOjztLvD47jMqE5n8hvfnTxZSPjIwMas0fgiJuHPGKgdoV9JaMj5eM5/mCcCQbLpdV3yqgJAbYPTrvhB8uszPK1zkn/D4lLjFMENx4PB67HXZgJchgMUJcVoKPmGK0CaYAsVwK7+NPTBCGy/agNwgPO75vKpsYIi4xxWinZMjEPA46CDdxiQHACAb8MAzXS4i4xBSjncSkNv/Eegx9tEbEJaYY7bS/hoaGhobGP8xff9MS7Xw+B5wAAAAASUVORK5CYII=)",backgroundPosition:Me[t]};return(0,p.jsx)("span",{"aria-hidden":"true",className:O("passflow-country-flag",s),"data-country-flag":e.toLowerCase(),style:a})},_e=u.Root,Ie=u.Trigger,Le=u.Portal,Ae=u.Close,Pe=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Overlay,{ref:t,className:O("passflow-dialog-overlay",e),...s}));Pe.displayName=u.Overlay.displayName;var Fe=(0,l.forwardRef)(({className:e,children:s,...t},a)=>(0,p.jsxs)(Le,{children:[(0,p.jsx)(Pe,{}),(0,p.jsx)(u.Content,{ref:a,className:O("passflow-dialog-content",e),...t,children:s})]}));Fe.displayName=u.Content.displayName;var Te=({className:e,...s})=>(0,p.jsx)("div",{className:O("passflow-dialog-header",e),...s});Te.displayName="DialogHeader";var Re=({className:e,...s})=>(0,p.jsx)("div",{className:O("passflow-dialog-footer",e),...s});Re.displayName="DialogFooter";var Ue=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Title,{ref:t,className:O("passflow-dialog-title",e),...s}));Ue.displayName=u.Title.displayName;var Ye=(0,l.forwardRef)(({className:e,...s},t)=>(0,p.jsx)(u.Description,{ref:t,className:O("passflow-dialog-description",e),...s}));Ye.displayName=u.Description.displayName;var Ve={numeric:{pattern:h.REGEXP_ONLY_DIGITS,inputMode:"numeric"},alphanumeric:{pattern:h.REGEXP_ONLY_DIGITS_AND_CHARS,inputMode:"text"}},ze=({char:e,isActive:s,hasFakeCaret:t,state:a})=>(0,p.jsxs)("div",{className:O("passflow-field-otp",{"passflow-field-otp--active":s,"passflow-field-otp--error":"error"===a,"passflow-field-otp--disabled":"disabled"===a}),children:[e,t?(0,p.jsx)("span",{className:"passflow-field-otp__caret"}):null]}),De=({id:e,name:s,length:t,value:a,onChange:r,onComplete:o,charset:i="numeric",state:n="default",label:l,labelledBy:c,describedBy:d,autoFocus:u=!1,ref:m})=>{const{pattern:f,inputMode:g}=Ve[i],w=(0,p.jsx)(h.OTPInput,{ref:m,id:e,name:s,maxLength:t,value:a,onChange:r,onComplete:o,pattern:f,inputMode:g,autoComplete:"one-time-code",disabled:"disabled"===n,"aria-labelledby":c,"aria-describedby":d,"aria-invalid":"error"===n||void 0,autoFocus:u,noScriptCSSFallback:null,containerClassName:O("passflow-field-otp-group",{"passflow-field-otp-group--disabled":"disabled"===n}),render:({slots:e})=>(0,p.jsx)("div",{className:"passflow-field-otp-slots","aria-hidden":!0,children:e.map((e,s)=>(0,p.jsx)(ze,{...e,state:n},s))})});return void 0===l?w:(0,p.jsxs)("div",{className:"passflow-field-otp-field",children:[(0,p.jsx)("label",{htmlFor:e,className:"passflow-field-label",children:l}),w]})},Be=e=>{const s={requireNumber:"number",requireSymbol:"symbol",requireLowerCase:"lowercase letter",requireUpperCase:"uppercase letter"},t=Object.keys(e).filter(s=>e[s]);return`Must contain a ${new Intl.ListFormat("en").format(t.map(e=>s[e]))}`},Ge=(0,l.forwardRef)(({id:e,value:s,passwordPolicy:t,withMessages:a=!1,validationErrors:r=[],isError:o=!1,className:i="",disabled:n=!1,...c},d)=>{const[u,h]=(0,l.useState)(!1),m={"passflow-field--error":o},f=e=>s.length>0&&!e.some(e=>r.includes(e))?"passflow-password-validation-item--success":null,g=e=>s.length>0&&!e.some(e=>r.includes(e))?"check":"close",w=()=>h(e=>!e),x=t?.min_password_length??0,y=t?.require_lowercase??!1,v=t?.require_number??!1,C=t?.require_symbol??!1,b=t?.require_uppercase??!1;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"passflow-field-wrapper",children:[(0,p.jsx)("input",{ref:d,id:e,value:s,type:u?"text":"password",className:O("passflow-field-input passflow-field--focused passflow-field-input--with-icon",m,i),disabled:n,...c}),u?(0,p.jsx)(je,{className:"passflow-button-display-password passflow-field-icon-button",size:"small",type:"button",variant:"clean",asIcon:!0,withIcon:!0,disabled:n,"aria-label":"Hide password",onClick:w,children:(0,p.jsx)(Vs,{size:"small",type:"general",id:"eye-on",decorative:!0})}):(0,p.jsx)(je,{className:"passflow-button-display-password passflow-field-icon-button",size:"small",type:"button",variant:"clean",asIcon:!0,withIcon:!0,disabled:n,"aria-label":"Show password",onClick:w,children:(0,p.jsx)(Vs,{size:"small",type:"general",id:"eye-off",decorative:!0})})]}),a&&t&&(0,p.jsxs)("div",{className:"passflow-password-validation",children:[(0,p.jsxs)("p",{className:O("passflow-password-validation-item",f(["length"])),children:[(0,p.jsx)(Vs,{size:"small",id:g(["length"]),type:"general",className:O(f(["length"]))}),"At least ",x," characters"]}),(0,p.jsxs)("p",{className:O("passflow-password-validation-item",f(["uppercase","lowercase","number","symbol"])),children:[(0,p.jsx)(Vs,{size:"small",id:g(["uppercase","lowercase","number","symbol"]),type:"general",className:O(f(["uppercase","lowercase","number","symbol"]))}),Be({requireNumber:v,requireSymbol:C,requireLowerCase:y,requireUpperCase:b})]})]})]})}),Oe=()=>{const e=(0,l.useContext)(Ke);if(!e)throw new Error("useAuth must be used within an PassflowProvider");const{passflow:s}=e;return s},He=(0,l.createContext)(void 0),qe=({children:e,onSessionExpired:s})=>{const t=Oe(),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);(0,l.useEffect)(()=>{const e={onAuthChange:(e,t)=>{if(e===n.PassflowEvent.SessionExpired){const e=t?.reason??"refresh_failed";i(!0),s?.(e)}else e!==n.PassflowEvent.SignIn&&e!==n.PassflowEvent.Register||i(!1)}};return t.subscribe(e,[n.PassflowEvent.SessionExpired,n.PassflowEvent.SignIn,n.PassflowEvent.Register]),()=>{t.unsubscribe(e)}},[t,s]);const c=(0,l.useCallback)(()=>t.isAuthenticated(),[t]),d=(0,l.useCallback)(async e=>{r(!0);try{const s=await t.getTokens(e);return{tokens:s,parsedTokens:s?t.getParsedTokens():void 0}}catch(s){return{tokens:void 0,parsedTokens:void 0}}finally{r(!1)}},[t]),u={isAuthenticated:c,logout:(0,l.useCallback)(async()=>{await t.logOut()},[t]),isLoading:a,isSessionExpired:o,getTokens:d};return(0,p.jsx)(He.Provider,{value:u,children:e})},Ze=({to:e,search:s,replace:t})=>{const a=s?s.startsWith("?")?s:`?${s}`:"";t?window.location.replace(`${e}${a}`):window.location.href=`${e}${a}`},Je=(0,l.createContext)({navigate:Ze,setNavigate:()=>{},router:"default"}),We={appSettings:null,passwordPolicy:null,url:void 0,appId:void 0,scopes:void 0,createTenantForNewUser:void 0,parseQueryParams:!0,isDiscoveringAppId:!1,hasSettingsError:!1},Ke=(0,l.createContext)(void 0),Qe=(e,s)=>"SET_PASSFLOW_STATE"===s.type?{...e,...s.payload}:e,Xe={signin:{path:"/signin"},signup:{path:"/signup"},verify_otp:{path:"/verify-challenge-otp"},verify_magic_link:{path:"/verify-challenge-magic-link"},forgot_password:{path:"/forgot-password"},forgot_password_success:{path:"/forgot-password/success"},reset_password:{path:"/password/reset"},invitation:{path:"/invitation"},passkey:{path:"/passkeysss"},two_factor_verify:{path:"/two-factor-verify"},two_factor_recovery:{path:"/two-factor-recovery"},two_factor_setup:{path:"/two-factor-setup"},two_factor_setup_magic_link:{path:"/two-factor-setup-magic-link/:token"}},$e=(0,l.createContext)(void 0),es=()=>{},ss={enabled:!1,state:{status:"idle"},prompt:null,selectedFactor:null,selectFactor:es,submit:es,cancel:es,dismiss:es,elevate:()=>Promise.resolve({status:"idle"})},ts=e=>"string"==typeof e&&e.trim()?e.trim():null,as=e=>{if("string"!=typeof e)return null;const s=ts(e);return s?`url(${s})`:"none"},rs=(e,s)=>{for(const[t,a]of Object.entries((e=>({"--passflow-primary-color":ts(e.primary_color),"--passflow-text-color":ts(e.text_color)??ts(e.content_color),"--passflow-secondary-text-color":ts(e.secondary_text_color),"--passflow-background-color":ts(e.background_color),"--passflow-background-image":as(e.background_image),"--passflow-card-color":ts(e.card_color),"--passflow-branding-background-color":ts(e.card_color),"--passflow-input-background-color":ts(e.input_background_color),"--passflow-input-border-color":ts(e.input_border_color),"--passflow-button-text-color":ts(e.button_text_color),"--passflow-passkey-button-text-color":ts(e.passkey_button_text_color),"--passflow-passkey-button-background-color":ts(e.passkey_button_background_color),"--passflow-divider-color":ts(e.divider_color),"--passflow-federated_button_background_color":ts(e.federated_button_background_color),"--passflow-federated_button_text_color":ts(e.federated_button_text_color)}))(s)))null===a?e.style.removeProperty(t):e.style.setProperty(t,a)},os=()=>{const e=Oe(),s=(0,l.useContext)(Ke),[t,a]=(0,l.useState)(!1),[r,o]=(0,l.useState)(""),[i,n]=(0,l.useState)(!1),c=(0,l.useRef)(!1);if(!s)throw new Error("useAppSetting must be used within an PassflowProvider");const{state:d,dispatch:p}=s;(0,l.useLayoutEffect)(()=>{if(!d.appSettings&&!d.hasSettingsError&&!c.current){(async()=>{c.current=!0,n(!0);try{if(!e.appId&&!d.isDiscoveringAppId){p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!0}});try{const s=["/settings"];e.url&&s.push(`${e.url}/settings`);let t=null;for(const e of s)try{const s=await fetch(e);if(s.ok){t=s;break}}catch{}if(t?.ok){const s=await t.json(),a=s.login_app?.app_id||s.appId;if(a){e.setAppId(a);const t={appId:a};if(!d.scopes){const e=s.login_app?.scopes||s.scopes;e&&(t.scopes=e)}if(void 0===d.createTenantForNewUser){const e=s.login_app?.create_tenant_for_new_user??s.createTenantForNewUser;void 0!==e&&(t.createTenantForNewUser=e)}p({type:"SET_PASSFLOW_STATE",payload:{...d,...t,isDiscoveringAppId:!1}})}else p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})}}catch(t){console.warn("Failed to discover appId from /settings:",t),p({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})}}let a={};e.appId&&(a=await e.getAppSettings());const r={appSettings:a};d.scopes||(r.scopes=a.defaults?.scopes),void 0===d.createTenantForNewUser&&(r.createTenantForNewUser=a.defaults?.create_tenant_for_new_user);let o=null;a.auth_strategies&&(s=a.auth_strategies,s?.some(e=>"internal"===e.type&&"password"===e.strategy?.challenge))&&(o=await e.getPasswordPolicySettings()),r.passwordPolicy=o,p({type:"SET_PASSFLOW_STATE",payload:{...d,...r}})}catch(r){a(!0),o(r.message),p({type:"SET_PASSFLOW_STATE",payload:{...d,hasSettingsError:!0}})}finally{n(!1),c.current=!1}var s})()}},[p,d.appSettings,d.hasSettingsError,d.isDiscoveringAppId,e]);const u=(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return"system"===d.appSettings?.login_app_theme?.color_scheme?e:d.appSettings?.login_app_theme?.color_scheme??e})(),h=d.appSettings?.login_app_theme?"dark"===u?d.appSettings?.login_app_theme.dark_style:d.appSettings?.login_app_theme.light_style:null;var m;return h&&(m=h,rs(document.documentElement,m)),{appSettings:d.appSettings,scopes:d.scopes??[],createTenantForNewUser:d.createTenantForNewUser??!1,loginAppTheme:d.appSettings?.login_app_theme,passwordPolicy:d.passwordPolicy,currentStyles:h,currentTheme:u,isLoading:i,isError:t,error:r,reset:()=>{a(!1),o(""),n(!1),p({type:"SET_PASSFLOW_STATE",payload:{...d,hasSettingsError:!1}})}}},is=()=>new URLSearchParams(window.location.search).get("parent_challenge_id")??"",ns=e=>`/oidc/requests/${encodeURIComponent(e)}`,ls=()=>{const e=(0,l.useMemo)(is,[]),[s,t]=(0,l.useState)("loading"),[a,r]=(0,l.useState)(null),[o,i]=(0,l.useState)(new Set),[n,c]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!e)return t("invalid"),void c({message:"Invalid consent link",description:"This consent link is missing required information. Please return to the application and try again."});let s=!1;return(async()=>{try{const a=await fetch(ns(e),{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(s)return;if(!a.ok){const e=await a.json().catch(()=>({}))??{};return t("invalid"),void c({message:a.status>=500?"Something went wrong":"Consent request unavailable",description:e.error_description||"We could not load this consent request. Please return to the application and try again."})}const o=await a.json();if(s)return;r(o),i(new Set(o.requested_scopes)),t("ready")}catch(a){if(s)return;t("invalid"),c({message:"Connection error",description:a instanceof Error?a.message:"Could not reach the server. Please check your connection."})}})(),()=>{s=!0}},[e]);const d=(0,l.useCallback)(e=>{i(s=>{const t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t}),c(null)},[]),p=(0,l.useCallback)(async s=>{if(!a)return;t("working"),c(null);const r=ns(e),i="allow"===s?`${r}/consent`:`${r}/reject`,n="allow"===s?{granted_scopes:a.requested_scopes.filter(e=>o.has(e))}:{error:"access_denied",error_description:"User denied consent"};try{const e=await fetch(i,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Passflow-CSRF":a.csrf_token},body:JSON.stringify(n)});if(!e.ok){const s=await e.json().catch(()=>({}))??{};return t("ready"),void c({message:s.error_description||"Could not submit your decision. Please try again."})}const s=await e.json();if("redirect"===s.kind)return t("redirecting"),void(window.location.href=s.url);if("form_post"===s.kind)return t("redirecting"),void((e,s)=>{const t=document.createElement("form");t.method="POST",t.action=e,t.style.display="none";for(const[a,r]of Object.entries(s)){const e=document.createElement("input");e.type="hidden",e.name=a,e.value=r,t.appendChild(e)}document.body.appendChild(t),t.submit()})(s.action,s.fields);t("ready"),c({message:"Unexpected response from server."})}catch(l){t("ready"),c({message:l instanceof Error?l.message:"Could not reach the server. Please try again."})}},[o,a,e]),u=(0,l.useCallback)(()=>p("allow"),[p]),h=(0,l.useCallback)(()=>p("deny"),[p]),m=(0,l.useMemo)(()=>new Map((a?.scope_metadata??[]).map(e=>[e.scope,e])),[a]),f=(0,l.useCallback)(e=>m.get(e)??{scope:e,label:e,description:""},[m]);return{status:s,info:a,grantedScopes:(0,l.useMemo)(()=>(a?.requested_scopes??[]).filter(e=>o.has(e)),[o,a]),error:n,scopeMetadata:f,toggleScope:d,allow:u,deny:h}},cs="/oidc/device/info",ds="/oidc/device/authenticate",ps="/oidc/device/approve",us="/oidc/device/passkey/start",hs="/oidc/device/second-factor",ms=["totp","recovery_codes"],fs=async e=>{const s=await e.json().catch(()=>({}))??{};if(!e.ok)throw new Y({reason:"string"==typeof s.reason?s.reason:"",code:"string"==typeof s.error?s.error:"",status:e.status,description:"string"==typeof s.error_description?s.error_description:""});return s},gs=()=>{const[e,s]=(0,l.useState)("loading"),[t,a]=(0,l.useState)(null),[r,o]=(0,l.useState)(null),[i,n]=(0,l.useState)(null),[c,d]=(0,l.useState)(()=>new URLSearchParams(window.location.search).get("user_code")??""),p=(0,l.useRef)(null),u=(0,l.useRef)(null),h=(0,l.useRef)(!1),[m,f]=(0,l.useState)([]),g=(0,l.useRef)(!0);(0,l.useEffect)(()=>(g.current=!0,()=>{g.current=!1}),[]);const w=t?.csrf_token??"",x=(0,l.useCallback)(async(e,s)=>{const t=await fetch(e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Passflow-CSRF":w},body:JSON.stringify({...s,user_code:c})});return fs(t)},[w,c]),y=(0,l.useCallback)((e,t=null)=>{const a=z(e);a.detail&&console.error("[passflow] device verification:",a.detail,e),g.current&&(o(a),s(t||("mode_disabled"===a.type?"refused":u.current?"second_factor":p.current?"signed_in":"ready")))},[]),v=(0,l.useCallback)(async e=>{if(!e)return s("code_entry"),void o(null);s("loading"),o(null);try{const t=await fetch(`${cs}?user_code=${encodeURIComponent(e)}`,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}),r=await fs(t);if(!g.current)return;a(r),s("ready")}catch(t){const e=z(t);if(e.detail&&console.error("[passflow] device verification:",e.detail,t),!g.current)return;if("code_required"===e.type)return o(null),void s("code_entry");o(e),s("mode_disabled"===e.type?"refused":"failed")}},[]);(0,l.useEffect)(()=>{v(c)},[v,c]);const C=(0,l.useCallback)(e=>{d(e.trim())},[]),b=(0,l.useCallback)(e=>e.second_factor_required?(u.current=e.approval_ticket,p.current=null,g.current&&f((e=>{const s=(e??[]).filter(e=>ms.includes(e));return s.length>0?s:["totp"]})(e.second_factor_methods)),!0):(u.current=null,p.current=e.approval_ticket,!1),[]),k=(0,l.useCallback)(async(e,s)=>{const t=await x(ds,{method:"password",email:e,password:s}),a=b(t);return g.current&&n(t.email??e),a},[x,b]),j=(0,l.useCallback)(async()=>{if("undefined"==typeof window||!window.PublicKeyCredential)throw new DOMException("this browser does not implement PublicKeyCredential","NotSupportedError");const e=await x(us,{}),{startAuthentication:s}=await(import("@simplewebauthn/browser")),t=await s({optionsJSON:e.publicKey}),a=await x(ds,{method:"passkey",passkey_challenge_id:e.passkey_challenge_id,passkey_data:t}),r=b(a);return g.current&&n(a.email??null),r},[x,b]),S=(0,l.useCallback)(async()=>{await x(ps,{approval_ticket:p.current}),g.current&&s("done")},[x]),M=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{const a=await k(e,t);if(!g.current)return;h.current=!1,s(a?"second_factor":"signed_in")}catch(a){y(a)}},[k,y]),E=(0,l.useCallback)(async()=>{s("working"),o(null);try{const e=await j();if(!g.current)return;h.current=!1,s(e?"second_factor":"signed_in")}catch(e){y(e)}},[j,y]),N=(0,l.useCallback)(async()=>{s("working"),o(null);try{await S()}catch(e){y(e)}},[S,y]),_=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{if(!p.current&&await k(e,t))return h.current=!0,void(g.current&&s("second_factor"));await S()}catch(a){y(a)}},[k,S,y]),I=(0,l.useCallback)(async()=>{s("working"),o(null);try{if(await j())return h.current=!0,void(g.current&&s("second_factor"));await S()}catch(e){y(e)}},[j,S,y]),L=(0,l.useCallback)(async(e,t)=>{s("working"),o(null);try{const a=await x(hs,{approval_ticket:u.current,method:e,code:t});if(p.current=a.approval_ticket,u.current=null,h.current)return void(await S());g.current&&s("signed_in")}catch(a){y(a)}},[x,S,y]),A=(0,l.useCallback)(()=>o(null),[]);return{status:e,info:t,error:r,email:i,isAuthenticated:null!==p.current,isSecondFactorPending:null!==u.current,secondFactorMethods:m,submitCode:C,signInWithPassword:M,signInWithPasskey:E,approve:N,confirmWithPassword:_,confirmWithPasskey:I,submitSecondFactor:L,clearError:A}},ws=(e={})=>{const s=Oe(),[t,a]=(0,l.useReducer)(J,Z),[r,o]=(0,l.useState)(!1),[i,n]=(0,l.useState)(!1),c=(0,l.useRef)(0),d=(0,l.useRef)(!1),p=(0,l.useRef)(!1),u=(0,l.useRef)(t.step);u.current=t.step;const h=(0,l.useRef)(e);h.current=e,(0,l.useEffect)(()=>()=>{c.current+=1},[]);const m=(0,l.useCallback)(e=>{const s=q(e);return null!==s&&(c.current+=1,d.current=!1,p.current=!1,o(!1),n(!1),a({type:"ENTER",step:s}),"link"===s.kind&&h.current.onRelease?.(),!0)},[]),f=(0,l.useCallback)(async e=>{const t=u.current;if("code"!==t.kind||d.current)return null;const r=c.current;d.current=!0,o(!0),a({type:"VERIFY_STARTED"});try{const o=await s.verifyEmailCode({challenge_id:t.challengeId,otp:e});return r!==c.current?null:null!==q(o)?(m(o),null):(a({type:"VERIFY_OK"}),h.current.onRelease?.(),o)}catch(i){return r!==c.current||(console.error("[passflow] email code verification failed",i),d.current=!1,o(!1),a({type:"VERIFY_FAILED",message:I(i)})),null}},[s,m]),g=(0,l.useCallback)(async()=>{const e=h.current.resend;if(!e||"code"!==u.current.kind||d.current||p.current)return null;const s=c.current;p.current=!0,n(!0);try{const t=await e();if(s!==c.current)return null;const r=q(t);if("code"===r?.kind)a({type:"RESENT",challengeId:r.challengeId,message:r.message});else{if("link"!==r?.kind)return h.current.onRelease?.(),t??null;a({type:"LINK_SENT",message:r.message}),h.current.onRelease?.()}return null}catch(t){return s!==c.current||(console.error("[passflow] email code resend failed",t),a({type:"RESEND_FAILED",message:I(t)})),null}finally{s===c.current&&(p.current=!1,n(!1))}},[]),w=(0,l.useCallback)(()=>{if(d.current)return;const e=u.current;c.current+=1,p.current=!1,n(!1),a({type:"CANCEL"}),"code"===e.kind&&s.twoFactor?.clearPartialAuthState(),h.current.onRelease?.()},[s]);return{step:t.step,enter:m,verify:f,resend:g,canResend:Boolean(e.resend)&&"code"===t.step.kind,cancel:w,isVerifying:r,isResending:i,error:t.error}},xs=()=>{const e=Oe(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{try{return i(!0),await e.sendPasswordResetEmail(s),i(!1),!0}catch(a){return t(!0),r(a.message),!1}},[e.sendPasswordResetEmail]),isLoading:o,isError:s,error:a,reset:()=>{t(!1),r(""),i(!1)}}},ys=()=>{const e=Oe(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{i(!0),r(!1),t("");try{return await e.joinInvitation(s),!0}catch(a){return console.error("[passflow] accepting invitation failed",a),r(!0),t((e=>E(e)??"We couldn't accept this invitation. Try again.")(a)),!1}finally{i(!1)}},[e.joinInvitation]),isLoading:o,isError:a,error:s}},vs=e=>{if(!e)return{};const s=g.default.parse(e.startsWith("?")?e.slice(1):e);return Object.fromEntries(Object.entries(s).map(([e,s])=>[e,String(s)]))},Cs=()=>{const{navigate:e,setNavigate:s,router:t,twoFactorVerifyPath:a,setTwoFactorVerifyPath:r}=(0,l.useContext)(Je);return{navigate:e,setNavigate:(0,l.useCallback)(e=>{if(!e)return void s(null);s(s=>{const{to:a,search:r="",replace:o=!1}=s;switch(t){case"react-router":e({pathname:a,search:r.startsWith("?")?r:`?${r}`,replace:o});break;case"tanstack-router":e({to:a,search:vs(r),replace:o});break;case"wouter":e({to:`${a}${r?r.startsWith("?")?r:`?${r}`:""}`,replace:o});break;default:{const e=r?r.startsWith("?")?r:`?${r}`:"";o?window.location.replace(`${a}${e}`):window.location.href=`${a}${e}`}}})},[s,t]),router:t,twoFactorVerifyPath:a,setTwoFactorVerifyPath:r}},bs=(e,s)=>{(0,l.useEffect)(()=>{const t=t=>{e.current&&!e.current.contains(t.target)&&s&&s()};return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}},[s,e])},ks=()=>{const e=Oe(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async s=>{i(!0),r(!1),t("");try{return await e.passwordlessSignInComplete(s)}catch(a){return console.error("[passflow] passwordless verification failed",a),r(!0),t(k),null}finally{i(!1)}},[e]),isLoading:o,isError:a,error:s,reset:()=>{r(!1),t(""),i(!1)}}},js=e=>e&&ve(e)?e:e?`${window.location.origin}${e.startsWith("/")?"":"/"}${e}`:"",Ss=(e,s)=>{const t=Oe(),a=(0,l.useContext)(Ke),r={redirect_url:js(e),scopes:a?.state.scopes,create_tenant:s};return{federatedWithPopup:(e,s)=>t.federatedAuthWithPopup({provider:e,invite_token:s,...r}),federatedWithRedirect:(e,s)=>t.federatedAuthWithRedirect({provider:e,invite_token:s,...r})}},Ms={isFailing:!1,since:null,nextRetryAt:null},Es=[n.PassflowEvent.RefreshFailing,n.PassflowEvent.RefreshRecovered,n.PassflowEvent.SessionExpired,n.PassflowEvent.SignOut,n.PassflowEvent.SignIn,n.PassflowEvent.Register];var Ns=()=>{const e=Oe(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(!1),d=ws();return{fetch:(0,l.useCallback)(async(s,a)=>{i(!0),t(!1),r("");try{const t=a?await e.resetPassword(s,void 0,a):await e.resetPassword(s);return!d.enter(t)}catch(o){return console.error("[passflow] password change failed",o),t(!0),r((e=>{if(A(e))return"Your password was saved, but we cannot send a verification code right now. Wait a few minutes, then sign in with your new password.";const s=E(e);if(null!==s)return s;const t=M(e),a=S(t,"id"),r=S(t,"status");return"string"==typeof a&&a.startsWith("error.token.")||"number"==typeof r&&r>=400&&r<500?L:"We couldn't save your password. Try again."})(o)),c(A(o)),!1}finally{i(!1)}},[e.resetPassword,d.enter]),isLoading:o,isError:s,error:a,isPasswordSaved:n,reset:()=>{t(!1),r(""),i(!1),c(!1)},emailCode:d}};var _s=()=>{const e=Oe(),s=(0,l.useRef)(null),t=(0,l.useCallback)(async()=>{const t=s.current;if(!t)throw new Error("Nothing to resend");return e.signIn(t)},[e]),a=ws({resend:t,onRelease:()=>{s.current=null}});(0,l.useEffect)(()=>()=>{s.current=null},[]);const[r,o]=(0,l.useState)(null),[i,n]=(0,l.useState)(!1),[c,d]=(0,l.useState)(!1),p=(0,l.useCallback)(async(t,i)=>{d(!0),n(!1),o(null);try{if("password"===i){const r=await e.signIn(t);if(s.current=t,a.enter(r))return!1;s.current=null}else{if("passkey"!==i)return await e.passwordlessSignIn(t);await e.passkeyAuthenticate(t)}return!0}catch(r){return console.error(`[passflow] ${i} sign-in failed`,r),n(!0),o(N(r,"sign-in",i)),!1}finally{d(!1)}},[e.passkeyAuthenticate,e.passwordlessSignIn,e.signIn,a.enter]);return{fetch:p,isLoading:c,isError:i,error:r,reset:()=>{n(!1),o(null),d(!1)},emailCode:a}},Is=()=>{const e=Oe(),s=(0,l.useRef)(null),t=(0,l.useCallback)(async()=>{const t=s.current;if(!t)throw new Error("Nothing to resend");return e.signUp(t)},[e]),a=ws({resend:t,onRelease:()=>{s.current=null}});(0,l.useEffect)(()=>()=>{s.current=null},[]);const[r,o]=(0,l.useState)(!1),[i,n]=(0,l.useState)(null),[c,d]=(0,l.useState)(!1),p=(0,l.useCallback)(async(t,r)=>{d(!0),o(!1),n(null);const l=()=>d(!1);try{if("password"===r){const r=await e.signUp(t);if(s.current=t,a.enter(r))return!1;s.current=null}else{if("passkey"!==r){const s=await e.passwordlessSignIn(t);return l(),s}await e.passkeyRegister(t)}return l(),!0}catch(i){return console.error(`[passflow] ${r} sign-up failed`,i),o(!0),n(N(i,"sign-up",r)),l(),!1}finally{l()}},[e.signUp,e.passkeyRegister,e.passwordlessSignIn,a.enter]);return{fetch:p,isLoading:c,isError:r,error:i,reset:()=>{o(!1),n(null),d(!1)},emailCode:a}},Ls=()=>{const e=Oe(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)(null),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(null);return{challenge:s,isLoading:o,error:n,requestChallenge:(0,l.useCallback)(async s=>{i(!0),c(null);try{const a=await e.twoFactor.requestChallenge({first_factor_method:s});t(a),r(a.method)}catch(a){c(a),t(null)}finally{i(!1)}},[e]),verify:(0,l.useCallback)(async(t,r=!1)=>{if(!s?.challenge_id)return c(new Error("No active challenge session")),null;i(!0),c(null);try{return await e.twoFactor.verifyV2({challenge_id:s.challenge_id,method:a||s.method,response:t,trust_device:r})}catch(o){return c(o),null}finally{i(!1)}},[e,s,a]),switchMethod:(0,l.useCallback)(async a=>{if(s?.challenge_id){i(!0),c(null);try{const o=await e.twoFactor.switchToAlternative({challenge_id:s.challenge_id,method:a});t(o),r(a)}catch(o){c(o)}finally{i(!1)}}else c(new Error("No active challenge session"))},[e,s]),selectedMethod:a,reset:(0,l.useCallback)(()=>{t(null),r(null),c(null),i(!1)},[])}},As=()=>{const e=Oe(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)([]),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(!1),[d,p]=(0,l.useState)(""),[u,h]=(0,l.useState)("idle");return{setupData:s,recoveryCodes:a,step:u,beginSetup:(0,l.useCallback)(async()=>{i(!0),c(!1),p("");try{const s=await e.beginTwoFactorSetup();return t(s),h("setup"),s}catch(s){return c(!0),p(s.message),null}finally{i(!1)}},[e]),confirmSetup:(0,l.useCallback)(async s=>{i(!0),c(!1),p("");try{const t=await e.confirmTwoFactorSetup(s);return r(t.recovery_codes),h("complete"),t}catch(t){return c(!0),p(t.message),null}finally{i(!1)}},[e]),reset:(0,l.useCallback)(()=>{t(null),r([]),c(!1),p(""),h("idle")},[]),isLoading:o,isError:n,error:d}},Ps=e=>{const s=Oe(),[t,a]=(0,l.useState)(!0),[r,o]=(0,l.useState)(!1),[i,n]=(0,l.useState)(!1),[c,d]=(0,l.useState)(null),[p,u]=(0,l.useState)(null),[h,m]=(0,l.useState)(null),[f,g]=(0,l.useState)(null),[w,x]=(0,l.useState)(null),[y,v]=(0,l.useState)(null),[C,b]=(0,l.useState)(null),k=(0,l.useRef)(!0),j=(0,l.useRef)(null),S=(0,l.useCallback)(e=>{j.current&&clearInterval(j.current),v(e),j.current=setInterval(()=>{v(e=>null===e||e<=1?(j.current&&(clearInterval(j.current),j.current=null),null):e-1)},1e3)},[]),M=(0,l.useCallback)(async(t=!1)=>{if(t||C!==e||!i){t?o(!0):a(!0),d(null);try{const t=await s.validateTwoFactorSetupMagicLink(e);t.success&&t.sessionToken&&t.userId?(u(t.sessionToken),m(t.userId),g(t.appId??null),x(t.expiresIn??null),n(!0),b(e),v(null),k.current=!1):t.error&&(d(t.error),n(!1),k.current=!0,"RATE_LIMITED"===t.error.code&&t.error.retryAfter&&S(t.error.retryAfter))}catch(r){d({code:"SERVER_ERROR",message:r instanceof Error?r.message:"An unexpected error occurred"}),n(!1),k.current=!0}finally{a(!1),o(!1)}}},[e,C,i,s,S]),E=(0,l.useCallback)(async()=>{null!==y&&y>0||(b(null),await M(!0))},[M,y]);return(0,l.useEffect)(()=>{if(!e)return d({code:"INVALID_TOKEN",message:"No token provided"}),void a(!1);e!==C&&M()},[e,C,M]),(0,l.useEffect)(()=>()=>{j.current&&clearInterval(j.current),k.current&&s.clearMagicLinkSession?.()},[s]),{isLoading:t,isRetrying:r,isValidated:i,error:c,sessionToken:p,userId:h,appId:f,expiresIn:w,retryCountdown:y,retry:E}},Fs=()=>{const e=Oe(),[s,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(""),[n,c]=(0,l.useState)(null),[d,p]=(0,l.useState)(null),u=(0,l.useCallback)(()=>e.isTwoFactorVerificationRequired(),[e]),h=(0,l.useCallback)(e=>{const s=e,t=function(e){const s=e.toLowerCase();return B.expired.some(e=>s.includes(e.toLowerCase()))?{type:"expired",message:e,isRecoverable:!0,shouldAutoRedirect:!0}:B.not_enabled.some(e=>s.includes(e.toLowerCase()))?{type:"not_enabled",message:e,isRecoverable:!1,shouldAutoRedirect:!1}:B.invalid_code.some(e=>s.includes(e.toLowerCase()))?{type:"invalid_code",message:e,isRecoverable:!0,shouldAutoRedirect:!1}:{type:"generic",message:e,isRecoverable:!0,shouldAutoRedirect:!1}}(s.message);r(!0),i(s.message),c(t.type),p(t)},[]);return{isVerificationRequired:u,verify:(0,l.useCallback)(async(s,a)=>{t(!0),r(!1),i(""),c(null),p(null);try{return await e.verifyTwoFactor(s,a)}catch(o){return h(o),null}finally{t(!1)}},[e,h]),useRecoveryCode:(0,l.useCallback)(async(s,a)=>{t(!0),r(!1),i(""),c(null),p(null);try{return await e.useTwoFactorRecoveryCode(s,a)}catch(o){return h(o),null}finally{t(!1)}},[e,h]),reset:(0,l.useCallback)(()=>{r(!1),i(""),c(null),p(null)},[]),isLoading:s,isError:a,error:o,errorType:n,errorDetails:d}},Ts=[],Rs=({id:e,name:s,onChange:t,isError:a=!1,className:r="",disabled:o=!1,...i})=>{const[n,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(""),[h,g]=(0,l.useState)(!1),w=(0,l.useRef)(null),x=(0,l.useRef)(null);(0,l.useEffect)(()=>{n&&x.current?.focus()},[n]),bs(w,()=>{c(!1),u("")});const y=Intl.DateTimeFormat().resolvedOptions().timeZone,v=(0,m.getCountryForTimezone)(y),{inputValue:C,country:b,setCountry:k,handlePhoneValueChange:j,inputRef:S}=(0,f.usePhoneInput)({defaultCountry:v?.id.toLocaleLowerCase()||"us"}),M=(0,l.useMemo)(()=>f.defaultCountries.filter(e=>{const{name:s}=(0,f.parseCountry)(e);return s.toLowerCase().includes(d.toLowerCase())}),[d]),E=(0,l.useMemo)(()=>f.defaultCountries.filter(e=>{const{iso2:s}=(0,f.parseCountry)(e);return s===v?.id.toLocaleLowerCase()}),[v?.id]),N=(0,l.useMemo)(()=>{if(d)return M;const e=new Set(E.map(e=>(0,f.parseCountry)(e).iso2));return M.filter(s=>!e.has((0,f.parseCountry)(s).iso2))},[d,M,E]),_=(e=!1)=>{c(!1),u(""),e&&w.current?.querySelector(".passflow-button-show-country")?.focus()},I=e=>{k(e),_(!0)},L=e=>{const{name:s,dialCode:t,iso2:a}=(0,f.parseCountry)(e);return(0,p.jsxs)("div",{role:"option","aria-selected":a===b.iso2,tabIndex:0,title:s,onClick:()=>I(a),onKeyDown:e=>((e,s)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void I(s);if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;e.preventDefault();const t=Array.from(w.current?.querySelectorAll('[role="option"]')??[]),a=t.indexOf(e.currentTarget);t["ArrowDown"===e.key?Math.min(a+1,t.length-1):Math.max(a-1,0)]?.focus()})(e,a),className:"passflow-country-search-item",children:[(0,p.jsx)(Ne,{iso2:a,className:"passflow-country-search-flag"}),(0,p.jsx)("span",{className:"passflow-country-search-name",children:s}),(0,p.jsxs)("span",{className:"passflow-country-search-code",children:["+",t]})]},a)};return(0,p.jsxs)("div",{ref:w,className:O("passflow-field-phone-wrapper",{"passflow-field-phone-wrapper--focus":h,"passflow-field-phone-wrapper--error":a},r),children:[(0,p.jsxs)(je,{type:"button",variant:"clean",onClick:()=>n?_(!0):c(!0),size:"big",className:"passflow-button-show-country",disabled:o,"aria-label":`Select country, current ${b.iso2.toUpperCase()}`,"aria-haspopup":"listbox","aria-expanded":n,"aria-controls":"passflow-country-options",children:[(0,p.jsx)(Ne,{iso2:b.iso2}),(0,p.jsx)(Vs,{type:"general",id:"caret-down",size:"small"})]}),n?(0,p.jsxs)("div",{className:"passflow-field-country-search-wrapper",children:[(0,p.jsx)("input",{ref:x,role:"combobox","aria-label":"Search countries","aria-expanded":"true","aria-controls":"passflow-country-options","aria-autocomplete":"list",value:d,onChange:e=>u(e.target.value),onKeyDown:e=>{"Escape"===e.key&&_(!0),"ArrowDown"===e.key&&(e.preventDefault(),w.current?.querySelector('[role="option"]')?.focus())},className:"passflow-field-country-search",onFocus:()=>g(!0),onBlur:()=>g(!1),placeholder:"Search for a country"}),(0,p.jsx)("div",{className:"passflow-field-country-search-icon",children:(0,p.jsx)(Vs,{type:"general",id:"search",size:"small"})})]}):(0,p.jsx)("input",{...i,id:e,name:s,ref:S,type:"tel",value:C,disabled:o,"aria-invalid":a,onChange:e=>{j(e),t(e)},onFocus:()=>g(!0),onBlur:()=>g(!1),className:"passflow-field-phone-input"}),(0,p.jsx)("div",{id:"passflow-country-options",role:"listbox",tabIndex:-1,"aria-label":"Countries","aria-hidden":!n,className:O("passflow-country-search-wrapper",{"passflow-country-search-wrapper--show":n,"passflow-country-search-wrapper--hidden":!n,"passflow-country-search-wrapper--without-preferred":!!d||0===E.length}),children:M.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{role:"presentation","aria-hidden":"true",className:"passflow-country-search-sticky-top"}),!d&&E.length>0?(0,p.jsxs)(p.Fragment,{children:[E.map(L),(0,p.jsx)("div",{role:"presentation",className:"passflow-country-search-divider",children:"All countries"})]}):null,N.map(L),(0,p.jsx)("div",{role:"presentation","aria-hidden":"true",className:"passflow-country-search-sticky-bottom"})]}):(0,p.jsx)("div",{role:"presentation",className:"passflow-country-search-no-matches",children:"No matches"})})]})},Us=(0,l.forwardRef)(({id:e,isError:s=!1,className:t="",disabled:a=!1,...r},o)=>(0,p.jsx)("input",{ref:o,id:e,type:"text",className:O("passflow-field-input passflow-field--focused",{"passflow-field--error":s},t),disabled:a,...r})),Ys="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.9289%2012.9289H10.8545V9.68033C10.8545%208.90563%2010.8407%207.90839%209.77562%207.90839C8.69517%207.90839%208.52983%208.7524%208.52983%209.62391V12.9287H6.45547V6.24817H8.44688V7.16113H8.47481C8.88025%206.46785%209.63695%206.05224%2010.4396%206.08204C12.5421%206.08204%2012.9297%207.46497%2012.9297%209.2641L12.9289%2012.9289ZM4.11485%205.33497C3.45446%205.33497%202.91079%204.79161%202.91079%204.1312C2.91079%203.47081%203.45421%202.92738%204.1146%202.92738C4.77493%202.92738%205.31829%203.47068%205.31841%204.13096C5.31841%204.79123%204.77512%205.33491%204.11485%205.33497ZM5.15203%2012.9289H3.07549V6.24817H5.15203V12.9289ZM13.963%201.00097H2.03305C1.47303%200.994641%201.00683%201.45002%201%202.01004V13.9897C1.00658%2014.55%201.47272%2015.0059%202.03305%2014.9999H13.963C14.5247%2015.007%2014.9925%2014.5511%2015%2013.9897V2.00923C14.9925%201.44802%2014.5241%200.992699%2013.963%201.00009V1.00097Z'%20fill='%230A66C2'/%3e%3c/svg%3e",Vs=({type:e,id:s,size:t,className:a="",decorative:r=!1,matchTextColor:o=!1})=>{const i={"passflow-icon--small":"small"===t,"passflow-icon--medium":"medium"===t,"passflow-icon--big":"big"===t,"passflow-icon--large":"large"===t},n={general:{logo:"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='8'%20fill='%231E1E1E'%20/%3e%3cpath%20d='M21.2532%2031H13.6932V12.52H24.9012C25.9252%2012.52%2026.8612%2012.72%2027.7092%2013.12C28.5732%2013.504%2029.2612%2014.184%2029.7732%2015.16C30.2852%2016.12%2030.5412%2017.456%2030.5412%2019.168C30.5412%2020.848%2030.2772%2022.184%2029.7492%2023.176C29.2212%2024.152%2028.5252%2024.856%2027.6612%2025.288C26.8132%2025.704%2025.8932%2025.912%2024.9012%2025.912H21.2532V31ZM23.1252%2018.592H20.8212V19.888H23.1972C23.3252%2019.888%2023.4612%2019.848%2023.6052%2019.768C23.7652%2019.688%2023.8452%2019.52%2023.8452%2019.264C23.8452%2018.992%2023.7572%2018.816%2023.5812%2018.736C23.4052%2018.64%2023.2532%2018.592%2023.1252%2018.592Z'%20fill='white'%20/%3e%3c/svg%3e","logo-red":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='8'%20fill='%23D85D5D'%20/%3e%3cpath%20d='M21.2532%2031H13.6932V12.52H24.9012C25.9252%2012.52%2026.8612%2012.72%2027.7092%2013.12C28.5732%2013.504%2029.2612%2014.184%2029.7732%2015.16C30.2852%2016.12%2030.5412%2017.456%2030.5412%2019.168C30.5412%2020.848%2030.2772%2022.184%2029.7492%2023.176C29.2212%2024.152%2028.5252%2024.856%2027.6612%2025.288C26.8132%2025.704%2025.8932%2025.912%2024.9012%2025.912H21.2532V31ZM23.1252%2018.592H20.8212V19.888H23.1972C23.3252%2019.888%2023.4612%2019.848%2023.6052%2019.768C23.7652%2019.688%2023.8452%2019.52%2023.8452%2019.264C23.8452%2018.992%2023.7572%2018.816%2023.5812%2018.736C23.4052%2018.64%2023.2532%2018.592%2023.1252%2018.592Z'%20fill='white'%20/%3e%3c/svg%3e",warning:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_823)'%3e%3cpath%20d='M7.99992%205.33334V8M7.99992%2010.6667H8.00659M14.6666%208C14.6666%2011.6819%2011.6818%2014.6667%207.99992%2014.6667C4.31802%2014.6667%201.33325%2011.6819%201.33325%208C1.33325%204.3181%204.31802%201.33334%207.99992%201.33334C11.6818%201.33334%2014.6666%204.3181%2014.6666%208Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_823'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",mail:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.33337%204.66666L6.77665%208.47696C7.21743%208.78551%207.43783%208.93978%207.67755%208.99954C7.8893%209.05232%208.11078%209.05232%208.32253%208.99954C8.56226%208.93978%208.78265%208.78551%209.22343%208.47696L14.6667%204.66666M4.53337%2013.3333H11.4667C12.5868%2013.3333%2013.1469%2013.3333%2013.5747%2013.1153C13.951%2012.9236%2014.257%2012.6176%2014.4487%2012.2413C14.6667%2011.8135%2014.6667%2011.2534%2014.6667%2010.1333V5.86666C14.6667%204.74656%2014.6667%204.18651%2014.4487%203.75868C14.257%203.38236%2013.951%203.0764%2013.5747%202.88465C13.1469%202.66666%2012.5868%202.66666%2011.4667%202.66666H4.53337C3.41327%202.66666%202.85322%202.66666%202.42539%202.88465C2.04907%203.0764%201.74311%203.38236%201.55136%203.75868C1.33337%204.18651%201.33337%204.74656%201.33337%205.86666V10.1333C1.33337%2011.2534%201.33337%2011.8135%201.55136%2012.2413C1.74311%2012.6176%202.04907%2012.9236%202.42539%2013.1153C2.85322%2013.3333%203.41327%2013.3333%204.53337%2013.3333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",edit:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.6231%206.86026L9.13975%204.37687M2%2014L4.10117%2013.7665C4.35789%2013.738%204.48624%2013.7238%204.60622%2013.6849C4.71266%2013.6505%204.81395%2013.6018%204.90735%2013.5402C5.01263%2013.4708%205.10395%2013.3794%205.28659%2013.1968L13.4857%204.99772C14.1714%204.31195%2014.1714%203.2001%2013.4857%202.51433C12.7999%201.82856%2011.6881%201.82856%2011.0023%202.51433L2.80321%2010.7134C2.62056%2010.896%202.52924%2010.9874%202.45982%2011.0926C2.39823%2011.186%202.34955%2011.2873%202.31509%2011.3938C2.27625%2011.5138%202.26199%2011.6421%202.23346%2011.8988L2%2014Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","eye-on":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.61342%208.47545C1.52262%208.33169%201.47723%208.25981%201.45182%208.14895C1.43273%208.06567%201.43273%207.93434%201.45182%207.85106C1.47723%207.74019%201.52262%207.66831%201.61341%207.52455C2.36369%206.33656%204.59693%203.33334%208.00027%203.33334C11.4036%203.33334%2013.6369%206.33656%2014.3871%207.52455C14.4779%207.66831%2014.5233%207.74019%2014.5487%207.85106C14.5678%207.93434%2014.5678%208.06567%2014.5487%208.14895C14.5233%208.25981%2014.4779%208.33169%2014.3871%208.47545C13.6369%209.66344%2011.4036%2012.6667%208.00027%2012.6667C4.59693%2012.6667%202.36369%209.66344%201.61342%208.47545Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00027%2010C9.10484%2010%2010.0003%209.10457%2010.0003%208C10.0003%206.89543%209.10484%206%208.00027%206C6.8957%206%206.00027%206.89543%206.00027%208C6.00027%209.10457%206.8957%2010%208.00027%2010Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","eye-off":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.16196%203.39488C7.4329%203.35482%207.7124%203.33333%208.00028%203.33333C11.4036%203.33333%2013.6369%206.33656%2014.3871%207.52455C14.4779%207.66833%2014.5233%207.74023%2014.5488%207.85112C14.5678%207.93439%2014.5678%208.06578%2014.5487%208.14905C14.5233%208.25993%2014.4776%208.3323%2014.3861%208.47705C14.1862%208.79343%2013.8814%209.23807%2013.4777%209.7203M4.48288%204.47669C3.0415%205.45447%202.06297%206.81292%201.61407%207.52352C1.52286%207.66791%201.47725%207.74011%201.45183%207.85099C1.43273%207.93426%201.43272%208.06563%201.45181%208.14891C1.47722%208.25979%201.52262%208.33168%201.61342%208.47545C2.36369%209.66344%204.59694%2012.6667%208.00028%2012.6667C9.37255%2012.6667%2010.5546%2012.1784%2011.5259%2011.5177M2.00028%202L14.0003%2014M6.58606%206.58579C6.22413%206.94772%206.00028%207.44772%206.00028%208C6.00028%209.10457%206.89571%2010%208.00028%2010C8.55256%2010%209.05256%209.77614%209.41449%209.41421'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",search:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014L11.1%2011.1M12.6667%207.33333C12.6667%2010.2789%2010.2789%2012.6667%207.33333%2012.6667C4.38781%2012.6667%202%2010.2789%202%207.33333C2%204.38781%204.38781%202%207.33333%202C10.2789%202%2012.6667%204.38781%2012.6667%207.33333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","caret-down":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%206L8%2010L12%206H4Z'%20fill='%236B6F76'/%3e%3c/svg%3e",label:"data:image/svg+xml,%3csvg%20width='43'%20height='10'%20viewBox='0%200%2043%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.91%209H5.346L5.236%207.988H3.674L3.564%209H0L2.178%200.53H6.732L8.91%209ZM4.158%203.665L4.037%204.721H4.873L4.752%203.665H4.158ZM16.6389%206.712C16.5215%207.482%2016.1145%208.087%2015.4179%208.527C14.7212%208.95967%2013.8082%209.176%2012.6789%209.176C11.5495%209.176%2010.6365%208.95967%209.93988%208.527C9.25054%208.09433%208.84354%207.49667%208.71888%206.734C8.68954%206.52867%208.66388%206.25367%208.64188%205.909C8.62721%205.557%208.61988%205.17933%208.61988%204.776C8.61988%204.38733%208.62721%204.028%208.64188%203.698C8.66388%203.36067%208.68954%203.09667%208.71888%202.906C8.84354%202.09933%209.25421%201.47233%209.95088%201.025C10.6475%200.577666%2011.5569%200.354%2012.6789%200.354C13.8082%200.354%2014.7212%200.577666%2015.4179%201.025C16.1145%201.465%2016.5215%202.07733%2016.6389%202.862C16.6682%203.05267%2016.6902%203.31667%2016.7049%203.654C16.7269%203.984%2016.7379%204.347%2016.7379%204.743C16.7379%205.161%2016.7269%205.54233%2016.7049%205.887C16.6902%206.23167%2016.6682%206.50667%2016.6389%206.712ZM12.9759%206.206V3.324C12.9759%203.126%2012.8769%203.027%2012.6789%203.027C12.4809%203.027%2012.3819%203.126%2012.3819%203.324V6.206C12.3819%206.404%2012.4809%206.503%2012.6789%206.503C12.8769%206.503%2012.9759%206.404%2012.9759%206.206ZM25.1574%206.712C25.0401%207.482%2024.6331%208.087%2023.9364%208.527C23.2398%208.95967%2022.3268%209.176%2021.1974%209.176C20.0681%209.176%2019.1551%208.95967%2018.4584%208.527C17.7691%208.09433%2017.3621%207.49667%2017.2374%206.734C17.2081%206.52867%2017.1824%206.25367%2017.1604%205.909C17.1458%205.557%2017.1384%205.17933%2017.1384%204.776C17.1384%204.38733%2017.1458%204.028%2017.1604%203.698C17.1824%203.36067%2017.2081%203.09667%2017.2374%202.906C17.3621%202.09933%2017.7728%201.47233%2018.4694%201.025C19.1661%200.577666%2020.0754%200.354%2021.1974%200.354C22.3268%200.354%2023.2398%200.577666%2023.9364%201.025C24.6331%201.465%2025.0401%202.07733%2025.1574%202.862C25.1868%203.05267%2025.2088%203.31667%2025.2234%203.654C25.2454%203.984%2025.2564%204.347%2025.2564%204.743C25.2564%205.161%2025.2454%205.54233%2025.2234%205.887C25.2088%206.23167%2025.1868%206.50667%2025.1574%206.712ZM21.4944%206.206V3.324C21.4944%203.126%2021.3954%203.027%2021.1974%203.027C20.9994%203.027%2020.9004%203.126%2020.9004%203.324V6.206C20.9004%206.404%2020.9994%206.503%2021.1974%206.503C21.3954%206.503%2021.4944%206.404%2021.4944%206.206ZM33.555%200.53V3.797H31.432V9H27.769V3.797H25.635V0.53H33.555ZM38.4495%202.906V0.53H42.0135V9H38.4495V6.272H37.5585V9H33.9945V0.53H37.5585V2.906H38.4495Z'%20fill='%236B6F76'/%3e%3c/svg%3e",close:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6666%2010.6667L7.99993%208.00001M7.99993%208.00001L5.33325%205.33333M7.99993%208.00001L10.6666%205.33333M7.99993%208.00001L5.33325%2010.6667'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",check:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%208L6.82843%2010.8284L12.4847%205.17155'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",key:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.1111%206.1333C11.1111%205.81483%2010.9896%205.49636%2010.7466%205.25338C10.5037%205.01039%2010.1852%204.88889%209.86669%204.88889M9.86669%209.86667C11.9286%209.86667%2013.6%208.1952%2013.6%206.13333C13.6%204.07147%2011.9286%202.4%209.86669%202.4C7.80483%202.4%206.13336%204.07147%206.13336%206.13333C6.13336%206.30362%206.14476%206.47125%206.16684%206.63549C6.20316%206.90562%206.22131%207.04069%206.20909%207.12615C6.19636%207.21516%206.18015%207.26313%206.13627%207.34163C6.09416%207.41698%206.01993%207.4912%205.87148%207.63965L2.69162%2010.8195C2.584%2010.9271%202.53019%2010.9809%202.49171%2011.0437C2.4576%2011.0994%202.43246%2011.1601%202.41722%2011.2236C2.40002%2011.2952%202.40002%2011.3713%202.40002%2011.5235V12.6044C2.40002%2012.9529%202.40002%2013.1272%202.46784%2013.2603C2.5275%2013.3773%202.62269%2013.4725%202.73976%2013.5322C2.87286%2013.6%203.0471%2013.6%203.39558%2013.6H4.88891V12.3556H6.13336V11.1111H7.3778L8.36037%2010.1285C8.50882%209.98009%208.58305%209.90587%208.6584%209.86375C8.73689%209.81988%208.78486%209.80367%208.87388%209.79093C8.95933%209.77871%209.0944%209.79687%209.36453%209.83319C9.52878%209.85527%209.6964%209.86667%209.86669%209.86667Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",phone:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.49998%2011.6666H8.50665M5.96665%2014.6666H11.0333C11.78%2014.6666%2012.1534%2014.6666%2012.4386%2014.5213C12.6895%2014.3934%2012.8935%2014.1895%2013.0213%2013.9386C13.1666%2013.6534%2013.1666%2013.28%2013.1666%2012.5333V3.46659C13.1666%202.71985%2013.1666%202.34648%2013.0213%202.06126C12.8935%201.81038%2012.6895%201.60641%2012.4386%201.47858C12.1534%201.33325%2011.78%201.33325%2011.0333%201.33325H5.96665C5.21991%201.33325%204.84654%201.33325%204.56133%201.47858C4.31044%201.60641%204.10647%201.81038%203.97864%202.06126C3.83331%202.34648%203.83331%202.71985%203.83331%203.46659V12.5333C3.83331%2013.28%203.83331%2013.6534%203.97864%2013.9386C4.10647%2014.1895%204.31044%2014.3934%204.56133%2014.5213C4.84654%2014.6666%205.21991%2014.6666%205.96665%2014.6666ZM8.83331%2011.6666C8.83331%2011.8507%208.68407%2011.9999%208.49998%2011.9999C8.31588%2011.9999%208.16665%2011.8507%208.16665%2011.6666C8.16665%2011.4825%208.31588%2011.3333%208.49998%2011.3333C8.68407%2011.3333%208.83331%2011.4825%208.83331%2011.6666Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","one-password":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cg%20clip-path='url(%23clip0_2691_4730)'%3e%3cpath%20d='M20.8039%2020.4084V18.2344C20.8039%2017.9893%2021.0026%2017.7906%2021.2477%2017.7906H22.7785C23.0236%2017.7906%2023.2222%2017.9893%2023.2222%2018.2344V22.2139C23.2222%2022.2748%2023.1918%2022.3212%2023.1614%2022.3669L22.7785%2022.7498C22.6864%2022.8419%2022.6864%2022.9797%2022.7785%2023.0558L23.1614%2023.4386C23.1819%2023.4582%2023.198%2023.4821%2023.2086%2023.5085C23.2191%2023.5349%2023.2237%2023.5633%2023.2222%2023.5916V25.7648C23.2222%2025.8825%2023.1755%2025.9954%2023.0923%2026.0786C23.009%2026.1618%2022.8962%2026.2086%2022.7785%2026.2086H21.2477C21.13%2026.2086%2021.0171%2026.1618%2020.9339%2026.0786C20.8507%2025.9954%2020.8039%2025.8825%2020.8039%2025.7648V21.7853C20.8039%2021.7244%2020.8344%2021.678%2020.8648%2021.6323L21.2477%2021.2494C21.3398%2021.1573%2021.3398%2021.0195%2021.2477%2020.9434L20.8648%2020.5606C20.8443%2020.5411%2020.8282%2020.5174%2020.8177%2020.4911C20.8072%2020.4649%2020.8025%2020.4366%2020.8039%2020.4084ZM27.7064%2022C27.7064%2021.2503%2027.5587%2020.5079%2027.2718%2019.8153C26.9849%2019.1227%2026.5644%2018.4933%2026.0343%2017.9632C25.5042%2017.4331%2024.8748%2017.0126%2024.1822%2016.7257C23.4895%2016.4388%2022.7472%2016.2911%2021.9975%2016.2911C21.2478%2016.2911%2020.5054%2016.4388%2019.8128%2016.7257C19.1201%2017.0126%2018.4908%2017.4331%2017.9607%2017.9632C17.4305%2018.4933%2017.01%2019.1227%2016.7231%2019.8153C16.4362%2020.5079%2016.2886%2021.2503%2016.2886%2022C16.2886%2023.5141%2016.89%2024.9662%2017.9607%2026.0368C19.0313%2027.1074%2020.4834%2027.7089%2021.9975%2027.7089C23.5116%2027.7089%2024.9637%2027.1074%2026.0343%2026.0368C27.1049%2024.9662%2027.7064%2023.5141%2027.7064%2022ZM29.5127%2022C29.5127%2026.1477%2026.1452%2029.5%2022.0127%2029.5C17.865%2029.5%2014.5127%2026.1325%2014.5127%2022C14.5127%2017.8523%2017.8802%2014.5%2022.0127%2014.5C26.1452%2014.5%2029.5127%2017.8523%2029.5127%2022Z'%20fill='%237F7F7F'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2691_4730'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(14%2014)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e","browser-chrome":"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cg%20clip-path='url(%23clip0_2691_4741)'%3e%3cpath%20d='M21.9999%2019.3334C20.5272%2019.3334%2019.3333%2020.5273%2019.3333%2022C19.3333%2023.4728%2020.5272%2024.6667%2021.9999%2024.6667C23.4727%2024.6667%2024.6666%2023.4728%2024.6666%2022C24.6666%2020.5273%2023.4727%2019.3334%2021.9999%2019.3334ZM21.9999%2019.3334H28.1133M16.6333%2018.04L19.6933%2023.3334M21.2533%2028.6267L24.3066%2023.3334M28.6666%2022C28.6666%2025.6819%2025.6818%2028.6667%2021.9999%2028.6667C18.318%2028.6667%2015.3333%2025.6819%2015.3333%2022C15.3333%2018.3181%2018.318%2015.3334%2021.9999%2015.3334C25.6818%2015.3334%2028.6666%2018.3181%2028.6666%2022Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2691_4741'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(14%2014)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",passkey:"data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='44'%20height='44'%20rx='6'%20fill='%23F3F5F7'/%3e%3cpath%20d='M25.3333%2020C25.3333%2019.6587%2025.2031%2019.3175%2024.9428%2019.0572C24.6825%2018.7968%2024.3412%2018.6667%2024%2018.6667M24%2024C26.2091%2024%2028%2022.2091%2028%2020C28%2017.7909%2026.2091%2016%2024%2016C21.7909%2016%2020%2017.7909%2020%2020C20%2020.1825%2020.0122%2020.3621%2020.0359%2020.538C20.0748%2020.8275%2020.0942%2020.9722%2020.0811%2021.0637C20.0675%2021.1591%2020.0501%2021.2105%2020.0031%2021.2946C19.958%2021.3753%2019.8785%2021.4549%2019.7194%2021.6139L16.3124%2025.0209C16.1971%2025.1362%2016.1395%2025.1939%2016.0982%2025.2611C16.0617%2025.3208%2016.0348%2025.3858%2016.0184%2025.4538C16%2025.5306%2016%2025.6121%2016%2025.7752V26.9333C16%2027.3067%2016%2027.4934%2016.0727%2027.636C16.1366%2027.7614%2016.2386%2027.8634%2016.364%2027.9273C16.5066%2028%2016.6933%2028%2017.0667%2028H18.6667V26.6667H20V25.3333H21.3333L22.3861%2024.2806C22.5451%2024.1215%2022.6247%2024.042%2022.7054%2023.9969C22.7895%2023.9499%2022.8409%2023.9325%2022.9363%2023.9189C23.0278%2023.9058%2023.1725%2023.9252%2023.462%2023.9641C23.6379%2023.9878%2023.8175%2024%2024%2024Z'%20stroke='%237F7F7F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e","dots-vertical":"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.00004%208.66667C8.36823%208.66667%208.66671%208.36819%208.66671%208C8.66671%207.63181%208.36823%207.33333%208.00004%207.33333C7.63185%207.33333%207.33337%207.63181%207.33337%208C7.33337%208.36819%207.63185%208.66667%208.00004%208.66667Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00004%204C8.36823%204%208.66671%203.70152%208.66671%203.33333C8.66671%202.96514%208.36823%202.66667%208.00004%202.66667C7.63185%202.66667%207.33337%202.96514%207.33337%203.33333C7.33337%203.70152%207.63185%204%208.00004%204Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.00004%2013.3333C8.36823%2013.3333%208.66671%2013.0349%208.66671%2012.6667C8.66671%2012.2985%208.36823%2012%208.00004%2012C7.63185%2012%207.33337%2012.2985%207.33337%2012.6667C7.33337%2013.0349%207.63185%2013.3333%208.00004%2013.3333Z'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",trash:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%202H10M2%204H14M12.6667%204L12.1991%2011.0129C12.129%2012.065%2012.0939%2012.5911%2011.8667%2012.99C11.6666%2013.3412%2011.3648%2013.6235%2011.0011%2013.7998C10.588%2014%2010.0607%2014%209.00623%2014H6.99377C5.93927%2014%205.41202%2014%204.99889%2013.7998C4.63517%2013.6235%204.33339%2013.3412%204.13332%2012.99C3.90607%2012.5911%203.871%2012.065%203.80086%2011.0129L3.33333%204M6.66667%207V10.3333M9.33333%207V10.3333'%20stroke='%236B6F76'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},providers:{google:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.7%208.15554C14.7%207.57997%2014.6533%207.15997%2014.5523%206.72443H7.97998V9.32218H11.8377C11.76%209.96777%2011.34%2010.94%2010.4066%2011.5933L10.3936%2011.6803L12.4716%2013.2901L12.6155%2013.3045C13.9378%2012.0834%2014.7%2010.2867%2014.7%208.15554Z'%20fill='%234285F4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.98022%2015C9.87019%2015%2011.4568%2014.3778%2012.6158%2013.3045L10.4069%2011.5933C9.81576%2012.0055%209.02242%2012.2933%207.98022%2012.2933C6.12911%2012.2933%204.558%2011.0722%203.99793%209.38446L3.91586%209.39143L1.75507%2011.0637L1.72681%2011.1422C2.87791%2013.4289%205.2424%2015%207.98022%2015Z'%20fill='%2334A853'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.9977%209.38448C3.84994%208.94893%203.76439%208.48223%203.76439%208.00002C3.76439%207.51778%203.8499%207.05111%203.98993%206.61557L3.98602%206.52279L1.79819%204.82367L1.72662%204.85773C1.25218%205.80664%200.97998%206.87219%200.97998%207.99998C0.97998%209.12777%201.25223%2010.1933%201.72662%2011.1422L3.99774%209.38443'%20fill='%23FBBC04'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.98022%203.70662C9.29466%203.70662%2010.1813%204.27442%2010.6869%204.7489L12.6625%202.82C11.4492%201.69221%209.87019%201%207.98022%201C5.2424%201%202.87795%202.5711%201.72681%204.85776L3.99016%206.6156C4.558%204.92782%206.12911%203.70666%207.98022%203.70666'%20fill='%23EA4335'/%3e%3c/svg%3e",gitlab:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_834)'%3e%3cpath%20d='M7.99957%2015.3683L10.9471%206.30157H5.05627L7.99957%2015.3683Z'%20fill='%23E24329'/%3e%3cpath%20d='M0.92752%206.30157L0.0299048%209.05617C-0.0513217%209.30625%200.0363974%209.58242%200.25079%209.73834L7.99948%2015.3683L0.92752%206.30157Z'%20fill='%23FCA326'/%3e%3cpath%20d='M0.92749%206.30164H5.05611L3.27927%200.841173C3.18833%200.561813%202.792%200.561813%202.69779%200.841173L0.92749%206.30164Z'%20fill='%23E24329'/%3e%3cpath%20d='M15.0757%206.30157L15.9701%209.05617C16.0513%209.30625%2015.9636%209.58242%2015.7492%209.73834L7.99939%2015.3683L15.0757%206.30157Z'%20fill='%23FCA326'/%3e%3cpath%20d='M15.0757%206.30164H10.947L12.7206%200.841173C12.8116%200.561813%2013.2079%200.561813%2013.3021%200.841173L15.0757%206.30164Z'%20fill='%23E24329'/%3e%3cpath%20d='M7.99939%2015.3683L10.947%206.30157H15.0757L7.99939%2015.3683Z'%20fill='%23FC6D26'/%3e%3cpath%20d='M7.9994%2015.3683L0.92749%206.30157H5.05611L7.9994%2015.3683Z'%20fill='%23FC6D26'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_834'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",apple:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.6167%204.77308C13.5312%204.83608%2012.0218%205.64397%2012.0218%207.44037C12.0218%209.51818%2013.9425%2010.2533%2014%2010.2715C13.9912%2010.3162%2013.6948%2011.2781%2012.9873%2012.2583C12.3564%2013.1207%2011.6976%2013.9818%2010.6952%2013.9818C9.69291%2013.9818%209.43498%2013.4287%208.27784%2013.4287C7.15021%2013.4287%206.74928%2014%205.83245%2014C4.9156%2014%204.27588%2013.2019%203.54034%2012.2218C2.68836%2011.0709%202%209.28291%202%207.58597C2%204.86409%203.86316%203.42054%205.69684%203.42054C6.67116%203.42054%207.48335%204.02821%208.09508%204.02821C8.67726%204.02821%209.58531%203.38414%2010.6937%203.38414C11.1139%203.38414%2012.6233%203.42054%2013.6167%204.77308ZM10.1676%202.23182C10.6259%201.71517%2010.9503%200.998298%2010.9503%200.281428C10.9503%200.182018%2010.9414%200.0812084%2010.9223%200C10.1764%200.0266027%209.28899%200.471848%208.75398%201.0613C8.33385%201.51495%207.94176%202.23182%207.94176%202.95849C7.94176%203.06771%207.96092%203.17691%207.9698%203.21192C8.01697%203.22032%208.09361%203.23012%208.17025%203.23012C8.83946%203.23012%209.68112%202.80448%2010.1676%202.23182Z'%20fill='black'/%3e%3c/svg%3e",atlassian:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.14981%207.46537C4.94085%207.24181%204.61205%207.2541%204.47223%207.54219L1.03899%2014.4048C1.00767%2014.4674%200.992879%2014.5369%200.996019%2014.6068C0.999159%2014.6768%201.02013%2014.7447%201.05693%2014.8042C1.09373%2014.8637%201.14514%2014.9128%201.20627%2014.9469C1.26741%2014.9809%201.33623%2014.9987%201.4062%2014.9987H6.18693C6.26393%2015.0002%206.33969%2014.9792%206.40492%2014.9382C6.47014%2014.8973%206.52201%2014.8382%206.55414%2014.7682C7.58512%2012.641%206.96054%209.39978%205.14981%207.46537Z'%20fill='url(%23paint0_linear_2502_832)'/%3e%3cpath%20d='M7.66883%201.22039C5.74824%204.2626%205.875%207.63208%207.14029%2010.1611L9.44499%2014.7705C9.47857%2014.8394%209.53076%2014.8975%209.59567%2014.9382C9.66057%2014.979%209.73558%2015.0007%209.81221%2015.001H14.5929C14.6629%2015.001%2014.7317%2014.9832%2014.7929%2014.9492C14.854%2014.9151%2014.9054%2014.866%2014.9422%2014.8065C14.979%2014.747%2015%2014.6791%2015.0031%2014.6092C15.0063%2014.5393%2014.9915%2014.4697%2014.9601%2014.4071C14.9601%2014.4071%208.52849%201.53844%208.37023%201.21808C8.22196%200.929997%207.85474%200.923851%207.66883%201.22039Z'%20fill='%232681FF'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_832'%20x1='7.03199'%20y1='8.52553'%20x2='3.40822'%20y2='14.802'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230052CC'/%3e%3cstop%20offset='0.92'%20stop-color='%232684FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",bitbucket:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_831)'%3e%3cpath%20d='M0.519254%200.768994C0.44444%200.768029%200.370321%200.783452%200.302102%200.814182C0.233882%200.84491%200.173216%200.890198%200.124362%200.94687C0.0755086%201.00354%200.0396522%201.07021%200.0193102%201.14222C-0.00103186%201.21422%20-0.00536625%201.28981%200.00661131%201.36366L2.18278%2014.5745C2.2099%2014.7362%202.2931%2014.883%202.41779%2014.9894C2.54249%2015.0959%202.70068%2015.155%202.8646%2015.1563H13.3046C13.4274%2015.1579%2013.5468%2015.1153%2013.6409%2015.0362C13.735%2014.9572%2013.7976%2014.847%2013.8172%2014.7257L15.9934%201.36622C16.0054%201.29237%2016.001%201.21678%2015.9807%201.14478C15.9603%201.07278%2015.9245%201.0061%2015.8756%200.94943C15.8268%200.892766%2015.7661%200.84747%2015.6979%200.816742C15.6297%200.786016%2015.5556%200.770592%2015.4807%200.771557L0.519254%200.768994ZM9.68272%2010.317H6.35057L5.44832%205.60322H10.4902L9.68272%2010.317Z'%20fill='%232684FF'/%3e%3cpath%20d='M15.3013%205.60321H10.4902L9.68272%2010.3169H6.35055L2.41602%2014.9871C2.54072%2015.0949%202.69972%2015.1549%202.86458%2015.1563H13.3071C13.43%2015.1579%2013.5494%2015.1153%2013.6434%2015.0362C13.7375%2014.9572%2013.8001%2014.847%2013.8198%2014.7257L15.3013%205.60321Z'%20fill='url(%23paint0_linear_2502_831)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_831'%20x1='16.4138'%20y1='6.92327'%20x2='8.46264'%20y2='13.1288'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.18'%20stop-color='%230052CC'/%3e%3cstop%20offset='1'%20stop-color='%232684FF'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_2502_831'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",discord:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2502_836)'%3e%3cpath%20d='M13.5535%202.79193C12.5178%202.30734%2011.4104%201.95517%2010.2526%201.75464C10.1104%202.01171%209.94432%202.35748%209.82976%202.63254C8.59904%202.44745%207.37956%202.44745%206.17144%202.63254C6.05693%202.35748%205.88704%202.01171%205.74358%201.75464C4.58454%201.95517%203.47584%202.30864%202.44013%202.79449C0.351095%205.95129%20-0.215207%209.02968%200.0679444%2012.0644C1.4535%2013.099%202.79627%2013.7276%204.11638%2014.139C4.44233%2013.6903%204.73302%2013.2134%204.98345%2012.7109C4.5065%2012.5297%204.04969%2012.306%203.61805%2012.0464C3.73256%2011.9615%203.84457%2011.8729%203.95278%2011.7816C6.58546%2013.013%209.44592%2013.013%2012.0471%2011.7816C12.1566%2011.8729%2012.2686%2011.9615%2012.3819%2012.0464C11.949%2012.3073%2011.491%2012.531%2011.014%2012.7122C11.2644%2013.2134%2011.5538%2013.6916%2011.881%2014.1402C13.2024%2013.7289%2014.5464%2013.1004%2015.932%2012.0644C16.2642%208.5464%2015.3645%205.49628%2013.5535%202.79193ZM5.34212%2010.1981C4.55182%2010.1981%203.9037%209.46024%203.9037%208.56184C3.9037%207.66337%204.53798%206.92429%205.34212%206.92429C6.14628%206.92429%206.79438%207.66207%206.78054%208.56184C6.78178%209.46024%206.14628%2010.1981%205.34212%2010.1981ZM10.6578%2010.1981C9.86752%2010.1981%209.21944%209.46024%209.21944%208.56184C9.21944%207.66337%209.85368%206.92429%2010.6578%206.92429C11.462%206.92429%2012.1101%207.66207%2012.0962%208.56184C12.0962%209.46024%2011.462%2010.1981%2010.6578%2010.1981Z'%20fill='%235865F2'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2502_836'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",dropbox:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.01032%204.15504L4.00518%206.71006L8.01032%209.26513L4.00518%2011.8201L0%209.25129L4.00518%206.69625L0%204.15504L4.00518%201.60001L8.01032%204.15504ZM3.98446%2012.6418L7.98964%2010.0868L11.9948%2012.6418L7.98964%2015.1969L3.98446%2012.6418ZM8.01032%209.25129L12.0155%206.69625L8.01032%204.15504L11.9948%201.60001L16%204.15504L11.9948%206.71006L16%209.26513L11.9948%2011.8201L8.01032%209.25129Z'%20fill='%230061FF'/%3e%3c/svg%3e",facebook:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2015C11.866%2015%2015%2011.866%2015%207.99997C15%204.13401%2011.866%201%208%201C4.134%201%201%204.13401%201%207.99997C1%2011.866%204.134%2015%208%2015Z'%20fill='%231977F3'/%3e%3cpath%20d='M10.6065%2010.1416L10.9172%208.16548H8.97241V6.88336C8.97241%206.34321%209.24363%205.81556%2010.1154%205.81556H11V4.1336C11%204.1336%2010.1973%204%209.43%204C7.82844%204%206.78107%204.94574%206.78107%206.65942V8.16548H5V10.1416H6.78107V14.9174C7.13809%2014.9721%207.50398%2015%207.87671%2015C8.24951%2015%208.6154%2014.9712%208.97241%2014.9174V10.1416H10.6065Z'%20fill='white'/%3e%3c/svg%3e",github:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.97914%201C4.11986%201%201%204.20833%201%208.17748C1%2011.3502%202.999%2014.0359%205.77214%2014.9864C6.11886%2015.0579%206.24586%2014.832%206.24586%2014.642C6.24586%2014.4756%206.23443%2013.9052%206.23443%2013.311C4.293%2013.7388%203.88871%2012.4554%203.88871%2012.4554C3.57671%2011.6235%203.11443%2011.4097%203.11443%2011.4097C2.479%2010.97%203.16071%2010.97%203.16071%2010.97C3.86557%2011.0176%204.23543%2011.7068%204.23543%2011.7068C4.85929%2012.8%205.86457%2012.4911%206.269%2012.3009C6.32671%2011.8375%206.51171%2011.5166%206.70814%2011.3384C5.15971%2011.172%203.53057%2010.5541%203.53057%207.79715C3.53057%207.01285%203.80771%206.37119%204.24686%205.87215C4.17757%205.69394%203.93486%204.95704%204.31629%203.97077C4.31629%203.97077%204.90557%203.7806%206.23429%204.70752C6.80316%204.55041%207.38982%204.47049%207.97914%204.46981C8.56843%204.46981%209.16914%204.55308%209.72386%204.70752C11.0527%203.7806%2011.642%203.97077%2011.642%203.97077C12.0234%204.95704%2011.7806%205.69394%2011.7113%205.87215C12.162%206.37119%2012.4277%207.01285%2012.4277%207.79715C12.4277%2010.5541%2010.7986%2011.1601%209.23857%2011.3384C9.49286%2011.5642%209.71229%2011.9919%209.71229%2012.6693C9.71229%2013.6318%209.70086%2014.4043%209.70086%2014.6418C9.70086%2014.832%209.828%2015.0579%2010.1746%2014.9866C12.9477%2014.0358%2014.9467%2011.3502%2014.9467%208.17748C14.9581%204.20833%2011.8269%201%207.97914%201Z'%20fill='%2324292F'/%3e%3c/svg%3e",hubspot:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.013%205.51301V3.9479C11.4349%203.74999%2011.7057%203.32811%2011.7083%202.86197V2.82551C11.7083%202.15884%2011.1667%201.61978%2010.5026%201.61978H10.4661C9.79948%201.61978%209.26042%202.15884%209.26042%202.82551V2.86197C9.26302%203.32811%209.53385%203.74999%209.95573%203.9479V5.51301C9.35937%205.60415%208.79948%205.85155%208.33073%206.22915L4.03646%202.8828C4.06771%202.77343%204.08333%202.65884%204.08594%202.54426C4.08594%201.79426%203.47917%201.18488%202.72917%201.18488C1.97917%201.18228%201.36979%201.78905%201.36719%202.53905C1.36719%203.29165%201.97396%203.90103%202.72396%203.90103C2.96094%203.90103%203.1901%203.83593%203.39323%203.71874L7.6224%207.0104C6.84635%208.18488%206.86719%209.71353%207.67448%2010.8672L6.38802%2012.1536C6.28646%2012.1198%206.17708%2012.1042%206.06771%2012.1016C5.45313%2012.1016%204.95313%2012.6016%204.95313%2013.2187C4.95313%2013.8333%205.45313%2014.3333%206.06771%2014.3333C6.6849%2014.3333%207.1849%2013.8333%207.1849%2013.2187C7.18229%2013.1094%207.16406%2013%207.13281%2012.8958L8.40365%2011.625C9.54167%2012.5%2011.1016%2012.5755%2012.3177%2011.8125C13.5339%2011.0521%2014.1484%209.61457%2013.8568%208.20832C13.5651%206.80468%2012.4297%205.72915%2011.013%205.51301ZM10.4844%2010.6641C9.84375%2010.6797%209.24479%2010.3489%208.92187%209.79686C8.59635%209.24478%208.59635%208.56249%208.92187%208.0104C9.24479%207.45832%209.84375%207.12759%2010.4844%207.14322C11.4323%207.17707%2012.1823%207.95572%2012.1823%208.90363C12.1849%209.84895%2011.4349%2010.6276%2010.487%2010.6614'%20fill='%23FF7A59'/%3e%3c/svg%3e",linear:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2502_833'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='1'%20y='1'%20width='14'%20height='14'%3e%3cpath%20d='M15%201H1V15H15V1Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2502_833)'%3e%3cpath%20d='M1.17156%209.61322C1.14041%209.48043%201.2986%209.39678%201.39505%209.49324L6.50679%2014.6049C6.60323%2014.7014%206.5196%2014.8596%206.38681%2014.8284C3.80721%2014.2233%201.77669%2012.1928%201.17156%209.61322ZM1.00026%207.56447C0.997795%207.60414%201.01271%207.64286%201.0408%207.67096L8.32907%2014.9592C8.35714%2014.9873%208.39585%2015.0022%208.43554%2014.9997C8.7672%2014.9791%209.09263%2014.9353%209.41029%2014.8701C9.51732%2014.8481%209.55449%2014.7166%209.47721%2014.6394L1.36063%206.52279C1.28337%206.44552%201.15187%206.48271%201.12989%206.58974C1.06466%206.90734%201.02092%207.23279%201.00026%207.56447ZM1.58953%205.15876C1.56622%205.21109%201.57809%205.27224%201.6186%205.31276L10.6872%2014.3814C10.7278%2014.4219%2010.7889%2014.4338%2010.8412%2014.4105C11.0913%2014.2991%2011.3336%2014.1735%2011.5672%2014.0347C11.6445%2013.9888%2011.6565%2013.8826%2011.5929%2013.819L2.18099%204.40714C2.11742%204.34356%202.01121%204.35549%201.96529%204.43279C1.8265%204.66636%201.70091%204.9087%201.58953%205.15876ZM2.77222%203.53036C2.7204%203.47855%202.7172%203.39544%202.76602%203.34079C4.04913%201.9043%205.9156%201%207.99327%201C11.863%201%2015%204.13702%2015%208.00672C15%2010.0844%2014.0957%2011.9509%2012.6592%2013.234C12.6046%2013.2828%2012.5214%2013.2796%2012.4696%2013.2278L2.77222%203.53036Z'%20fill='url(%23paint0_linear_2502_833)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2502_833'%20x1='8'%20y1='1'%20x2='8'%20y2='15'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%235C6BF1'/%3e%3cstop%20offset='1'%20stop-color='%23283188'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",linkedin:Ys,linledin:Ys,microsoft:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201H15V15H1V1Z'%20fill='%23F3F3F3'/%3e%3cpath%20d='M2%202H8V8H2V2Z'%20fill='%23F35325'/%3e%3cpath%20d='M8%202H14V8H8V2Z'%20fill='%2381BC06'/%3e%3cpath%20d='M2%208H8V14H2V8Z'%20fill='%2305A6F0'/%3e%3cpath%20d='M8%208H14V14H8V8Z'%20fill='%23FFBA08'/%3e%3c/svg%3e",notion:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33281%201.60396L10.0795%201.03183C11.031%200.95016%2011.2756%201.00523%2011.8738%201.44016L14.3467%203.18223C14.7546%203.48183%2014.8904%203.5635%2014.8904%203.8897V13.4438C14.8904%2014.0425%2014.6729%2014.3967%2013.9118%2014.4509L4.91582%2014.9955C4.34462%2015.0225%204.07255%2014.9409%203.77341%2014.5596L1.95248%2012.1917C1.62581%2011.7559%201.49048%2011.4297%201.49048%2011.0484V2.55596C1.49048%202.06643%201.70795%201.65809%202.33281%201.60396Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0795%201.03183L2.33281%201.60396C1.70795%201.65809%201.49048%202.06643%201.49048%202.55596V11.0484C1.49048%2011.4297%201.62581%2011.7559%201.95248%2012.1917L3.77341%2014.5596C4.07255%2014.9409%204.34462%2015.0225%204.91582%2014.9955L13.9118%2014.4509C14.6724%2014.3967%2014.8904%2014.0425%2014.8904%2013.4438V3.8897C14.8904%203.5803%2014.7681%203.49116%2014.4083%203.22703C14.3876%203.21212%2014.3669%203.19718%2014.3462%203.18223L11.8738%201.44016C11.2756%201.00523%2011.031%200.95016%2010.0795%201.03183ZM5.11929%203.73336C4.38475%203.78283%204.21815%203.79403%203.80095%203.45476L2.74021%202.61103C2.63241%202.50183%202.68654%202.36556%202.95814%202.33849L10.4052%201.79436C11.0306%201.73976%2011.3563%201.95769%2011.6008%202.14809L12.8781%203.07349C12.9327%203.10103%2013.0685%203.26389%2012.9052%203.26389L5.21449%203.72683L5.11929%203.73336ZM4.26295%2013.3621V5.25144C4.26295%204.89724%204.37168%204.7339%204.69742%204.70637L13.5305%204.1893C13.8301%204.16223%2013.9654%204.35263%2013.9654%204.70637V12.7629C13.9654%2013.1171%2013.9108%2013.4167%2013.4218%2013.4438L4.96902%2013.9338C4.47995%2013.9609%204.26295%2013.798%204.26295%2013.3621ZM12.607%205.68637C12.6611%205.93137%2012.607%206.17637%2012.362%206.20437L11.9546%206.2851V12.2734C11.6008%2012.4638%2011.2751%2012.5725%2011.003%2012.5725C10.5681%2012.5725%2010.4593%2012.4363%2010.1336%2012.0284L7.46942%207.83677V11.8921L8.31224%2012.083C8.31224%2012.083%208.31224%2012.573%207.63229%2012.573L5.75769%2012.6817C5.70309%2012.5725%205.75769%2012.3005%205.94762%2012.2463L6.43716%2012.1105V6.7485L5.75769%206.69344C5.70309%206.44844%205.83889%206.0947%206.21969%206.06717L8.23104%205.93184L11.003%2010.1776V6.42137L10.2965%206.34017C10.2419%206.0401%2010.4593%205.82217%2010.7309%205.79557L12.607%205.68637Z'%20fill='black'/%3e%3c/svg%3e",slack:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.94137%209.84695C3.94137%2010.6564%203.28013%2011.3176%202.47069%2011.3176C1.66124%2011.3176%201%2010.6564%201%209.84695C1%209.03747%201.66124%208.37625%202.47069%208.37625H3.94137V9.84695Z'%20fill='%23E01E5A'/%3e%3cpath%20d='M4.68237%209.84695C4.68237%209.03747%205.34361%208.37625%206.15306%208.37625C6.9625%208.37625%207.62374%209.03747%207.62374%209.84695V13.5293C7.62374%2014.3388%206.9625%2015%206.15306%2015C5.34361%2015%204.68237%2014.3388%204.68237%2013.5293V9.84695Z'%20fill='%23E01E5A'/%3e%3cpath%20d='M6.15306%203.94137C5.34361%203.94137%204.68237%203.28013%204.68237%202.47069C4.68237%201.66124%205.34361%201%206.15306%201C6.9625%201%207.62374%201.66124%207.62374%202.47069V3.94137H6.15306Z'%20fill='%2336C5F0'/%3e%3cpath%20d='M6.15309%204.68237C6.96254%204.68237%207.62378%205.34361%207.62378%206.15306C7.62378%206.9625%206.96254%207.62374%206.15309%207.62374H2.47069C1.66124%207.62374%201%206.9625%201%206.15306C1%205.34361%201.66124%204.68237%202.47069%204.68237H6.15309Z'%20fill='%2336C5F0'/%3e%3cpath%20d='M12.0585%206.15306C12.0585%205.34361%2012.7197%204.68237%2013.5291%204.68237C14.3386%204.68237%2014.9998%205.34361%2014.9998%206.15306C14.9998%206.9625%2014.3386%207.62374%2013.5291%207.62374H12.0585V6.15306Z'%20fill='%232EB67D'/%3e%3cpath%20d='M11.3176%206.15309C11.3176%206.96254%2010.6563%207.62378%209.84685%207.62378C9.03744%207.62378%208.37622%206.96254%208.37622%206.15309V2.47069C8.37622%201.66124%209.03744%201%209.84685%201C10.6563%201%2011.3176%201.66124%2011.3176%202.47069V6.15309Z'%20fill='%232EB67D'/%3e%3cpath%20d='M9.84685%2012.0586C10.6563%2012.0586%2011.3176%2012.7199%2011.3176%2013.5293C11.3176%2014.3388%2010.6563%2015%209.84685%2015C9.03744%2015%208.37622%2014.3388%208.37622%2013.5293V12.0586H9.84685Z'%20fill='%23ECB22E'/%3e%3cpath%20d='M9.84685%2011.3176C9.03744%2011.3176%208.37622%2010.6564%208.37622%209.84695C8.37622%209.03747%209.03744%208.37625%209.84685%208.37625H13.5293C14.3388%208.37625%2015%209.03747%2015%209.84695C15%2010.6564%2014.3388%2011.3176%2013.5293%2011.3176H9.84685Z'%20fill='%23ECB22E'/%3e%3c/svg%3e",tiktok:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.60974%205.91839V5.33278C6.40646%205.30058%206.20114%205.28293%205.99535%205.27998C4.00296%205.27577%202.23902%206.56688%201.64074%208.46732C1.04245%2010.3678%201.74866%2012.4365%203.38415%2013.5744C2.15905%2012.2633%201.81888%2010.3546%202.51559%208.70096C3.21229%207.0473%204.81576%205.95753%206.60974%205.91839Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M6.72004%2012.552C7.834%2012.5505%208.74966%2011.6729%208.79844%2010.56V0.6288H10.6128C10.5758%200.421288%2010.5581%200.210783%2010.56%200H8.07844V9.9216C8.03716%2011.0402%207.11934%2011.9262%206.00004%2011.928C5.66555%2011.9252%205.33652%2011.8429%205.04004%2011.688C5.42976%2012.2279%206.05416%2012.5491%206.72004%2012.552Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M14.0014%203.9984V3.4464C13.3337%203.44663%2012.6808%203.24959%2012.1246%202.88C12.6122%203.44675%2013.271%203.83934%2014.0014%203.9984Z'%20fill='%2325F4EE'/%3e%3cpath%20d='M12.125%202.87999C11.5772%202.25615%2011.2752%201.45422%2011.2754%200.623993H10.613C10.786%201.55168%2011.3327%202.36746%2012.125%202.87999Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M5.99519%207.7616C5.03925%207.76652%204.20933%208.42142%203.98229%209.34998C3.75525%2010.2786%204.18936%2011.2426%205.03519%2011.688C4.57688%2011.0552%204.51214%2010.219%204.86761%209.5232C5.22308%208.82744%205.9387%208.3898%206.71999%208.3904C6.92831%208.39298%207.13519%208.42532%207.33439%208.4864V5.9616C7.13099%205.93112%206.92567%205.91509%206.71999%205.9136H6.60959V7.8336C6.40937%207.7799%206.20243%207.75566%205.99519%207.7616Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M14.0015%203.99841V5.91841C12.7654%205.91603%2011.5613%205.52475%2010.5599%204.80001V9.84481C10.5546%2012.3621%208.51245%2014.4%205.99511%2014.4C5.06025%2014.4017%204.1479%2014.1132%203.38391%2013.5744C4.6589%2014.9457%206.64315%2015.3971%208.38585%2014.7123C10.1285%2014.0275%2011.2747%2012.346%2011.2751%2010.4736V5.44321C12.2799%206.16321%2013.4854%206.54937%2014.7215%206.54721V4.07521C14.4795%204.07445%2014.2382%204.04871%2014.0015%203.99841Z'%20fill='%23FE2C55'/%3e%3cpath%20d='M10.56%209.8448V4.79999C11.5645%205.52056%2012.7702%205.9068%2014.0064%205.90399V3.98399C13.2761%203.82977%2012.6157%203.4423%2012.1248%202.87999C11.3324%202.36746%2010.7857%201.55168%2010.6128%200.623993H8.7984V10.56C8.7621%2011.4464%208.16834%2012.2126%207.31904%2012.4691C6.46968%2012.7255%205.55115%2012.4159%205.03038%2011.6976C4.18454%2011.2522%203.75043%2010.2882%203.97747%209.35958C4.20452%208.43102%205.03444%207.77612%205.99038%207.7712C6.19878%207.77306%206.40578%207.8054%206.6048%207.8672V5.94719C4.80073%205.97776%203.18515%207.07136%202.48647%208.73486C1.78778%2010.3984%202.13799%2012.3176%203.37918%2013.6272C4.1507%2014.1482%205.06437%2014.4181%205.99518%2014.4C8.5125%2014.4%2010.5547%2012.3621%2010.56%209.8448Z'%20fill='black'/%3e%3c/svg%3e",twitch:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%207.94593L11.75%2010.1081H9.5L7.53124%2012V10.1081H5V2H14V7.94593Z'%20fill='white'/%3e%3cpath%20d='M4.70834%201L2%203.67857V13.3215H5.25V16L7.95833%2013.3215H10.125L15%208.5V1H4.70834ZM13.9166%207.96428L11.75%2010.1072H9.5833L7.6875%2011.9822V10.1072H5.25V2.07143H13.9166V7.96428Z'%20fill='%239146FF'/%3e%3cpath%20d='M12%204H11V7H12V4Z'%20fill='%239146FF'/%3e%3cpath%20d='M9%204H8V7H9V4Z'%20fill='%239146FF'/%3e%3c/svg%3e",twitter:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.14163%206.50461L13.6089%201H12.5503L8.67137%205.77958L5.57328%201H2L6.68492%208.22757L2%2014H3.05866L7.15491%208.9526L10.4267%2014H14L9.14137%206.50461H9.14163ZM7.69165%208.29124L7.21697%207.57154L3.44011%201.84479H5.06615L8.11412%206.46646L8.5888%207.18616L12.5508%2013.1936H10.9248L7.69165%208.29152V8.29124Z'%20fill='black'%20stroke='black'%20stroke-width='0.5'/%3e%3c/svg%3e",xero:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2502_830'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='1'%20y='1'%20width='14'%20height='14'%3e%3cpath%20d='M15%201H1V15H15V1Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2502_830)'%3e%3cpath%20d='M7.99994%2014.9733C11.8512%2014.9733%2014.9732%2011.8513%2014.9732%207.99997C14.9732%204.14873%2011.8512%201.02667%207.99994%201.02667C4.14867%201.02667%201.02661%204.14873%201.02661%207.99997C1.02661%2011.8513%204.14867%2014.9733%207.99994%2014.9733Z'%20fill='%231AB4D7'/%3e%3cpath%20d='M4.36467%207.97988L5.55473%206.78688C5.59418%206.74667%205.61619%206.69343%205.61619%206.63697C5.61619%206.5193%205.52054%206.42374%205.40287%206.42374C5.34555%206.42374%205.29181%206.44621%205.2513%206.48723L4.06231%207.67564L2.86801%206.48544C2.82765%206.44566%202.77418%206.42374%202.71748%206.42374C2.59995%206.42374%202.50427%206.51925%202.50427%206.6368C2.50427%206.69415%202.52716%206.74796%202.56825%206.7885L3.75814%207.97822L2.56887%209.16973C2.52707%209.21089%202.50427%209.26479%202.50427%209.3224C2.50427%209.44007%202.59995%209.53548%202.71748%209.53548C2.77428%209.53548%202.8278%209.51343%202.86801%209.47325L4.06046%208.28241L5.24838%209.46891C5.29051%209.51245%205.34487%209.53562%205.40287%209.53562C5.52042%209.53562%205.61608%209.44007%205.61608%209.3224C5.61608%209.26563%205.59409%209.21229%205.55406%209.17211L4.36467%207.97988Z'%20fill='white'/%3e%3cpath%20d='M11.4393%207.97953C11.4393%208.19316%2011.6131%208.36697%2011.827%208.36697C12.0404%208.36697%2012.2142%208.19316%2012.2142%207.97953C12.2142%207.76582%2012.0404%207.59204%2011.827%207.59204C11.6131%207.59204%2011.4393%207.76582%2011.4393%207.97953Z'%20fill='white'/%3e%3cpath%20d='M10.7045%207.97969C10.7045%207.36096%2011.2078%206.85753%2011.8266%206.85753C12.4451%206.85753%2012.9485%207.36096%2012.9485%207.97969C12.9485%208.59828%2012.4451%209.10151%2011.8266%209.10151C11.2078%209.10151%2010.7045%208.59828%2010.7045%207.97969ZM10.2631%207.97969C10.2631%208.84167%2010.9645%209.543%2011.8266%209.543C12.6887%209.543%2013.3905%208.84167%2013.3905%207.97969C13.3905%207.11757%2012.6887%206.41608%2011.8266%206.41608C10.9645%206.41608%2010.2631%207.11757%2010.2631%207.97969Z'%20fill='white'/%3e%3cpath%20d='M10.152%206.44279L10.0864%206.4426C9.88947%206.4426%209.69956%206.50471%209.54094%206.62696C9.52001%206.5313%209.43447%206.45933%209.33269%206.45933C9.21544%206.45933%209.1215%206.55325%209.12122%206.67071L9.12192%209.3041C9.12227%209.42135%209.21789%209.51662%209.33514%209.51662C9.45246%209.51662%209.54808%209.42135%209.54836%209.30382L9.54843%207.68463C9.54843%207.14496%209.59778%206.927%2010.0601%206.86923C10.1028%206.86392%2010.1494%206.86475%2010.1494%206.86475C10.276%206.86041%2010.3659%206.77348%2010.3659%206.656C10.3659%206.53844%2010.2699%206.44279%2010.152%206.44279Z'%20fill='white'/%3e%3cpath%20d='M6.05791%207.72227C6.05791%207.71643%206.05836%207.71035%206.05864%207.70435C6.18243%207.215%206.62563%206.85287%207.15344%206.85287C7.68764%206.85287%208.13489%207.2239%208.25235%207.72227H6.05791ZM8.689%207.682C8.59709%207.24697%208.35895%206.88964%207.99626%206.66016C7.46613%206.32358%206.76607%206.3422%206.25401%206.70635C5.83632%207.00349%205.59521%207.48958%205.59521%207.9903C5.59521%208.11586%205.61035%208.24256%205.64186%208.3673C5.79957%208.98778%206.33294%209.45741%206.96885%209.53525C7.15754%209.55814%207.34122%209.54715%207.53141%209.49794C7.69485%209.45818%207.85299%209.39189%207.99871%209.29851C8.14993%209.20128%208.27628%209.07304%208.39864%208.9196C8.40116%208.9168%208.40361%208.91428%208.40613%208.91134C8.49104%208.80599%208.47529%208.65619%208.38198%208.58465C8.30323%208.52438%208.17107%208.49988%208.06712%208.63309C8.04472%208.66487%208.0198%208.69763%207.99238%208.73039C7.90969%208.82181%207.80712%208.91029%207.6842%208.97896C7.52779%209.06254%207.34955%209.11028%207.16006%209.11133C6.53986%209.1044%206.20799%208.67152%206.08993%208.36254C6.06932%208.30479%206.05342%208.24494%206.04234%208.18334C6.0409%208.17179%206.03983%208.16066%206.0394%208.15044C6.16763%208.15044%208.26501%208.15009%208.26501%208.15009C8.57014%208.14365%208.73436%207.92828%208.689%207.682Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e"}};if(o&&"general"===e){const e={"--passflow-icon-mask":`url("${n.general[s]}")`};return(0,p.jsx)("span",{className:O("passflow-icon passflow-icon--match-text",i,a),style:e,role:r?void 0:"img","aria-label":r?void 0:s,"aria-hidden":r||void 0})}return"flags"!==e?(0,p.jsx)("img",{className:O("passflow-icon",i,a),src:n[e][s],alt:r?"":s}):(0,p.jsx)("div",{className:O("passflow-icon",i,a),children:(0,p.jsx)(Ne,{iso2:s})})},zs=({to:e,search:s,replace:t=!1,children:a,className:r,onClick:o,...i})=>{const{navigate:n}=Cs();return(0,p.jsx)("a",{href:`${e}${s?s.startsWith("?")?s:`?${s}`:""}`,onClick:a=>{a.preventDefault(),o&&o(a),n({to:e,search:s,replace:t})},className:r,...i,children:a})},Ds=({message:e,id:s})=>e?(0,p.jsxs)("div",{id:s,className:"passflow-form-error",role:"alert",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning",decorative:!0}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:e})]}):null,Bs=({label:e})=>(0,p.jsxs)("div",{className:"passflow-form-divider","aria-hidden":"true",children:[(0,p.jsx)("div",{className:"passflow-form-divider__line-left"}),(0,p.jsx)("span",{className:"passflow-form-divider__text",children:e}),(0,p.jsx)("div",{className:"passflow-form-divider__line-right"})]}),Gs=({children:e})=>(0,p.jsx)("div",{className:"passflow-login-screen-actions",children:e}),Os=({message:e})=>(0,p.jsxs)("div",{className:"passflow-login-screen-status",role:"status","aria-live":"polite",children:[(0,p.jsx)("div",{className:"passflow-login-screen-spinner passflow-login-screen-spinner--small","aria-hidden":"true"}),(0,p.jsx)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:e})]}),Hs=({code:e,appName:s,message:t,codeTestId:a,appNameTestId:r})=>(0,p.jsxs)("div",{className:"passflow-login-screen-notice",role:"note",children:[e?(0,p.jsx)("div",{className:"passflow-login-screen-code","data-testid":a,children:e}):null,(0,p.jsxs)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:[(0,p.jsx)("span",{className:"passflow-login-screen-app-name","data-testid":r,children:s})," ",t]})]}),qs=({label:e="Code",initialCode:s="",error:t,busy:a=!1,submitLabel:r="Continue",testId:o,onSubmit:i})=>{const[n,c]=(0,l.useState)(s);return(0,p.jsxs)("form",{className:"passflow-form","data-testid":o,"aria-busy":a,onSubmit:e=>{e.preventDefault();const s=n.trim();s&&i(s)},children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"device-user-code",className:"passflow-field-label",children:e})}),(0,p.jsx)(Us,{id:"device-user-code",name:"user_code",type:"text",autoCapitalize:"characters",autoComplete:"off",autoCorrect:"off",spellCheck:!1,inputMode:"text",className:"passflow-login-screen-code-input",value:n,disabled:a,"aria-invalid":Boolean(t),"aria-describedby":t?"device-user-code-error":void 0,isError:Boolean(t),onChange:e=>c(e.target.value)})]}),(0,p.jsx)(Ds,{id:"device-user-code-error",message:t})]}),a?(0,p.jsx)(Os,{message:"Checking the code…"}):null,(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:a||0===n.trim().length,children:a?"Checking…":r})]})},Zs=({label:e,checked:s,disabled:t=!1,id:a,onChange:r})=>{const o=(0,l.useId)(),i=a??o;return(0,p.jsxs)("label",{className:O("passflow-switch-wrapper",{"passflow-switch-wrapper--disabled":t}),htmlFor:i,children:[(0,p.jsx)("span",{className:"passflow-switch-label",children:e}),(0,p.jsx)("input",{id:i,type:"checkbox",className:"passflow-switch-input",checked:s,disabled:t,onChange:r}),(0,p.jsx)("div",{className:"passflow-switch-track"})]})},Js=({appName:e,scopes:s,prompt:t="wants to access your account.",busy:a=!1,error:r,allowLabel:o="Allow",denyLabel:i="Deny",busyLabel:n="Submitting…",testId:l,allowTestId:c,denyTestId:d,appNameTestId:u,onToggleScope:h,onAllow:m,onDeny:f})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":l,"aria-busy":a,children:[(0,p.jsx)(Hs,{appName:e,message:t,appNameTestId:u}),(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)(Ds,{message:r}),s.length?(0,p.jsx)("ul",{className:"passflow-consent-scopes",children:s.map(e=>(0,p.jsxs)("li",{className:"passflow-consent-scope","data-testid":`consent-scope-${e.scope}`,children:[(0,p.jsx)(Zs,{label:e.label,checked:e.granted,disabled:a,onChange:()=>h(e.scope)}),e.description?(0,p.jsx)("p",{className:"passflow-consent-scope-description",children:e.description}):null]},e.scope))}):(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"This application is not requesting access to any of your data."})]}),a?(0,p.jsx)(Os,{message:n}):null,(0,p.jsxs)("div",{className:"passflow-consent-actions",children:[(0,p.jsx)(je,{size:"big",variant:"primary",type:"button","data-testid":c,disabled:a,onClick:m,children:o}),(0,p.jsx)(je,{size:"big",variant:"outlined",type:"button","data-testid":d,disabled:a,onClick:f,children:i})]})]}),Ws=({providers:e,onClick:s,className:t=""})=>{const a={"passflow-providers-box--grid":e.length>1};return(0,p.jsx)("div",{className:O("passflow-providers-box",a,t),children:e.map(t=>(0,p.jsxs)(je,{onClick:()=>s(t),size:"big",variant:"provider",type:"button",withIcon:!0,className:"passflow-provider-item",children:[(0,p.jsx)(Vs,{size:"small",type:"providers",id:t,decorative:e.length<=2}),e.length<=2&&(0,p.jsx)("p",{className:"passflow-provider-text",children:t})]},t))})},Ks={email_or_username:"",phone:"",password:""},Qs=e=>{const{methods:s}=e,t=(e=>void 0!==e.initialMethod&&e.methods.identities.some(s=>s.id===e.initialMethod)?e.initialMethod:e.methods.identities[0]?.id??null)(e),[a,r]=(0,l.useState)(t),[o,i]=(0,l.useState)(Boolean(e.forcePasskey)),n=(0,l.useRef)(t),c=(0,l.useRef)(Boolean(e.forcePasskey)),{control:d,getValues:u,reset:h,trigger:m,watch:f,formState:{errors:g,isDirty:y,isValid:v},handleSubmit:C}=(0,x.useForm)({defaultValues:Ks,mode:"onChange"});(0,l.useEffect)(()=>{n.current!==t&&(n.current=t,r(t),h(Ks))},[t,h]),(0,l.useEffect)(()=>{const s=Boolean(e.forcePasskey);c.current!==s&&(c.current=s,i(s))},[e.forcePasskey]);const b=s.identities.find(e=>e.id===a),k=Boolean(b?.password),j=Boolean(b?.passwordlessLabel),S=s.passkey,M=Boolean(b),E=!o&&M,N=S&&(o||!M),_=k||j||S,I=Boolean(e.busy||e.disabled),L=e.error?.scope,A="identity"===L||"credentials"===L,P="password"===L||"credentials"===L,F="sign-up"===e.credentialPurpose,T=e=>({method:a,emailOrUsername:e.email_or_username,phone:e.phone,password:e.password}),R=()=>{h(Ks),e.onReset?.()},U=e=>{r(e),R()},Y=C(s=>{k?e.onPassword?.(T(s)):j&&e.onPasswordless?.(T(s))}),V=f("phone"===a?"phone":"email_or_username"),z=s.identities.find(e=>e.id!==a);return(0,p.jsxs)(p.Fragment,{children:[e.notice?(0,p.jsx)(Hs,{...e.notice}):null,e.allowPasskeyToggle&&S&&M&&(k||j)?(0,p.jsx)("div",{className:"passflow-form-switch",children:(0,p.jsx)(Zs,{label:"Passwordless experience",checked:o,disabled:I,onChange:e=>{return s=e.target.checked,i(s),void R();var s}})}):null,(0,p.jsxs)("form",{className:"passflow-form","data-testid":e.testId,"aria-busy":I&&Boolean(e.busy),onSubmit:Y,children:[e.busy?(0,p.jsx)(Os,{message:e.primaryLabel??"Signing in…"}):null,E?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:["email_or_username"===a?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"email_or_username",className:O("passflow-field-label",{"passflow-field-label--error":A||Boolean(g.email_or_username)}),children:b?.label}),z?(0,p.jsx)(je,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:I,onClick:()=>U(z.id),children:z.selectLabel}):null]}),(0,p.jsx)(x.Controller,{name:"email_or_username",control:d,rules:{required:b?.requiredMessage??"Identity is required",..."email"===b?.format?{pattern:{value:Ce,message:"Invalid email"}}:void 0},render:({field:e})=>(0,p.jsx)(Us,{...e,id:"email_or_username",type:"email"===b?.format?"email":"text",autoComplete:"email"===b?.format?"email":"username","aria-invalid":Boolean(g.email_or_username),"aria-describedby":g.email_or_username?"email_or_username-error":void 0,isError:A||Boolean(g.email_or_username),disabled:I})}),g.email_or_username?.message?(0,p.jsx)(Ds,{id:"email_or_username-error",message:g.email_or_username.message}):null]}):null,"phone"===a?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"phone",className:O("passflow-field-label",{"passflow-field-label--error":A||Boolean(g.phone)}),children:"Phone number"}),z?(0,p.jsx)(je,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:I,onClick:()=>U(z.id),children:z.selectLabel}):null]}),(0,p.jsx)(x.Controller,{name:"phone",control:d,rules:{required:"Phone number is required",validate:e=>(0,w.phone)(e).isValid||"Invalid phone number"},render:({field:e})=>(0,p.jsx)(Rs,{id:"phone",name:"phone",onChange:e.onChange,"aria-describedby":g.phone?"phone-error":void 0,isError:A||Boolean(g.phone),disabled:I,ref:null})}),g.phone?.message?(0,p.jsx)(Ds,{id:"phone-error",message:g.phone.message}):null]}):null,k?(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"password",className:O("passflow-field-label",{"passflow-field-label--error":P||Boolean(g.password)}),children:"Password"}),e.forgotPassword?(0,p.jsx)(zs,{to:e.forgotPassword.to,search:e.forgotPassword.getSearch?.(a),className:"passflow-field-label-button",children:"Forgot Password?"}):null]}),(0,p.jsx)(x.Controller,{name:"password",control:d,rules:{required:"Password is required",validate:s=>{if(!F)return!0;try{return be(e.passwordPolicy).validateSync(s),!0}catch(t){return t.errors?.join(", ")??"Password does not meet the requirements"}}},render:({field:s})=>(0,p.jsx)(Ge,{...s,id:"password",name:"password","aria-invalid":Boolean(g.password),"aria-describedby":g.password&&!F?"password-error":void 0,isError:P||Boolean(g.password),passwordPolicy:e.passwordPolicy,withMessages:F,validationErrors:F&&g.password?.message?g.password.message.split(", "):void 0,autoComplete:F?"new-password":"current-password",disabled:I})}),!F&&g.password?.message?(0,p.jsx)(Ds,{id:"password-error",message:g.password.message}):null]}):null,(0,p.jsx)(Ds,{message:e.error?.message})]}),(0,p.jsxs)(Gs,{children:[k&&e.onPassword?(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:I||!y||!v,className:"passflow-button-signin","data-testid":e.primaryTestId,children:e.primaryLabel??"Sign In"}):null,j&&e.onPasswordless?(0,p.jsxs)(je,{size:"big",variant:k?"outlined":"primary",type:"button",className:O("passflow-button-passwordless",{"passflow-button-passwordless--active":k}),disabled:I||0===V.trim().length,onClick:()=>{(async()=>{a&&e.onPasswordless&&await m("phone"===a?"phone":"email_or_username")&&e.onPasswordless(T(u()))})()},children:[e.passwordlessLabelPrefix??"Sign In with"," ",b?.passwordlessLabel]}):null,S&&e.onPasskey?(0,p.jsxs)(je,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,disabled:I,onClick:e.onPasskey,children:[(0,p.jsx)(Vs,{id:"key",size:"small",type:"general",className:"passflow-button-passkey-icon",decorative:!0,matchTextColor:!0}),e.passkeyLabel??"Sign In with a Passkey"]}):null]})]}):null,N?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ds,{message:e.error?.message}),e.onPasskey?(0,p.jsx)(Gs,{children:(0,p.jsxs)(je,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,disabled:I,onClick:e.onPasskey,children:[(0,p.jsx)(Vs,{id:"key",size:"small",type:"general",className:"passflow-button-passkey-icon",decorative:!0,matchTextColor:!0}),e.passkeyLabel??"Sign In with a Passkey"]})}):null]}):null,e.footer?(0,p.jsx)("div",{className:O("passflow-form-actions",{"passflow-form-actions--top-space":_}),children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:[e.footer.prompt," ",(0,p.jsx)(zs,{to:e.footer.to,search:e.footer.search,className:"passflow-link",children:e.footer.label})]})}):null,s.providers.length>0&&e.onProvider?(0,p.jsxs)("div",{className:"passflow-form-providers",children:[_?(0,p.jsx)(Bs,{label:"Or continue with"}):null,(0,p.jsx)(Ws,{providers:s.providers,onClick:e.onProvider})]}):null]})]})},Xs=({appName:e,code:s,identity:t,busy:a=!1,error:r,actionLabel:o="Approve this device",busyLabel:i="Approving…",testId:n,actionTestId:l,codeTestId:c,appNameTestId:d,onApprove:u})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":n,"aria-busy":a,children:[(0,p.jsx)(Hs,{code:s,appName:e,message:"requested this sign-in. Confirm that the code matches your terminal.",codeTestId:c,appNameTestId:d}),(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[(0,p.jsxs)("div",{className:"passflow-login-screen-success",role:"status","aria-live":"polite",children:[(0,p.jsx)(Vs,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}),(0,p.jsx)("p",{className:"passflow-login-screen-text",children:t?(0,p.jsxs)(p.Fragment,{children:["Signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:t}),"."]}):"Signed in successfully."})]}),(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"Approve this request to finish signing in on the device."}),(0,p.jsx)(Ds,{message:r})]}),a?(0,p.jsx)(Os,{message:i}):null,(0,p.jsx)(je,{size:"big",variant:"primary",type:"button",autoFocus:!a,"data-testid":l,disabled:a,onClick:u,children:a?i:o})]}),$s=({id:e,children:s})=>(0,p.jsx)("span",{id:e,className:"passflow-visually-hidden",children:s}),et="email-code-prompt",st="email-code-error",tt="email-code-resend-hint",at=({cooldownSeconds:e=30,busy:s=!1,label:t="Resend code",locked:a,onResend:r})=>{const[o,i]=(0,l.useState)(e);(0,l.useEffect)(()=>{if(o<=0)return;const e=setTimeout(()=>i(e=>e-1),1e3);return()=>clearTimeout(e)},[o]);const n=o>0,c=n||s||a;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(je,{size:"big",variant:"clean",type:"button","aria-disabled":c,"aria-describedby":n?tt:void 0,onClick:()=>{c||(i(e),r())},children:[s?"Sending…":t,n&&!s?(0,p.jsx)("span",{"aria-hidden":"true",children:` (${o})`}):null]}),n?(0,p.jsx)($s,{id:tt,children:"A new code can be requested when the countdown ends."}):null]})},rt=({message:e,length:s=6,error:t,busy:a=!1,submitLabel:r="Verify",resend:o,secondaryAction:i,testId:n,onSubmit:c})=>{const[d,u]=(0,l.useState)(""),h=(0,l.useRef)(null),m=(0,l.useRef)(a),[f,g]=(0,l.useState)({busy:a,error:t});f.busy===a&&f.error===t||(g({busy:a,error:t}),!a&&t&&u(""));const w=o?.restartKey,[x,y]=(0,l.useState)(w);x!==w&&(y(w),u("")),(0,l.useEffect)(()=>{m.current&&!a&&h.current?.focus(),m.current=a},[a]);const v=e=>{a||e.length!==s||c(e)};return(0,p.jsxs)("form",{className:"passflow-form","data-testid":n,"aria-busy":a,onSubmit:e=>{e.preventDefault(),v(d)},children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[(0,p.jsx)("p",{id:et,className:"passflow-login-screen-text passflow-login-screen-centered-text",children:e}),(0,p.jsx)(De,{ref:h,id:"email-code",name:"otp",length:s,value:d,onChange:u,onComplete:v,charset:"numeric",state:a?"disabled":t?"error":"default",labelledBy:et,describedBy:t?st:void 0,autoFocus:!0}),(0,p.jsx)(Ds,{id:st,message:t})]}),a?(0,p.jsx)(Os,{message:"Checking the code…"}):null,(0,p.jsxs)(Gs,{children:[(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:a||d.length!==s,children:a?"Verifying…":r}),o?(0,p.jsx)(at,{...o,locked:a,onResend:()=>{u(""),o.onResend()}},w):null,i?(0,p.jsx)(je,{size:"big",variant:"clean",type:"button",disabled:a,onClick:i.onClick,children:i.label}):null]})]})},ot=({message:e,detail:s="Go back to start again.",actionLabel:t="Go back",testId:a,onAction:r})=>(0,p.jsxs)("div",{className:"passflow-error-container","data-testid":a,children:[(0,p.jsxs)("div",{className:"passflow-error-container-text-wrapper",role:"alert","aria-live":"assertive",children:[e?(0,p.jsx)("h1",{className:"passflow-error-container-text",children:e}):null,(0,p.jsx)("p",{className:"passflow-error-container-text-secondary",children:s})]}),(0,p.jsx)(je,{size:"big",type:"button",variant:"primary",onClick:r,className:"passflow-button-go-back-error",children:t})]}),it=({identity:e,inviterName:s,busy:t=!1,error:a,acceptLabel:r="Accept invitation",busyLabel:o="Accepting invitation…",switchAccountLabel:i="Switch account",createAccountLabel:n="Create a new account",testId:l,acceptTestId:c,onAccept:d,onSwitchAccount:u,onCreateAccount:h})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":l,"aria-busy":t,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[s?(0,p.jsxs)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:[(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:s})," sent this invitation."]}):null,(0,p.jsx)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:e?(0,p.jsxs)(p.Fragment,{children:["You're signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:e}),"."]}):"You’re already signed in."}),(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:"Continue with this account, or switch accounts?"}),(0,p.jsx)(Ds,{message:a})]}),t?(0,p.jsx)(Os,{message:o}):null,(0,p.jsxs)(Gs,{children:[(0,p.jsx)(je,{size:"big",variant:"primary",type:"button",autoFocus:!t,"data-testid":c,disabled:t,onClick:d,children:t?o:r}),(0,p.jsx)(je,{size:"big",variant:"outlined",type:"button",disabled:t,onClick:u,children:i}),(0,p.jsx)(je,{size:"big",variant:"clean",type:"button",disabled:t,onClick:h,children:n})]})]}),nt="new-password-error",lt="new-password-validation-error",ct=({passwordPolicy:e,label:s="New password",hint:t="Enter your new password below.",error:a,busy:r=!1,submitLabel:o="Save new password",testId:i,onSubmit:n})=>{const{control:l,handleSubmit:c,formState:{errors:d,isDirty:u,isValid:h}}=(0,x.useForm)({defaultValues:{password:""},mode:"onChange"}),m=c(e=>{r||n(e.password)}),f=d.password?.message,g=!e&&Boolean(f),w=[a?nt:null,g?lt:null].filter(Boolean).join(" ");return(0,p.jsxs)("form",{className:"passflow-form","data-testid":i,"aria-busy":r,onSubmit:m,children:[t?(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:t}):null,(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"password",className:O("passflow-field-label",{"passflow-field-label--error":Boolean(a)}),children:s})}),(0,p.jsx)(x.Controller,{name:"password",control:l,rules:{required:"Password is required",validate:s=>{try{return be(e).validateSync(s),!0}catch(t){const{errors:e}=t;return e?.join(", ")??"Password does not meet the requirements"}}},render:({field:s})=>(0,p.jsx)(Ge,{...s,id:"password",name:"password",autoComplete:"new-password","aria-invalid":Boolean(a)||Boolean(f),"aria-describedby":w||void 0,isError:Boolean(a),passwordPolicy:e,withMessages:!0,validationErrors:f?f.split(", "):void 0,disabled:r})}),g?(0,p.jsx)(Ds,{id:lt,message:f}):null]}),(0,p.jsx)(Ds,{id:nt,message:a})]}),r?(0,p.jsx)(Os,{message:"Saving your password…"}):null,(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:r||!u||!h,className:"passflow-button-reset-password",children:r?"Saving…":o})]})},dt=({working:e,message:s,actionLabel:t="Continue with a passkey",error:a,recoverable:r=!1,retryLabel:o="Try again",testId:i,onAction:n,onRetry:l})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":i,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:[(0,p.jsxs)("div",{className:"passflow-login-screen-status",role:"status",children:[e?(0,p.jsx)("div",{className:"passflow-login-screen-spinner","aria-hidden":"true"}):null,(0,p.jsx)("p",{className:"passflow-login-screen-text",children:s})]}),(0,p.jsx)(Ds,{message:a})]}),!e&&n?(0,p.jsxs)(je,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,onClick:n,children:[(0,p.jsx)(Vs,{id:"key",size:"small",type:"general",className:"icon-white passflow-button-passkey-icon",decorative:!0}),t]}):!e&&a&&r&&l?(0,p.jsxs)(je,{size:"big",variant:"dark",type:"button",className:"passflow-button-passkey",withIcon:!0,onClick:l,children:[(0,p.jsx)(Vs,{id:"key",size:"small",type:"general",className:"icon-white passflow-button-passkey-icon",decorative:!0}),o]}):null]}),pt={totp:{label:"Authenticator code",hint:"Enter the 6-digit code from your authenticator app.",switchLabel:"Use authenticator app"},recovery_codes:{label:"Recovery code",hint:"Enter one of your recovery codes.",switchLabel:"Use recovery code"}},ut=({methods:e,identity:s,busy:t=!1,error:a,submitLabel:r="Verify",testId:o,onSubmit:i,onMethodChange:n})=>{const[c,d]=(0,l.useState)(e[0]??"totp"),[u,h]=(0,l.useState)(""),m=e.find(e=>e!==c),f=pt[c],g="totp"===c;return(0,p.jsxs)("form",{className:"passflow-form","data-testid":o,"aria-busy":t,onSubmit:e=>{e.preventDefault();const s=u.trim();s&&i(c,s)},children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[s?(0,p.jsxs)("p",{className:"passflow-login-screen-hint",children:["Signed in as ",(0,p.jsx)("strong",{className:"passflow-login-screen-app-name",children:s}),"."]}):null,(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsxs)("div",{className:"passflow-form-field__header",children:[(0,p.jsx)("label",{htmlFor:"second-factor-code",className:"passflow-field-label",children:f.label}),m?(0,p.jsx)(je,{size:"small",variant:"clean",type:"button",className:"passflow-field-label-button",disabled:t,onClick:()=>(d(m),h(""),void n?.()),children:pt[m].switchLabel}):null]}),(0,p.jsx)(Us,{id:"second-factor-code",name:g?"otp":"recovery_code",type:"text",autoComplete:g?"one-time-code":"off",autoCapitalize:g?"off":"characters",autoCorrect:"off",spellCheck:!1,inputMode:g?"numeric":"text",autoFocus:!0,className:"passflow-login-screen-code-input",value:u,disabled:t,"aria-invalid":Boolean(a),"aria-describedby":a?"second-factor-code-error":"second-factor-code-hint",isError:Boolean(a),onChange:e=>h(e.target.value)}),(0,p.jsx)("p",{id:"second-factor-code-hint",className:"passflow-login-screen-hint",children:f.hint})]}),(0,p.jsx)(Ds,{id:"second-factor-code-error",message:a})]}),t?(0,p.jsx)(Os,{message:"Checking the code…"}):null,(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:t||0===u.trim().length,children:t?"Checking…":r})]})},ht=({iconId:e="logo",title:s="",subtitle:t="",className:a="",children:r,customCss:o,customLogo:i,customLogoAlt:n="Application logo",removeBranding:l=!1})=>(0,p.jsxs)("div",{id:"passflow-wrapper",className:"passflow-wrapper",children:[o?(0,p.jsx)("style",{className:"psfw-custom-styles","data-passflow-style-layer":"custom",children:o}):null,(0,p.jsxs)("main",{className:O("passflow-form-main-wrapper",a),children:[(0,p.jsxs)("div",{className:"passflow-form-main-container",children:[i?(0,p.jsx)("img",{src:i,alt:n,className:"passflow-form-main-container-logo"}):(0,p.jsx)(Vs,{id:e,size:"large",type:"general",decorative:!0}),s?(0,p.jsxs)("div",{className:"passflow-form-header",children:[(0,p.jsx)("h1",{className:"passflow-form-title",children:s}),t?(0,p.jsx)("span",{className:"passflow-form-subtitle",children:t}):null]}):null]}),r]}),l?null:(0,p.jsx)("footer",{className:"passflow-branding",children:(0,p.jsxs)("p",{className:"passflow-branding-text",children:["Secured by ",(0,p.jsx)("span",{className:"passflow-branding-text-secondary passflow-secondary-font",children:"PASSFLOW"})]})})]}),mt=({tone:e,message:s,detail:t,recoverable:a=!1,retryLabel:r="Try again",testId:o,onRetry:i,primaryAction:n})=>(0,p.jsxs)("div",{className:"passflow-form","data-testid":o,children:[(0,p.jsxs)("div",{className:"passflow-form-container passflow-login-screen-centered",children:["success"===e?(0,p.jsxs)("div",{className:"passflow-login-screen-success",role:"status",children:[(0,p.jsx)(Vs,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}),(0,p.jsx)("span",{className:"passflow-login-screen-success-text",children:s})]}):"info"===e?(0,p.jsxs)("div",{className:"passflow-login-screen-info",role:"status",children:[(0,p.jsx)(Vs,{size:"big",id:"mail",type:"general",className:"passflow-login-screen-info-icon",matchTextColor:!0,decorative:!0}),(0,p.jsx)("p",{className:"passflow-login-screen-text passflow-login-screen-centered-text",children:s})]}):(0,p.jsx)(Ds,{message:s}),t?(0,p.jsx)("p",{className:"passflow-login-screen-hint",children:t}):null]}),n?(0,p.jsx)(Gs,{children:(0,p.jsx)(je,{size:"big",variant:"primary",type:"button",onClick:n.onClick,children:n.label})}):"error"===e&&a&&i?(0,p.jsx)(Gs,{children:(0,p.jsx)(je,{size:"big",variant:"primary",type:"button",onClick:i,children:r})}):null]}),ft=({chrome:e,state:s})=>{const t=(()=>{switch(s.kind){case"credentials":return(0,p.jsx)(Qs,{...s});case"code-entry":return(0,p.jsx)(qs,{...s});case"email-code":return(0,p.jsx)(rt,{...s});case"new-password":return(0,p.jsx)(ct,{...s});case"passkey-progress":return(0,p.jsx)(dt,{...s});case"device-approval":return(0,p.jsx)(Xs,{...s});case"second-factor":return(0,p.jsx)(ut,{...s});case"invitation":return(0,p.jsx)(it,{...s});case"general-error":return(0,p.jsx)(ot,{...s});case"consent":return(0,p.jsx)(Js,{...s});case"status":return(0,p.jsx)(mt,{...s})}})(),a="general-error"===s.kind||"status"===s.kind&&"error"===s.tone,r="general-error"===s.kind?"passflow-error-wrapper":"sign-in"===e.variant?"passflow-signin-wrapper":"reset-password"===e.variant?"passflow-reset-password-wrapper":void 0;return(0,p.jsx)(ht,{iconId:a?"logo-red":"logo",title:e.title,subtitle:e.subtitle,className:r,customCss:e.customCss,customLogo:e.customLogo,customLogoAlt:e.customLogoAlt,removeBranding:e.removeBranding,children:t})},gt=y.Root,wt=y.Trigger,xt=y.Anchor,yt=(0,l.forwardRef)(({className:e,align:s="center",sideOffset:t=4,...a},r)=>(0,p.jsx)(y.Portal,{children:(0,p.jsx)(y.Content,{ref:r,align:s,sideOffset:t,className:O("passflow-popover-content",e),...a})}));yt.displayName=y.Content.displayName;var vt=({size:e="medium",label:s})=>(0,p.jsx)("span",{className:O("passflow-spinner",{"passflow-spinner--small":"small"===e}),role:void 0===s?void 0:"status","aria-label":s,"aria-hidden":void 0===s||void 0}),Ct=({factors:e,selected:s,disabled:t=!1,label:a="Other verification methods",onSelect:r})=>(0,p.jsx)("ul",{className:"passflow-upgrade-dialog__alternatives","aria-label":a,children:e.map(e=>(0,p.jsx)("li",{className:"passflow-upgrade-dialog__alternative",children:(0,p.jsx)(je,{size:"big",variant:"option",type:"button",disabled:t,pressed:e.type===s,description:e.hint,"data-testid":`upgrade-dialog-factor-${e.type}`,onClick:()=>r(e.type),children:e.label})},e.type))}),bt="passflow-upgrade-code",kt="passflow-upgrade-code-error",jt=({factors:e,selected:s,busy:t=!1,error:a,showAlternatives:r=!1,submitLabel:o="Verify",cancelLabel:i="Cancel",alternativesLabel:n="Use another way",testId:c,onSelectFactor:d,onToggleAlternatives:u,onSubmit:h,onCancel:m})=>{const[f,g]=(0,l.useState)(""),w=(0,l.useRef)(null),x=e.find(e=>e.type===s)??e[0],y="code"===x?.input?x.code:void 0,v=void 0!==y,C=e.length>1,b=e=>{w.current!==e&&(w.current=e,d(e))};return(0,p.jsxs)("form",{className:"passflow-upgrade-dialog__form","data-testid":c,"aria-busy":t,onSubmit:e=>{if(e.preventDefault(),!x)return;const s=f.trim();v&&0===s.length||(b(x.type),h(v?s:void 0))},noValidate:!0,children:[x?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__factor",children:[(0,p.jsx)("span",{className:"passflow-upgrade-dialog__factor-label",children:x.label}),x.hint?(0,p.jsx)("span",{className:"passflow-upgrade-dialog__factor-hint",children:x.hint}):null]}):null,y?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__field",children:[(0,p.jsx)("label",{htmlFor:bt,className:"passflow-field-label",children:"Verification code"}),(0,p.jsx)(Us,{id:bt,name:"upgrade_code",type:"text",inputMode:y.inputMode,autoComplete:y.autoComplete,autoCorrect:"off",autoCapitalize:y.autoCapitalize,spellCheck:!1,maxLength:y.maxLength,value:f,disabled:t,isError:Boolean(a),"aria-invalid":Boolean(a),"aria-describedby":a?kt:void 0,"data-testid":"upgrade-dialog-code",onChange:e=>g(e.target.value)})]}):null,(0,p.jsx)(Ds,{id:kt,message:a}),(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__actions",children:[(0,p.jsx)(je,{size:"big",variant:"primary",type:"submit",disabled:t||!x||v&&0===f.trim().length,"data-testid":"upgrade-dialog-submit",children:t?"Verifying…":o}),C?(0,p.jsx)(je,{size:"big",variant:"clean",type:"button",disabled:t,"aria-expanded":r,"data-testid":"upgrade-dialog-alternatives",onClick:u,children:n}):null,r&&C?(0,p.jsx)(Ct,{factors:e,selected:s,disabled:t,onSelect:e=>{g(""),b(e)}}):null,(0,p.jsx)(je,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-cancel",onClick:m,children:i})]})]})},St={totp:{label:"Authenticator app",hint:"Enter the code from your authenticator app"},passkey:{label:"Passkey",hint:"Confirm with your device"},recovery_codes:{label:"Recovery code",hint:"Enter one of your single-use recovery codes"},email_otp:{label:"Email code",hint:"Enter the code we emailed you"},sms_otp:{label:"SMS code",hint:"Enter the code we texted you"}},Mt=Object.freeze({maxLength:6,inputMode:"numeric",autoComplete:"one-time-code",autoCapitalize:"off"}),Et=Object.freeze({totp:Mt,email_otp:Mt,sms_otp:Mt,recovery_codes:Object.freeze({maxLength:16,inputMode:"text",autoComplete:"off",autoCapitalize:"characters"}),passkey:null}),Nt=(e,s)=>e.map(e=>{const t=St[e.type],a=s?.[e.type],r={type:e.type,label:a?.label??t.label,hint:a?.hint??t.hint};return"code"===e.input?{...r,input:"code",code:(o=e.type,Et[o]??Mt)}:{...r,input:"none"};var o}),_t=e=>"string"==typeof e&&e?e:void 0,It=e=>"object"==typeof e&&null!==e?e:void 0,Lt=Object.freeze({wrong_code:"rejected",challenge_spent:"rejected",not_registered:"rejected",prepare_not_required:"rejected",exhausted:"exhausted",attempts_exhausted:"exhausted",unavailable:"unavailable",session_changed:"session-changed",fatal:"transport",protocol:"transport",network:"transport"}),At=(e,s)=>{const t=_t(s.kind);return void 0!==(a=t)&&Object.hasOwn(Lt,a)?t:(e=>"number"==typeof e.status||"string"==typeof e.id||void 0!==It(e.response))(s)?(0,n.classifyUpgradeError)(e,"refresh").kind:void 0;var a},Pt=e=>{const s=It(e);if(!s)return"rejected";const t=_t(s.code),a=_t(s.name);if("upgrade_cancelled"===t||"UpgradeCancelledError"===a||!0===s.cancelled)return"cancelled";if("upgrade_unsatisfiable"===t||"UpgradeUnsatisfiableError"===a)return"unsatisfiable";if("upgrade_unavailable"===t||"UpgradeUnavailableError"===a)return"unavailable";if("upgrade_exhausted"===t||"UpgradeExhaustedError"===a)return"exhausted";if("upgrade_insufficient"===t||"UpgradeInsufficientError"===a)return"insufficient";if("upgrade_session_changed"===t||"UpgradeSessionChangedError"===a)return"session-changed";const r=At(e,s);return void 0===r?"rejected":Lt[r]},Ft=e=>{const s=It(e);if(!s)return;const t={};return"string"==typeof s.acrValues&&(t.acrValues=s.acrValues),"number"==typeof s.level&&(t.level=s.level),"number"==typeof s.maxAge&&(t.maxAge=s.maxAge),void 0===t.acrValues&&void 0===t.level&&void 0===t.maxAge?void 0:t},Tt=e=>{if(!e)return"an unknown level";const s=[];return void 0!==e.level?s.push(`AAL${e.level}`):e.acrValues&&s.push(`acr ${e.acrValues}`),void 0!==e.maxAge&&s.push(`verified within ${e.maxAge}s`),s.length>0?s.join(", "):"an unknown level"},Rt=e=>Ft({acrValues:e.acrValues,level:e.requiredLevel,maxAge:e.maxAge}),Ut=(e,s)=>{const t=It(e);return _t(t?.message)??s},Yt=(e,s)=>{const{handlers:t,testId:a}=e;switch(Pt(s)){case"cancelled":return{kind:"cancelled",message:"Verification cancelled",detail:"The action that needed extra verification was not completed.",testId:a,onDismiss:t.onDismiss};case"exhausted":return{kind:"exhausted",message:"Too many attempts",detail:Ut(s,"No attempts are left for this verification. Start the action again to retry."),testId:a,onDismiss:t.onDismiss};case"unsatisfiable":return{kind:"unsatisfiable",message:"No usable verification method",detail:Ut(s,"None of your verification methods can answer this request."),required:e.prompt?Rt(e.prompt.challenge):void 0,testId:a,onDismiss:t.onDismiss};case"unavailable":return{kind:"unavailable",message:"Verification is unavailable",detail:Ut(s,"This deployment cannot raise your assurance level right now."),testId:a,onDismiss:t.onDismiss};case"session-changed":return{kind:"cancelled",message:"Verification stopped",detail:Ut(s,"Your session changed while verifying, so the request was abandoned."),testId:a,onDismiss:t.onDismiss};case"insufficient":{const e=It(s);return{kind:"insufficient",message:Ut(s,"Verified, but not enough for this action"),obtained:Ft(e?.obtained)??{},required:Ft(e?.required)??{},testId:a,onDismiss:t.onDismiss}}default:return{kind:"transport",message:"Verification could not be completed",detail:Ut(s,"The verification request failed before it reached the server."),retryable:!0===It(s)?.retryable,testId:a,onRetry:t.onRetry,onDismiss:t.onDismiss}}},Vt=e=>{const{prompt:s,outcome:t,ui:a,labels:r,handlers:o,testId:i}=e;if(t)switch(t.kind){case"elevated":return{kind:"success",message:"Verification complete",detail:"Your request is continuing.",testId:i,onDismiss:o.onDismiss};case"insufficient":return{kind:"insufficient",message:`Verified to ${Tt(t.obtained)}; this action requires ${Tt(t.required)}`,obtained:t.obtained,required:t.required,detail:"The elevation succeeded but the action was challenged again. Nothing was completed.",testId:i,onDismiss:o.onDismiss};case"cancelled":return{kind:"cancelled",message:"Verification cancelled",detail:"The action that needed extra verification was not completed.",testId:i,onDismiss:o.onDismiss};default:return Yt(e,t.error)}if(!s)return{kind:"working",message:"Preparing verification…",testId:i,onCancel:o.onCancel};const n=void 0===s.previousError?void 0:Pt(s.previousError);if(void 0!==n&&"rejected"!==n)return Yt(e,s.previousError);const l=Nt(s.factors,r),c=Rt(s.challenge),d=l[0];if(void 0===d)return{kind:"unsatisfiable",message:"No usable verification method",detail:`This action requires ${Tt(c)}, and no verification method is available to answer it.`,required:c,testId:i,onDismiss:o.onDismiss};const p=l.find(e=>e.type===a?.selected)?.type??d.type,u=l.find(e=>e.type===p),h=!0===a?.busy;return h&&"none"===u?.input?{kind:"working",message:"Waiting for your passkey…",detail:"Follow the prompt from your device to confirm it is you.",testId:i,onCancel:o.onCancel}:{kind:"challenge",factors:l,selected:p,reason:"This action needs extra verification",busy:h,error:"rejected"===n?Ut(s.previousError,"That code was not accepted. Try again."):null,showAlternatives:!0===a?.showAlternatives,testId:i,onSelectFactor:o.onSelectFactor,onToggleAlternatives:o.onToggleAlternatives,onSubmit:o.onSubmit,onCancel:o.onCancel}},zt=e=>{switch(e.kind){case"challenge":case"working":return e.onCancel;default:return e.onDismiss}},Dt={working:"working",success:"success",insufficient:"problem",unsatisfiable:"problem",unavailable:"problem",exhausted:"problem",transport:"problem",cancelled:"neutral"},Bt=({term:e,bar:s})=>(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__bar",children:[(0,p.jsx)("span",{className:"passflow-upgrade-dialog__bar-term",children:e}),(0,p.jsx)("span",{className:"passflow-upgrade-dialog__bar-value",children:Tt(s)})]}),Gt=e=>{const s=Dt[e.kind],{detail:t}=e,a="success"===e.kind?e.autoCloseMs??1800:0,r="success"===e.kind?e.onDismiss:void 0;return(0,l.useEffect)(()=>{if(void 0===r||a<=0)return;const e=setTimeout(r,a);return()=>clearTimeout(e)},[a,r]),(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__status","data-testid":e.testId,"data-upgrade-state":e.kind,children:[(0,p.jsxs)("div",{className:`passflow-upgrade-dialog__status-head passflow-upgrade-dialog__status-head--${s}`,role:"problem"===s?"alert":"status","aria-live":"problem"===s?"assertive":"polite",children:["working"===s?(0,p.jsx)(vt,{size:"small"}):null,"success"===s?(0,p.jsx)(Vs,{size:"small",id:"check",type:"general",className:"icon-success",decorative:!0}):null,"problem"===s?(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning",decorative:!0}):null,(0,p.jsx)("span",{className:"passflow-upgrade-dialog__status-message",children:e.message})]}),t?(0,p.jsx)("p",{className:"passflow-upgrade-dialog__status-detail",children:t}):null,"insufficient"===e.kind?(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__bars","data-testid":"upgrade-dialog-bars",children:[(0,p.jsx)(Bt,{term:"Verified",bar:e.obtained}),(0,p.jsx)(Bt,{term:"Required",bar:e.required})]}):null,"unsatisfiable"===e.kind&&e.required?(0,p.jsx)("div",{className:"passflow-upgrade-dialog__bars","data-testid":"upgrade-dialog-bars",children:(0,p.jsx)(Bt,{term:"Required",bar:e.required})}):null,(0,p.jsxs)("div",{className:"passflow-upgrade-dialog__actions",children:["transport"===e.kind&&e.retryable&&e.onRetry?(0,p.jsx)(je,{size:"big",variant:"primary",type:"button","data-testid":"upgrade-dialog-retry",onClick:e.onRetry,children:e.retryLabel??"Try again"}):null,"working"===e.kind&&e.onCancel?(0,p.jsx)(je,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-cancel",onClick:e.onCancel,children:"Cancel"}):null,"working"!==e.kind?(0,p.jsx)(je,{size:"big",variant:"clean",type:"button","data-testid":"upgrade-dialog-dismiss",onClick:e.onDismiss,children:e.dismissLabel??("success"===e.kind?"Done":"Close")}):null]})]})},Ot="passflow-upgrade-dialog-description",Ht=({open:e,title:s="Extra verification required",state:t})=>{const a=zt(t),r="challenge"===t.kind?t.reason:void 0;return(0,p.jsx)(_e,{open:e,onOpenChange:e=>{e||a?.()},children:(0,p.jsxs)(Fe,{className:"passflow-upgrade-dialog","data-testid":"upgrade-dialog","aria-describedby":r?Ot:void 0,children:[(0,p.jsxs)(Te,{className:"passflow-upgrade-dialog__header",children:[(0,p.jsx)(Ue,{children:s}),r?(0,p.jsx)(Ye,{id:Ot,children:r}):null]}),"challenge"===t.kind?(0,p.jsx)(jt,{...t}):(0,p.jsx)(Gt,{...t})]})})},qt=e=>e?{message:e.message,scope:"bad_credentials"===e.type||"missing_credentials"===e.type?"credentials":"form"}:null,Zt=e=>{if("loading"===e.status)return null;if("code_entry"===e.status)return{chrome:{title:"Enter the code",subtitle:"Type the code shown on your device."},state:{kind:"code-entry",error:e.error?.message,testId:"device-code-entry",onSubmit:e.submitCode}};if("done"===e.status)return{chrome:{title:e.info?.app_name?`You're signed in to ${e.info.app_name}`:"You're signed in",subtitle:"Head back to your terminal — it's ready to go."},state:{kind:"status",tone:"success",message:"This device is approved",detail:"You can close this page.",testId:"passkey"===e.info?.mode?"device-auto-passkey-done":"device-done"}};if("refused"===e.status)return{chrome:{title:"Sign-in isn't available this way"},state:{kind:"status",tone:"disabled",message:(e.error??D("mode_disabled")).message,detail:"Nothing was approved, and nothing was sent to the device that showed you this code.",testId:"device-mode-disabled"}};if("failed"===e.status){const s=e.error??D("generic");return{chrome:{title:"That didn't work"},state:{kind:"status",tone:"error",message:s.message,recoverable:s.isRecoverable,testId:"device-failed",onRetry:s.isRecoverable?()=>e.submitCode(""):void 0}}}if(!e.info)return null;if("second_factor"===e.status||"working"===e.status&&e.isSecondFactorPending)return{chrome:{title:"Two-Factor Authentication",subtitle:`One more step to approve ${e.info.app_name}.`},state:{kind:"second-factor",methods:e.secondFactorMethods,identity:e.email,busy:"working"===e.status,error:e.error?.message,testId:"device-second-factor",onSubmit:(s,t)=>{e.submitSecondFactor(s,t)},onMethodChange:e.clearError}};if("passkey"===e.info.mode){const s=("ready"===e.status||"working"===e.status)&&!e.error;return{chrome:{title:`Sign in to ${e.info.app_name}`,subtitle:"Confirm with your passkey to finish this device sign-in."},state:{kind:"passkey-progress",working:s,message:e.error?"Passkey sign-in couldn't continue.":"Waiting for your passkey — follow the prompt on your device.",error:e.error?.message,recoverable:e.error?.isRecoverable,testId:"device-auto-passkey",onRetry:e.error?.isRecoverable?()=>{e.confirmWithPasskey()}:void 0}}}const s="working"===e.status,t=e.isAuthenticated||"signed_in"===e.status,a=(e=>({identities:e.info?.methods.password?[{id:"email_or_username",label:"Email",selectLabel:"Use email",requiredMessage:"Email is required",format:"email",password:!0}]:[],passkey:Boolean(e.info?.methods.passkey),providers:[]}))(e),r=(e=>{if(e.info)return{code:e.info.user_code,appName:e.info.app_name,message:"requested this sign-in. Confirm that the code matches your terminal. If it doesn't, close this page.",codeTestId:"device-consent-user-code",appNameTestId:"device-consent-app-name"}})(e);return"full_login"===e.info.mode?t?{chrome:{title:`Approve sign-in to ${e.info.app_name}`,subtitle:"Confirm that the code matches your terminal before approving."},state:{kind:"device-approval",appName:e.info.app_name,code:e.info.user_code,identity:e.email,busy:s,error:e.error?.message,testId:"device-full-login-approval",actionTestId:"device-confirm",codeTestId:"device-consent-user-code",appNameTestId:"device-consent-app-name",onApprove:()=>{e.approve()}}}:{chrome:{title:`Sign in to approve ${e.info.app_name}`,subtitle:"Confirm the code, then sign in to continue.",variant:"sign-in"},state:{kind:"credentials",methods:a,passwordPolicy:null,notice:r,busy:s,error:qt(e.error),primaryLabel:s?"Signing in…":"Sign In",passkeyLabel:"Sign In with a Passkey",testId:"device-full-login",onPassword:s=>{e.signInWithPassword(s.emailOrUsername,s.password)},onPasskey:()=>{e.signInWithPasskey()}}}:{chrome:{title:`Approve sign-in to ${e.info.app_name}`,subtitle:"Confirm the code, then sign in to approve this request.",variant:"sign-in"},state:{kind:"credentials",methods:a,passwordPolicy:null,notice:r,busy:s,error:qt(e.error),primaryLabel:s?"Approving…":"Approve",primaryTestId:"device-confirm",passkeyLabel:"Approve with a Passkey",testId:"device-consent",onPassword:s=>{e.confirmWithPassword(s.emailOrUsername,s.password)},onPasskey:()=>{e.confirmWithPasskey()}}}},Jt=({onComplete:e,onCancel:s,numInputs:t})=>{const[a,r]=(0,l.useState)(""),[o,i]=(0,l.useState)(!1),{setupData:n,recoveryCodes:c,step:d,beginSetup:u,confirmSetup:h,reset:m,isLoading:f,isError:g,error:w}=As(),x=(0,l.useId)(),y=`${x}-label`,v=`${x}-error`,C=t??6;return"idle"===d?(0,p.jsx)(ht,{title:"Enable Two-Factor Authentication",subtitle:"Add an extra layer of security to your account",className:"passflow-2fa-setup",children:(0,p.jsxs)("div",{className:"passflow-2fa-setup-start",children:[(0,p.jsx)(je,{size:"big",type:"button",variant:"primary",onClick:()=>u(),disabled:f,children:f?"Loading...":"Get Started"}),s&&(0,p.jsx)("button",{type:"button",className:"passflow-link-button",onClick:s,children:"Cancel"}),g&&(0,p.jsxs)("div",{className:"passflow-field-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-field-error-text",children:w})]})]})}):"setup"===d&&n?(0,p.jsx)(ht,{title:"Scan QR Code",subtitle:"Scan this code with your authenticator app (Google Authenticator, Authy, etc.)",className:"passflow-2fa-setup",children:(0,p.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),await h(a)},className:"passflow-2fa-setup-qr",children:[(0,p.jsx)("div",{className:"passflow-2fa-qr-container",children:(0,p.jsx)("img",{src:`data:image/png;base64,${n.qr_code}`,alt:"2FA QR Code",className:"passflow-2fa-qr-image"})}),(0,p.jsxs)("div",{className:"passflow-2fa-secret-toggle",children:[(0,p.jsx)("button",{type:"button",className:"passflow-link-button",onClick:()=>i(!o),children:o?"Hide manual code":"Can't scan? Enter code manually"}),o&&(0,p.jsx)("code",{className:"passflow-2fa-secret-code",children:n.secret})]}),(0,p.jsxs)("div",{className:"passflow-2fa-confirm-section",children:[(0,p.jsxs)("p",{id:y,className:"passflow-2fa-confirm-label",children:["Enter the ",C,"-digit code from your app to confirm:"]}),(0,p.jsxs)("div",{id:"otp-wrapper",className:"passflow-verify-otp-wrapper",children:[(0,p.jsx)(De,{id:x,name:"code",length:C,value:a,onChange:e=>{r(e)},state:g?"error":"default",labelledBy:y,describedBy:g?v:void 0,autoFocus:!0}),g&&(0,p.jsxs)("div",{className:"passflow-verify-otp-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:v,className:"passflow-verify-otp-error-text",children:w})]})]})]}),(0,p.jsx)(je,{size:"big",type:"submit",variant:"primary",disabled:a.length!==C||f,children:f?"Confirming...":"Confirm & Enable"})]})}):"complete"===d&&c.length>0?(0,p.jsx)(ht,{title:"Save Your Recovery Codes",subtitle:"Store these codes in a safe place. You'll need them if you lose access to your authenticator.",className:"passflow-2fa-setup",children:(0,p.jsxs)("div",{className:"passflow-2fa-setup-complete",children:[(0,p.jsxs)("div",{className:"passflow-2fa-warning",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{children:"These codes will only be shown once. Make sure to save them!"})]}),(0,p.jsx)("div",{className:"passflow-2fa-recovery-codes",children:c.map(e=>(0,p.jsx)("code",{className:"passflow-2fa-recovery-code",children:e},e))}),(0,p.jsx)(je,{size:"big",type:"button",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(c.join("\n"))},children:"Copy to Clipboard"}),(0,p.jsx)(je,{size:"big",type:"button",variant:"primary",onClick:()=>{e?.(c),m()},children:"I've Saved These Codes"})]})}):null},Wt=({twoFactorVerifyPath:e=Xe.two_factor_verify.path,signInPath:s=Xe.signin.path})=>{const[t,a]=(0,l.useState)(!1),{navigate:r}=Cs(),o=Oe();(0,l.useEffect)(()=>{o.isTwoFactorVerificationRequired()||(ce.canRedirect()?(ce.incrementRedirect(),r({to:s}),a(!0)):a(!1))},[o,r,s]);return t||!o.isTwoFactorVerificationRequired()&&ce.canRedirect()?null:(0,p.jsx)(Jt,{onComplete:()=>{r({to:e})},onCancel:()=>{ce.reset(),r({to:s})}})},Kt=/\/two-factor-setup-magic-link\/([^/?#]+)/,Qt=({token:e,onSuccess:s,onError:t,redirectOnSuccess:a=!0,signInPath:r=Xe.signin.path})=>{const o=e??(()=>{const e=Kt.exec(window.location.pathname)??Kt.exec(window.location.hash);if(!e?.[1])return"";try{return decodeURIComponent(e[1])}catch{return e[1]}})(),{navigate:i}=Cs(),{isLoading:n,isRetrying:c,isValidated:d,error:u,retry:h,retryCountdown:m}=Ps(o);(0,l.useEffect)(()=>{u&&t?.(u)},[u,t]);if(n)return(0,p.jsx)(ht,{title:"Validating Magic Link",subtitle:"Please wait while we verify your link...",className:"passflow-2fa-magic-link-loading",children:(0,p.jsxs)("div",{className:"passflow-loading-container",role:"status","aria-live":"polite","aria-busy":"true",children:[(0,p.jsx)(Vs,{id:"logo",type:"general",size:"large",className:"passflow-loading-spinner"}),(0,p.jsx)("p",{className:"passflow-loading-text",children:"Validating your magic link..."})]})});if(u){const e="SERVER_ERROR"===u.code||"RATE_LIMITED"===u.code,s="RATE_LIMITED"===u.code&&null!==m&&m>0;return(0,p.jsx)(ht,{title:"Magic Link Validation Failed",subtitle:Xt(u.code),className:"passflow-2fa-magic-link-error",children:(0,p.jsxs)("div",{className:"passflow-error-container",role:"alert","aria-live":"assertive",children:[(0,p.jsx)("div",{className:"passflow-error-icon",children:(0,p.jsx)(Vs,{id:"warning",type:"general",size:"large"})}),(0,p.jsx)("p",{className:"passflow-error-message",id:"error-message",children:u.message}),(0,p.jsxs)("div",{className:"passflow-error-actions",children:[e&&(0,p.jsx)(je,{size:"big",type:"button",variant:"primary",onClick:h,disabled:s||c,"aria-describedby":"error-message",children:c?"Retrying...":s?`Try again in ${$t(m)}`:"Try Again"}),(0,p.jsx)(je,{size:"big",type:"button",variant:"secondary",onClick:()=>i({to:r}),children:"Back to Sign In"})]}),!e&&(0,p.jsx)("p",{className:"passflow-error-help-text",children:"Please contact your administrator to request a new magic link."})]})})}return d?(0,p.jsx)(Jt,{onComplete:()=>{s?.(),a&&i({to:r})},onCancel:()=>{i({to:r})}}):null};function Xt(e){switch(e){case"EXPIRED_TOKEN":return"This magic link has expired";case"INVALID_TOKEN":return"This magic link is invalid";case"REVOKED_TOKEN":return"This magic link has been revoked";case"RATE_LIMITED":return"Too many attempts";case"SERVER_ERROR":return"Something went wrong";default:return"An error occurred"}}function $t(e){return null===e?"":`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`}var ea={totp:"Authenticator App",email_otp:"Email Code",sms_otp:"SMS Code",passkey:"Passkey",recovery_codes:"Recovery Code",push_fcm:"Push Notification (FCM)",push_webpush:"Push Notification (Web)"},sa={totp:"📱",email_otp:"✉️",sms_otp:"💬",passkey:"🔑",recovery_codes:"🔒",push_fcm:"🔔",push_webpush:"🔔"},ta=({availableMethods:e,currentMethod:s,onSelectMethod:t,isOpen:a,onClose:r})=>(0,p.jsx)(u.Root,{open:a,onOpenChange:e=>!e&&r(),children:(0,p.jsxs)(u.Portal,{children:[(0,p.jsx)(u.Overlay,{className:"pf-dialog-overlay"}),(0,p.jsxs)(u.Content,{className:"pf-dialog-content pf-method-selector-dialog",children:[(0,p.jsx)(u.Title,{className:"pf-dialog-title",children:"Choose Verification Method"}),(0,p.jsx)(u.Description,{className:"pf-dialog-description",children:"Select an alternative method to verify your identity"}),(0,p.jsx)("div",{className:"pf-method-selector-list",children:e.map(e=>(0,p.jsxs)("button",{type:"button",className:"pf-method-selector-item "+(e===s?"pf-method-selector-item-active":""),onClick:()=>(e=>{t(e),r()})(e),disabled:e===s,children:[(0,p.jsx)("span",{className:"pf-method-icon",children:sa[e]||"🔐"}),(0,p.jsx)("span",{className:"pf-method-label",children:ea[e]||e}),e===s&&(0,p.jsx)("span",{className:"pf-method-current-badge",children:"Current"})]},e))}),(0,p.jsx)(u.Close,{asChild:!0,children:(0,p.jsx)("button",{type:"button",className:"pf-dialog-close","aria-label":"Close",children:"×"})})]})]})}),aa=({firstFactorMethod:e,onSuccess:s,onError:t,trustDevice:a=!1})=>{const{challenge:r,isLoading:o,error:i,requestChallenge:n,verify:c,switchMethod:d,selectedMethod:u}=Ls(),[h,m]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),w=(0,l.useId)(),x=`${w}-label`,y=`${w}-error`;(0,l.useEffect)(()=>{n(e)},[n,e]),(0,l.useEffect)(()=>{i&&t&&t(i)},[i,t]);const v=async()=>{h&&await c(h,a)&&s?.()},C=e=>{m(e),6===e.length&&setTimeout(()=>{c(e,a).then(e=>{e&&s?.()})},100)};if(!r)return(0,p.jsx)("div",{className:"pf-two-factor-challenge pf-loading",children:(0,p.jsx)("p",{children:"Loading challenge..."})});const b=u||r.method,k=[r.method,...r.alternative_methods||[]];return(0,p.jsxs)("div",{className:"pf-two-factor-challenge",children:[(0,p.jsxs)("div",{className:"pf-challenge-method-info",children:[(0,p.jsx)("h3",{children:"Two-Factor Authentication"}),(0,p.jsx)("p",{id:x,children:"Enter the verification code"})]}),(()=>{switch(b){case"totp":case"email_otp":case"sms_otp":return(0,p.jsxs)("div",{className:"pf-challenge-input-wrapper",children:[(0,p.jsx)(De,{id:w,name:"code",length:6,value:h,onChange:C,state:o?"disabled":i?"error":"default",labelledBy:x,describedBy:i?y:void 0,autoFocus:!0}),i&&(0,p.jsx)("div",{id:y,className:"pf-otp-error",children:i.message}),"email_otp"===b&&r.code_sent_to&&(0,p.jsxs)("p",{className:"pf-challenge-hint",children:["Code sent to ",r.code_sent_to]}),"sms_otp"===b&&r.code_sent_to&&(0,p.jsxs)("p",{className:"pf-challenge-hint",children:["Code sent to ",r.code_sent_to]}),(0,p.jsx)("button",{type:"button",onClick:v,disabled:o||6!==h.length,className:"pf-button pf-button-primary",children:o?"Verifying...":"Verify"})]});case"passkey":return(0,p.jsx)("div",{className:"pf-challenge-input-wrapper",children:(0,p.jsx)("button",{type:"button",onClick:v,disabled:o,className:"pf-button pf-button-primary",children:o?"Verifying...":"Use Passkey"})});case"recovery_codes":return(0,p.jsxs)("div",{className:"pf-challenge-input-wrapper",children:[(0,p.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"Enter recovery code",disabled:o,className:"pf-input"}),(0,p.jsx)("button",{type:"button",onClick:v,disabled:o||!h,className:"pf-button pf-button-primary",children:o?"Verifying...":"Verify"})]});default:return(0,p.jsxs)("p",{children:["Unsupported method: ",b]})}})(),k.length>1&&(0,p.jsx)("button",{type:"button",onClick:()=>g(!0),className:"pf-button pf-button-secondary pf-button-switch-method",children:"Use different method"}),(0,p.jsx)(ta,{availableMethods:k,currentMethod:b,onSelectMethod:async e=>{m(""),await d(e)},isOpen:f,onClose:()=>g(!1)})]})},ra=({onSuccess:e,onBack:s,title:t="Use Recovery Code",subtitle:a="Enter one of your recovery codes",signInPath:r,trustDeviceLabel:o="Trust this device"})=>{const[i,n]=(0,l.useState)(""),[c,d]=(0,l.useState)(!1),{useRecoveryCode:u,isLoading:h,isError:m,errorDetails:f,reset:g}=Fs(),w=()=>{ce.reset(),window.location.href=r||"/signin"},x=!ce.canRedirect(),y=h||"not_enabled"===f?.type||"expired"===f?.type||x;return(0,p.jsx)(ht,{title:t,subtitle:a,className:"passflow-2fa-recovery",children:(0,p.jsxs)("form",{onSubmit:async s=>{s.preventDefault(),await u(i,(e=>e?{trustDevice:!0}:void 0)(c))&&e?.()},className:"passflow-form",children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)("div",{className:"passflow-form-field",children:(0,p.jsx)(Zs,{label:o,checked:c,disabled:y,onChange:e=>d(e.target.checked)})}),(0,p.jsxs)("div",{className:"passflow-form-field",children:[(0,p.jsx)("label",{htmlFor:"recovery-code",className:O("passflow-field-label",m&&"passflow-field-label--error"),children:"Recovery Code"}),(0,p.jsx)("input",{id:"recovery-code",type:"text",value:i,onChange:e=>{g(),n(e.target.value.toUpperCase().replace(/\s/g,""))},placeholder:"XXXX-XXXX",className:O("passflow-field passflow-field--text passflow-field--focused",m&&"passflow-field--error",y&&"passflow-field--disabled"),autoComplete:"off",disabled:y}),m&&f?x?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--critical",children:[(0,p.jsx)(Vs,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{className:"passflow-form-error-text",children:ce.getLoopDetectedMessage()}),r&&(0,p.jsx)(je,{type:"button",size:"medium",variant:"secondary",onClick:w,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"not_enabled"===f.type?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--persistent",children:[(0,p.jsx)(Vs,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{className:"passflow-form-error-text",children:G(f)}),r&&(0,p.jsx)(je,{type:"button",size:"medium",variant:"secondary",onClick:w,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"expired"===f.type?(0,p.jsxs)("div",{className:"passflow-form-info",children:[(0,p.jsx)(Vs,{size:"small",id:"info",type:"general",className:"icon-info"}),(0,p.jsx)("span",{className:"passflow-form-info-text",children:G(f)})]}):(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:G(f)})]}):null]})]}),!y&&(0,p.jsx)(je,{size:"big",type:"submit",variant:"primary",disabled:i.length<8||h,className:"passflow-button-signin",children:h?"Verifying...":"Verify"}),s&&!y&&(0,p.jsx)("div",{className:"passflow-form-actions",children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:["Have your device?"," ",(0,p.jsx)(je,{type:"button",size:"small",variant:"link",onClick:s,children:"Use authenticator code"})]})})]})})},oa=e=>e?{trustDevice:!0}:void 0,ia=({onSuccess:e,onUseRecovery:s,title:t="Two-Factor Authentication",subtitle:a,numInputs:r,shouldAutoFocus:o=!0,signInPath:i,twoFactorSetupPath:n,trustDeviceLabel:c="Trust this device"})=>{const[d,u]=(0,l.useState)(""),[h,m]=(0,l.useState)(!1),{verify:f,isLoading:g,isError:w,errorDetails:x,reset:y}=Fs(),v=(0,l.useId)(),C=`${v}-error`,b=r??6,k=a??`Enter the ${b}-digit code from your authenticator app`,j=()=>{ce.reset(),window.location.href=i||"/signin"},S=()=>{window.location.href=n||"/two-factor-setup"},M=!ce.canRedirect(),E=g||"not_enabled"===x?.type||"expired"===x?.type||M;return(0,p.jsx)(ht,{title:t,subtitle:k,className:"passflow-2fa-verify",children:(0,p.jsxs)("form",{onSubmit:async s=>{s.preventDefault(),await f(d,oa(h))&&e?.()},className:"passflow-form",children:[(0,p.jsxs)("div",{className:"passflow-form-container",children:[(0,p.jsx)("div",{className:"passflow-form-field",children:(0,p.jsx)(Zs,{label:c,checked:h,disabled:E,onChange:e=>m(e.target.checked)})}),(0,p.jsx)("div",{className:"passflow-verify-otp-wrapper",children:(0,p.jsx)(De,{id:v,name:"code",length:b,value:d,onChange:async s=>{(e=>{y(),u(e)})(s),s.length===b&&await f(s,oa(h))&&e?.()},state:E?"disabled":w?"error":"default",label:"Verification code",describedBy:w&&x?C:void 0,autoFocus:o&&!E})}),w&&x?M?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--critical",children:[(0,p.jsx)(Vs,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:ce.getLoopDetectedMessage()}),i&&(0,p.jsx)(je,{type:"button",size:"medium",variant:"secondary",onClick:j,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]}):"not_enabled"===x.type?(0,p.jsxs)("div",{className:"passflow-form-error passflow-form-error--persistent",children:[(0,p.jsx)(Vs,{size:"medium",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsxs)("div",{className:"passflow-form-error-content",children:[(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:"You need to set up two-factor authentication first."}),(0,p.jsxs)("div",{className:"passflow-form-error-actions",children:[n&&(0,p.jsx)(je,{type:"button",size:"medium",variant:"primary",onClick:S,className:"passflow-button-setup-2fa",children:"Set Up 2FA"}),i&&(0,p.jsx)(je,{type:"button",size:"medium",variant:"secondary",onClick:j,className:"passflow-button-back-to-signin",children:"Back to Sign In"})]})]})]}):"expired"===x.type?(0,p.jsxs)("div",{className:"passflow-form-info",children:[(0,p.jsx)(Vs,{size:"small",id:"info",type:"general",className:"icon-info"}),(0,p.jsx)("span",{id:C,className:"passflow-form-info-text",children:G(x)})]}):(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:C,className:"passflow-form-error-text",children:G(x)})]}):null]}),!E&&(0,p.jsx)(je,{size:"big",type:"submit",variant:"primary",disabled:d.length!==b||g,className:"passflow-button-signin",children:g?"Verifying...":"Verify"}),s&&!E&&(0,p.jsx)("div",{className:"passflow-form-actions",children:(0,p.jsxs)("p",{className:"passflow-dont-have-account",children:["Lost your device?"," ",(0,p.jsx)(je,{type:"button",size:"small",variant:"link",onClick:s,children:"Use recovery code"})]})})]})})},na=e=>{switch(Pt(e)){case"cancelled":case"session-changed":return{status:"idle"};case"insufficient":return{status:"insufficient",obtained:Ft(e.obtained)??{},required:Ft(e.required)??{}};case"exhausted":return{status:"error",kind:"exhausted",error:e};case"unsatisfiable":return{status:"error",kind:"unsatisfiable",error:e};case"unavailable":return{status:"error",kind:"unavailable",error:e};default:return{status:"error",kind:"transport",error:e}}},la=e=>e.error??("failed"===e.proof.status?e.proof.reason:void 0)??new Error("The verification flight failed without reporting a reason."),ca=e=>void 0===e?"\0default":e.map(e=>e.type).join("\0"),da=e=>void 0===e?"none":"string"==typeof e?`mode:${e}`:"function"==typeof e?"fn":`limits:${e.maxBodyBytes??""}:${e.allowStreamingBody??""}`,pa=({children:e,enabled:s=!0,backend:t,interceptFetch:a=!1,requireChallengeChannel:r,shouldIntercept:o,replay:i,onCancel:c,onUpgradeDiagnostic:d,factors:u,maxAttempts:h,relyingPartyId:m,labels:f,title:g,renderDialog:w})=>{const x=Oe(),[y,v]=(0,l.useState)(null),[C,b]=(0,l.useState)({status:"idle"}),[k,j]=(0,l.useState)(null),[S,M]=(0,l.useState)(!1),[E,N]=(0,l.useState)(!1),[_,I]=(0,l.useState)(void 0),[L,A]=(0,l.useState)(!1),P=(0,l.useRef)(void 0),F=(0,l.useRef)(null),T=(0,l.useRef)(!1),R=(0,l.useRef)(!1),U=(0,l.useRef)(!1),Y=(0,l.useRef)(o),V=(0,l.useRef)(d);Y.current=o,V.current=d;const z=(0,l.useRef)(u),D=(0,l.useRef)(i);z.current=u,D.current=i;const B=(0,l.useCallback)(e=>{const s=D.current;return"function"!=typeof s||s(e)},[]),G=(0,l.useCallback)(e=>{const s=P.current;return void 0!==s&&(P.current=void 0,s(e),!0)},[]),O=(0,l.useCallback)(()=>{F.current=null,T.current=!1,v(null),j(null),N(!1),M(!1)},[]),H=(0,l.useCallback)(e=>new Promise(s=>{U.current?s({type:"cancel"}):(e.onRequirementRaised=s=>{v({challenge:s.challenge,factors:s.factors,previousError:e.previousError}),b({status:"challenged",challenge:s.challenge,factors:s.factors.map(e=>e.type)})},P.current=s,F.current=e,T.current=!1,R.current=!1,I(void 0),j(null),N(!1),M(!1),v({challenge:e.challenge,factors:e.factors,previousError:e.previousError}),b({status:"challenged",challenge:e.challenge,factors:e.factors.map(e=>e.type)}))}),[]),q=(0,l.useCallback)(e=>{U.current=!1,b((e=>"success"===e.terminal?{status:"success"}:"insufficient"===e.terminal?{status:"insufficient",obtained:e.insufficient?.obtained??{},required:e.insufficient?.required??{}}:na(la(e)))(e)),I(R.current?void 0:(e=>"success"===e.terminal?{kind:"elevated"}:"insufficient"===e.terminal?{kind:"insufficient",obtained:e.insufficient?.obtained??{},required:e.insufficient?.required??{}}:{kind:"failed",error:la(e)})(e)),O()},[O]);(0,l.useEffect)(()=>{if(!s)return void A(!1);const e=x.upgrade.enable({prompt:H,backend:t,interceptFetch:a,requireChallengeChannel:r,shouldIntercept:void 0===o?void 0:e=>!1!==Y.current?.(e),replay:"function"==typeof D.current?B:D.current,onCancel:c,onUpgradeDiagnostic:void 0===d?void 0:e=>V.current?.(e),factors:z.current,maxAttempts:h,relyingPartyId:m,onFlightSettled:q});return A(!0),()=>{G({type:"cancel"}),e(),A(!1)}},[x,s,Array.isArray(t)?t.join("\0"):t,a,r,void 0===o,void 0===d,da(i),B,c,ca(u),h,m,H,q,G]),de!==x&&ue(x),(0,l.useEffect)(()=>ue(x),[x]),(0,l.useEffect)(()=>{const e={onAuthChange:()=>{U.current=!1,G({type:"cancel"}),O(),I(void 0),b({status:"idle"})}},s=[n.PassflowEvent.SignIn,n.PassflowEvent.SignOut];return x.subscribe(e,s),()=>x.unsubscribe(e,s)},[x,G,O]);const Z=(0,l.useCallback)(e=>{j(e),F.current?.onFactorSelected(e),T.current=!0},[]),J=(0,l.useCallback)(e=>{const s=F.current;if(null===s||void 0===P.current)return;const t=k??s.factors[0]?.type;void 0!==t&&(T.current||(s.onFactorSelected(t),T.current=!0),M(!0),b({status:"submitting"}),G({type:"submit",factor:t,code:e}))},[k,G]),W=(0,l.useCallback)(()=>{R.current=!0,U.current=!0,G({type:"cancel"})||I(void 0),O(),b({status:"idle"})},[G,O]),K=(0,l.useCallback)(()=>{I(void 0)},[]),Q=(0,l.useCallback)(()=>{N(e=>!e)},[]),X=(0,l.useCallback)(async e=>{const s=(e=>{if(void 0!==e)return Ft({acrValues:e.acrValues,level:(0,n.requiredAcrLevel)(e.acrValues),maxAge:e.maxAge})})(e),t=void 0===s?{kind:"imperative"}:{kind:"imperative",requested:s};try{return await x.upgrade.elevate((e=>({acrValues:e?.acrValues,requiredLevel:(0,n.requiredAcrLevel)(e?.acrValues),maxAge:e?.maxAge,status:403,channels:[]}))(e),t),{status:"success"}}catch(a){return"cancelled"===Pt(a)?null:na((e=>e instanceof Error?e:new Error(String(e)))(a))}},[x]),$=(0,l.useMemo)(()=>({enabled:s&&L,state:C,prompt:y,selectedFactor:k,selectFactor:Z,submit:J,cancel:W,dismiss:K,elevate:X}),[s,L,C,y,k,Z,J,W,K,X]),ee=Vt({prompt:null===y?null:{challenge:y.challenge,factors:y.factors,previousError:y.previousError},outcome:_,ui:{selected:k,busy:S,showAlternatives:E},labels:f,handlers:{onSelectFactor:Z,onToggleAlternatives:Q,onSubmit:J,onCancel:W,onDismiss:K}}),se={open:null!==y||void 0!==_,title:g,state:ee};return(0,p.jsxs)($e.Provider,{value:$,children:[e,void 0===w?(0,p.jsx)(Ht,{...se}):w(se)]})};var ua=/\/auth\/(login|register|passwordless|passkey|2fa|validate|session\/exchange)\b|\/auth\/federated\/start\b/,ha=()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search);return new URLSearchParams(Array.from(e,([e,s])=>[e.toLowerCase(),s])).get("parent_challenge_id")||void 0},ma=ha(),fa=!1,ga=()=>fa,wa=e=>{(0,l.useEffect)(()=>{if(!e||"undefined"==typeof window)return;const s=e=>ua.test(e),t=s=>{if(s)try{const t=JSON.parse(s);if("parent_challenge_id"in t)return;return t.parent_challenge_id=e,JSON.stringify(t)}catch{return}},a=e=>{if(e)try{const s=JSON.parse(e);"string"==typeof s.redirect_url&&s.redirect_url&&(fa=!0,window.location.assign(s.redirect_url))}catch{}},r=(0,n.registerFetchMiddleware)(async(e,r,o)=>{let i="";"string"==typeof r?i=r:r instanceof URL?i=r.toString():r instanceof Request&&(i=r.url);const n=o?.method?.toUpperCase()??"GET";let l=o;if("POST"===n&&s(i)&&"string"==typeof o?.body){const e=t(o.body);void 0!==e&&(l={...o,body:e})}const c=await e(r,l);if(c.ok&&s(i))try{const e=await c.clone().text();a(e)}catch{}return c},{priority:n.FETCH_PRIORITY_OIDC,name:"passflow-oidc-authflow"}),o=XMLHttpRequest.prototype.open,i=XMLHttpRequest.prototype.send,l=new WeakMap;return XMLHttpRequest.prototype.open=function(e,t,...r){const i="string"==typeof t?t:t.toString();l.set(this,{method:e?.toUpperCase(),url:i,isAuth:s(i)}),this.addEventListener("load",()=>{l.get(this)?.isAuth&&this.status>=200&&this.status<300&&a("string"==typeof this.responseText?this.responseText:null)}),o.call(this,e,t,...r)},XMLHttpRequest.prototype.send=function(e){const s=l.get(this);let a=e;if(s?.isAuth&&"POST"===s.method&&"string"==typeof e){const s=t(e);void 0!==s&&(a=s)}i.call(this,a)},()=>{r(),XMLHttpRequest.prototype.open=o,XMLHttpRequest.prototype.send=i}},[e])},xa=(e,s,t,a)=>{const[r,o]=(0,l.useState)("idle"),[i,n]=(0,l.useState)(void 0),c=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(!e||c.current)return;if("undefined"!=typeof window&&"/oidc/device"===window.location.pathname)return;if(!a)return;c.current=!0;(async()=>{let r;try{const s=`${t??""}/oidc/requests/${encodeURIComponent(e)}`,a=await fetch(s);a.ok&&(r=await a.json(),n(r))}catch{}if(r?.oidc_prompt_login)o("fallback_to_login");else{if(r?.max_age&&r.max_age>0){const e=s.getParsedTokens?.(),t=e?.access_token?.payload,a=e?.id_token?.payload,i=t?.auth_time??a?.auth_time;if(i&&"number"==typeof i&&Math.floor(Date.now()/1e3)-i>r.max_age)return void o("fallback_to_login")}o("exchanging");try{let i;try{i=(await s.getTokens(!1))?.access_token}catch{}const n=t??"",l={"Content-Type":"application/json"};i&&(l.Authorization=`Bearer ${i}`),a&&(l["X-Passflow-ClientID"]=a);const c=await fetch(`${n}/auth/session/exchange`,{method:"POST",credentials:"include",headers:l,body:JSON.stringify({parent_challenge_id:e})});if(c.ok){try{if((await c.json()).redirect_url)return}catch{}return void o("fallback_to_login")}if(403===c.status)return void o("fallback_to_login");if(401===c.status||400===c.status){if(r?.oidc_prompt_none&&r.redirect_uri){const e=new URL(r.redirect_uri);return e.searchParams.set("error","login_required"),e.searchParams.set("error_description","user is not authenticated"),r.state&&e.searchParams.set("state",r.state),void window.location.assign(e.toString())}return void o("fallback_to_login")}o("fallback_to_login")}catch{o("fallback_to_login")}}})()},[e,s,t,a]),{exchangeState:r,parentMeta:i}},ya=l.default.createContext({exchangeState:"idle"}),va=({successAuthRedirect:e,signInPath:s=Xe.signin.path,twoFactorSetupPath:t=Xe.two_factor_setup?.path??"/two-factor-setup",useV2Flow:a=!1})=>{const[r,o]=(0,l.useState)("verify"),[i,n]=(0,l.useState)(!1),{navigate:c}=Cs(),d=Oe(),{errorType:u}=Fs();(0,l.useEffect)(()=>{d.isTwoFactorVerificationRequired()||(ce.canRedirect()?(ce.incrementRedirect(),c({to:s}),n(!0)):n(!1))},[d,c,s]),(0,l.useEffect)(()=>{"expired"===u?ce.canRedirect()&&(ce.incrementRedirect(),ce.setLastErrorType("expired"),setTimeout(()=>{c({to:s})},1500)):"not_enabled"===u&&ce.setLastErrorType("not_enabled")},[u,c,s]);const h=async()=>{ce.reset(),ga()||e&&(ve(e)?window.location.href=await ee(d,e):c({to:e}))};return i||!d.isTwoFactorVerificationRequired()&&ce.canRedirect()?null:a?(0,p.jsx)(aa,{onSuccess:h}):(0,p.jsx)(p.Fragment,{children:"verify"===r?(0,p.jsx)(ia,{onSuccess:h,onUseRecovery:()=>{o("recovery")},signInPath:s,twoFactorSetupPath:t}):(0,p.jsx)(ra,{onSuccess:h,onBack:()=>{o("verify")},signInPath:s})})},Ca={email_or_username:"",phone:""},ba=d.object().shape({defaultMethod:d.string().oneOf(["email_or_username","phone"]).required()}),ka=({successResetRedirect:e,signInPath:s=Xe.signin.path,forgotPasswordSuccessPath:t=Xe.forgot_password_success.path})=>{const{getValues:a,control:r,register:o,formState:{errors:i,isDirty:n,isValid:c}}=(0,x.useForm)({defaultValues:Ca}),{appSettings:d,currentStyles:u,isError:h,error:m,loginAppTheme:f}=os();if(h)throw new Error(m);const y=(0,l.useMemo)(()=>W(d?.auth_strategies),[d]),{navigate:v}=Cs(),C=we(),{get:b}=ye({default_method:""}),k={defaultMethod:b("default_method")};try{ba.validateSync(k,{abortEarly:!1})}catch(L){throw new Error("Invalid default method param")}const{defaultMethod:j}=k,{fetch:S,error:M,isError:E,isLoading:N}=xs(),_="email_or_username"===j?"Enter the email address you used when you joined and we’ll send you instructions to reset your password.":"Enter the mobile phone number you used when you joined and we’ll send you the reset link.",I="email_or_username"===j?"For security reasons, we do NOT store your password. So rest assured that we will never send your password via email.":"For security reasons, we do NOT store your password. So rest assured that we will never send your password via SMS.";return(0,p.jsxs)(ht,{title:"Forgot password?",subtitle:_,className:"passflow-forgot-password-wrapper",customCss:u?.custom_css,customLogo:u?.logo_url,removeBranding:f?.remove_passflow_logo,children:[(0,p.jsx)("span",{className:"passflow-form-subscriptions",children:I}),(0,p.jsxs)("form",{onSubmit:e=>e.preventDefault(),className:"passflow-form",children:[(0,p.jsx)("div",{className:"passflow-form-container",children:(0,p.jsxs)("div",{className:"passflow-form-field",children:["email_or_username"===j&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"identity",className:O("passflow-field-label",{"passflow-field-label--error":E}),children:K(y,"label")})}),(0,p.jsx)(x.Controller,{name:"email_or_username",control:r,rules:{required:"Email is required",pattern:{value:Ce,message:"Invalid email"}},render:({field:e})=>(0,p.jsx)(Us,{...e,...o("email_or_username"),isError:E||Object.hasOwn(i,"email_or_username"),id:"email_or_username",type:"text",name:"email_or_username"})})]}),"phone"===j&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"passflow-form-field__header",children:(0,p.jsx)("label",{htmlFor:"phone",className:O("passflow-field-label",{"passflow-field-label--error":E}),children:"Phone"})}),(0,p.jsx)(x.Controller,{name:"phone",control:r,rules:{required:"Phone is required",validate:e=>!!(0,w.phone)(e).isValid||"Invalid phone number"},render:({field:e})=>(0,p.jsx)(Rs,{...e,...o("phone"),onChange:s=>e.onChange(s),id:"phone",name:"phone",isError:E||Object.hasOwn(i,"phone"),ref:null})})]}),E&&(0,p.jsxs)("div",{className:"passflow-form-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{className:"passflow-form-error-text",children:M})]})]})}),(0,p.jsxs)("div",{className:"passflow-send-reset-wrapper",children:[(0,p.jsx)(je,{size:"big",variant:"primary",type:"button",disabled:!n||!c||N,className:"passflow-button-send-reset-password",onClick:async()=>{const s=a(),r=s.email_or_username.match(Ce),o=!r&&s.email_or_username.length>0,i=(0,w.phone)(s.phone),n=i.isValid,l={...r&&{email:s.email_or_username},...o&&{username:s.email_or_username},...n&&{phone:i.phoneNumber},redirect_url:e??d?.defaults?.redirect};if(await S(l)){const e=new URLSearchParams(C.read()),s=g.default.stringify({...Object.fromEntries(e.entries()),...l});v({to:t,search:s})}},children:"Send reset instructions"}),(0,p.jsxs)("p",{className:"passflow-remember-password",children:["Remember your password?"," ",(0,p.jsx)(zs,{to:s??Xe.signin.path,className:"passflow-link",children:"Sign In"})," "]})]})]})]})},ja=d.object().shape({identity:d.string().oneOf(["email","phone"]).required(),identityValue:d.string().required(),redirectUrl:d.string().required()}),Sa=()=>{const{currentStyles:e,loginAppTheme:s}=os(),{fetch:t}=xs(),{get:a}=ye(),r={identity:a("email")?"email":a("phone")?"phone":null,identityValue:a("email")?a("email"):a("phone")?a("phone"):null,redirectUrl:a("redirect_url")};try{ja.validateSync(r,{abortEarly:!1})}catch(o){throw console.error("[passflow] invalid password-reset confirmation link",o),new Error(b)}return(0,p.jsx)(ht,{title:`Check your ${r.identity}`,className:"passflow-forgot-password-success-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsxs)("div",{className:"passflow-forgot-password-success-container",children:[(0,p.jsxs)("p",{className:"passflow-forgot-password-success-text",children:["We sent a link to ","phone"===r.identity?"phone number":"email address"," ",(0,p.jsx)("strong",{className:"passflow-forgot-password-success-text--strong",children:r.identityValue}),". Click the link to reset your password."]}),(0,p.jsxs)(je,{size:"big",variant:"secondary",type:"button",className:"passflow-button-resend-reset-password",onClick:async()=>{const e={..."email"===r.identity?{email:r.identityValue}:void 0,..."phone"===r.identity?{phone:r.identityValue}:void 0,redirect_url:r.redirectUrl};await t(e)},children:["Resend ","email"===r.identity?"email":"SMS"]})]})})},Ma=({error:e="Something went wrong",goBackRedirectTo:s})=>{const{navigate:t}=Cs(),{currentStyles:a,loginAppTheme:r}=os();return(0,p.jsx)(ft,{chrome:{title:"",customCss:a?.custom_css,customLogo:a?.logo_url,customLogoAlt:`${r?.application_name??"Application"} logo`,removeBranding:r?.remove_passflow_logo},state:{kind:"general-error",message:e,onAction:()=>{ve(s)?window.location.href=s:t({to:s})}}})},Ea=e=>e instanceof Error?e.message:String(e),Na=["verify-challenge-otp","password/reset","two-factor-verify","two-factor-recovery"],_a=(e,s)=>t=>{const a=(0,l.useContext)(Ke),{successAuthRedirect:r}=t,{pathname:o}=window.location;return Na.some(e=>o.includes(e))?(0,p.jsx)(v.ErrorBoundary,{FallbackComponent:({error:e})=>(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:Ea(e)}),children:(0,p.jsx)(e,{...t})}):a?.state.isDiscoveringAppId?null:a?.state.appId?(0,p.jsx)(v.ErrorBoundary,{FallbackComponent:({error:e})=>(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:Ea(e)}),children:(0,p.jsx)(e,{...t})}):(0,p.jsx)(s,{goBackRedirectTo:r??"/",error:"Missing appId"})},Ia=_a(({signInPath:e=Xe.signin.path,signUpPath:s=Xe.signup.path,successAuthRedirect:t})=>{const{appSettings:a,currentStyles:r,loginAppTheme:o}=os(),{navigate:i}=Cs(),c=we(),{get:d}=ye(),u=Oe(),{fetch:h,isLoading:m,error:f,isError:g}=ys(),w=d("invite_token"),x=w?se(n.parseToken)(w):void 0,y=u.getParsedTokens(),v=Boolean(y?.access_token);if((0,l.useEffect)(()=>{x&&!v&&i({to:e,search:c.read()})},[v,x,i,c,e]),!x)throw console.error("[passflow] invitation token could not be parsed"),new Error("This invitation link is invalid or has expired.");if(!v)return null;const{inviter_name:C,tenant_name:b,redirect_url:k}=x;return(0,p.jsx)(ft,{chrome:{title:`You've been invited to join ${b}.`,subtitle:"Review the invitation before continuing.",customCss:r?.custom_css,customLogo:r?.logo_url,customLogoAlt:`${o?.application_name??"Application"} logo`,removeBranding:o?.remove_passflow_logo},state:{kind:"invitation",identity:y?.id_token?.email,inviterName:C||void 0,busy:m,error:g?f:null,testId:"invitation-join",acceptTestId:"invitation-accept",onAccept:()=>{(async()=>{if(!w)return;if(!(await h(w)))return;const e=k??t??a?.defaults?.redirect??"";ve(e)?window.location.href=await ee(u,e):i({to:e})})()},onSwitchAccount:()=>i({to:e,search:c.read()}),onCreateAccount:()=>i({to:s,search:c.read()})}})},Ma),La=d.object().shape({token:d.string().required()}),Aa=({successAuthRedirect:e,twoFactorVerifyPath:s=Xe.two_factor_verify.path,signInPath:t=Xe.signin.path})=>{const a=Oe(),{fetch:r,error:o,isError:i,isLoading:l,isPasswordSaved:c,emailCode:d}=Ns(),{navigate:u}=Cs(),{get:h}=ye(),{appSettings:m,passwordPolicy:f,currentStyles:g,isError:w,error:x,loginAppTheme:y}=os();if(w)throw new Error(x);const v={token:h("token")};try{La.validateSync(v,{abortEarly:!1})}catch{throw new Error("Invalid reset token.")}const{token:C}=v,b=C?se(n.parseToken)(C):void 0,k=Boolean(b?.registration_continuation),j=async t=>{if(re(a,u,s))return;if(ga())return;const r=t??b?.redirect_url??e??m?.defaults?.redirect??"";ve(r)?window.location.href=await ee(a,r):u({to:r})},S=()=>{d.cancel(),u({to:t})},M={title:k?"Create your password":"Reset password",subtitle:k?"Finish creating your account":"Let’s get you back in.",variant:"reset-password",customCss:g?.custom_css,customLogo:g?.logo_url,customLogoAlt:`${y?.application_name??"Application"} logo`,removeBranding:y?.remove_passflow_logo},{step:E}=d,N="code"===E.kind?{kind:"email-code",message:E.message,error:d.error,busy:d.isVerifying,secondaryAction:{label:"Back to sign in",onClick:S},onSubmit:e=>{(async e=>{const s=await d.verify(e);s&&await j(s.redirect_url)})(e)}}:"link"===E.kind?{kind:"status",tone:"info",message:E.message,primaryAction:{label:"Back to sign in",onClick:S}}:c?{kind:"status",tone:"info",message:o,primaryAction:{label:"Back to sign in",onClick:S}}:{kind:"new-password",passwordPolicy:f,hint:k?"Choose a password to finish creating your account.":"Enter your new password below.",error:i?o:null,busy:l,submitLabel:k?"Create account":"Save new password",onSubmit:e=>{(async e=>{await r(e,C??void 0)&&await j()})(e)}},_="code"===E.kind?{title:"Verify your email",subtitle:"Enter the code to finish signing in"}:"link"===E.kind?{title:"Check your email",subtitle:void 0}:c?{title:"Password saved",subtitle:void 0}:{title:M.title,subtitle:M.subtitle};return(0,p.jsx)(ft,{chrome:{...M,..._},state:N})},Pa=({successAuthRedirect:e,relyingPartyId:s=window.location.hostname,signUpPath:t=Xe.signup.path,verifyOTPPath:a=Xe.verify_otp.path,verifyMagicLinkPath:r=Xe.verify_magic_link.path,forgotPasswordPath:o=Xe.forgot_password.path,twoFactorVerifyPath:i=Xe.two_factor_verify.path})=>{const n=Oe(),{navigate:c}=Cs(),d=we(),{appSettings:u,scopes:h,createTenantForNewUser:m,passwordPolicy:f,currentStyles:x,isError:y,error:v,loginAppTheme:C}=os(),{federatedWithRedirect:b}=Ss(e,m);if(y)throw new Error(v);const k=(0,l.useMemo)(()=>W(u?.auth_strategies),[u]),j=(0,l.useMemo)(()=>(e=>{const s=[];if(e.hasSignInEmailMethods||e.hasSignInUsernameMethods){const t=K(e,"label")??"Email or username";s.push({id:"email_or_username",label:t,selectLabel:K(e,"button")??"Use email",requiredMessage:`${t} is required`,format:e.hasSignInEmailMethods&&!e.hasSignInUsernameMethods?"email":void 0,password:e.internal.email.password||e.internal.username.password,passwordlessLabel:Q(e,"email_or_username")?.label})}return e.hasSignInPhoneMethods&&s.push({id:"phone",label:"Phone number",selectLabel:"Use phone",requiredMessage:"Phone number is required",password:e.internal.phone.password,passwordlessLabel:Q(e,"phone")?.label}),{identities:s,passkey:e.passkey,providers:e.fim.providers}})(k),[k]),{error:S,message:M}=$();if(S)throw console.error("[passflow] sign-in redirect returned an error",{error:S,message:M}),new Error(_(S,M));const{get:E}=ye({invite_token:""}),N=E("invite_token"),I=ae(N,"sign-in"),{fetch:L,isError:A,error:P,reset:F,isLoading:T,emailCode:R}=_s(),U=async()=>{if(re(n,c,i??Xe.two_factor_verify.path))return;if(ga()||(ha()&&console.error("[passflow] login took the legacy token path while parent_challenge_id is present on the URL — the OIDC interceptor did not engage and the RP redirect will not happen"),0))return;const s=e??u?.defaults?.redirect??"";ve(s)?window.location.href=await ee(n,s):c({to:s})},Y=async e=>{const s=Boolean(e.emailOrUsername.match(Ce)),t="email_or_username"===e.method&&!s&&e.emailOrUsername.length>0,a=(0,w.phone)(e.phone),r={...s&&{email:e.emailOrUsername},...t&&{username:e.emailOrUsername},...a.isValid&&{phone:a.phoneNumber},scopes:h,password:e.password};await(async e=>{const s={...e,...N&&{invite_token:N}};await L(s,"password")&&await U()})(r)},V=async s=>{const t=Boolean(s.emailOrUsername.match(Ce)),o=(0,w.phone)(s.phone),i={...t&&{email:s.emailOrUsername},...o.isValid&&{phone:o.phoneNumber},scopes:h};await(async(s,t)=>{const o=Q(k,t)?.challengeType,i={...s,challenge_type:o,create_tenant:m,redirect_url:e??u?.defaults?.redirect,...N&&{invite_token:N}},n=await L(i,"passwordless");if(!n)return;const l=n,p=new URLSearchParams(d.read()),h=g.default.stringify({...Object.fromEntries(p.entries()),...i,...l,type:"passwordless",challenge_type:o,create_tenant:m});"otp"===o&&c({to:a??Xe.verify_otp.path,search:h}),"magic_link"===o&&c({to:r??Xe.verify_magic_link.path,search:h})})(i,s.method)},z=async()=>{await(async e=>{const s={...e,...N&&{invite_token:N}};await L(s,"passkey")&&await U()})({relying_party_id:s,scopes:h})},D={title:I?.title??"Sign In to your account",subtitle:I?.subtitle??"To Passflow by Madappgang",variant:"sign-in",customCss:x?.custom_css,customLogo:x?.logo_url,customLogoAlt:`${C?.application_name??"Application"} logo`,removeBranding:C?.remove_passflow_logo},{step:B}=R;if("none"!==B.kind){const e="code"===B.kind?{kind:"email-code",message:B.message,error:R.error,busy:R.isVerifying,resend:{restartKey:B.challengeId,busy:R.isResending,onResend:()=>{(async()=>{await R.resend()&&await U()})()}},secondaryAction:{label:"Use a different account",onClick:R.cancel},onSubmit:e=>{(async e=>{await R.verify(e)&&await U()})(e)}}:{kind:"status",tone:"info",message:B.message,primaryAction:{label:"Back to sign in",onClick:R.cancel}};return(0,p.jsx)(ft,{chrome:{...D,title:"code"===B.kind?"Verify your email":"Check your email",subtitle:"code"===B.kind?"Enter the code to finish signing in":"Follow the link to finish signing in"},state:e})}return(0,p.jsx)(ft,{chrome:D,state:{kind:"credentials",methods:j,passwordPolicy:f,forcePasskey:Boolean(u?.force_passwordless_login&&k.passkey),allowPasskeyToggle:!0,busy:T,primaryLabel:T?"Signing in…":"Sign In",error:A?P:null,forgotPassword:{to:o??Xe.forgot_password.path,getSearch:e=>g.default.stringify({...g.default.parse(d.read()),default_method:e})},footer:{prompt:"Don't have an account?",label:"Sign Up",to:t??Xe.signup.path,search:d.read()},onPassword:e=>{Y(e)},onPasswordless:e=>{V(e)},onPasskey:()=>{z()},onProvider:e=>b(e,N??void 0),onReset:F}})},Fa=_a(Pa,Ma),Ta=({successAuthRedirect:e,relyingPartyId:s=window.location.hostname,signInPath:t=Xe.signin.path,verifyOTPPath:a=Xe.verify_otp.path,verifyMagicLinkPath:r=Xe.verify_magic_link.path,twoFactorVerifyPath:o=Xe.two_factor_verify.path})=>{const i=Oe(),{navigate:n}=Cs(),c=we(),{appSettings:d,scopes:u,createTenantForNewUser:h,passwordPolicy:m,currentStyles:f,isError:x,error:y,loginAppTheme:v}=os(),{federatedWithRedirect:C}=Ss(e,h);if(x)throw new Error(y);const b=(0,l.useMemo)(()=>W(d?.auth_strategies),[d]),k=(0,l.useMemo)(()=>(e=>{const s=[];if(e.hasEmailMethods||e.hasUsernameMethods){const t=e.hasEmailMethods&&e.hasUsernameMethods?"Email or username":e.hasUsernameMethods?"Username":"Email";s.push({id:"email_or_username",label:t,selectLabel:e.hasUsernameMethods&&!e.hasEmailMethods?"Use username":"Use email",requiredMessage:`${t} is required`,format:e.hasEmailMethods&&!e.hasUsernameMethods?"email":void 0,password:e.internal.email.password||e.internal.username.password,passwordlessLabel:Q(e,"email_or_username")?.label})}return e.hasPhoneMethods&&s.push({id:"phone",label:"Phone number",selectLabel:"Use phone",requiredMessage:"Phone number is required",password:e.internal.phone.password,passwordlessLabel:Q(e,"phone")?.label}),{identities:s,passkey:e.passkey,providers:e.fim.providers}})(b),[b]),{error:j,message:S}=$();if(j)throw console.error("[passflow] sign-up redirect returned an error",{error:j,message:S}),new Error(_(j,S));const{get:M}=ye({invite_token:""}),E=M("invite_token"),N=ae(E,"sign-up"),{fetch:I,isError:L,error:A,reset:P,isLoading:F,emailCode:T}=Is(),R=async({oidcMayOwnRedirect:s=!1}={})=>{if(re(i,n,o??Xe.two_factor_verify.path))return;if(s&&ga())return;const t=e??d?.defaults?.redirect??"";ve(t)?window.location.href=await ee(i,t):n({to:t})},U=async e=>{const s=Boolean(e.emailOrUsername.match(Ce)),t="email_or_username"===e.method&&!s&&e.emailOrUsername.length>0,a=(0,w.phone)(e.phone),r={...s?{email:e.emailOrUsername}:{},...t?{username:e.emailOrUsername}:{},...a.isValid?{phone_number:a.phoneNumber}:{},password:e.password,scopes:u};await(async e=>{const s={user:e,create_tenant:h,...E?{invite_token:E}:{}};await I(s,"password")&&await R({oidcMayOwnRedirect:!0})})(r)},Y=async s=>{const t=Boolean(s.emailOrUsername.match(Ce)),o=(0,w.phone)(s.phone),i={...t?{email:s.emailOrUsername}:{},...o.isValid?{phone:o.phoneNumber}:{},scopes:u};await(async(s,t)=>{const o=Q(b,t)?.challengeType,i={...s,challenge_type:o,create_tenant:h,redirect_url:e??d?.defaults?.redirect,...E?{invite_token:E}:{}},l=await I(i,"passwordless");if(!l)return;const p=l,u=new URLSearchParams(c.read()),m=g.default.stringify({...Object.fromEntries(u.entries()),...i,...p,type:"passwordless",challenge_type:o,create_tenant:h});"otp"===o&&n({to:a??Xe.verify_otp.path,search:m}),"magic_link"===o&&n({to:r??Xe.verify_magic_link.path,search:m})})(i,s.method)},V={title:N?.title??"Create your account",subtitle:N?.subtitle??"For Passflow by Madappgang",variant:"sign-in",customCss:f?.custom_css,customLogo:f?.logo_url,customLogoAlt:`${v?.application_name??"Application"} logo`,removeBranding:v?.remove_passflow_logo},{step:z}=T;if("none"!==z.kind){const e="code"===z.kind?{kind:"email-code",message:z.message,error:T.error,busy:T.isVerifying,resend:{restartKey:z.challengeId,busy:T.isResending,onResend:()=>{(async()=>{await T.resend()&&await R({oidcMayOwnRedirect:!0})})()}},secondaryAction:{label:"Use a different email",onClick:T.cancel},onSubmit:e=>{(async e=>{await T.verify(e)&&await R({oidcMayOwnRedirect:!0})})(e)}}:{kind:"status",tone:"info",message:z.message,primaryAction:{label:"Back to sign up",onClick:T.cancel}};return(0,p.jsx)(ft,{chrome:{...V,title:"Check your email",subtitle:"code"===z.kind?"Enter the code to finish creating your account":"Follow the link to finish signing up"},state:e})}return(0,p.jsx)(ft,{chrome:V,state:{kind:"credentials",methods:k,passwordPolicy:m,credentialPurpose:"sign-up",forcePasskey:Boolean(d?.force_passwordless_login&&b.passkey),allowPasskeyToggle:!0,busy:F,primaryLabel:F?"Creating account…":"Sign Up",passwordlessLabelPrefix:"Sign Up with",passkeyLabel:"Sign Up with a Passkey",error:L?A:null,footer:{prompt:"Already have an account?",label:"Sign In",to:t??Xe.signin.path,search:c.read()},onPassword:e=>{U(e)},onPasswordless:e=>{Y(e)},onPasskey:()=>{(async()=>{const t={relying_party_id:s,create_tenant:h,redirect_url:e??d?.defaults?.redirect??"",...E?{invite_token:E}:{},scopes:u};await I(t,"passkey")&&await R({oidcMayOwnRedirect:!0})})()},onProvider:e=>C(e,E??void 0),onReset:P}})},Ra=_a(Ta,Ma),Ua={email:"email address",phone:"phone number"},Ya=()=>{const{currentStyles:e,loginAppTheme:s}=os(),{fetch:t}=_s(),{get:a}=ye({identity:"",identity_value:"",challenge_type:"",type:"",redirect_url:""}),r=a("email")?"email":a("phone")?"phone":void 0,o=a("email")?a("email"):a("phone")?a("phone"):void 0,i=a("challenge_type"),n=a("type"),l=a("redirect_url");return(0,p.jsx)(ht,{title:"Check your email",className:"passflow-verify-challenge-magic-link-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsxs)("div",{className:"passflow-verify-challenge-magic-link-container",children:[(0,p.jsxs)("p",{className:"passflow-verify-challenge-magic-link-text",children:["We sent a link to ",Ua[r]," ",o&&(0,p.jsx)("strong",{className:"passflow-verify-challenge-magic-link-text--strong",children:o}),". Click on the link to confirm your registration."]}),"passwordless"===n&&(0,p.jsx)(je,{size:"big",variant:"secondary",type:"button",className:"passflow-button-resend-magic-link",onClick:async()=>{const e={..."email"===r?{email:o}:void 0,..."phone"===r?{phone:o}:void 0,challenge_type:i,redirect_url:l};await t(e,n)},children:"Resend email"})]})})},Va=({totalSecond:e,onClick:s,className:t="",...a})=>{const[r,o]=(0,l.useState)(e);(0,l.useEffect)(()=>{const e=setInterval(()=>{r>0&&o(e=>e-1)},1e3);return()=>{clearInterval(e)}},[r]);return(0,p.jsxs)(je,{disabled:r>0,size:"small",variant:"clean",type:"button",className:O("passflow-button-timer",{"passflow-button-timer--active":r>0,"passflow-button-timer--inactive":0===r},t),onClick:()=>{s(),o(e)},...a,children:["Resend ",r>0?`(${r})`:""]})},za=()=>{const{currentStyles:e,loginAppTheme:s}=os();return(0,p.jsx)(ht,{iconId:"logo",className:"passflow-verify-challenge-success-wrapper",customCss:e?.custom_css,customLogo:e?.logo_url,removeBranding:s?.remove_passflow_logo,children:(0,p.jsx)("div",{className:"passflow-verify-challenge-success-wrapper",children:(0,p.jsxs)("div",{className:"passflow-verify-challenge-success-container",children:[(0,p.jsx)("p",{className:"passflow-verify-challenge-success-text",children:"Successful verification!"}),(0,p.jsx)("p",{className:"passflow-verify-challenge-success-text-secondary",children:"But there is no redirect URL for further redirect."})]})})})},Da={email:"email address",phone:"phone number"},Ba=({identity:e,identityValue:s,challengeType:t,challengeId:a,type:r,numInputs:o,shouldAutoFocus:i,successAuthRedirect:n,signUpPath:c,twoFactorVerifyPath:d=Xe.two_factor_verify.path})=>{const u=Oe(),{appSettings:h,createTenantForNewUser:m,currentStyles:f,loginAppTheme:g}=os(),{navigate:w}=Cs(),{fetch:x}=_s(),{fetch:y,isError:v,error:C}=ks(),[b,k]=(0,l.useState)(""),[j,S]=(0,l.useState)(null),[M,E]=(0,l.useState)(!1),{set:N}=ye(),_=(0,l.useId)(),I=`${_}-error`;if((0,l.useEffect)(()=>{if(b.length===o&&a){const e={challenge_id:a,challenge_type:"otp",otp:b};(async()=>{const s=await y(e);if(s){if(re(u,w,d))return;s.redirect_url?ve(s.redirect_url)?window.location.href=await ee(u,s.redirect_url):w({to:s.redirect_url}):E(!0)}})()}},[b,o,y,a,w,u,d]),j)throw new Error(j);if(M)return(0,p.jsx)(za,{});return(0,p.jsxs)(ht,{title:`Verify your ${e}`,subtitle:`We sent OTP code to your ${Da[e]}`,className:"passflow-verify-otp",customCss:f?.custom_css,customLogo:f?.logo_url,removeBranding:g?.remove_passflow_logo,children:[(0,p.jsxs)("div",{className:"passflow-verify-otp-container",children:[s&&(0,p.jsxs)(je,{size:"big",type:"button",variant:"outlined",className:"passflow-verify-otp-button",withIcon:!0,onClick:()=>w({to:c}),children:[(0,p.jsx)(Vs,{id:"email"===e?"mail":"phone",type:"general",size:"small"}),s,(0,p.jsx)(Vs,{id:"edit",type:"general",size:"small",className:"passflow-verify-otp-button-icon"})]}),(0,p.jsxs)("div",{id:"otp-wrapper",className:"passflow-verify-otp-wrapper",children:[(0,p.jsx)(De,{id:_,name:"otp",length:o,value:b,onChange:e=>k(e),state:v?"error":"default",label:"Verification code",describedBy:v?I:void 0,autoFocus:i}),v&&(0,p.jsxs)("div",{className:"passflow-verify-otp-error",children:[(0,p.jsx)(Vs,{size:"small",id:"warning",type:"general",className:"icon-warning"}),(0,p.jsx)("span",{id:I,className:"passflow-verify-otp-error-text",children:C})]})]})]}),"passwordless"===r&&(0,p.jsxs)("p",{className:"passflow-verify-otp-resend",children:["Don't receive a code?",(0,p.jsx)(Va,{totalSecond:30,onClick:()=>{(async()=>{if(r&&e&&s&&t){const a={create_tenant:m,challenge_type:t,redirect_url:n??h?.defaults?.redirect??"",..."email"===e?{email:s}:{phone:s}},o=await x(a,r);o?N({challenge_id:o.challenge_id}):S("Something went wrong. Please try again later.")}})()}})]})]})},Ga=({otp:e,challengeId:s,appId:t,twoFactorVerifyPath:a=Xe.two_factor_verify.path})=>{const r=Oe(),{navigate:o}=Cs(),[i,n]=(0,l.useState)(null),[c,d]=(0,l.useState)(!1),{fetch:u,isError:h,error:m,isLoading:f}=ks();if((0,l.useEffect)(()=>{(async()=>{if(!t||!e||!s){const a=[!t&&"app_id",!e&&"otp",!s&&"challenge_id"].filter(Boolean);return console.error("[passflow] passwordless verification redirect is missing required parameters",a),void n(b)}if(!f){const t=await u({otp:e,challenge_id:s});if(t){if(re(r,o,a))return;t.redirect_url?ve(t.redirect_url)?window.location.href=await ee(r,t.redirect_url):o({to:t.redirect_url}):d(!0)}else n(k)}})()},[]),h&&m)throw new Error(m);if(i)throw new Error(i);return c?(0,p.jsx)(za,{}):null},Oa=d.object().shape({appId:d.string().required(),challengeId:d.string().required(),otp:d.string().required()}),Ha=d.object().shape({challengeId:d.string().required(),identity:d.string().oneOf(["email","phone"]).required(),identityValue:d.string().required(),challengeType:d.string().required(),type:d.string().oneOf(["passwordless","passkey"]).optional()}),qa=({successAuthRedirect:e,numInputs:s,shouldAutoFocus:t,signUpPath:a,twoFactorVerifyPath:r=Xe.two_factor_verify.path})=>{const{get:o}=ye({otp:"",app_id:"",challenge_id:"",identity:"",identity_value:"",challenge_type:"",type:""}),i=o("type");if("passwordless"!==i&&"passkey"!==i){const e={appId:o("app_id"),challengeId:o("challenge_id"),otp:o("otp")};try{Oa.validateSync(e,{abortEarly:!1})}catch(m){throw console.error("[passflow] invalid passwordless verification redirect",m),new Error(b)}const{appId:s,otp:t,challengeId:a}=e;return(0,p.jsx)(Ga,{appId:s,challengeId:a,otp:t,twoFactorVerifyPath:r})}const n={challengeId:o("challenge_id"),identity:o("email")?"email":o("phone")?"phone":null,identityValue:o("email")?o("email"):o("phone")?o("phone"):null,challengeType:o("challenge_type"),type:o("type")};try{Ha.validateSync(n,{abortEarly:!1})}catch(m){throw console.error("[passflow] invalid passwordless verification link",m),new Error(b)}const{challengeId:l,identity:c,identityValue:d,challengeType:u,type:h}=n;if(!h)throw console.error("[passflow] passwordless verification link is missing its flow type"),new Error(b);return(0,p.jsx)(Ba,{identity:c,identityValue:d,challengeType:u,challengeId:l,type:h,numInputs:s,shouldAutoFocus:t,signUpPath:a,successAuthRedirect:e,twoFactorVerifyPath:r})},Za=["signin","signup","verify_otp","verify_magic_link","forgot_password","forgot_password_success","reset_password","invitation","two_factor_verify","two_factor_setup","two_factor_setup_magic_link"],Ja=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Wa=e=>e.split("/").map(e=>e.startsWith(":")?"([^/]+)":Ja(e)).join("/"),Ka=e=>e.split("/").filter(e=>e.startsWith(":")).map(e=>e.slice(1)),Qa=[...Za].sort((e,s)=>Xe[s].path.length-Xe[e].path.length),Xa=e=>{try{return decodeURIComponent(e)}catch{return e}},$a=e=>{const s=(e??"").replace(/^\/+|\/+$/g,"");return s?`/${s}`:""},er=e=>e.length>1?e.replace(/\/+$/,""):e,sr=(e,s,t={})=>`${s}${Xe[e].path.replace(/:(\w+)/g,(e,s)=>encodeURIComponent(t[s]??""))}`,tr=e=>e&&!e.startsWith("?")?`?${e}`:e,ar=e=>{let s=null;return()=>{const t=e();return s&&s.pathname===t.pathname&&s.search===t.search||(s=t),s}},rr=e=>s=>{for(const t of e)window.addEventListener(t,s);return()=>{for(const t of e)window.removeEventListener(t,s)}},or=()=>window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state})),ir=()=>{const e=window.location.hash.replace(/^#/,"")||"/",s=e.indexOf("?"),t=s>=0?e.slice(0,s):e;return{pathname:t.startsWith("/")?t:`/${t}`,search:s>=0?e.slice(s):""}},nr=e=>"hash"===e?{read:ar(ir),subscribe:rr(["popstate","hashchange"]),navigate:({pathname:e,search:s},{replace:t})=>{const a=`${window.location.pathname}${window.location.search}#${e}${tr(s)}`;t?window.history.replaceState(window.history.state,"",a):window.history.pushState(window.history.state,"",a),or()}}:"memory"===e?((e={pathname:"/",search:""})=>{const s=[e],t=new Set;return{read:()=>s[s.length-1],subscribe:e=>(t.add(e),()=>t.delete(e)),navigate:({pathname:e,search:a},{replace:r})=>{const o={pathname:e,search:tr(a)};r?s[s.length-1]=o:s.push(o);for(const s of t)s()}}})():{read:ar(()=>({pathname:window.location.pathname,search:window.location.search})),subscribe:rr(["popstate"]),navigate:({pathname:e,search:s},{replace:t})=>{const a=`${e}${tr(s)}`;t?window.history.replaceState(window.history.state,"",a):window.history.pushState(window.history.state,"",a),or()}},lr=({successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:t,pathPrefix:a,location:r,navigate:o})=>{const[i]=(0,l.useState)(()=>(e=>{const s=er(e);for(const t of Qa){const e=new RegExp(`^(.*?)${Wa(Xe[t].path)}$`).exec(s);if(e)return $a(e[1])}return $a(s)})(r.pathname)),n=void 0===a?i:$a(a),c=(0,l.useMemo)(()=>Object.fromEntries(Za.map(e=>[e,sr(e,n)])),[n]),d=(0,l.useRef)(o);d.current=o;const{setNavigate:u}=(0,l.useContext)(Je);(0,l.useEffect)(()=>{u(({to:e,search:s="",replace:t=!1})=>{const a=e.indexOf("?"),r=a>=0?e.slice(0,a):e,o=s||(a>=0?e.slice(a):"");d.current({pathname:r,search:tr(o)},{replace:t})})},[u]);const{setTwoFactorVerifyPath:h}=Cs();(0,l.useEffect)(()=>(h?.(c.two_factor_verify),()=>h?.(null)),[h,c.two_factor_verify]);const m=((e,s)=>{const t=er(e);for(const a of Qa){const e=Xe[a].path,r=new RegExp(`^${Ja(s)}${Wa(e)}$`).exec(t);if(r){const s=Ka(e);return{screen:a,params:Object.fromEntries(s.map((e,s)=>[e,Xa(r[s+1]??"")]))}}}return null})(r.pathname,n),f=!m&&((e,s)=>""===s||e===s||e.startsWith(`${s}/`))(r.pathname,n);(0,l.useEffect)(()=>{f&&d.current({pathname:c.signin,search:r.search},{replace:!0})},[f,c.signin,r.search]);const g=(0,l.useRef)(r.pathname);g.current=r.pathname;const w=(0,l.useMemo)(()=>({read:()=>r.search,write:(e,{replace:s})=>queueMicrotask(()=>d.current({pathname:g.current,search:e},{replace:s}))}),[r.search]);return m?(0,p.jsx)(ge.Provider,{value:w,children:(0,p.jsx)(cr,{match:m,paths:c,successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:t})}):null},cr=({match:e,paths:s,successAuthRedirect:t,federatedDisplayMode:a,relyingPartyId:r})=>{switch(e.screen){case"signin":return(0,p.jsx)(Fa,{successAuthRedirect:t,relyingPartyId:r,federatedDisplayMode:a,signUpPath:s.signup,forgotPasswordPath:s.forgot_password,verifyMagicLinkPath:s.verify_magic_link,verifyOTPPath:s.verify_otp,twoFactorVerifyPath:s.two_factor_verify});case"signup":return(0,p.jsx)(Ra,{successAuthRedirect:t,relyingPartyId:r,federatedDisplayMode:a,signInPath:s.signin,verifyMagicLinkPath:s.verify_magic_link,verifyOTPPath:s.verify_otp,twoFactorVerifyPath:s.two_factor_verify});case"verify_otp":return(0,p.jsx)(qa,{successAuthRedirect:t,numInputs:6,shouldAutoFocus:!0,signUpPath:s.signup,twoFactorVerifyPath:s.two_factor_verify});case"verify_magic_link":return(0,p.jsx)(Ya,{});case"forgot_password":return(0,p.jsx)(ka,{successResetRedirect:t,signInPath:s.signin,forgotPasswordSuccessPath:s.forgot_password_success});case"forgot_password_success":return(0,p.jsx)(Sa,{});case"reset_password":return(0,p.jsx)(Aa,{successAuthRedirect:t,twoFactorVerifyPath:s.two_factor_verify,signInPath:s.signin});case"invitation":return(0,p.jsx)(Ia,{successAuthRedirect:t,signInPath:s.signin,signUpPath:s.signup});case"two_factor_verify":return(0,p.jsx)(va,{successAuthRedirect:t,signInPath:s.signin,twoFactorSetupPath:s.two_factor_setup});case"two_factor_setup":return(0,p.jsx)(Wt,{successAuthRedirect:t,twoFactorVerifyPath:s.two_factor_verify,signInPath:s.signin});case"two_factor_setup_magic_link":return(0,p.jsx)(Qt,{token:e.params.token??"",signInPath:s.signin})}},dr=_a(({successAuthRedirect:e,federatedDisplayMode:s="redirect",error:t,relyingPartyId:a=window.location.hostname,pathPrefix:r,routerType:o="browser",location:i,navigate:n})=>{const{error:c,message:d}=$(e),{location:u,navigate:h}=((e,s,t)=>{const a=(0,l.useMemo)(()=>nr(e),[e]),r=(0,l.useSyncExternalStore)(a.subscribe,a.read);return s&&t?{location:{pathname:s.pathname,search:tr(s.search??"")},navigate:t}:{location:r,navigate:a.navigate}})(o,i,n);if(c)throw console.error("[passflow] authentication redirect returned an error",{error:c,message:d}),new Error(_(c,d));if(t)throw new Error(t);return(0,p.jsx)(lr,{successAuthRedirect:e,federatedDisplayMode:s,relyingPartyId:a,pathPrefix:r,location:u,navigate:h})},Ma);exports.Button=je,exports.ConsentFlow=()=>{const e=(e=>{if("loading"===e.status)return null;if("invalid"===e.status)return{chrome:{title:e.error?.message??"Consent request unavailable"},state:{kind:"general-error",message:e.error?.message,detail:e.error?.description,actionLabel:"Back to login",testId:"consent-invalid",onAction:()=>{window.location.href="/web"}}};if("redirecting"===e.status)return{chrome:{title:"Taking you back",subtitle:`Returning you to ${e.info?.app_name||"the application"}.`},state:{kind:"status",tone:"success",message:"Decision recorded",detail:"You can close this page if it does not continue on its own.",testId:"consent-redirecting"}};const s=e.info;if(!s)return null;const t=s.app_name||s.client_id,a="working"===e.status;return{chrome:{title:`Allow ${t} to access your account?`,subtitle:"Choose what this application may use, then allow or deny.",customLogo:s.app_logo_url||void 0,customLogoAlt:`${t} logo`},state:{kind:"consent",appName:t,scopes:s.requested_scopes.map(s=>{const t=e.scopeMetadata(s);return{scope:s,label:t.label||s,description:t.description||void 0,granted:e.grantedScopes.includes(s)}}),busy:a,error:e.error?.message,allowLabel:"Allow",denyLabel:"Deny",busyLabel:"Submitting…",testId:"consent-screen",allowTestId:"consent-allow",denyTestId:"consent-deny",appNameTestId:"consent-app-name",onToggleScope:e.toggleScope,onAllow:()=>{e.allow()},onDeny:()=>{e.deny()}}}})(ls());return e?(0,p.jsx)(ft,{...e}):null},exports.ContinuingStatus=Se,exports.CountryFlag=Ne,exports.DEFAULT_FACTOR_LABELS=St,exports.DeviceVerifyFlow=()=>{const e=gs(),s=(0,l.useRef)(null),{confirmWithPasskey:t}=e,a=e.info?.csrf_token??null,r="passkey"===e.info?.mode&&"ready"===e.status&&!e.error;(0,l.useEffect)(()=>{r&&a&&s.current!==a&&(s.current=a,t())},[a,t,r]);const o=Zt(e);return o?(0,p.jsx)(ft,{...o}):null},exports.Dialog=_e,exports.DialogClose=Ae,exports.DialogContent=Fe,exports.DialogDescription=Ye,exports.DialogFooter=Re,exports.DialogHeader=Te,exports.DialogOverlay=Pe,exports.DialogPortal=Le,exports.DialogTitle=Ue,exports.DialogTrigger=Ie,exports.FieldOtp=De,exports.FieldPassword=Ge,exports.FieldPhone=Rs,exports.FieldText=Us,exports.ForgotPassword=ka,exports.ForgotPasswordSuccess=Sa,exports.INERT_UPGRADE_CONTEXT=ss,exports.Icon=Vs,exports.InvitationJoin=Ia,exports.Link=zs,exports.LoginAlert=Ds,exports.LoginScreen=ft,exports.PassflowFlow=dr,exports.PassflowProvider=({children:e,navigate:s,router:t="default",backend:a,upgrade:r,twoFactorVerifyPath:o,...i})=>{const c=!i.appId,[d,u]=(0,l.useReducer)(Qe,{...We,...i,isDiscoveringAppId:c}),[h,m]=(0,l.useState)(()=>s||Ze),[f]=(0,l.useState)(oe),g=(0,l.useMemo)(()=>new n.Passflow(d),[d]);!function(e){const s=(0,l.useRef)(null);(0,l.useEffect)(()=>{const t=s.current;return t&&(t.instance===e&&clearTimeout(t.timer),s.current=null),()=>{const t=setTimeout(()=>e.dispose(),0);s.current={instance:e,timer:t}}},[e])}(g);const w=(0,l.useMemo)(()=>ha()??ma,[]);wa(w);const{exchangeState:x,parentMeta:y}=xa(w,g,i.url,d.appId),v=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(c&&!v.current&&d.isDiscoveringAppId){v.current=!0;(async()=>{const e=["/settings"];i.url&&e.push(`${i.url}/settings`);for(const t of e)try{const e=await fetch(t);if(e.ok){const s=await e.json(),t=s.login_app?.app_id||s.appId;if(t)return g.setAppId(t),void u({type:"SET_PASSFLOW_STATE",payload:{...d,appId:t,scopes:s.login_app?.scopes||s.scopes||d.scopes,createTenantForNewUser:s.login_app?.create_tenant_for_new_user??s.createTenantForNewUser??d.createTenantForNewUser,isDiscoveringAppId:!1}})}}catch(s){}console.warn("Failed to discover appId from /settings"),u({type:"SET_PASSFLOW_STATE",payload:{...d,isDiscoveringAppId:!1}})})()}},[c,d.isDiscoveringAppId,i.url,g,d]);const C=(0,l.useMemo)(()=>({state:d,dispatch:u,passflow:g}),[d,g]),b=(0,l.useCallback)(e=>{m(()=>e||Ze)},[]),[k,j]=(0,l.useState)(null),S=k??o??Xe.two_factor_verify.path;((e,s,t,a)=>{const[r,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(s.isAuthenticated()||(s.isTwoFactorVerificationRequired()||s.handleTokensRedirect(),s.isTwoFactorVerificationRequired()&&o(!0)))},[]),(0,l.useEffect)(()=>{r&&(o(!1),t({to:a,replace:!0}))},[r,t,a])})(f,g,h,S);const M=(0,l.useMemo)(()=>({navigate:h,setNavigate:b,router:t,twoFactorVerifyPath:S,setTwoFactorVerifyPath:j}),[h,b,t,S]),E=(0,l.useMemo)(()=>({parentChallengeId:w,parentMeta:y,exchangeState:x}),[w,y,x]),N=!1!==r&&(void 0!==r||void 0!==a),_=(0,l.useMemo)(()=>"object"==typeof r&&null!==r?r:{},[r]);return(0,p.jsx)(Ke.Provider,{value:C,children:(0,p.jsx)(Je.Provider,{value:M,children:(0,p.jsx)(ya.Provider,{value:E,children:(0,p.jsx)(qe,{children:(0,p.jsx)(pa,{..._,enabled:N,backend:a,children:"exchanging"===x?(0,p.jsx)(Se,{appName:y?.app_name}):e})})})})})},exports.Popover=gt,exports.PopoverAnchor=xt,exports.PopoverContent=yt,exports.PopoverTrigger=wt,exports.ProvidersBox=Ws,exports.ResetPassword=Aa,exports.SignIn=Fa,exports.SignInForm=Pa,exports.SignUp=Ra,exports.SignUpForm=Ta,exports.Spinner=vt,exports.Switch=Zs,exports.TwoFactorChallenge=aa,exports.TwoFactorRecoveryForm=ra,exports.TwoFactorSetupForm=Jt,exports.TwoFactorSetupMagicLinkFlow=Qt,exports.TwoFactorVerifyForm=ia,exports.UPGRADE_FACTOR_CODE_CONTRACTS=Et,exports.UpgradeChallengeView=jt,exports.UpgradeContext=$e,exports.UpgradeDialog=Ht,exports.UpgradeFactorList=Ct,exports.UpgradeProvider=pa,exports.UpgradeStatus=Gt,exports.VerifyChallengeMagicLink=Ya,exports.VerifyChallengeOTP=qa,exports.attachAuth=e=>me("attachAuth").attachAuth(e),exports.describeAssuranceBar=Tt,exports.dialogOutcomeFromError=Pt,exports.readAssuranceBar=Ft,exports.toDialogFactors=Nt,exports.toDialogState=Vt,exports.upgradeDialogDismissHandler=zt,exports.useAppSettings=os,exports.useAuth=()=>{const e=(0,l.useContext)(He);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},exports.useAuthCloudRedirect=e=>{const s=Oe();return()=>s.authRedirect({url:e})},exports.useConsent=ls,exports.useDeviceVerify=gs,exports.useEmailCodeStep=ws,exports.useForgotPassword=xs,exports.useJoinInvite=ys,exports.useLogout=()=>{const e=Oe(),[s,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1);return{fetch:(0,l.useCallback)(async()=>{try{return i(!0),await e.logOut(),i(!1),!0}catch(s){return r(!0),t(s.message),!1}},[e]),isLoading:o,isError:a,error:s}},exports.useNavigation=Cs,exports.useOutsideClick=bs,exports.usePassflow=Oe,exports.usePasswordlessComplete=ks,exports.useProvider=Ss,exports.useRefreshStatus=function(){const e=Oe(),[s,t]=(0,l.useState)(Ms);return(0,l.useEffect)(()=>{const s={onAuthChange:(e,s)=>{if(e===n.PassflowEvent.RefreshFailing){const e=s;t({isFailing:!0,since:e?.since??null,nextRetryAt:e?.nextRetryAt??null})}else t(Ms)}};return e.subscribe(s,Es),()=>{e.unsubscribe(s)}},[e]),s},exports.useResetPassword=Ns,exports.useSessionExpired=function(e){const s=Oe(),[t,a]=(0,l.useState)(!1),[r,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{const t={onAuthChange:(s,t)=>{if(s===n.PassflowEvent.SessionExpired){const s=t?.reason??"refresh_failed";a(!0),o(s),e?.onSessionExpired?.(s)}else s!==n.PassflowEvent.SignIn&&s!==n.PassflowEvent.Register||(a(!1),o(null))}};return s.subscribe(t,[n.PassflowEvent.SessionExpired,n.PassflowEvent.SignIn,n.PassflowEvent.Register]),()=>{s.unsubscribe(t)}},[s,e?.onSessionExpired]),{isSessionExpired:t,expiredReason:r,resetSessionExpired:()=>{a(!1),o(null)}}},exports.useSignIn=_s,exports.useSignUp=Is,exports.useTrustedDevices=()=>{const e=Oe(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(""),d=(0,l.useCallback)(e=>{i(!0),c(e.message)},[]),p=(0,l.useCallback)(async()=>{r(!0),i(!1),c("");try{const s=await e.getTrustedDevices();return t(s),s}catch(s){return d(s),null}finally{r(!1)}},[e,d]),u=(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{return await e.revokeTrustedDevice(s),t(e=>e.filter(e=>e.id!==s)),!0}catch(a){return d(a),!1}finally{r(!1)}},[e,d]);return(0,l.useLayoutEffect)(()=>{p()},[p]),{data:s,refetch:p,revoke:u,isLoading:a,isError:o,errorMessage:n}},exports.useTwoFactorChallenge=Ls,exports.useTwoFactorManage=()=>{const e=Oe(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)("");return{recoveryCodes:s,disable:(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{return await e.disableTwoFactor(s),!0}catch(t){return i(!0),c(t.message),!1}finally{r(!1)}},[e]),regenerateCodes:(0,l.useCallback)(async s=>{r(!0),i(!1),c("");try{const a=await e.regenerateTwoFactorRecoveryCodes(s);return t(a.recovery_codes),a}catch(a){return i(!0),c(a.message),null}finally{r(!1)}},[e]),reset:(0,l.useCallback)(()=>{t([]),i(!1),c("")},[]),isLoading:a,isError:o,error:n}},exports.useTwoFactorMethods=()=>{const e=Oe(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)([]),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(null),d=(0,l.useCallback)(async()=>{i(!0),c(null);try{const s=await e.twoFactor.getRegisteredMethods();r(s);const a=s.map(e=>e.method);t(a)}catch(s){c(s),r([]),t([])}finally{i(!1)}},[e]);return{availableMethods:s,registeredMethods:a,isLoading:o,error:n,refresh:d,removeMethod:(0,l.useCallback)(async s=>{i(!0),c(null);try{await(e.twoFactor.removeMethod?.(s)),await d()}catch(t){c(t)}finally{i(!1)}},[e,d])}},exports.useTwoFactorSetup=As,exports.useTwoFactorSetupMagicLink=Ps,exports.useTwoFactorStatus=()=>{const e=Oe(),[s,t]=(0,l.useState)(null),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(""),d=(0,l.useCallback)(async()=>{r(!0),i(!1),c("");try{const s=await e.getTwoFactorStatus();return t(s),s}catch(s){return i(!0),c(s.message),null}finally{r(!1)}},[e]);return(0,l.useLayoutEffect)(()=>{d()},[d]),{data:s,refetch:d,isLoading:a,isError:o,errorMessage:n}},exports.useTwoFactorVerify=Fs,exports.useUpgrade=()=>{const{enabled:e,state:s,prompt:t,selectedFactor:a,selectFactor:r,submit:o,cancel:i,dismiss:n,elevate:c}=(0,l.useContext)($e)??ss;return(0,l.useMemo)(()=>{const l=(e=>null===e?Ts:e.factors)(t);return{enabled:e,state:s,status:s.status,challenge:"challenged"===s.status?s.challenge:t?.challenge??null,factors:l,factorTypes:"challenged"===s.status?s.factors:l.map(e=>e.type),selectedFactor:a,insufficient:"insufficient"===s.status?{obtained:s.obtained,required:s.required}:null,error:"error"===s.status?s.error:null,errorKind:"error"===s.status?s.kind:null,previousError:t?.previousError??null,busy:"submitting"===s.status,selectFactor:r,submit:o,cancel:i,dismiss:n,elevate:c}},[e,s,t,a,r,o,i,n,c])},exports.useUserPasskeys=()=>{const e=Oe(),[s,t]=(0,l.useState)([]),[a,r]=(0,l.useState)(!1),[o,i]=(0,l.useState)(""),[n,c]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{(async()=>{c(!0);try{const s=await e.getUserPasskeys();t(s)}catch(s){r(!0),i(s.message)}finally{c(!1)}})()},[e]);return{data:s,createUserPasskey:async(s,t,a)=>{c(!0);try{await e.addUserPasskey({relyingPartyId:s,passkeyUsername:t,passkeyDisplayName:a})}catch(o){r(!0),i(o.message)}finally{c(!1)}},editUserPasskey:async(s,a)=>{c(!0);try{if(await e.renameUserPasskey(s,a)){const s=await e.getUserPasskeys();t(s)}}catch(o){r(!0),i(o.message)}finally{c(!1)}},deleteUserPasskey:async s=>{c(!0);try{if(await e.deleteUserPasskey(s)){const s=await e.getUserPasskeys();t(s)}}catch(a){r(!0),i(a.message)}finally{c(!1)}},isLoading:n,isError:a,errorMessage:o}},exports.withAuth=e=>me("withAuth").withAuth(e),Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|