(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},81200,e=>{"use strict";e.i(47167);var t=e.i(71645),r=e.i(7670),n=e.i(67239),o=e.i(19130),i=e.i(52761),a=e.i(42196),s=e.i(40799),l=e.i(10557),u=e.i(75149),c=e.i(35057),d=e.i(94425),p=e.i(26863),f=e.i(40672),g=e.i(19727);function m(e){return(0,g.default)("MuiLink",e)}let h=(0,f.default)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=e.i(55242),E=e.i(43476);let S={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},P=(0,s.styled)(p.default,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`underline${(0,a.default)(r.underline)}`],"button"===r.component&&t.button]}})((0,u.default)(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:t})=>"always"===e&&"inherit"!==t.color,style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter((0,c.default)()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:(0,n.alpha)(e.palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,n.alpha)(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:(0,n.alpha)(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${h.focusVisible}`]:{outline:"auto"}}}]}))),A=t.forwardRef(function(e,s){let u=(0,d.useDefaultProps)({props:e,name:"MuiLink"}),c=(0,l.useTheme)(),{className:p,color:f="primary",component:g="a",onBlur:h,onFocus:A,TypographyClasses:C,underline:w="always",variant:v="inherit",sx:b,...R}=u,[U,O]=t.useState(!1),I={...u,color:f,component:g,focusVisible:U,underline:w,variant:v},T=(e=>{let{classes:t,component:r,focusVisible:n,underline:i}=e,s={root:["root",`underline${(0,a.default)(i)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,o.default)(s,m,t)})(I);return(0,E.jsx)(P,{color:f,className:(0,r.default)(T.root,p),classes:C,component:g,onBlur:e=>{(0,i.default)(e.target)||O(!1),h&&h(e)},onFocus:e=>{(0,i.default)(e.target)&&O(!0),A&&A(e)},ref:s,ownerState:I,variant:v,...R,sx:[...void 0===S[f]?[{color:f}]:[],...Array.isArray(b)?b:[b]],style:{...R.style,..."always"===w&&"inherit"!==f&&!S[f]&&{"--Link-underlineColor":(({theme:e,ownerState:t})=>{let r=t.color,o=(0,y.getPath)(e,`palette.${r}.main`,!1)||(0,y.getPath)(e,`palette.${r}`,!1)||t.color,i=(0,y.getPath)(e,`palette.${r}.mainChannel`)||(0,y.getPath)(e,`palette.${r}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:(0,n.alpha)(o,.4)})({theme:c,ownerState:I})}}})});e.s(["Link",0,A],81200)},63745,e=>{"use strict";var t=e.i(614);e.s(["Stack",()=>t.default])},32963,e=>{"use strict";var t=e.i(67719);e.s(["Paper",()=>t.default])},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(51836)._(e.r(98183)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${o}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=i(e,n)),t&&(o.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return A},MissingStaticPage:function(){return P},NormalizeError:function(){return E},PageNotFoundError:function(){return S},SP:function(){return m},ST:function(){return h},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return C}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,h=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class E extends Error{}class S extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class P extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class A extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),o=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return S}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(51836),a=e.r(43476),s=i._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(91949),g=e.r(73668),m=e.r(9396);function h(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function y(t){var r;let n,o,i,[l,y]=(0,s.useOptimistic)(f.IDLE_LINK_STATUS),S=(0,s.useRef)(null),{href:P,as:A,children:C,prefetch:w=null,passHref:v,replace:b,shallow:R,scroll:U,onClick:O,onMouseEnter:I,onTouchStart:T,legacyBehavior:_=!1,onNavigate:x,ref:M,unstable_dynamicOnHover:k,...N}=t;n=C,_&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let D=s.default.useContext(u.AppRouterContext),L=!1!==w,j=!1!==w?null===(r=w)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:F,as:$}=s.default.useMemo(()=>{let e=h(P);return{href:e,as:A?h(A):e}},[P,A]);if(_){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=s.default.Children.only(n)}let W=_?o&&"object"==typeof o&&o.ref:M,G=s.default.useCallback(e=>(null!==D&&(S.current=(0,f.mountLinkInstance)(e,F,D,j,L,y)),()=>{S.current&&((0,f.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,f.unmountPrefetchableInstance)(e)}),[L,F,D,j,y]),V={ref:(0,c.useMergedRef)(G,W),onClick(t){_||"function"!=typeof O||O(t),_&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!D||t.defaultPrevented||function(t,r,n,o,i,a,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);s.default.startTransition(()=>{d(n||r,i?"replace":"push",a??!0,o.current)})}}(t,F,$,S,b,U,x)},onMouseEnter(e){_||"function"!=typeof I||I(e),_&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),D&&L&&(0,f.onNavigationIntent)(e.currentTarget,!0===k)},onTouchStart:function(e){_||"function"!=typeof T||T(e),_&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),D&&L&&(0,f.onNavigationIntent)(e.currentTarget,!0===k)}};return(0,d.isAbsoluteUrl)($)?V.href=$:_&&!v&&("a"!==o.type||"href"in o.props)||(V.href=(0,p.addBasePath)($)),i=_?s.default.cloneElement(o,V):(0,a.jsx)("a",{...N,...V,children:n}),(0,a.jsx)(E.Provider,{value:l,children:i})}e.r(84508);let E=(0,s.createContext)(f.IDLE_LINK_STATUS),S=()=>(0,s.useContext)(E);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},4528,e=>{"use strict";var t=e.i(83901),r=e.i(13157);let n=(e,n)=>(0,t.getAmplifyUserAgent)({category:r.Category.Auth,action:e,...n});e.s(["getAuthUserAgentValue",()=>n])},89914,79613,9488,20093,e=>{"use strict";(r=i||(i={})).EmptySignInUsername="EmptySignInUsername",r.EmptySignInPassword="EmptySignInPassword",r.CustomAuthSignInPassword="CustomAuthSignInPassword",r.EmptySignUpUsername="EmptySignUpUsername",r.EmptySignUpPassword="EmptySignUpPassword",r.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",r.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",r.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",r.EmptyChallengeResponse="EmptyChallengeResponse",r.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",r.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",r.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",r.EmptyResetPasswordUsername="EmptyResetPasswordUsername",r.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",r.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",r.IncorrectMFAMethod="IncorrectMFAMethod",r.EmptyUpdatePassword="EmptyUpdatePassword",r.InvalidPreferredChallenge="InvalidPreferredChallenge",e.s(["AuthValidationErrorCode",()=>i],79613);let t={[i.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[i.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[i.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[i.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[i.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[i.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[i.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[i.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[i.EmptySignInPassword]:{message:"password is required to signIn"},[i.EmptySignInUsername]:{message:"username is required to signIn"},[i.EmptySignUpPassword]:{message:"password is required to signUp"},[i.EmptySignUpUsername]:{message:"username is required to signUp"},[i.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[i.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[i.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[i.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[i.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[i.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};(n=a||(a={})).DEFAULT_MSG="Authentication Error",n.EMPTY_EMAIL="Email cannot be empty",n.EMPTY_PHONE="Phone number cannot be empty",n.EMPTY_USERNAME="Username cannot be empty",n.INVALID_USERNAME="The username should either be a string or one of the sign in types",n.EMPTY_PASSWORD="Password cannot be empty",n.EMPTY_CODE="Confirmation code cannot be empty",n.SIGN_UP_ERROR="Error creating account",n.NO_MFA="No valid MFA method provided",n.INVALID_MFA="Invalid MFA type",n.EMPTY_CHALLENGE="Challenge response cannot be empty",n.NO_USER_SESSION="Failed to get the session because the user is empty",n.NETWORK_ERROR="Network Error",n.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",n.AUTOSIGNIN_ERROR="Please use your credentials to sign in",n.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings",(o=s||(s={})).SignInException="SignInException",o.OAuthSignInError="OAuthSignInException",e.s(["AuthErrorCodes",()=>s,"validationErrorMap",()=>t],9488);var r,n,o,i,a,s,l=e.i(44440);function u(e,r){let{message:n,recoverySuggestion:o}=t[r];if(!e)throw new l.AuthError({name:r,message:n,recoverySuggestion:o})}function c({username:e,userPoolId:t,userPoolClientId:r}){if("u"u],89914),e.s(["getUserContextData",()=>c],20093)},63408,72371,e=>{"use strict";var t=e.i(74860),r=e.i(78475),n=e.i(12547);let o=async e=>{var t;let o=e.getConfig().Auth?.Cognito;(0,r.assertTokenProviderConfig)(o);let i=await e.Auth.getTokens({forceRefresh:!1});(0,n.assertAuthTokens)(i);let{"cognito:username":a,sub:s}=i.idToken?.payload??{},l={username:a,userId:s},u=(t=i,t?.signInDetails);return u&&(l.signInDetails=u),l},i=async()=>o(t.Amplify);e.s(["getCurrentUser",()=>i],63408);var a=e.i(32158);function s(){return t.Amplify.Auth.clearCredentials()}var l=e.i(71094),u=e.i(38216),c=e.i(13157),d=e.i(4528),p=e.i(44440),f=e.i(48953),g=e.i(83124),m=e.i(70095);e.i(62008);let h=async e=>{await e.clearOAuthData(),g.tokenOrchestrator.clearTokens(),await s(),l.Hub.dispatch("auth",{event:"signedOut"},"Auth",l.AMPLIFY_SYMBOL)},y=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))};var E=e.i(1924);let S=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),P=e=>e.includes(String(window.location.hostname)),A=e=>e.startsWith("http://"),C=e=>e.startsWith("https://"),w=async(e,t=!1,n)=>{(0,r.assertOAuthConfig)(e);let{loginWith:o,userPoolClientId:i}=e,{domain:a,redirectSignOut:s}=o.oauth,l=function(e,t){if(t){let r=e?.find(e=>e===t);if(!r)throw E.invalidPreferredRedirectUrlException;return r}{let t=e?.find(S)??e?.find(P),r=e?.find(C)??e?.find(A);if(t)return t;if(r)throw E.invalidOriginException;throw E.invalidRedirectException}}(s,n);return y(`https://${a}/logout?${Object.entries({client_id:i,logout_uri:encodeURIComponent(l)}).map(([e,t])=>`${e}=${t}`).join("&")}`)},v=async(e,t,r,n)=>{let{isOAuthSignIn:o}=await t.loadOAuthSignIn(),i=await r.getOAuthMetadata();if(await h(t),o||i?.oauthSignIn)return w(e,!1,n)};var b=e.i(7348),R=e.i(21089),U=e.i(38025),O=e.i(39615),I=e.i(75585),T=e.i(26399);let _=new a.ConsoleLogger("Auth");async function x(e){let n,o=t.Amplify.getConfig().Auth?.Cognito;(0,r.assertTokenProviderConfig)(o),e?.global?await k(o):await M(o);try{(0,r.assertOAuthConfig)(o),n=!0}catch(e){n=!1}if(n){let t=new f.DefaultOAuthStore(u.defaultStorage);t.setAuthConfig(o);let{type:r}=await v(o,t,g.tokenOrchestrator,e?.oauth?.redirectUrl)??{};if("error"===r)throw new p.AuthError({name:E.OAUTH_SIGNOUT_EXCEPTION,message:"An error occurred when attempting to log out from OAuth provider."})}else g.tokenOrchestrator.clearTokens(),await s(),l.Hub.dispatch("auth",{event:"signedOut"},"Auth",l.AMPLIFY_SYMBOL)}async function M(e){try{let{userPoolEndpoint:t,userPoolId:r,userPoolClientId:o}=e,i=await g.tokenOrchestrator.getTokenStore().loadTokens();if((0,n.assertAuthTokensWithRefreshToken)(i),N(i.accessToken)){let e,n=(e={endpointResolver:(0,T.createCognitoUserPoolEndpointResolver)({endpointOverride:t})},(0,b.composeServiceApi)(R.cognitoUserPoolTransferHandler,(0,U.createUserPoolSerializer)("RevokeToken"),(0,O.createUserPoolDeserializer)(),{...I.DEFAULT_SERVICE_CLIENT_API_CONFIG,...e}));await n({region:(0,m.getRegionFromUserPoolId)(r),userAgentValue:(0,d.getAuthUserAgentValue)(c.AuthAction.SignOut)},{ClientId:o,Token:i.refreshToken})}}catch(e){_.debug("Client signOut error caught but will proceed with token removal")}}async function k(e){try{let t,{userPoolEndpoint:r,userPoolId:o}=e,i=await g.tokenOrchestrator.getTokenStore().loadTokens();(0,n.assertAuthTokens)(i);let a=(t={endpointResolver:(0,T.createCognitoUserPoolEndpointResolver)({endpointOverride:r})},(0,b.composeServiceApi)(R.cognitoUserPoolTransferHandler,(0,U.createUserPoolSerializer)("GlobalSignOut"),(0,O.createUserPoolDeserializer)(),{...I.DEFAULT_SERVICE_CLIENT_API_CONFIG,...t}));await a({region:(0,m.getRegionFromUserPoolId)(o),userAgentValue:(0,d.getAuthUserAgentValue)(c.AuthAction.SignOut)},{AccessToken:i.accessToken.toString()})}catch(e){_.debug("Global signOut error caught but will proceed with token removal")}}let N=e=>!!e?.payload?.origin_jti;e.s(["signOut",()=>x],72371)},30605,e=>{"use strict";var t=e.i(74860),r=e.i(78475),n=e.i(13157),o=e.i(79613),i=e.i(89914),a=e.i(70095),s=e.i(4528),l=e.i(20093),u=e.i(7348),c=e.i(21089),d=e.i(38025),p=e.i(39615),f=e.i(75585),g=e.i(26399);async function m(e){let m,{username:h}=e;(0,i.assertValidationError)(!!h,o.AuthValidationErrorCode.EmptyResetPasswordUsername);let y=t.Amplify.getConfig().Auth?.Cognito;(0,r.assertTokenProviderConfig)(y);let{userPoolClientId:E,userPoolId:S,userPoolEndpoint:P}=y,A=e.options?.clientMetadata,C=(0,l.getUserContextData)({username:h,userPoolId:S,userPoolClientId:E}),w=(m={endpointResolver:(0,g.createCognitoUserPoolEndpointResolver)({endpointOverride:P})},(0,u.composeServiceApi)(c.cognitoUserPoolTransferHandler,(0,d.createUserPoolSerializer)("ForgotPassword"),(0,p.createUserPoolDeserializer)(),{...f.DEFAULT_SERVICE_CLIENT_API_CONFIG,...m})),v=(await w({region:(0,a.getRegionFromUserPoolId)(S),userAgentValue:(0,s.getAuthUserAgentValue)(n.AuthAction.ResetPassword)},{Username:h,ClientMetadata:A,ClientId:E,UserContextData:C})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:v?.DeliveryMedium,destination:v?.Destination,attributeName:v?.AttributeName}}}}e.s(["resetPassword",()=>m],30605)},11679,e=>{"use strict";var t=e.i(43476),r=e.i(63745),n=e.i(66796),o=e.i(3974),i=e.i(76552),a=e.i(34251),s=e.i(91882),l=e.i(81200),u=e.i(32963),c=e.i(69437),d=e.i(22016),p=e.i(30605),f=e.i(63007),g=e.i(72371),m=e.i(71645),h=e.i(18566),y=e.i(65052),E=e.i(72422);let S=E.config.env.supportCenterName;function P(){let[e,r]=(0,m.useState)(""),[P,A]=(0,m.useState)(""),[C,w]=(0,m.useState)(null),v=(0,h.useRouter)(),b=E.config.env.loginIdType,R=E.config.manualConfig?.url,U=async()=>{if(w(null),!e||!P)return w(y.MESSAGES.ERROR.USER_PASSWORD_MISSMATCH(b));try{await (0,g.signOut)();let t=await (0,f.signIn)({username:e,password:P});if(t.isSignedIn)return v.push("/auth/redirect");if("CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED"===t.nextStep.signInStep)sessionStorage.setItem("username",e),v.push("/pub/newPassword");else if("RESET_PASSWORD"===t.nextStep.signInStep){alert(y.MESSAGES.WARNING.RESET_PASSWORD);try{await (0,p.resetPassword)({username:e}),sessionStorage.setItem("username",e),v.push("/pub/forgotPassword/confirm")}catch{return v.push("/pub/forgotPassword")}}else throw Error(t.nextStep.signInStep)}catch(e){e instanceof Error&&("NotAuthorizedException"===e.name||"UserNotFoundException"===e.name?w(y.MESSAGES.ERROR.USER_PASSWORD_MISSMATCH(b)):w(y.MESSAGES.ERROR.FAILED_LOGIN(S)+e.message))}},O=async e=>{"Enter"===e.key&&(e.preventDefault(),await U())};return(0,t.jsx)(s.Container,{maxWidth:"sm",children:(0,t.jsxs)(u.Paper,{sx:{padding:4},children:[(0,t.jsx)(n.Typography,{variant:"h5",gutterBottom:!0,children:y.MESSAGES.SIGNIN}),(0,t.jsx)(c.TextField,{label:y.MESSAGES.USERNAME(b),variant:"outlined",fullWidth:!0,margin:"normal",value:e,onChange:e=>r(e.target.value),slotProps:{inputLabel:{shrink:!0}}}),(0,t.jsx)(c.TextField,{label:y.MESSAGES.PASSWORD,type:"password",variant:"outlined",autoComplete:"current-password",fullWidth:!0,margin:"normal",value:P,onChange:e=>A(e.target.value),slotProps:{inputLabel:{shrink:!0}},onKeyDown:O}),(0,t.jsx)(i.Box,{textAlign:"right",children:(0,t.jsx)(l.Link,{component:d.default,href:{pathname:"/pub/forgotPassword"},variant:"body2",children:y.MESSAGES.RESET_PASSWORD_TITLE})}),C&&(0,t.jsx)(o.Alert,{severity:"error",sx:{mt:2},children:C}),(0,t.jsx)(i.Box,{sx:{mt:3,position:"relative"},children:(0,t.jsx)(a.Button,{variant:"contained",color:"primary",fullWidth:!0,onClick:()=>U(),children:y.MESSAGES.SIGNIN})}),R&&(0,t.jsx)(i.Box,{sx:{mt:2,textAlign:"center"},children:(0,t.jsx)(l.Link,{href:R,target:"_blank",variant:"body2",children:y.MESSAGES.MANUAL_LINK})})]})})}function A(e){return(0,t.jsxs)(r.Stack,{alignItems:"center",spacing:4,flex:1,justifyContent:"center",children:[(0,t.jsx)(n.Typography,{variant:"h4",children:e.title}),(0,t.jsx)(P,{})]})}e.s(["default",()=>A],11679)}]);