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AkB5R,EAAAA,EAAAA,IAAO,MAAO,CACpCG,QAAS,OACTE,eAAgB,SAChB2R,GAAI,IAGAN,GAAqB1R,EAAAA,EAAAA,IAAO2D,EAAAA,EAAS,CACzC1B,SAAU,OACVpB,WAAY,SACZ+C,GAAI,OACJR,UAAW,OACXkB,GAAI,MACJ,UAAW,CACTpE,OAAQ,aAIN2R,GAAe7R,EAAAA,EAAAA,IAAOiT,EAAAA,EAAW,CAAC,E","sources":["Atoms/Buttons/BaseButtonStyle.ts","Atoms/Buttons/CtaButton.tsx","Atoms/Label/Label.tsx","Atoms/Input/Input.tsx","Atoms/Input/InputValidation.tsx","Pages/LoginPage/Account.ts","Pages/LoginPage/LoginPage.tsx"],"sourcesContent":["import { styled } from '../../stitches.config';\r\n\r\nexport const ButtonVariants = {\r\n variants: {\r\n color: {\r\n primary: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n secondary: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n fontWeight: '$fw600',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$white',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n transparent: {\r\n backgroundColor: 'transparent',\r\n color: '$buttonPrimary',\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n border: '1px solid $buttonPrimary',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n accent: {\r\n backgroundColor: '$accent',\r\n color: '$textPrimary',\r\n borderColor: '$borderPrimary',\r\n },\r\n cancel: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n border: '1px solid $black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n clearCart: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n fontWeight: '$fw600',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$white',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n },\r\n border: {\r\n true: {\r\n border: '1px solid $buttonPrimary',\r\n },\r\n },\r\n size: {\r\n s: {\r\n px: 4,\r\n py: 2,\r\n fs: 7,\r\n lineHeight: '20px',\r\n },\r\n m: {\r\n px: '40px',\r\n py: '16px',\r\n },\r\n l: {\r\n py: 6,\r\n px: 10,\r\n },\r\n input: {\r\n h: 11,\r\n },\r\n },\r\n loading: {\r\n true: {\r\n opacity: 0.7,\r\n fs: 7,\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const ButtonBase = {\r\n cursor: 'pointer',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n br: '40px',\r\n '&:active': {\r\n outlineWidth: 0,\r\n },\r\n '&:focus': {\r\n outlineWidth: 0,\r\n },\r\n};\r\n\r\nconst BaseButtonStyled = styled('button', {\r\n ...ButtonBase,\r\n ...ButtonVariants,\r\n fontWeight: '$fw500',\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n '@mediaMinLarge': {\r\n fontSize: '12px',\r\n lineHeight: '24px',\r\n },\r\n});\r\n\r\nexport default BaseButtonStyled;\r\n","import KexLink from '../../Kex/KexLink';\r\nimport { styled } from '../../stitches.config';\r\nimport { LoadingCircle } from '../Icons';\r\nimport BaseButtonStyled from './BaseButtonStyle';\r\nimport BaseButtonType from './BaseButtonType';\r\n\r\ntype CtaButtonButtonBaseType = BaseButtonType & {\r\n onClick?: () => void;\r\n href?: string;\r\n css?: any;\r\n isLoading?: boolean;\r\n children?: any;\r\n uppercase?: boolean;\r\n};\r\n\r\nfunction CtaButton({\r\n onClick,\r\n css,\r\n isLoading,\r\n children,\r\n type,\r\n href,\r\n size,\r\n uppercase,\r\n ...rest\r\n}: CtaButtonButtonBaseType) {\r\n return !href ? (\r\n onClick && onClick()}\r\n {...rest}\r\n uppercase={uppercase}\r\n >\r\n {isLoading ? (\r\n \r\n \r\n \r\n ) : (\r\n children\r\n )}\r\n \r\n ) : (\r\n onClick && onClick()}\r\n noUnderline\r\n uppercase={uppercase}\r\n {...rest}\r\n >\r\n {isLoading ? (\r\n \r\n \r\n \r\n ) : (\r\n children\r\n )}\r\n \r\n );\r\n}\r\nexport default CtaButton;\r\n\r\nconst StyledButton = styled(BaseButtonStyled, {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n py: 5.5,\r\n px: 6,\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n fontWeight: '$fw400',\r\n textAlign: 'center',\r\n w: '100%',\r\n h: '40px',\r\n '@mediaMinSmall': {\r\n px: 10,\r\n },\r\n '@mediaMinLarge': {\r\n h: '56px',\r\n fontSize: '12px',\r\n lineHeight: '24px',\r\n },\r\n variants: {\r\n isLoading: {\r\n true: {\r\n backgroundColor: '$grey400',\r\n },\r\n false: {\r\n backgroundColor: '$buttonPrimary',\r\n },\r\n },\r\n uppercase: {\r\n true: {\r\n textTransform: 'uppercase',\r\n },\r\n },\r\n size: {\r\n s: {\r\n py: 2,\r\n fs: 7,\r\n lineHeight: '20px',\r\n },\r\n clearCart: {\r\n padding: '14px 23px 14px 23px',\r\n borderRadius: '40px',\r\n fontSize: '10px',\r\n fontWeight: '500',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n height: '44px',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst StyledLink = styled(KexLink, {\r\n backgroundColor: '$buttonPrimary',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n fontWeight: '$fw400',\r\n fs: 5,\r\n py: 3.5,\r\n px: 6,\r\n br: 10,\r\n '@mediaMaxSmall': {\r\n lineHeight: '16px',\r\n },\r\n '@mediaMinSmall': {\r\n py: 4,\r\n px: 10,\r\n fs: 6,\r\n lineHeight: '24px',\r\n },\r\n variants: {\r\n type: {\r\n primary: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n secondary: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$grey700',\r\n },\r\n },\r\n },\r\n uppercase: {\r\n true: {\r\n textTransform: 'uppercase',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst StyledLoadingCircle = styled('div', {\r\n w: 9,\r\n my: -2,\r\n stroke: '$white',\r\n});\r\n","import React from 'react';\r\nimport { styled } from '../../stitches.config';\r\n\r\ntype LabelType = {\r\n hasError: boolean;\r\n children: React.ReactNode;\r\n css?: any;\r\n htmlFor?: string;\r\n};\r\n\r\nconst Label = ({ hasError, children, css, htmlFor }: LabelType) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\nconst FormLabel = styled('label', {\r\n fontSize: '14px',\r\n fontWeight: '$fw700',\r\n backgroundColor: 'inherit',\r\n variants: {\r\n color: {\r\n default: {\r\n color: 'inherit',\r\n },\r\n error: {\r\n color: '$errorText',\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport default Label;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { styled } from '../../stitches.config';\r\nimport Label from '../Label/Label';\r\nimport { useInputValidation, ValidationParams } from './InputValidation';\r\n\r\ntype InputValidationType = {\r\n validation?: ValidationParams;\r\n};\r\n\r\ntype InputType = InputValidationType & {\r\n onChange?: (value: string) => void;\r\n onBlur?: (value: string) => void;\r\n onKeyDown?: (event: React.KeyboardEvent) => void;\r\n title: string;\r\n type?: string;\r\n name?: string;\r\n placeholder?: string;\r\n round?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nconst Input = ({\r\n title,\r\n type = 'Text',\r\n onChange,\r\n onBlur,\r\n onKeyDown,\r\n name,\r\n validation,\r\n placeholder,\r\n round,\r\n disabled = false,\r\n}: InputType) => {\r\n const validationDispatch = useInputValidation();\r\n\r\n const [hasError, setHasError] = useState(false);\r\n const [errorMessage, setErrorMessage] = useState('');\r\n const [hasTouched, setHasTouched] = useState(false);\r\n const [hasValue, setHasValue] = useState(false);\r\n\r\n const onInputChange = (val: string) => {\r\n doValidation(val);\r\n onChange && onChange(val);\r\n };\r\n\r\n const doValidation = (currentValue: string) => {\r\n if (!!validation) {\r\n const errorMessage = validation.errorMessage || '';\r\n let validationError = false;\r\n if (validation.active !== undefined && !validation.active) {\r\n return;\r\n }\r\n\r\n if (validation.pattern) {\r\n if (!validation.pattern.test(currentValue)) {\r\n validationError = true;\r\n }\r\n if (validation.pattern.test(currentValue)) {\r\n validationError = false;\r\n }\r\n } else if (validation.required) {\r\n if (!currentValue) {\r\n validationError = true;\r\n }\r\n } else if (validation.minLength) {\r\n if (\r\n !currentValue ||\r\n (currentValue && currentValue.length < validation.minLength)\r\n ) {\r\n validationError = true;\r\n }\r\n } else if (validation.maxLength) {\r\n if (currentValue && currentValue.length > validation.maxLength) {\r\n validationError = true;\r\n }\r\n }\r\n\r\n if (validationError) {\r\n setHasError(true);\r\n setErrorMessage(errorMessage);\r\n } else {\r\n setHasError(false);\r\n }\r\n\r\n setHasValue(!!currentValue);\r\n }\r\n };\r\n\r\n const onInputBlur = (e: React.FocusEvent) => {\r\n const currentValue: string = e.currentTarget.value;\r\n\r\n doValidation(currentValue);\r\n onBlur && onBlur(e.currentTarget.value);\r\n };\r\n\r\n const onInputFocus = (e: React.FocusEvent) => {\r\n if (!!validation && validation.onTouched) {\r\n validation.onTouched(name); // TODO: Refactor? While it's okay to use callbacks since they was passed down, I don't like the fact\r\n }\r\n\r\n setHasError(false);\r\n setHasTouched(true);\r\n };\r\n\r\n useEffect(() => {\r\n validationDispatch({\r\n type: 'register',\r\n name: name,\r\n payload: {\r\n hasTouched: hasTouched,\r\n hasError: hasError,\r\n hasValue: hasValue,\r\n },\r\n });\r\n\r\n if (!!validation) {\r\n if (validation.backendValidation) {\r\n setHasError(true);\r\n setErrorMessage(validation.backendValidation.message);\r\n }\r\n }\r\n\r\n return () => {\r\n validationDispatch({ type: 'unregister', name: name, payload: {} });\r\n };\r\n }, [validationDispatch, name, hasTouched, hasError, hasValue, validation]);\r\n\r\n return (\r\n \r\n \r\n onInputChange(e.currentTarget.value),\r\n })}\r\n {...(onKeyDown && { onKeyDown })}\r\n onBlur={onInputBlur}\r\n onFocus={onInputFocus}\r\n onInput={onInputBlur}\r\n name={name}\r\n placeholder={placeholder ? placeholder : ''}\r\n round={round}\r\n disabled={disabled}\r\n />\r\n \r\n );\r\n};\r\n\r\nconst InputGroup = styled('div', {\r\n position: 'relative',\r\n});\r\n\r\nconst FormInput = styled('input', {\r\n fs: 8,\r\n fontWeight: '$fw700',\r\n ls: '$ls08',\r\n backgroundColor: 'inherit',\r\n w: '100%',\r\n h: 11,\r\n my: 2,\r\n px: 3,\r\n bw: 0.25,\r\n borderStyle: 'solid',\r\n borderColor: '$borderPrimary',\r\n '&:focus': {\r\n border: '1px solid $blue',\r\n outline: '1px solid $blue',\r\n },\r\n variants: {\r\n color: {\r\n default: {\r\n color: 'inherit',\r\n },\r\n error: {\r\n color: '$errorText',\r\n },\r\n },\r\n round: {\r\n true: {\r\n br: 2.5,\r\n border: '1px solid $grey100',\r\n },\r\n },\r\n },\r\n '&::placeholder': {\r\n color: '$grey500',\r\n fs: 5,\r\n fontWeight: '$fw400',\r\n '@mediaMinLarge': {\r\n fs: 7,\r\n },\r\n },\r\n});\r\n\r\nexport default Input;\r\n","import React, { useEffect, useReducer } from 'react';\r\n\r\ntype ValidationPropType = {\r\n children: React.ReactNode;\r\n onInputsValid?: Function;\r\n onInputsInvalid?: Function;\r\n};\r\n\r\ntype ValidationAction = {\r\n type: string;\r\n name?: string;\r\n payload: ValidationPayload;\r\n};\r\n\r\ntype ValidationPayload = {\r\n hasTouched?: boolean;\r\n hasError?: boolean;\r\n hasValue?: boolean;\r\n};\r\n\r\nexport type BackendValidation = {\r\n message: string;\r\n code: number;\r\n};\r\n\r\nexport type ValidationDictionary = {\r\n [key: string]: T;\r\n};\r\n\r\nexport type ValidationParams = {\r\n active?: boolean;\r\n\r\n required?: boolean;\r\n minLength?: number;\r\n maxLength?: number;\r\n pattern?: RegExp;\r\n\r\n errorMessage?: string;\r\n validationKey?: string;\r\n\r\n backendValidation?: BackendValidation;\r\n onTouched?: Function;\r\n};\r\n\r\nconst reducer = (\r\n state: { count: number; inputs: ValidationDictionary },\r\n action: ValidationAction\r\n) => {\r\n switch (action.type) {\r\n case 'register': {\r\n const newInputs = { ...state.inputs };\r\n let newCount = state.count;\r\n\r\n if (action.name !== undefined) {\r\n newInputs[action.name] = action.payload;\r\n newCount = state.count + 1;\r\n }\r\n\r\n return {\r\n count: newCount,\r\n inputs: { ...newInputs },\r\n };\r\n }\r\n case 'unregister': {\r\n const count = state.count - 1;\r\n const newInputs = { ...state.inputs };\r\n\r\n if (action.name !== undefined && newInputs.hasOwnProperty(action.name)) {\r\n delete newInputs[action.name];\r\n }\r\n\r\n return {\r\n count: count < 0 ? 0 : count,\r\n inputs: { ...newInputs },\r\n };\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n};\r\n\r\nconst ValidationDispatchContext = React.createContext({});\r\n\r\nconst initialReducerState = {\r\n count: 0,\r\n inputs: {},\r\n};\r\n\r\nfunction InputValidation({\r\n children,\r\n onInputsValid,\r\n onInputsInvalid,\r\n}: ValidationPropType) {\r\n const [{ count, inputs }, dispatch] = useReducer(\r\n reducer,\r\n initialReducerState\r\n );\r\n\r\n useEffect(() => {\r\n let validCount = 0;\r\n\r\n if (count > 0) {\r\n for (const key in inputs) {\r\n if (inputs.hasOwnProperty(key)) {\r\n const payload = inputs[key];\r\n\r\n if (payload.hasValue && !payload.hasError) {\r\n validCount++;\r\n }\r\n }\r\n }\r\n\r\n if (validCount === count) {\r\n onInputsValid && onInputsValid();\r\n } else {\r\n onInputsInvalid && onInputsInvalid();\r\n }\r\n }\r\n }, [count, onInputsValid, onInputsInvalid, inputs]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nconst useInputValidation: () => React.Dispatch = () => {\r\n return React.useContext(\r\n ValidationDispatchContext\r\n ) as React.Dispatch;\r\n};\r\n\r\nexport { useInputValidation, InputValidation };\r\n","import UserCredentials from '../../LoginPage/Models/UserCredentials.interface';\r\nimport { updateHeader } from '../../Shared/Models/Headers/useQueryHeader';\r\nimport { updateUserState } from '../../Shared/UserContextProvider/useQueryUserState';\r\n\r\nexport async function SignIn(\r\n userCredentials: UserCredentials,\r\n loginPageUrl: string,\r\n changePasswordUrl: string,\r\n channelId: string,\r\n setError: (value: boolean) => void,\r\n setValidationMessage: (value: string) => void,\r\n setIsLoading: (value: boolean) => void\r\n) {\r\n setIsLoading(true);\r\n setError(false);\r\n setValidationMessage('');\r\n const accountUrl = `/api/${userCredentials.language || 'en'}/account/`;\r\n const res = await fetch(`${accountUrl}SignIn`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n body: JSON.stringify(userCredentials),\r\n });\r\n const data = await res.json();\r\n if (data && data.statusCode === 200) {\r\n if (data.message === 'Change password') {\r\n window.location.href = `${\r\n changePasswordUrl ? changePasswordUrl : data.redirectUrl\r\n }`;\r\n } else {\r\n window.location.href = `${\r\n loginPageUrl ? loginPageUrl : data.redirectUrl\r\n }`;\r\n }\r\n } else {\r\n setError(true);\r\n setValidationMessage(data.message);\r\n }\r\n setIsLoading(false);\r\n}\r\n\r\nexport async function SignOut(languageRoute: string, channelId: string) {\r\n const accountUrl = `/api/${languageRoute || 'en'}/account/`;\r\n const res = await fetch(`${accountUrl}SignOut`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n });\r\n const data = await res.json();\r\n\r\n if (data.statusCode === 200) {\r\n window.location.href = `${data.redirectUrl}`;\r\n }\r\n}\r\n\r\nexport async function ChangePassword(\r\n userCredentials: UserCredentials,\r\n requestToken: string,\r\n languageRoute: string,\r\n channelId: string,\r\n setError: (value: boolean) => void,\r\n setValidationMessage: (value: string) => void,\r\n kexNavigate: (value: string) => void\r\n) {\r\n const accountUrl = `/api/${languageRoute || 'en'}/account/`;\r\n const res = await fetch(`${accountUrl}ChangePassword`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n RequestVerificationToken: requestToken,\r\n },\r\n body: JSON.stringify(userCredentials),\r\n });\r\n const data = await res.json();\r\n\r\n if (data.statusCode === 200) {\r\n updateHeader();\r\n updateUserState();\r\n } else {\r\n setError(true);\r\n setValidationMessage(data.message);\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport async function ChangeExpiredPassword(\r\n userCredentials: UserCredentials,\r\n changePasswordUrl: string,\r\n channelId: string,\r\n pageId: string,\r\n setSuccess: (value: boolean) => void,\r\n setError: (value: boolean) => void,\r\n setValidationMessage: (value: string) => void,\r\n setIsLoading: (value: boolean) => void\r\n) {\r\n const accountUrl = `/api/${userCredentials.language || 'en'}/account/`;\r\n const res = await fetch(\r\n `${accountUrl}ChangeExpiredPassword?pageId=${pageId}`,\r\n {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n body: JSON.stringify(userCredentials),\r\n }\r\n );\r\n const data = await res.json();\r\n if (data && data.statusCode === 200) {\r\n window.location.href = `${\r\n changePasswordUrl ? changePasswordUrl : data.redirectUrl\r\n }`;\r\n } else {\r\n setError(true);\r\n setValidationMessage(data.message);\r\n }\r\n}\r\n","import { useState } from 'react';\r\nimport LoginPageModel from '../../LoginPage/Models/LoginPageModel.interface';\r\nimport useCurrentPage from '../../Shared/Hooks/useCurrentPage';\r\nimport Input from '../../Atoms/Input/Input';\r\nimport { InputValidation } from '../../Atoms/Input/InputValidation';\r\nimport { ExclamationMarkIcon, LoadingCircle } from '../../Atoms/Icons';\r\nimport { SignIn } from './Account';\r\nimport { useAppSettingsData } from '../../Shared/Providers/AppSettingsProvider';\r\nimport UserCredentials from '../../LoginPage/Models/UserCredentials.interface';\r\nimport { useKexNavigate } from '../../Kex/KexRouter/KexRouter';\r\nimport KexLink from '../../Kex/KexLink';\r\nimport { useTranslationData } from '../../Shared/Providers/TranslationProvider';\r\nimport { styled } from '../../stitches.config';\r\nimport { H1, H2 } from '../../Atoms/Typography/Headings/Heading';\r\nimport Button from '../../Atoms/Buttons/Button';\r\nimport { useUserStateData } from '../../Shared/UserContextProvider/UserContextProvider';\r\nimport UserState from '../../Shared/Models/UserState.interface';\r\nimport { useHeaderData } from '../../Organisms/Header/Header';\r\nimport CtaButton from '../../Atoms/Buttons/CtaButton';\r\n\r\nfunction LoginPage() {\r\n const kexNavigate = useKexNavigate();\r\n const { pageHeading, pageIntroText, loginText, channelId } =\r\n useCurrentPage();\r\n const [user] = useState(useUserStateData());\r\n const [password, setPassword] = useState('');\r\n const [username, setUsername] = useState('');\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [error, setError] = useState(false);\r\n const [validationMessage, setValidationMessage] = useState('');\r\n\r\n const {\r\n 'account/signIn': signIn,\r\n 'account/email': emaiLabel,\r\n 'account/password': passwordLabel,\r\n 'account/forgotPassword': forgotPassword,\r\n 'account/createAccount': createAccount,\r\n } = useTranslationData();\r\n\r\n const { languageRoute, staticPages } = useAppSettingsData();\r\n\r\n const userCredentials: UserCredentials = {\r\n userName: username,\r\n password: password,\r\n language: languageRoute,\r\n };\r\n\r\n const { dontAllowLogin } = useHeaderData();\r\n\r\n const disabled = password.length === 0 || username.length === 0;\r\n\r\n const signInUser = () => {\r\n if (disabled) return;\r\n SignIn(\r\n userCredentials,\r\n staticPages.myPage,\r\n staticPages.changePasswordPage,\r\n channelId,\r\n setError,\r\n setValidationMessage,\r\n setIsLoading\r\n );\r\n };\r\n\r\n if (dontAllowLogin) {\r\n kexNavigate(`/${languageRoute}/`);\r\n }\r\n\r\n if (user.authenticated) {\r\n kexNavigate(staticPages.myPage);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {pageHeading}\r\n {pageIntroText}\r\n \r\n \r\n \r\n {signIn}\r\n {loginText}\r\n {error && (\r\n \r\n \r\n {validationMessage}\r\n \r\n )}\r\n \r\n e.key === 'Enter' && signInUser()}\r\n />\r\n e.key === 'Enter' && signInUser()}\r\n />\r\n \r\n \r\n {forgotPassword}\r\n \r\n \r\n \r\n {signIn}\r\n {/* {isLoading ? (\r\n \r\n ) : (\r\n <>{signIn}>\r\n )} */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default LoginPage;\r\n\r\nconst StyledLoadingCircle = {\r\n color: '$white',\r\n h: 4,\r\n mx: 'auto',\r\n my: 'auto',\r\n};\r\n\r\nconst IconStyleError = {\r\n wh: 4,\r\n mr: 2,\r\n mt: 1,\r\n};\r\n\r\nconst Container = styled('div', {\r\n display: 'grid',\r\n gg: 4,\r\n gridTemplateColumns: '1fr',\r\n wh: '100%',\r\n minH: '95vh',\r\n justifyContent: 'center',\r\n grg: 0,\r\n mx: 'auto',\r\n '@mediaMinLarge': {\r\n gridTemplateColumns: '2fr 3.5fr',\r\n gg: 0,\r\n },\r\n maxW: '$contentMaxWidth',\r\n});\r\n\r\nconst GridBox = styled('div', {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n p: 8,\r\n});\r\n\r\nconst InfoGridBox = styled(GridBox, {});\r\n\r\nconst FormGridBox = styled(GridBox, {});\r\n\r\nconst StyledH1 = styled(H1, {});\r\n\r\nconst StyledH2 = styled(H2, {\r\n pb: 3,\r\n});\r\n\r\nconst IntroText = styled('p', {\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n ls: '1px',\r\n});\r\n\r\nconst FormContainer = styled('div', {\r\n fs: 13,\r\n fontWeight: '$fw300',\r\n lineHeight: '$lh15',\r\n ls: '$ls125',\r\n py: 16,\r\n '@mediaMinGreat': {\r\n px: 47,\r\n py: 6,\r\n },\r\n});\r\n\r\nconst FromDetailText = styled('p', {\r\n fs: 8,\r\n fontWeight: '$fw400',\r\n lineHeight: '$lh1625',\r\n mb: 6,\r\n mt: 0,\r\n});\r\n\r\nconst ValidationMessage = styled('div', {\r\n fs: 8,\r\n fontWeight: '$fw400',\r\n lineHeight: '$lh1625',\r\n backgroundColor: '$errorBackground',\r\n color: '$errorText',\r\n p: 6,\r\n my: 6,\r\n display: 'flex',\r\n});\r\n\r\nconst ErrorMessage = styled('p', {\r\n flexGrow: 1,\r\n flexShrink: 1,\r\n flexBasis: '0%',\r\n m: 0,\r\n});\r\n\r\nconst ButtonContainer = styled('div', {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n mt: 8,\r\n});\r\n\r\nconst ForgotPasswordLink = styled(KexLink, {\r\n fontSize: '14px',\r\n fontWeight: '$fw700',\r\n my: 'auto',\r\n textAlign: 'left',\r\n ls: '1px',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n});\r\n\r\nconst SignInButton = styled(CtaButton, {});\r\n"],"names":["BaseButtonStyled","styled","_objectSpread","cursor","display","alignItems","justifyContent","br","outlineWidth","variants","color","primary","backgroundColor","secondary","fontWeight","opacity","transparent","border","accent","borderColor","cancel","clearCart","true","size","s","px","py","fs","lineHeight","m","l","input","h","loading","fontSize","letterSpacing","_ref","onClick","css","isLoading","children","type","href","uppercase","rest","_objectWithoutProperties","_excluded","_jsx","StyledLink","noUnderline","StyledLoadingCircle","LoadingCircle","StyledButton","textAlign","w","false","textTransform","padding","borderRadius","height","KexLink","my","stroke","FormLabel","default","error","hasError","htmlFor","InputGroup","position","FormInput","ls","bw","borderStyle","outline","round","title","_ref$type","onChange","onBlur","onKeyDown","name","validation","placeholder","_ref$disabled","disabled","validationDispatch","useInputValidation","_useState","useState","_useState2","_slicedToArray","setHasError","_useState3","_useState4","errorMessage","setErrorMessage","_useState5","_useState6","hasTouched","setHasTouched","_useState7","_useState8","hasValue","setHasValue","onInputChange","val","doValidation","currentValue","validationError","undefined","active","pattern","test","required","minLength","length","maxLength","onInputBlur","e","currentTarget","value","useEffect","payload","backendValidation","message","_jsxs","Label","onFocus","onTouched","onInput","reducer","state","action","newInputs","inputs","newCount","count","hasOwnProperty","ValidationDispatchContext","React","initialReducerState","InputValidation","onInputsValid","onInputsInvalid","_useReducer","useReducer","_useReducer2","_useReducer2$","dispatch","validCount","key","Provider","SignIn","_x","_x2","_x3","_x4","_x5","_x6","_x7","_SignIn","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee","userCredentials","loginPageUrl","changePasswordUrl","channelId","setError","setValidationMessage","setIsLoading","accountUrl","res","data","wrap","_context","prev","next","concat","language","fetch","method","headers","JSON","stringify","channelSystemId","body","sent","json","statusCode","window","location","redirectUrl","stop","SignOut","_x8","_x9","_SignOut","_callee2","languageRoute","_context2","ChangePassword","_x10","_x11","_x12","_x13","_x14","_x15","_x16","_ChangePassword","_callee3","requestToken","kexNavigate","_context3","RequestVerificationToken","updateHeader","updateUserState","abrupt","ChangeExpiredPassword","_x17","_x18","_x19","_x20","_x21","_x22","_x23","_x24","_ChangeExpiredPassword","_callee4","pageId","setSuccess","_context4","useKexNavigate","_useCurrentPage","useCurrentPage","pageHeading","pageIntroText","loginText","useUserStateData","user","password","setPassword","username","setUsername","_useState9","_useState10","_useState11","_useState12","validationMessage","_useTranslationData","useTranslationData","signIn","emaiLabel","passwordLabel","forgotPassword","_useAppSettingsData","useAppSettingsData","staticPages","userName","dontAllowLogin","useHeaderData","signInUser","myPage","changePasswordPage","authenticated","Container","InfoGridBox","StyledH1","noMargin","IntroText","FormGridBox","FormContainer","StyledH2","FromDetailText","ValidationMessage","ExclamationMarkIcon","IconStyleError","ErrorMessage","Input","ForgotPasswordLink","forgotPasswordPage","ButtonContainer","SignInButton","wh","mr","mt","gg","gridTemplateColumns","minH","grg","mx","maxW","GridBox","flexDirection","p","H1","H2","pb","mb","flexGrow","flexShrink","flexBasis","CtaButton"],"sourceRoot":""}