\r\n logoLink?: string\r\n monthlyEnable: boolean\r\n parkerId: string\r\n monthlyParkerInfo?: MonthlyParkerInfo\r\n spot: Spot\r\n timeSelectOption?: TimeSelectOption[]\r\n newTokens?: CustomerTokens\r\n currentDateTimeLocal: string\r\n corporationLotsToken?: string\r\n /** sms flow; car is already parked, and user clicks the same link */\r\n carId?: string\r\n isExternalPricingEnabled: boolean\r\n externalPricingType: ExternalPricingType\r\n selfRegisterUrl?: string | null\r\n isLocationStopped: boolean\r\n locationStoppedMessage: string | null\r\n lotCapacity: LotCapacity | null\r\n isUpfrontCouponAvailable: boolean\r\n redirectUrl?: string | null\r\n}\r\nexport interface GetSimulatedPricesRequest {\r\n /** lot ids */\r\n parkings: string[]\r\n /** format: \"2020-09-28T18:00:00\" */\r\n simulateStartTime: string\r\n /** format: \"2020-09-28T18:00:00\" */\r\n simulateEndTime: string\r\n}\r\nexport type GetSimulatedPricesResponse = SimulatedPrice[]\r\n","import { CreditCard } from './creditCards'\r\nimport { CustomerTokens } from './customer'\r\nimport { Currency } from './ticket'\r\n\r\nexport interface Receipt {\r\n carId: string\r\n dateInUTC: string\r\n locationName: string\r\n areaAddress: string\r\n cardUsed: boolean\r\n creditCard?: CreditCard\r\n amount: Amount\r\n clientMail?: string\r\n externalServiceDeliversReceipts: boolean\r\n}\r\n\r\nexport interface Amount {\r\n totalAmount: number\r\n convenienceFee?: number\r\n currency: Currency\r\n}\r\n\r\nexport interface GetReceiptsData {\r\n receipts: Receipt[]\r\n}\r\n\r\nexport type SendReceiptsPayload = {\r\n email: string\r\n carId: string\r\n}\r\nexport type SendReceiptsData = boolean\r\n\r\nexport type SendQuestionPayload = {\r\n email: string\r\n message: string\r\n carId: string\r\n}\r\nexport type SendQuestionData = boolean\r\n\r\nexport type AddContactInformationsPayload = {\r\n carId: string\r\n email?: string\r\n countryCode?: string\r\n phoneNumber?: string\r\n confirmToken?: string\r\n pin?: string\r\n}\r\n\r\nexport type AddContactInformationsData = {\r\n newTokens: CustomerTokens\r\n}\r\n\r\nexport interface SendVerificationSMSPayload {\r\n phoneNumber: string\r\n countryCode: number\r\n tokenValuePart: string\r\n verificationType: VerificationType\r\n recaptchaToken: string\r\n}\r\n\r\nexport interface SendVerificationSMSData {\r\n confirmToken: string\r\n verificationType: VerificationType\r\n}\r\n\r\nexport interface GetContactInformationsData {\r\n email: string\r\n countryCode: number | string\r\n phoneNumber: string\r\n}\r\n\r\nexport enum VerificationType {\r\n SavingGuestsPhoneNumber = 1,\r\n}\r\n","export enum TermsType {\r\n Login = 1,\r\n Transient = 2,\r\n Monthly = 3,\r\n}\r\n\r\nexport enum UserLanguage {\r\n En_US = 1,\r\n En_GB = 2,\r\n De_de = 3,\r\n It_it = 4,\r\n}\r\n\r\nexport interface GetTermsAndConditionsParams {\r\n type: TermsType\r\n lotId?: string\r\n languageCode?: string //ISO Language Code\r\n}\r\n\r\nexport interface GetTermsAndConditionsResult {\r\n text: string //Simple HTML with tags
\r\n}\r\n\r\nexport interface ShowForCustomerResult {\r\n termsAndConditionsID: string\r\n show: boolean\r\n}\r\n\r\nexport interface ShowForCustomerParams {\r\n language: UserLanguage\r\n}\r\n\r\nexport interface AcceptToSParams {\r\n termsAndConditionsId: string\r\n clientDateTime: Date\r\n}\r\n\r\nexport interface TermsOfService {\r\n termsAndConditionsId: string\r\n show: boolean\r\n termsAndConditionsContent: string\r\n}\r\n\r\nexport interface GetTermsOfServiceContentParams {\r\n id: string\r\n language: UserLanguage\r\n}\r\n","import { CreditCard } from './creditCards'\r\nimport { Lot, LotCustomStyles, OptionType } from './lot'\r\n\r\nexport enum CarStatus {\r\n Parked = 1,\r\n RequiresPayment = 2,\r\n ParkingHasExpired = 3,\r\n RequiresAddMoreTime = 4,\r\n}\r\n\r\nexport enum PaymentOperationType {\r\n Payment = 1,\r\n Coupon = 2,\r\n BuyMoreTime = 3,\r\n}\r\n\r\nexport enum TransactionStatus {\r\n NotStarted = 0,\r\n Started = 1,\r\n SuccessfulPreAuth = 2,\r\n SuccessfulCommit = 3,\r\n Rejected = 4,\r\n Failed = 5,\r\n Suspend = 6,\r\n Cancelled = 7,\r\n}\r\n\r\nexport enum CurrencyFormat {\r\n AfterAmount = 1,\r\n BeforeAmount = 2,\r\n}\r\nexport interface Currency {\r\n cultureName: string\r\n currencyFormat: CurrencyFormat\r\n currencySymbol?: string\r\n}\r\n\r\nexport interface PaymentOperation {\r\n amount: number\r\n dateAtUTC: string\r\n dateAtLocal: string\r\n name?: string\r\n validatorName?: string\r\n type: PaymentOperationType\r\n}\r\n\r\nexport interface Settlement {\r\n convenienceFee: number\r\n convenienceFeeName?: string\r\n currency: Currency\r\n finalAmount: number\r\n parkingAmount: number\r\n paymentOperationList: PaymentOperation[]\r\n creditCardInfo?: Pick\r\n}\r\n\r\nexport enum ParkerType {\r\n Normal = 1,\r\n Monthly = 2,\r\n}\r\nexport interface Ticket {\r\n addTimeEnable: boolean\r\n advertisementUrl?: string\r\n carId: string\r\n carStatus: CarStatus\r\n currentDateTime: string\r\n /** @deprecated */\r\n isMonthlyParker?: boolean\r\n lot: Lot & { logoLink?: string }\r\n parkerType: ParkerType\r\n parkingBeginDateTime?: string\r\n parkingExpireDateTime?: string\r\n plate: string\r\n settlement?: Settlement\r\n spot: string\r\n validateEnable: boolean\r\n customStyles: LotCustomStyles[]\r\n externalServiceDeliversReceipts: boolean\r\n}\r\n\r\nexport interface ParkTime {\r\n parkingTimeMinutes?: number\r\n parkingTimeHours?: number\r\n parkingTimeDays?: number\r\n optionId?: string\r\n optionType?: OptionType\r\n parkingExpireDateTime?: string\r\n}\r\n\r\n/**\r\n * API CALLS\r\n */\r\nexport interface GetTicketPayload {\r\n carId: string\r\n}\r\n\r\nexport type GetTicketData = Ticket\r\nexport interface GetTicketsData {\r\n tickets: Ticket[]\r\n}\r\n\r\nexport type ParkCarPayload = {\r\n parkerId: string\r\n parkerMonthlyId?: string\r\n plate: string\r\n spot?: string\r\n parkTime?: ParkTime\r\n externalPricingId?: string\r\n}\r\nexport interface ParkCarData {\r\n carId: string\r\n carStatus: CarStatus\r\n paymentRedirectionAvailable: boolean\r\n contactDataRequired: boolean\r\n customerHasEmail: boolean \r\n}\r\nexport interface BuyMoreTimePayload {\r\n carId: string\r\n parkTime?: ParkTime\r\n}\r\n\r\nexport interface BuyMoreTimeExternalPayload\r\n extends Pick {\r\n externalPricingId: string\r\n}\r\nexport interface BuyMoreTimeData {\r\n requiresPayment: boolean\r\n paymentRedirectionAvailable: boolean\r\n}\r\n\r\nexport interface PayForCarPayload {\r\n carId: string\r\n creditCardId?: string\r\n zipCode: string\r\n lastName?: string\r\n creditCardInfo?: {\r\n ccNumber: string\r\n expirationYear: number\r\n expirationMonth: number\r\n }, \r\n recaptchaToken: string\r\n}\r\nexport interface PayForCarData {\r\n success: boolean\r\n}\r\n\r\nexport interface ParkCarRedirectPayload {\r\n carId: string\r\n recaptchaToken: string\r\n}\r\n\r\nexport interface ParkCarRedirectData {\r\n token: string\r\n}\r\n\r\nexport interface ParkCarTransactionStatusPayload {\r\n carId: string\r\n transactionId?: string\r\n}\r\n\r\nexport interface ParkCarTransactionStatusData {\r\n transactionStatus: TransactionStatus\r\n}\r\n","import { PromiseStatus } from './slices.types'\r\nimport { FetchStatus } from 'typedef'\r\n\r\nexport const ADS = 'ads'\r\nexport const CARS = 'cars'\r\nexport const COUPON = 'cupon'\r\nexport const CREDIT_CARDS = 'creditCards'\r\nexport const CUSTOMER = 'customer'\r\nexport const FETCH = '/fetch'\r\nexport const LAYOUT = 'layout'\r\nexport const MAP = 'map'\r\nexport const PARK_CAR = 'parkCar'\r\nexport const RECEIPTS = 'receipts'\r\nexport const SIMULATE_PRICE = 'simulatePrice'\r\nexport const TERMS = 'terms'\r\nexport const TERMS_OF_SERVICE = 'termsOfService'\r\nexport const TICKETS = 'tickets'\r\nexport const CONTACT_INFORMATIONS = 'contactInformations'\r\n\r\nexport const initialPromiseStatus: PromiseStatus = {\r\n description: '',\r\n title: '',\r\n variant: 'warning',\r\n status: [FetchStatus.Idle],\r\n requestId: null,\r\n time: null,\r\n code: null,\r\n}\r\n","export default __webpack_public_path__ + \"static/media/bg.205d97ef.png\";","import { createSlice, PayloadAction } from '@reduxjs/toolkit'\r\nimport { FullLayoutProps } from 'shared/layout/FullLayout'\r\nimport { TopbarProps } from 'shared/Topbar'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { LAYOUT } from './constants'\r\nimport bg from 'assets/images/bg.png'\r\n\r\nconst defaultCustomStyles = {\r\n headerBgUrl: bg,\r\n cardBgUrl: '',\r\n}\r\nexport interface LayoutState {\r\n layout?: FullLayoutProps\r\n topbar?: TopbarProps\r\n bottomMenu?: boolean\r\n autoToogleSnackGap?: boolean\r\n height?: number\r\n loader?: boolean\r\n innerWidth?: number\r\n customStyles: {\r\n headerBgUrl: string\r\n cardBgUrl: string\r\n }\r\n}\r\nexport type LayoutStateWithoutCustomStyles = Omit\r\nexport const appLayoutProps: LayoutStateWithoutCustomStyles = {\r\n layout: {\r\n hasFlatBackground: true,\r\n hasTopBar: true,\r\n hasBottomBar: true,\r\n hasSnackbar: false,\r\n },\r\n autoToogleSnackGap: true,\r\n topbar: {},\r\n bottomMenu: true,\r\n}\r\nexport const authLayoutProps: LayoutStateWithoutCustomStyles = {\r\n layout: {\r\n hasTopBar: true,\r\n hasBottomBar: true,\r\n narrow: true,\r\n },\r\n bottomMenu: false,\r\n topbar: null,\r\n}\r\n/**\r\n * state\r\n */\r\nconst initialState: LayoutState = {\r\n layout: {\r\n hasTopBar: true,\r\n hasBottomBar: true,\r\n narrow: true,\r\n },\r\n autoToogleSnackGap: false,\r\n bottomMenu: false,\r\n topbar: null,\r\n height: window.innerHeight,\r\n loader: false,\r\n innerWidth: 0,\r\n customStyles: defaultCustomStyles,\r\n}\r\n\r\n/**\r\n * reducers\r\n */\r\nconst layoutSlice = createSlice({\r\n name: LAYOUT,\r\n initialState,\r\n reducers: {\r\n setLayout(state, { payload }: PayloadAction) {\r\n state.layout = payload\r\n },\r\n setTopbar(state, { payload }: PayloadAction) {\r\n state.topbar = payload\r\n },\r\n setBottomMenu(state, { payload }: PayloadAction) {\r\n state.bottomMenu = payload\r\n },\r\n setHeight(state, { payload }: PayloadAction) {\r\n state.height = payload\r\n },\r\n setCenter(state, { payload }: PayloadAction) {\r\n state.layout.center = payload\r\n },\r\n setSnackbarGutter(state, { payload }: PayloadAction) {\r\n state.layout.hasSnackbar = payload\r\n },\r\n setInnerWidth(state, { payload }: PayloadAction) {\r\n state.innerWidth = payload\r\n },\r\n // setAd(state, { payload }: PayloadAction) {\r\n // state.ad = payload\r\n // },\r\n setFullLayout(\r\n state,\r\n { payload }: PayloadAction\r\n ) {\r\n state.layout = payload?.layout ? payload?.layout : {}\r\n state.topbar = payload.topbar\r\n state.bottomMenu = payload.bottomMenu\r\n state.autoToogleSnackGap = payload.autoToogleSnackGap\r\n },\r\n setAuthLayout(state) {\r\n state.layout = authLayoutProps.layout\r\n state.topbar = authLayoutProps.topbar\r\n state.bottomMenu = authLayoutProps.bottomMenu\r\n state.autoToogleSnackGap = authLayoutProps.autoToogleSnackGap\r\n },\r\n setAppLayout(state) {\r\n state.layout = appLayoutProps.layout\r\n state.topbar = appLayoutProps.topbar\r\n state.bottomMenu = appLayoutProps.bottomMenu\r\n state.autoToogleSnackGap = appLayoutProps.autoToogleSnackGap\r\n },\r\n setLoader(state, { payload }: PayloadAction>) {\r\n const loader = typeof payload === 'boolean' ? payload : !state.loader\r\n state.loader = loader\r\n },\r\n setCustomStyles(\r\n state,\r\n { payload }: PayloadAction>\r\n ) {\r\n state.customStyles = {\r\n cardBgUrl: payload?.cardBgUrl || defaultCustomStyles.cardBgUrl,\r\n headerBgUrl: payload?.headerBgUrl || defaultCustomStyles.headerBgUrl,\r\n }\r\n },\r\n },\r\n})\r\n\r\nexport default layoutSlice.reducer\r\nexport const { actions } = layoutSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const stateSelectors = (state: RootState) => state.layout\r\n","enum Translations {\n PARKED_CARS = \"PARKED_CARS\",\n MY_RECEIPTS = \"MY_RECEIPTS\",\n CREDIT_CARDS = \"CREDIT_CARDS\",\n MY_CARS = \"MY_CARS\",\n FIND_CAR = \"FIND_CAR\",\n SIGN_OUT = \"SIGN_OUT\",\n PCODE_PARKING_NAME = \"PCODE_PARKING_NAME\",\n LOG_IN = \"LOG_IN\",\n SIGN_UP = \"SIGN_UP\",\n LOGIN = \"LOGIN\",\n PASSWORD = \"PASSWORD\",\n FORGOT_PASSWORD = \"FORGOT_PASSWORD\",\n TERMS_AND_CONDITIONS = \"TERMS_AND_CONDITIONS\",\n PARKING_MADE_EASY = \"PARKING_MADE_EASY\",\n CREATING_ACCOUNT = \"CREATING_ACCOUNT\",\n NEXT = \"NEXT\",\n FIRST_NAME = \"FIRST_NAME\",\n LAST_NAME = \"LAST_NAME\",\n PHONE_NUMBER = \"PHONE_NUMBER\",\n E_MAIL = \"E_MAIL\",\n FIELD_REQUIRED = \"FIELD_REQUIRED\",\n PASSWORD_MIN_LENGTH = \"PASSWORD_MIN_LENGTH\",\n PASSWORD_MAX_LENGTH = \"PASSWORD_MAX_LENGTH\",\n PASSWORD_NOT_MATCH = \"PASSWORD_NOT_MATCH\",\n INVALID_EMAIL = \"INVALID_EMAIL\",\n INVALID_PHONE_NUMBER = \"INVALID_PHONE_NUMBER\",\n SET_PASSWORD = \"SET_PASSWORD\",\n BOTH_PASSWORD_NEED_TO_BE_THE_SAME = \"BOTH_PASSWORD_NEED_TO_BE_THE_SAME\",\n CONFIRM_PASSWORD = \"CONFIRM_PASSWORD\",\n CODE_MESSAGE = \"CODE_MESSAGE\",\n RESEND_CODE = \"RESEND_CODE\",\n CREATE = \"CREATE\",\n WELCOME = \"WELCOME\",\n YOUR_ACCOUNT_HAS_BEEN_SUCCESFULLY_CREATED = \"YOUR_ACCOUNT_HAS_BEEN_SUCCESFULLY_CREATED\",\n ADD_NEW_CAR = \"ADD_NEW_CAR\",\n LICENCE_PLATE = \"LICENCE_PLATE\",\n INVALID_PLATE_NUMBER = \"INVALID_PLATE_NUMBER\",\n ONLY_ALPHANUMERIC_CHARACTERS_ARE_ALLOWED = \"ONLY_ALPHANUMERIC_CHARACTERS_ARE_ALLOWED\",\n DELETE_CAR = \"DELETE_CAR\",\n ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_CAR = \"ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_CAR\",\n TRY_AGAIN = \"TRY_AGAIN\",\n MY_PROFILE = \"MY_PROFILE\",\n CHANGE_PASSWORD = \"CHANGE_PASSWORD\",\n SAVE = \"SAVE\",\n DELETE_MY_ACCOUNT = \"DELETE_MY_ACCOUNT\",\n PLEASE_PROVIDE_YOUR_CURRENT_PASSWORD_AND_SET_THE_NEW_ONE = \"PLEASE_PROVIDE_YOUR_CURRENT_PASSWORD_AND_SET_THE_NEW_ONE\",\n CURRENT_PASSWORD = \"CURRENT_PASSWORD\",\n NEW_PASSWORD = \"NEW_PASSWORD\",\n CONFIRM_NEW_PASSWORD = \"CONFIRM_NEW_PASSWORD\",\n CHANGE = \"CHANGE\",\n INCORRECT_PASSWORD = \"INCORRECT_PASSWORD\",\n SUCCESS = \"SUCCESS\",\n YOUR_PASSWORD_HAS_BEEN_CHANGED = \"YOUR_PASSWORD_HAS_BEEN_CHANGED\",\n PLEASE_PROVIDE_YOUR_PASSWORD_TO_REMOVE_YOUR_ACCOUNT = \"PLEASE_PROVIDE_YOUR_PASSWORD_TO_REMOVE_YOUR_ACCOUNT\",\n DELETE = \"DELETE\",\n OOPS = \"OOPS\",\n YOUR_ACCOUNT_CANNOT_BE_DELETED_AT_THE_MOMENT = \"YOUR_ACCOUNT_CANNOT_BE_DELETED_AT_THE_MOMENT\",\n YOUR_CAR_CANNOT_BE_DELETED_AT_THE_MOMENT = \"YOUR_CAR_CANNOT_BE_DELETED_AT_THE_MOMENT\",\n PLEASE_TRY_AGAIN_LATER = \"PLEASE_TRY_AGAIN_LATER\",\n CLOSE = \"CLOSE\",\n INVALID_PASSWORD = \"INVALID_PASSWORD\",\n CANCEL = \"CANCEL\",\n PLEASE_LOGIN_TO_DISCOVER_WHOLE_APPP_FUNCTIONALITY = \"PLEASE_LOGIN_TO_DISCOVER_WHOLE_APPP_FUNCTIONALITY\",\n SIGN_IN = \"SIGN_IN\",\n TERMS_AND_CONDITIONS_CONTENT = \"TERMS_AND_CONDITIONS_CONTENT\",\n DELETE_CREDIT_CARD = \"DELETE_CREDIT_CARD\",\n ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_CREDIT_CARD = \"ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_CREDIT_CARD\",\n CARD_ADD_INFO = \"CARD_ADD_INFO\",\n EMAIL_WAS_SENT = \"EMAIL_WAS_SENT\",\n PLEASE_CHECK_YOUR_INBOX = \"PLEASE_CHECK_YOUR_INBOX\",\n SUBMIT = \"SUBMIT\",\n FORGOT_PASSWORD_SEND_ME_MAIL_DESC = \"FORGOT_PASSWORD_SEND_ME_MAIL_DESC\",\n RESET_PASSWORD = \"RESET_PASSWORD\",\n THE_PASSWORD_IS_CHANGED = \"THE_PASSWORD_IS_CHANGED\",\n YOUR_PASSWORD_HAS_BEEN_RESET = \"YOUR_PASSWORD_HAS_BEEN_RESET\",\n ADD_CARD_INFO = \"ADD_CARD_INFO\",\n SEND_RECEIPT = \"SEND_RECEIPT\",\n RECEIPT_WILL_BE_SENT_TO_PROVIDED_EMAIL = \"RECEIPT_WILL_BE_SENT_TO_PROVIDED_EMAIL\",\n CREDIT_CARD_NUMBER = \"CREDIT_CARD_NUMBER\",\n MONTH = \"MONTH\",\n YEAR = \"YEAR\",\n BILLING_ZIP_CODE = \"BILLING_ZIP_CODE\",\n ADD_CARD = \"ADD_CARD\",\n INVALID_ZIP_CODE = \"INVALID_ZIP_CODE\",\n ZIP_CODE_SHOULD_NOT_BE_EMPTY = \"ZIP_CODE_SHOULD_NOT_BE_EMPTY\",\n INVALID_CREDIT_CARD_NUMBER = \"INVALID_CREDIT_CARD_NUMBER\",\n CREDIT_CARD_HAS_BEEN_ADDED = \"CREDIT_CARD_HAS_BEEN_ADDED\",\n ADD_CARD_ERROR = \"ADD_CARD_ERROR\",\n FIND_CARS_INFO = \"FIND_CARS_INFO\",\n FIND_CARS_RESULT_INFO = \"FIND_CARS_RESULT_INFO\",\n MY_CREDIT_CARDS = \"MY_CREDIT_CARDS\",\n PARKING_HISTORY = \"PARKING_HISTORY\",\n INVALID_LICENCE_PLATE = \"INVALID_LICENCE_PLATE\",\n WRONG_LOGIN_OR_PASSWORD = \"WRONG_LOGIN_OR_PASSWORD\",\n INVALID_COUNTRY_CODE = \"INVALID_COUNTRY_CODE\",\n ACTIVATION_CODE_HAS_BEEN_SENT = \"ACTIVATION_CODE_HAS_BEEN_SENT\",\n YOUR_ACCOUNT_HAS_BEEN_DELETED = \"YOUR_ACCOUNT_HAS_BEEN_DELETED\",\n CREATE_ACCOUNT_ERROR = \"CREATE_ACCOUNT_ERROR\",\n ACCOUNT_ALREADY_EXISTS = \"ACCOUNT_ALREADY_EXISTS\",\n PHONE_NUMBER_ALREADY_EXISTS = \"PHONE_NUMBER_ALREADY_EXISTS\",\n INVALID_ACTIVATION_CODE = \"INVALID_ACTIVATION_CODE\",\n ACTIVATION_CODE_SEND_FAIL = \"ACTIVATION_CODE_SEND_FAIL\",\n AMBIGUOUS_LOGIN = \"AMBIGUOUS_LOGIN\",\n UNEXPECTED_ERROR_PLEASE_TRY_AGAIN = \"UNEXPECTED_ERROR_PLEASE_TRY_AGAIN\",\n OK = \"OK\",\n NO_RECEIPTS_FOUND = \"NO_RECEIPTS_FOUND\",\n YOUR_RECEIPT_CANNOT_BE_SENT = \"YOUR_RECEIPT_CANNOT_BE_SENT\",\n YOUR_CAR_CANNOT_BE_ADDED = \"YOUR_CAR_CANNOT_BE_ADDED\",\n EMAIL = \"EMAIL\",\n SEND = \"SEND\",\n NO_CREDIT_CARDS_FOUND = \"NO_CREDIT_CARDS_FOUND\",\n AT_LEAST_ONE_LOWERCASE = \"AT_LEAST_ONE_LOWERCASE\",\n AT_LEAST_ONE_UPPERCASE = \"AT_LEAST_ONE_UPPERCASE\",\n AT_LEAST_ONE_NUMBER = \"AT_LEAST_ONE_NUMBER\",\n AT_LEAST_ONE_SPECIAL_CHARACTER = \"AT_LEAST_ONE_SPECIAL_CHARACTER\",\n NEW_PASSWORD_HAS_TO_BE_DIFFERENT = \"NEW_PASSWORD_HAS_TO_BE_DIFFERENT\",\n ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_ACCOUNT = \"ARE_YOU_SURE_YOU_WANT_TO_REMOVE_YOUR_ACCOUNT\",\n PERSONAL_DATA = \"PERSONAL_DATA\",\n CREATE_PASSWORD = \"CREATE_PASSWORD\",\n TYPE_ACTIVATION_CODE = \"TYPE_ACTIVATION_CODE\",\n BACK_TO_LOGIN = \"BACK_TO_LOGIN\",\n BACK = \"BACK\",\n FIRSTNAME_CANNOT_BE_EMPTY = \"FIRSTNAME_CANNOT_BE_EMPTY\",\n LASTNAME_CANNOT_BE_EMPTY = \"LASTNAME_CANNOT_BE_EMPTY\",\n NAME_CANNOT_BE_EMPTY = \"NAME_CANNOT_BE_EMPTY\",\n EMAIL_CANNOT_BE_EMPTY = \"EMAIL_CANNOT_BE_EMPTY\",\n PHONE_CANNOT_BE_EMPTY = \"PHONE_CANNOT_BE_EMPTY\",\n PLATE_CANNOT_BE_EMPTY = \"PLATE_CANNOT_BE_EMPTY\",\n NO_CARS_FOUND = \"NO_CARS_FOUND\",\n CANNOT_FETCH_CAR_LIST = \"CANNOT_FETCH_CAR_LIST\",\n CANNOT_FETCH_CREDIT_CARDS_LIST = \"CANNOT_FETCH_CREDIT_CARDS_LIST\",\n CAR_HAS_BEEN_ADDED = \"CAR_HAS_BEEN_ADDED\",\n CAR_NAME = \"CAR_NAME\",\n TICKETS = \"TICKETS\",\n CAR_PARKED = \"CAR_PARKED\",\n CARS_PARKED = \"CARS_PARKED\",\n NO_PARKED_CARS = \"NO_PARKED_CARS\",\n PARK_CAR = \"PARK_CAR\",\n PARKING_EXPIRES_AT = \"PARKING_EXPIRES_AT\",\n PARKING_EXPIRED_AT = \"PARKING_EXPIRED_AT\",\n SEE_DETAILS = \"SEE_DETAILS\",\n TOTAL = \"TOTAL\",\n VALIDATE = \"VALIDATE\",\n ADD_TIME = \"ADD_TIME\",\n TICKET_DETAILS = \"TICKET_DETAILS\",\n RECEIPT = \"RECEIPT\",\n PARK_AGAIN = \"PARK_AGAIN\",\n EDIT_MY_INFO = \"EDIT_MY_INFO\",\n LAST_RECEIPT = \"LAST_RECEIPT\",\n SEE_MORE = \"SEE_MORE\",\n RETRY = \"RETRY\",\n FETCH_RECEIPTS_ERROR = \"FETCH_RECEIPTS_ERROR\",\n FETCH_CARS_ERROR = \"FETCH_CARS_ERROR\",\n FETCH_CREDIT_CARDS_ERROR = \"FETCH_CREDIT_CARDS_ERROR\",\n LOG_IN_AS_GUEST = \"LOG_IN_AS_GUEST\",\n EDIT = \"EDIT\",\n FETCH_CUSTOMER_DETAILS_ERROR = \"FETCH_CUSTOMER_DETAILS_ERROR\",\n PARK_ANOTHER_CAR = \"PARK_ANOTHER_CAR\",\n CONVENIENCE_FEE = \"CONVENIENCE_FEE\",\n PARKED = \"PARKED\",\n VALIDATED = \"VALIDATED\",\n BUY_MORE_TIME = \"BUY_MORE_TIME\",\n QUESTION = \"QUESTION\",\n YOUR_EMAIL_ADDRESS = \"YOUR_EMAIL_ADDRESS\",\n SEND_QUESTION = \"SEND_QUESTION\",\n YOUR_QUESTION_CANNOT_BE_SENT = \"YOUR_QUESTION_CANNOT_BE_SENT\",\n YOUR_QUESTION_HAS_BEEN_SENT = \"YOUR_QUESTION_HAS_BEEN_SENT\",\n QUESTION_CANNOT_BE_EMPTY = \"QUESTION_CANNOT_BE_EMPTY\",\n YOUR_ACCOUNT_HAS_BEEN_SUCCESSFULLY_SAVED = \"YOUR_ACCOUNT_HAS_BEEN_SUCCESSFULLY_SAVED\",\n YOUR_ACCOUNT_CANNOT_BE_SAVE = \"YOUR_ACCOUNT_CANNOT_BE_SAVE\",\n SPOT_NUMBER = \"SPOT_NUMBER\",\n PAY = \"PAY\",\n ALL_DAY_UNTIL = \"ALL_DAY_UNTIL\",\n PARKING_FEE = \"PARKING_FEE\",\n CHANGE_PRICING = \"CHANGE_PRICING\",\n SELECT_PRICING = \"SELECT_PRICING\",\n PRICING_LIST = \"PRICING_LIST\",\n PLEASE_CONFIRM_YOU_ARE_IN_SPOT = \"PLEASE_CONFIRM_YOU_ARE_IN_SPOT\",\n CONFIRM = \"CONFIRM\",\n FAILED_PARK_CAR = \"FAILED_PARK_CAR\",\n VALIDATOR_INFO = \"VALIDATOR_INFO\",\n FETCH_VALIDATORS_ERROR = \"FETCH_VALIDATORS_ERROR\",\n NO_VALIDATORS_FOUND = \"NO_VALIDATORS_FOUND\",\n ACCEPT = \"ACCEPT\",\n TICKET_CANNOT_BE_VALIDATED = \"TICKET_CANNOT_BE_VALIDATED\",\n TICKET_HAS_BEEN_VALIDATED = \"TICKET_HAS_BEEN_VALIDATED\",\n CODE_IS_INVALID = \"CODE_IS_INVALID\",\n INVALID_CODE = \"INVALID_CODE\",\n CURRENT_PASSWORD_CANNOT_BE_EMPTY = \"CURRENT_PASSWORD_CANNOT_BE_EMPTY\",\n NEW_PASSWORD_CANNOT_BE_EMPTY = \"NEW_PASSWORD_CANNOT_BE_EMPTY\",\n CONFIRM_NEW_PASSWORD_CANNOT_BE_EMPTY = \"CONFIRM_NEW_PASSWORD_CANNOT_BE_EMPTY\",\n NO_PARKING_FOUND = \"NO_PARKING_FOUND\",\n TODAY_OPEN = \"TODAY_OPEN\",\n LOCATION_IS_NOT_AVAILABLE = \"LOCATION_IS_NOT_AVAILABLE\",\n NAVIGATE = \"NAVIGATE\",\n NO_SEARCH_HISTORY = \"NO_SEARCH_HISTORY\",\n FAILED_PROPERLY_RETRIEVE = \"FAILED_PROPERLY_RETRIEVE\",\n REFRESH = \"REFRESH\",\n SOME_DATA_HAS_NOT_BEEN_UPDATED = \"SOME_DATA_HAS_NOT_BEEN_UPDATED\",\n TICKET = \"TICKET\",\n CHOOSE_CARD = \"CHOOSE_CARD\",\n ADD_NEW_CARD = \"ADD_NEW_CARD\",\n MANAGE_CARDS = \"MANAGE_CARDS\",\n SELECT_CARD = \"SELECT_CARD\",\n MANAGE_CREDIT_CARDS = \"MANAGE_CREDIT_CARDS\",\n ZIP_CODE = \"ZIP_CODE\",\n CREDIT_CARD_SHOULD_NOT_BE_EMPTY = \"CREDIT_CARD_SHOULD_NOT_BE_EMPTY\",\n INVALID_CARD_NUMBER = \"INVALID_CARD_NUMBER\",\n INVALID_EXPIRATION_DATE = \"INVALID_EXPIRATION_DATE\",\n ADD_CREDIT_CARD = \"ADD_CREDIT_CARD\",\n CANNOT_ADD_CREDIT_CARD = \"CANNOT_ADD_CREDIT_CARD\",\n YOUR_CARD_HAS_BEEN_REJECTED = \"YOUR_CARD_HAS_BEEN_REJECTED\",\n SUCCESSFUL = \"SUCCESSFUL\",\n REFRESHING_DATA = \"REFRESHING_DATA\",\n INCORRECT_CONFIRM_TOKEN = \"INCORRECT_CONFIRM_TOKEN\",\n INCORRECT_TOKEN = \"INCORRECT_TOKEN\",\n YOUR_PASSWORD_CANNOT_BE_CHANGED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER = \"YOUR_PASSWORD_CANNOT_BE_CHANGED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER\",\n LAST_4_CREDIT_CARD_DIGITS = \"LAST_4_CREDIT_CARD_DIGITS\",\n INCORRECT_SPOT_NUMBER = \"INCORRECT_SPOT_NUMBER\",\n CANCEL_PARKING_PROCESS = \"CANCEL_PARKING_PROCESS\",\n ARE_YOU_SURE_YOU_WANT_TO_CANCEL_PARKING_PROCESS = \"ARE_YOU_SURE_YOU_WANT_TO_CANCEL_PARKING_PROCESS\",\n YES = \"YES\",\n NO = \"NO\",\n PARK = \"PARK\",\n SKIP = \"SKIP\",\n PROVIDED_CODE_IS_INVALID = \"PROVIDED_CODE_IS_INVALID\",\n PLEASE_SCAN_THE_POSTED_QR_CODE = \"PLEASE_SCAN_THE_POSTED_QR_CODE\",\n THE_CAR_HAS_BEEN_ADDED = \"THE_CAR_HAS_BEEN_ADDED\",\n CONFIRM_PASSWORD_CANNOT_BE_EMPTY = \"CONFIRM_PASSWORD_CANNOT_BE_EMPTY\",\n PASSWORD_CANNOT_BE_EMPTY = \"PASSWORD_CANNOT_BE_EMPTY\",\n MINIMUM_8_CHARACTERS_AT_LEAST_ONE_CAPITAL = \"MINIMUM_8_CHARACTERS_AT_LEAST_ONE_CAPITAL\",\n THE_LICENCE_PLATE_IS_ALREADY_IN_USE = \"THE_LICENCE_PLATE_IS_ALREADY_IN_USE\",\n PARKING_UNAVAILABLE = \"PARKING_UNAVAILABLE\",\n WE_ARE_SORRY_BUT_THE_CURRENT_PARKING_IS_NOT_AVAILABLE = \"WE_ARE_SORRY_BUT_THE_CURRENT_PARKING_IS_NOT_AVAILABLE\",\n BUY_MORE_TIME_OPTION_IS_UNVAILABLE_BECAUSE_MAXIMUM_PARKING_TIME_HAS_BEEN_REACHED = \"BUY_MORE_TIME_OPTION_IS_UNVAILABLE_BECAUSE_MAXIMUM_PARKING_TIME_HAS_BEEN_REACHED\",\n DATE_IS_INVALID = \"DATE_IS_INVALID\",\n DATE_SHOULD_NOT_BE_EMPTY = \"DATE_SHOULD_NOT_BE_EMPTY\",\n PAYMENT_SUCCESSFUL = \"PAYMENT_SUCCESSFUL\",\n SPOT_NUMBER_MUST_BE_BETWEEN = \"SPOT_NUMBER_MUST_BE_BETWEEN\",\n CLOSED = \"CLOSED\",\n OLD_PASSWORD_MUST_BE_DIFFERENT_THEN_THE_NEW_PASSWORD = \"OLD_PASSWORD_MUST_BE_DIFFERENT_THEN_THE_NEW_PASSWORD\",\n NO_E_MAIL_ASSIGNED_TO_GIVEN_PHONE_NUMBER = \"NO_E_MAIL_ASSIGNED_TO_GIVEN_PHONE_NUMBER\",\n TRANSACTION_DECLINED = \"TRANSACTION_DECLINED\",\n YOUR_TRANSACTION_HAS_BEEN_REJECTED = \"YOUR_TRANSACTION_HAS_BEEN_REJECTED\",\n OPEN_GATE = \"OPEN_GATE\",\n GATE_IS_OPENING_PLEASE_WAIT = \"GATE_IS_OPENING_PLEASE_WAIT\",\n YOU_SHOULD_RECEIVE_A_TEXT_MESSAGE_WITH_YOUR_DIGITAL_TICKET_HERE_SHORTLY = \"YOU_SHOULD_RECEIVE_A_TEXT_MESSAGE_WITH_YOUR_DIGITAL_TICKET_HERE_SHORTLY\",\n SEND_DIGITAL_TICKET_AGAIN = \"SEND_DIGITAL_TICKET_AGAIN\",\n BACK_TO_TICKETS = \"BACK_TO_TICKETS\",\n APPLICATION_CRASHED = \"APPLICATION_CRASHED\",\n RESTART_APPLICATION = \"RESTART_APPLICATION\",\n ERROR = \"ERROR\",\n PARKING_TIMER = \"PARKING_TIMER\",\n PAY_AND_EXIT = \"PAY_AND_EXIT\",\n THANK_YOU_FOR_PARKING = \"THANK_YOU_FOR_PARKING\",\n TO_OPEN_GATE_AND_LEAVE_THE_PARKING = \"TO_OPEN_GATE_AND_LEAVE_THE_PARKING\",\n THANK_YOU_FOR_YOUR_PAYMENT = \"THANK_YOU_FOR_YOUR_PAYMENT\",\n PLEASE_BE_AWARE_THAT_IF_YOU_DO_NOT_EXIT_THE_PARKING_FACILITY = \"PLEASE_BE_AWARE_THAT_IF_YOU_DO_NOT_EXIT_THE_PARKING_FACILITY\",\n SCAN_QR_CODE_TO_EXIT_PARKING = \"SCAN_QR_CODE_TO_EXIT_PARKING\",\n EXIT_PARKING = \"EXIT_PARKING\",\n TOTAL_PARKING_TIME = \"TOTAL_PARKING_TIME\",\n PARKING_AS_MONTHLY_PARKER = \"PARKING_AS_MONTHLY_PARKER\",\n YOU_ARE_ON_PARKING = \"YOU_ARE_ON_PARKING\",\n IT_SEEMS_THAT_YOUR_VEHICLE_IS_CURRENTLY_ALREADY_PARKED = \"IT_SEEMS_THAT_YOUR_VEHICLE_IS_CURRENTLY_ALREADY_PARKED\",\n UNFORTUNATELY_WE_CANNOT_FIND_YOUR_TICKET = \"UNFORTUNATELY_WE_CANNOT_FIND_YOUR_TICKET\",\n IT_SEEMS_THAT_YOUR_TICKET_IS_UNPAID = \"IT_SEEMS_THAT_YOUR_TICKET_IS_UNPAID\",\n PARKING_RATES = \"PARKING_RATES\",\n CALCULATE = \"CALCULATE\",\n EXIT_TIME = \"EXIT_TIME\",\n ENTRY_TIME = \"ENTRY_TIME\",\n UNHANDLED_GATE = \"UNHANDLED_GATE\",\n PARKING_IS_CLOSED = \"PARKING_IS_CLOSED\",\n GATED_PARKING_FACILITY = \"GATED_PARKING_FACILITY\",\n ACCESS_MAY_BE_GAINED_BY_SCANNING_THE_POSTED_QR = \"ACCESS_MAY_BE_GAINED_BY_SCANNING_THE_POSTED_QR\",\n TICKET_NOT_FOUND = \"TICKET_NOT_FOUND\",\n HOUR = \"HOUR\",\n HOURS = \"HOURS\",\n SELECT_LOT = \"SELECT_LOT\",\n SEARCH_BEST_PARKING_PRICING = \"SEARCH_BEST_PARKING_PRICING\",\n LICENCE_PLATE_IS_REQUIRED = \"LICENCE_PLATE_IS_REQUIRED\",\n SPOT_NUMBER_IS_REQUIRED = \"SPOT_NUMBER_IS_REQUIRED\",\n PARK_FOR = \"PARK_FOR\",\n PARK_UNTIL = \"PARK_UNTIL\",\n ALL_DAY = \"ALL_DAY\",\n SERVICE_TEMPORARILY_UNAVAILABLE_TRY_AGAIN_LATER = \"SERVICE_TEMPORARILY_UNAVAILABLE_TRY_AGAIN_LATER\",\n RATE_HAS_EXPIRED = \"RATE_HAS_EXPIRED\",\n RATE_HAS_EXPIRED_PLEASE_SELECT_YOUR_TIME_AGAIN = \"RATE_HAS_EXPIRED_PLEASE_SELECT_YOUR_TIME_AGAIN\",\n OR = \"OR\",\n RATE_EXPIRES_IN = \"RATE_EXPIRES_IN\",\n NO_AVAILABLE_PARKING_AT_CURRENT_TIME = \"NO_AVAILABLE_PARKING_AT_CURRENT_TIME\",\n INVALID_END_TIME = \"INVALID_END_TIME\",\n TIMEOUT = \"TIMEOUT\",\n YOUR_SESSION_HAS_EXPIRED_PLEASE_START_OVER = \"YOUR_SESSION_HAS_EXPIRED_PLEASE_START_OVER\",\n I_WANT_MONTHLY_PARKING = \"I_WANT_MONTHLY_PARKING\",\n SELECT_TIME = \"SELECT_TIME\",\n HAS_PARKED_CARS = \"HAS_PARKED_CARS\",\n TODAY_CLOSED = \"TODAY_CLOSED\",\n YOUR_CARD_CANNOT_BE_ADDED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER = \"YOUR_CARD_CANNOT_BE_ADDED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER\",\n USE_SMS_LINK_TO_LEAVE_PARKING = \"USE_SMS_LINK_TO_LEAVE_PARKING\",\n PLEASE_USE_SMS_LINK_AND_SCAN_QR_CODE = \"PLEASE_USE_SMS_LINK_AND_SCAN_QR_CODE\",\n TEXT2PARK_NOT_AVAILABLE = \"TEXT2PARK_NOT_AVAILABLE\",\n TEXT2PARK_IS_CURRENTLY_NOT_AVAILABLE = \"TEXT2PARK_IS_CURRENTLY_NOT_AVAILABLE\",\n USER_DENIED_GEOLOCALIZATION = \"USER_DENIED_GEOLOCALIZATION\",\n POSITION_UNAVAILABLE = \"POSITION_UNAVAILABLE\",\n POSITION_GEOLOCALIZATION_TIMEOUT = \"POSITION_GEOLOCALIZATION_TIMEOUT\",\n THE_TICKET_CANNOT_BE_VALIDATED_AT_THE_MOMENT = \"THE_TICKET_CANNOT_BE_VALIDATED_AT_THE_MOMENT\",\n NO_SPACES_AVAILABLE = \"NO_SPACES_AVAILABLE\",\n PARKING_IS_UNAVAILABLE = \"PARKING_IS_UNAVAILABLE\",\n NEED_HELP = \"NEED_HELP\",\n CONTACT_INFORMATION = \"CONTACT_INFORMATION\",\n COMPANY_NAME = \"COMPANY_NAME\",\n PHONE = \"PHONE\",\n WEBSITE = \"WEBSITE\",\n RECEIPTS_AND_NOTIFICATIONS = \"RECEIPTS_AND_NOTIFICATIONS\",\n ALMOST_FINISHED = \"ALMOST_FINISHED\",\n TAP_ADD_NEW_CARD = \"TAP_ADD_NEW_CARD\",\n TAP_STORED_CARD = \"TAP_STORED_CARD\",\n TO_ADD_NEW_TAP_MANAGE_CARDS = \"TO_ADD_NEW_TAP_MANAGE_CARDS\",\n ENTER_ZIP_CODE = \"ENTER_ZIP_CODE\",\n TYPE_CONFIRMATION_CODE = \"TYPE_CONFIRMATION_CODE\",\n MESSAGE_WITH_CONFIRMATION_CODE_HAS_BEEN_SENT = \"MESSAGE_WITH_CONFIRMATION_CODE_HAS_BEEN_SENT\",\n YOU_DIDNT_RECEIVE_THE_CODE = \"YOU_DIDNT_RECEIVE_THE_CODE\",\n TO_RECEIVE_PARKING_EXPIRATION_TEXT_MESSAGES = \"TO_RECEIVE_PARKING_EXPIRATION_TEXT_MESSAGES\",\n TO_RECEIVE_YOUR_RECEIPT_VIA_EMAIL = \"TO_RECEIVE_YOUR_RECEIPT_VIA_EMAIL\",\n TOKEN_EXPIRED = \"TOKEN_EXPIRED\",\n MONTH_SHORT = \"MONTH_SHORT\",\n YEAR_SHORT = \"YEAR_SHORT\",\n ALREADY_HAVE_AN_ACCOUNT = \"ALREADY_HAVE_AN_ACCOUNT\",\n PLEASE_ENTER_YOUR_MOBILE_PHONE = \"PLEASE_ENTER_YOUR_MOBILE_PHONE\",\n PLEASE_ENTER_YOUR_EMAIL = \"PLEASE_ENTER_YOUR_EMAIL\",\n TERMS_OF_SERVICE = \"TERMS_OF_SERVICE\",\n READ_AND_AGREE = \"READ_AND_AGREE\",\n NOTIFICATIONS = \"NOTIFICATIONS\",\n NOTIFICATIONS_SUBTITLE = \"NOTIFICATIONS_SUBTITLE\",\n PARKING_NOTIFICATIONS = \"PARKING_NOTIFICATIONS\",\n MAXIMUM_PARKING_TIME = \"MAXIMUM_PARKING_TIME\",\n REMAINING_MAXIMUM_PARKING_TIME = \"REMAINING_MAXIMUM_PARKING_TIME\",\n HOURS_SHORT = \"HOURS_SHORT\",\n MINUTES_SHORT = \"MINUTES_SHORT\",\n DAYS = \"DAYS\",\n DAY = \"DAY\",\n DAY_SHORT = \"DAY_SHORT\",\n SELECT_LANGUAGE = \"SELECT_LANGUAGE\",\n AMERICAN_ENGLISH = \"AMERICAN_ENGLISH\",\n BRITISH_ENGLISH = \"BRITISH_ENGLISH\",\n ITALIAN = \"ITALIAN\",\n GERMAN = \"GERMAN\",\n COUNTRY_CODE_AND_PHONE_NUMBER = \"COUNTRY_CODE_AND_PHONE_NUMBER\",\n PLEASE_COMPLETE_THE_CAPTCHA = \"PLEASE_COMPLETE_THE_CAPTCHA\",\n USER_IS_NOT_HUMAN = \"USER_IS_NOT_HUMAN\",\n RECAPTCHA_VERIFICATION_FAILED = \"RECAPTCHA_VERIFICATION_FAILED\",\n PLEASE_COMPLETE_RECAPTCHA_VERIFICATION = \"PLEASE_COMPLETE_RECAPTCHA_VERIFICATION\",\n \n}\n\nexport default Translations;","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\n// TODO:\r\nexport const login: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.NotEnoughParameters]: {\r\n title: T.INCORRECT_PASSWORD,\r\n description: '4013',\r\n },\r\n [ErrorCode.CustomerDoesntExist]: {\r\n title: T.INCORRECT_PASSWORD,\r\n description: '4013',\r\n },\r\n}\r\n\r\nexport const getCustomerDetails: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.FAILED_PROPERLY_RETRIEVE,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const register: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const confirmRegister: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const remindPassword: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const resetPassword: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const changePassword: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description:\r\n T.YOUR_PASSWORD_CANNOT_BE_CHANGED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const refreshToken: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const findCar: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.NO_CARS_FOUND,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const CustomerApiError = {\r\n login,\r\n getCustomerDetails,\r\n register,\r\n confirmRegister,\r\n remindPassword,\r\n resetPassword,\r\n changePassword,\r\n refreshToken,\r\n findCar,\r\n}\r\nexport default CustomerApiError\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\nexport const sendReceipt: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.YOUR_RECEIPT_CANNOT_BE_SENT,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const getReceipts: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const sendQuestion: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.YOUR_QUESTION_CANNOT_BE_SENT,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const ReceiptsApiError = {\r\n sendReceipt,\r\n getReceipts,\r\n sendQuestion,\r\n}\r\nexport default ReceiptsApiError\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\n// TODO:\r\nexport const getCars: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.CANNOT_FETCH_CAR_LIST,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const AddCar: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.YOUR_CAR_CANNOT_BE_ADDED,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.ObjectExist]: {\r\n description: T.THE_LICENCE_PLATE_IS_ALREADY_IN_USE,\r\n },\r\n}\r\nexport const deleteCar: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.YOUR_CAR_CANNOT_BE_DELETED_AT_THE_MOMENT,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const CarsApiError = { getCars, AddCar, deleteCar }\r\nexport default CarsApiError\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\nexport const getTicket: ErrorResponse = {\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.OOPS,\r\n description: T.TICKET_NOT_FOUND,\r\n variant: 'error',\r\n },\r\n}\r\n\r\nexport const getTickets: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const parkCar: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.OOPS,\r\n description: T.INCORRECT_SPOT_NUMBER,\r\n },\r\n [ErrorCode.AutoClearTimeExeeded]: {\r\n title: T.OOPS,\r\n description: T.RATE_HAS_EXPIRED_PLEASE_SELECT_YOUR_TIME_AGAIN,\r\n variant: 'error',\r\n },\r\n}\r\n\r\nexport const buyMoreTime: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const payForCar: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const parkCarRedirect: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n },\r\n}\r\n\r\nexport const parkCarTransactionStatus: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\nexport default {\r\n getTickets,\r\n parkCar,\r\n payForCar,\r\n getTicket,\r\n buyMoreTime,\r\n\r\n parkCarRedirect,\r\n parkCarTransactionStatus,\r\n}\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\n// TODO:\r\nexport const getCreditCards: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.CANNOT_FETCH_CREDIT_CARDS_LIST,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const addCreditCard: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description:\r\n T.YOUR_CARD_CANNOT_BE_ADDED_AT_THE_MOMENT_PLEASE_TRY_AGAIN_LATER,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.CANNOT_ADD_CREDIT_CARD,\r\n description: T.YOUR_CARD_HAS_BEEN_REJECTED,\r\n variant: 'error',\r\n },\r\n}\r\n\r\nexport const creditCardsApiError = { getCreditCards, addCreditCard }\r\nexport default creditCardsApiError\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\nexport const getLotDetailsPark: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.OOPS,\r\n description: T.INCORRECT_TOKEN,\r\n },\r\n [ErrorCode.TokenExpired]: {\r\n title: T.OOPS,\r\n description: T.TOKEN_EXPIRED,\r\n },\r\n}\r\nexport const getLots: ErrorResponse = {\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.OOPS,\r\n description: T.INCORRECT_TOKEN,\r\n },\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.TokenExpired]: {\r\n title: T.OOPS,\r\n description: T.TOKEN_EXPIRED,\r\n },\r\n}\r\nexport const getSimulatedPrices: ErrorResponse = {}\r\n\r\nexport const LotApiError = { getLotDetailsPark, getLots, getSimulatedPrices }\r\nexport default LotApiError\r\n","import T from 'utils/translations'\r\nimport { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\nexport const getValidators: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.SOME_DATA_HAS_NOT_BEEN_UPDATED,\r\n variant: 'warning',\r\n },\r\n}\r\nexport const validateCode: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.THE_TICKET_CANNOT_BE_VALIDATED_AT_THE_MOMENT,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const validatorsApiError = { getValidators, validateCode }\r\nexport default validatorsApiError\r\n","import { ErrorCode, ErrorResponse } from 'typedef'\r\n\r\nimport T from 'utils/translations'\r\n\r\n// TODO:\r\nexport const getTerms: ErrorResponse = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n}\r\n\r\nexport const TermsApiError = { getTerms }\r\nexport default TermsApiError\r\n","export const LOG = '/Log'\r\nexport const CUSTOMER_CAR = '/CustomerCar'\r\nexport const TICKETS = '/Tickets'\r\nexport const CREDIT_CARD = '/CreditCard'\r\nexport const PARK_CAR = '/ParkCar'\r\nexport const SMS = '/SMS'\r\nexport const PARK_CAR_REDIRECT = `${PARK_CAR}/PayRedirect`\r\nexport const PARK_CAR_TRANSACTION_STATUS = `${PARK_CAR}/TransactionStatus`\r\nexport const PARK_CAR_PAY = `${PARK_CAR}/Pay`\r\nexport const LOTS = '/Lots'\r\nexport const LOTS_DETAILS_PARK = `${LOTS}/Details/Park`\r\nexport const LOTS_DETAILS_MAP = `${LOTS}/Details/Map`\r\nexport const LOTS_SIMULATED_PRICES = `${LOTS}/SimulatedPrices`\r\nexport const LOTS_COMPANY_CONTACT_INFO = `${LOTS}/CompanyContactInfo`\r\nexport const PRICE = '/Price'\r\nexport const PRICE_EXTERNAL_PRICING = `${PRICE}/ExternalPricing`\r\nexport const COUPON = '/Coupon'\r\nexport const UPFRONT_COUPON = `${COUPON}/Upfront`\r\nexport const CUSTOMER = '/Customer'\r\nexport const CUSTOMER_LOGIN = `${CUSTOMER}/Login`\r\nexport const CUSTOMER_GET_DETAILS = `${CUSTOMER}/GetDetails`\r\nexport const CUSTOMER_REFRESH_TOKEN = `${CUSTOMER}/RefreshToken`\r\nexport const CUSTOMER_REGISTER = `${CUSTOMER}/Register`\r\nexport const CUSTOMER_CONFIRM_REGISTER = `${CUSTOMER}/ConfirmRegister`\r\nexport const CUSTOMER_REMIND_PASSWORD = `${CUSTOMER}/RemindPassword`\r\nexport const CUSTOMER_RESET_PASSWORD = `${CUSTOMER}/ResetPassword`\r\nexport const CUSTOMER_CHANGE_PASSWORD = `${CUSTOMER}/ChangePassword`\r\nexport const CUSTOMER_EDIT = `${CUSTOMER}/Edit`\r\nexport const CUSTOMER_DELETE = `${CUSTOMER}/Delete`\r\nexport const CUSTOMER_PHONE_NO_IS_AVAILABLE = `${CUSTOMER}/PhoneNoIsAvailable`\r\nexport const CUSTOMER_RESEND_REGISTRATION_PIN = `${CUSTOMER}/ResendRegistrationPin`\r\nexport const CUSTOMER_FIND_MY_CAR = `${CUSTOMER}/FindCar`\r\nexport const CUSTOMER_ADD_GUEST_NOTIFICATION = `${CUSTOMER}/AddGuestNotification`\r\nexport const CUSTOMER_GET_GUEST_NOTIFICATION = `${CUSTOMER}/GuestNotification`\r\nexport const SMS_SEND_VERIFICATION_SMS = `${SMS}/SendVerificationSMS`\r\nexport const SMS_RESEND_VERIFICATION_SMS = `${SMS}/ResendVerificationSMS`\r\nexport const TERMS_AND_CONDITIONS = `/TermsAndConditions`\r\nexport const RECEIPT = `/Receipt`\r\nexport const RECEIPT_QUESTION = `${RECEIPT}/SendQuestion`\r\nexport const SHOW_FOR_CUSTOMER = `${TERMS_AND_CONDITIONS}/ShowForCustomer`\r\nexport const ACCEPT_TOS = `${TERMS_AND_CONDITIONS}/Accept`\r\nexport const VERIFY_HUMAN = `/ReCaptcha/VerifyHuman`\r\n","import MockAdapter from 'axios-mock-adapter'\r\nimport { mockedAxios } from '../axios'\r\n\r\nexport const mock = new MockAdapter(mockedAxios, { delayResponse: 1500 })\r\n\r\nexport default mock\r\n","import { Car } from 'typedef/car'\r\n\r\nexport const cars: Car[] = [\r\n {\r\n carId: '123123',\r\n plate: 'SQSQSQ',\r\n name: 'Car 1',\r\n },\r\n {\r\n carId: '123321',\r\n plate: 'CQSRT2',\r\n name: 'Car 2',\r\n },\r\n]\r\n","import mock from '.'\r\nimport { Response } from 'typedef/api'\r\nimport { AddCarPayload, GetCarsData, AddCarData } from 'typedef/car'\r\nimport { cars } from '__fixtures__/myCars'\r\n\r\n// mock.onGet('/CustomerCar').networkError()\r\nmock.onGet('/CustomerCar').reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: { cars },\r\n } as Response,\r\n ]\r\n})\r\n\r\n// mock.onPost('/CustomerCar').networkError()\r\nmock.onPost('/CustomerCar').reply(config => {\r\n const request = JSON.parse(config.data) as AddCarPayload\r\n if (!request) return [400]\r\n\r\n return [200, { data: { carId: '0-' + cars.length } } as Response]\r\n})\r\n\r\nmock.onDelete('/CustomerCar').networkError()\r\n// mock.onDelete('/CustomerCar').reply(config => {\r\n// return [200, {} as Response]\r\n// })\r\n","import {\r\n AddCarData,\r\n AddCarPayload,\r\n DeleteCarPayload,\r\n GetCarsData,\r\n} from 'typedef/car'\r\nimport { CUSTOMER_CAR } from './constants'\r\nimport axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport './mocks/CarsApiMock'\r\n\r\nexport const getCars = async () => {\r\n try {\r\n const result = await axios.get>(CUSTOMER_CAR)\r\n return result.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const addCar = async (request: AddCarPayload) => {\r\n try {\r\n const { data } = await axios.post>(\r\n CUSTOMER_CAR,\r\n request\r\n )\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const deleteCar = async (request: DeleteCarPayload) => {\r\n try {\r\n await axios.delete(`${CUSTOMER_CAR}/${request.carId}`)\r\n return request.carId\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import { CreditCard, CardType } from 'typedef/creditCards'\r\n\r\nexport const cards: CreditCard[] = [\r\n {\r\n creditCardId: '21379110-1234-1111-0000-123412341234',\r\n last4Digits: '2137',\r\n cardType: CardType.MasterCard,\r\n },\r\n {\r\n creditCardId: '21379110-1234-1111-0000-32112321',\r\n last4Digits: '3221',\r\n cardType: CardType.AmericanExpress,\r\n },\r\n {\r\n creditCardId: '32322222-1234-1111-0000-123412341234',\r\n last4Digits: '1267',\r\n cardType: CardType.DinersClub,\r\n },\r\n {\r\n creditCardId: '42322222-1234-1111-0000-123412341234',\r\n last4Digits: '3212',\r\n cardType: CardType.Invalid,\r\n },\r\n {\r\n creditCardId: '52322222-1234-1111-0000-123412341234',\r\n last4Digits: '1214',\r\n cardType: CardType.JCB,\r\n },\r\n {\r\n creditCardId: '52322222-1234-1111-0000-123412341234',\r\n last4Digits: '2231',\r\n cardType: CardType.Discover,\r\n },\r\n {\r\n creditCardId: '52322222-1234-1111-0000-123412341234',\r\n last4Digits: '3333',\r\n cardType: CardType.Visa,\r\n },\r\n]\r\n","import mock from '.'\r\nimport { Response } from '../../typedef/api'\r\nimport { cards } from '__fixtures__/myCreditCards'\r\nimport { GetCreditCardsData, AddCreditCardData } from 'typedef/creditCards'\r\nimport { nanoid } from '@reduxjs/toolkit'\r\n\r\nmock.onGet('/CreditCard').reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: { creditCards: cards },\r\n } as Response,\r\n ]\r\n})\r\n\r\nmock.onDelete('/CreditCard').reply(config => {\r\n const data = config.data\r\n\r\n if (!data) return [400]\r\n\r\n return [200, {} as Response]\r\n})\r\n\r\nmock.onPost('/CreditCard').reply(config => {\r\n console.log({ config })\r\n return [\r\n 200,\r\n {\r\n // errors: [{ errorCode: 4020 }],\r\n data: { creditCardId: nanoid() },\r\n } as Response,\r\n ]\r\n})\r\n","import { Tokens, UserRole } from 'typedef/customer'\r\n\r\nexport interface ITokensStorageService {\r\n set: (tokens: Tokens) => void\r\n get: () => Tokens | null\r\n clear: () => void\r\n setUserRole: (tokens: UserRole) => void\r\n getUserRole: () => UserRole | null\r\n clearUserRole: () => void\r\n}\r\n\r\nconst set = (tokens: Tokens) => {\r\n localStorage.setItem('tokens', JSON.stringify(tokens))\r\n}\r\nconst setUserRole = (role: UserRole) => {\r\n localStorage.setItem('role', JSON.stringify(role))\r\n}\r\n\r\nconst get = () => {\r\n const tokensStorage = localStorage.getItem('tokens')\r\n if (!tokensStorage) return null\r\n\r\n const tokens: Tokens = JSON.parse(tokensStorage)\r\n return tokens\r\n}\r\nconst getUserRole = () => {\r\n const tokensStorage = localStorage.getItem('role')\r\n if (!tokensStorage) return null\r\n\r\n const role: UserRole = JSON.parse(tokensStorage)\r\n return role\r\n}\r\n\r\nconst clear = () => {\r\n localStorage.removeItem('tokens')\r\n}\r\n\r\nconst clearUserRole = () => {\r\n localStorage.removeItem('role')\r\n}\r\n\r\nconst tokensStorageService: ITokensStorageService = {\r\n set,\r\n get,\r\n clear,\r\n // Temporary\r\n setUserRole,\r\n getUserRole,\r\n clearUserRole,\r\n}\r\n\r\nexport default tokensStorageService\r\n","import { AxiosRequestConfig } from 'axios'\r\nimport moment from 'moment'\r\nimport mock from '.'\r\nimport { ErrorCode, Response } from '../../typedef/api'\r\nimport { LoginMode, LoginResult, UserRole } from '../../typedef/customer'\r\nimport tokensStorageService from 'utils/tokenStorageService'\r\n\r\nconst loginResult: LoginResult = {\r\n role: UserRole.User,\r\n tokens: {\r\n auth: 'AUTH_TOKEN',\r\n expires: moment().add(1, 'minutes').unix(),\r\n refresh: 'REFRESH_TOKEN',\r\n },\r\n}\r\n\r\nconst loginAsGuestResult: LoginResult = {\r\n role: UserRole.Guest,\r\n tokens: {\r\n auth: 'GUEST_AUTH_TOKEN',\r\n expires: moment().add(1, 'minutes').unix(),\r\n refresh: 'GUEST_REFRESH_TOKEN',\r\n },\r\n}\r\n\r\nconst invalidLoginCredentials = {\r\n login: '22222222',\r\n password: '22222222',\r\n}\r\n\r\n// mock.onPost('/Customer/RefreshToken').networkError()\r\nmock.onPost('/Customer/RefreshToken').reply(config => {\r\n const userRole = tokensStorageService.getUserRole()\r\n const tokens = tokensStorageService.get()\r\n\r\n return [\r\n 200,\r\n {\r\n data: { role: userRole, tokens } as LoginResult,\r\n },\r\n ]\r\n})\r\nmock.onPost('/Customer/Login').reply((config: AxiosRequestConfig) => {\r\n const data = JSON.parse(config.data)\r\n if (\r\n data.login === invalidLoginCredentials.login &&\r\n data.password === invalidLoginCredentials.password\r\n ) {\r\n return [\r\n 400,\r\n {\r\n errors: [\r\n {\r\n errorCode: ErrorCode.IncorrectUserOrPassword,\r\n },\r\n ],\r\n } as Response,\r\n ]\r\n }\r\n\r\n if (data.mode === LoginMode.Guest) {\r\n return [\r\n 200,\r\n {\r\n data: loginAsGuestResult,\r\n },\r\n ]\r\n }\r\n\r\n if (data.mode === LoginMode.User) {\r\n return [\r\n 200,\r\n {\r\n data: loginResult,\r\n } as Response,\r\n ]\r\n }\r\n\r\n return [500, { error: { errorCode: ErrorCode.OtherError } }]\r\n})\r\n\r\nmock.onPut('/Customer/Edit').reply((config: AxiosRequestConfig) => {\r\n if (config.headers['Authorization']) {\r\n return [200, {} as Response]\r\n }\r\n\r\n return [401, {} as Response]\r\n})\r\n\r\nmock.onPut('/Customer/ChangePassword').reply((config: AxiosRequestConfig) => {\r\n if (config.headers['Authorization']) {\r\n const data = JSON.parse(config.data)\r\n if (data.password === '111111' && data.newPassword === '222222') {\r\n return [\r\n 200,\r\n {\r\n errors: [\r\n {\r\n errorCode: ErrorCode.IncorrectUserOrPassword,\r\n },\r\n ],\r\n } as Response,\r\n ]\r\n }\r\n\r\n return [\r\n 200,\r\n {\r\n data: {\r\n tokens: {\r\n auth: 'AUTH_TOKEN_CHANGED_PASSWORD',\r\n refresh: 'REFRESH_TOKEN_CHANGED_PASSWORD',\r\n },\r\n role: UserRole.User,\r\n },\r\n } as Response,\r\n ]\r\n }\r\n\r\n return [401, {} as Response]\r\n})\r\n\r\nmock.onDelete('/Customer/Delete').reply((config: AxiosRequestConfig) => {\r\n if (config.headers['Authorization']) {\r\n if (config.params.password === 'invalid') {\r\n return [\r\n 400,\r\n {\r\n errors: [\r\n {\r\n errorCode: ErrorCode.IncorrectUserOrPassword,\r\n },\r\n ],\r\n } as Response,\r\n ]\r\n }\r\n\r\n if (config.params.password === 'failed') {\r\n return [\r\n 400,\r\n {\r\n errors: [\r\n {\r\n errorCode: ErrorCode.OtherError,\r\n },\r\n ],\r\n } as Response,\r\n ]\r\n }\r\n\r\n return [200, {} as Response]\r\n }\r\n\r\n return [401, {} as Response]\r\n})\r\n\r\nmock.onPost('/Customer/RemindPassword').reply(() => {\r\n return [200, {} as Response]\r\n})\r\n\r\nmock.onPost('/Customer/ResetPassword').reply((config: AxiosRequestConfig) => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n tokens: {\r\n auth: 'AUTH_TOKEN_RESET_PASSWORD',\r\n refresh: 'REFRESH_TOKEN_RESET_PASSWORD',\r\n expires: Date.now() + 60000,\r\n },\r\n role: UserRole.Guest,\r\n },\r\n errors: [],\r\n } as Response,\r\n ]\r\n})\r\n","import { ErrorCode, ErrorResponses } from 'typedef'\r\nimport T from 'utils/translations'\r\n\r\n// TODO:\r\nexport const defaultErrorData: ErrorResponses = {\r\n [ErrorCode.OtherError]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n code: ErrorCode.OtherError,\r\n },\r\n [ErrorCode.UnauthorizedAccess]: {\r\n title: T.OOPS,\r\n description: 'Unauthorized',\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectUserOrPassword]: {\r\n title: T.OOPS,\r\n description: T.WRONG_LOGIN_OR_PASSWORD,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CannotPerformActionAsGuest]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CannotPerformActionAsUser]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CustomerDoesntExist]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.AmbiguousLogin]: {\r\n title: T.OOPS,\r\n description: T.AMBIGUOUS_LOGIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.PasswordDoesNotMeetLengthRequirements]: {\r\n title: T.OOPS,\r\n description: T.MINIMUM_8_CHARACTERS_AT_LEAST_ONE_CAPITAL,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.PhoneNumberAndItsCountryCodeCannotBeEmpty]: {\r\n title: T.OOPS,\r\n description: T.PHONE_CANNOT_BE_EMPTY,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.NewPasswordHasToBeDifferent]: {\r\n title: T.INCORRECT_PASSWORD,\r\n description: T.OLD_PASSWORD_MUST_BE_DIFFERENT_THEN_THE_NEW_PASSWORD,\r\n variant: 'error',\r\n },\r\n [ErrorCode.IncorrectConfirmToken]: {\r\n title: T.OOPS,\r\n description: T.INCORRECT_CONFIRM_TOKEN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectPin]: {\r\n title: T.OOPS,\r\n description: T.INVALID_ACTIVATION_CODE,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.NoUserAssignedToGivenEMail]: {\r\n title: T.OOPS,\r\n description: T.NO_E_MAIL_ASSIGNED_TO_GIVEN_PHONE_NUMBER,\r\n variant: 'error',\r\n },\r\n [ErrorCode.NotEnoughParameters]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.ParkingLotNotFound]: {\r\n title: T.OOPS,\r\n description: T.NO_PARKING_FOUND,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.InvalidParkerUser]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.InvalidMonthlyParkingGroup]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectMode]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectParameterException]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CarNotFound]: {\r\n title: T.OOPS,\r\n description: T.NO_CARS_FOUND,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CreditCardNotFound]: {\r\n title: T.OOPS,\r\n description: T.NO_CREDIT_CARDS_FOUND,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.TicketNotFound]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectPassword]: {\r\n title: T.OOPS,\r\n description: T.INCORRECT_PASSWORD,\r\n variant: 'error',\r\n },\r\n [ErrorCode.ObjectExist]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.IncorrectValidationCouponCode]: {\r\n title: T.INVALID_CODE,\r\n description: T.PROVIDED_CODE_IS_INVALID,\r\n variant: 'error',\r\n },\r\n [ErrorCode.ConflictWithCurrentObjectState]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.MonthlyParkingIsDisabledForThisLocation]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.ParkCarUsingExitGate]: {\r\n title: T.ERROR,\r\n description: T.UNFORTUNATELY_WE_CANNOT_FIND_YOUR_TICKET,\r\n variant: 'error',\r\n },\r\n [ErrorCode.ParkCarWhileAnotherIsParked]: {\r\n title: T.ERROR,\r\n description: T.IT_SEEMS_THAT_YOUR_VEHICLE_IS_CURRENTLY_ALREADY_PARKED,\r\n variant: 'error',\r\n },\r\n [ErrorCode.ParkingIsClosed]: {\r\n title: T.OOPS,\r\n description: T.PARKING_IS_CLOSED,\r\n variant: 'error',\r\n },\r\n [ErrorCode.TriedToExitWithUnpaidTicket]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'error',\r\n },\r\n [ErrorCode.PaymentTimeExpired]: {\r\n title: T.TIMEOUT,\r\n description: T.YOUR_SESSION_HAS_EXPIRED_PLEASE_START_OVER,\r\n variant: 'error',\r\n },\r\n [ErrorCode.AreaNoIntegrationEnabled]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'error',\r\n },\r\n [ErrorCode.AutoClearTimeExeeded]: {\r\n title: T.OOPS,\r\n description: T.RATE_HAS_EXPIRED_PLEASE_SELECT_YOUR_TIME_AGAIN,\r\n variant: 'error',\r\n },\r\n [ErrorCode.NotImplementedException]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.InconsistentData]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.FailedSaveCar]: {\r\n title: T.OOPS,\r\n description: T.YOUR_CAR_CANNOT_BE_ADDED,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.FailedSaveCarPayment]: {\r\n title: T.TRANSACTION_DECLINED,\r\n description: T.YOUR_TRANSACTION_HAS_BEEN_REJECTED,\r\n variant: 'error',\r\n },\r\n [ErrorCode.FailedParkCar]: {\r\n title: T.OOPS,\r\n description: T.FAILED_PARK_CAR,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.FailedDeleteCreditCard]: {\r\n title: T.OOPS,\r\n description: T.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.FailedBuyMoreTime]: {\r\n title: T.OOPS,\r\n description: T.FAILED_PARK_CAR,\r\n variant: 'warning',\r\n },\r\n [ErrorCode.CurrentPricingIsExpired]: {\r\n variant: 'error',\r\n description: T.RATE_HAS_EXPIRED_PLEASE_SELECT_YOUR_TIME_AGAIN,\r\n title: T.RATE_HAS_EXPIRED,\r\n },\r\n [ErrorCode.HasParkedCars]: {\r\n variant: 'error',\r\n description: T.HAS_PARKED_CARS,\r\n title: T.OOPS,\r\n },\r\n [ErrorCode.ParkingIsUnavailable]: {\r\n variant: 'error',\r\n description: T.PARKING_IS_UNAVAILABLE,\r\n title: T.OOPS,\r\n },\r\n [ErrorCode.TokenExpired]: {\r\n variant: 'warning',\r\n description: T.TOKEN_EXPIRED,\r\n title: T.OOPS,\r\n },\r\n [ErrorCode.UserIsNotHuman]: {\r\n variant: 'error',\r\n description: T.USER_IS_NOT_HUMAN,\r\n title: 'error',\r\n },\r\n}\r\n","import i18n from 'i18n'\r\nimport { ErrorCode, FetchStatus, Response, ErrorData } from 'typedef'\r\nimport { defaultErrorData } from './apiErrors/DefaultApiError'\r\n\r\nexport const isErrorCode = (value: any): boolean => value in ErrorCode\r\n\r\nexport const getErrorCode = (err: any): ErrorCode => {\r\n return err?.response?.data?.errors\r\n ? (err?.response?.data as Response)?.errors[0]?.errorCode\r\n : ErrorCode.OtherError\r\n}\r\nexport function hasErrorCode(toBeDetermined: any): toBeDetermined is ErrorCode {\r\n if (toBeDetermined in ErrorCode) {\r\n return true\r\n }\r\n return false\r\n}\r\n\r\ntype ErrorMessage = (\r\n defaultErrorData: any,\r\n e?: any,\r\n errorData?: any\r\n) => ErrorData\r\n\r\nexport const errorMessage: ErrorMessage = (\r\n defaultErrorData,\r\n errorCode,\r\n errorData\r\n) => {\r\n let combinedErrorData = defaultErrorData\r\n if (errorData) {\r\n combinedErrorData = { ...defaultErrorData, ...errorData }\r\n }\r\n if (!Number.isInteger(errorCode)) {\r\n return combinedErrorData[ErrorCode.OtherError]\r\n }\r\n let error = combinedErrorData[errorCode]\r\n if (!error) {\r\n error = {}\r\n }\r\n error.code = errorCode\r\n error.title = combinedErrorData[errorCode].title\r\n error.description = combinedErrorData[errorCode].description\r\n error.variant = combinedErrorData[errorCode].variant\r\n if (!error?.variant) {\r\n error.variant = defaultErrorData[errorCode].variant\r\n }\r\n if (!error?.title) {\r\n error.title = defaultErrorData[errorCode].title\r\n }\r\n if (!error?.description) {\r\n error.description = defaultErrorData[errorCode].description\r\n }\r\n\r\n return error\r\n}\r\n\r\ntype GetErrorMessage = (\r\n errorCode?: number,\r\n errorData?: Partial>>\r\n) => ErrorData\r\nexport const getErrorMessage: GetErrorMessage = (errorCode, errorData) => {\r\n const error = errorMessage(defaultErrorData, errorCode, errorData)\r\n return {\r\n ...error,\r\n title: i18n.t(error.title),\r\n description: i18n.t(error.description),\r\n }\r\n}\r\n\r\n/**\r\n * @deprecated\r\n */\r\nexport const fetchStatusIs = (status: FetchStatus) => ({\r\n idle: status === FetchStatus.Idle,\r\n pending: status === FetchStatus.Pending,\r\n fulfilled: status === FetchStatus.Fulfilled,\r\n rejected: status === FetchStatus.Rejected,\r\n})\r\n\r\n/**\r\n * @deprecated, moved to slice utils\r\n */\r\nexport const getPromiseStatus = (statuses: FetchStatus[]) => ({\r\n idle: statuses.includes(FetchStatus.Idle),\r\n pending: statuses.includes(FetchStatus.Pending),\r\n pendingIdle:\r\n statuses.filter(el => el === FetchStatus.Pending || el === FetchStatus.Idle)\r\n .length === 2,\r\n pendingFulfilled:\r\n statuses.filter(\r\n el => el === FetchStatus.Pending || el === FetchStatus.Fulfilled\r\n ).length === 2,\r\n pendingRejected:\r\n statuses.filter(\r\n el => el === FetchStatus.Pending || el === FetchStatus.Rejected\r\n ).length === 2,\r\n fulfilled: statuses.includes(FetchStatus.Fulfilled),\r\n rejected: statuses.includes(FetchStatus.Rejected),\r\n})\r\n","import { GetPriceData } from 'typedef/price'\r\nimport moment from 'moment'\r\n\r\nexport const carParkPrices: GetPriceData[] = [\r\n {\r\n amount: 1111,\r\n totalAmount: 1111,\r\n convenienceFee: 50,\r\n parkingExpireDateTime: moment().add(25, 'm').toISOString(),\r\n validations: [],\r\n },\r\n {\r\n amount: 2233,\r\n totalAmount: 2233,\r\n convenienceFee: 20,\r\n parkingExpireDateTime: moment().add(40, 'm').toISOString(),\r\n convenienceFeeName: 'Test convenience fee name',\r\n validations: [],\r\n },\r\n {\r\n amount: 3233,\r\n totalAmount: 3233,\r\n convenienceFee: 213,\r\n parkingExpireDateTime: moment().add(55, 'm').toISOString(),\r\n convenienceFeeName: 'Test3 convenience fee name',\r\n validations: [],\r\n },\r\n]\r\n","import { PRICE, PRICE_EXTERNAL_PRICING } from 'api/constants'\r\nimport { ExternalPricingData, GetPriceData } from 'typedef/price'\r\nimport { carParkPrices } from '__fixtures__/prices'\r\nimport mock from '.'\r\nimport moment from 'moment'\r\nimport { generateExternalPricings } from './mocks.utils'\r\nmock.onGet(PRICE).replyOnce(config => {\r\n return [\r\n 200,\r\n {\r\n data: carParkPrices[0] as GetPriceData,\r\n },\r\n ]\r\n})\r\n\r\nmock.onGet(PRICE).replyOnce(config => {\r\n return [\r\n 200,\r\n {\r\n data: carParkPrices[1] as GetPriceData,\r\n },\r\n ]\r\n})\r\n\r\nmock.onGet(PRICE).replyOnce(config => {\r\n return [\r\n 200,\r\n {\r\n data: carParkPrices[2] as GetPriceData,\r\n },\r\n ]\r\n})\r\nconst pricings = generateExternalPricings(23)\r\nmock.onGet(PRICE_EXTERNAL_PRICING).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n currentDateUtc: moment().utc().toString(),\r\n pricingExpirationDateUtc: moment().add(5, 'minute').utc().toString(),\r\n pricings,\r\n } as ExternalPricingData,\r\n },\r\n ]\r\n})\r\n// mock.onGet(PRICE).networkErrorOnce()\r\n","import { ExternalPricingOption } from 'typedef'\r\nimport moment from 'moment'\r\nexport const generateExternalPricings = (amount = 4) => {\r\n const arr: ExternalPricingOption[] = Array.from(Array(amount)).map(\r\n (el, i) => ({\r\n amount: 200 + i,\r\n externalPricingId: `id-${i}`,\r\n parkingExpireDateTime: moment()\r\n .add(i, 'hour')\r\n .add(20, 'minute')\r\n .toString(),\r\n fees: [\r\n { amount: 100 + i, label: 'first fee' },\r\n {\r\n amount: 200 + i,\r\n label: 'Second fee',\r\n },\r\n ],\r\n })\r\n )\r\n return arr\r\n}\r\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nimport axios, { mockedAxios } from '.'\r\nimport { Response } from '../typedef/api'\r\nimport {\r\n ExternalPricingData,\r\n GetExternalPricingPayload,\r\n GetPriceData,\r\n GetPricePayload,\r\n} from '../typedef/price'\r\nimport { PRICE, PRICE_EXTERNAL_PRICING } from './constants'\r\nimport './mocks/PriceApiMock'\r\n\r\nexport const getPrice = async (params: GetPricePayload) => {\r\n try {\r\n const response = await axios.get>(PRICE, {\r\n params,\r\n })\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\nexport const getExternalPricing = async (params: GetExternalPricingPayload) => {\r\n try {\r\n const response = await axios.get>(\r\n PRICE_EXTERNAL_PRICING,\r\n {\r\n params,\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import { nanoid } from '@reduxjs/toolkit'\r\nimport { Receipt } from 'typedef/receipt'\r\n\r\nexport const receipts: Receipt[] = [\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 100,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 102,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 120,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1000,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1003,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1030,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1033,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1300,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 132103,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 1330,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n cardUsed: false,\r\n locationName: 'Area st 11',\r\n carId: nanoid(),\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n {\r\n amount: {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n totalAmount: 2000,\r\n convenienceFee: 50,\r\n },\r\n areaAddress: 'area address',\r\n locationName: 'Area st 12',\r\n cardUsed: false,\r\n carId: 'carId2',\r\n dateInUTC: new Date().toUTCString(),\r\n externalServiceDeliversReceipts: false,\r\n },\r\n]\r\n","import {\r\n GetReceiptsData,\r\n SendQuestionData,\r\n SendReceiptsData,\r\n} from 'typedef/receipt'\r\nimport { receipts } from '__fixtures__/myReceipts'\r\nimport mock from '.'\r\nimport { Response } from '../../typedef/api'\r\n// Get Cars\r\n// mock.onGet('/Receipt').networkError()\r\n\r\nmock.onGet('/Receipt').reply(config => {\r\n return [\r\n 400,\r\n {\r\n data: { receipts } as GetReceiptsData,\r\n },\r\n ]\r\n})\r\n\r\nmock.onPost('/Receipt').reply(config => {\r\n return [\r\n 400,\r\n {\r\n data: true as SendReceiptsData,\r\n },\r\n ]\r\n})\r\n\r\nmock.onPost('/Question').reply(config => {\r\n return [\r\n 400,\r\n {\r\n data: true,\r\n } as Response,\r\n ]\r\n})\r\n","import { Response } from 'typedef/api'\r\nimport {\r\n AddContactInformationsData,\r\n AddContactInformationsPayload,\r\n GetContactInformationsData,\r\n GetReceiptsData,\r\n SendQuestionPayload,\r\n SendReceiptsData,\r\n SendReceiptsPayload,\r\n SendVerificationSMSData,\r\n SendVerificationSMSPayload,\r\n} from 'typedef/receipt'\r\nimport axios from '.'\r\nimport {\r\n CUSTOMER_ADD_GUEST_NOTIFICATION,\r\n CUSTOMER_GET_GUEST_NOTIFICATION,\r\n RECEIPT,\r\n RECEIPT_QUESTION,\r\n SMS_RESEND_VERIFICATION_SMS,\r\n SMS_SEND_VERIFICATION_SMS,\r\n} from './constants'\r\nimport './mocks/ReceipstApiMock'\r\n\r\nexport const getReceipts = async () => {\r\n try {\r\n const { data } = await axios.get>(RECEIPT)\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const sendReceipt = async (params: SendReceiptsPayload) => {\r\n try {\r\n const { data } = await axios.post>(\r\n RECEIPT,\r\n params\r\n )\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const sendQuestion = async (params: SendQuestionPayload) => {\r\n try {\r\n const { data } = await axios.post>(RECEIPT_QUESTION, params)\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const addContactInformations = async (\r\n params: AddContactInformationsPayload\r\n) => {\r\n try {\r\n const response = await axios.put>(\r\n CUSTOMER_ADD_GUEST_NOTIFICATION,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const sendVerificationSMS = async (\r\n params: SendVerificationSMSPayload\r\n) => {\r\n try {\r\n const response = await axios.post>(\r\n SMS_SEND_VERIFICATION_SMS,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const resendVerificationSMS = async (\r\n params: SendVerificationSMSData\r\n) => {\r\n try {\r\n const response = await axios.post>(\r\n SMS_RESEND_VERIFICATION_SMS,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getContactInformations = async () => {\r\n try {\r\n const response = await axios.get>(\r\n CUSTOMER_GET_GUEST_NOTIFICATION\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import { TERMS_AND_CONDITIONS } from 'api/constants'\r\nimport i18n from 'i18n'\r\nimport { GetTermsAndConditionsResult } from 'typedef/terms'\r\nimport T from 'utils/translations'\r\nimport mock from '.'\r\n\r\nmock.onGet(TERMS_AND_CONDITIONS).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n text: i18n.t(T.TERMS_AND_CONDITIONS_CONTENT),\r\n } as GetTermsAndConditionsResult,\r\n },\r\n ]\r\n})\r\n// mock.onGet('/Tickets').networkErrorOnce()\r\n","import {\r\n AcceptToSParams,\r\n GetTermsAndConditionsParams,\r\n GetTermsAndConditionsResult,\r\n GetTermsOfServiceContentParams,\r\n ShowForCustomerParams,\r\n ShowForCustomerResult,\r\n} from 'typedef/terms'\r\nimport axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport {\r\n ACCEPT_TOS,\r\n SHOW_FOR_CUSTOMER,\r\n TERMS_AND_CONDITIONS,\r\n} from './constants'\r\nimport './mocks/TermsAndConditionsApiMock'\r\n\r\nexport const getTerms = async (params: GetTermsAndConditionsParams) => {\r\n try {\r\n const response = await axios.get>(\r\n TERMS_AND_CONDITIONS,\r\n { params }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const showForCustomer = async (params: ShowForCustomerParams) => {\r\n try {\r\n const response = await axios.get>(\r\n SHOW_FOR_CUSTOMER,\r\n { params }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const accept = async (params: AcceptToSParams) => {\r\n try {\r\n const response = await axios.post>(ACCEPT_TOS, params)\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getTermsOfServiceContent = async (\r\n params: GetTermsOfServiceContentParams\r\n) => {\r\n try {\r\n const response = await axios.get>(\r\n `${TERMS_AND_CONDITIONS}/${params.id}?language=${params.language}`\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import {\r\n PARK_CAR,\r\n PARK_CAR_PAY,\r\n PARK_CAR_REDIRECT,\r\n PARK_CAR_TRANSACTION_STATUS,\r\n} from 'api/constants'\r\nimport moment from 'moment'\r\nimport {\r\n CardType,\r\n CarStatus,\r\n ErrorCode,\r\n GetTicketData,\r\n GetTicketsData,\r\n ParkCarData,\r\n ParkCarRedirectData,\r\n ParkCarTransactionStatusData,\r\n ParkerType,\r\n PayForCarData,\r\n Ticket,\r\n TransactionStatus,\r\n Response,\r\n} from 'typedef'\r\nimport { parkLot } from '__fixtures__'\r\nimport mock from '.'\r\n\r\nexport const grticket: Ticket = {\r\n carId: '123456',\r\n customStyles: [],\r\n carStatus: CarStatus.RequiresPayment,\r\n parkingBeginDateTime: '2020-09-29T10:00:45',\r\n parkingExpireDateTime: '2020-09-29T11:15:45',\r\n currentDateTime: '2020-09-29T11:00:45',\r\n externalServiceDeliversReceipts: false,\r\n settlement: {\r\n finalAmount: 150,\r\n creditCardInfo: {\r\n cardType: CardType.JCB,\r\n last4Digits: '1234',\r\n creditCardId: 'creditCardId',\r\n },\r\n currency: {\r\n currencySymbol: '$',\r\n currencyFormat: 0,\r\n cultureName: 'en_US',\r\n },\r\n parkingAmount: 100,\r\n convenienceFee: 50,\r\n convenienceFeeName: '',\r\n paymentOperationList: [\r\n {\r\n amount: 100,\r\n name: '',\r\n type: 1,\r\n dateAtLocal: moment().toString(),\r\n dateAtUTC: '2020-09-29T15:40:45',\r\n },\r\n ],\r\n },\r\n parkerType: 1,\r\n advertisementUrl: '',\r\n plate: 'DASDA',\r\n spot: '1232',\r\n lot: {\r\n customStyles: [],\r\n lotType: 1,\r\n lotId: '145471',\r\n lotName: 'LOT 51 - Demo',\r\n locationId: 113041,\r\n locationName: 'PCA - Demo',\r\n logoLink: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/31745640',\r\n geolocation: {\r\n latitude: 33.1139571,\r\n longitude: -96.8024388,\r\n },\r\n },\r\n validateEnable: true,\r\n addTimeEnable: false,\r\n}\r\n\r\nmock.onGet('/Tickets').reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n tickets: [\r\n {\r\n ...grticket,\r\n carStatus: CarStatus.RequiresPayment,\r\n parkingExpireDateTime: '',\r\n },\r\n ],\r\n } as GetTicketsData,\r\n errors: [\r\n {\r\n errorCode: ErrorCode.ObjectExist,\r\n },\r\n ],\r\n },\r\n ]\r\n})\r\n\r\nmock\r\n .onGet(`/Tickets/${grticket.carId}`)\r\n .replyOnce(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n ...grticket,\r\n carStatus: CarStatus.RequiresPayment,\r\n parkingExpireDateTime: '',\r\n } as GetTicketData,\r\n },\r\n ]\r\n })\r\n .onGet(`/Tickets/${grticket.carId}`)\r\n .replyOnce(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n ...grticket,\r\n carStatus: CarStatus.ParkingHasExpired,\r\n } as GetTicketData,\r\n },\r\n ]\r\n })\r\n// mock.onGet('/Tickets').networkErrorOnce()\r\n\r\nmock.onPost(PARK_CAR).reply(config => {\r\n return [\r\n 400,\r\n {\r\n errors: [\r\n {\r\n errorCode: ErrorCode.CurrentPricingIsExpired,\r\n message: 'Current pricing is expired',\r\n },\r\n ],\r\n } as Response,\r\n // 200,\r\n // {\r\n // data: {\r\n // carId: 'test car id',\r\n // carStatus: 1,\r\n // } as ParkCarData,\r\n // },\r\n ]\r\n})\r\nmock.onPost(PARK_CAR_PAY).reply(config => {\r\n return [\r\n 400,\r\n {\r\n data: {\r\n success: true,\r\n } as PayForCarData,\r\n },\r\n ]\r\n})\r\nmock.onGet(PARK_CAR_REDIRECT).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n token: 'redirect-token',\r\n } as ParkCarRedirectData,\r\n },\r\n ]\r\n})\r\nmock.onGet(PARK_CAR_TRANSACTION_STATUS).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: {\r\n transactionStatus: TransactionStatus.Failed,\r\n } as ParkCarTransactionStatusData,\r\n },\r\n ]\r\n})\r\n\r\nmock\r\n .onGet(\r\n 'https://portal-test.targetadnetwork.com/api/ads/location?uid=564850455&slot=21'\r\n )\r\n .reply(config => {\r\n return [\r\n 200,\r\n `\r\n \r\n\r\n

\r\n
\r\n`,\r\n ,\r\n ]\r\n })\r\nmock.onGet('https://test.pl').reply(config => {\r\n return [\r\n 200,\r\n\r\n `\r\n \r\n\r\n

\r\n
\r\n\r\n `,\r\n ,\r\n ]\r\n})\r\n","import {\r\n PARK_CAR,\r\n PARK_CAR_PAY,\r\n TICKETS,\r\n PARK_CAR_REDIRECT,\r\n PARK_CAR_TRANSACTION_STATUS,\r\n} from 'api/constants'\r\nimport {\r\n BuyMoreTimeData,\r\n BuyMoreTimePayload,\r\n GetTicketData,\r\n GetTicketPayload,\r\n GetTicketsData,\r\n ParkCarData,\r\n ParkCarPayload,\r\n ParkCarRedirectData,\r\n ParkCarRedirectPayload,\r\n ParkCarTransactionStatusData,\r\n ParkCarTransactionStatusPayload,\r\n PayForCarData,\r\n PayForCarPayload,\r\n Response,\r\n} from 'typedef'\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nimport axios, { mockedAxios } from '.'\r\nimport './mocks/TicketsApiMock'\r\n\r\nexport const getTicket = async (args: GetTicketPayload) => {\r\n return axios\r\n .get>(`${TICKETS}/${args.carId}`)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n}\r\nexport const getTickets = async () =>\r\n axios\r\n .get>(TICKETS)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n\r\nexport const parkCar = async (params: ParkCarPayload) =>\r\n axios\r\n .post>(PARK_CAR, params)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n\r\nexport const buyMoreTime = async (params: BuyMoreTimePayload) =>\r\n axios\r\n .put>(PARK_CAR, params)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n\r\nexport const payForCar = async (params: PayForCarPayload) =>\r\n axios\r\n .post>(PARK_CAR_PAY, params)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n\r\nexport const parkCarRedirect = async (params: ParkCarRedirectPayload) =>\r\n axios\r\n .post>(PARK_CAR_REDIRECT, params )\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n\r\nexport const parkCarTransactionStatus = async (\r\n params: ParkCarTransactionStatusPayload\r\n) =>\r\n axios\r\n .get>(PARK_CAR_TRANSACTION_STATUS, {\r\n params,\r\n })\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n","import { Partner } from 'typedef/validator'\r\n\r\nexport const partners: Partner[] = [\r\n {\r\n couponId: 12312,\r\n name: 'Auchan',\r\n partnerId: 1237,\r\n logoDir: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/23523040',\r\n isAddFieldEnable: false,\r\n addFields: [],\r\n qrCodeEnable: true,\r\n },\r\n {\r\n couponId: 123123,\r\n name: 'Pull&Bear',\r\n partnerId: 1235,\r\n logoDir: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/23523040',\r\n isAddFieldEnable: false,\r\n qrCodeEnable: false,\r\n addFields: [],\r\n },\r\n {\r\n couponId: 1234,\r\n name: 'Burger King',\r\n partnerId: 1234,\r\n logoDir: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/156394860',\r\n isAddFieldEnable: false,\r\n qrCodeEnable: false,\r\n addFields: [],\r\n },\r\n]\r\n","import mock from '.'\r\nimport { Response } from 'typedef/api'\r\nimport { GetValidatorsData, ValidateCodeData } from 'typedef/validator'\r\nimport { partners } from '__fixtures__/validators'\r\nimport { COUPON } from 'api/constants'\r\n\r\n// mock.onGet(COUPON).networkError()\r\nmock.onGet(COUPON).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: { partners },\r\n } as Response,\r\n ]\r\n})\r\n\r\n// mock.onPost(COUPON).networkError()\r\nmock.onPost(COUPON).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: true,\r\n } as Response,\r\n ]\r\n})\r\n","import {\r\n GetValidatorsData,\r\n GetValidatorsParams,\r\n ValidateCodeParams,\r\n ValidateCodeUpfrontParams,\r\n} from 'typedef/validator'\r\nimport axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport { COUPON, UPFRONT_COUPON } from './constants'\r\nimport './mocks/ValidatorsApiMock'\r\n\r\nexport const getValidators = async (params: GetValidatorsParams) => {\r\n try {\r\n const result = await axios.get>(COUPON, {\r\n params,\r\n })\r\n return result.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const validateCode = async (params: ValidateCodeParams) => {\r\n try {\r\n const { data } = await axios.post>(COUPON, params)\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const validateCodeUpfront = async (\r\n params: ValidateCodeUpfrontParams\r\n) => {\r\n try {\r\n const { data } = await axios.post>(UPFRONT_COUPON, params)\r\n return data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import {\r\n GetCompanyContactInfoParams,\r\n GetCompanyContactInfoResult,\r\n} from 'typedef/companyDetails'\r\nimport axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport { LOTS_COMPANY_CONTACT_INFO } from './constants'\r\n\r\nexport const getCompanyContactInfo = async (\r\n params: GetCompanyContactInfoParams\r\n) => {\r\n try {\r\n const response = await axios.get>(\r\n LOTS_COMPANY_CONTACT_INFO,\r\n {\r\n params,\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import {\r\n GetLotDetailsMapData,\r\n GetLotDetailsParkData,\r\n GetLotsData,\r\n Lot,\r\n} from 'typedef/lot'\r\nexport const lots: Lot[] = [\r\n {\r\n customStyles: [],\r\n lotType: 1,\r\n lotId: '131361',\r\n lotName: 'A_Końcowa',\r\n locationName: 'L_Zawady',\r\n locationId: 3123,\r\n geolocation: {\r\n latitude: 53.1666491,\r\n longitude: 23.1170682,\r\n },\r\n },\r\n]\r\n\r\nexport const getLots: GetLotsData = {\r\n lots: [\r\n {\r\n customStyles: [],\r\n locationId: 3123,\r\n lotType: 1,\r\n lotId: '145471',\r\n lotName: 'LOT 51 - Demo',\r\n locationName: 'PCA - Demo',\r\n geolocation: {\r\n latitude: 33.1139571,\r\n longitude: -96.8024388,\r\n },\r\n pCode: 'PCA123',\r\n },\r\n {\r\n customStyles: [],\r\n locationId: 323,\r\n lotType: 1,\r\n lotId: '271011',\r\n lotName: 'Garage',\r\n locationName: \"Moose's Garage\",\r\n geolocation: {\r\n latitude: 33.0849878,\r\n longitude: -96.8033517,\r\n },\r\n pCode: 'M3RHVZ',\r\n },\r\n ],\r\n newTokens: {\r\n role: 1,\r\n tokens: {\r\n auth: 'new auth',\r\n expires: Date.now() + 120000,\r\n refresh: 'new refresh',\r\n },\r\n },\r\n}\r\nexport const mapLot: GetLotDetailsMapData = {\r\n ...lots[0],\r\n logoLink: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/156394860',\r\n address: {\r\n fullAddress: 'Końcowa 2{NL}Białystok {NL}15-697{NL}Poland',\r\n street: 'Końcowa 2',\r\n country: 'Poland',\r\n postalCode: '15-697',\r\n city: 'Białystok',\r\n state: '',\r\n },\r\n currentDateTimeLocal: 'date',\r\n pCode: 'true',\r\n geolocation: {\r\n latitude: 53.1666491,\r\n longitude: 23.1170682,\r\n },\r\n isLocationStopped: false,\r\n locationStoppedMessage: '',\r\n lotCapacity: {\r\n capacityFullSMSMessage: 'test SMS message',\r\n capacityFullWEBMessage: 'test WEB message',\r\n lotIsFull: false,\r\n },\r\n openingHours: [\r\n {\r\n dayOfWeek: 0,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 1,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 2,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 3,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 4,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 5,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n {\r\n dayOfWeek: 6,\r\n openingHoursInDay: [\r\n {\r\n startTime: '00:00:00',\r\n endTime: '23:59:59',\r\n },\r\n ],\r\n },\r\n ],\r\n}\r\n\r\nexport const lotMIX: GetLotDetailsParkData = {\r\n parkerId: '40e748fd-400d-46ef-98b9-08d83fb8f424',\r\n lotType: 1,\r\n lotId: '131361',\r\n locationId: 12312,\r\n externalPricingType: 0,\r\n customStyles: [],\r\n isExternalPricingEnabled: false,\r\n lotName: 'A_Końcowa',\r\n locationName: 'L_Zawady',\r\n logoLink: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/156394860',\r\n monthlyEnable: true,\r\n currentDateTimeLocal: '2020-08-13T23:59:00',\r\n isLocationStopped: false,\r\n isUpfrontCouponAvailable: false,\r\n locationStoppedMessage: '',\r\n lotCapacity: {\r\n capacityFullSMSMessage: 'test SMS message',\r\n capacityFullWEBMessage: 'test WEB message',\r\n lotIsFull: false,\r\n },\r\n currency: {\r\n cultureName: null,\r\n currencyFormat: 1,\r\n currencySymbol: '$',\r\n },\r\n spot: {\r\n isEnabled: true,\r\n minSpotNumber: 1,\r\n maxSpotNumber: 1000,\r\n },\r\n timeSelectOption: [\r\n {\r\n pricingType: 1,\r\n optionType: 0,\r\n showAllDayUntil: true,\r\n allDayUntilMessage: '',\r\n endDateTime: '2020-08-13T23:59:00',\r\n optionLabel: null,\r\n amount: null,\r\n convenienceFee: null,\r\n optionId: null,\r\n intervalOptions: {\r\n showDaySelect: false,\r\n showHourSelect: true,\r\n showMinuteSelect: true,\r\n maxDays: 14,\r\n maxHours: 48,\r\n maxMinutes: 59,\r\n dayInterval: 1,\r\n hourInterval: 1,\r\n minuteInterval: 3,\r\n },\r\n },\r\n ],\r\n}\r\nexport const parkLot: GetLotDetailsParkData = {\r\n ...lots[0],\r\n newTokens: {\r\n tokens: {\r\n auth: 'auth token',\r\n refresh: 'refresh token',\r\n expires: Date.now() + 120000,\r\n },\r\n role: 2,\r\n },\r\n parkerId: '5479dcb8-7681-4352-29d9-08d83ef0fb95',\r\n carId: '123456',\r\n logoLink: 'https://test1apismsvalet.t2p.mobi/api/v1/File/GetFile/156394860',\r\n currentDateTimeLocal: '2020-08-13T23:59:00',\r\n monthlyEnable: true,\r\n externalPricingType: 0,\r\n isExternalPricingEnabled: false,\r\n isUpfrontCouponAvailable: false,\r\n isLocationStopped: false,\r\n locationStoppedMessage: '',\r\n lotCapacity: {\r\n capacityFullSMSMessage: 'test SMS message',\r\n capacityFullWEBMessage: 'test WEB message',\r\n lotIsFull: false,\r\n },\r\n currency: {\r\n cultureName: null,\r\n currencyFormat: 1,\r\n currencySymbol: '$',\r\n },\r\n spot: {\r\n isEnabled: true,\r\n minSpotNumber: 1,\r\n maxSpotNumber: 1000,\r\n },\r\n timeSelectOption: [\r\n //MULTI\r\n {\r\n pricingType: 3,\r\n optionType: 4,\r\n showAllDayUntil: false,\r\n allDayUntilMessage: null,\r\n endDateTime: null,\r\n optionLabel: 'Parking until 03/19/2020 / 12:00 AM',\r\n amount: 200,\r\n convenienceFee: 5,\r\n optionId: '915f9f00-4edd-ea11-8b03-000d3a12cd78',\r\n intervalOptions: null,\r\n },\r\n {\r\n pricingType: 3,\r\n optionType: 4,\r\n showAllDayUntil: false,\r\n allDayUntilMessage: null,\r\n endDateTime: null,\r\n optionLabel: 'Parking: # 3',\r\n amount: 3,\r\n convenienceFee: 5,\r\n optionId: '11c9bdfb-8edd-ea11-8b03-000d3a12cd78',\r\n intervalOptions: null,\r\n },\r\n {\r\n pricingType: 3,\r\n optionType: 3,\r\n showAllDayUntil: false,\r\n allDayUntilMessage: null,\r\n endDateTime: null,\r\n optionLabel: 'Select your parking time',\r\n amount: null,\r\n convenienceFee: null,\r\n optionId: 'c59022a8-2068-ea11-a94c-000d3a705ce6',\r\n intervalOptions: {\r\n showDaySelect: true,\r\n showHourSelect: true,\r\n showMinuteSelect: true,\r\n maxDays: 14,\r\n maxHours: 23,\r\n maxMinutes: 59,\r\n dayInterval: 1,\r\n hourInterval: 1,\r\n minuteInterval: 3,\r\n },\r\n },\r\n {\r\n pricingType: 3,\r\n optionType: 4,\r\n showAllDayUntil: false,\r\n allDayUntilMessage: null,\r\n endDateTime: '2020-08-14T00:00:00',\r\n optionLabel: 'until 08/14 12:00 AM',\r\n amount: 400,\r\n convenienceFee: 5,\r\n optionId: '14836f1b-4edd-ea11-8b03-000d3a12cd78',\r\n intervalOptions: null,\r\n },\r\n ],\r\n}\r\n","import { LOTS, LOTS_DETAILS_PARK } from 'api/constants'\r\nimport { GetLotDetailsParkData, GetLotsData } from 'typedef/lot'\r\nimport { parkLot, getLots } from '__fixtures__/lots'\r\nimport mock from '.'\r\n\r\nmock.onGet(LOTS).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: getLots as GetLotsData,\r\n },\r\n ]\r\n})\r\nmock.onGet(LOTS_DETAILS_PARK).reply(config => {\r\n return [\r\n 200,\r\n {\r\n data: { ...parkLot, carId: null } as GetLotDetailsParkData,\r\n },\r\n ]\r\n})\r\n// mock.onGet(LOTS_DETAILS_PARK).networkErrorOnce()\r\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nimport axios, { mockedAxios } from '.'\r\nimport { Response } from '../typedef/api'\r\nimport {\r\n GetLotDetailsMapData,\r\n GetLotDetailsMapPayload,\r\n GetLotDetailsParkData,\r\n GetLotDetailsParkPayload,\r\n GetLotsData,\r\n GetLotsPayload,\r\n GetSimulatedPricesRequest,\r\n GetSimulatedPricesResponse,\r\n} from 'typedef'\r\nimport {\r\n LOTS,\r\n LOTS_DETAILS_MAP,\r\n LOTS_DETAILS_PARK,\r\n LOTS_SIMULATED_PRICES,\r\n} from './constants'\r\nimport './mocks/LotsApiMock'\r\nimport './mocks/TicketsApiMock'\r\n\r\nexport const getLots = async (params: GetLotsPayload) => {\r\n try {\r\n const response = await axios.get>(LOTS, {\r\n params,\r\n })\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getLotDetailsMap = async (params: GetLotDetailsMapPayload) => {\r\n try {\r\n const response = await axios.get>(\r\n LOTS_DETAILS_MAP,\r\n {\r\n params,\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getLotDetailsPark = async (params: GetLotDetailsParkPayload) => {\r\n try {\r\n const response = await axios.get>(\r\n LOTS_DETAILS_PARK,\r\n {\r\n params,\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getSimulatedPrices = async (params: GetSimulatedPricesRequest) =>\r\n axios\r\n .post>(LOTS_SIMULATED_PRICES, params)\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\r\nimport { lotApiError, ticketsApiError } from 'api/apiErrors'\r\nimport * as lotApi from 'api/LotApi'\r\nimport * as priceApi from 'api/PriceApi'\r\nimport * as ticketsApi from 'api/TicketsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n BuyMoreTimeData,\r\n BuyMoreTimeExternalPayload,\r\n BuyMoreTimePayload,\r\n CreditCard,\r\n ErrorData,\r\n ExternalPricingData,\r\n FetchStatus,\r\n GetExternalPricingPayload,\r\n GetLotDetailsParkData,\r\n GetLotDetailsParkPayload,\r\n GetPriceData,\r\n GetPricePayload,\r\n ParkCarData,\r\n ParkCarPayload,\r\n ParkCarRedirectData,\r\n ParkCarRedirectPayload,\r\n ParkCarTransactionStatusData,\r\n ParkCarTransactionStatusPayload,\r\n} from 'typedef'\r\nimport { creditCardsSlice, customerSlice, sliceUtil, mapSlice } from '.'\r\nimport { FETCH, initialPromiseStatus, PARK_CAR } from './constants'\r\nimport { ParkCarState } from './parkCarSlice types'\r\n\r\n/**\r\n * state\r\n */\r\nconst initialPromiseStatuses: ParkCarState['promisesStatus'] = {\r\n getLotDetailsPark: initialPromiseStatus,\r\n getPrice: initialPromiseStatus,\r\n parkCar: initialPromiseStatus,\r\n buyMoreTime: initialPromiseStatus,\r\n parkCarRedirect: initialPromiseStatus,\r\n parkCarTransactionStatus: initialPromiseStatus,\r\n getExternalPricing: initialPromiseStatus,\r\n}\r\nconst initialState: ParkCarState = {\r\n lot: null,\r\n pricingPayload: null,\r\n pricing: null,\r\n ticketId: null,\r\n cardId: null,\r\n addTimeCard: null,\r\n hasCardBeenUsed: false,\r\n zipCode: null,\r\n promisesStatus: initialPromiseStatuses,\r\n parkingDetails: {\r\n fees: [],\r\n totalAmount: 0,\r\n },\r\n isPaymentRequired: false,\r\n providedPlate: null,\r\n providedSpotNumber: null,\r\n recaptchaToken: null,\r\n}\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const getLotDetailsPark = createAsyncThunk<\r\n GetLotDetailsParkData,\r\n GetLotDetailsParkPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/getLotDetailsPark`, async (params, thunkApi) => {\r\n try {\r\n const resp = await lotApi.getLotDetailsPark(params)\r\n if (resp.newTokens) {\r\n thunkApi.dispatch(customerSlice.actions.setLogin(resp.newTokens))\r\n }\r\n if (resp.corporationLotsToken) {\r\n thunkApi.dispatch(\r\n customerSlice.actions.setCorporationToken(resp.corporationLotsToken)\r\n )\r\n }\r\n thunkApi.dispatch(mapSlice.actions.addLot(resp))\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n lotApiError.getLotDetailsPark\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const getPrice = createAsyncThunk<\r\n GetPriceData & { time: number },\r\n GetPricePayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/getPrice`, async (params, thunkApi) => {\r\n try {\r\n const resp = await priceApi.getPrice(params)\r\n const time = Date.now()\r\n return { ...resp, time }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const getExternalPricing = createAsyncThunk<\r\n ExternalPricingData,\r\n GetExternalPricingPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/getExternalPricing`, async (params, thunkApi) => {\r\n try {\r\n const resp = await priceApi.getExternalPricing(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const parkCar = createAsyncThunk<\r\n ParkCarData,\r\n ParkCarPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/parkCar`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.parkCar(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.parkCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const buyMoreTime = createAsyncThunk<\r\n BuyMoreTimeData,\r\n BuyMoreTimePayload | BuyMoreTimeExternalPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}${FETCH}/buyMoreTime`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.buyMoreTime(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.buyMoreTime\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const parkCarRedirect = createAsyncThunk<\r\n ParkCarRedirectData,\r\n ParkCarRedirectPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/parkCarRedirect`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.parkCarRedirect(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.parkCarRedirect\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const parkCarTransactionStatus = createAsyncThunk<\r\n ParkCarTransactionStatusData,\r\n ParkCarTransactionStatusPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/parkCarTransactionStatus`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.parkCarTransactionStatus(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.parkCarTransactionStatus\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getSelectedTicket = createAsyncThunk<\r\n ParkCarData,\r\n ParkCarPayload,\r\n { rejectValue: ErrorData }\r\n>(`${PARK_CAR}/${FETCH}/getSelectedTicket`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.parkCar(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.parkCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\n/**\r\n * reducers\r\n */\r\nconst parkCarSlice = createSlice({\r\n name: 'parkCar',\r\n initialState,\r\n reducers: {\r\n setlot(state, { payload }: PayloadAction) {\r\n state.lot = payload\r\n },\r\n setPricing(state, { payload }: PayloadAction) {\r\n state.pricing = payload\r\n },\r\n setTicket(state, { payload }: PayloadAction<{ carId: string }>) {\r\n state.ticketId = payload.carId\r\n },\r\n setCard(state, { payload }: PayloadAction<{ id: string }>) {\r\n state.cardId = payload.id\r\n },\r\n setParkingDetails(\r\n state,\r\n { payload }: PayloadAction>\r\n ) {\r\n state.parkingDetails = payload\r\n },\r\n\r\n updateParkingDetails(\r\n state,\r\n { payload }: PayloadAction>\r\n ) {\r\n state.parkingDetails = {\r\n ...state.parkingDetails,\r\n ...payload,\r\n }\r\n },\r\n resetParkingDetails(state) {\r\n state.parkingDetails = { fees: [], totalAmount: 0 }\r\n },\r\n setAddTimeCard(state, { payload }: PayloadAction<{ card: CreditCard }>) {\r\n state.addTimeCard = payload.card\r\n },\r\n setZipCode(state, { payload }: PayloadAction) {\r\n state.zipCode = payload\r\n },\r\n setRecaptchaToken(state, { payload }: PayloadAction) {\r\n state.recaptchaToken = payload\r\n },\r\n setHasCardBeenUsed(state, { payload }: PayloadAction) {\r\n state.hasCardBeenUsed = payload\r\n },\r\n setIsPaymentRequired(state, { payload }: PayloadAction) {\r\n state.isPaymentRequired = payload\r\n },\r\n setProvidedPlate(\r\n state,\r\n { payload }: PayloadAction<{ providedPlate: string }>\r\n ) {\r\n state.providedPlate = payload.providedPlate\r\n },\r\n setProvidedSpotNumber(\r\n state,\r\n { payload }: PayloadAction<{ providedSpotNumber: string }>\r\n ) {\r\n state.providedSpotNumber = payload.providedSpotNumber\r\n },\r\n resetAddTimeCard(state) {\r\n state.addTimeCard = null\r\n },\r\n resetTicket(state) {\r\n state.ticketId = null\r\n },\r\n resetPricing(state) {\r\n state.pricing = {\r\n amount: null,\r\n convenienceFee: null,\r\n parkingExpireDateTime: null,\r\n convenienceFeeName: null,\r\n totalAmount: null,\r\n validations: [],\r\n }\r\n state.pricingPayload = null\r\n },\r\n resetPromiseStatus(\r\n state,\r\n { payload }: PayloadAction\r\n ) {\r\n state.promisesStatus[payload] = initialPromiseStatus\r\n },\r\n resetState(state) {\r\n state = initialState\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n /**\r\n * getLotDetailsPark\r\n */\r\n .addCase(getLotDetailsPark.fulfilled, (state, action) => {\r\n if (\r\n // eslint-disable-next-line\r\n state.promisesStatus.getLotDetailsPark.requestId !=\r\n action.meta.requestId\r\n )\r\n return\r\n parkCarSlice.caseReducers.setlot(state, action)\r\n state.promisesStatus.getLotDetailsPark = {\r\n ...sliceUtil.fulfilledPromise(),\r\n id: action.payload.lotId,\r\n }\r\n })\r\n .addCase(getLotDetailsPark.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getLotDetailsPark = {\r\n ...sliceUtil.pendingPromise(promisesStatus.getLotDetailsPark, action),\r\n id: action.meta.arg.lotId,\r\n }\r\n })\r\n .addCase(getLotDetailsPark.rejected, (state, action) => {\r\n if (\r\n // eslint-disable-next-line\r\n state.promisesStatus.getLotDetailsPark.requestId !=\r\n action.meta.requestId\r\n )\r\n return\r\n if (action.meta.aborted) {\r\n state.promisesStatus.getLotDetailsPark = initialPromiseStatus\r\n } else {\r\n state.promisesStatus.getLotDetailsPark = {\r\n ...sliceUtil.rejectedPromise(action.payload),\r\n id: action.meta.arg.lotId,\r\n }\r\n }\r\n })\r\n\r\n /**\r\n * getPrice\r\n */\r\n .addCase(getPrice.fulfilled, (state, action) => {\r\n parkCarSlice.caseReducers.setPricing(state, action)\r\n state.pricingPayload = { ...action.meta.arg, time: action.payload.time }\r\n state.promisesStatus.getPrice = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(getPrice.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getPrice = sliceUtil.pendingPromise(\r\n promisesStatus.getPrice,\r\n action\r\n )\r\n })\r\n .addCase(getPrice.rejected, (state, action) => {\r\n state.promisesStatus.getPrice = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * parkCar\r\n */\r\n .addCase(parkCar.fulfilled, (state, action) => {\r\n state.promisesStatus.parkCar = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(parkCar.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.parkCar = {\r\n ...initialPromiseStatus,\r\n status: promisesStatus.parkCar.status.concat(FetchStatus.Pending),\r\n }\r\n })\r\n .addCase(parkCar.rejected, (state, action) => {\r\n state.promisesStatus.parkCar = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n /**\r\n * getExternalPricing\r\n */\r\n .addCase(getExternalPricing.fulfilled, (state, action) => {\r\n state.promisesStatus.getExternalPricing = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(getExternalPricing.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getExternalPricing = {\r\n ...initialPromiseStatus,\r\n status: promisesStatus.getExternalPricing.status.concat(\r\n FetchStatus.Pending\r\n ),\r\n }\r\n })\r\n .addCase(getExternalPricing.rejected, (state, action) => {\r\n state.promisesStatus.getExternalPricing = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n\r\n /**\r\n * parkCarRedirect\r\n */\r\n .addCase(parkCarRedirect.fulfilled, (state, action) => {\r\n state.promisesStatus.parkCarRedirect = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(parkCarRedirect.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.parkCarRedirect = {\r\n ...initialPromiseStatus,\r\n status: promisesStatus.parkCarRedirect.status.concat(\r\n FetchStatus.Pending\r\n ),\r\n }\r\n })\r\n .addCase(parkCarRedirect.rejected, (state, action) => {\r\n state.promisesStatus.parkCarRedirect = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n\r\n /**\r\n * parkCarRedirect\r\n */\r\n .addCase(parkCarTransactionStatus.fulfilled, (state, action) => {\r\n state.promisesStatus.parkCarTransactionStatus = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(\r\n parkCarTransactionStatus.pending,\r\n ({ promisesStatus }, action) => {\r\n promisesStatus.parkCarTransactionStatus = {\r\n ...initialPromiseStatus,\r\n status: promisesStatus.parkCarTransactionStatus.status.concat(\r\n FetchStatus.Pending\r\n ),\r\n }\r\n }\r\n )\r\n .addCase(parkCarTransactionStatus.rejected, (state, action) => {\r\n state.promisesStatus.parkCarTransactionStatus = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n\r\n /**\r\n * buyMoreTime\r\n */\r\n .addCase(buyMoreTime.fulfilled, (state, action) => {\r\n state.promisesStatus.buyMoreTime = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(buyMoreTime.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.buyMoreTime = {\r\n ...initialPromiseStatus,\r\n status: promisesStatus.buyMoreTime.status.concat(FetchStatus.Pending),\r\n }\r\n })\r\n .addCase(buyMoreTime.rejected, (state, action) => {\r\n state.promisesStatus.buyMoreTime = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n },\r\n})\r\n\r\nexport default parkCarSlice.reducer\r\nexport const { actions } = parkCarSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const selectPromiseStatus = (state: RootState) =>\r\n state.parkCar.promisesStatus\r\nexport const stateSelectors = (state: RootState) => state.parkCar\r\nexport const selectPricing = (state: RootState) => state.parkCar.pricing\r\nexport const selectedTicket = (state: RootState) => {\r\n if (!state.parkCar.ticketId) return null\r\n return state.tickets.entities[state.parkCar.ticketId]\r\n}\r\n\r\nexport const selectCardId = (state: RootState) => {\r\n const id = state.parkCar.cardId\r\n if (!id) {\r\n return null\r\n }\r\n return creditCardsSlice.selectEntities(state)[id]\r\n}\r\nexport const promiseStatusSelectors = (state: RootState) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getLotDetailsParkStatus: sliceUtil.fetchStatus(promises.getLotDetailsPark),\r\n getPriceStatus: sliceUtil.fetchStatus(promises.getPrice),\r\n parkCarStatus: sliceUtil.fetchStatus(promises.parkCar),\r\n buyMoreTimeStatus: sliceUtil.fetchStatus(promises.buyMoreTime),\r\n parkCarRedirectStatus: sliceUtil.fetchStatus(promises.parkCarRedirect),\r\n getExternalPricingStatus: sliceUtil.fetchStatus(\r\n promises.getExternalPricing\r\n ),\r\n }\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport { LotApiError } from 'api/apiErrors/LotApiError'\r\nimport * as lotApi from 'api/LotApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { Bounds, Coords } from 'google-map-react'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { AppState } from 'store/store'\r\nimport {\r\n CarStatus,\r\n ErrorData,\r\n GetLotDetailsMapData,\r\n GetLotDetailsMapPayload,\r\n GetLotsData,\r\n GetLotsPayload,\r\n} from 'typedef'\r\nimport { customerSlice, sliceUtil, ticketsSlice } from '.'\r\nimport { FETCH, initialPromiseStatus, MAP } from './constants'\r\nimport { LotState, MapState, MyPosition } from './mapSlice.types'\r\n\r\n/**\r\n * state\r\n */\r\nconst initialPromiseStatuses = {\r\n getLots: initialPromiseStatus,\r\n getLotDetailsMap: initialPromiseStatus,\r\n}\r\n\r\nconst initialZoom = 14\r\n\r\nexport const initialMapPosition: Coords = {\r\n lat: 33.11395709999999,\r\n lng: -96.8024388,\r\n}\r\nexport const initialBounds = [\r\n -96.835397784375, 33.08066546844681, -96.769479815625, 33.14723611938656,\r\n]\r\n\r\nconst mapAdapter = createEntityAdapter({\r\n selectId: en => en.lotId,\r\n})\r\nconst initialState = mapAdapter.getInitialState({\r\n promisesStatus: initialPromiseStatuses,\r\n position: initialMapPosition,\r\n zoom: initialZoom,\r\n selectedLot: null,\r\n lotsToSelect: [],\r\n myPosition: null,\r\n findCarMode: false,\r\n cachedMapPosition: {\r\n position: null,\r\n zoom: initialZoom,\r\n bounds: null,\r\n },\r\n bounds: initialBounds,\r\n isGeoOn: false,\r\n geoError: '',\r\n geoState: null,\r\n boundsToOmit: [],\r\n noClusteredLots: [],\r\n})\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const getLots = createAsyncThunk<\r\n GetLotsData,\r\n GetLotsPayload,\r\n { rejectValue: ErrorData }\r\n>(`${MAP}${FETCH}/getLots`, async (params, thunkApi) => {\r\n try {\r\n const state = thunkApi.getState() as RootState\r\n const token = state.customer.corporationLotsToken\r\n const pcode = state.customer.corporationLotsGlobalPcode\r\n const additionalParam = token || pcode\r\n const argsWithAdditionalParam = token\r\n ? { ...params, token }\r\n : { ...params, pcode }\r\n const args = additionalParam ? argsWithAdditionalParam : params\r\n const resp = await lotApi.getLots(args)\r\n if (resp.newTokens) {\r\n thunkApi.dispatch(customerSlice.actions.setLogin(resp.newTokens))\r\n }\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n LotApiError.getLots\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getLotsByPcode = createAsyncThunk<\r\n GetLotsData,\r\n GetLotsPayload,\r\n { rejectValue: ErrorData }\r\n>(`${MAP}${FETCH}/getLotsByPcode`, async (params, thunkApi) => {\r\n try {\r\n const resp = await lotApi.getLots(params)\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n LotApiError.getLots\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getLotDetailsMap = createAsyncThunk<\r\n GetLotDetailsMapData,\r\n GetLotDetailsMapPayload,\r\n { rejectValue: ErrorData & { skip?: boolean } }\r\n>(`${MAP}${FETCH}/getLotDetailsMap`, async (params, thunkApi) => {\r\n try {\r\n const res = await lotApi.getLotDetailsMap(params)\r\n const { map } = thunkApi.getState() as AppState\r\n const { requestId } = map.promisesStatus.getLotDetailsMap\r\n\r\n if (thunkApi.requestId !== requestId) {\r\n const errorMessage = { ...getErrorMessage(), skip: true }\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n return res\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n LotApiError.getLots\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\n/**\r\n * reducers\r\n */\r\nconst mapSlice = createSlice({\r\n name: MAP,\r\n initialState,\r\n reducers: {\r\n setGeo(state, { payload }: PayloadAction) {\r\n state.isGeoOn = payload\r\n },\r\n setGeoError(state, { payload }: PayloadAction) {\r\n state.geoError = payload\r\n },\r\n setGeoState(state, { payload }: PayloadAction) {\r\n state.geoState = payload\r\n },\r\n addLots(state, { payload }: PayloadAction<{ lots: LotState[] }>) {\r\n if (payload?.lots) {\r\n const lots = payload.lots.filter(el => el.geolocation)\r\n mapAdapter.upsertMany(state, lots)\r\n }\r\n },\r\n addLot(state, { payload }: PayloadAction) {\r\n mapAdapter.upsertOne(state, payload)\r\n },\r\n removeLots(state) {\r\n mapAdapter.removeAll(state)\r\n },\r\n setPosition(state, { payload }: PayloadAction) {\r\n state.position = payload\r\n },\r\n unsetFindCarMode(state) {\r\n state.findCarMode = false\r\n },\r\n foundParkedCar(state, { payload }: PayloadAction<{ lotId: string }>) {\r\n const lot = mapAdapter.getSelectors().selectById(state, payload.lotId)\r\n state.cachedMapPosition = {\r\n zoom: state.zoom,\r\n position: state.position,\r\n bounds: state.bounds,\r\n }\r\n state.findCarMode = true\r\n state.zoom = 17\r\n state.selectedLot = lot.lotId\r\n state.position = {\r\n lat: lot?.geolocation?.latitude,\r\n lng: lot?.geolocation?.longitude,\r\n }\r\n },\r\n exitParkedCarMode(state) {\r\n state.findCarMode = false\r\n state.selectedLot = null\r\n state.zoom = state.cachedMapPosition.zoom\r\n state.position = {\r\n lat: state.cachedMapPosition.position.lat,\r\n lng: state.cachedMapPosition.position.lng,\r\n }\r\n state.cachedMapPosition = null\r\n },\r\n setMyPosition(state, { payload }: PayloadAction) {\r\n state.myPosition = payload\r\n },\r\n setCachedPosition(\r\n state,\r\n {\r\n payload,\r\n }: PayloadAction<{\r\n position: Coords | null\r\n zoom: number\r\n bounds: number[]\r\n }>\r\n ) {\r\n state.cachedMapPosition = payload\r\n },\r\n focusMapOnMyLocation(state) {\r\n if (state.myPosition) {\r\n state.position = state.myPosition\r\n } else {\r\n console.warn('No gps location')\r\n }\r\n },\r\n setZoom(state, { payload }: PayloadAction) {\r\n state.zoom = payload\r\n },\r\n setDefaultZoom(state) {\r\n state.zoom = initialZoom\r\n },\r\n toggleFindCarMode(state) {\r\n state.findCarMode = !state.findCarMode\r\n },\r\n selectLot(\r\n state,\r\n { payload }: PayloadAction<{ lotId: string; position?: boolean }>\r\n ) {\r\n if (!payload?.lotId) return\r\n const lot = mapAdapter.getSelectors().selectById(state, payload.lotId)\r\n state.selectedLot = lot.lotId\r\n if (payload.position) {\r\n state.position = {\r\n lat: lot.geolocation.latitude,\r\n lng: lot.geolocation.longitude,\r\n }\r\n // state.zoom = initialZoom\r\n }\r\n },\r\n setLotsToSelect(state, { payload }: PayloadAction<{ ids: string[] }>) {\r\n state.lotsToSelect = payload.ids\r\n },\r\n unsetLotsToSelect(state) {\r\n state.lotsToSelect = []\r\n },\r\n unselectLot(state) {\r\n state.selectedLot = null\r\n },\r\n setBounds(state, { payload }: PayloadAction) {\r\n state.bounds = sliceUtil.mapMapBoundsToCluster(payload)\r\n },\r\n resetPromiseStatus(\r\n state,\r\n { payload }: PayloadAction\r\n ) {\r\n state.promisesStatus[payload] = initialPromiseStatus\r\n },\r\n resetState(state) {\r\n state = initialState\r\n },\r\n addBoundsToOmit(\r\n state,\r\n { payload, ...action }: PayloadAction\r\n ) {\r\n state.boundsToOmit = [\r\n ...state.boundsToOmit,\r\n sliceUtil.mapApiBoundsToCluster(payload),\r\n ]\r\n },\r\n removeBoundsFromOmit(state, { payload }: PayloadAction) {\r\n const payloadBoundsString = sliceUtil\r\n .mapApiBoundsToCluster(payload)\r\n .toString()\r\n state.boundsToOmit = state.boundsToOmit.filter(\r\n el => !(el.toString() === payloadBoundsString)\r\n )\r\n },\r\n resetBoundsToOmit(state) {\r\n state.boundsToOmit = []\r\n },\r\n setNoClusteredLots(state, { payload }: PayloadAction) {\r\n state.noClusteredLots = payload\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n /**\r\n * getLots\r\n */\r\n .addCase(getLots.fulfilled, (state, action) => {\r\n mapSlice.caseReducers.addLots(state, action)\r\n state.promisesStatus.getLots = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(getLots.pending, (state, action) => {\r\n const fwdAction = mapSlice.actions.addBoundsToOmit(action.meta.arg)\r\n mapSlice.caseReducers.addBoundsToOmit(state, fwdAction)\r\n state.promisesStatus.getLots = sliceUtil.pendingPromise(\r\n state.promisesStatus.getLots,\r\n action\r\n )\r\n })\r\n .addCase(getLots.rejected, (state, action) => {\r\n const fwdAction = mapSlice.actions.removeBoundsFromOmit(action.meta.arg)\r\n mapSlice.caseReducers.removeBoundsFromOmit(state, fwdAction)\r\n state.promisesStatus.getLots = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n /**\r\n * getLotsByPcode\r\n */\r\n .addCase(getLotsByPcode.fulfilled, (state, action) => {\r\n mapSlice.caseReducers.removeLots(state)\r\n mapSlice.caseReducers.addLots(state, action)\r\n state.promisesStatus.getLots = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(getLotsByPcode.pending, (state, action) => {\r\n state.promisesStatus.getLots = sliceUtil.pendingPromise(\r\n state.promisesStatus.getLots,\r\n action\r\n )\r\n })\r\n .addCase(getLotsByPcode.rejected, (state, action) => {\r\n state.promisesStatus.getLots = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n /**\r\n * getLotDetailsMap\r\n */\r\n .addCase(getLotDetailsMap.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getLotDetailsMap = sliceUtil.pendingPromise(\r\n promisesStatus.getLotDetailsMap,\r\n action\r\n )\r\n })\r\n .addCase(getLotDetailsMap.rejected, ({ promisesStatus }, action) => {\r\n // eslint-disable-next-line\r\n if (promisesStatus.getLotDetailsMap.requestId != action.meta.requestId)\r\n return\r\n promisesStatus.getLotDetailsMap = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n .addCase(getLotDetailsMap.fulfilled, (state, action) => {\r\n state.promisesStatus.getLotDetailsMap = sliceUtil.fulfilledPromise()\r\n mapSlice.reducer(\r\n state,\r\n mapSlice.actions.addLot({ ...action.payload, hasDetails: true })\r\n )\r\n })\r\n },\r\n})\r\n\r\nexport default mapSlice.reducer\r\nexport const { actions } = mapSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const { selectAll, selectById, selectEntities, selectIds, selectTotal } =\r\n mapAdapter.getSelectors((state: RootState) => state.map)\r\n\r\nexport const selectByIds = (state: RootState, ids: string[] = []) => {\r\n const entities = selectEntities(state)\r\n return ids.map(id => entities[id]).filter(el => el)\r\n}\r\nexport const selectLotsToSelect = (state: RootState) => {\r\n return selectByIds(state, state.map.lotsToSelect)\r\n}\r\nexport const selectLotByTicketId = (state: RootState, id?: string) => {\r\n if (!id) {\r\n return null\r\n }\r\n const ticket = ticketsSlice.selectById(state, id)\r\n if (!ticket) {\r\n return null\r\n }\r\n return selectById(state, ticket.lot.lotId)\r\n}\r\n\r\nexport const stateSelectors = (state: RootState) => state.map\r\nexport const selectHasParkedCar = (state: RootState, lotId: string) => {\r\n const parkedCar = ticketsSlice\r\n .selectParkedCars(state)\r\n .find(el => el.lot.lotId === lotId && el.carStatus === CarStatus.Parked)\r\n return { hasParkedCar: Boolean(parkedCar), parkedCar }\r\n}\r\nexport const selectParkedLots = (state: RootState) => {\r\n const lotIds = ticketsSlice.selectParkedCars(state).map(el => el.lot.lotId)\r\n if (!lotIds.length) return []\r\n return lotIds.map(el => state.map.entities[el]).filter(el => el?.geolocation)\r\n}\r\nexport const selectManyAreas = (state: RootState, coords: Coords) => {\r\n const lots = selectAll(state).filter(el => {\r\n if (!el.geolocation?.latitude || !el.geolocation?.longitude) return false\r\n if (\r\n el.geolocation.latitude === coords.lat &&\r\n el.geolocation.longitude === coords.lng\r\n )\r\n return true\r\n return false\r\n })\r\n return lots.map(el => el.lotId)\r\n}\r\n\r\nexport const selectMapLots = (state: RootState) => {\r\n return selectAll(state)\r\n .filter(el => {\r\n if (!el.geolocation) return false\r\n return true\r\n })\r\n .map(el => {\r\n const lotsIds = selectManyAreas(state, {\r\n lat: el.geolocation.latitude,\r\n lng: el.geolocation.longitude,\r\n })\r\n const manyLots = Boolean(lotsIds.filter(elm => elm !== el.lotId).length)\r\n\r\n return { ...el, lotsIds, manyLots }\r\n })\r\n}\r\n\r\nexport const selectLotsIdsWithinMap = (state: RootState) => {\r\n const [wLng, sLat, eLng, nLat] = stateSelectors(state).bounds\r\n const lots = selectAll(state).filter(el => {\r\n if (!el.geolocation) return false\r\n return true\r\n })\r\n\r\n const filter = (el: LotState) => {\r\n const { latitude: lat, longitude: lng } = el.geolocation\r\n return lng >= wLng && lng <= eLng && lat <= nLat && lat >= sLat\r\n }\r\n return lots.filter(filter).map(el => el.lotId)\r\n}\r\n\r\n/** @returns [nw.lng, se.lat, se.lng, nw.lat] (cluster order) */\r\nexport const selectUnfetchedBounds = (state: RootState) => {\r\n const [wLng, sLat, eLng, nLat] = stateSelectors(state).bounds\r\n const { boundsToOmit } = stateSelectors(state)\r\n const shouldSkip = boundsToOmit.some(\r\n ([wLngO, sLatO, eLngO, nLatO]) =>\r\n wLngO <= wLng && sLatO <= sLat && eLngO >= eLng && nLatO >= nLat\r\n )\r\n return shouldSkip ? [] : [wLng, sLat, eLng, nLat]\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport axios from 'axios'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { FETCH, ADS } from './constants'\r\n\r\nexport interface Ad {\r\n advertisementUrl: string\r\n scriptString?: string\r\n fullHtmlString?: string\r\n}\r\nexport interface AdState {\r\n scriptString?: string\r\n adsToAppend?: string[]\r\n}\r\nconst adsAdapter = createEntityAdapter({\r\n selectId: ad => ad.advertisementUrl,\r\n})\r\n\r\nconst initialState = adsAdapter.getInitialState({\r\n scriptString: '',\r\n adsToAppend: [],\r\n})\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const getAd = createAsyncThunk(\r\n `${ADS}${FETCH}/getAd`,\r\n async (params, thunkApi) => {\r\n try {\r\n const resp = await axios.request({\r\n headers: { 'Access-Control-Allow-Origin': '*' },\r\n method: 'get',\r\n url: params,\r\n responseType: 'text',\r\n })\r\n\r\n if (!resp.data) throw Error\r\n\r\n let scriptString = resp.data.substring(\r\n resp.data.lastIndexOf('')\r\n )\r\n if (resp.data.lastIndexOf('') === -1) {\r\n scriptString = ''\r\n }\r\n\r\n return {\r\n advertisementUrl: params,\r\n scriptString,\r\n fullHtmlString: resp.data,\r\n }\r\n } catch (error) {\r\n throw error\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { ads } = api.getState() as RootState\r\n if (!arg) return false\r\n return !ads.ids.find(el => el === arg)\r\n },\r\n }\r\n)\r\n\r\n/**\r\n * reducers\r\n */\r\nconst adsSlice = createSlice({\r\n name: ADS,\r\n initialState,\r\n reducers: {\r\n removeScriptString(state) {\r\n state.scriptString = ''\r\n },\r\n addAdToAppend(state, { payload }: PayloadAction) {\r\n state.adsToAppend = [...state.adsToAppend, payload]\r\n },\r\n addAllAdsToAppend(state) {\r\n state.adsToAppend = state.ids.map(el => el) as string[]\r\n },\r\n /** @description empty string removes all */\r\n removeAdsToAppend(state, { payload }: PayloadAction) {\r\n if (payload === 'all') {\r\n state.adsToAppend = []\r\n } else if (Array.isArray(payload)) {\r\n payload.forEach(payEl => {\r\n state.adsToAppend = state.adsToAppend.filter(el => el !== payEl)\r\n })\r\n } else {\r\n console.warn('removeAdToAppend - wrong payload')\r\n }\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder.addCase(getAd.fulfilled, (state, action) => {\r\n if (!state.scriptString) {\r\n state.scriptString = action.payload.scriptString\r\n }\r\n adsAdapter.upsertOne(state, action.payload)\r\n const fwdAction = adsSlice.actions.addAdToAppend(action.meta.arg)\r\n adsSlice.caseReducers.addAdToAppend(state, fwdAction)\r\n })\r\n },\r\n})\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const stateSelectors = (state: RootState) => state.ads\r\n\r\nexport const { selectAll, selectById, selectIds } =\r\n adsAdapter.getSelectors(stateSelectors)\r\n\r\nexport const selectAdsToAppend = (state: RootState) =>\r\n stateSelectors(state).adsToAppend.map(el => selectById(state, el))\r\nexport const { actions } = adsSlice\r\nexport default adsSlice.reducer\r\n","import { PayloadAction } from '@reduxjs/toolkit'\r\nimport { Bounds } from 'google-map-react'\r\nimport { ErrorData, FetchStatus, GetLotsPayload } from 'typedef'\r\nimport { initialPromiseStatus } from './constants'\r\nimport { PromiseStatus } from './slices.types'\r\n\r\ntype Action = PayloadAction<\r\n undefined,\r\n string,\r\n {\r\n arg: any\r\n requestId: string\r\n },\r\n never\r\n>\r\nexport const pendingPromise = (\r\n promiseStatus: PromiseStatus,\r\n action?: Action\r\n) => ({\r\n ...promiseStatus,\r\n status: promiseStatus.status.concat(FetchStatus.Pending),\r\n requestId: action?.meta?.requestId,\r\n})\r\nexport const rejectedPromise = (errors: ErrorData) => ({\r\n ...errors,\r\n status: [FetchStatus.Rejected],\r\n})\r\nexport const fulfilledPromise = () => ({\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n time: new Date().getTime(),\r\n})\r\n\r\nfunction isPromiseStatus(x: any): x is PromiseStatus {\r\n return x.status !== undefined\r\n}\r\n\r\nexport const fetchStatus = (arg?: FetchStatus[] | PromiseStatus) => {\r\n if (!arg)\r\n return {\r\n idle: true,\r\n pending: false,\r\n pendingIdle: false,\r\n pendingFulfilled: false,\r\n pendingRejected: false,\r\n fulfilled: false,\r\n rejected: false,\r\n }\r\n\r\n let statuses: FetchStatus[] | PromiseStatus\r\n if (isPromiseStatus(arg)) {\r\n statuses = arg.status\r\n } else {\r\n statuses = arg\r\n }\r\n\r\n return {\r\n idle: statuses.includes(FetchStatus.Idle) && statuses.length === 1,\r\n pending: statuses.includes(FetchStatus.Pending),\r\n pendingIdle:\r\n statuses.filter(\r\n el => el === FetchStatus.Pending || el === FetchStatus.Idle\r\n ).length === 2,\r\n pendingFulfilled:\r\n statuses.filter(\r\n el => el === FetchStatus.Pending || el === FetchStatus.Fulfilled\r\n ).length === 2,\r\n pendingRejected:\r\n statuses.filter(\r\n el => el === FetchStatus.Pending || el === FetchStatus.Rejected\r\n ).length === 2,\r\n fulfilled:\r\n statuses.includes(FetchStatus.Fulfilled) && statuses.length === 1,\r\n rejected: statuses.includes(FetchStatus.Rejected) && statuses.length === 1,\r\n }\r\n}\r\n\r\ntype MapBoundsToState = (bounds: Bounds) => number[]\r\n/** @returns [nw.lng, se.lat, se.lng, nw.lat] (cluster order) */\r\nexport const mapMapBoundsToCluster: MapBoundsToState = bounds => [\r\n bounds.nw.lng,\r\n bounds.se.lat,\r\n bounds.se.lng,\r\n bounds.nw.lat,\r\n]\r\n\r\n/** @params [nw.lng, se.lat, se.lng, nw.lat] (cluster order)\r\n * @returns API object\r\n */\r\nexport const mapClusterBoundsToApi = (el: number[]): GetLotsPayload => {\r\n const rev = el.reverse()\r\n return {\r\n northEastBoundLat: rev[0],\r\n northEastBoundLng: rev[1],\r\n southWestBoundLat: rev[2],\r\n southWestBoundLng: rev[3],\r\n }\r\n}\r\n\r\n/** @returns [nw.lng, se.lat, se.lng, nw.lat] (cluster order) */\r\nexport const mapApiBoundsToCluster = (arg: GetLotsPayload): number[] => [\r\n arg.southWestBoundLng,\r\n arg.southWestBoundLat,\r\n arg.northEastBoundLng,\r\n arg.northEastBoundLat,\r\n]\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport { ticketsApiError } from 'api/apiErrors'\r\nimport * as ticketsApi from 'api/TicketsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport moment from 'moment'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { TicketsState, TicketState } from 'store/slices/ticketsSlice.types'\r\nimport {\r\n CarStatus,\r\n FetchStatus,\r\n GetTicketPayload,\r\n ParkCarRedirectData,\r\n ParkCarRedirectPayload,\r\n PayForCarData,\r\n PayForCarPayload,\r\n Ticket,\r\n ErrorData,\r\n} from 'typedef'\r\nimport * as adsSlice from './adsSlice'\r\nimport { FETCH, initialPromiseStatus, TICKETS } from './constants'\r\nimport * as mapSlice from './mapSlice'\r\nimport { LotState } from './mapSlice.types'\r\nimport * as sliceUtil from './slice.utils'\r\nimport { SelectParkedCars } from './ticketsSlice.types'\r\n\r\n/**\r\n * state\r\n */\r\nconst ticketsAdapter = createEntityAdapter({\r\n selectId: ticket => ticket.carId,\r\n})\r\n\r\nconst initialState = ticketsAdapter.getInitialState({\r\n selectedTicket: null,\r\n promisesStatus: {\r\n getTickets: initialPromiseStatus,\r\n getTicket: {},\r\n payForCar: {},\r\n },\r\n})\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const getTickets = createAsyncThunk<\r\n { tickets: TicketState[] },\r\n null,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${TICKETS}${FETCH}/getTickets`,\r\n async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.getTickets()\r\n const tickets: TicketState[] = resp.tickets\r\n .filter(el => el.lot?.geolocation)\r\n .map(el => ({ ...el, refCurrentTime: Date.now() }))\r\n\r\n ;(function () {\r\n if (!tickets.length) return\r\n new Set(\r\n tickets.map(el => el.advertisementUrl).filter(el => el)\r\n ).forEach(el => {\r\n thunkApi.dispatch(adsSlice.getAd(el))\r\n })\r\n })()\r\n const lots = tickets.map(el => el.lot)\r\n thunkApi.dispatch(mapSlice.actions.addLots({ lots }))\r\n\r\n return { tickets }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.getTickets\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { tickets } = api.getState() as RootState\r\n return !tickets.promisesStatus.getTickets.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\n\r\nexport const getTicket = createAsyncThunk<\r\n TicketState,\r\n GetTicketPayload,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${TICKETS}${FETCH}/getTicket`,\r\n async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.getTicket(params)\r\n\r\n thunkApi.dispatch(adsSlice.getAd(resp.advertisementUrl))\r\n thunkApi.dispatch(mapSlice.actions.addLots({ lots: [resp.lot] }))\r\n return { ...resp, refCurrentTime: Date.now() }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.getTicket\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { tickets } = api.getState() as RootState\r\n if (!tickets.promisesStatus.getTicket[arg.carId]) return true\r\n return !tickets.promisesStatus.getTicket[arg.carId].status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\n\r\nexport const payForCar = createAsyncThunk<\r\n PayForCarData,\r\n PayForCarPayload,\r\n { rejectValue: ErrorData }\r\n>(`${TICKETS}${FETCH}/payForCar`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.payForCar(params)\r\n\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.payForCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const parkCarRedirect = createAsyncThunk<\r\n ParkCarRedirectData,\r\n ParkCarRedirectPayload,\r\n { rejectValue: ErrorData }\r\n>(`${TICKETS}${FETCH}/parkCarRedirect`, async (params, thunkApi) => {\r\n try {\r\n const resp = await ticketsApi.parkCarRedirect(params)\r\n\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n ticketsApiError.payForCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\n/**\r\n * reducers\r\n */\r\nconst ticketsSlice = createSlice({\r\n name: TICKETS,\r\n initialState,\r\n reducers: {\r\n setTickets(state, { payload }: PayloadAction<{ tickets: Ticket[] }>) {\r\n ticketsAdapter.setAll(\r\n state,\r\n payload.tickets.map(el => ({ ...el, refCurrentTime: Date.now() }))\r\n )\r\n },\r\n setSelectedTicket(state, { payload }: PayloadAction<{ ticketId: string }>) {\r\n state.selectedTicket = ticketsAdapter\r\n .getSelectors()\r\n .selectById(state, payload.ticketId)\r\n },\r\n unsetSelectedTicket(state) {\r\n state.selectedTicket = null\r\n },\r\n addTicket(state, { payload }: PayloadAction<{ ticket: Ticket }>) {\r\n ticketsAdapter.upsertOne(state, {\r\n ...payload.ticket,\r\n refCurrentTime: Date.now(),\r\n })\r\n },\r\n setTicketStatus(\r\n state,\r\n { payload }: PayloadAction<{ ticketId: string; status: CarStatus }>\r\n ) {\r\n ticketsAdapter.updateOne(state, {\r\n id: payload.ticketId,\r\n changes: { carStatus: payload.status },\r\n })\r\n },\r\n removeTicket(\r\n state,\r\n { payload }: PayloadAction<{ ticketId: string; status: CarStatus }>\r\n ) {\r\n ticketsAdapter.removeOne(state, payload.ticketId)\r\n },\r\n resetTicketPromiseStatus(state, { payload }: PayloadAction) {\r\n state.promisesStatus.getTicket[payload] = initialPromiseStatus\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n\r\n /**\r\n * getTickets\r\n */\r\n .addCase(getTickets.pending, (state, action) => {\r\n state.promisesStatus.getTickets = sliceUtil.pendingPromise(\r\n state.promisesStatus.getTickets,\r\n action\r\n )\r\n })\r\n .addCase(getTickets.fulfilled, (state, action) => {\r\n // eslint-disable-next-line\r\n if (state.promisesStatus.getTickets.requestId != action.meta.requestId)\r\n return\r\n state.promisesStatus.getTickets = sliceUtil.fulfilledPromise()\r\n action.payload.tickets.forEach(\r\n el =>\r\n (state.promisesStatus.getTicket[el.carId] =\r\n sliceUtil.fulfilledPromise())\r\n )\r\n // ticketsAdapter.upsertMany(state, action.payload.tickets)\r\n ticketsAdapter.upsertMany(state, action.payload.tickets)\r\n })\r\n .addCase(getTickets.rejected, (state, action) => {\r\n // eslint-disable-next-line\r\n if (state.promisesStatus.getTickets.requestId != action.meta.requestId)\r\n return\r\n state.promisesStatus.getTickets = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * getTicket\r\n */\r\n .addCase(getTicket.pending, (state, action) => {\r\n const { carId } = action.meta.arg\r\n const currentStatus = Boolean(state.promisesStatus.getTicket[carId])\r\n ? state.promisesStatus.getTicket[carId]\r\n : initialPromiseStatus\r\n state.promisesStatus.getTicket[carId] =\r\n sliceUtil.pendingPromise(currentStatus)\r\n })\r\n .addCase(getTicket.fulfilled, (state, action) => {\r\n const { carId } = action.meta.arg\r\n ticketsAdapter.upsertOne(state, action.payload)\r\n state.promisesStatus.getTicket[carId] = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(getTicket.rejected, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.getTicket[carId] = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * payForCar\r\n */\r\n .addCase(payForCar.pending, (state, action) => {\r\n const { carId } = action.meta.arg\r\n const currentStatus = Boolean(state.promisesStatus.payForCar[carId])\r\n ? state.promisesStatus.payForCar[carId]\r\n : initialPromiseStatus\r\n state.promisesStatus.payForCar[carId] =\r\n sliceUtil.pendingPromise(currentStatus)\r\n })\r\n .addCase(payForCar.fulfilled, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.entities[carId].carStatus = CarStatus.Parked\r\n state.promisesStatus.payForCar[carId] = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(payForCar.rejected, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.payForCar[carId] = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n },\r\n})\r\n\r\nexport default ticketsSlice.reducer\r\nexport const { actions } = ticketsSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const stateSelectors = (state: RootState) => state.tickets\r\n\r\nexport const { selectAll, selectById, selectIds } =\r\n ticketsAdapter.getSelectors(state => state.tickets)\r\n\r\nexport const selectParkedTickets = (state: RootState) => {\r\n const allParkedTicketsFilter = (el: TicketState) =>\r\n el.carStatus === CarStatus.Parked\r\n\r\n return selectAll(state).filter(allParkedTicketsFilter)\r\n}\r\n\r\nexport const selectExpiredTickets = (state: RootState) =>\r\n selectAll(state).filter(el => el.carStatus === CarStatus.ParkingHasExpired)\r\n\r\nexport const selectSortedParkedTickets = (state: RootState) =>\r\n selectParkedTickets(state).sort((a, b) =>\r\n moment(a.parkingExpireDateTime).diff(moment(b.parkingExpireDateTime))\r\n )\r\nexport const selectSortedExpiredTickets = (state: RootState) =>\r\n selectExpiredTickets(state).sort((a, b) =>\r\n moment(b.parkingExpireDateTime).diff(moment(a.parkingExpireDateTime))\r\n )\r\n\r\nexport const selectParkAnotherCarLots = (state: RootState) => {\r\n const parkedlotsIds = selectParkedTickets(state).map(el => el.lot.lotId)\r\n const entities = mapSlice.selectEntities(state)\r\n const uniqLots: LotState[] = []\r\n new Set(parkedlotsIds).forEach(el => uniqLots.push(entities[el]))\r\n return uniqLots.filter(el => el)\r\n}\r\n\r\nexport const selectParkingHistory = (state: RootState) => {\r\n const tickets = selectAll(state).sort((a, b) =>\r\n moment(b.parkingExpireDateTime).diff(moment(a.parkingExpireDateTime))\r\n )\r\n const lotEntities = mapSlice.selectEntities(state)\r\n const history = [] as (LotState & Pick)[]\r\n const uniqLotsIds = new Set(tickets.map(el => el.lot.lotId))\r\n uniqLotsIds.forEach(lotId => {\r\n const ticket = tickets.find(el => el.lot.lotId === lotId)\r\n if (ticket) {\r\n history.push({\r\n ...lotEntities[lotId],\r\n carStatus: ticket.carStatus,\r\n })\r\n }\r\n })\r\n return history\r\n}\r\n\r\nexport const selectParkedCars: SelectParkedCars = state =>\r\n selectParkedTickets(state).map(el => ({\r\n carId: el.carId,\r\n carStatus: el.carStatus,\r\n plate: el.plate,\r\n lot: el.lot,\r\n }))\r\n\r\nexport const promiseStatusSelectors = (state: RootState, carId?: string) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getTicketsStatus: sliceUtil.fetchStatus(promises.getTickets),\r\n getTicketStatus: carId\r\n ? sliceUtil.fetchStatus(promises.getTicket[carId])\r\n : sliceUtil.fetchStatus(),\r\n payForCarStatus: carId\r\n ? sliceUtil.fetchStatus(promises.payForCar[carId])\r\n : sliceUtil.fetchStatus(),\r\n }\r\n}\r\n\r\nexport const singleTicketsFetchSuccess = (state: RootState) => {\r\n let success = true\r\n Object.entries(state.tickets.promisesStatus.getTicket).find(([key, val]) => {\r\n const { fulfilled } = sliceUtil.fetchStatus(val.status)\r\n if (!fulfilled) {\r\n success = false\r\n return true\r\n }\r\n return false\r\n })\r\n return success\r\n}\r\n\r\nexport const selectTicketByLotId = (state: RootState, lotId?: string) => {\r\n if (!lotId) return null\r\n return selectAll(state).find(el => el?.lot?.lotId === lotId)\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport { carsApiError } from 'api/apiErrors'\r\nimport * as carsApi from 'api/CarsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n AddCarPayload,\r\n Car,\r\n DeleteCarPayload,\r\n GetCarsData,\r\n ErrorData,\r\n FetchStatus,\r\n} from 'typedef'\r\nimport { CarPromiseStatuses, CarsState, CarStateType } from './carsSlice.types'\r\nimport { FETCH, initialPromiseStatus, CARS } from './constants'\r\nimport * as sliceUtil from './slice.utils'\r\n\r\nconst carsAdapter = createEntityAdapter({\r\n selectId: car => car.carId,\r\n})\r\n/**\r\n * state\r\n */\r\nexport const initialPromiseStatuses: CarPromiseStatuses = {\r\n getCars: initialPromiseStatus,\r\n addCar: initialPromiseStatus,\r\n removeCar: {},\r\n}\r\nconst initialState = carsAdapter.getInitialState({\r\n promisesStatus: initialPromiseStatuses,\r\n})\r\n\r\nexport const getCars = createAsyncThunk<\r\n GetCarsData,\r\n null,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CARS}/${FETCH}/getCars`,\r\n async (_, thunkApi) => {\r\n try {\r\n const response = await carsApi.getCars()\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n carsApiError.getCars\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { cars } = api.getState() as RootState\r\n return !cars.promisesStatus.getCars.status.includes(FetchStatus.Pending)\r\n },\r\n }\r\n)\r\n\r\nexport const addCar = createAsyncThunk<\r\n Car,\r\n AddCarPayload,\r\n { rejectValue: ErrorData }\r\n>(`${CARS}/${FETCH}/addCar`, async (car, thunkApi) => {\r\n try {\r\n const response = await carsApi.addCar(car)\r\n return { ...response, ...car }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n carsApiError.AddCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const removeCar = createAsyncThunk<\r\n { carId: string },\r\n DeleteCarPayload,\r\n { rejectValue: ErrorData }\r\n>(`${CARS}/${FETCH}/removeCar`, async (arg, thunkApi) => {\r\n try {\r\n await carsApi.deleteCar({ carId: arg.carId })\r\n return arg\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n carsApiError.AddCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nconst carsSlice = createSlice({\r\n name: CARS,\r\n initialState,\r\n reducers: {\r\n addCars(state, action: PayloadAction<{ cars: CarStateType[] }>) {\r\n carsAdapter.upsertMany(state, action.payload.cars)\r\n },\r\n setCars(state, action: PayloadAction<{ cars: Car[] }>) {\r\n carsAdapter.setAll(state, action.payload.cars)\r\n },\r\n },\r\n extraReducers: builder => {\r\n // Fetch cars\r\n builder.addCase(getCars.pending, ({ promisesStatus }) => {\r\n promisesStatus.getCars = sliceUtil.pendingPromise(promisesStatus.getCars)\r\n })\r\n builder.addCase(getCars.fulfilled, (state, action) => {\r\n state.promisesStatus.getCars = sliceUtil.fulfilledPromise()\r\n carsAdapter.setAll(state, action.payload.cars)\r\n })\r\n builder.addCase(getCars.rejected, (state, action) => {\r\n state.promisesStatus.getCars = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n\r\n // Add car\r\n builder.addCase(addCar.fulfilled, (state, action) => {\r\n state.promisesStatus.addCar = sliceUtil.fulfilledPromise()\r\n carsAdapter.addOne(state, action.payload)\r\n })\r\n builder.addCase(addCar.pending, ({ promisesStatus }) => {\r\n promisesStatus.addCar = sliceUtil.pendingPromise(promisesStatus.addCar)\r\n })\r\n builder.addCase(addCar.rejected, (state, action) => {\r\n state.promisesStatus.addCar = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n\r\n // Remove car\r\n builder.addCase(removeCar.fulfilled, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.removeCar[carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n carsAdapter.removeOne(state, carId)\r\n })\r\n builder.addCase(removeCar.pending, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.removeCar[carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Pending],\r\n }\r\n })\r\n builder.addCase(removeCar.rejected, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.removeCar[carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n },\r\n})\r\n\r\nexport default carsSlice.reducer\r\nexport const { actions } = carsSlice\r\n\r\nconst carsSelectors = carsAdapter.getSelectors(state => state.cars)\r\nexport const {\r\n selectAll: selectAllCars,\r\n selectById: selectCarById,\r\n selectIds: selectCarIds,\r\n} = carsSelectors\r\n\r\nexport const stateSelectors = (state: RootState) => state.cars\r\n\r\nexport const promiseStatusSelectors = (state: RootState, carId?: string) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getCarsStatus: sliceUtil.fetchStatus(promises.getCars),\r\n addCarStatus: sliceUtil.fetchStatus(promises.addCar),\r\n removeCarStatus: carId\r\n ? sliceUtil.fetchStatus(promises.removeCar[carId])\r\n : null,\r\n }\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n} from '@reduxjs/toolkit'\r\nimport { receiptsApiError } from 'api/apiErrors'\r\nimport * as receiptsApi from 'api/ReceiptsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n GetReceiptsData,\r\n Receipt,\r\n SendQuestionPayload,\r\n ErrorData,\r\n SendReceiptsData,\r\n SendReceiptsPayload,\r\n FetchStatus,\r\n} from 'typedef'\r\nimport { RECEIPTS, FETCH, initialPromiseStatus } from './constants'\r\nimport { ReceiptsState } from './receiptsSlice.types'\r\nimport * as sliceUtil from './slice.utils'\r\n\r\nconst receiptsAdapter = createEntityAdapter({\r\n selectId: receipt => receipt.carId,\r\n})\r\n\r\nconst initialState = receiptsAdapter.getInitialState({\r\n error: null,\r\n promisesStatus: {\r\n sendReceipt: {},\r\n sendQuestion: {},\r\n getReceipts: initialPromiseStatus,\r\n },\r\n})\r\n\r\nexport const getReceipts = createAsyncThunk<\r\n GetReceiptsData,\r\n null,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${RECEIPTS}/${FETCH}/getReceipts`,\r\n async (_, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.getReceipts()\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n receiptsApiError.getReceipts\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { receipts } = api.getState() as RootState\r\n return !receipts.promisesStatus.getReceipts.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\n\r\nexport const sendReceipt = createAsyncThunk<\r\n SendReceiptsData,\r\n SendReceiptsPayload,\r\n { rejectValue: ErrorData }\r\n>(`${RECEIPTS}/${FETCH}/sendReceipt`, async (arg, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.sendReceipt(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n receiptsApiError.sendReceipt\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const sendQuestion = createAsyncThunk<\r\n null,\r\n SendQuestionPayload,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${RECEIPTS}/${FETCH}/sendQuestion`,\r\n async (arg, thunkApi) => {\r\n try {\r\n await receiptsApi.sendQuestion(arg)\r\n return null\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n receiptsApiError.sendQuestion\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { receipts } = api.getState() as RootState\r\n if (!receipts.promisesStatus.sendQuestion[arg.carId]) return true\r\n return !sliceUtil.fetchStatus(\r\n receipts.promisesStatus.sendQuestion[arg.carId]\r\n ).pending\r\n },\r\n }\r\n)\r\n\r\nconst receiptsSlice = createSlice({\r\n name: RECEIPTS,\r\n initialState,\r\n reducers: {\r\n resetFinalSendReceiptStatus(state) {\r\n const keysArr = Object.keys(state.promisesStatus.sendReceipt)\r\n keysArr.forEach(key => {\r\n let status = [FetchStatus.Idle]\r\n if (\r\n state.promisesStatus.sendReceipt[key]?.status.includes(\r\n FetchStatus.Pending\r\n )\r\n ) {\r\n status = status.concat(FetchStatus.Pending)\r\n }\r\n state.promisesStatus.sendReceipt[key] = {\r\n ...initialPromiseStatus,\r\n status,\r\n }\r\n })\r\n },\r\n resetFinalSendQuestionStatus(state) {\r\n const keysArr = Object.keys(state.promisesStatus.sendQuestion)\r\n keysArr.forEach(key => {\r\n let status = [FetchStatus.Idle]\r\n if (\r\n state.promisesStatus.sendQuestion[key]?.status.includes(\r\n FetchStatus.Pending\r\n )\r\n ) {\r\n status = status.concat(FetchStatus.Pending)\r\n }\r\n state.promisesStatus.sendQuestion[key] = {\r\n ...initialPromiseStatus,\r\n status,\r\n }\r\n })\r\n },\r\n },\r\n extraReducers: builder => {\r\n /**\r\n * Fetch receipts\r\n **/\r\n builder\r\n .addCase(getReceipts.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getReceipts = sliceUtil.pendingPromise(\r\n promisesStatus.getReceipts,\r\n action\r\n )\r\n })\r\n .addCase(getReceipts.fulfilled, (state, action) => {\r\n // eslint-disable-next-line\r\n if (state.promisesStatus.getReceipts.requestId != action.meta.requestId)\r\n return\r\n state.promisesStatus.getReceipts = sliceUtil.fulfilledPromise()\r\n receiptsAdapter.setAll(\r\n state,\r\n action.payload ? action.payload.receipts : []\r\n )\r\n })\r\n .addCase(getReceipts.rejected, (state, action) => {\r\n // eslint-disable-next-line\r\n if (state.promisesStatus.getReceipts.requestId != action.meta.requestId)\r\n return\r\n state.promisesStatus.getReceipts = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * Send receipt\r\n */\r\n .addCase(sendReceipt.fulfilled, (state, action) => {\r\n state.promisesStatus.sendReceipt[action.meta.arg.carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(sendReceipt.pending, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.sendReceipt[carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Pending],\r\n }\r\n })\r\n .addCase(sendReceipt.rejected, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.sendReceipt[carId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n\r\n /**\r\n * Send question\r\n */\r\n .addCase(sendQuestion.pending, (state, action) => {\r\n const { carId } = action.meta.arg\r\n const currentStatus = Boolean(state.promisesStatus.sendQuestion[carId])\r\n ? state.promisesStatus.sendQuestion[carId]\r\n : initialPromiseStatus\r\n state.promisesStatus.sendQuestion[carId] = sliceUtil.pendingPromise(\r\n currentStatus,\r\n action\r\n )\r\n })\r\n .addCase(sendQuestion.fulfilled, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.sendQuestion[carId] = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(sendQuestion.rejected, (state, action) => {\r\n const { carId } = action.meta.arg\r\n state.promisesStatus.sendQuestion[carId] = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n },\r\n})\r\n\r\nexport default receiptsSlice.reducer\r\nexport const { actions } = receiptsSlice\r\n\r\nconst receiptsSelectors = receiptsAdapter.getSelectors(\r\n (state: RootState) => state.receipts\r\n)\r\nexport const {\r\n selectAll: selectAllReceipts,\r\n selectById: selectReceiptById,\r\n selectIds: selectReceiptIds,\r\n} = receiptsSelectors\r\n\r\nexport const stateSelectors = (state: RootState) => state.receipts\r\nexport const promiseStatusSelectors = (state: RootState, carId?: string) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getReceiptsStatus: sliceUtil.fetchStatus(promises.getReceipts),\r\n sendReceiptStatus: carId\r\n ? sliceUtil.fetchStatus(promises.sendReceipt[carId])\r\n : sliceUtil.fetchStatus(),\r\n sendQuestionStatus: carId\r\n ? sliceUtil.fetchStatus(promises.sendQuestion[carId])\r\n : sliceUtil.fetchStatus(),\r\n }\r\n}\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\r\nimport * as customerApiError from 'api/apiErrors/CustomerApiError'\r\nimport { removeAuthHeader, setAuthHeader } from 'api/auth'\r\nimport * as customerApi from 'api/CustomerApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { CUSTOMER, FETCH, initialPromiseStatus } from 'store/slices/constants'\r\nimport * as sliceUtil from 'store/slices/slice.utils'\r\nimport {\r\n ChangePasswordRequest,\r\n ConfirmRegisterData,\r\n ConfirmRegisterParams,\r\n CustomerDetails,\r\n EditCustomerParams,\r\n FindCarData,\r\n FindCarPayload,\r\n LoginRequest,\r\n LoginResult,\r\n RefreshTokenRequest,\r\n RefreshTokenResult,\r\n RegisterParams,\r\n RegisterResult,\r\n RemindPasswordParams,\r\n ResetPasswordRequest,\r\n ResetPasswordResult,\r\n UserRole,\r\n ErrorData,\r\n FetchStatus,\r\n} from 'typedef'\r\nimport tokensStorageService from 'utils/tokenStorageService'\r\nimport { mapSlice, ticketsSlice } from '.'\r\nimport { CustomerState } from './customerSlice.types'\r\n\r\n/**\r\n * state\r\n */\r\nexport const initialPromiseStatuses = {\r\n getCustomerDetails: initialPromiseStatus,\r\n refreshToken: initialPromiseStatus,\r\n findCar: initialPromiseStatus,\r\n deleteAccount: initialPromiseStatus,\r\n}\r\nexport const initialState: CustomerState = {\r\n details: null,\r\n tokens: null,\r\n role: null,\r\n corporationLotsToken: '',\r\n corporationLotsGlobalPcode: '',\r\n fetchingEditCustomerDetailsStatus: FetchStatus.Idle,\r\n promisesStatus: initialPromiseStatuses,\r\n}\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const register = createAsyncThunk<\r\n RegisterResult,\r\n RegisterParams,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/register`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.register(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.register\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const login = createAsyncThunk<\r\n LoginResult,\r\n LoginRequest,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/login`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.login(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.getCustomerDetails\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const remindPassword = createAsyncThunk<\r\n boolean,\r\n RemindPasswordParams,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/remindPassword`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.remindPassword(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.remindPassword\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const resetPassword = createAsyncThunk<\r\n ResetPasswordResult,\r\n ResetPasswordRequest,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/resetPassword`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.resetPassword(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.resetPassword\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const changePassword = createAsyncThunk<\r\n boolean,\r\n ChangePasswordRequest,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/changePassword`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.changePassword(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.changePassword\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const confirmRegister = createAsyncThunk<\r\n ConfirmRegisterData,\r\n ConfirmRegisterParams,\r\n { rejectValue: ErrorData }\r\n>(`${CUSTOMER}${FETCH}/confirmRegister`, async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.confirmRegister(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.confirmRegister\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const refreshToken = createAsyncThunk<\r\n RefreshTokenResult,\r\n RefreshTokenRequest,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CUSTOMER}${FETCH}/refreshToken`,\r\n async (arg, thunkApi) => {\r\n try {\r\n const response = await customerApi.refreshToken(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.refreshToken\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { customer } = api.getState() as RootState\r\n return !customer.promisesStatus.refreshToken.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\n\r\nexport const getCustomerDetails = createAsyncThunk<\r\n CustomerDetails,\r\n null,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CUSTOMER}${FETCH}/getCustomerDetails`,\r\n async (params, thunkApi) => {\r\n try {\r\n const res = await customerApi.getCustomerDetails()\r\n\r\n return res\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.getCustomerDetails\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { customer } = api.getState() as RootState\r\n return !customer.promisesStatus.getCustomerDetails.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\nexport const editCustomerDetails = createAsyncThunk<\r\n boolean,\r\n EditCustomerParams\r\n>('customer/editCustomerDetails', async arg => {\r\n const response = await customerApi.editCustomer(arg)\r\n return response\r\n})\r\n\r\nexport const deleteAccount = createAsyncThunk<\r\n boolean,\r\n string,\r\n { rejectValue: ErrorData }\r\n>('customer/deleteAccount', async (password, thunkApi) => {\r\n try {\r\n const response = await customerApi.deleteAccount(password)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.getCustomerDetails\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const findCar = createAsyncThunk<\r\n FindCarData,\r\n FindCarPayload,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CUSTOMER}${FETCH}/findCar`,\r\n async (args, thunkApi) => {\r\n try {\r\n const resp = await customerApi.findCar(args)\r\n thunkApi.dispatch(mapSlice.actions.addLots({ lots: [resp.ticket.lot] }))\r\n thunkApi.dispatch(\r\n ticketsSlice.actions.addTicket({\r\n ticket: resp.ticket,\r\n })\r\n )\r\n return resp\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n customerApiError.findCar\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { customer } = api.getState() as RootState\r\n return !customer.promisesStatus.findCar.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\n\r\nconst customerSlice = createSlice({\r\n name: CUSTOMER,\r\n initialState,\r\n reducers: {\r\n setLogin(state, { payload }: PayloadAction) {\r\n state.role = payload.role\r\n state.tokens = payload.tokens\r\n setAuthHeader(payload.tokens.auth)\r\n tokensStorageService.set(payload.tokens)\r\n },\r\n setLogout(state) {\r\n state.role = null\r\n state.tokens = null\r\n removeAuthHeader()\r\n tokensStorageService.clear()\r\n },\r\n setDetails(state, { payload }: PayloadAction) {\r\n state.details = payload\r\n },\r\n setRole(state, { payload }: PayloadAction) {\r\n state.role = payload\r\n },\r\n setCorporationToken(state, { payload }: PayloadAction) {\r\n state.corporationLotsToken = payload\r\n },\r\n setCorporationGlobalPcode(state, { payload }: PayloadAction) {\r\n state.corporationLotsGlobalPcode = payload\r\n },\r\n destroySession() {\r\n // middleware is listening to the action\r\n // destroySession.ts, rootReducer.ts\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder.addCase(login.fulfilled, (state, action) => {\r\n customerSlice.caseReducers.setLogin(state, action)\r\n })\r\n /**\r\n * refreshToken\r\n */\r\n builder.addCase(refreshToken.pending, ({ promisesStatus }) => {\r\n promisesStatus.refreshToken = sliceUtil.pendingPromise(\r\n promisesStatus.refreshToken\r\n )\r\n })\r\n builder.addCase(refreshToken.fulfilled, (state, action) => {\r\n state.promisesStatus.refreshToken = sliceUtil.fulfilledPromise()\r\n customerSlice.caseReducers.setLogin(state, action)\r\n })\r\n builder\r\n .addCase(refreshToken.rejected, (state, action) => {\r\n state.promisesStatus.refreshToken = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n // Get Customer Details\r\n .addCase(getCustomerDetails.pending, ({ promisesStatus }) => {\r\n promisesStatus.getCustomerDetails = sliceUtil.pendingPromise(\r\n promisesStatus.getCustomerDetails\r\n )\r\n })\r\n .addCase(getCustomerDetails.fulfilled, (state, { payload }) => {\r\n state.promisesStatus.getCustomerDetails = sliceUtil.fulfilledPromise()\r\n state.details = payload\r\n })\r\n .addCase(confirmRegister.fulfilled, (state, action) => {\r\n customerSlice.caseReducers.setLogin(state, {\r\n ...action,\r\n payload: { ...action.payload, role: state.role },\r\n })\r\n })\r\n .addCase(resetPassword.fulfilled, (state, action) => {\r\n customerSlice.caseReducers.setLogin(state, {\r\n ...action,\r\n payload: { ...action.payload, role: state.role },\r\n })\r\n })\r\n .addCase(getCustomerDetails.rejected, (state, { payload }) => {\r\n state.promisesStatus.getCustomerDetails =\r\n sliceUtil.rejectedPromise(payload)\r\n })\r\n\r\n // Edit customer details\r\n .addCase(editCustomerDetails.pending, state => {\r\n state.fetchingEditCustomerDetailsStatus = FetchStatus.Pending\r\n })\r\n .addCase(editCustomerDetails.fulfilled, (state, action) => {\r\n state.fetchingEditCustomerDetailsStatus = FetchStatus.Fulfilled\r\n if (!!state.details) {\r\n state.details.firstName = action.meta.arg.firstName\r\n state.details.lastName = action.meta.arg.lastName\r\n state.details.email = action.meta.arg.email\r\n }\r\n })\r\n .addCase(editCustomerDetails.rejected, (state, action) => {\r\n state.fetchingEditCustomerDetailsStatus = FetchStatus.Rejected\r\n })\r\n\r\n // Delete customer\r\n .addCase(deleteAccount.fulfilled, (state, { payload }) => {\r\n state.promisesStatus.deleteAccount = sliceUtil.fulfilledPromise()\r\n customerSlice.caseReducers.setLogout(state)\r\n })\r\n .addCase(deleteAccount.pending, state => {\r\n state.promisesStatus.deleteAccount = sliceUtil.pendingPromise(\r\n state.promisesStatus.deleteAccount\r\n )\r\n })\r\n .addCase(deleteAccount.rejected, (state, { payload }) => {\r\n state.promisesStatus.deleteAccount = sliceUtil.rejectedPromise(payload)\r\n })\r\n\r\n /**\r\n * findCar\r\n */\r\n .addCase(findCar.pending, (state, action) => {\r\n state.promisesStatus.findCar = sliceUtil.pendingPromise(\r\n state.promisesStatus.findCar\r\n )\r\n })\r\n .addCase(findCar.fulfilled, (state, action) => {\r\n state.promisesStatus.findCar = sliceUtil.fulfilledPromise()\r\n })\r\n .addCase(findCar.rejected, (state, action) => {\r\n state.promisesStatus.findCar = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n },\r\n})\r\n\r\nexport default customerSlice.reducer\r\nexport const { actions } = customerSlice\r\nexport const selectCustomerStatus = (state: RootState) => ({\r\n customerSignedOut: !state.customer.role,\r\n customerSignedIn: state.customer.role === UserRole.User,\r\n customerSignedInAsGuest: state.customer.role === UserRole.Guest,\r\n})\r\n\r\nexport const stateSelectors = (state: RootState) => state.customer\r\n\r\nexport const selectEditCustomerDetailsFetchStatus = (state: RootState) =>\r\n state.customer.fetchingEditCustomerDetailsStatus\r\n\r\nexport const promiseStatusSelectors = (state: RootState) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n findCarStatus: sliceUtil.fetchStatus(promises.findCar),\r\n getCustomerDetailsStatus: sliceUtil.fetchStatus(\r\n promises.getCustomerDetails\r\n ),\r\n deleteAccountStatus: sliceUtil.fetchStatus(promises.deleteAccount),\r\n }\r\n}\r\n","import {\r\n ChangePasswordRequest,\r\n ConfirmRegisterData,\r\n ConfirmRegisterParams,\r\n CustomerDetails,\r\n EditCustomerParams,\r\n FindCarData,\r\n FindCarPayload,\r\n LoginRequest,\r\n LoginResult,\r\n PhoneNumberAvailableParams,\r\n PhoneNumberAvailableResult,\r\n RefreshTokenRequest,\r\n RefreshTokenResult,\r\n RegisterParams,\r\n RegisterResult,\r\n RemindPasswordParams,\r\n ResendRegistrationPinParams,\r\n ResetPasswordRequest,\r\n ResetPasswordResult,\r\n} from 'typedef/customer'\r\nimport axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport {\r\n CUSTOMER_CHANGE_PASSWORD,\r\n CUSTOMER_CONFIRM_REGISTER,\r\n CUSTOMER_DELETE,\r\n CUSTOMER_EDIT,\r\n CUSTOMER_FIND_MY_CAR,\r\n CUSTOMER_GET_DETAILS,\r\n CUSTOMER_LOGIN,\r\n CUSTOMER_PHONE_NO_IS_AVAILABLE,\r\n CUSTOMER_REFRESH_TOKEN,\r\n CUSTOMER_REGISTER,\r\n CUSTOMER_REMIND_PASSWORD,\r\n CUSTOMER_RESEND_REGISTRATION_PIN,\r\n CUSTOMER_RESET_PASSWORD,\r\n} from './constants'\r\nimport './mocks/CustomerApiMock'\r\nimport { getErrorCode } from './utils'\r\n\r\nexport const login = async (params: LoginRequest) => {\r\n try {\r\n const response = await axios.post>(\r\n CUSTOMER_LOGIN,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const getCustomerDetails = async () => {\r\n try {\r\n const axiosResponse = await axios.get(CUSTOMER_GET_DETAILS)\r\n const response = axiosResponse.data as Response\r\n return response.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const refreshToken = async (args: RefreshTokenRequest) => {\r\n try {\r\n const response = await axios.post>(\r\n CUSTOMER_REFRESH_TOKEN,\r\n {},\r\n {\r\n headers: { Authorization: `Bearer ${args.token}` },\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const editCustomer = async (params: EditCustomerParams) => {\r\n try {\r\n await axios.put(CUSTOMER_EDIT, params)\r\n return true\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const changePassword = async (args: ChangePasswordRequest) => {\r\n try {\r\n await axios.put(CUSTOMER_CHANGE_PASSWORD, args)\r\n return true\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const deleteAccount = async (password: string): Promise => {\r\n try {\r\n await axios.delete(CUSTOMER_DELETE, {\r\n data: {\r\n password,\r\n },\r\n })\r\n return true\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const remindPassword = async (args: RemindPasswordParams) => {\r\n try {\r\n await axios.post(CUSTOMER_REMIND_PASSWORD, args)\r\n return true\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const resetPassword = async (args: ResetPasswordRequest) => {\r\n try {\r\n const response = await axios.post>(\r\n CUSTOMER_RESET_PASSWORD,\r\n args\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const register = async (params: RegisterParams) => {\r\n try {\r\n const response = await axios.post>(\r\n CUSTOMER_REGISTER,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const confirmRegister = async (params: ConfirmRegisterParams) => {\r\n try {\r\n const response = await axios.put>(\r\n CUSTOMER_CONFIRM_REGISTER,\r\n params\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\n// TODO:\r\nexport const phoneNumberAvailable = async (\r\n params: PhoneNumberAvailableParams\r\n) => {\r\n try {\r\n const response = await axios.get>(\r\n CUSTOMER_PHONE_NO_IS_AVAILABLE,\r\n {\r\n params,\r\n }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n return getErrorCode(err)\r\n }\r\n}\r\n\r\nexport const resendRegistrationPin = async (\r\n params: ResendRegistrationPinParams\r\n): Promise => {\r\n try {\r\n await axios.post(CUSTOMER_RESEND_REGISTRATION_PIN, params)\r\n return true\r\n } catch {\r\n return false\r\n }\r\n}\r\n\r\nexport const findCar = async (params: FindCarPayload) =>\r\n axios\r\n .get>(CUSTOMER_FIND_MY_CAR, { params })\r\n .then(resp => {\r\n return resp.data.data\r\n })\r\n .catch(err => {\r\n throw err\r\n })\r\n","import axios, { mockedAxios } from '.'\r\n\r\nexport const setAuthHeader = (token: string) => {\r\n axios.defaults.headers.common['Authorization'] = `Bearer ${token}`\r\n mockedAxios.defaults.headers.common['Authorization'] = `Bearer ${token}`\r\n}\r\n\r\nexport const removeAuthHeader = () => {\r\n delete axios.defaults.headers.common['Authorization']\r\n delete mockedAxios.defaults.headers.common['Authorization']\r\n}\r\n","export default __webpack_public_path__ + \"static/media/american_express.a5528966.svg\";","export default __webpack_public_path__ + \"static/media/diners_club.bf6d630c.svg\";","export default __webpack_public_path__ + \"static/media/discover.24f71039.svg\";","export default __webpack_public_path__ + \"static/media/jcb.f8bc70ae.svg\";","export default __webpack_public_path__ + \"static/media/master_card.80ba1409.svg\";","export default __webpack_public_path__ + \"static/media/unknown.e8a7746e.svg\";","export default __webpack_public_path__ + \"static/media/visa.cf9d4300.svg\";","import americanExpress from '../assets/icons/credit_cards/american_express.svg'\r\nimport dinersClub from '../assets/icons/credit_cards/diners_club.svg'\r\nimport discover from '../assets/icons/credit_cards/discover.svg'\r\nimport jcb from '../assets/icons/credit_cards/jcb.svg'\r\nimport masterCard from '../assets/icons/credit_cards/master_card.svg'\r\nimport unknown from '../assets/icons/credit_cards/unknown.svg'\r\nimport visa from '../assets/icons/credit_cards/visa.svg'\r\nimport { CardType } from '../typedef/creditCards'\r\n\r\nexport const getCreditCardIcon = (type: CardType) => {\r\n switch (type) {\r\n case CardType.MasterCard:\r\n return masterCard\r\n case CardType.DinersClub:\r\n return dinersClub\r\n case CardType.Visa:\r\n return visa\r\n case CardType.JCB:\r\n return jcb\r\n case CardType.Discover:\r\n return discover\r\n case CardType.AmericanExpress:\r\n return americanExpress\r\n default:\r\n return unknown\r\n }\r\n}\r\n\r\nexport const getCreditCardType = (creditCardNumber: string): CardType => {\r\n const dict = [\r\n [CardType.Visa, /^4[0-9 ]*$/],\r\n [\r\n CardType.MasterCard,\r\n /^(5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9 ]*$/,\r\n ],\r\n [CardType.AmericanExpress, /^3[47][0-9 ]*$/],\r\n [CardType.DinersClub, /^3(0[0-5]|[68][0-9])[0-9 ]*$/],\r\n [CardType.Discover, /^6(011|5[0-9])[0-9 ]*$/],\r\n [CardType.JCB, /^(2131|1800|35)[0-9 ]*$/],\r\n ]\r\n\r\n const cardNumber = creditCardNumber.split(' ').join('')\r\n\r\n for (let i = 0; i < dict.length; i++) {\r\n const regexp = dict[i][1] as RegExp\r\n\r\n if (regexp.test(cardNumber)) return dict[i][0] as CardType\r\n }\r\n\r\n return CardType.Invalid\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport { creditCardsApiError } from 'api/apiErrors'\r\nimport * as CreditCardApi from 'api/CreditCardApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n ErrorData,\r\n FetchStatus,\r\n AddCreditCardPayload,\r\n CreditCard,\r\n GetCreditCardsPayload,\r\n GetCreditCardsData,\r\n RemoveCreditCardData,\r\n RemoveCreditCardPayload,\r\n} from 'typedef'\r\n\r\nimport { getCreditCardType } from 'utils/creditCardTypeMapper'\r\nimport { FETCH, initialPromiseStatus, CREDIT_CARDS } from './constants'\r\nimport { CreditCardsState } from './creditCardsSlice.types'\r\nimport * as sliceUtil from './slice.utils'\r\n\r\n/**\r\n * state\r\n */\r\nconst adapter = createEntityAdapter({\r\n selectId: card => card.creditCardId,\r\n})\r\nexport const initialPromiseStatuses: CreditCardsState['promisesStatus'] = {\r\n getCreditCards: initialPromiseStatus,\r\n addCreditCard: initialPromiseStatus,\r\n removeCreditCard: {},\r\n}\r\nconst initialState = adapter.getInitialState({\r\n promisesStatus: initialPromiseStatuses,\r\n})\r\n\r\n/**\r\n * thunks\r\n */\r\nexport const getCreditCards = createAsyncThunk<\r\n GetCreditCardsData,\r\n GetCreditCardsPayload,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CREDIT_CARDS}${FETCH}/getCreditCards`,\r\n async (arg, thunkApi) => {\r\n try {\r\n const response = await CreditCardApi.getCreditCards(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n creditCardsApiError.getCreditCards\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { creditCards } = api.getState() as RootState\r\n return !creditCards.promisesStatus.getCreditCards.status.includes(\r\n FetchStatus.Pending\r\n )\r\n },\r\n }\r\n)\r\nexport const addCreditCard = createAsyncThunk<\r\n CreditCard,\r\n AddCreditCardPayload,\r\n { rejectValue: ErrorData }\r\n>(`${CREDIT_CARDS}${FETCH}/addCreditCard`, async (arg, thunkApi) => {\r\n try {\r\n const response = await CreditCardApi.addCreditCard(arg)\r\n const cardType = getCreditCardType(arg.ccNumber)\r\n return {\r\n cardType,\r\n creditCardId: response.creditCardId,\r\n last4Digits: arg.ccNumber.slice(-4),\r\n zipCode: arg.zipCode,\r\n }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n creditCardsApiError.addCreditCard\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\nexport const removeCreditCard = createAsyncThunk<\r\n RemoveCreditCardData,\r\n RemoveCreditCardPayload,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${CREDIT_CARDS}${FETCH}/removeCreditCard`,\r\n async (arg, thunkApi) => {\r\n try {\r\n const response = await CreditCardApi.removeCreditCard(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n creditCardsApiError.addCreditCard\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { creditCards } = api.getState() as RootState\r\n if (!creditCards.promisesStatus.removeCreditCard[arg.creditCardId])\r\n return true\r\n return !creditCards.promisesStatus.removeCreditCard[\r\n arg.creditCardId\r\n ].status.includes(FetchStatus.Pending)\r\n },\r\n }\r\n)\r\n\r\n/**\r\n * reducers\r\n */\r\nconst creditCardsSlice = createSlice({\r\n name: CREDIT_CARDS,\r\n initialState,\r\n reducers: {\r\n resetPromiseStatus(\r\n state,\r\n { payload }: PayloadAction\r\n ) {\r\n if (payload === 'removeCreditCard') {\r\n state.promisesStatus[payload] = {}\r\n } else {\r\n state.promisesStatus[payload] = initialPromiseStatus\r\n }\r\n },\r\n addCard(state, { payload }: PayloadAction) {\r\n adapter.upsertOne(state, payload)\r\n },\r\n removeCard(state, { payload }: PayloadAction) {\r\n adapter.removeOne(state, payload)\r\n },\r\n removeCardZip(state, { payload }: PayloadAction) {\r\n adapter.updateOne(state, { id: payload, changes: { zipCode: '' } })\r\n },\r\n },\r\n extraReducers: builder => {\r\n /**\r\n * getCreditCards\r\n */\r\n builder.addCase(getCreditCards.pending, ({ promisesStatus }, action) => {\r\n promisesStatus.getCreditCards = sliceUtil.pendingPromise(\r\n promisesStatus.getCreditCards,\r\n action\r\n )\r\n })\r\n builder.addCase(getCreditCards.fulfilled, (state, action) => {\r\n if (\r\n // eslint-disable-next-line\r\n state.promisesStatus.getCreditCards.requestId != action.meta.requestId\r\n )\r\n return\r\n state.promisesStatus.getCreditCards = sliceUtil.fulfilledPromise()\r\n adapter.setAll(state, action.payload.creditCards)\r\n })\r\n builder.addCase(getCreditCards.rejected, (state, action) => {\r\n if (\r\n // eslint-disable-next-line\r\n state.promisesStatus.getCreditCards.requestId != action.meta.requestId\r\n )\r\n return\r\n state.promisesStatus.getCreditCards = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * addCreditCard\r\n */\r\n builder.addCase(addCreditCard.pending, ({ promisesStatus }) => {\r\n promisesStatus.addCreditCard = sliceUtil.pendingPromise(\r\n promisesStatus.addCreditCard\r\n )\r\n })\r\n builder.addCase(addCreditCard.fulfilled, (state, { payload }) => {\r\n state.promisesStatus.addCreditCard = sliceUtil.fulfilledPromise()\r\n adapter.addOne(state, payload)\r\n })\r\n builder.addCase(addCreditCard.rejected, (state, action) => {\r\n state.promisesStatus.addCreditCard = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n /**\r\n * removeCreditCard\r\n */\r\n builder.addCase(removeCreditCard.fulfilled, (state, action) => {\r\n const { creditCardId } = action.meta.arg\r\n state.promisesStatus.removeCreditCard[creditCardId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n adapter.removeOne(state, creditCardId)\r\n })\r\n builder.addCase(removeCreditCard.pending, (state, action) => {\r\n const { creditCardId } = action.meta.arg\r\n state.promisesStatus.removeCreditCard[creditCardId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Pending],\r\n }\r\n })\r\n builder.addCase(removeCreditCard.rejected, (state, action) => {\r\n const { creditCardId } = action.meta.arg\r\n state.promisesStatus.removeCreditCard[creditCardId] = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n },\r\n})\r\n\r\nexport default creditCardsSlice.reducer\r\nexport const { actions } = creditCardsSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const stateSelectors = (state: RootState) => state.creditCards\r\nexport const {\r\n selectAll,\r\n selectById,\r\n selectEntities,\r\n selectIds,\r\n selectTotal,\r\n} = adapter.getSelectors(stateSelectors)\r\n\r\nexport const promiseStatusSelectors = (\r\n state: RootState,\r\n creditCardId?: string\r\n) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getCreditCardsStatus: sliceUtil.fetchStatus(promises.getCreditCards),\r\n addCreditCardStatus: sliceUtil.fetchStatus(promises.addCreditCard),\r\n removeCreditCardStatus: creditCardId\r\n ? sliceUtil.fetchStatus(promises.removeCreditCard[creditCardId])\r\n : null,\r\n }\r\n}\r\n","import axios from '.'\r\nimport { Response } from '../typedef/api'\r\nimport {\r\n AddCreditCardData,\r\n AddCreditCardPayload,\r\n GetCreditCardsPayload,\r\n GetCreditCardsData,\r\n RemoveCreditCardData,\r\n RemoveCreditCardPayload,\r\n} from '../typedef/creditCards'\r\nimport { CREDIT_CARD } from './constants'\r\nimport './mocks/CreditCardApiMock'\r\n\r\nexport const getCreditCards = async (arg: GetCreditCardsPayload) => {\r\n try {\r\n const params = { lotId: arg.lotId }\r\n const response = await axios.get>(\r\n CREDIT_CARD,\r\n { params }\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const addCreditCard = async (arg: AddCreditCardPayload) => {\r\n try {\r\n const response = await axios.post>(\r\n CREDIT_CARD,\r\n arg\r\n )\r\n return response.data.data\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n\r\nexport const removeCreditCard = async (arg: RemoveCreditCardPayload) => {\r\n try {\r\n const lotId = arg.lotId ? `${arg.lotId}/` : ''\r\n await axios.delete>(\r\n `${CREDIT_CARD}/${lotId}${arg.creditCardId}`\r\n )\r\n return true\r\n } catch (err) {\r\n throw err\r\n }\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n} from '@reduxjs/toolkit'\r\nimport * as validatorsApi from 'api/ValidatorsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n Partner,\r\n FetchStatus,\r\n GetValidatorsParams,\r\n ValidateCodeParams,\r\n GetValidatorsData,\r\n ErrorData,\r\n ValidateCodeUpfrontParams,\r\n} from 'typedef'\r\nimport { PromiseStatus } from 'store/slices/slices.types'\r\nimport { validatorsApiError } from 'api/apiErrors'\r\nimport { FETCH, initialPromiseStatus, COUPON } from 'store/slices/constants'\r\nimport { sliceUtil } from 'store/slices'\r\n\r\nconst validateAdapter = createEntityAdapter({\r\n selectId: partner => partner.couponId,\r\n})\r\n\r\ninterface ValidateState {\r\n error: number | null\r\n carId?: string\r\n lotId?: string\r\n promisesStatus: {\r\n getValidators: PromiseStatus\r\n }\r\n sendValidateCodeStatus: FetchStatus\r\n sendValidateCodeUpfrontStatus: FetchStatus\r\n}\r\n\r\nconst initialState = validateAdapter.getInitialState({\r\n sendValidateCodeStatus: FetchStatus.Idle,\r\n sendValidateCodeUpfrontStatus: FetchStatus.Idle,\r\n carId: null,\r\n lotId: null,\r\n promisesStatus: {\r\n getValidators: initialPromiseStatus,\r\n },\r\n error: null,\r\n})\r\n\r\nexport const getValidators = createAsyncThunk<\r\n GetValidatorsData,\r\n GetValidatorsParams,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${COUPON}${FETCH}/getValidators`,\r\n async (params, thunkApi) => {\r\n try {\r\n const response = await validatorsApi.getValidators(params)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n validatorsApiError.getValidators\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { validators } = api.getState() as RootState\r\n if (arg.carId === validators.carId && arg.lotId === validators.lotId) {\r\n if (\r\n validators.promisesStatus.getValidators.status.includes(\r\n FetchStatus.Pending\r\n )\r\n )\r\n return false\r\n }\r\n },\r\n }\r\n)\r\n\r\nexport const validateCode = createAsyncThunk<\r\n boolean,\r\n ValidateCodeParams,\r\n { rejectValue: ErrorData }\r\n>(`${COUPON}${FETCH}/validateCode`, async (payload, thunkApi) => {\r\n try {\r\n const response = await validatorsApi.validateCode(payload)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n validatorsApiError.validateCode\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const validateCodeUpfront = createAsyncThunk<\r\n boolean,\r\n ValidateCodeUpfrontParams,\r\n { rejectValue: ErrorData }\r\n>(`${COUPON}${FETCH}/validateCodeUpfront`, async (payload, thunkApi) => {\r\n try {\r\n const response = await validatorsApi.validateCodeUpfront(payload)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n validatorsApiError.validateCode\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nconst validatorsSlice = createSlice({\r\n name: COUPON,\r\n initialState,\r\n reducers: {},\r\n extraReducers: builder => {\r\n /**\r\n * getValidators\r\n */\r\n builder.addCase(getValidators.pending, ({ promisesStatus }, action) => {\r\n const init =\r\n promisesStatus.getValidators.requestId !== action.meta.requestId\r\n ? initialPromiseStatus\r\n : promisesStatus.getValidators\r\n promisesStatus.getValidators = sliceUtil.pendingPromise(init, action)\r\n })\r\n builder.addCase(getValidators.fulfilled, (state, action) => {\r\n if (\r\n state.promisesStatus.getValidators.requestId !== action.meta.requestId\r\n )\r\n return\r\n state.promisesStatus.getValidators = sliceUtil.fulfilledPromise()\r\n state.carId = action.meta.arg.carId\r\n state.lotId = action.meta.arg.lotId\r\n validateAdapter.setAll(state, action.payload.partners)\r\n })\r\n builder\r\n .addCase(getValidators.rejected, (state, action) => {\r\n if (\r\n state.promisesStatus.getValidators.requestId !== action.meta.requestId\r\n )\r\n return\r\n state.promisesStatus.getValidators = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n //Validate code\r\n .addCase(validateCode.fulfilled, (state, action) => {\r\n state.sendValidateCodeStatus = FetchStatus.Fulfilled\r\n })\r\n .addCase(validateCode.pending, (state, action) => {\r\n state.sendValidateCodeStatus = FetchStatus.Pending\r\n })\r\n .addCase(validateCode.rejected, (state, action) => {\r\n state.sendValidateCodeStatus = FetchStatus.Rejected\r\n })\r\n\r\n //Validate code upfront\r\n .addCase(validateCodeUpfront.fulfilled, (state, action) => {\r\n state.sendValidateCodeUpfrontStatus = FetchStatus.Fulfilled\r\n })\r\n .addCase(validateCodeUpfront.pending, (state, action) => {\r\n state.sendValidateCodeUpfrontStatus = FetchStatus.Pending\r\n })\r\n .addCase(validateCodeUpfront.rejected, (state, action) => {\r\n state.sendValidateCodeUpfrontStatus = FetchStatus.Rejected\r\n })\r\n },\r\n})\r\n\r\nexport default validatorsSlice.reducer\r\n\r\nexport const stateSelectors = (state: RootState) => state.validators\r\nexport const {\r\n selectAll: selectAllValidators,\r\n selectById: selectValidatorById,\r\n selectIds: selectValidatorIds,\r\n} = validateAdapter.getSelectors(state => state.validators)\r\n\r\nexport const selectSendValidateCodeStatus = (state: RootState) =>\r\n state.validators.sendValidateCodeStatus\r\nexport const selectSendValidateCodeUpfrontStatus = (state: RootState) =>\r\n state.validators.sendValidateCodeUpfrontStatus\r\nexport const promiseStatusSelectors = (state: RootState) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getValidatorsStatus: sliceUtil.fetchStatus(promises.getValidators),\r\n }\r\n}\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\r\nimport { termsApiError } from 'api/apiErrors'\r\nimport * as termsApi from 'api/TermsAndConditionsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport i18n from 'i18n'\r\nimport { RootState } from 'store/rootReducer'\r\nimport { FETCH, initialPromiseStatus, TERMS } from 'store/slices/constants'\r\nimport * as sliceUtil from 'store/slices/slice.utils'\r\nimport { ErrorData, FetchStatus, GetTermsAndConditionsParams } from 'typedef'\r\nimport { Terms, TermsAndConditionState } from './termsSlice.types'\r\n\r\n/**\r\n * state\r\n */\r\nexport const initialPromiseStatuses = {\r\n getTerms: initialPromiseStatus,\r\n}\r\nexport const initialState: TermsAndConditionState = {\r\n terms: {},\r\n lang: null,\r\n logoLink: '',\r\n promisesStatus: initialPromiseStatuses,\r\n}\r\n\r\n/**\r\n * thunks\r\n */\r\n\r\nexport const getTerms = createAsyncThunk<\r\n Terms,\r\n GetTermsAndConditionsParams,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${TERMS}${FETCH}/getTerms`,\r\n async (arg, thunkApi) => {\r\n try {\r\n thunkApi.dispatch(termsSlice.actions.setLang({ lang: i18n.language }))\r\n const response = await termsApi.getTerms({\r\n ...arg,\r\n languageCode: i18n.language,\r\n })\r\n return {\r\n languageCode: i18n.language,\r\n lotId: arg.lotId,\r\n type: arg.type,\r\n text: response.text,\r\n }\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n termsApiError.getTerms\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n },\r\n {\r\n condition: (arg, api) => {\r\n const { terms } = api.getState() as RootState\r\n const { lotId, text, type } = terms.terms\r\n if (\r\n // eslint-disable-next-line\r\n lotId == arg.lotId &&\r\n // eslint-disable-next-line\r\n type == arg.type &&\r\n text\r\n ) {\r\n return false\r\n }\r\n },\r\n }\r\n)\r\n\r\nconst termsSlice = createSlice({\r\n name: TERMS,\r\n initialState,\r\n reducers: {\r\n setTerms(state, { payload }: PayloadAction) {\r\n state.terms = payload\r\n },\r\n setLang(state, { payload }: PayloadAction<{ lang: string }>) {\r\n state.lang = payload.lang\r\n },\r\n setLogoLink(state, { payload }: PayloadAction) {\r\n state.logoLink = payload\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(getTerms.fulfilled, (state, action) => {\r\n termsSlice.caseReducers.setTerms(state, action)\r\n state.promisesStatus.getTerms = {\r\n ...initialPromiseStatus,\r\n status: [FetchStatus.Fulfilled],\r\n }\r\n })\r\n .addCase(getTerms.pending, ({ promisesStatus }) => {\r\n promisesStatus.getTerms.status = promisesStatus.getTerms.status.concat(\r\n FetchStatus.Pending\r\n )\r\n })\r\n .addCase(getTerms.rejected, (state, action) => {\r\n state.promisesStatus.getTerms = {\r\n ...action.payload,\r\n status: [FetchStatus.Rejected],\r\n }\r\n })\r\n },\r\n})\r\n\r\nexport default termsSlice.reducer\r\nexport const { actions } = termsSlice\r\n\r\nexport const stateSelectors = (state: RootState) => state.terms\r\nexport const promiseStatusSelectors = (state: RootState) => {\r\n const promises = stateSelectors(state).promisesStatus\r\n return {\r\n getTermstatus: sliceUtil.fetchStatus(promises.getTerms),\r\n }\r\n}\r\n","import { Currency, CurrencyFormat } from 'typedef/ticket'\r\nimport { layoutSlice } from 'store/slices'\r\nimport {\r\n LotCustomStyles,\r\n CustomStylesElement,\r\n CustomStylesValue,\r\n} from 'typedef'\r\nimport bg from 'assets/images/bg.png'\r\nimport localCurrency from 'locale-currency'\r\n\r\nexport const centsToDollars = (amount?: number, currency?: string) => {\r\n if (typeof amount !== 'number') {\r\n return !!currency ? `${currency} -` : '-'\r\n }\r\n\r\n return !!currency\r\n ? `${currency}${(amount / 100).toLocaleString(undefined, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n })}`\r\n : (amount / 100).toLocaleString(undefined, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n })\r\n}\r\n/**\r\n * @param number: with country code (+48123123123)\r\n * @param contryCode: integer\r\n */\r\nexport const trimCountryCode = (number: string, countryCode: number) => {\r\n if (!number || !countryCode) return ''\r\n return number.slice(1).replace(countryCode.toString(), '')\r\n}\r\n\r\nexport const isPageRefreshed = () => {\r\n return window.performance && performance.navigation.type === 1\r\n}\r\n\r\nexport const formatCurrency = (currency: Currency, amount = 0) => {\r\n if (!currency) return null\r\n const { cultureName, currencyFormat, currencySymbol } = currency\r\n if (\r\n currencyFormat !== CurrencyFormat.BeforeAmount &&\r\n currencyFormat !== CurrencyFormat.AfterAmount\r\n ) {\r\n if (currencySymbol) {\r\n return `${currencySymbol}${(amount / 100).toLocaleString(undefined, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n })}`\r\n } else {\r\n if (!cultureName) return '-'\r\n const formattedCultureName = cultureName.replace('_', '-')\r\n const currency = localCurrency.getCurrency(cultureName)\r\n return new Intl.NumberFormat(formattedCultureName, {\r\n style: 'currency',\r\n currency,\r\n }).format(amount / 100)\r\n }\r\n }\r\n if (currencyFormat === CurrencyFormat.BeforeAmount) {\r\n return `${currencySymbol}${(amount / 100).toLocaleString(undefined, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n })}`\r\n }\r\n if (currencyFormat === CurrencyFormat.AfterAmount) {\r\n return `${(amount / 100).toLocaleString(undefined, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n })}${currencySymbol}`\r\n }\r\n}\r\n\r\nexport const chunk = (arr: any[], size: number) =>\r\n Array.from({ length: Math.ceil(arr.length / size) }, (v, i) =>\r\n arr.slice(i * size, i * size + size)\r\n )\r\n\r\nexport const parseCustomStyles = (\r\n arg?: LotCustomStyles[]\r\n): layoutSlice.LayoutState['customStyles'] => {\r\n let cardBgUrl = '#fff'\r\n let headerBgUrl = bg\r\n if (!arg) return { cardBgUrl, headerBgUrl }\r\n const header = arg.find(el => el.elementType === CustomStylesElement.Header)\r\n const cardBg = arg.find(\r\n el => el.elementType === CustomStylesElement.CardBackground\r\n )\r\n if (header && header.valueType === CustomStylesValue.Url) {\r\n headerBgUrl = header.value\r\n }\r\n if (cardBg && cardBg.valueType === CustomStylesValue.Url) {\r\n cardBgUrl = cardBg.value\r\n }\r\n return { cardBgUrl, headerBgUrl }\r\n}\r\n","import moment from 'moment'\r\nimport 'moment/min/locales'\r\n// import momentDurationFormatSetup from 'moment-duration-format'\r\n// var moment = require('moment')\r\nimport momentDurationFormatSetup from 'moment-duration-format'\r\nmomentDurationFormatSetup(moment as any)\r\n\r\nexport const timeSpanFormat = 'HH:mm'\r\nexport const getDate = (arg: string | Date) => moment(arg).format('L')\r\n\r\nexport const isValid = (endDate: string | Date) =>\r\n moment(endDate).startOf('minute') >= moment().startOf('minute')\r\n\r\nexport interface CountDiffParkingTimeArgs {\r\n /** Current time on lot at its zone */\r\n currParkingTime: string\r\n /** Current time on lot at local zone */\r\n currLocalTime: number\r\n /** End parking time at lot zone*/\r\n endParkingTime: string\r\n}\r\ntype CountDiffParkingTime = (\r\n args: CountDiffParkingTimeArgs\r\n) => /** Time difference */ number\r\nexport const countDiffParkingTime: CountDiffParkingTime = ({\r\n currParkingTime,\r\n currLocalTime,\r\n endParkingTime,\r\n}) => {\r\n return (\r\n +moment(endParkingTime) -\r\n +moment(currParkingTime) -\r\n (Date.now() - currLocalTime) +\r\n 55000\r\n )\r\n}\r\nexport const countParkTime = (parkStateDate: string, parkEndDate: string) => {\r\n const dateFormat = 'd[D] h[H] m[M] '\r\n const time = moment.duration(\r\n moment(parkEndDate)\r\n .startOf('minute')\r\n .diff(moment(parkStateDate).startOf('minute')),\r\n 'milliseconds'\r\n )\r\n return time.format(dateFormat, {\r\n minValue: 1,\r\n trim: 'all',\r\n useSignificantDigits: true,\r\n })\r\n}\r\nexport const getMinutesHoursDays = (diff: number) => {\r\n if (!diff) {\r\n console.warn('Parking time error')\r\n return { days: 0, hours: 0, minutes: 0 }\r\n }\r\n if (diff < 0) {\r\n return { days: 0, hours: 0, minutes: 0 }\r\n }\r\n const day = 1000 * 3600 * 24\r\n const hour = 1000 * 3600\r\n const minute = 1000 * 60\r\n const days = parseInt((diff / day).toString())\r\n const hours = parseInt(((diff - days * day) / hour).toString())\r\n const minutes = parseInt(\r\n ((diff - days * day - hours * hour) / minute).toString()\r\n )\r\n return { days, hours, minutes }\r\n}\r\n\r\nexport const formatParkingtime = (diff: number) => {\r\n const { days, hours, minutes } = getMinutesHoursDays(diff)\r\n let timeString = ''\r\n if (days) {\r\n timeString = `${days}D`\r\n }\r\n if (hours) {\r\n timeString = `${timeString} ${hours}H`\r\n }\r\n if (minutes) {\r\n timeString = `${timeString} ${minutes}M`\r\n }\r\n return timeString\r\n}\r\n\r\nexport const getDateWithCustomTime = (\r\n fullDate: moment.MomentInput,\r\n time: string /**01:25:20 */\r\n) => {\r\n if (!fullDate || !time || time.length < 8) return null\r\n const hour = parseInt(time.slice(0, 2))\r\n const minute = parseInt(time.slice(3, 5))\r\n const second = parseInt(time.slice(6, 8))\r\n const fullMomentDate = moment(fullDate)\r\n .hour(hour)\r\n .minute(minute)\r\n .second(second)\r\n return { hour, minute, second, fullMomentDate }\r\n}\r\n\r\ntype GetDurationString = (\r\n beginTime: string,\r\n expireTime: string,\r\n /** in minutes*/ paymentTime: number,\r\n /** in minutes*/ parkingExitTime: number,\r\n dateFormat?: string\r\n) => string\r\nexport const getDurationString: GetDurationString = (\r\n beginTime,\r\n expireTime,\r\n paymentTime,\r\n parkingExitTime,\r\n dateFormat\r\n) => {\r\n const defaultDateFormat = dateFormat ? dateFormat : 'd __ h __ m __'\r\n const duration = moment.duration(\r\n moment(expireTime)\r\n .startOf('minute')\r\n .diff(moment(beginTime).startOf('minute')) -\r\n (paymentTime + parkingExitTime) * 60 * 1000,\r\n 'milliseconds'\r\n )\r\n return duration.format(defaultDateFormat, {\r\n minValue: 1,\r\n trim: 'all',\r\n useSignificantDigits: true,\r\n })\r\n}\r\n\r\nexport const apiDateFormat = (date: string) =>\r\n moment(date).format('YYYY-MM-DDTHH:mm:SS')\r\n","import { FormikErrors } from 'formik'\r\nimport i18n from 'i18next'\r\nimport { ErrorCode } from 'typedef/api'\r\nimport { Popup } from 'typedef/popup'\r\nimport Translations from 'utils/translations'\r\n\r\nexport const handleFormikErrors = (\r\n errors: FormikErrors>,\r\n handleValid: () => void,\r\n handleInvalid: (arg: string) => void\r\n) => {\r\n const entries = Object.entries(errors)\r\n if (entries.length === 0) {\r\n handleValid()\r\n } else {\r\n entries.forEach(el => {\r\n if (typeof el[1] === 'string') {\r\n handleInvalid(el[1])\r\n }\r\n })\r\n }\r\n}\r\n/**\r\n * @deprecated\r\n * */\r\ntype GetErrorPopupProps = (e: ErrorCode) => Popup\r\nexport const getErrorPopupProps: GetErrorPopupProps = errorCode => {\r\n const popupProps: Popup = {\r\n title: i18n.t(Translations.OOPS),\r\n description: i18n.t(Translations.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN),\r\n variant: 'warning' as const,\r\n }\r\n\r\n return popupProps\r\n}\r\n","export const phoneNumberRegex = /^\\d+$/\r\nexport const expDateRegex = /([1][0-2]|[0][1-9]) \\/ \\d{4}/\r\nexport const licencePlateRegex = /^[a-zA-Z0-9\\s]+$/\r\nexport const countryCodeRegex = /^(\\+?\\d{1,3}|\\d{1,4})$/\r\nexport const allowedCodeCharactersRegex = /^[0-9]$/\r\nexport const zipCodeRegex = /^[\\w\\-\\s]+$/\r\n","export const blurLastInput = (e: any) => {\r\n if (e.key === 'Enter') {\r\n e.preventDefault()\r\n e.target.blur()\r\n }\r\n}\r\n","import {\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n PayloadAction,\r\n} from '@reduxjs/toolkit'\r\nimport { LotApiError } from 'api/apiErrors/LotApiError'\r\nimport { LOTS_SIMULATED_PRICES } from 'api/constants'\r\nimport * as lotApi from 'api/LotApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n ErrorData,\r\n GetSimulatedPricesRequest,\r\n GetSimulatedPricesResponse,\r\n SimulatedPrice,\r\n} from 'typedef'\r\nimport { formatCurrency } from 'utils'\r\nimport { SIMULATE_PRICE } from './constants'\r\nimport * as mapSlice from './mapSlice'\r\n\r\n/**\r\n * state\r\n */\r\nexport interface SimulatePriceState {\r\n pricingMode: boolean\r\n idsToOmit: string[]\r\n /** 2020-09-28T10:30:00 */\r\n simulateStartTime?: string\r\n /** 2020-09-28T11:30:00 */\r\n simulateEndTime?: string\r\n pendingCallsNumber: number\r\n}\r\nconst simulatePriceAdapter = createEntityAdapter({\r\n selectId: en => en.parkingLotId,\r\n})\r\n\r\nconst initialState = simulatePriceAdapter.getInitialState({\r\n idsToOmit: [],\r\n pricingMode: false,\r\n simulateStartTime: null,\r\n simulateEndTime: null,\r\n pendingCallsNumber: 0,\r\n})\r\n/**\r\n * thunks\r\n */\r\nexport const getSimulatedPrices = createAsyncThunk<\r\n GetSimulatedPricesResponse,\r\n GetSimulatedPricesRequest,\r\n { rejectValue: ErrorData & { skip?: boolean } }\r\n>(LOTS_SIMULATED_PRICES, async (params, thunkApi) => {\r\n try {\r\n const res = await lotApi.getSimulatedPrices(params)\r\n return res\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n LotApiError.getLots\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\n/**\r\n * reducers\r\n */\r\nconst simulatePriceSlice = createSlice({\r\n name: SIMULATE_PRICE,\r\n initialState,\r\n reducers: {\r\n addPrices(state, { payload }: PayloadAction) {\r\n simulatePriceAdapter.upsertMany(state, payload)\r\n },\r\n addIdsToOmit(state, { payload }: PayloadAction) {\r\n state.idsToOmit = [...state.idsToOmit, ...payload]\r\n },\r\n removeIdsFromOmit(state, { payload }: PayloadAction) {\r\n state.idsToOmit = state.idsToOmit.filter(el => payload.includes(el))\r\n },\r\n setDates(\r\n state,\r\n {\r\n payload,\r\n }: PayloadAction<{\r\n /** 2020-09-28T10:30:00 */\r\n simulateStartTime: string\r\n /** 2020-09-28T11:30:00 */\r\n simulateEndTime: string\r\n }>\r\n ) {\r\n state.simulateStartTime = payload.simulateStartTime\r\n state.simulateEndTime = payload.simulateEndTime\r\n },\r\n setPricingMode(state, { payload }: PayloadAction) {\r\n state.pricingMode = payload\r\n },\r\n resetState(state) {\r\n Object.assign(state, initialState)\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(getSimulatedPrices.fulfilled, (state, action) => {\r\n simulatePriceSlice.caseReducers.addPrices(state, action)\r\n state.pendingCallsNumber = state.pendingCallsNumber - 1\r\n })\r\n .addCase(getSimulatedPrices.pending, (state, action) => {\r\n const fwdAction = simulatePriceSlice.actions.addIdsToOmit(\r\n action.meta.arg.parkings\r\n )\r\n simulatePriceSlice.caseReducers.addIdsToOmit(state, fwdAction)\r\n state.pendingCallsNumber = state.pendingCallsNumber + 1\r\n })\r\n .addCase(getSimulatedPrices.rejected, (state, action) => {\r\n const fwdAction = simulatePriceSlice.actions.removeIdsFromOmit(\r\n action.meta.arg.parkings\r\n )\r\n simulatePriceSlice.caseReducers.removeIdsFromOmit(state, fwdAction)\r\n state.pendingCallsNumber = state.pendingCallsNumber - 1\r\n })\r\n },\r\n})\r\n\r\nexport const { actions } = simulatePriceSlice\r\n\r\n/**\r\n * selectors\r\n */\r\nexport const stateSelectors = (state: RootState) => state.simulatedPrices\r\nexport const { selectAll, selectById, selectEntities, selectIds, selectTotal } =\r\n simulatePriceAdapter.getSelectors((state: RootState) => state.simulatedPrices)\r\n\r\nexport const selectByIds = (state: RootState, ids: string[] = []) => {\r\n const entities = selectEntities(state)\r\n return ids.map(id => entities[id]).filter(el => el)\r\n}\r\n\r\nexport const selectMissingPricesLots = (state: RootState) => {\r\n const mapLots = mapSlice.selectLotsIdsWithinMap(state)\r\n const { noClusteredLots } = mapSlice.stateSelectors(state)\r\n const { idsToOmit } = stateSelectors(state)\r\n const missing = mapLots.filter(el => !idsToOmit.includes(el))\r\n if (missing.length < 24) {\r\n return missing\r\n } else {\r\n return noClusteredLots.filter(el => !idsToOmit.includes(el))\r\n }\r\n}\r\n\r\nexport const selectPriceString = (state: RootState, id: string) => {\r\n if (!id) return ''\r\n const simulatedPrice = selectById(state, id)\r\n return formatCurrency(\r\n simulatedPrice?.currency,\r\n simulatedPrice?.simulatedPrice\r\n )\r\n}\r\n\r\nexport const selectAvailableCallsNumber = (state: RootState) =>\r\n 5 - stateSelectors(state).pendingCallsNumber\r\n\r\nexport default simulatePriceSlice.reducer\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\r\nimport { needHelpApi, receiptsApi } from 'api'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { RootState } from 'store/rootReducer'\r\nimport {\r\n AddContactInformationsPayload,\r\n AddContactInformationsData,\r\n GetContactInformationsData,\r\n ErrorData,\r\n SendVerificationSMSData,\r\n SendVerificationSMSPayload,\r\n ParkCarData,\r\n} from 'typedef'\r\nimport { CONTACT_INFORMATIONS } from './constants'\r\nimport { ContactInformationState } from './contactInformationsSlice.types'\r\nimport { customerSlice } from '.'\r\nimport {\r\n GetCompanyContactInfoParams,\r\n GetCompanyContactInfoResult,\r\n} from 'typedef/companyDetails'\r\n\r\nexport const initialState: ContactInformationState = {\r\n contactDataRequired: null,\r\n customerHasEmail: null,\r\n paymentRedirectionAvailable: null,\r\n}\r\n\r\nexport const sendVerificationSMS = createAsyncThunk<\r\n SendVerificationSMSData,\r\n SendVerificationSMSPayload,\r\n { rejectValue: ErrorData }\r\n>(`${CONTACT_INFORMATIONS}/sendVerificationSMS`, async (arg, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.sendVerificationSMS(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const resendVerificationSMS = createAsyncThunk<\r\n SendVerificationSMSData,\r\n SendVerificationSMSData,\r\n { rejectValue: ErrorData }\r\n>(`${CONTACT_INFORMATIONS}/resendVerificationSMS`, async (arg, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.resendVerificationSMS(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const addContactInformations = createAsyncThunk<\r\n AddContactInformationsData,\r\n AddContactInformationsPayload,\r\n { rejectValue: ErrorData }\r\n>(`${CONTACT_INFORMATIONS}/addContactInformations`, async (arg, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.addContactInformations(arg)\r\n if (response.newTokens) {\r\n thunkApi.dispatch(customerSlice.actions.setLogin(response.newTokens))\r\n }\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getContactInformations = createAsyncThunk<\r\n GetContactInformationsData,\r\n null,\r\n { rejectValue: ErrorData }\r\n>(`${CONTACT_INFORMATIONS}/getContactInformations`, async (_, thunkApi) => {\r\n try {\r\n const response = await receiptsApi.getContactInformations()\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getCompanyContactInfo = createAsyncThunk<\r\n GetCompanyContactInfoResult,\r\n GetCompanyContactInfoParams,\r\n { rejectValue: ErrorData }\r\n>(`${CONTACT_INFORMATIONS}/getCompanyContactInfo`, async (arg, thunkApi) => {\r\n try {\r\n const response = await needHelpApi.getCompanyContactInfo(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(getErrorCode(error))\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nconst contactInformationsSlice = createSlice({\r\n name: CONTACT_INFORMATIONS,\r\n initialState,\r\n reducers: {\r\n setRequirements(\r\n state,\r\n {\r\n payload,\r\n }: PayloadAction<\r\n Pick<\r\n ParkCarData,\r\n | 'contactDataRequired'\r\n | 'customerHasEmail'\r\n | 'paymentRedirectionAvailable'\r\n >\r\n >\r\n ) {\r\n state.contactDataRequired = payload.contactDataRequired\r\n state.customerHasEmail = payload.customerHasEmail\r\n state.paymentRedirectionAvailable = payload.paymentRedirectionAvailable\r\n },\r\n resetState(state) {\r\n state.contactDataRequired = null\r\n state.customerHasEmail = null\r\n state.paymentRedirectionAvailable = null\r\n },\r\n },\r\n})\r\n\r\nexport default contactInformationsSlice.reducer\r\nexport const { actions } = contactInformationsSlice\r\nexport const stateSelectors = (state: RootState) => state.contactInformations\r\n","import {\r\n PayloadAction,\r\n createAsyncThunk,\r\n createEntityAdapter,\r\n createSlice,\r\n} from '@reduxjs/toolkit'\r\nimport {\r\n AcceptToSParams,\r\n ErrorData,\r\n GetTermsOfServiceContentParams,\r\n ShowForCustomerParams,\r\n ShowForCustomerResult,\r\n TermsOfService,\r\n} from 'typedef'\r\nimport { FETCH, TERMS_OF_SERVICE, initialPromiseStatus } from './constants'\r\nimport * as termsApi from 'api/TermsAndConditionsApi'\r\nimport { getErrorCode, getErrorMessage } from 'api/utils'\r\nimport { termsApiError } from 'api'\r\nimport { TermsOfServiceState } from './termsOfServiceSlice.types'\r\nimport { sliceUtil } from '.'\r\nimport { RootState } from 'store/rootReducer'\r\n\r\nconst adapter = createEntityAdapter({\r\n selectId: tos => tos.termsAndConditionsId,\r\n})\r\nexport const initialPromiseStatuses: TermsOfServiceState['promisesStatus'] = {\r\n showForCustomer: initialPromiseStatus,\r\n accept: initialPromiseStatus,\r\n getTermsOfServiceContent: initialPromiseStatus,\r\n}\r\nconst initialState = adapter.getInitialState({\r\n promisesStatus: initialPromiseStatuses,\r\n termsOfService: {\r\n termsAndConditionsID: '',\r\n show: false,\r\n },\r\n termsOfServiceContent: '',\r\n})\r\n\r\nexport const showForCustomer = createAsyncThunk<\r\n ShowForCustomerResult,\r\n ShowForCustomerParams,\r\n { rejectValue: ErrorData }\r\n>(`${TERMS_OF_SERVICE}${FETCH}/showForCustomer`, async (arg, thunkApi) => {\r\n try {\r\n const response = await termsApi.showForCustomer(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n termsApiError.getTerms\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const accept = createAsyncThunk<\r\n boolean,\r\n AcceptToSParams,\r\n { rejectValue: ErrorData }\r\n>(`${TERMS_OF_SERVICE}${FETCH}/accept`, async (arg, thunkApi) => {\r\n try {\r\n const response = await termsApi.accept(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n termsApiError.getTerms\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n})\r\n\r\nexport const getTermsOfServiceContent = createAsyncThunk<\r\n string,\r\n GetTermsOfServiceContentParams,\r\n { rejectValue: ErrorData }\r\n>(\r\n `${TERMS_OF_SERVICE}${FETCH}/getTermsOfServiceContent`,\r\n async (arg, thunkApi) => {\r\n try {\r\n const response = await termsApi.getTermsOfServiceContent(arg)\r\n return response\r\n } catch (error) {\r\n const errorMessage = getErrorMessage(\r\n getErrorCode(error),\r\n termsApiError.getTerms\r\n )\r\n return thunkApi.rejectWithValue(errorMessage)\r\n }\r\n }\r\n)\r\n\r\nconst termsOfServiceSlice = createSlice({\r\n name: TERMS_OF_SERVICE,\r\n initialState,\r\n reducers: {\r\n showForCustomer(state, { payload }: PayloadAction) {\r\n state.termsOfService = payload\r\n },\r\n getTermsOfServiceContent(state, { payload }: PayloadAction) {\r\n state.termsOfServiceContent = payload\r\n },\r\n },\r\n extraReducers: builder => {\r\n // Show for customer\r\n builder.addCase(showForCustomer.pending, ({ promisesStatus }) => {\r\n promisesStatus.showForCustomer = sliceUtil.pendingPromise(\r\n promisesStatus.showForCustomer\r\n )\r\n })\r\n builder.addCase(\r\n showForCustomer.fulfilled,\r\n (state, { payload }: PayloadAction) => {\r\n state.promisesStatus.showForCustomer = sliceUtil.fulfilledPromise()\r\n state.termsOfService = payload\r\n }\r\n )\r\n builder.addCase(showForCustomer.rejected, (state, action) => {\r\n state.promisesStatus.showForCustomer = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n\r\n // Accept\r\n builder.addCase(accept.pending, ({ promisesStatus }) => {\r\n promisesStatus.accept = sliceUtil.pendingPromise(promisesStatus.accept)\r\n })\r\n builder.addCase(accept.fulfilled, state => {\r\n state.promisesStatus.accept = sliceUtil.fulfilledPromise()\r\n })\r\n builder.addCase(accept.rejected, (state, action) => {\r\n state.promisesStatus.accept = sliceUtil.rejectedPromise(action.payload)\r\n })\r\n\r\n // Get terms of service content\r\n builder.addCase(getTermsOfServiceContent.pending, ({ promisesStatus }) => {\r\n promisesStatus.getTermsOfServiceContent = sliceUtil.pendingPromise(\r\n promisesStatus.getTermsOfServiceContent\r\n )\r\n })\r\n builder.addCase(\r\n getTermsOfServiceContent.fulfilled,\r\n (state, { payload }: PayloadAction) => {\r\n state.promisesStatus.getTermsOfServiceContent =\r\n sliceUtil.fulfilledPromise()\r\n state.termsOfServiceContent = payload\r\n }\r\n )\r\n builder.addCase(getTermsOfServiceContent.rejected, (state, action) => {\r\n state.promisesStatus.getTermsOfServiceContent = sliceUtil.rejectedPromise(\r\n action.payload\r\n )\r\n })\r\n },\r\n})\r\n\r\nexport default termsOfServiceSlice.reducer\r\nexport const { actions } = termsOfServiceSlice\r\nexport const stateSelectors = (state: RootState) => state.termsOfService\r\n","import { Dispatch } from 'react'\r\nimport { Action, MiddlewareAPI } from 'redux'\r\nimport { customerSlice, sliceUtil } from 'store/slices'\r\nimport { UserRole } from 'typedef/customer'\r\n\r\nexport const refreshToken =\r\n (store: MiddlewareAPI) => (next: Dispatch) => (action: Action) => {\r\n const { customer } = store.getState()\r\n next(action)\r\n if (customer.role !== UserRole.Guest && customer.role !== UserRole.User)\r\n return\r\n if (sliceUtil.fetchStatus(customer.promisesStatus.refreshToken).pending)\r\n return\r\n if (!customer?.tokens) return\r\n const { expires } = customer.tokens\r\n const refreshThreshold = 60000\r\n\r\n if (expires < Date.now()) {\r\n store.dispatch(customerSlice.actions.destroySession())\r\n return\r\n }\r\n\r\n if (expires > Date.now() && expires - Date.now() < refreshThreshold) {\r\n store.dispatch(\r\n customerSlice.refreshToken({\r\n token: customer.tokens.refresh,\r\n })\r\n )\r\n }\r\n }\r\n\r\nexport default refreshToken\r\n","import { Dispatch } from 'react'\r\nimport { Action, MiddlewareAPI } from 'redux'\r\nimport { customerSlice, layoutSlice } from 'store/slices'\r\n\r\nexport const destroySession =\r\n (store: MiddlewareAPI) => (next: Dispatch) => (action: Action) => {\r\n if (action.type === customerSlice.actions.destroySession.type) {\r\n store.dispatch(customerSlice.actions.setLogout())\r\n store.dispatch(\r\n layoutSlice.actions.setLayout({\r\n layout: {\r\n center: true,\r\n hasTopBar: true,\r\n },\r\n bottomMenu: false,\r\n topbar: null,\r\n })\r\n )\r\n }\r\n next(action)\r\n }\r\n\r\nexport default destroySession\r\n","export const SHOW_POPUP = 'SHOW_POPUP'\r\nexport const CLOSE_POPUP = 'CLOSE_POPUP'\r\nexport const SHOW_TERMS = 'SHOW_TERMS'\r\nexport const CLOSE_TERMS = 'CLOSE_TERMS'\r\n","import { Actions } from './actions'\r\nimport { SHOW_POPUP, CLOSE_POPUP, SHOW_TERMS, CLOSE_TERMS } from './constants'\r\nimport { Popup } from '../../typedef/popup'\r\n\r\nexport type PopupState = {\r\n popup: Popup\r\n show: boolean\r\n showTerms: boolean\r\n}\r\n\r\nconst initialState: PopupState = {\r\n popup: {\r\n title: '',\r\n description: '',\r\n variant: 'info',\r\n handleAdditionalButtonClick: () => undefined,\r\n },\r\n show: false,\r\n showTerms: false,\r\n}\r\n\r\nexport const popupReducer = (\r\n state = initialState,\r\n action: Actions\r\n): PopupState => {\r\n switch (action.type) {\r\n case SHOW_POPUP:\r\n return {\r\n ...state,\r\n show: true,\r\n popup: action.popup,\r\n }\r\n case CLOSE_POPUP:\r\n return {\r\n ...state,\r\n show: false,\r\n }\r\n case SHOW_TERMS:\r\n return {\r\n ...state,\r\n showTerms: true,\r\n }\r\n case CLOSE_TERMS:\r\n return {\r\n ...state,\r\n showTerms: false,\r\n }\r\n default:\r\n return state\r\n }\r\n}\r\n","export const SHOW_LOADER = 'SHOW_LOADER'\r\nexport const HIDE_LOADER = 'HIDE_LOADER'\r\nexport const SHOW_LOADING_PAGE = 'SHOW_LOADING_PAGE'\r\nexport const HIDE_LOADING_PAGE = 'HIDE_LOADING_PAGE'\r\n","import { Actions } from './actions'\r\nimport {\r\n SHOW_LOADER,\r\n HIDE_LOADER,\r\n HIDE_LOADING_PAGE,\r\n SHOW_LOADING_PAGE,\r\n} from './constants'\r\n\r\nexport type LoaderState = {\r\n show: boolean\r\n showLoadingPage: boolean\r\n spinners: string[]\r\n}\r\n\r\nconst initialState: LoaderState = {\r\n show: false,\r\n showLoadingPage: false,\r\n spinners: [],\r\n}\r\n\r\nexport const loaderReducer = (\r\n state = initialState,\r\n action: Actions\r\n): LoaderState => {\r\n switch (action.type) {\r\n case SHOW_LOADER:\r\n return {\r\n ...state,\r\n spinners: [...state.spinners, ...action.spinnerNames],\r\n show: action.spinnerNames.length ? state.show : true,\r\n }\r\n\r\n case HIDE_LOADER:\r\n return {\r\n ...state,\r\n spinners: state.spinners.filter(\r\n el => !action.spinnerNames.includes(el)\r\n ),\r\n show: action.spinnerNames.length ? state.show : false,\r\n }\r\n case SHOW_LOADING_PAGE:\r\n return {\r\n ...state,\r\n showLoadingPage: true,\r\n }\r\n case HIDE_LOADING_PAGE:\r\n return {\r\n ...state,\r\n showLoadingPage: false,\r\n }\r\n default:\r\n return state\r\n }\r\n}\r\n","import { Action, combineReducers } from '@reduxjs/toolkit'\r\nimport { popupReducer } from './globalPopup/reducers'\r\nimport { loaderReducer } from './loader/reducers'\r\nimport { customerSlice } from './slices'\r\nimport adsReducer from './slices/adsSlice'\r\nimport carsReducer from './slices/carsSlice'\r\nimport creditCardsReducer from './slices/creditCardsSlice'\r\nimport customerReducer from './slices/customerSlice'\r\nimport layoutReducer from './slices/layoutSlice'\r\nimport mapReducer from './slices/mapSlice'\r\nimport parkCarReducer from './slices/parkCarSlice'\r\nimport receiptsReducer from './slices/receiptsSlice'\r\nimport simulatePriceReducer from './slices/simulatePriceSlice'\r\nimport termsReducer from './slices/termsSlice'\r\nimport ticketsReducer from './slices/ticketsSlice'\r\nimport validatorsReducer from './slices/validatorsSlice'\r\nimport contactInformationsReducer from './slices/contactInformationsSlice'\r\nimport termsOfServiceReducer from './slices/termsOfServiceSlice'\r\n\r\nconst combinedReducer = combineReducers({\r\n ads: adsReducer,\r\n cars: carsReducer,\r\n creditCards: creditCardsReducer,\r\n customer: customerReducer,\r\n layout: layoutReducer,\r\n loader: loaderReducer,\r\n map: mapReducer,\r\n parkCar: parkCarReducer,\r\n popup: popupReducer,\r\n receipts: receiptsReducer,\r\n terms: termsReducer,\r\n tickets: ticketsReducer,\r\n validators: validatorsReducer,\r\n simulatedPrices: simulatePriceReducer,\r\n contactInformations: contactInformationsReducer,\r\n termsOfService: termsOfServiceReducer,\r\n})\r\nconst rootReducer = (state: RootState, action: Action) => {\r\n if (action.type === customerSlice.actions.destroySession().type) {\r\n const { map, layout, terms } = state\r\n state = { map, layout, terms } as RootState\r\n }\r\n return combinedReducer(state, action)\r\n}\r\n\r\nexport type RootState = ReturnType\r\n\r\nexport default rootReducer\r\n","import { configureStore } from '@reduxjs/toolkit'\r\nimport { useDispatch } from 'react-redux'\r\nimport { refreshTokenMiddlaware, destroySession } from 'store/middlewares'\r\nimport rootReducer, { RootState } from './rootReducer'\r\n\r\nconst store = configureStore({\r\n reducer: rootReducer,\r\n middleware: getDefaultMiddleware =>\r\n getDefaultMiddleware({ serializableCheck: false }).concat([\r\n refreshTokenMiddlaware,\r\n destroySession,\r\n ]),\r\n})\r\n\r\nexport type AppDispatch = typeof store.dispatch\r\nexport const useAppDispatch = () => useDispatch()\r\nexport type { RootState as AppState }\r\nexport default store\r\n","import * as React from 'react'\r\nimport { Route, RouteProps, Redirect } from 'react-router-dom'\r\nexport interface ConditionalRouteProps {\r\n redirectTo: string\r\n shouldRedirect: boolean\r\n}\r\n\r\nconst ConditionalRoute: React.SFC = ({\r\n redirectTo,\r\n shouldRedirect,\r\n ...props\r\n}) => {\r\n return (\r\n \r\n {shouldRedirect ? : props.children}\r\n \r\n )\r\n}\r\n\r\nexport default ConditionalRoute\r\n","const ROOT = '/'\r\nconst AUTH = '/auth'\r\nconst HOME = '/home'\r\nconst MAP = '/map'\r\nconst PARKER = '/parker'\r\nconst PARKING = '/parking'\r\nconst MY_PROFILE = '/my-profile'\r\nconst SIGN_UP = '/sign-up'\r\nconst SMS = '/sms'\r\nconst OLD_MOBI = '/old-mobi'\r\nconst REDIRECT = '/redirect'\r\n\r\nexport const paths = {\r\n root: {\r\n root: ROOT,\r\n oldMobi: OLD_MOBI,\r\n },\r\n home: {\r\n map: `${HOME}${MAP}`,\r\n },\r\n parker: {\r\n info: `${PARKER}/info`,\r\n edit: `${PARKER}${MY_PROFILE}/edit`,\r\n delete: `${PARKER}${MY_PROFILE}/delete`,\r\n changePassword: `${PARKER}${MY_PROFILE}/change-password`,\r\n myProfile: `${PARKER}${MY_PROFILE}`,\r\n myReceipts: `${PARKER}/my-receipts`,\r\n sendReceipt: `${PARKER}/send-receipt`,\r\n addCar: `${PARKER}/add-car`,\r\n addCard: `${PARKER}/add-card`,\r\n question: `${PARKER}/question`,\r\n receiptsAndNotifications: `${PARKER}/receipts-and-notifications`,\r\n paymentSuccessful: `${PARKER}/payment-successful`,\r\n },\r\n auth: {\r\n login: `${AUTH}/login`,\r\n forgotPassword: `${AUTH}/forgot-password`,\r\n resetPassword: `${AUTH}/reset-password`,\r\n signUp: `${AUTH}${SIGN_UP}`,\r\n setPassword: `${AUTH}${SIGN_UP}/set-password`,\r\n code: `${AUTH}${SIGN_UP}/code`,\r\n addCard: `${AUTH}${SIGN_UP}/add-card`,\r\n },\r\n parking: {\r\n tickets: `${PARKING}/tickets`,\r\n parkCar: `${PARKING}/park-car`,\r\n selectCard: `${PARKING}/select-card`,\r\n pay: `${PARKING}/pay`,\r\n paid: `${PARKING}/paid`,\r\n addTime: `${PARKING}/add-time`,\r\n addTimePay: `${PARKING}/add-time-pay`,\r\n addTimeManageCards: `${PARKING}/add-time-manage-cards`,\r\n addTimeSelectCard: `${PARKING}/add-time-select-card`,\r\n addTimeAddCard: `${PARKING}/add-time-add-card`,\r\n manageCards: `${PARKING}/manage-cards`,\r\n addCard: `${PARKING}/add-card`,\r\n validators: `${PARKING}/validators`,\r\n validate: `validate`,\r\n upfrontValidate: `${PARKING}/upfront-validation`,\r\n findCar: `${PARKING}/find-car`,\r\n transaction: `${PARKING}/transaction`,\r\n contactInformations: `${PARKING}/contact-informations`,\r\n login: `${PARKING}/login`,\r\n forgotPassword: `${PARKING}/forgot-password`,\r\n signUp: `${PARKING}${SIGN_UP}`,\r\n },\r\n sms: {\r\n park: `${SMS}/park`,\r\n map: `${SMS}/map`,\r\n corp: `${SMS}/corporation`,\r\n addTime: `${SMS}/add-time`,\r\n },\r\n redirect: {\r\n landingPage: `${REDIRECT}/landing-page`,\r\n },\r\n}\r\n\r\nexport default paths\r\n","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgEmail(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 3.5,\n y: 6.5,\n width: 19,\n height: 13,\n rx: 1.324,\n stroke: \"#9D9D9D\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4 7l9 6 9-6\",\n stroke: \"#9D9D9D\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgEmail);\nexport default __webpack_public_path__ + \"static/media/email.b65b6c07.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/outlined/email.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPhone(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 7.5,\n y: 3.5,\n width: 11,\n height: 19,\n rx: 1.5,\n stroke: \"#9D9D9D\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 19h12M12 5h2\",\n stroke: \"#9D9D9D\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPhone);\nexport default __webpack_public_path__ + \"static/media/phone.b3951eaa.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/outlined/phone.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 18,\n viewBox: \"0 0 22 18\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.499 14.5c0 .254-.162.585-.665.963-.494.372-1.24.728-2.208 1.035-1.93.614-4.626 1.002-7.627 1.002-3 0-5.697-.388-7.627-1.002-.967-.308-1.714-.664-2.208-1.035-.503-.378-.665-.709-.665-.963s.162-.585.665-.963c.494-.372 1.24-.728 2.208-1.035C5.302 11.888 7.998 11.5 11 11.5c3 0 5.697.388 7.627 1.002.967.307 1.714.663 2.208 1.035.503.378.665.709.665.963z\",\n stroke: \"#9D9D9D\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.598 5.17c0 1.298-.642 3.053-1.617 4.799-.874 1.566-1.98 3.06-3.015 4.121-1.137-1.052-2.24-2.544-3.085-4.114-.933-1.736-1.51-3.497-1.51-4.805C6.37 2.586 8.44.5 10.983.5c2.543 0 4.614 2.086 4.614 4.67z\",\n stroke: \"#9D9D9D\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 10.998,\n cy: 5.1,\n r: 1.45,\n stroke: \"#9D9D9D\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPin);\nexport default __webpack_public_path__ + \"static/media/pin.bac8db02.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/outlined/pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import * as React from 'react'\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.5 10c0 1.8-.897 4.208-2.235 6.579-1.239 2.194-2.816 4.288-4.284 5.744-1.621-1.447-3.197-3.538-4.392-5.737C7.306 14.226 6.5 11.812 6.5 10a6.5 6.5 0 0113 0z\",\n stroke: \"#000\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 13,\n cy: 10,\n r: 2,\n fill: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPin);\nexport default __webpack_public_path__ + \"static/media/pin.c057362c.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/history_list/pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgClock(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 5a8 8 0 110 16M13 21a8 8 0 01-8-8\",\n stroke: \"#000\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 5c-2.898 0-5.459 1.582-7 4M13 8v5l2.5 2.5\",\n stroke: \"#000\",\n strokeLinecap: \"round\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5 11l1.732 2.25H3.268L5 11z\",\n fill: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgClock);\nexport default __webpack_public_path__ + \"static/media/clock.b2f5c5c0.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/history_list/clock.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgSendComplete(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 13,\n cy: 13,\n r: 10.5,\n stroke: \"#00DA7E\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 13l4 4 7-7\",\n stroke: \"#00DA7E\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgSendComplete);\nexport default __webpack_public_path__ + \"static/media/send-complete.0d0c149d.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/history_list/send-complete.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _circle4, _mask, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgErrorIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 199,\n height: 164,\n fill: \"none\",\n viewBox: \"0 0 199 164\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 45.329,\n height: 16.942,\n x: 33.885,\n y: 149.013,\n fill: \"#FFE6E6\",\n rx: 8.471,\n transform: \"rotate(-30 33.885 149.013)\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 22.565,\n height: 16.924,\n x: 11.066,\n y: 103.474,\n fill: \"#FFE6E6\",\n rx: 8.462,\n transform: \"rotate(-30 11.066 103.474)\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 16.942,\n height: 16.942,\n x: 141.77,\n y: 8.471,\n fill: \"#FFE6E6\",\n rx: 8.471,\n transform: \"rotate(-30 141.77 8.471)\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFE6E6\",\n fillRule: \"evenodd\",\n d: \"M43.094 65.442a8.471 8.471 0 008.46 14.679l26.053-15.042a8.471 8.471 0 118.471 14.673L57.122 96.47l-.026.014-7.165 4.137a8.471 8.471 0 00-3.1 11.572 8.471 8.471 0 0011.571 3.101l104.36-60.252a8.471 8.471 0 00-8.446-14.688l-22.18 12.806a8.472 8.472 0 01-8.471-14.673l6.23-3.596a8.472 8.472 0 00-8.482-14.667L43.094 65.442zm41.762 34.579a8.471 8.471 0 018.448 14.686l-11.391 6.577.022-.013 10.494-6.059a8.471 8.471 0 108.471 14.672l62.869-36.297a8.471 8.471 0 10-8.471-14.672l-20.892 12.061a8.83 8.83 0 00.336-.204 8.472 8.472 0 01-8.463-14.657c-.115.06-.23.123-.344.189l-41.08 23.717z\",\n clipRule: \"evenodd\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 189.922,\n cy: 99.85,\n r: 4.15,\n stroke: \"#FFE5E5\",\n strokeWidth: 2.605\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.343,\n cy: 43.625,\n r: 3.022,\n stroke: \"#FFE5E5\",\n strokeWidth: 2.605\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 93.456,\n cy: 150.809,\n r: 3.022,\n stroke: \"#FFE5E5\",\n strokeWidth: 2.605\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.53,\n height: 1.88,\n x: 120.533,\n y: 4.325,\n fill: \"#FFE6E6\",\n rx: 0.94\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.53,\n height: 1.88,\n x: 126.738,\n y: 0,\n fill: \"#FFE6E6\",\n rx: 0.94,\n transform: \"rotate(90 126.738 0)\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 157.014,\n y: 125.329,\n fill: \"#FFE6E6\",\n rx: 0.94\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 161.902,\n y: 122.414,\n fill: \"#FFE6E6\",\n rx: 0.94,\n transform: \"rotate(90 161.902 122.414)\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 7.146,\n y: 87.157,\n fill: \"#FFE6E6\",\n rx: 0.94\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 12.035,\n y: 84.242,\n fill: \"#FFE6E6\",\n rx: 0.94,\n transform: \"rotate(90 12.035 84.242)\"\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 99.529,\n cy: 81.812,\n r: 40.385,\n fill: \"#fff\",\n stroke: \"#F33\",\n strokeWidth: 2.605\n })), _mask || (_mask = /*#__PURE__*/React.createElement(\"mask\", {\n id: \"mask0\",\n width: 79,\n height: 79,\n x: 60,\n y: 42,\n maskUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 99.529,\n cy: 81.812,\n r: 39.082,\n fill: \"#fff\"\n }))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n mask: \"url(#mask0)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFC4C4\",\n d: \"M99.529 39.343H142.78V123.239H99.529z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#F33\",\n d: \"M102.839 89.104h-6.31V62.792h6.31v26.312zm-3.18 4.337c1.144 0 2.103.344 2.877 1.034.774.723 1.161 1.61 1.161 2.661s-.387 1.922-1.161 2.612c-.774.722-1.733 1.084-2.877 1.084-1.144 0-2.104-.345-2.878-1.035-.774-.657-1.16-1.495-1.16-2.513 0-1.084.386-2.004 1.16-2.76.74-.722 1.7-1.084 2.878-1.084z\"\n }))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgErrorIcon);\nexport default __webpack_public_path__ + \"static/media/error-icon.89875e7f.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/popup_placeholder/error-icon.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _circle4, _mask, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgInfoIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 191,\n height: 158,\n fill: \"none\",\n viewBox: \"0 0 191 158\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 43.495,\n height: 16.257,\n x: 32.514,\n y: 142.981,\n fill: \"#DCF3FF\",\n rx: 8.128,\n transform: \"rotate(-30 32.514 142.981)\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 21.651,\n height: 16.239,\n x: 10.619,\n y: 99.286,\n fill: \"#DCF3FF\",\n rx: 8.119,\n transform: \"rotate(-30 10.62 99.286)\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 16.257,\n height: 16.257,\n x: 136.031,\n y: 8.128,\n fill: \"#DCF3FF\",\n rx: 8.128,\n transform: \"rotate(-30 136.031 8.128)\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#DCF3FF\",\n fillRule: \"evenodd\",\n d: \"M41.351 62.793A8.128 8.128 0 0049.43 76.9l25.037-14.455a8.128 8.128 0 018.129 14.078l-20.28 11.709.048-.028L128 50.308l.059-.034-1.272.734a8.128 8.128 0 01-11.103-2.975 8.128 8.128 0 012.975-11.104l6.029-3.48a8.129 8.129 0 00-8.19-14.043L41.351 62.793zm47.32 47.765a8.129 8.129 0 008.146 14.069l60.324-34.828a8.13 8.13 0 00-8.129-14.079l-20.029 11.564a7.96 7.96 0 00.307-.187 8.129 8.129 0 01-8.123-14.062c-.096.05-.191.102-.286.155l.546-.315.063-.037 27.785-16.041.063-.036 6.837-3.948a8.128 8.128 0 002.975-11.103 8.128 8.128 0 00-11.103-2.975L47.911 96.548a8.129 8.129 0 008.084 14.104l25.404-14.667a8.128 8.128 0 118.129 14.079l-.856.494z\",\n clipRule: \"evenodd\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 182.232,\n cy: 95.808,\n r: 3.982,\n stroke: \"#DCF3FF\",\n strokeWidth: 2.5\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.033,\n cy: 41.859,\n r: 2.9,\n stroke: \"#DCF3FF\",\n strokeWidth: 2.5\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 89.673,\n cy: 144.704,\n r: 2.9,\n stroke: \"#DCF3FF\",\n strokeWidth: 2.5\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.104,\n height: 1.804,\n x: 115.654,\n y: 4.15,\n fill: \"#DCF3FF\",\n rx: 0.902\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.104,\n height: 1.804,\n x: 121.609,\n fill: \"#DCF3FF\",\n rx: 0.902,\n transform: \"rotate(90 121.609 0)\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.578,\n height: 1.804,\n x: 150.658,\n y: 120.256,\n fill: \"#DCF3FF\",\n rx: 0.902\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.578,\n height: 1.804,\n x: 155.35,\n y: 117.459,\n fill: \"#DCF3FF\",\n rx: 0.902,\n transform: \"rotate(90 155.35 117.459)\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.578,\n height: 1.804,\n x: 6.857,\n y: 83.629,\n fill: \"#DCF3FF\",\n rx: 0.902\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.578,\n height: 1.804,\n x: 11.549,\n y: 80.832,\n fill: \"#DCF3FF\",\n rx: 0.902,\n transform: \"rotate(90 11.549 80.832)\"\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 95.5,\n cy: 78.5,\n r: 38.75,\n fill: \"#fff\",\n stroke: \"#32A3F5\",\n strokeWidth: 2.5\n })), _mask || (_mask = /*#__PURE__*/React.createElement(\"mask\", {\n id: \"mask0\",\n width: 75,\n height: 75,\n x: 58,\n y: 41,\n maskUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 95.5,\n cy: 78.5,\n r: 37.5,\n fill: \"#fff\"\n }))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n mask: \"url(#mask0)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C0E4FF\",\n d: \"M95.5 37.75H137V118.25H95.5z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#32A3F5\",\n d: \"M92.573 71.503h6.055V96.75h-6.055V71.503zm3.052-4.161c-1.098 0-2.018-.331-2.76-.993-.744-.693-1.115-1.544-1.115-2.553s.371-1.844 1.114-2.506c.743-.693 1.663-1.04 2.761-1.04s2.018.331 2.76.993c.744.63 1.115 1.434 1.115 2.411 0 1.04-.371 1.923-1.114 2.648-.71.693-1.63 1.04-2.761 1.04z\"\n }))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgInfoIcon);\nexport default __webpack_public_path__ + \"static/media/info-icon.7025757e.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/popup_placeholder/info-icon.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _circle4, _mask, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgSuccessIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 199,\n height: 164,\n fill: \"none\",\n viewBox: \"0 0 199 164\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 45.329,\n height: 16.942,\n x: 33.885,\n y: 149.013,\n fill: \"#E4F4FF\",\n rx: 8.471,\n transform: \"rotate(-30 33.885 149.013)\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 22.565,\n height: 16.924,\n x: 11.068,\n y: 103.474,\n fill: \"#E4F4FF\",\n rx: 8.462,\n transform: \"rotate(-30 11.068 103.474)\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 16.942,\n height: 16.942,\n x: 141.77,\n y: 8.471,\n fill: \"#E4F4FF\",\n rx: 8.471,\n transform: \"rotate(-30 141.77 8.471)\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#E4F4FF\",\n fillRule: \"evenodd\",\n d: \"M43.094 65.442a8.471 8.471 0 008.45 14.685l26.063-15.048a8.471 8.471 0 118.47 14.673L64.986 91.93l-.003.002-7.86 4.538-7.19 4.151a8.472 8.472 0 008.47 14.673l26.43-15.259 41.762-24.111.021-.013 28.956-16.718.023-.013 7.168-4.138a8.471 8.471 0 10-8.471-14.673l-20.884 12.058a.226.226 0 01.016-.01l-1.287.743a8.472 8.472 0 01-8.471-14.672l6.249-3.608a8.471 8.471 0 00-8.501-14.656L43.094 65.442zm83.184 10.674a8.472 8.472 0 008.465 14.656 8.345 8.345 0 01-.319.194l20.874-12.051a8.472 8.472 0 018.471 14.672L100.9 129.885a8.471 8.471 0 01-8.488-14.663l-10.477 6.049-.041.024 11.41-6.588a8.471 8.471 0 00-8.43-14.696l41.061-23.707a9.15 9.15 0 01.343-.188z\",\n clipRule: \"evenodd\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 189.922,\n cy: 99.85,\n r: 4.15,\n stroke: \"#E4F4FF\",\n strokeWidth: 2.605\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.343,\n cy: 43.625,\n r: 3.022,\n stroke: \"#E4F4FF\",\n strokeWidth: 2.605\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 93.456,\n cy: 150.809,\n r: 3.022,\n stroke: \"#E4F4FF\",\n strokeWidth: 2.605\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.53,\n height: 1.88,\n x: 120.533,\n y: 4.325,\n fill: \"#E4F4FF\",\n rx: 0.94\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 10.53,\n height: 1.88,\n x: 126.738,\n fill: \"#E4F4FF\",\n rx: 0.94,\n transform: \"rotate(90 126.738 0)\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 157.014,\n y: 125.329,\n fill: \"#E4F4FF\",\n rx: 0.94\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 161.902,\n y: 122.414,\n fill: \"#E4F4FF\",\n rx: 0.94,\n transform: \"rotate(90 161.902 122.414)\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 7.146,\n y: 87.157,\n fill: \"#E4F4FF\",\n rx: 0.94\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.898,\n height: 1.88,\n x: 12.035,\n y: 84.242,\n fill: \"#E4F4FF\",\n rx: 0.94,\n transform: \"rotate(90 12.035 84.242)\"\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 99.529,\n cy: 81.812,\n r: 40.385,\n fill: \"#fff\",\n stroke: \"#32A3F5\",\n strokeWidth: 2.605\n })), _mask || (_mask = /*#__PURE__*/React.createElement(\"mask\", {\n id: \"mask0\",\n width: 79,\n height: 79,\n x: 60,\n y: 42,\n maskUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 99.529,\n cy: 81.812,\n r: 39.082,\n fill: \"#fff\"\n }))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n mask: \"url(#mask0)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C7E8FF\",\n d: \"M99.529 39.343H142.78V123.239H99.529z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#32A3F5\",\n strokeWidth: 5.732,\n d: \"M82.072 84.287l10.683 10.682 24.361-24.36\"\n }))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgSuccessIcon);\nexport default __webpack_public_path__ + \"static/media/success-icon.549cd10a.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/popup_placeholder/success-icon.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgWarningIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 199,\n height: 164,\n viewBox: \"0 0 199 164\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 33.8848,\n y: 149.013,\n width: 45.3294,\n height: 16.9424,\n rx: 8.47122,\n transform: \"rotate(-30 33.8848 149.013)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11.0684,\n y: 103.474,\n width: 22.5649,\n height: 16.9237,\n rx: 8.46183,\n transform: \"rotate(-30 11.0684 103.474)\",\n fill: \"#E6E6E6\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 141.77,\n y: 8.47125,\n width: 16.9424,\n height: 16.9424,\n rx: 8.47122,\n transform: \"rotate(-30 141.77 8.47125)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M43.0943 65.4416C39.0425 67.7809 37.6543 72.9618 39.9936 77.0135C42.328 81.0568 47.4921 82.4476 51.5401 80.1288L77.6068 65.0792C81.6585 62.7399 86.8394 64.1281 89.1787 68.1799C91.5179 72.2316 90.1297 77.4125 86.078 79.7518L64.975 91.9355C64.9808 91.9322 64.9865 91.9289 64.9923 91.9256L133.4 52.4307C133.408 52.4256 133.417 52.4205 133.426 52.4154L132.136 53.16C128.084 55.4993 122.904 54.111 120.564 50.0593C118.225 46.0076 119.613 40.8267 123.665 38.4874L129.917 34.878C133.943 32.5299 135.318 27.3659 132.985 23.325C130.645 19.2733 125.465 17.8851 121.413 20.2244L43.0943 65.4416ZM92.412 115.222C88.3736 117.566 86.9926 122.738 89.3285 126.784C91.6678 130.836 96.8487 132.224 100.9 129.884L163.769 93.5873C167.821 91.248 169.209 86.0671 166.87 82.0154C164.53 77.9636 159.35 76.5754 155.298 78.9147L134.424 90.9664C134.532 90.9033 134.639 90.8383 134.744 90.7712C130.747 92.8432 125.788 91.4214 123.514 87.483C121.241 83.5459 122.488 78.5425 126.278 76.1163C126.163 76.1759 126.049 76.2384 125.935 76.3038L84.8751 100.01C88.9204 97.705 94.0731 99.0977 96.4041 103.135C98.7434 107.187 97.3552 112.368 93.3034 114.707L81.8927 121.295C81.9068 121.287 81.9209 121.279 81.935 121.271L92.412 115.222ZM84.8545 100.022C84.8471 100.026 84.8396 100.03 84.8322 100.034L58.38 115.307C54.3316 117.628 49.1654 116.237 46.8304 112.193C44.4911 108.141 45.8794 102.961 49.9311 100.621L154.291 40.369C158.343 38.0297 163.524 39.418 165.863 43.4697C168.202 47.5214 166.814 52.7023 162.762 55.0416L155.607 59.1724C155.595 59.1793 155.583 59.1861 155.571 59.1931L126.615 75.9111C126.603 75.918 126.591 75.9249 126.579 75.9319L84.8545 100.022Z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 189.922,\n cy: 99.8496,\n r: 4.15044,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.3425,\n cy: 43.6254,\n r: 3.0222,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 93.4558,\n cy: 150.809,\n r: 3.0222,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 120.533,\n y: 4.32495,\n width: 10.5303,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 126.738,\n width: 10.5303,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 126.738 0)\",\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 157.014,\n y: 125.329,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 161.902,\n y: 122.414,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 161.902 122.414)\",\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 7.14648,\n y: 87.1569,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 12.0352,\n y: 84.2422,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 12.0352 84.2422)\",\n fill: \"#E6E6E6\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M104.391 40.7799C102.289 37.1265 97.0303 37.1265 94.9284 40.7799L52.0651 115.286C49.9686 118.93 52.5846 123.499 56.7962 123.499H142.523C146.735 123.499 149.351 118.93 147.254 115.286L104.391 40.7799Z\",\n fill: \"white\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.60547\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M99.5293 122.196H142.523C145.725 122.196 147.726 118.718 146.125 115.935L103.262 41.4296C102.436 39.9951 100.973 39.3001 99.5293 39.3446V122.196Z\",\n fill: \"#ECECEC\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M102.579 94.5758L96.2692 94.5758L96.2692 68.2633L102.579 68.2633L102.579 94.5758ZM99.399 98.9119C100.543 98.9119 101.502 99.2569 102.276 99.9467C103.05 100.669 103.438 101.556 103.438 102.608C103.438 103.659 103.05 104.529 102.276 105.219C101.502 105.942 100.543 106.303 99.399 106.303C98.2548 106.303 97.2957 105.958 96.5216 105.268C95.7476 104.611 95.3605 103.774 95.3605 102.755C95.3605 101.671 95.7476 100.752 96.5216 99.996C97.262 99.2733 98.2211 98.9119 99.399 98.9119Z\",\n fill: \"#AFAFAF\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgWarningIcon);\nexport default __webpack_public_path__ + \"static/media/warning-icon.4de95583.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/popup_placeholder/warning-icon.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3, _path4, _path5;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgAttachMoney(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 10 23\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 7a4 4 0 10-8 0\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 7a4 4 0 004 4\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 15a4 4 0 108 0\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 15a4 4 0 00-4-4\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5 1v21\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgAttachMoney);\nexport default __webpack_public_path__ + \"static/media/attach-money.3b291f7a.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/buttons/attach-money.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _circle2, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgGpsFixed(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12,\n cy: 12,\n r: 8,\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12,\n cy: 12,\n r: 3,\n fill: \"#32A3F5\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 3.5V1M12 23v-2.5M20.5 12H23M1 12h2.5\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgGpsFixed);\nexport default __webpack_public_path__ + \"static/media/gps-fixed.90c4100d.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/buttons/gps-fixed.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import * as React from 'react'\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPinDrop(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 23,\n height: 23,\n viewBox: \"0 0 23 23\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 18.5c0 .25-.125.594-.583 1.018-.459.424-1.177.852-2.15 1.233C17.33 21.509 14.583 22 11.5 22s-5.83-.49-7.767-1.25c-.973-.38-1.691-.808-2.15-1.232C1.125 19.094 1 18.749 1 18.5c0-.25.125-.594.583-1.018.459-.424 1.177-.852 2.15-1.233C5.67 15.491 8.417 15 11.5 15s5.83.49 7.767 1.25c.973.38 1.691.808 2.15 1.232.458.424.583.769.583 1.018z\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.026 6.585c0 1.557-.78 3.725-2.013 5.933-1.031 1.847-2.315 3.61-3.536 4.913-1.32-1.289-2.6-3.046-3.596-4.899C6.705 10.344 6 8.164 6 6.585 6 3.49 8.479 1 11.513 1s5.513 2.49 5.513 5.585z\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 11.532,\n cy: 6.495,\n r: 2.483,\n fill: \"#32A3F5\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPinDrop);\nexport default __webpack_public_path__ + \"static/media/pin-drop.adc2c17c.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/buttons/pin-drop.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3, _path4, _path5, _path6, _path7;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMoneyOff(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 25,\n height: 25,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.996 9a4 4 0 00-8 0\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.996 9a4 4 0 004 4\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.996 17a4 4 0 008 0\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.996 17a4 4 0 00-4-4\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.996 3v21\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M21.121.854l4.025 4.025L4.875 25.15.85 21.125z\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.996 4l-18 18\",\n stroke: \"#32A3F5\",\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMoneyOff);\nexport default __webpack_public_path__ + \"static/media/money-off.1dd28f6e.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/buttons/money-off.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPricePin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 54,\n height: 63,\n viewBox: \"0 0 54 63\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.908 46.35c-10.544-10.603-10.544-27.794 0-38.398 10.544-10.603 27.64-10.603 38.184 0 10.544 10.604 10.544 27.795 0 38.398L31.328 61.197a6.096 6.096 0 01-8.655 0L7.907 46.35z\",\n fill: \"#1411A1\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 27,\n cy: 27,\n r: 25,\n fill: \"#fff\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPricePin);\nexport default __webpack_public_path__ + \"static/media/price-pin.d5787326.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/map_pins/price-pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgClusterPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 38,\n height: 44,\n viewBox: \"0 0 38 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.545 32.318c-7.393-7.394-7.393-19.38 0-26.773 7.393-7.393 19.38-7.393 26.773 0 7.393 7.393 7.393 19.38 0 26.773L21.965 42.67a4.291 4.291 0 01-6.068 0L5.545 32.318z\",\n fill: \"#3366EC\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 19,\n cy: 19,\n transform: \"rotate(-90 19 19)\",\n fill: \"#fff\",\n r: 13\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgClusterPin);\nexport default __webpack_public_path__ + \"static/media/cluster-pin.d3ab2922.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/map_pins/cluster-pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgStandardPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 38,\n height: 44,\n viewBox: \"0 0 38 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.545 32.318c-7.393-7.394-7.393-19.38 0-26.773 7.393-7.393 19.38-7.393 26.773 0 7.393 7.393 7.393 19.38 0 26.773L21.965 42.67a4.291 4.291 0 01-6.068 0L5.545 32.318z\",\n fill: \"#3366EC\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 18.905,\n cy: 18.929,\n r: 8.204,\n transform: \"rotate(-90 18.905 18.93)\",\n fill: \"#fff\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgStandardPin);\nexport default __webpack_public_path__ + \"static/media/standard-pin.e6ccca75.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/map_pins/standard-pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgSelectedPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 55,\n height: 65,\n viewBox: \"0 0 55 65\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.211 47.452C-2.422 36.82-2.422 19.58 8.211 8.947c10.633-10.633 27.872-10.633 38.505 0 10.633 10.633 10.633 27.872 0 38.505L31.827 62.341a6.172 6.172 0 01-8.727 0L8.21 47.452z\",\n fill: \"#32A3F5\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 27.425,\n cy: 28.202,\n r: 11.798,\n transform: \"rotate(-90 27.425 28.202)\",\n fill: \"#fff\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgSelectedPin);\nexport default __webpack_public_path__ + \"static/media/selected-pin.2983a89c.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../../assets/images/svg_icons/map_pins/selected-pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMessage(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 27,\n height: 27,\n fill: \"none\",\n viewBox: \"0 0 27 27\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 17.646,\n height: 11.014,\n x: 4.204,\n y: 7.52,\n stroke: \"#000\",\n strokeWidth: 1.303,\n rx: 1.172\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#000\",\n strokeWidth: 1.303,\n d: \"M4.264 8.053l8.763 4.974 8.764-4.974\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMessage);\nexport default __webpack_public_path__ + \"static/media/message.498f88d6.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/message.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _rect10, _path2, _path3, _path4, _path5, _path6;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgReceipt(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 183,\n height: 155,\n fill: \"none\",\n viewBox: \"0 0 183 155\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 50.782,\n height: 15.309,\n x: 55.754,\n y: 126.959,\n fill: \"#E6E6E6\",\n rx: 7.654,\n transform: \"rotate(-30 55.754 126.959)\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 19.873,\n height: 15.292,\n x: 7.646,\n y: 101.684,\n fill: \"#E6E6E6\",\n rx: 7.646,\n transform: \"rotate(-30 7.646 101.684)\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 15.309,\n height: 15.309,\n x: 131.16,\n y: 12.717,\n fill: \"#E6E6E6\",\n rx: 7.654,\n transform: \"rotate(-30 131.16 12.717)\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#E6E6E6\",\n fillRule: \"evenodd\",\n d: \"M34.93 68.275a7.654 7.654 0 107.655 13.257l4.323-2.496.114-.067 26.164-15.105A7.654 7.654 0 1180.84 77.12L61.74 88.15l.048-.028 61.81-35.686.086-.05-1.226.708a7.654 7.654 0 01-10.456-2.802 7.654 7.654 0 012.801-10.456l5.754-3.322a7.654 7.654 0 00-7.789-13.178L34.93 68.275zm63.122 34.264a7.654 7.654 0 107.654 13.257l45.333-26.173a7.654 7.654 0 002.801-10.456 7.654 7.654 0 00-10.456-2.801l-45.332 26.173zm19.331-28.838l-.442.255c.075-.042.149-.082.225-.12a7.653 7.653 0 00-2.498 10.27 7.654 7.654 0 0010.143 2.973 7.52 7.52 0 01-.303.184l-47.411 27.373-.071.041 10.344-5.972a7.655 7.655 0 00-7.655-13.258L55.721 109.3a7.654 7.654 0 01-7.542-13.321l94.296-54.442a7.654 7.654 0 017.654 13.258l-6.409 3.7a9.606 9.606 0 00-.087.05L117.469 73.65a3.896 3.896 0 00-.086.051z\",\n clipRule: \"evenodd\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 165.39,\n cy: 108.685,\n r: 3.971,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.287,\n cy: 44.48,\n r: 2.952,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 41.444,\n cy: 134.548,\n r: 4.527,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 9.515,\n height: 1.699,\n x: 108.508,\n y: 3.908,\n fill: \"#E6E6E6\",\n rx: 0.85\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 9.515,\n height: 1.699,\n x: 114.115,\n fill: \"#E6E6E6\",\n rx: 0.85,\n transform: \"rotate(90 114.115 0)\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.136,\n height: 1.699,\n x: 139.719,\n y: 133.291,\n fill: \"#E6E6E6\",\n rx: 0.85\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.136,\n height: 1.699,\n x: 144.137,\n y: 130.658,\n fill: \"#E6E6E6\",\n rx: 0.85,\n transform: \"rotate(90 144.137 130.658)\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.136,\n height: 1.699,\n x: 9.52,\n y: 83.813,\n fill: \"#E6E6E6\",\n rx: 0.85\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 7.136,\n height: 1.699,\n x: 13.938,\n y: 81.18,\n fill: \"#E6E6E6\",\n rx: 0.85,\n transform: \"rotate(90 13.938 81.18)\"\n })), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 95.792,\n height: 61.465,\n x: 44.696,\n y: 57.178,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.286,\n rx: 6.857\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M66.846 27.837v45.361L92.591 87.91l31.876-18.39V46.228h-12.06v-18.39l-5.695 5.216-5.695-5.215-5.695 5.215-5.696-5.215-5.695 5.215-5.695-5.215-5.695 5.215-5.695-5.215z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#ECECEC\",\n d: \"M91.5 29l4.5 4 5.5-5 6 5 5-4v17h11v12.317h10.228a5.6 5.6 0 015.6 5.6V111.9a5.6 5.6 0 01-5.6 5.6H91.5V29z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#AFAFAF\",\n strokeWidth: 2.286,\n d: \"M46.082 61.58L92.9 87.73l46.817-26.15\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#AFAFAF\",\n strokeLinecap: \"round\",\n strokeWidth: 2.286,\n d: \"M103.625 46.227H86.461M80.332 46.227h-3.678M103.625 56.035H86.461M80.332 56.035h-3.678M103.625 65.844H86.461M80.332 65.844h-3.678\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#AFAFAF\",\n strokeWidth: 2.286,\n d: \"M66.847 73.198v-45.36l5.823 5.215 5.823-5.216 5.824 5.216 5.823-5.216 5.823 5.216 5.824-5.216 5.823 5.216 5.824-5.216V75.65M124.467 69.52V46.227h-11.033V69.52\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgReceipt);\nexport default __webpack_public_path__ + \"static/media/receipt.452855ed.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/receipt.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _rect4, _rect5, _rect6, _circle, _circle2, _circle3, _rect7, _rect8, _rect9, _rect10, _rect11, _rect12, _rect13, _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgNoCreditCard(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 508,\n height: 429,\n viewBox: \"0 0 508 429\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 146.426,\n y: 387.587,\n width: 159.83,\n height: 48.182,\n rx: 24.091,\n transform: \"rotate(-30 146.426 387.587)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: -4.992,\n y: 308.036,\n width: 62.547,\n height: 48.128,\n rx: 24.064,\n transform: \"rotate(-30 -4.992 308.036)\",\n fill: \"#E6E6E6\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 383.754,\n y: 28.025,\n width: 48.182,\n height: 48.182,\n rx: 24.091,\n transform: \"rotate(-30 383.754 28.025)\",\n fill: \"#E6E6E6\"\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 60.027,\n y: 214.93,\n width: 331.065,\n height: 48.182,\n rx: 24.091,\n transform: \"rotate(-30 60.027 214.93)\",\n fill: \"#D0D0D0\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 258.691,\n y: 322.77,\n width: 212.933,\n height: 48.182,\n rx: 24.091,\n transform: \"rotate(-30 258.691 322.77)\",\n fill: \"#D0D0D0\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 101.73,\n y: 302.128,\n width: 390.877,\n height: 48.182,\n rx: 24.091,\n transform: \"rotate(-30 101.73 302.128)\",\n fill: \"#D0D0D0\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 491.496,\n cy: 330.072,\n r: 12.5,\n stroke: \"#E6E6E6\",\n strokeWidth: 6.017\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 72.565,\n cy: 127.995,\n r: 9.291,\n stroke: \"#E6E6E6\",\n strokeWidth: 6.017\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 101.386,\n cy: 411.47,\n r: 14.249,\n stroke: \"#E6E6E6\",\n strokeWidth: 6.017\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 312.461,\n y: 0.301,\n width: 29.946,\n height: 5.348,\n rx: 2.674,\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 410.695,\n y: 407.515,\n width: 22.46,\n height: 5.348,\n rx: 2.674,\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 424.602,\n y: 399.228,\n width: 22.46,\n height: 5.348,\n rx: 2.674,\n transform: \"rotate(90 424.602 399.228)\",\n fill: \"#E6E6E6\"\n })), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.91,\n y: 251.789,\n width: 22.46,\n height: 5.348,\n rx: 2.674,\n fill: \"#E6E6E6\"\n })), _rect11 || (_rect11 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14.816,\n y: 243.501,\n width: 22.46,\n height: 5.348,\n rx: 2.674,\n transform: \"rotate(90 14.816 243.501)\",\n fill: \"#E6E6E6\"\n })), _rect12 || (_rect12 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 190.839,\n y: 83.903,\n width: 273.394,\n height: 164.589,\n rx: 24.723,\n transform: \"rotate(20.324 190.839 83.903)\",\n fill: \"#ECECEC\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.207\n })), _rect13 || (_rect13 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 103.596,\n y: 180.446,\n width: 301.235,\n height: 181.635,\n rx: 24.723,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.207\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M254.211 184.04h125.9c11.646 0 21.087 9.441 21.087 21.087v132.276c0 11.647-9.441 21.088-21.087 21.088h-125.9V184.04z\",\n fill: \"#ECECEC\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#AFAFAF\",\n d: \"M99.992 288.744h308.442v37.768H99.992z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgNoCreditCard);\nexport default __webpack_public_path__ + \"static/media/no-credit-card.668a344f.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/no-credit-card.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgDelete(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 30,\n viewBox: \"0 0 25 25\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.443 9.261h10.114v11.08c0 .345-.28.625-.625.625H8.068a.625.625 0 01-.625-.625V9.26zM6.08 9.148h12.841V6.534H6.081zM10.172 6.42h4.659V5.284c0-.69-.56-1.25-1.25-1.25h-2.16c-.69 0-1.25.56-1.25 1.25V6.42z\",\n stroke: \"#000\",\n strokeWidth: 1\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#000\",\n d: \"M10 11.818h1.136v5.909H10zM13.863 11.818h1.136v5.909h-1.136z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgDelete);\nexport default __webpack_public_path__ + \"static/media/delete.4ebdd8a6.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/delete.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLogo(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 172,\n height: 61,\n fill: \"none\",\n viewBox: \"0 0 172 61\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#fff\",\n strokeMiterlimit: 22.93,\n strokeWidth: 1.371,\n d: \"M156.114 44.295H20.846L1.956 59.246 12.558 8.342c.847-4.05 4.857-7.342 9-7.342h143.599c4.188 0 6.862 3.337 5.971 7.475l-5.926 28.345c-.847 4.138-4.901 7.475-9.089 7.475z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M28.509 13.193l-4.723 22.426h-3.92l4.678-22.426h-4.679l.758-3.515h13.321l-.757 3.515h-4.678zM36.084 9.633h11.183l-.757 3.515h-7.262l-1.56 7.387h6.861l-.757 3.56h-6.817l-1.648 7.964h7.44l-.757 3.515H30.648l5.436-25.941zM47.044 35.62h-3.476l.535-2.626 6.728-10.59-2.183-10.101.534-2.625h3.43l1.471 9.967h.312l5.658-9.967h3.431l-.534 2.625-6.416 10.1 2.317 10.59-.535 2.626H54.84l-1.515-10.59h-.312l-5.97 10.59zM72.708 13.193L68.03 35.619h-3.92l4.678-22.426h-4.679l.713-3.515h13.322l-.713 3.515h-4.723zM76.629 39.4l2.138-10.1c.669-3.16 2.184-4.806 4.5-5.83L92.447 20l1.871-9.033-.846-1.024h-4.723L87.5 10.967l-1.203 5.695h-4.99l1.07-5.206c.757-3.56 2.628-4.85 4.856-5.606h9.4c1.917.756 3.253 2.046 2.496 5.606l-1.47 7.075c-.669 3.115-2.005 4.85-4.456 5.785l-9.223 3.426-1.47 7.12h11.584l-.89 4.538H76.628zM104.387 24.94l-2.228 10.679h-3.92l5.435-25.986h10.114c1.47.578 2.495 1.602 1.916 4.316l-1.426 6.808c-.579 2.759-1.96 3.56-3.698 4.138l-6.193.045zm2.539-12.059l-1.826 8.855h4.277l.936-.757 1.514-7.297-.623-.8h-4.278zM122.296 29.612h-5.347l-2.406 6.007h-3.52l.535-2.625 10.159-23.316h4.099l.445 23.316-.535 2.625h-3.519l.089-6.007zm-3.877-3.515h4.01l.179-9.7h-.312l-3.877 9.7zM127.777 35.619l5.436-25.986h10.114c1.47.578 2.495 1.602 1.96 4.316l-1.203 5.651c-.579 2.759-1.96 3.515-3.698 4.094l-.623.133 2.673 9.256-.49 2.447h-3.476l-2.584-11.124h-1.871l-2.317 11.124-3.921.089zm8.644-22.738l-1.738 8.41h4.278l.98-.801 1.425-6.808-.623-.8h-4.322zM149.831 24.272L147.47 35.62h-3.921l5.435-25.986h3.921l-2.361 11.08h.579l8.555-11.08h3.163l-.446 2.18-8.287 10.546 3.876 10.59-.579 2.67h-2.985l-4.054-11.347h-.535zM167.653 43.228c0 .934-.713 1.735-1.693 1.735-.935 0-1.737-.712-1.737-1.69 0-.935.713-1.736 1.693-1.736h.044c.891 0 1.693.757 1.693 1.691zm-3.029 0c0 .712.534 1.29 1.247 1.335h.045c.757 0 1.336-.579 1.336-1.335 0-.757-.579-1.335-1.336-1.335-.669 0-1.248.578-1.292 1.335zm1.069.89h-.401v-1.691c.223-.044.446-.044.624-.044.223 0 .401.044.579.133.089.089.178.223.178.356 0 .178-.178.356-.356.4a.568.568 0 01.312.4c0 .134.044.268.133.401h-.401l-.133-.4c-.045-.178-.134-.267-.357-.267h-.178v.712zm0-.934h.178c.223 0 .401-.09.401-.267 0-.178-.133-.267-.356-.267h-.223v.534z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogo);\nexport default __webpack_public_path__ + \"static/media/logo.2193f6b4.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/logo.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgTerms(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 84,\n height: 85,\n fill: \"none\",\n viewBox: \"0 0 84 85\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 41.999,\n cy: 42.75,\n r: 40.75,\n stroke: \"#fff\",\n strokeWidth: 2.5\n })), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 34,\n height: 44.5,\n x: 25,\n y: 20.5,\n stroke: \"#fff\",\n strokeWidth: 2.5,\n rx: 1.25\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#fff\",\n strokeLinecap: \"round\",\n strokeWidth: 2.5,\n d: \"M32 31.625h20.124M32 40.5h20.124M32 49.5h20.124\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgTerms);\nexport default __webpack_public_path__ + \"static/media/terms.bfdb8a46.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/terms.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgOk(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 336,\n height: 336,\n fill: \"none\",\n viewBox: \"0 0 336 336\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 168,\n cy: 168,\n r: 163,\n stroke: \"#fff\",\n strokeWidth: 10\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#fff\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 10,\n d: \"M78.443 177.805l57.199 57.199L258.21 112.436\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgOk);\nexport default __webpack_public_path__ + \"static/media/ok.cee29a8a.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/ok.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgQuestion(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 13a9 9 0 01-13.744 7.65L4.003 22l1.201-4.5A9 9 0 1122 13z\",\n stroke: \"#000\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.002 10a3 3 0 00-6 0\",\n stroke: \"#000\",\n strokeLinecap: \"round\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.002 10c0 1.795-1.343 3-3 3v2\",\n stroke: \"#000\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 13.002,\n cy: 18,\n r: 1,\n fill: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgQuestion);\nexport default __webpack_public_path__ + \"static/media/question.5cc2f1d6.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/question.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgHamburger(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n viewBox: \"0 0 62 58\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 62,\n height: 6,\n rx: 3,\n fill: \"#fff\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n y: 26,\n width: 62,\n height: 6,\n rx: 3,\n fill: \"#fff\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n y: 52,\n width: 62,\n height: 6,\n rx: 3,\n fill: \"#fff\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgHamburger);\nexport default __webpack_public_path__ + \"static/media/hamburger.53014b2e.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/hamburger.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _path, _circle, _circle2, _circle3, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _path2, _circle4, _path3, _path4, _path5, _path6, _circle5, _path7;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCars(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 183,\n height: 155,\n viewBox: \"0 0 183 155\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 7.646,\n y: 101.684,\n width: 19.873,\n height: 15.292,\n rx: 7.646,\n transform: \"rotate(-30 7.646 101.684)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 131.16,\n y: 12.715,\n width: 15.309,\n height: 15.309,\n rx: 7.654,\n transform: \"rotate(-30 131.16 12.715)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M34.93 68.277a7.654 7.654 0 107.655 13.257l4.323-2.496a8.48 8.48 0 01.114-.067l26.164-15.106a7.654 7.654 0 017.654 13.258L61.74 88.15l.048-.027 61.81-35.686.086-.05-1.226.708a7.654 7.654 0 01-10.456-2.802 7.654 7.654 0 012.801-10.456l5.754-3.322a7.654 7.654 0 00-7.789-13.178L34.93 68.277zm52.652 40.308a7.654 7.654 0 007.654 13.258l55.803-32.218a7.654 7.654 0 002.801-10.456 7.653 7.653 0 00-10.455-2.801l-55.803 32.217zm29.801-34.882l-.442.255c.075-.042.149-.082.225-.12a7.653 7.653 0 00-2.498 10.27 7.654 7.654 0 0010.143 2.973c-.099.063-.2.125-.303.184l-47.411 27.373-.071.041 10.344-5.972a7.655 7.655 0 00-7.655-13.258l-23.994 13.853a7.654 7.654 0 01-7.542-13.321l94.296-54.442a7.654 7.654 0 117.654 13.258l-6.409 3.7a9.606 9.606 0 00-.087.05l-26.164 15.105a4.334 4.334 0 00-.086.051z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 165.39,\n cy: 108.685,\n r: 3.971,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.287,\n cy: 44.482,\n r: 2.952,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 41.444,\n cy: 134.55,\n r: 4.527,\n stroke: \"#E6E6E6\",\n strokeWidth: 1.912\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 108.508,\n y: 3.906,\n width: 9.515,\n height: 1.699,\n rx: 0.85,\n fill: \"#E6E6E6\"\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 114.115,\n width: 9.515,\n height: 1.699,\n rx: 0.85,\n transform: \"rotate(90 114.115 0)\",\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 139.719,\n y: 133.289,\n width: 7.136,\n height: 1.699,\n rx: 0.85,\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 144.137,\n y: 130.656,\n width: 7.136,\n height: 1.699,\n rx: 0.85,\n transform: \"rotate(90 144.137 130.656)\",\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 9.52,\n y: 83.813,\n width: 7.136,\n height: 1.699,\n rx: 0.85,\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 13.938,\n y: 81.18,\n width: 7.136,\n height: 1.699,\n rx: 0.85,\n transform: \"rotate(90 13.938 81.18)\",\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 36,\n y: 74,\n width: 110,\n height: 33,\n rx: 12.185,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M53.656 45.168A12.185 12.185 0 0165.462 36h51.076a12.185 12.185 0 0111.806 9.168L135.712 74H46.288l7.368-28.832z\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 57,\n cy: 91,\n r: 7,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M91 75h43c6.075 0 11 4.925 11 11v9c0 6.075-4.925 11-11 11H91V75z\",\n fill: \"#ECECEC\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48 107h18v12.407A5.593 5.593 0 0160.407 125h-6.814A5.593 5.593 0 0148 119.407V107z\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M116 107h18v12.407a5.593 5.593 0 01-5.593 5.593h-6.814a5.593 5.593 0 01-5.593-5.593V107z\",\n fill: \"#ECECEC\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M54 45h74\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _circle5 || (_circle5 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 125,\n cy: 91,\n r: 7,\n fill: \"#ECECEC\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M91 46h36.5l7 27H91V46zM91 37h26.067c4.457 0 8.434 2.802 9.933 7H91v-7z\",\n fill: \"#ECECEC\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCars);\nexport default __webpack_public_path__ + \"static/media/cars.ee1c2a0c.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/cars.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _path, _circle, _circle2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPlate(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 34,\n viewBox: \"0 0 25 25\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 1.625,\n y: 6.125,\n width: 21.75,\n height: 12.75,\n rx: 1.125,\n stroke: \"#909090\",\n strokeWidth: 1.25\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.92 15.031h.024l.007-.022.338-1.062h1.707l.344 1.063.007.021H10.094l-.014-.041-1.582-4.683-.008-.021h-.685l-.007.02L6.22 14.99l-.013.041H6.92zm6.361-.336h0c.242-.23.36-.554.36-.966 0-.298-.057-.55-.174-.752a1.01 1.01 0 00-.427-.418c.125-.1.225-.232.298-.396.083-.183.123-.393.123-.629 0-.385-.114-.69-.345-.912-.23-.226-.559-.336-.978-.336H10.465v4.745h1.773c.452 0 .802-.11 1.043-.336zm-.713-3.505h0c.115.1.175.25.175.458 0 .203-.06.354-.175.459-.112.1-.277.152-.5.152h-.89V11.03h.89c.222 0 .387.055.5.16zm2.73-.873v-.031h-1.454v.791h.74v3.954H15.297V10.317zm3.233 3.947v-.031h-1.619l.896-1.14c.229-.287.384-.544.466-.772.081-.226.122-.469.122-.726 0-.42-.115-.757-.349-1.005-.234-.248-.546-.371-.934-.371-.292 0-.558.07-.797.211-.235.137-.423.33-.562.58l-.011.021.016.017.456.468.028.03.02-.036c.186-.316.45-.473.795-.473.208 0 .36.057.463.164.103.109.157.267.157.48 0 .144-.028.29-.084.438h0a1.987 1.987 0 01-.31.514l-1.392 1.766-.007.008v.624H18.531v-.767zM7.53 13.203l.613-1.914.618 1.914H7.53zm5.393.439c0 .22-.061.379-.178.483-.118.106-.299.161-.547.161h-1.02v-1.289h1.02c.248 0 .428.056.546.161.118.105.18.264.18.484z\",\n fill: \"#919191\",\n stroke: \"#909090\",\n strokeWidth: 0.063\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 4.5,\n cy: 12.25,\n r: 1,\n fill: \"#919191\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 20.5,\n cy: 12.25,\n r: 1,\n fill: \"#919191\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPlate);\nexport default __webpack_public_path__ + \"static/media/plate.c662d295.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/plate.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _path, _circle, _circle2, _circle3, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _rect10, _path2, _circle4, _path3, _path4, _path5, _path6, _path7, _path8, _circle5;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgParkedCars(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 682,\n height: 578,\n viewBox: \"0 0 682 578\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 28.512,\n y: 379.213,\n width: 74.112,\n height: 57.028,\n rx: 28.514,\n transform: \"rotate(-30 28.512 379.213)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 489.144,\n y: 47.425,\n width: 57.091,\n height: 57.091,\n rx: 28.545,\n transform: \"rotate(-30 489.144 47.425)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M130.268 254.619c-13.654 7.882-18.331 25.341-10.449 38.994 7.883 13.653 25.341 18.331 38.994 10.448l43.033-24.845-.28.164 74.186-42.831c13.653-7.883 31.111-3.205 38.994 10.448 7.821 13.547 3.277 30.84-10.132 38.808l185.249-106.953a29.221 29.221 0 001.709-1.067c-13.357 6.52-29.674 1.675-37.219-11.393-7.544-13.067-3.583-29.619 8.74-37.927-.598.292-1.191.607-1.776.945l-1.691.977c13.625-7.893 18.287-25.332 10.412-38.973-7.883-13.653-25.341-18.331-38.994-10.448L130.268 254.619zm433.014 79.617c13.653-7.883 18.331-25.341 10.449-38.994-7.883-13.653-25.341-18.331-38.994-10.448l-168.618 97.351c-13.653 7.883-18.331 25.341-10.448 38.994 7.883 13.653 25.341 18.331 38.994 10.448l168.617-97.351zM437.71 274.891l-1.281.739c.192-.105.385-.207.579-.307-12.818 8.161-17.044 25.054-9.372 38.342 7.649 13.249 24.316 18.046 37.772 11.115-.352.224-.711.442-1.076.652l-138.095 79.73c13.34-7.992 17.847-25.239 10.043-38.756-7.882-13.653-25.34-18.331-38.993-10.448l-89.555 51.704c-13.577 7.489-30.711 2.761-38.499-10.728-7.883-13.653-3.205-31.111 10.448-38.993l351.661-203.032c13.653-7.883 31.112-3.205 38.994 10.448 7.883 13.653 3.205 31.112-10.448 38.994l-23.852 13.771c-.126.07-.252.142-.377.214l-97.575 56.335c-.125.072-.25.146-.374.22z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 616.804,\n cy: 405.324,\n r: 14.811,\n stroke: \"#E6E6E6\",\n strokeWidth: 7.129\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 96.62,\n cy: 126.454,\n r: 11.009,\n stroke: \"#E6E6E6\",\n strokeWidth: 7.129\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 154.559,\n cy: 501.775,\n r: 16.884,\n stroke: \"#E6E6E6\",\n strokeWidth: 7.129\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 404.664,\n y: 14.575,\n width: 35.484,\n height: 6.336,\n rx: 3.168,\n fill: \"#E6E6E6\"\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 425.568,\n width: 35.484,\n height: 6.336,\n rx: 3.168,\n transform: \"rotate(90 425.568 0)\",\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 521.059,\n y: 497.087,\n width: 26.613,\n height: 6.336,\n rx: 3.168,\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 537.535,\n y: 487.269,\n width: 26.613,\n height: 6.336,\n rx: 3.168,\n transform: \"rotate(90 537.535 487.269)\",\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 35.502,\n y: 312.565,\n width: 26.613,\n height: 6.336,\n rx: 3.168,\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 51.978,\n y: 302.747,\n width: 26.613,\n height: 6.336,\n rx: 3.168,\n transform: \"rotate(90 51.978 302.747)\",\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 111.88,\n y: 156.633,\n width: 104.422,\n height: 123.068,\n rx: 22.376,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 223.76,\n y: 305.806,\n width: 309.536,\n height: 96.963,\n rx: 33.875,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M271.61 230.097c4.012-14.748 17.403-24.983 32.687-24.983h148.461c15.284 0 28.675 10.235 32.687 24.983l20.595 75.709H251.015l20.595-75.709z\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 279.699,\n cy: 354.288,\n r: 18.647,\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M249.865 402.769h48.482v33.409c0 8.325-6.749 15.073-15.073 15.073h-18.336c-8.325 0-15.073-6.748-15.073-15.073v-33.409z\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M458.708 402.769h48.481v33.409c0 8.325-6.748 15.073-15.072 15.073h-18.336c-8.325 0-15.073-6.748-15.073-15.073v-33.409z\",\n fill: \"#ECECEC\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M272.241 227.49h212.573M96.962 451.251h451.25M164.09 283.431v167.82\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M164.09 160.362h29.835c10.298 0 18.646 8.349 18.646 18.647v78.316c0 10.299-8.348 18.647-18.646 18.647H164.09v-115.61z\",\n fill: \"#ECECEC\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M156.502 226.135h6.267c10.384 0 18.802-7.975 18.802-17.813 0-9.837-8.418-17.812-18.802-17.812h-9.401v56.406\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M376.663 309.536h123.068c16.478 0 29.835 13.358 29.835 29.835v29.835c0 16.477-13.357 29.834-29.835 29.834H376.663v-89.504zM376.663 231.22h105.195l19.314 70.857H376.663V231.22zM376.663 208.844h76.351a30.477 30.477 0 0126.206 14.917H376.663v-14.917z\",\n fill: \"#ECECEC\"\n })), _circle5 || (_circle5 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 477.355,\n cy: 354.288,\n r: 18.647,\n stroke: \"#AFAFAF\",\n strokeWidth: 7.459\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgParkedCars);\nexport default __webpack_public_path__ + \"static/media/parked-cars.5f46c6a7.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/parked-cars.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPin(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 34,\n height: 28,\n viewBox: \"0 0 34 28\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.923 22.463c0 .285-.182.734-.93 1.296-.732.55-1.854 1.089-3.33 1.558-2.94.936-7.063 1.53-11.663 1.53-4.6 0-8.723-.594-11.663-1.53-1.476-.47-2.597-1.007-3.329-1.558-.748-.562-.93-1.011-.93-1.296 0-.286.182-.734.93-1.297.732-.55 1.853-1.088 3.329-1.558 2.94-.935 7.064-1.53 11.663-1.53 4.6 0 8.723.595 11.663 1.53 1.476.47 2.598 1.008 3.33 1.558.748.563.93 1.011.93 1.297z\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.846 8.11c0 1.935-.965 4.592-2.458 7.268-1.293 2.316-2.915 4.526-4.446 6.13-1.668-1.588-3.286-3.793-4.534-6.116-1.428-2.656-2.298-5.325-2.298-7.282 0-3.852 3.086-6.956 6.868-6.956 3.783 0 6.868 3.104 6.868 6.956z\",\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 17,\n cy: 8,\n r: 2,\n stroke: \"#32A3F5\",\n strokeWidth: 2\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPin);\nexport default __webpack_public_path__ + \"static/media/pin.20345779.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/pin.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCar(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 30,\n viewBox: \"0 0 30 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 18.747a2.25 2.25 0 104.501.005A2.25 2.25 0 0021 18.747v0zM4.5 18.747a2.25 2.25 0 104.5.006 2.25 2.25 0 00-4.5-.006v0zM9 19.5h12\",\n stroke: \"#000\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.125 19.5h.366c.4 0 .784-.154 1.067-.428.283-.274.442-.645.442-1.032v-2.337a1.429 1.429 0 00-.323-.924 1.516 1.516 0 00-.852-.521l-3.521-.745a1.512 1.512 0 01-.695-.346l-3.481-3.037a1.556 1.556 0 00-1.006-.38H8.569a1.548 1.548 0 00-.771.202 1.483 1.483 0 00-.557.555L5.822 12.98a1.51 1.51 0 01-.754.645l-1.127.443a1.5 1.5 0 00-.685.54 1.427 1.427 0 00-.256.818v2.604c0 .387.159.759.442 1.032.283.274.667.428 1.067.428h.366\",\n stroke: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCar);\nexport default __webpack_public_path__ + \"static/media/car.086a90ab.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/car.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _rect;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgParking(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 30,\n viewBox: \"0 0 30 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.125 16.382H14.5c1.933 0 3.5-1.485 3.5-3.316 0-1.832-1.567-3.316-3.5-3.316h-1.75v10.5\",\n stroke: \"#000\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5.75,\n y: 5,\n width: 18.5,\n height: 20,\n rx: 3.5,\n stroke: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgParking);\nexport default __webpack_public_path__ + \"static/media/parking.f1b01b7b.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/parking.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _mask, _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMail(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 84,\n height: 84,\n viewBox: \"0 0 84 84\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 42,\n cy: 42,\n r: 40.75,\n stroke: \"#fff\",\n strokeWidth: 2.5\n })), _mask || (_mask = /*#__PURE__*/React.createElement(\"mask\", {\n id: \"prefix__a\",\n fill: \"#fff\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: 16,\n y: 25,\n width: 52.077,\n height: 33.85,\n rx: 1.75\n }))), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 16,\n y: 25,\n width: 52.077,\n height: 33.85,\n rx: 1.75,\n stroke: \"#fff\",\n strokeWidth: 5,\n mask: \"url(#prefix__a)\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.395 26.395l24.643 15.53 24.644-15.53\",\n stroke: \"#fff\",\n strokeWidth: 2.5\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMail);\nexport default __webpack_public_path__ + \"static/media/mail.a889bb1d.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/mail.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle, _rect, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgResetPassword(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 336,\n height: 336,\n viewBox: \"0 0 336 336\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M127 195.4l26.091 26.6L209 165\",\n stroke: \"#fff\",\n strokeWidth: 10,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 168,\n cy: 168,\n r: 163,\n stroke: \"#fff\",\n strokeWidth: 10\n })), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 89.478,\n y: 137.098,\n width: 157.041,\n height: 113.904,\n rx: 5,\n stroke: \"#fff\",\n strokeWidth: 10\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M117.014 110.986C117.014 82.827 139.841 60 168 60c28.159 0 50.986 22.827 50.986 50.986v25.288H117.014v-25.288z\",\n stroke: \"#fff\",\n strokeWidth: 10\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgResetPassword);\nexport default __webpack_public_path__ + \"static/media/reset-password.eae56022.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/reset-password.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMenuMap(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 27,\n viewBox: \"0 0 24 27\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.98 12.488v13.8l6.68-1.34V11.15L.98 12.49zm7.68-1.337V24.95l6.574 1.336V12.487L8.66 11.151zm7.574 1.305v13.779l6.626-1.894V10.56l-6.626 1.895z\",\n stroke: \"#000\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.385 7.756c0 1.769-.872 4.133-2.172 6.462-1.2 2.15-2.727 4.2-4.149 5.63-1.57-1.42-3.095-3.47-4.253-5.623-1.247-2.32-2.03-4.69-2.03-6.469 0-3.527 2.827-6.377 6.302-6.377 3.475 0 6.302 2.85 6.302 6.377z\",\n fill: \"#fff\",\n stroke: \"#000\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12.083,\n cy: 7.679,\n r: 2.015,\n fill: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMenuMap);\nexport default __webpack_public_path__ + \"static/media/menu-map.d04c0912.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/menu-map.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgUser(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12,\n cy: 5.529,\n r: 5.029,\n stroke: \"#000\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.474 16.367c1.854 1.777 2.943 4.144 3.072 6.633H1.454c.13-2.49 1.218-4.856 3.072-6.633 1.98-1.896 4.667-2.965 7.474-2.965 2.807 0 5.495 1.07 7.474 2.965z\",\n stroke: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgUser);\nexport default __webpack_public_path__ + \"static/media/user.de64feb3.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/user.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _path2, _rect10, _path3, _path4, _path5, _rect11;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgUnlock(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 213,\n height: 176,\n viewBox: \"0 0 213 176\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 36.295,\n y: 159.609,\n width: 48.554,\n height: 18.148,\n rx: 9.074,\n transform: \"rotate(-30 36.295 159.609)\",\n fill: \"#E7E7E7\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11.855,\n y: 110.832,\n width: 24.17,\n height: 18.127,\n rx: 9.064,\n transform: \"rotate(-30 11.855 110.832)\",\n fill: \"#E7E7E7\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 151.854,\n y: 9.074,\n width: 18.148,\n height: 18.148,\n rx: 9.074,\n transform: \"rotate(-30 151.854 9.074)\",\n fill: \"#E7E7E7\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M46.162 70.096a9.074 9.074 0 008.948 15.787l28.018-16.176a9.074 9.074 0 019.133 15.682l50.628-29.23.07-.041-1.422.82a9.074 9.074 0 11-9.073-15.715l6.815-3.935a9.074 9.074 0 00-9.228-15.625l-83.89 48.433zm52.843 53.31a9.074 9.074 0 009.074 15.717l67.34-38.879a9.074 9.074 0 003.321-12.395 9.074 9.074 0 00-12.395-3.322l-67.34 38.879zm36.517-42.038l-.522.302c.088-.05.176-.097.264-.143a9.074 9.074 0 009.063 15.7 8.789 8.789 0 01-.359.22l-56.204 32.448a2.36 2.36 0 01-.07.04l12.248-7.071a9.073 9.073 0 003.321-12.395 9.073 9.073 0 00-12.395-3.321L62.43 123.566a9.074 9.074 0 01-8.946-15.788L165.267 43.24a9.074 9.074 0 019.074 15.716l-7.599 4.388-.102.058-31.017 17.907-.101.06z\",\n fill: \"#E7E7E7\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 203.433,\n cy: 106.954,\n r: 4.708,\n stroke: \"#D0D0D0\",\n strokeWidth: 2.266\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 34.644,\n cy: 46.73,\n r: 3.499,\n stroke: \"#D0D0D0\",\n strokeWidth: 2.266\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 100.105,\n cy: 161.535,\n r: 3.499,\n stroke: \"#D0D0D0\",\n strokeWidth: 2.266\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 129.109,\n y: 4.633,\n width: 11.279,\n height: 2.014,\n rx: 1.007,\n fill: \"#C4C4C4\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 135.756,\n width: 11.279,\n height: 2.014,\n rx: 1.007,\n transform: \"rotate(90 135.756 0)\",\n fill: \"#C4C4C4\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 168.184,\n y: 134.242,\n width: 8.459,\n height: 2.014,\n rx: 1.007,\n fill: \"#C4C4C4\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 173.422,\n y: 131.121,\n width: 8.459,\n height: 2.014,\n rx: 1.007,\n transform: \"rotate(90 173.422 131.121)\",\n fill: \"#C4C4C4\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 7.656,\n y: 93.356,\n width: 8.459,\n height: 2.014,\n rx: 1.007,\n fill: \"#C4C4C4\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 12.895,\n y: 90.234,\n width: 8.459,\n height: 2.014,\n rx: 1.007,\n transform: \"rotate(90 12.895 90.234)\",\n fill: \"#C4C4C4\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M71.541 46.675v19.35l7.21.19V56.35c-.38-11.066 4.059-32.972 24.851-32.061 25.991 1.138 25.422 23.714 25.612 26.56.189 2.845 7.019 5.122 7.588-1.708s-6.071-31.302-33.2-32.061c-21.703-.607-30.417 19.477-32.061 29.595z\",\n fill: \"#fff\"\n })), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 54.391,\n y: 66.986,\n width: 99.708,\n height: 66.103,\n rx: 9.475,\n fill: \"#fff\",\n stroke: \"#BEBEBE\",\n strokeWidth: 2.707\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M129.391 49.631c0-13.888-11.259-25.147-25.147-25.147-13.888 0-25.146 11.259-25.146 25.147v16.371\",\n stroke: \"#BEBEBE\",\n strokeWidth: 2.707\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M136.705 49.626c0-17.928-14.533-32.462-32.462-32.462-17.928 0-32.462 14.534-32.462 32.462V66M129.392 49.631a3.657 3.657 0 107.315 0\",\n stroke: \"#BEBEBE\",\n strokeWidth: 2.707\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M104.793 68.34h39.865a8.1 8.1 0 018.1 8.1v47.183a8.1 8.1 0 01-8.1 8.1h-39.865V68.34z\",\n fill: \"#ECECEC\"\n })), _rect11 || (_rect11 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 99.672,\n y: 88.262,\n width: 9.144,\n height: 23.775,\n rx: 4.572,\n fill: \"#BEBEBE\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgUnlock);\nexport default __webpack_public_path__ + \"static/media/unlock.bd7d67a4.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/unlock.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLabel(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 100 100\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.08 19.992a2.496 2.496 0 011.766-.732h26.4a2.5 2.5 0 012.498 2.502v26.44c0 .663-.263 1.299-.732 1.768l-40.11 40.17a2.495 2.495 0 01-3.532 0L9.97 63.7a2.505 2.505 0 010-3.538l40.11-40.17z\",\n stroke: \"#000\",\n strokeWidth: 5\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n r: 6.767,\n transform: \"rotate(45 -19.602 91.885)\",\n stroke: \"#000\",\n strokeWidth: 5\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.87 52.844l32.824 32.824\",\n stroke: \"#000\",\n strokeWidth: 5\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLabel);\nexport default __webpack_public_path__ + \"static/media/label.b06ebf70.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/label.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import * as React from 'react'\r\nimport styled from 'styled-components'\r\nimport { Typography } from '@mui/material'\r\n\r\nconst StyledSpotNumberIcon = styled(Typography)`\r\n position: absolute;\r\n width: 100%;\r\n height: auto;\r\n top: 50%;\r\n left: 0;\r\n font-size: 48px;\r\n transform: translateY(-45%);\r\n`\r\ninterface SpotNumberIconProps {\r\n spotNumber: string\r\n}\r\nexport const SpotNumberIcon: React.FC = props => {\r\n return (\r\n \r\n \r\n \r\n {props.spotNumber}\r\n \r\n
\r\n )\r\n}\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default SpotNumberIcon\r\n","var _circle, _path, _circle2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgInfo(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 110 110\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 55,\n cy: 55,\n r: 37.5,\n stroke: \"#fff\",\n strokeWidth: 5\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55 33v29\",\n stroke: \"#fff\",\n strokeWidth: 5,\n strokeLinecap: \"round\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 55,\n cy: 73,\n r: 4,\n fill: \"#fff\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgInfo);\nexport default __webpack_public_path__ + \"static/media/info.5d835666.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/info.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _path, _circle, _path2, _circle2, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _path3, _path4, _path5, _path6;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgValidator(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 671,\n height: 568,\n viewBox: \"0 0 671 568\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 28.706,\n y: 372.843,\n width: 72.867,\n height: 56.069,\n rx: 28.035,\n transform: \"rotate(-30 28.706 372.843)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 481.589,\n y: 46.625,\n width: 56.131,\n height: 56.131,\n rx: 28.066,\n transform: \"rotate(-30 481.589 46.625)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M203.695 207.074c-13.424 7.75-18.023 24.915-10.273 38.338 7.636 13.226 24.411 17.886 37.743 10.607l40.611-23.446c13.423-7.75 30.588-3.151 38.338 10.272 7.75 13.424 3.151 30.589-10.273 38.339l-73.088 42.198c.158-.088.316-.177.474-.268l255.075-147.268c.161-.093.321-.187.48-.283l-13.468 7.776c-13.424 7.75-30.589 3.151-38.339-10.273s-3.151-30.588 10.273-38.338l11.88-6.86c12.963-7.908 17.311-24.761 9.677-37.984-7.75-13.424-24.915-18.023-38.338-10.273L203.695 207.074zm137.134 180.085c-13.423 7.751-18.023 24.915-10.272 38.339 7.75 13.423 24.914 18.023 38.338 10.273l156.48-90.344c13.424-7.751 18.023-24.915 10.273-38.339-7.75-13.423-24.915-18.023-38.338-10.273l-156.481 90.344zm-57.825 33.376l.347-.197L493.07 299.256c.129-.074.257-.149.384-.225l-5.206 3.005c-13.423 7.75-30.588 3.151-38.338-10.272-7.75-13.424-3.151-30.589 10.273-38.339l67.134-38.76c.175-.101.351-.2.528-.297l23.298-13.451c13.423-7.75 18.022-24.915 10.272-38.339-7.75-13.423-24.914-18.022-38.338-10.272L177.326 351.925c-13.424 7.75-18.023 24.915-10.273 38.338 7.655 13.258 24.492 17.908 37.839 10.555l88.063-50.843c13.424-7.75 30.589-3.151 38.339 10.272 7.75 13.424 3.151 30.589-10.273 38.339l-38.017 21.949z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 607.099,\n cy: 398.512,\n r: 14.562,\n stroke: \"#E6E6E6\",\n strokeWidth: 7.009\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.488 124.329c0 5.978-4.846 10.824-10.824 10.824s-10.824-4.846-10.824-10.824 4.846-10.824 10.824-10.824 10.824 4.846 10.824 10.824z\",\n stroke: \"#E6E6E6\",\n strokeWidth: 7.009\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 152.63,\n cy: 493.341,\n r: 16.6,\n stroke: \"#E6E6E6\",\n strokeWidth: 7.009\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 398.53,\n y: 14.33,\n width: 34.887,\n height: 6.23,\n rx: 3.115,\n fill: \"#E6E6E6\"\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 419.091,\n width: 34.887,\n height: 6.23,\n rx: 3.115,\n transform: \"rotate(90 419.091 0)\",\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 512.97,\n y: 488.73,\n width: 26.166,\n height: 6.23,\n rx: 3.115,\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 529.169,\n y: 479.077,\n width: 26.166,\n height: 6.23,\n rx: 3.115,\n transform: \"rotate(90 529.169 479.077)\",\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 121.668,\n y: 262.654,\n width: 26.166,\n height: 6.23,\n rx: 3.115,\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 137.867,\n y: 253,\n width: 26.166,\n height: 6.23,\n rx: 3.115,\n transform: \"rotate(90 137.867 253)\",\n fill: \"#E6E6E6\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M461.095 201.676c-12.957 10.376-31.922 9.559-43.933-2.451-12.01-12.011-12.827-30.976-2.451-43.933l-41.625-41.625-207.418 207.418 41.625 41.625c12.957-10.38 31.925-9.564 43.937 2.447 12.012 12.012 12.828 30.98 2.448 43.937l41.626 41.627 207.418-207.418-41.627-41.627z\",\n fill: \"#fff\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M461.095 201.677c-12.957 10.377-31.923 9.561-43.934-2.45s-12.828-30.977-2.45-43.934l-41.626-41.626-38.957 38.519.001 172.333v64.167l-.002 23.833 168.594-169.216-41.626-41.626z\",\n fill: \"#ECECEC\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M253.635 409.052l41.669 41.669 207.418-207.418-41.669-41.669M207.337 362.753l-41.669-41.668 207.418-207.418 41.669 41.668\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.333\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M463.834 199.226c-12.888 12.887-33.782 12.887-46.669 0-12.888-12.887-12.888-33.782 0-46.669M204.558 365.161c12.887-12.887 33.781-12.887 46.669 0 12.887 12.888 12.887 33.782 0 46.669M308.268 178.485l23.334 23.335M347.162 217.375l18.921 18.922M383.456 253.673l18.921 18.922M438.219 308.44l-23.652-23.651\",\n stroke: \"#AFAFAF\",\n strokeWidth: 7.333\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgValidator);\nexport default __webpack_public_path__ + \"static/media/validator.71ac74da.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/validator.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _path2, _path3, _rect10, _circle4, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgNoFound(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 151,\n height: 124,\n viewBox: \"0 0 151 124\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 25.605,\n y: 112.598,\n width: 34.252,\n height: 12.802,\n rx: 6.401,\n transform: \"rotate(-30 25.605 112.598)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8.363,\n y: 78.188,\n width: 17.051,\n height: 12.788,\n rx: 6.394,\n transform: \"rotate(-30 8.363 78.188)\",\n fill: \"#E6E6E6\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 107.126,\n y: 6.402,\n width: 12.802,\n height: 12.802,\n rx: 6.401,\n transform: \"rotate(-30 107.126 6.402)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M32.564 49.45a6.401 6.401 0 106.401 11.086l3.72-2.147-.027.016 3.904-2.254a6.401 6.401 0 016.453 11.056l47.787-27.59c.502-.29.95-.637 1.341-1.03a6.404 6.404 0 01-6.179-10.703 6.407 6.407 0 00-1.538.632l2.861-1.652.018-.01.858-.496a6.401 6.401 0 00-6.419-11.076l-59.18 34.167zm10.562 23.467l.038-.022 9.799-5.657.038-.022 63.587-36.712a6.401 6.401 0 016.401 11.087L95.195 57.638c.076-.043.152-.085.23-.125a6.401 6.401 0 006.388 11.078 6.703 6.703 0 01-.251.153L70.563 86.642a6.401 6.401 0 00-6.46-11.053l-8.649 4.993.025-.014-11.347 6.551a6.401 6.401 0 01-6.401-11.087l5.395-3.115zm26.666 14.17a6.401 6.401 0 006.452 11.057l47.506-27.427a6.402 6.402 0 00-6.357-11.112l-15.316 8.842-.045.026-31.477 18.173-.05.03-.713.411z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 143.509,\n cy: 75.449,\n r: 2.818,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.605\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 24.439,\n cy: 32.963,\n r: 1.965,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.605\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 70.619,\n cy: 113.956,\n r: 1.965,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.605\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 91.079,\n y: 3.27,\n width: 7.957,\n height: 1.421,\n rx: 0.71,\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 95.768,\n width: 7.957,\n height: 1.421,\n rx: 0.71,\n transform: \"rotate(90 95.768 0)\",\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 118.646,\n y: 94.703,\n width: 5.968,\n height: 1.421,\n rx: 0.71,\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 122.34,\n y: 92.5,\n width: 5.968,\n height: 1.421,\n rx: 0.71,\n transform: \"rotate(90 122.34 92.5)\",\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5.399,\n y: 65.859,\n width: 5.968,\n height: 1.421,\n rx: 0.71,\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 9.094,\n y: 63.656,\n width: 5.968,\n height: 1.421,\n rx: 0.71,\n transform: \"rotate(90 9.094 63.656)\",\n fill: \"#E6E6E6\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M54.252 37.273c-10.076 10.103-10.076 26.482 0 36.584l13.397 13.434a6.848 6.848 0 009.702 0l13.397-13.433c10.076-10.103 10.076-26.482 0-36.585-10.078-10.104-26.418-10.104-36.496 0zm18.214 8.952c5.14 0 9.311 4.179 9.311 9.34 0 5.162-4.172 9.34-9.311 9.34-5.14 0-9.312-4.178-9.312-9.34 0-5.161 4.172-9.34 9.312-9.34z\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.61\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M72 87.978a5.533 5.533 0 004.427-1.609l13.397-13.433c9.568-9.594 9.568-25.148 0-34.74A24.394 24.394 0 0072 31.005V44.93c.154-.007.31-.01.466-.01 5.863 0 10.616 4.765 10.616 10.645 0 5.879-4.753 10.645-10.616 10.645-.156 0-.312-.004-.466-.01v21.777z\",\n fill: \"#ECECEC\"\n })), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 93.92,\n y: 76.662,\n width: 28.61,\n height: 4.61,\n rx: 2.305,\n transform: \"rotate(45 93.92 76.662)\",\n fill: \"#ECECEC\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.61\n })), _circle4 || (_circle4 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 93.213,\n cy: 79.215,\n r: 13.695,\n transform: \"rotate(-45 93.213 79.215)\",\n fill: \"#fff\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.61\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101 79a8 8 0 00-8-8\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.61,\n strokeLinecap: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgNoFound);\nexport default __webpack_public_path__ + \"static/media/no-found.1bb29ace.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/no-found.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _ellipse, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgHeadingGpsIndicator(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 53,\n height: 52,\n viewBox: \"0 0 53 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.754 0L10.822 19.63a11.313 11.313 0 006.893 20.661l34.922-1.673L39.754 0z\",\n fill: \"url(#prefix__paint0_linear)\"\n })), _ellipse || (_ellipse = /*#__PURE__*/React.createElement(\"ellipse\", {\n cx: 16.665,\n cy: 29.16,\n rx: 7.942,\n ry: 7.802,\n transform: \"rotate(71.55 16.665 29.16)\",\n fill: \"#fff\"\n })), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"prefix__paint0_linear\",\n x1: 46.196,\n y1: 19.309,\n x2: 6.442,\n y2: 32.571,\n gradientUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#32A3F5\",\n stopOpacity: 0\n }), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#32A3F5\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgHeadingGpsIndicator);\nexport default __webpack_public_path__ + \"static/media/heading-gps-indicator.831eeea4.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/heading-gps-indicator.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPinCar(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 55,\n height: 65,\n viewBox: \"0 0 55 65\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.975 47.553c-10.633-10.656-10.633-27.932 0-38.588 10.633-10.656 27.872-10.656 38.505 0 10.633 10.655 10.633 27.932 0 38.588L31.59 62.474a6.162 6.162 0 01-8.728 0L7.975 47.554z\",\n fill: \"#ED1C24\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.114 32.544a2.938 2.938 0 11-5.876.008 2.938 2.938 0 015.876-.008v0zM41.182 32.544a2.938 2.938 0 11-5.877.008 2.938 2.938 0 015.877-.008v0z\",\n stroke: \"#fff\",\n strokeWidth: 2\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.322 32.547H19.114\",\n stroke: \"#fff\",\n strokeWidth: 2.605\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.146 32.545h-.61a2.114 2.114 0 01-2.114-2.114v-3.383a2.114 2.114 0 011.646-2.093L17 23.877c.363-.078.699-.25.973-.5l4.876-4.398a2.139 2.139 0 011.41-.55h11.98a2.114 2.114 0 011.86 1.097l1.987 3.58c.237.421.61.75 1.057.933l1.579.641a2.114 2.114 0 011.317 1.966v3.77a2.114 2.114 0 01-2.114 2.115h-.775\",\n stroke: \"#fff\",\n strokeWidth: 2\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPinCar);\nexport default __webpack_public_path__ + \"static/media/pin-car.0ba990af.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/pin-car.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _circle3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgWarning(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 199,\n height: 164,\n viewBox: \"0 0 199 164\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 33.8848,\n y: 149.013,\n width: 45.3294,\n height: 16.9424,\n rx: 8.47122,\n transform: \"rotate(-30 33.8848 149.013)\",\n fill: \"#E6E6E6\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11.0684,\n y: 103.474,\n width: 22.5649,\n height: 16.9237,\n rx: 8.46183,\n transform: \"rotate(-30 11.0684 103.474)\",\n fill: \"#E6E6E6\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 141.77,\n y: 8.47125,\n width: 16.9424,\n height: 16.9424,\n rx: 8.47122,\n transform: \"rotate(-30 141.77 8.47125)\",\n fill: \"#E6E6E6\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M43.0943 65.4416C39.0425 67.7809 37.6543 72.9618 39.9936 77.0135C42.328 81.0568 47.4921 82.4476 51.5401 80.1288L77.6068 65.0792C81.6585 62.7399 86.8394 64.1281 89.1787 68.1799C91.5179 72.2316 90.1297 77.4125 86.078 79.7518L64.975 91.9355C64.9808 91.9322 64.9865 91.9289 64.9923 91.9256L133.4 52.4307C133.408 52.4256 133.417 52.4205 133.426 52.4154L132.136 53.16C128.084 55.4993 122.904 54.111 120.564 50.0593C118.225 46.0076 119.613 40.8267 123.665 38.4874L129.917 34.878C133.943 32.5299 135.318 27.3659 132.985 23.325C130.645 19.2733 125.465 17.8851 121.413 20.2244L43.0943 65.4416ZM92.412 115.222C88.3736 117.566 86.9926 122.738 89.3285 126.784C91.6678 130.836 96.8487 132.224 100.9 129.884L163.769 93.5873C167.821 91.248 169.209 86.0671 166.87 82.0154C164.53 77.9636 159.35 76.5754 155.298 78.9147L134.424 90.9664C134.532 90.9033 134.639 90.8383 134.744 90.7712C130.747 92.8432 125.788 91.4214 123.514 87.483C121.241 83.5459 122.488 78.5425 126.278 76.1163C126.163 76.1759 126.049 76.2384 125.935 76.3038L84.8751 100.01C88.9204 97.705 94.0731 99.0977 96.4041 103.135C98.7434 107.187 97.3552 112.368 93.3034 114.707L81.8927 121.295C81.9068 121.287 81.9209 121.279 81.935 121.271L92.412 115.222ZM84.8545 100.022C84.8471 100.026 84.8396 100.03 84.8322 100.034L58.38 115.307C54.3316 117.628 49.1654 116.237 46.8304 112.193C44.4911 108.141 45.8794 102.961 49.9311 100.621L154.291 40.369C158.343 38.0297 163.524 39.418 165.863 43.4697C168.202 47.5214 166.814 52.7023 162.762 55.0416L155.607 59.1724C155.595 59.1793 155.583 59.1861 155.571 59.1931L126.615 75.9111C126.603 75.918 126.591 75.9249 126.579 75.9319L84.8545 100.022Z\",\n fill: \"#E6E6E6\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 189.922,\n cy: 99.8496,\n r: 4.15044,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32.3425,\n cy: 43.6254,\n r: 3.0222,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 93.4558,\n cy: 150.809,\n r: 3.0222,\n stroke: \"#E6E6E6\",\n strokeWidth: 2.60547\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 120.533,\n y: 4.32495,\n width: 10.5303,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 126.738,\n width: 10.5303,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 126.738 0)\",\n fill: \"#E6E6E6\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 157.014,\n y: 125.329,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 161.902,\n y: 122.414,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 161.902 122.414)\",\n fill: \"#E6E6E6\"\n })), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 7.14648,\n y: 87.1569,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n fill: \"#E6E6E6\"\n })), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 12.0352,\n y: 84.2422,\n width: 7.89771,\n height: 1.88041,\n rx: 0.940203,\n transform: \"rotate(90 12.0352 84.2422)\",\n fill: \"#E6E6E6\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M104.391 40.7799C102.289 37.1265 97.0303 37.1265 94.9284 40.7799L52.0651 115.286C49.9686 118.93 52.5846 123.499 56.7962 123.499H142.523C146.735 123.499 149.351 118.93 147.254 115.286L104.391 40.7799Z\",\n fill: \"white\",\n stroke: \"#AFAFAF\",\n strokeWidth: 2.60547\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M99.5293 122.196H142.523C145.725 122.196 147.726 118.718 146.125 115.935L103.262 41.4296C102.436 39.9951 100.973 39.3001 99.5293 39.3446V122.196Z\",\n fill: \"#ECECEC\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M102.579 94.5758L96.2692 94.5758L96.2692 68.2633L102.579 68.2633L102.579 94.5758ZM99.399 98.9119C100.543 98.9119 101.502 99.2569 102.276 99.9467C103.05 100.669 103.438 101.556 103.438 102.608C103.438 103.659 103.05 104.529 102.276 105.219C101.502 105.942 100.543 106.303 99.399 106.303C98.2548 106.303 97.2957 105.958 96.5216 105.268C95.7476 104.611 95.3605 103.774 95.3605 102.755C95.3605 101.671 95.7476 100.752 96.5216 99.996C97.262 99.2733 98.2211 98.9119 99.399 98.9119Z\",\n fill: \"#AFAFAF\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgWarning);\nexport default __webpack_public_path__ + \"static/media/warning.4de95583.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/warning.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import * as React from 'react'\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgClock(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 30,\n viewBox: \"0 0 30 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 15,\n cy: 15,\n r: 10.5,\n stroke: \"#000\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15 9v6.429L19 19\",\n stroke: \"#000\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgClock);\nexport default __webpack_public_path__ + \"static/media/clock.9deb39a0.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/clock.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _rect2, _rect3, _path, _circle, _circle2, _rect4, _rect5, _rect6, _rect7, _circle3, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgSuccessTick(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 159,\n height: 61,\n viewBox: \"0 0 159 61\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8.854,\n y: 48.273,\n width: 32.172,\n height: 12.025,\n rx: 6.012,\n fill: \"#E4F4FF\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 10.99,\n y: 12.188,\n width: 16.015,\n height: 12.011,\n rx: 6.006,\n fill: \"#E4F4FF\"\n })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 125.039,\n y: 0.176,\n width: 12.025,\n height: 12.025,\n rx: 6.012,\n fill: \"#E4F4FF\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M44.171.176a6.012 6.012 0 00-.126 12.023h21.47a6.012 6.012 0 010 12.025H48.216 103.202a6.013 6.013 0 01.06-12.024h5.204a6.012 6.012 0 005.902-6.012 6.012 6.012 0 00-6.012-6.012H44.171zm12.537 48.099a6.012 6.012 0 00.125 12.023h51.523a6.012 6.012 0 00.125-12.023H91.794c-.042 0-.084 0-.125-.002h-.318c.054 0 .108-.002.161-.005a6.013 6.013 0 01.004-12.012 6.438 6.438 0 00-.146-.005h.296l.128-.001h23.731l.127.001h5.764a6.013 6.013 0 100-12.024H35.889a6.012 6.012 0 00-.127 12.023h21.79a6.012 6.012 0 010 12.025h-.844z\",\n fill: \"#E4F4FF\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 155.083,\n cy: 18.101,\n r: 1.767,\n stroke: \"#E4F4FF\",\n strokeWidth: 2.605\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 3.07,\n cy: 37.597,\n r: 1.767,\n stroke: \"#E4F4FF\",\n strokeWidth: 2.605\n })), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 137.105,\n y: 47.57,\n width: 7.474,\n height: 1.335,\n rx: 0.667,\n fill: \"#E4F4FF\"\n })), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 141.51,\n y: 44.5,\n width: 7.474,\n height: 1.335,\n rx: 0.667,\n transform: \"rotate(90 141.51 44.5)\",\n fill: \"#E4F4FF\"\n })), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 13.627,\n y: 2.07,\n width: 5.605,\n height: 1.335,\n rx: 0.667,\n fill: \"#E4F4FF\"\n })), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17.098,\n width: 5.605,\n height: 1.335,\n rx: 0.667,\n transform: \"rotate(90 17.098 0)\",\n fill: \"#E4F4FF\"\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 72.974,\n cy: 27.337,\n r: 24.351,\n fill: \"#fff\",\n stroke: \"#32A3F5\",\n strokeWidth: 2.605\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M59.299 28.833l8.734 8.734 18.716-18.715\",\n stroke: \"#32A3F5\",\n strokeWidth: 2.605,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgSuccessTick);\nexport default __webpack_public_path__ + \"static/media/success-tick.682b29a6.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/success-tick.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgT2PLogoColor(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 314,\n height: 113,\n viewBox: \"0 0 314 113\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M284.368 80.2964H38.3623L3.99994 107.325L23.3323 15.3589C24.8799 7.99264 32.1963 2.02563 39.6749 2.02563H300.824C308.408 2.02563 313.277 8.0811 311.705 15.5439L300.937 66.7701C299.373 74.2409 291.968 80.2964 284.368 80.2964Z\",\n fill: \"white\",\n stroke: \"#231F20\",\n strokeWidth: 3.94872,\n strokeMiterlimit: 22.93\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M52.299 26.7103L43.7672 67.257H36.6209L45.1446 26.7103H36.6127L37.9496 20.3252H62.1759L60.8309 26.7103H52.299Z\",\n fill: \"#231F20\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M66.0926 20.3252H86.4054L85.0685 26.7103H71.894L69.0824 40.0758H81.5926L80.2476 46.5092H67.7455L64.7152 60.8718H78.2139L76.8688 67.257H56.1915L66.0926 20.3252Z\",\n fill: \"#231F20\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M86.0763 67.257H79.7889L80.7854 62.5043L93.0201 43.3327L89.0499 25.0859L90.0546 20.3252H96.2691L98.9105 38.3146H99.502L109.776 20.3252H115.99L114.994 25.0859L103.351 43.3327L107.523 62.5043L106.527 67.257H100.239L97.444 48.0934H96.8525L86.0763 67.257Z\",\n fill: \"#231F20\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M132.708 26.7103L124.184 67.257H117.038L125.561 26.7103H117.03L118.366 20.3252H142.593L141.264 26.7103H132.708Z\",\n fill: \"#231F20\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M139.825 74.1305L143.698 55.8435C144.905 50.1097 147.66 47.1584 151.897 45.3088L168.621 39.0683L172.056 22.7194L170.533 20.8939H161.977L159.708 22.7516L157.545 33.029H148.47L150.455 23.596C151.808 17.1625 155.211 14.8304 159.262 13.4794H176.375C179.859 14.8304 182.273 17.1867 180.92 23.596L178.23 36.4065C177.047 42.0358 174.592 45.1721 170.128 46.8608L153.323 53.0611L150.617 65.9279H171.683L169.949 74.1305H139.825Z\",\n fill: \"#ED1C24\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M190.34 47.9648L186.289 67.2651H179.143L189.012 20.3332H207.404C210.102 21.3786 211.966 23.2041 210.929 28.1578L208.336 40.4779C207.291 45.4316 204.73 46.9113 201.595 47.9728L190.34 47.9648ZM194.926 26.1233L191.572 42.0943H199.383L201.125 40.7272L203.896 27.5627L202.737 26.1233H194.926Z\",\n fill: \"#231F20\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M222.91 56.3765H213.187L208.845 67.257H202.427L203.424 62.5043L221.889 20.3252H229.368L230.178 62.5043L229.182 67.257H222.764L222.91 56.3765ZM215.796 50.0476H223.089L223.396 32.5165H222.805L215.796 50.0476Z\",\n fill: \"#231F20\"\n })), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M232.818 67.257L242.687 20.3252H261.079C263.778 21.3706 265.641 23.1961 264.604 28.1498L262.449 38.379C261.404 43.3327 258.859 44.7722 255.724 45.8096L254.614 46.075L259.475 62.826L258.543 67.257H252.191L247.492 47.1526H244.162L239.924 67.257H232.818ZM248.594 26.1233L245.401 41.3142H253.212L254.97 39.8828L257.563 27.5628L256.404 26.1233H248.594Z\",\n fill: \"#231F20\"\n })), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M272.926 46.7263L268.607 67.257H261.461L271.321 20.3252H278.476L274.262 40.3412H275.324L290.913 20.3252H296.674L295.863 24.2335L280.785 43.3327L287.818 62.44L286.805 67.2651H281.376L273.914 46.7344L272.926 46.7263Z\",\n fill: \"#231F20\"\n })), _path11 || (_path11 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M305.381 81.0232C305.395 81.6404 305.224 82.2478 304.889 82.7679C304.554 83.288 304.07 83.6971 303.5 83.943C302.929 84.1888 302.298 84.2602 301.686 84.1481C301.075 84.036 300.51 83.7454 300.066 83.3135C299.622 82.8816 299.317 82.328 299.191 81.7234C299.066 81.1188 299.124 80.4907 299.36 79.9194C299.596 79.3481 299.997 78.8596 300.514 78.5161C301.031 78.1727 301.639 77.99 302.261 77.9915C302.668 77.984 303.071 78.0569 303.449 78.2058C303.827 78.3547 304.171 78.5767 304.461 78.8588C304.751 79.141 304.982 79.4777 305.14 79.8493C305.298 80.2209 305.38 80.6199 305.381 81.0232ZM299.904 81.0232C299.894 81.3379 299.948 81.6514 300.063 81.9448C300.178 82.2382 300.352 82.5055 300.574 82.7308C300.795 82.956 301.06 83.1346 301.353 83.2557C301.646 83.3768 301.96 83.4381 302.278 83.4358C302.922 83.4358 303.541 83.1816 303.996 82.7292C304.452 82.2767 304.708 81.6631 304.708 81.0232C304.708 80.3834 304.452 79.7698 303.996 79.3173C303.541 78.8649 302.922 78.6107 302.278 78.6107C301.961 78.6095 301.647 78.6715 301.355 78.793C301.062 78.9146 300.798 79.0931 300.576 79.3182C300.355 79.5432 300.181 79.8101 300.066 80.103C299.95 80.3959 299.895 80.7088 299.904 81.0232ZM301.775 82.6316H301.07V79.5998C301.456 79.5339 301.846 79.5042 302.237 79.5114C302.605 79.4806 302.973 79.5561 303.299 79.7285C303.397 79.8075 303.475 79.9084 303.527 80.0229C303.579 80.1374 303.604 80.2624 303.598 80.3879C303.58 80.5556 303.509 80.7133 303.396 80.8389C303.283 80.9644 303.132 81.0514 302.966 81.0876C303.117 81.1496 303.248 81.2513 303.345 81.3816C303.442 81.512 303.502 81.6661 303.517 81.8274C303.552 82.0898 303.628 82.345 303.744 82.5833H302.983C302.869 82.3483 302.788 82.0996 302.74 81.8435C302.683 81.5138 302.505 81.361 302.108 81.361H301.775V82.6316ZM301.775 80.9187H302.108C302.496 80.9187 302.812 80.79 302.812 80.4764C302.812 80.1628 302.61 80.01 302.164 80.01C302.035 79.9956 301.905 79.9956 301.775 80.01V80.9187Z\",\n fill: \"#231F20\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgT2PLogoColor);\nexport default __webpack_public_path__ + \"static/media/t2p-logo-color.6386255d.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/t2p-logo-color.svg'\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgValidationTicketPlaceholder(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 48,\n height: 48,\n viewBox: \"0 0 48 48\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 48,\n height: 48,\n rx: 2.084,\n fill: \"#fff\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.097 36.11l3.89 3.89L40 20.985l-3.89-3.889M12.777 31.789L8.887 27.9 27.9 8.887l3.89 3.889M36.543 17.528a3.667 3.667 0 11-5.186-5.185M17.53 36.543a3.667 3.667 0 10-5.186-5.186M21.85 14.937l2.16 2.16M25.308 18.394l1.728 1.728M28.765 21.85l1.728 1.728M33.95 27.036l-2.16-2.16\",\n stroke: \"#AFAFAF\",\n strokeWidth: 1.157\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgValidationTicketPlaceholder);\nexport default __webpack_public_path__ + \"static/media/validation-ticket-placeholder.5680ab26.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/validation-ticket-placeholder.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import * as React from 'react'\r\n\r\nfunction SvgComponent(props: React.SVGProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default SvgComponent\r\n","var _path, _circle, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgUserTick(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 30,\n height: 30,\n viewBox: \"0 0 30 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 22.5l2.553 2.5L25 20\",\n stroke: \"#000\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 15,\n cy: 9,\n r: 4.5,\n stroke: \"#000\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.071 18.929A10 10 0 005 26h12\",\n stroke: \"#000\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgUserTick);\nexport default __webpack_public_path__ + \"static/media/user-tick.ed57f9b8.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/user-tick.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path, _circle2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgInformation(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 9.99992,\n cy: 10,\n r: 7.19231,\n stroke: \"#9D9D9D\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 8.46155V13.8462\",\n stroke: \"#9D9D9D\",\n strokeLinecap: \"round\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 9.9997,\n cy: 6.15387,\n r: 0.769231,\n fill: \"#9D9D9D\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgInformation);\nexport default __webpack_public_path__ + \"static/media/information.b226728d.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/information.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _circle, _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLanguageIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 22,\n viewBox: \"0 0 22 22\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 11,\n cy: 11,\n r: 10,\n stroke: \"white\",\n strokeWidth: 1.5\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 1C8.52248 2.3354 6 6.30754 6 11C6 15.6925 8.52248 19.6646 12 21\",\n stroke: \"white\",\n strokeWidth: 1.5\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 21C13.4775 19.6646 16 15.6925 16 11C16 6.30754 13.4775 2.3354 10 0.999998\",\n stroke: \"white\",\n strokeWidth: 1.5\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2 7H20\",\n stroke: \"white\",\n strokeWidth: 1.5\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2 15H20\",\n stroke: \"white\",\n strokeWidth: 1.5\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLanguageIcon);\nexport default __webpack_public_path__ + \"static/media/language-icon.c4601581.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/language-icon.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowDown(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 8,\n height: 4,\n viewBox: \"0 0 8 4\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4 4L0 0H8L4 4Z\",\n fill: \"white\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowDown);\nexport default __webpack_public_path__ + \"static/media/arrow-down.54362677.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/arrow-down.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFlagUsa(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 16,\n viewBox: \"0 0 22 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_2963_320)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip1_2963_320)\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 0H9.42857V7.46667H0V0Z\",\n fill: \"#1A47B8\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.42857 0V1.06667H22V0H9.42857ZM9.42857 2.13333V3.2H22V2.13333H9.42857ZM9.42857 4.26667V5.33333H22V4.26667H9.42857ZM9.42857 6.4V7.46667H22V6.4H9.42857ZM0 8.53333V9.6H22V8.53333H0ZM0 10.6667V11.7333H22V10.6667H0ZM0 12.8V13.8667H22V12.8H0ZM0 14.9333V16H22V14.9333H0Z\",\n fill: \"#F93939\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.04785 1.06665V2.13332H2.09547V1.06665H1.04785ZM3.14309 1.06665V2.13332H4.19071V1.06665H3.14309ZM5.23833 1.06665V2.13332H6.28595V1.06665H5.23833ZM7.33357 1.06665V2.13332H8.38119V1.06665H7.33357ZM6.28595 2.13332V3.19998H7.33357V2.13332H6.28595ZM4.19071 2.13332V3.19998H5.23833V2.13332H4.19071ZM2.09547 2.13332V3.19998H3.14309V2.13332H2.09547ZM1.04785 3.19998V4.26665H2.09547V3.19998H1.04785ZM3.14309 3.19998V4.26665H4.19071V3.19998H3.14309ZM5.23833 3.19998V4.26665H6.28595V3.19998H5.23833ZM7.33357 3.19998V4.26665H8.38119V3.19998H7.33357ZM1.04785 5.33332V6.39998H2.09547V5.33332H1.04785ZM3.14309 5.33332V6.39998H4.19071V5.33332H3.14309ZM5.23833 5.33332V6.39998H6.28595V5.33332H5.23833ZM7.33357 5.33332V6.39998H8.38119V5.33332H7.33357ZM6.28595 4.26665V5.33332H7.33357V4.26665H6.28595ZM4.19071 4.26665V5.33332H5.23833V4.26665H4.19071ZM2.09547 4.26665V5.33332H3.14309V4.26665H2.09547Z\",\n fill: \"white\"\n })), /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.25,\n y: 0.25,\n width: 21.5,\n height: 15.5,\n rx: 1.75,\n stroke: \"#CECECE\",\n strokeWidth: 0.5\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_2963_320\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n fill: \"white\"\n })), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip1_2963_320\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFlagUsa);\nexport default __webpack_public_path__ + \"static/media/flag-usa.0699d829.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/flag-usa.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFlagUk(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 16,\n viewBox: \"0 0 22 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_2963_327)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip1_2963_327)\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"#1A47B8\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.34035 0H0V2.66667L19.6469 16L22 16V13.3333L2.34035 0Z\",\n fill: \"white\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.780579 0L22 14.4378V16H21.2377L0 1.54726V0H0.780579Z\",\n fill: \"#F93939\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M19.9048 0H22V2.66667C22 2.66667 8.39122 11.5499 2.09524 16H0V13.3333L19.9048 0Z\",\n fill: \"white\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 0H21.2895L0 14.4502V16H0.780579L22 1.55895V0Z\",\n fill: \"#F93939\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.00075 0H14.0176V4.93527H22V11.0615H14.0176V16H8.00075V11.0615H0V4.93527H8.00075V0Z\",\n fill: \"white\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.26316 0H12.7368V6.15385H22V9.84615H12.7368V16H9.26316V9.84615H0V6.15385H9.26316V0Z\",\n fill: \"#F93939\"\n })), /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.25,\n y: 0.25,\n width: 21.5,\n height: 15.5,\n rx: 1.75,\n stroke: \"#CECECE\",\n strokeWidth: 0.5\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_2963_327\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n fill: \"white\"\n })), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip1_2963_327\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFlagUk);\nexport default __webpack_public_path__ + \"static/media/flag-uk.c472ee46.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/flag-uk.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFlagGermany(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 16,\n viewBox: \"0 0 22 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_2963_339)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip1_2963_339)\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"#F93939\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 11H23V16H0V11Z\",\n fill: \"#FFDA2C\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 0H23V5H0V0Z\",\n fill: \"#151515\"\n })), /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.25,\n y: 0.25,\n width: 21.5,\n height: 15.5,\n rx: 1.75,\n stroke: \"#CECECE\",\n strokeWidth: 0.5\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_2963_339\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n fill: \"white\"\n })), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip1_2963_339\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFlagGermany);\nexport default __webpack_public_path__ + \"static/media/flag-germany.f21934ec.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/flag-germany.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFlagItaly(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 22,\n height: 16,\n viewBox: \"0 0 22 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_2963_343)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip1_2963_343)\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 0H7V16H0V0Z\",\n fill: \"#249F58\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M15 0H22V16H15V0Z\",\n fill: \"#F93939\"\n })), /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.25,\n y: 0.25,\n width: 21.5,\n height: 15.5,\n rx: 1.75,\n stroke: \"#CECECE\",\n strokeWidth: 0.5\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_2963_343\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n fill: \"white\"\n })), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip1_2963_343\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 22,\n height: 16,\n rx: 2,\n fill: \"white\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFlagItaly);\nexport default __webpack_public_path__ + \"static/media/flag-italy.08abb108.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from 'react'\r\nimport { ReactComponent as DefaultLogo } from '../../assets/images/svg_icons/flag-italy.svg'\r\n\r\nfunction SvgComponent() {\r\n return \r\n}\r\n\r\nexport default SvgComponent\r\n","import { Typography, TypographyProps } from '@mui/material'\r\nimport React from 'react'\r\nimport styled, { css } from 'styled-components'\r\n\r\nexport interface AppTypographyProps extends TypographyProps {\r\n weight?: string | number\r\n paddingLeft?: number\r\n /** in rems */\r\n size?: number\r\n line?: number\r\n disabled?: boolean\r\n textCase?: 'uppercase' | 'lowercase' | 'inherit'\r\n component?: any //can't get proper type for Typography\r\n customColor?: string\r\n}\r\n\r\nexport const StyledTypographyWrapper = styled.div`\r\n > * {\r\n font-weight: ${_ => _.weight};\r\n text-transform: ${_ => _.textCase};\r\n padding-left: ${_ => _.theme.spacing(_.paddingLeft)};\r\n ${_ =>\r\n _.customColor &&\r\n css`\r\n color: ${_.customColor};\r\n `}\r\n ${_ =>\r\n _.disabled &&\r\n css`\r\n color: ${_.theme.palette.text.disabled};\r\n `}\r\n ${_ =>\r\n _.size &&\r\n css`\r\n font-size: ${_.size}rem;\r\n `}\r\n ${_ =>\r\n _.line &&\r\n css`\r\n line-height: ${_.line};\r\n `}\r\n }\r\n`\r\nexport const AppTypography: React.FC = ({\r\n weight,\r\n paddingLeft,\r\n textCase,\r\n size,\r\n line,\r\n disabled,\r\n customColor,\r\n ...props\r\n}) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\nAppTypography.defaultProps = {\r\n weight: 'normal',\r\n paddingLeft: 0,\r\n textCase: 'inherit',\r\n}\r\nexport default AppTypography\r\n","import { Typography } from '@mui/material'\r\nimport moment from 'moment'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport styled, { css } from 'styled-components'\r\nimport { formatCurrency, Translations } from 'utils'\r\nimport AppTypography from './AppTypography'\r\nimport { Divider as MUIDivider } from '@mui/material'\r\nimport { Currency } from 'typedef'\r\nimport { SharedIcon } from 'shared'\r\n\r\nexport const Divider = styled(MUIDivider)<{\r\n topGap?: boolean\r\n bottomGap?: boolean\r\n width?: string\r\n}>`\r\n width: ${_ => _.width};\r\n`\r\nDivider.defaultProps = {\r\n width: 'auto',\r\n}\r\nexport const Wrapper = styled.div<{ invalid?: boolean; minHeight?: number }>`\r\n background: ${_ =>\r\n !_.invalid ? _.theme.palette.grey[100] : _.theme.palette.secondary.light};\r\n padding: ${_ => _.theme.spacing(1)};\r\n min-height: ${_ => _.minHeight}px;\r\n border-radius: 8px;\r\n width: 100%;\r\n box-sizing: border-box;\r\n position: relative;\r\n`\r\nWrapper.defaultProps = {\r\n minHeight: 0,\r\n}\r\nexport const InnerRow = styled.div<{\r\n noBottomPadding?: boolean\r\n noTopPadding?: boolean\r\n}>`\r\n padding: ${_ => _.theme.spacing(1)} 0;\r\n ${_ =>\r\n _.noBottomPadding &&\r\n css`\r\n padding-bottom: 0;\r\n `}\r\n ${_ =>\r\n _.noTopPadding &&\r\n css`\r\n padding-top: 0;\r\n `}\r\n`\r\n\r\nconst StyledTimeRow = styled.div<{ invalid?: boolean }>`\r\n padding: ${_ => _.theme.spacing(1)} 0;\r\n border-width: 1px 0 0 0;\r\n text-align: left;\r\n color: ${_ => (!_.invalid ? 'inherit' : _.theme.palette.secondary.main)};\r\n`\r\n\r\nconst TimeCell = styled.div`\r\n p {\r\n display: inline-block;\r\n font-weight: bold;\r\n }\r\n p:first-of-type {\r\n font-size: 1.5rem;\r\n margin-right: ${_ => _.theme.spacing(1)};\r\n }\r\n`\r\n\r\nexport const TimeRow: React.FC<{ time?: string | Date; invalid?: boolean }> = ({\r\n time,\r\n invalid,\r\n}) => {\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n \r\n {invalid\r\n ? t(Translations.PARKING_EXPIRED_AT)\r\n : t(Translations.PARKING_EXPIRES_AT)}\r\n \r\n \r\n \r\n {time ? moment(time).startOf('minute').format('LT') : '-'}\r\n \r\n \r\n {time ? moment(time).startOf('minute').format('MMM DD') : ''}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport const TotalParkingTimeRow: React.FC<{\r\n durationText: string\r\n}> = props => {\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n \r\n {t(Translations.TOTAL_PARKING_TIME)}:\r\n \r\n \r\n {props.durationText}\r\n \r\n \r\n )\r\n}\r\n\r\nconst StyledTextRow = styled.div`\r\n display: flex;\r\n\r\n > *:nth-of-type(2) {\r\n margin-left: auto;\r\n }\r\n`\r\nexport const TextRow: React.FC<{\r\n leftText?: string\r\n rightText?: string\r\n}> = props => {\r\n return (\r\n <>\r\n \r\n {props.leftText && (\r\n \r\n {props.leftText}\r\n \r\n )}\r\n {props.rightText && (\r\n {props.rightText}\r\n )}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport const PriceRow: React.FC<{\r\n label?: string\r\n translation?: keyof typeof Translations\r\n amount?: number\r\n currency?: Currency\r\n negativeAmount?: boolean\r\n}> = ({ amount, currency, label, translation, negativeAmount }) => {\r\n const { t } = useTranslation()\r\n const [text, setText] = React.useState('')\r\n React.useEffect(() => {\r\n if (typeof translation === 'string') {\r\n setText(t(Translations[translation]))\r\n }\r\n if (typeof label === 'string') {\r\n setText(label)\r\n }\r\n if (typeof translation !== 'string' && typeof label !== 'string') {\r\n setText('-')\r\n }\r\n }, [label, translation, t])\r\n\r\n if (!amount) return null\r\n return (\r\n \r\n )\r\n}\r\nPriceRow.defaultProps = {\r\n currency: {\r\n cultureName: 'en_US',\r\n currencyFormat: null,\r\n currencySymbol: null,\r\n },\r\n amount: 0,\r\n}\r\n\r\nconst StyledIconsRow = styled.div`\r\n padding: ${_ => _.theme.spacing(1)} 0;\r\n display: flex;\r\n div:first-of-type {\r\n margin-right: ${_ => _.theme.spacing(1)};\r\n }\r\n`\r\nconst IconText = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`\r\nexport const IconsRow: React.FC<{\r\n plate?: string\r\n spot?: string\r\n}> = props => {\r\n return (\r\n \r\n {props.plate && (\r\n \r\n \r\n \r\n {props.plate.toUpperCase()}\r\n \r\n \r\n )}\r\n {props.spot && (\r\n \r\n \r\n {props.spot}\r\n \r\n )}\r\n \r\n )\r\n}\r\n","import { Popup } from '../../typedef/popup'\r\nimport { CLOSE_POPUP, SHOW_POPUP, SHOW_TERMS, CLOSE_TERMS } from './constants'\r\n\r\nexport const showPopup = (popup: Popup) => ({\r\n type: SHOW_POPUP as typeof SHOW_POPUP,\r\n popup,\r\n})\r\nexport const closePopup = () => ({\r\n type: CLOSE_POPUP as typeof CLOSE_POPUP,\r\n})\r\nexport const showTerms = () => ({\r\n type: SHOW_TERMS as typeof SHOW_TERMS,\r\n})\r\nexport const closeTerms = () => ({\r\n type: CLOSE_TERMS as typeof CLOSE_TERMS,\r\n})\r\n\r\nexport type Actions =\r\n | ReturnType\r\n | ReturnType\r\n | ReturnType\r\n | ReturnType\r\n","import React from 'react'\r\nimport styled, { css } from 'styled-components'\r\n\r\ninterface FlexBoxProps {\r\n hasBottomMargin?: boolean\r\n hasTopMargin?: boolean\r\n horizontal?: boolean\r\n horizontalGap?: number\r\n horizontalFullWith?: boolean\r\n marginSpacing?: number\r\n style?: any\r\n maxWidth?: number\r\n maxChildWidth?: number\r\n}\r\nconst StyledFlexBox = styled.div`\r\n text-align: center;\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin: ${_ => _.theme.spacing(_.marginSpacing)} auto;\r\n > * {\r\n margin-bottom: ${_ => _.theme.spacing(2)};\r\n }\r\n ${_ => _.maxWidth && `max-width: ${_.maxWidth}px;`}\r\n ${_ => !_.hasBottomMargin && 'margin-bottom: 0;'}\r\n ${_ => !_.hasTopMargin && 'margin-top: 0;'}\r\n ${({ horizontalGap, ..._ }) =>\r\n _.horizontal &&\r\n css`\r\n flex-direction: row;\r\n justify-content: center;\r\n > * {\r\n margin-bottom: 0;\r\n width: ${_.horizontalFullWith ? '100%' : 'auto'};\r\n &:not(:first-child) {\r\n padding-left: ${_ => _.theme.spacing(horizontalGap)};\r\n }\r\n &:not(:last-child) {\r\n padding-right: ${_ => _.theme.spacing(horizontalGap)};\r\n }\r\n ${_ => _.maxChildWidth && `max-width: ${_.maxChildWidth}px;`}\r\n }\r\n `}\r\n`\r\nStyledFlexBox.defaultProps = {\r\n horizontalGap: 1,\r\n}\r\nconst FlexBox: React.FC = props => {\r\n const renderChildren = () =>\r\n React.Children.map(props.children, child =>\r\n React.isValidElement(child) ? {child}
: null\r\n )\r\n if (!renderChildren().length) return null\r\n return {renderChildren()}\r\n}\r\nFlexBox.defaultProps = {\r\n marginSpacing: 4,\r\n}\r\n\r\nexport default FlexBox\r\n","import { ButtonProps } from '@mui/material'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { AppButton } from 'shared'\r\nimport FlexBox from 'shared/FlexBox'\r\nimport Translations from '../../utils/translations'\r\n\r\nexport interface PopupButtonsProps {\r\n variant?: 'info' | 'success' | 'warning' | 'error' | 'delete'\r\n handleAdditionalButtonClick: () => void\r\n handleCloseClick: () => void\r\n}\r\n\r\nconst PopupButtons: React.FC = ({\r\n variant = 'info',\r\n handleCloseClick,\r\n handleAdditionalButtonClick,\r\n}) => {\r\n const { t } = useTranslation()\r\n\r\n const buttonColor: {\r\n info: ButtonProps['color']\r\n error: ButtonProps['color']\r\n success: ButtonProps['color']\r\n warning: ButtonProps['color']\r\n delete: ButtonProps['color']\r\n } = {\r\n info: 'primary',\r\n error: 'secondary',\r\n success: 'primary',\r\n warning: 'primary',\r\n delete: 'secondary',\r\n }\r\n\r\n const buttonText = {\r\n info: t(Translations.OK),\r\n error: t(Translations.OK),\r\n success: t(Translations.OK),\r\n warning: t(Translations.CLOSE),\r\n delete: t(Translations.CANCEL),\r\n }\r\n const buttonAdditionalText = {\r\n info: t(Translations.TRY_AGAIN),\r\n error: t(Translations.TRY_AGAIN),\r\n success: t(Translations.TRY_AGAIN),\r\n warning: t(Translations.TRY_AGAIN),\r\n delete: t(Translations.DELETE),\r\n }\r\n\r\n const hasAdditionalButton = variant === 'warning' || variant === 'delete'\r\n\r\n return (\r\n \r\n {hasAdditionalButton && (\r\n \r\n {buttonAdditionalText[variant]}\r\n \r\n )}\r\n \r\n {buttonText[variant]}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default PopupButtons\r\n","import { DialogTitle } from '@mui/material'\r\nimport { DialogProps } from '@mui/material'\r\nimport React from 'react'\r\nimport { useDispatch } from 'react-redux'\r\nimport styled from 'styled-components'\r\nimport { closePopup } from '../../store/globalPopup/actions'\r\nimport { AppDialog, SharedIcon } from 'shared'\r\nimport PopupButtons from './PopupButtons'\r\nimport { Typography } from '@mui/material'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\nconst Text = styled(Typography)`\r\n padding-bottom: ${_ => _.theme.spacing(3)};\r\n`\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n title: {\r\n paddingBottom: theme.spacing(1.5),\r\n fontWeight: 'bold',\r\n },\r\n}))\r\n/**\r\n * @deprecated\r\n */\r\nexport interface IPopup {\r\n variant?: 'info' | 'success' | 'warning' | 'error' | 'delete'\r\n title?: string\r\n description?: string\r\n okButtonClick?: () => void\r\n handleAdditionalButtonClick?: () => any\r\n}\r\nexport type PopupProps = IPopup & DialogProps\r\n\r\nconst PopupIcon: React.FC<{ variant: PopupProps['variant'] }> = props => {\r\n const icon = {\r\n info: ,\r\n success: ,\r\n warning: ,\r\n error: ,\r\n delete: ,\r\n }\r\n\r\n return {icon[props.variant]}
\r\n}\r\n\r\nexport const Popup: React.FC = props => {\r\n const {\r\n variant,\r\n title,\r\n description,\r\n handleAdditionalButtonClick,\r\n okButtonClick,\r\n ...dialogProps\r\n } = props\r\n const dispatch = useDispatch()\r\n const classes = useStyles()\r\n\r\n const handleCloseClick = () => {\r\n dispatch(closePopup())\r\n if (okButtonClick) {\r\n okButtonClick()\r\n }\r\n }\r\n\r\n const handleAdditionalClick = () => {\r\n dispatch(closePopup())\r\n if (handleAdditionalButtonClick) {\r\n handleAdditionalButtonClick()\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {title}\r\n \r\n {description}\r\n \r\n \r\n )\r\n}\r\nPopup.defaultProps = {\r\n fullWidth: false,\r\n variant: 'warning',\r\n}\r\n","import { DialogTitle, Typography } from '@mui/material'\r\nimport { DialogProps } from '@mui/material'\r\nimport React from 'react'\r\nimport { AppDialog, SharedIcon } from 'shared'\r\nimport styled from 'styled-components'\r\nimport { makeStyles } from '@mui/styles'\r\nimport CloseIcon from '@mui/icons-material/Close'\r\n\r\n/**\r\n * NOTE: Popup with better customization for use inside components\r\n */\r\nconst Text = styled(Typography)`\r\n padding-bottom: ${_ => _.theme.spacing(3)};\r\n`\r\nconst CloseIconBox = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n`\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n title: {\r\n paddingBottom: theme.spacing(1.5),\r\n fontWeight: 'bold',\r\n },\r\n}))\r\n\r\ntype PopupProps = {\r\n variant: 'info' | 'success' | 'warning' | 'error' | 'delete'\r\n title?: string\r\n description?: string\r\n closePopup: () => void\r\n customIcon?: JSX.Element\r\n addCloseButton?: boolean\r\n darkBackground?: boolean\r\n} & DialogProps\r\n\r\nconst PopupIcon: React.FC<{ variant: PopupProps['variant'] }> = props => {\r\n const icon = {\r\n info: ,\r\n success: ,\r\n warning: ,\r\n error: ,\r\n delete: ,\r\n }\r\n\r\n return {icon[props.variant]}
\r\n}\r\n\r\nexport const AppPopup: React.FC = props => {\r\n const {\r\n variant,\r\n title,\r\n description,\r\n customIcon,\r\n addCloseButton,\r\n closePopup,\r\n darkBackground,\r\n ...dialogProps\r\n } = props\r\n\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n {addCloseButton && (\r\n \r\n closePopup()} />\r\n \r\n )}\r\n {customIcon ? {customIcon}
: }\r\n {title && (\r\n \r\n {title}\r\n \r\n )}\r\n {description && {description}}\r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nexport default AppPopup\r\n","import { Typography } from '@mui/material'\r\nimport * as React from 'react'\r\nimport styled from 'styled-components'\r\n\r\nconst PlaceholderWrapper = styled.div<{ minHeight?: number }>`\r\n display: flex;\r\n flex-flow: column;\r\n align-items: center;\r\n min-height: ${_ => _.minHeight}px;\r\n position: relative;\r\n max-width: 350px;\r\n margin: auto;\r\n text-align: center;\r\n`\r\n\r\nconst PlaceholderTitle = styled(Typography)`\r\n color: ${_ => _.theme.palette.grey['500']};\r\n line-height: 1.5;\r\n text-transform: uppercase;\r\n padding: ${_ => _.theme.spacing(1.5)} ${_ => _.theme.spacing(2)};\r\n text-align: center;\r\n`\r\nconst PlaceholderDescription = styled(Typography)`\r\n color: ${_ => _.theme.palette.grey['500']};\r\n padding: ${_ => _.theme.spacing(1.5)} ${_ => _.theme.spacing(2)};\r\n text-align: center;\r\n`\r\nconst PlaceholderIcon = styled.div`\r\n max-width: 180px;\r\n svg {\r\n max-width: 100%;\r\n height: auto;\r\n text-align: center;\r\n }\r\n`\r\n\r\nexport interface PlaceholderProps {\r\n title?: string\r\n description?: string\r\n icon?: JSX.Element\r\n minHeight?: number\r\n colorBlack?: boolean\r\n}\r\nexport const Placeholder: React.FC = ({\r\n icon: Icon,\r\n title,\r\n minHeight,\r\n description,\r\n ...props\r\n}) => {\r\n return (\r\n \r\n {!!Icon && {Icon}}\r\n {title && {title}}\r\n {description && (\r\n \r\n {description}\r\n \r\n )}\r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nPlaceholder.defaultProps = {\r\n minHeight: 40,\r\n}\r\n\r\nexport default Placeholder\r\n","import * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n AppSpinner,\r\n AppTypography,\r\n FlexBox,\r\n SharedIcon,\r\n} from 'shared'\r\nimport Translations from 'utils/translations'\r\n\r\ninterface ErrorPlaceholderProps {\r\n onClick?: () => void\r\n showSpinner?: boolean\r\n title?: string\r\n description?: string\r\n buttonTitle?: string\r\n}\r\nexport const ErrorPlaceholder: React.FC = ({\r\n onClick = () => undefined,\r\n showSpinner,\r\n title,\r\n description,\r\n buttonTitle,\r\n}) => {\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n \r\n
\r\n {showSpinner &&
}\r\n
\r\n \r\n {title ? title : t(Translations.OOPS)}\r\n \r\n \r\n {description ? description : t(Translations.FAILED_PROPERLY_RETRIEVE)}\r\n \r\n \r\n {buttonTitle ? buttonTitle : t(Translations.REFRESH)}\r\n \r\n \r\n )\r\n}\r\n\r\nErrorPlaceholder.defaultProps = {\r\n onClick: () => undefined,\r\n}\r\n\r\nexport default ErrorPlaceholder\r\n","import { Button, ButtonProps as MUIButtonProps } from '@mui/material'\r\nimport styled, { css } from 'styled-components'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { Translations } from 'utils'\r\n\r\nexport interface AppButtonProps extends MUIButtonProps {\r\n letterCase?: 'lowercase' | 'uppercase' | 'none'\r\n hasHoverBg?: boolean\r\n fontWeight?: number | string\r\n minWidth?: string\r\n topGutter?: number\r\n textAlign?: 'left' | 'center' | 'right' | 'inherit'\r\n /** text is to auto translate */\r\n translation?: keyof typeof Translations\r\n}\r\n\r\nconst ButtonWrapper = styled.div`\r\n padding-top: ${_ => _.topGutter}px;\r\n text-align: ${_ => _.textAlign};\r\n button {\r\n border-radius: 28px;\r\n font-weight: ${_ => _.fontWeight};\r\n min-width: ${_ => _.minWidth};\r\n text-transform: ${_ => _.letterCase};\r\n :hover {\r\n ${_ =>\r\n !_.hasHoverBg\r\n ? css`\r\n background-color: inherit;\r\n `\r\n : {}}\r\n }\r\n }\r\n`\r\n\r\nexport const AppButton: React.FC = ({\r\n letterCase,\r\n hasHoverBg,\r\n fontWeight,\r\n minWidth,\r\n topGutter,\r\n textAlign,\r\n ...props\r\n}) => {\r\n const { t } = useTranslation()\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\nAppButton.defaultProps = {\r\n letterCase: 'uppercase',\r\n hasHoverBg: true,\r\n fontWeight: 'bold',\r\n minWidth: '180px',\r\n topGutter: 0,\r\n textAlign: 'inherit',\r\n type: 'button',\r\n}\r\nexport default AppButton\r\n","import { styled, Typography } from '@mui/material'\r\nimport styledC, { css } from 'styled-components'\r\nimport * as React from 'react'\r\nimport { SharedIcon } from 'shared'\r\n\r\nconst SubTitle = styled(Typography)(_ => ({\r\n marginBottom: _.theme.spacing(3),\r\n}))\r\nconst Title = styled(Typography)(_ => ({\r\n textTransform: 'uppercase',\r\n marginBottom: _.theme.spacing(2),\r\n}))\r\nconst Logo = styled('div')(_ => ({\r\n marginBottom: _.theme.spacing(4),\r\n textAlign: 'center',\r\n}))\r\n\r\nconst StyledPageHeading = styledC.div<{\r\n normalizeIcon?: boolean\r\n}>`text-align: center;`\r\nconst IconWrapper = styledC.div<{ normalizeIcon?: boolean }>`\r\n margin-bottom: ${_ => _.theme.spacing(3)};\r\n ${_ =>\r\n _.normalizeIcon &&\r\n css`\r\n svg {\r\n max-width: 80px;\r\n height: auto;\r\n }\r\n `}\r\n`\r\n\r\ninterface PageHeadingProps {\r\n title?: string\r\n subtitle?: string\r\n color?: 'textPrimary' | 'textSecondary'\r\n hasLogo?: boolean\r\n normalizeIcon?: boolean\r\n externalLogoUrl?: string\r\n}\r\n\r\nconst PageHeading: React.FC = ({\r\n subtitle,\r\n title,\r\n hasLogo,\r\n color,\r\n normalizeIcon,\r\n children,\r\n externalLogoUrl,\r\n}) => {\r\n return (\r\n \r\n {hasLogo && (\r\n \r\n \r\n \r\n )}\r\n {!!externalLogoUrl && (\r\n \r\n
\r\n \r\n )}\r\n {children && (\r\n {children}\r\n )}\r\n {title && (\r\n \r\n {title}\r\n \r\n )}\r\n {subtitle && {subtitle}}\r\n \r\n )\r\n}\r\nPageHeading.defaultProps = {\r\n hasLogo: true,\r\n color: 'textPrimary',\r\n normalizeIcon: true,\r\n}\r\nexport default PageHeading\r\n","var _circle, _path, _circle2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgInputErrorIcon(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 110,\n height: 110,\n viewBox: \"0 0 110 110\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 55,\n cy: 55,\n r: 37.5,\n stroke: \"#FF3333\",\n strokeWidth: 5\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55 33V62\",\n stroke: \"#FF3333\",\n strokeWidth: 5,\n strokeLinecap: \"round\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 55,\n cy: 73,\n r: 4,\n fill: \"#FF3333\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgInputErrorIcon);\nexport default __webpack_public_path__ + \"static/media/input_error_icon.5b01af9d.svg\";\nexport { ForwardRef as ReactComponent };","import { IconButton } from '@mui/material'\r\nimport { createTheme, ThemeProvider } from '@mui/material/styles'\r\nimport React, { HTMLProps } from 'react'\r\nimport styled, { css } from 'styled-components'\r\nimport { ReactComponent as ErrorIconSvg } from '../assets/icons/input_error_icon.svg'\r\n\r\nconst InputContainer = styled.div`\r\n border: 1.25px solid;\r\n border-radius: 32.25px;\r\n display: flex;\r\n width: 100%;\r\n flex-direction: row;\r\n box-sizing: border-box;\r\n background: ${props => (props.disabled ? '#F5F5F5' : '#FFFFFF')};\r\n border-color: ${_ => (_.error ? '#FF3333' : 'rgba(0, 0, 0, 0.23)')};\r\n overflow: hidden;\r\n height: 36px;\r\n &:hover,\r\n &:focus-within {\r\n border-color: ${props => props.theme.palette.primary.main};\r\n }\r\n ${_ =>\r\n !_.noMargin &&\r\n css`\r\n margin-bottom: 15px;\r\n `}\r\n`\r\n\r\nconst BaseInput = styled.input`\r\n flex: 1;\r\n border: none;\r\n padding: ${props => (props.LeftIcon ? '5px 0px' : '10px 10px')};\r\n\r\n font-size: 16px;\r\n line-height: 20px;\r\n\r\n min-width: 0px;\r\n padding-right: 0px;\r\n\r\n &::placeholder {\r\n color: rgba(0, 0, 0, 0.23);\r\n }\r\n\r\n &:disabled {\r\n background: #f5f5f5;\r\n color: ${_ => _.theme.palette.grey['500']};\r\n }\r\n`\r\n\r\nconst ErrorIconStyled = styled(ErrorIconSvg)`\r\n align-self: center;\r\n margin-right: 10px;\r\n`\r\n\r\nexport interface InputProps extends HTMLProps {\r\n error?: boolean\r\n fullWidth?: boolean\r\n LeftIcon?: React.FunctionComponent>\r\n leftIconClick?: () => void\r\n RightIcon?: React.FunctionComponent>\r\n rightIconClick?: () => void\r\n noMargin?: boolean\r\n}\r\n\r\nconst theme = createTheme({\r\n components: {\r\n MuiIconButton: {\r\n styleOverrides: {\r\n root: {\r\n padding: '0px 18.75px',\r\n },\r\n },\r\n },\r\n },\r\n})\r\n\r\nexport const Input: React.FC = props => {\r\n const {\r\n as: _as,\r\n refProp,\r\n LeftIcon,\r\n RightIcon,\r\n leftIconClick,\r\n rightIconClick,\r\n style,\r\n noMargin,\r\n className,\r\n ...other\r\n } = props\r\n return (\r\n \r\n \r\n {LeftIcon && (\r\n \r\n \r\n \r\n )}\r\n \r\n {RightIcon && (\r\n \r\n \r\n \r\n )}\r\n {props.error && }\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Input\r\n","import { Step, StepLabel, Stepper, StepperProps } from '@mui/material'\r\nimport * as React from 'react'\r\nimport styled from 'styled-components'\r\n\r\nexport interface AppStepperProps {\r\n steps: (string | number)[]\r\n hasLabel?: boolean\r\n maxWidth?: string\r\n}\r\n\r\nconst S = {\r\n Stepper: styled(Stepper)``,\r\n StepLabel: styled(StepLabel)`\r\n font-weight: bold;\r\n [class*='Mui-completed'] {\r\n fill: #fff;\r\n }\r\n [class*='Mui-active'] {\r\n circle {\r\n fill: #fff;\r\n }\r\n [class*='MuiStepIcon-text'] {\r\n fill: ${_ => _.theme.palette.secondary.main};\r\n }\r\n }\r\n `,\r\n}\r\n\r\nconst AppStepperWrapper = styled.span<{ maxWidth?: string }>`\r\n ${S.Stepper} {\r\n padding: 0;\r\n max-width: ${_ => _.maxWidth};\r\n margin: auto;\r\n }\r\n`\r\n\r\nconst AppStepper: React.SFC> = ({\r\n maxWidth,\r\n hasLabel,\r\n steps,\r\n ...props\r\n}) => {\r\n return (\r\n \r\n \r\n {steps.map(label => (\r\n \r\n {hasLabel ? label : ''}\r\n \r\n ))}\r\n \r\n \r\n )\r\n}\r\n\r\nAppStepper.defaultProps = {\r\n hasLabel: false,\r\n alternativeLabel: true,\r\n maxWidth: '300px',\r\n}\r\n\r\nexport default AppStepper\r\n","import { makeStyles } from '@mui/styles'\r\nimport { Dialog, DialogProps } from '@mui/material'\r\nimport React from 'react'\r\n\r\nexport interface AppDialogProps extends DialogProps {\r\n darkBackground?: boolean\r\n}\r\nconst useStyles = makeStyles(theme => ({\r\n paper: (props: AppDialogProps) => ({\r\n padding: theme.spacing(3),\r\n borderRadius: '10px',\r\n textAlign: 'center',\r\n boxSizing: 'border-box',\r\n minWidth: 300,\r\n scrollbarWidth: 'thin',\r\n scrollbarColor: '#b3b3b3 white',\r\n '@media only screen and (max-device-width: 767px) and (prefers-color-scheme: dark) and (-webkit-min-device-pixel-ratio:0)':\r\n {\r\n backgroundColor: props.darkBackground ? '#585858' : 'white',\r\n color: props.darkBackground ? 'white' : 'black',\r\n },\r\n }),\r\n}))\r\n\r\nexport const AppDialog: React.FC = props => {\r\n const classes = useStyles(props)\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default AppDialog\r\n","import React from 'react'\r\nimport Slider, { Settings } from 'react-slick'\r\nimport 'slick-carousel/slick/slick-theme.css'\r\nimport 'slick-carousel/slick/slick.css'\r\n\r\nconst responsive: Settings['responsive'] = [\r\n {\r\n breakpoint: 600,\r\n settings: { centerMode: false },\r\n },\r\n]\r\n\r\nconst AppCarousel: React.FC = props => {\r\n return {props.children}\r\n}\r\nAppCarousel.defaultProps = {\r\n adaptiveHeight: true,\r\n slidesToScroll: 1,\r\n infinite: false,\r\n centerMode: true,\r\n draggable: true,\r\n swipeToSlide: true,\r\n responsive,\r\n variableWidth: true,\r\n arrows: false,\r\n touchMove: true,\r\n}\r\n\r\nexport default AppCarousel\r\n","export const TOP_BAR_HEIGHT = 50\r\nexport const BOTTOM_BAR_HEIGHT = 50\r\nexport const AD_HEIGHT = 250\r\nexport const SNACKBAR_HEIGHT = 60\r\nexport const OUTER_WIDTH = 1024\r\nexport const NARROW_INNER_WIDTH = 460\r\nexport const INNER_WIDTH = 768\r\nexport const TRANSITION_TIME = 250\r\n","import { IconButton, Typography, Toolbar } from '@mui/material'\r\nimport { Close, Add, ArrowBack } from '@mui/icons-material'\r\nimport bg from 'assets/images/bg.png'\r\nimport * as React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { INNER_WIDTH } from 'shared/layout/constants'\r\nimport { layoutSlice } from 'store/slices'\r\nimport styled, { css } from 'styled-components'\r\n\r\nexport interface TopbarProps {\r\n title?: string\r\n hasGoBack?: boolean\r\n onClickBack?: () => void\r\n onClickRight?: () => void\r\n rightIcon?: 'close' | 'add' | (() => JSX.Element)\r\n transparent?: boolean\r\n}\r\n\r\nconst StyledTopbar = styled.div<{\r\n transparent?: boolean\r\n backgroundImage?: string\r\n}>`\r\n position: fixed;\r\n box-shadow: 4px 8px 4px rgba(0, 0, 0, 0.1);\r\n ${_ =>\r\n _.transparent\r\n ? css`\r\n background: transparent;\r\n box-shadow: none;\r\n `\r\n : css`\r\n background-image: url(${_.backgroundImage});\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n `}\r\n\r\n top: 0;\r\n padding: 0 ${_ => _.theme.spacing(1)};\r\n width: 100%;\r\n box-sizing: border-box;\r\n z-index: 5;\r\n left: 0;\r\n`\r\nStyledTopbar.defaultProps = {\r\n backgroundImage: bg,\r\n}\r\nconst Wrapper = styled.div<{ transparent?: boolean }>`\r\n width: 100%;\r\n max-width: ${_ => INNER_WIDTH}px;\r\n margin: auto;\r\n`\r\nconst Title = styled(Typography)`\r\n color: white;\r\n display: block;\r\n margin: 0 auto;\r\n`\r\nconst RightContainer = styled.div`\r\n position: absolute;\r\n left: 100%;\r\n transform: translateX(-100%);\r\n`\r\nconst LeftButtonContainer = styled.div`\r\n position: absolute;\r\n left: auto;\r\n`\r\n\r\nexport const Topbar: React.FC = props => {\r\n const history = useHistory()\r\n const { headerBgUrl } = useSelector(layoutSlice.stateSelectors).customStyles\r\n const onClickBack = () => {\r\n if (props.onClickBack) {\r\n props.onClickBack()\r\n } else {\r\n history.goBack()\r\n }\r\n }\r\n return (\r\n \r\n \r\n \r\n {props.hasGoBack && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {props.title}\r\n \r\n {props.rightIcon && (\r\n \r\n {props.rightIcon === 'close' && }\r\n {props.rightIcon === 'add' && }\r\n {props.rightIcon &&\r\n typeof props.rightIcon !== 'string' &&\r\n props.rightIcon()}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nTopbar.defaultProps = {\r\n title: '',\r\n hasGoBack: true,\r\n onClickRight: () => undefined,\r\n}\r\n\r\nexport default Topbar\r\n","import { BottomNavigation, BottomNavigationAction } from '@mui/material'\r\nimport React from 'react'\r\nimport { NavLink, useHistory } from 'react-router-dom'\r\nimport paths from 'routing/paths'\r\nimport { SharedIcon } from 'shared'\r\nimport { BOTTOM_BAR_HEIGHT } from 'shared/layout/constants'\r\nimport styled from 'styled-components'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\nconst StyledNavLink = styled(NavLink)`\r\n &.selected {\r\n path,\r\n rect,\r\n circle {\r\n stroke: ${_ => _.theme.palette.primary.main};\r\n }\r\n circle {\r\n fill: #fff;\r\n }\r\n }\r\n`\r\nconst MenuIcon = styled.div`\r\n display: flex;\r\n align-items: center;\r\n svg {\r\n height: 30px;\r\n }\r\n`\r\nconst StyledBottomNavigation = styled(BottomNavigation)`\r\n button {\r\n padding: 6px !important;\r\n }\r\n button:first-of-type {\r\n /* for vertical align */\r\n padding-bottom: 9px !important;\r\n }\r\n`\r\nconst useStyles = makeStyles(theme => ({\r\n root: {\r\n position: 'fixed',\r\n bottom: 0,\r\n padding: 0,\r\n width: '100%',\r\n height: BOTTOM_BAR_HEIGHT,\r\n boxSizing: 'border-box',\r\n boxShadow: '0px -4px 4px rgba(0, 0, 0, 0.1)',\r\n zIndex: 3,\r\n left: '50%',\r\n transform: 'translateX(-50%)',\r\n },\r\n}))\r\n\r\nexport default function AppBottomNavigation() {\r\n const classes = useStyles()\r\n const history = useHistory()\r\n\r\n return (\r\n \r\n {\r\n e.preventDefault()\r\n history.push(paths.home.map)\r\n }}\r\n icon={\r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n {\r\n e.preventDefault()\r\n history.push(paths.parking.tickets)\r\n }}\r\n icon={\r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n {\r\n e.preventDefault()\r\n history.push(paths.parker.myProfile)\r\n }}\r\n icon={\r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n \r\n )\r\n}\r\n","import { Dialog, DialogProps } from '@mui/material'\r\nimport React from 'react'\r\nimport styled from 'styled-components'\r\n\r\nconst StyledDialog = styled(Dialog)`\r\n .MuiDialog-paper {\r\n overflow: hidden;\r\n }\r\n`\r\ninterface PageDialogProps {\r\n layout?: 'full'\r\n paddingBottom?: string\r\n center?: boolean\r\n overflowScroll?: boolean\r\n}\r\n// const Transition = React.forwardRef(function Transition(props, ref) {\r\n// return \r\n// })\r\nexport const PageDialog: React.FC = ({\r\n paddingBottom,\r\n layout,\r\n center,\r\n overflowScroll,\r\n ...props\r\n}) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\nPageDialog.defaultProps = {}\r\nexport default PageDialog\r\n","import tokensStorageService from 'utils/tokenStorageService'\r\n\r\nconst useTokenValidation = () => {\r\n const token = tokensStorageService.get()\r\n if (!token) {\r\n return false\r\n }\r\n if (token.expires < Date.now()) {\r\n return false\r\n }\r\n if (token.expires > Date.now()) {\r\n return token\r\n }\r\n return false\r\n}\r\n\r\nexport default useTokenValidation\r\n","import React from 'react'\r\nimport * as layoutSlice from 'store/slices/layoutSlice'\r\nimport { useAppDispatch } from 'store/store'\r\n\r\nexport const useChangeLayout = (\r\n layoutProps: layoutSlice.LayoutStateWithoutCustomStyles = { layout: {} },\r\n type: 'auth' | 'app' = 'auth',\r\n deps: React.DependencyList = []\r\n) => {\r\n const dispatch = useAppDispatch()\r\n const layouts = {\r\n auth: layoutSlice.authLayoutProps,\r\n app: layoutSlice.appLayoutProps,\r\n }\r\n const combinedLayout: layoutSlice.LayoutStateWithoutCustomStyles = {\r\n ...layouts[type],\r\n ...layoutProps,\r\n layout: {\r\n ...layouts[type].layout,\r\n ...layoutProps?.layout,\r\n },\r\n topbar:\r\n 'topbar' in layoutProps ? layoutProps?.topbar : layouts[type].topbar,\r\n }\r\n\r\n React.useEffect(() => {\r\n window.scrollTo(0, 0)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n React.useLayoutEffect(() => {\r\n dispatch(layoutSlice.actions.setFullLayout(combinedLayout))\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, deps)\r\n\r\n return combinedLayout\r\n}\r\n\r\nexport default useChangeLayout\r\n","import React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport * as layoutSlice from 'store/slices/layoutSlice'\r\nimport { useAppDispatch } from 'store/store'\r\n\r\nexport const useUpdateLayout = (\r\n props: layoutSlice.LayoutStateWithoutCustomStyles = {},\r\n deps: React.DependencyList = [],\r\n stopEffect?: boolean\r\n) => {\r\n const layout = useSelector(layoutSlice.stateSelectors)\r\n const dispatch = useAppDispatch()\r\n\r\n const combineLayout = React.useCallback(\r\n (args: layoutSlice.LayoutStateWithoutCustomStyles) => ({\r\n ...layout,\r\n ...args,\r\n layout: {\r\n ...layout.layout,\r\n ...args?.layout,\r\n },\r\n topbar: {\r\n ...layout.topbar,\r\n ...args?.topbar,\r\n },\r\n }),\r\n [layout]\r\n )\r\n\r\n const updateLayout = React.useCallback(\r\n (args: layoutSlice.LayoutStateWithoutCustomStyles) => {\r\n const combinedLayout = combineLayout(args)\r\n dispatch(layoutSlice.actions.setFullLayout(combinedLayout))\r\n },\r\n [combineLayout, dispatch]\r\n )\r\n\r\n React.useLayoutEffect(() => {\r\n if (!stopEffect) {\r\n updateLayout(props)\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, deps)\r\n\r\n return updateLayout\r\n}\r\n\r\nexport default useUpdateLayout\r\n","import { useState, useEffect, useRef } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { batch, useSelector } from 'react-redux'\r\nimport { mapSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport Translations from 'utils/translations'\r\n\r\nexport enum GeolocationPositionErrorValues {\r\n PERMISSION_DENIED = 1,\r\n POSITION_UNAVAILABLE = 2,\r\n TIMEOUT = 3,\r\n}\r\n\r\nexport const useGeolocation = () => {\r\n const { isGeoOn, selectedLot } = useSelector(mapSlice.stateSelectors)\r\n const [isOn, setIsOn] = useState(false)\r\n const dispatch = useAppDispatch()\r\n const [state, setState] = useState({\r\n accuracy: null,\r\n altitude: null,\r\n altitudeAccuracy: null,\r\n heading: null,\r\n latitude: null,\r\n longitude: null,\r\n speed: null,\r\n timestamp: Date.now(),\r\n error: '',\r\n })\r\n const { t } = useTranslation()\r\n let mounted = true\r\n const watchId = useRef(null)\r\n\r\n const turnOffGeo = () => {\r\n batch(() => {\r\n setIsOn(false)\r\n dispatch(mapSlice.actions.setGeo(false))\r\n dispatch(mapSlice.actions.setMyPosition(null))\r\n dispatch(mapSlice.actions.setGeoState('denined'))\r\n mounted = false\r\n navigator.geolocation.clearWatch(watchId.current)\r\n watchId.current = null\r\n })\r\n }\r\n\r\n const geoErrorMessageHandler = (errCode: number): string => {\r\n switch (errCode) {\r\n case GeolocationPositionErrorValues.PERMISSION_DENIED:\r\n return t(Translations.USER_DENIED_GEOLOCALIZATION)\r\n case GeolocationPositionErrorValues.POSITION_UNAVAILABLE:\r\n return t(Translations.POSITION_UNAVAILABLE)\r\n case GeolocationPositionErrorValues.TIMEOUT:\r\n return t(Translations.POSITION_GEOLOCALIZATION_TIMEOUT)\r\n default:\r\n return t(Translations.ERROR)\r\n }\r\n }\r\n\r\n const onError = (err: any) => {\r\n setState({\r\n accuracy: null,\r\n altitude: null,\r\n altitudeAccuracy: null,\r\n heading: null,\r\n latitude: null,\r\n longitude: null,\r\n speed: null,\r\n timestamp: Date.now(),\r\n error: geoErrorMessageHandler(err.code),\r\n })\r\n turnOffGeo()\r\n dispatch(mapSlice.actions.setGeoError(geoErrorMessageHandler(err.code)))\r\n }\r\n\r\n const onGetCurrentPositionError = (err: any) => {\r\n if (mounted) {\r\n onError(err)\r\n }\r\n }\r\n\r\n const handleEvent = (event: any) => {\r\n setState({\r\n accuracy: event.coords.accuracy,\r\n altitude: event.coords.altitude,\r\n altitudeAccuracy: event.coords.altitudeAccuracy,\r\n heading: event.coords.heading,\r\n latitude: event.coords.latitude,\r\n speed: event.coords.speed,\r\n timestamp: event.timestamp,\r\n longitude: event.coords.longitude,\r\n error: '',\r\n })\r\n if (!selectedLot)\r\n dispatch(\r\n mapSlice.actions.setMyPosition({\r\n heading: event.coords.heading,\r\n lat: event.coords.latitude,\r\n lng: event.coords.longitude,\r\n })\r\n )\r\n }\r\n\r\n const onGetCurrentPosition = (event: any) => {\r\n if (mounted) {\r\n setIsOn(true)\r\n dispatch(mapSlice.actions.setGeoState('granted'))\r\n dispatch(\r\n mapSlice.actions.setPosition({\r\n lat: event.coords.latitude,\r\n lng: event.coords.longitude,\r\n })\r\n )\r\n handleEvent(event)\r\n }\r\n }\r\n\r\n const onWatchPosition = (event: any) => {\r\n if (mounted) {\r\n handleEvent(event)\r\n }\r\n }\r\n\r\n const turnOnGeo = () => {\r\n setState({ ...state, error: '' })\r\n navigator.geolocation.getCurrentPosition(\r\n onGetCurrentPosition,\r\n onGetCurrentPositionError,\r\n { enableHighAccuracy: true }\r\n )\r\n watchId.current = navigator.geolocation.watchPosition(\r\n onWatchPosition,\r\n onError\r\n )\r\n }\r\n\r\n useEffect(() => {\r\n if (isGeoOn && !isOn) {\r\n turnOnGeo()\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isGeoOn, isOn])\r\n\r\n return { state, turnOnGeo, turnOffGeo }\r\n}\r\n\r\nexport default useGeolocation\r\n","/**navigator in second and last if has has type 'never'\r\n * code is from official docs\r\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent\r\n */\r\nconst constNavigator = navigator as any\r\nexport const useTouchScreen = () => {\r\n let hasTouchScreen = false\r\n\r\n if ('maxTouchPoints' in constNavigator) {\r\n hasTouchScreen = constNavigator.maxTouchPoints > 0\r\n } else if ('msMaxTouchPoints' in constNavigator) {\r\n hasTouchScreen = constNavigator.msMaxTouchPoints > 0\r\n } else {\r\n const mQ = window.matchMedia && matchMedia('(pointer:coarse)')\r\n if (mQ && mQ.media === '(pointer:coarse)') {\r\n hasTouchScreen = !!mQ.matches\r\n } else if ('orientation' in window) {\r\n hasTouchScreen = true // deprecated, but good fallback\r\n } else {\r\n // Only as a last resort, fall back to user agent sniffing\r\n const UA = constNavigator.userAgent\r\n hasTouchScreen =\r\n /\\b(BlackBerry|webOS|iPhone|IEMobile)\\b/i.test(UA) ||\r\n /\\b(Android|Windows Phone|iPad|iPod)\\b/i.test(UA)\r\n }\r\n }\r\n return hasTouchScreen\r\n}\r\n\r\nexport default useTouchScreen\r\n","import React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { parkCarSlice, creditCardsSlice } from 'store/slices'\r\n\r\nexport const useSelectedCardIndex = () => {\r\n const [initSlide, setInitSlide] = React.useState(0)\r\n const selectedCard = useSelector(parkCarSlice.selectCardId)\r\n const cards = useSelector(creditCardsSlice.selectAll)\r\n\r\n React.useLayoutEffect(() => {\r\n if (selectedCard && cards.length) {\r\n const selectedCardIndex = cards.findIndex(\r\n el => el.creditCardId === selectedCard?.creditCardId\r\n )\r\n if (selectedCardIndex !== -1) {\r\n setInitSlide(selectedCardIndex)\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n return initSlide\r\n}\r\n\r\nexport default useSelectedCardIndex\r\n","import { useTokenValidation } from 'hooks'\r\nimport React from 'react'\r\nimport { useHistory } from 'react-router-dom'\r\nimport paths from 'routing/paths'\r\nimport { customerSlice, layoutSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\n\r\nexport const useRefreshSession = (initLocation: string) => {\r\n const dispatch = useAppDispatch()\r\n const { push } = useHistory()\r\n const validToken = useTokenValidation()\r\n\r\n const validateUser = React.useCallback(async () => {\r\n const homeRegex = new RegExp(`/home/`)\r\n const authRegex = new RegExp(`/auth/`)\r\n const parkerRegex = new RegExp(`/parker/`)\r\n const parkingRegex = new RegExp(`/parking/`)\r\n if (\r\n initLocation === '/' ||\r\n initLocation.match(homeRegex) ||\r\n initLocation.match(authRegex) ||\r\n initLocation.match(parkerRegex) ||\r\n initLocation.match(parkingRegex)\r\n ) {\r\n if (!validToken) return\r\n if (validToken) {\r\n dispatch(layoutSlice.actions.setLoader())\r\n push(initLocation)\r\n\r\n const actionResult = await dispatch(\r\n customerSlice.refreshToken({ token: validToken.refresh })\r\n )\r\n dispatch(layoutSlice.actions.setLoader())\r\n\r\n if (customerSlice.refreshToken.fulfilled.match(actionResult)) {\r\n push(initLocation)\r\n } else {\r\n push(paths.root.root)\r\n }\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n React.useEffect(() => {\r\n validateUser()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n}\r\n\r\nexport default useRefreshSession\r\n","import React from 'react'\r\nimport { useHistory } from 'react-router-dom'\r\n\r\nexport const useDebugRouter = () => {\r\n const { location } = useHistory()\r\n React.useEffect(() => {\r\n if (process.env.NODE_ENV === 'development') {\r\n // eslint-disable-next-line no-console\r\n console.log(\r\n `Route: ${location.pathname}${location.search}, State: ${JSON.stringify(\r\n location.state\r\n )}`\r\n )\r\n }\r\n }, [location.pathname, location.search, location.state])\r\n}\r\n\r\nexport default useDebugRouter\r\n","import moment from 'moment'\r\nimport React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { ticketsSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\n\r\nexport const useUpdateTicket = () => {\r\n const dispatch = useAppDispatch()\r\n const ticketsRef = React.useRef([])\r\n const tickets = useSelector(ticketsSlice.selectSortedParkedTickets)\r\n\r\n React.useEffect(() => {\r\n ticketsRef.current = tickets\r\n }, [tickets])\r\n React.useEffect(() => {\r\n const timer = setInterval(() => {\r\n ticketsRef.current.forEach(el => {\r\n const isExpired =\r\n Date.now() - el.refCurrentTime >\r\n +moment(el.parkingExpireDateTime) - +moment(el.currentDateTime)\r\n if (isExpired) {\r\n dispatch(\r\n ticketsSlice.getTicket({\r\n carId: el.carId,\r\n })\r\n )\r\n }\r\n })\r\n }, 10000)\r\n\r\n return () => {\r\n clearInterval(timer)\r\n }\r\n }, [dispatch])\r\n}\r\n\r\nexport default useUpdateTicket\r\n","import React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { useLocation, useParams } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport { layoutSlice, mapSlice, ticketsSlice } from 'store/slices'\r\nimport { AppState, useAppDispatch } from 'store/store'\r\nimport { parseCustomStyles } from 'utils'\r\n\r\nexport interface useCustomColorsProps {}\r\n\r\nexport const useCustomLotColors = () => {\r\n const dispatch = useAppDispatch()\r\n const { customStyles } = useSelector(layoutSlice.stateSelectors)\r\n const { lotId, carId, ticketId } = useParams<{\r\n lotId?: string\r\n carId?: string\r\n ticketId?: string\r\n }>()\r\n const lotByLotId = useSelector((state: AppState) =>\r\n mapSlice.selectById(state, lotId)\r\n )\r\n\r\n const lotByCarId = useSelector((state: AppState) =>\r\n mapSlice.selectLotByTicketId(state, carId || ticketId)\r\n )\r\n\r\n const tickets = useSelector(ticketsSlice.selectSortedParkedTickets)\r\n\r\n const { pathname } = useLocation()\r\n\r\n React.useEffect(() => {\r\n if (lotByLotId) {\r\n dispatch(\r\n layoutSlice.actions.setCustomStyles(\r\n parseCustomStyles(lotByLotId.customStyles)\r\n )\r\n )\r\n return\r\n }\r\n if (lotByCarId) {\r\n dispatch(\r\n layoutSlice.actions.setCustomStyles(\r\n parseCustomStyles(lotByCarId.customStyles)\r\n )\r\n )\r\n return\r\n }\r\n if (tickets[0]?.customStyles.length && pathname === paths.parking.tickets) {\r\n dispatch(\r\n layoutSlice.actions.setCustomStyles(\r\n parseCustomStyles(tickets[0].customStyles)\r\n )\r\n )\r\n return\r\n }\r\n dispatch(layoutSlice.actions.setCustomStyles({}))\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [lotId, carId, ticketId, tickets[0]])\r\n\r\n return customStyles\r\n}\r\n\r\nexport default useCustomLotColors\r\n","import { useHistory } from 'react-router-dom'\r\nimport paths from 'routing/paths'\r\nimport { UserRole } from 'typedef'\r\n\r\nexport const usePushToApp = () => {\r\n const { push } = useHistory()\r\n\r\n const pushToApp = (role = UserRole.User) => {\r\n push(paths.home.map)\r\n return\r\n }\r\n\r\n return pushToApp\r\n}\r\n\r\nexport default usePushToApp\r\n","import bg from 'assets/images/bg.png'\r\nimport { useCustomLotColors } from 'hooks'\r\nimport styled, { css } from 'styled-components'\r\nimport {\r\n BOTTOM_BAR_HEIGHT,\r\n INNER_WIDTH,\r\n NARROW_INNER_WIDTH,\r\n SNACKBAR_HEIGHT,\r\n TOP_BAR_HEIGHT,\r\n} from './constants'\r\nimport React, { ComponentProps } from 'react'\r\nexport const OuterContainer = styled.div<{\r\n hasTopBar?: boolean\r\n hasBottomBar?: boolean\r\n hasFlatBackground?: boolean\r\n whiteBackground?: boolean\r\n imageBackground?: boolean\r\n hasAd?: boolean\r\n height: number\r\n}>`\r\n min-height: ${_ => _.height}px;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n display: flex;\r\n flex-direction: column;\r\n transition: background-color 0.2s;\r\n ${_ =>\r\n _.imageBackground &&\r\n css`\r\n background-image: url(${bg});\r\n `}\r\n ${_ =>\r\n _.hasFlatBackground &&\r\n css`\r\n background-color: #e5e5e5;\r\n `}\r\n`\r\n\r\nexport const InnerContainer = styled.div<{\r\n center?: boolean\r\n narrow?: boolean\r\n hasFlatBackground?: boolean\r\n innerScroll?: boolean\r\n}>`\r\n ::-webkit-scrollbar {\r\n display: none;\r\n }\r\n width: 100%;\r\n height: 100%;\r\n max-width: ${_ => (_.narrow ? NARROW_INNER_WIDTH : INNER_WIDTH)}px;\r\n margin: 0 auto;\r\n z-index: 1;\r\n box-sizing: border-box;\r\n position: relative;\r\n overflow: ${_ => (_.innerScroll ? 'scroll' : 'visible')};\r\n scrollbar-width: none;\r\n ${_ =>\r\n _.center &&\r\n css`\r\n margin: auto;\r\n `}\r\n`\r\n\r\ninterface PaddingContainerProps {\r\n /**\r\n * theme.spacing(number)\r\n */\r\n paddingTop?: number\r\n padding?: number\r\n hasTopBar?: boolean\r\n}\r\nexport const PaddingContainer = styled.div`\r\n padding: ${_ =>\r\n _.padding ? _.theme.spacing(_.padding) : _.theme.spacing(1)};\r\n ${_ =>\r\n _.paddingTop &&\r\n css`\r\n padding-top: ${_.theme.spacing(_.paddingTop)};\r\n `}\r\n ${_ =>\r\n _.hasTopBar &&\r\n css`\r\n /* padding-top: ${TOP_BAR_HEIGHT}px; */\r\n `}\r\n`\r\nexport const TopBarSpace = styled.div`\r\n width: 100%;\r\n height: ${TOP_BAR_HEIGHT}px;\r\n`\r\nexport const BottomBarSpace = styled.div<{\r\n hasBottomBar?: boolean\r\n hasAd?: boolean\r\n hasSnackbar?: boolean\r\n}>`\r\n width: 100%;\r\n ${_ => {\r\n const bar = _.hasBottomBar ? BOTTOM_BAR_HEIGHT : 0\r\n const snack = _.hasSnackbar ? SNACKBAR_HEIGHT : 0\r\n return css`\r\n height: ${bar + snack}px;\r\n `\r\n }}\r\n`\r\n\r\nexport const AppPaper = styled.div<{\r\n minHeight?: number\r\n minWidth?: number\r\n maxWidth?: number\r\n noShadow?: boolean\r\n gridPaddingDiff?: number\r\n backgroundUrl?: string\r\n}>`\r\n overflow: hidden;\r\n background-color: #fff;\r\n ${_ =>\r\n _.backgroundUrl &&\r\n css`\r\n background-image: url(${_.backgroundUrl});\r\n background-repeat: repeat;\r\n `};\r\n box-sizing: border-box;\r\n border-radius: 8px;\r\n box-shadow: ${_ => (_.noShadow ? 'none' : '0px 0px 5px rgba(0, 0, 0, 0.15)')};\r\n position: relative;\r\n margin-top: 0;\r\n padding: ${_ => _.theme.spacing(2.5 - _.gridPaddingDiff)};\r\n margin: ${_ => _.theme.spacing(1)};\r\n min-height: ${_ => _.minHeight}px;\r\n ${_ =>\r\n _.minWidth &&\r\n css`\r\n min-width: ${_.minWidth}px;\r\n `}\r\n ${_ =>\r\n _.maxWidth &&\r\n css`\r\n max-width: ${_.maxWidth}px;\r\n `}\r\n`\r\nAppPaper.defaultProps = {\r\n gridPaddingDiff: 0,\r\n minHeight: 150,\r\n}\r\n\r\nexport const WhiteBoxContainer = React.forwardRef(function BoxContainer(\r\n props: { backgroundUrl?: string } & ComponentProps,\r\n ref\r\n) {\r\n const { cardBgUrl } = useCustomLotColors()\r\n return (\r\n \r\n )\r\n})\r\n","import React from 'react'\r\nimport { layoutSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport * as S from './Layout.styles'\r\n\r\nexport interface FullLayoutProps {\r\n center?: boolean\r\n hasTopBar?: boolean\r\n hasBottomBar?: boolean\r\n hasFlatBackground?: boolean\r\n whiteBackground?: boolean\r\n imageBackground?: boolean\r\n hasSnackbar?: boolean\r\n narrow?: boolean\r\n innerScroll?: boolean\r\n ad?: boolean\r\n}\r\nexport const FullLayout: React.FC = ({\r\n center,\r\n hasTopBar,\r\n hasBottomBar,\r\n hasFlatBackground,\r\n whiteBackground,\r\n imageBackground,\r\n ad,\r\n narrow,\r\n hasSnackbar,\r\n innerScroll,\r\n children,\r\n ...props\r\n}) => {\r\n const [dimensions, setDimensions] = React.useState({\r\n height: window.innerHeight,\r\n width: window.innerWidth,\r\n })\r\n const height = React.useRef(window.innerHeight)\r\n const width = React.useRef(window.innerWidth)\r\n const innerRef = React.useRef(null)\r\n const dispatch = useAppDispatch()\r\n\r\n const handleResize = React.useCallback(() => {\r\n if (window.innerHeight !== height.current) {\r\n height.current = window.innerHeight\r\n dispatch(layoutSlice.actions.setHeight(window.innerHeight))\r\n setDimensions({\r\n height: window.innerHeight,\r\n width: window.innerWidth,\r\n })\r\n }\r\n if (window.innerWidth !== width.current) {\r\n width.current = window.innerWidth\r\n setDimensions({\r\n height: window.innerHeight,\r\n width: window.innerWidth,\r\n })\r\n dispatch(layoutSlice.actions.setInnerWidth(innerRef.current.clientWidth))\r\n }\r\n }, [dispatch])\r\n\r\n React.useLayoutEffect(() => {\r\n window.addEventListener('resize', handleResize, {})\r\n return () => {\r\n window.removeEventListener('resize', handleResize)\r\n }\r\n }, [handleResize])\r\n\r\n React.useEffect(() => {\r\n dispatch(layoutSlice.actions.setInnerWidth(innerRef.current.clientWidth))\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [narrow])\r\n\r\n return (\r\n \r\n \r\n {hasTopBar && }\r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\nFullLayout.defaultProps = {}\r\nexport default FullLayout\r\n","import { Fade } from '@mui/material'\r\nimport { CircularProgress, CircularProgressProps } from '@mui/material'\r\nimport React from 'react'\r\nimport styled, { css } from 'styled-components'\r\n\r\nconst Container = styled.div<{\r\n relative?: boolean\r\n height?: number | string\r\n transparent?: boolean\r\n darkBackground?: boolean\r\n fixed?: boolean\r\n}>`\r\n position: absolute;\r\n height: 100%;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n z-index: 4;\r\n background: ${_ =>\r\n _.transparent\r\n ? 'transparent'\r\n : _.darkBackground\r\n ? 'rgba(0, 0, 0, 0.5)'\r\n : 'rgba(255, 255, 255, 0.5)'};\r\n ${_ =>\r\n _.relative &&\r\n css`\r\n position: relative;\r\n margin: ${_.theme.spacing(1.5)} 0;\r\n height: ${_.height || '100%'};\r\n background: transparent;\r\n `}\r\n ${_ =>\r\n _.fixed &&\r\n css`\r\n height: 100%;\r\n position: fixed;\r\n touch-action: none;\r\n `}\r\n`\r\nconst PositionContainer = styled.div`\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-17px, -17px);\r\n`\r\n\r\nexport interface AppSpinnerProps {\r\n show?: boolean\r\n relative?: boolean\r\n height?: string\r\n transparent?: boolean\r\n darkBackground?: boolean\r\n positionContainerStyles?: React.CSSProperties\r\n fixed?: boolean\r\n}\r\n\r\nconst AppSpinner: React.FC = ({\r\n show,\r\n relative,\r\n fixed,\r\n height,\r\n positionContainerStyles,\r\n transparent,\r\n darkBackground,\r\n ...props\r\n}) => {\r\n const [showSpinner, setShowSpinner] = React.useState(false)\r\n const mountedRef = React.useRef(null)\r\n React.useEffect(() => {\r\n if (show) {\r\n mountedRef.current = true\r\n setShowSpinner(true)\r\n }\r\n if (!show) {\r\n mountedRef.current = false\r\n }\r\n if (!show && !mountedRef.current) {\r\n setShowSpinner(false)\r\n }\r\n }, [show])\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default AppSpinner\r\n","import { InputAdornment } from '@mui/material'\r\nimport { TextField, StandardTextFieldProps } from '@mui/material'\r\nimport React from 'react'\r\nimport styled from 'styled-components'\r\nimport { ReactComponent as ErrorIconSvg } from '../assets/icons/input_error_icon.svg'\r\n\r\nexport interface TextAreaProps extends StandardTextFieldProps {}\r\n\r\nconst ErrorIconStyled = styled(ErrorIconSvg)`\r\n align-self: center;\r\n margin-right: 10px;\r\n`\r\n\r\nexport const TextArea: React.FC = props => {\r\n const { ...other } = props\r\n return (\r\n \r\n \r\n \r\n ),\r\n disableUnderline: true,\r\n }}\r\n {...other}\r\n >\r\n )\r\n}\r\n\r\nexport default TextArea\r\n","import { TextField, TextFieldProps } from '@mui/material'\r\nimport { makeStyles } from '@mui/styles'\r\nimport React from 'react'\r\nimport styled from 'styled-components'\r\n\r\nconst StyledTextField = styled(TextField)`\r\n .MuiAutocomplete-inputRoot .MuiAutocomplete-input {\r\n padding-top: 2px !important;\r\n padding-bottom: 2px !important;\r\n }\r\n .MuiSelect-select {\r\n padding-top: 8px;\r\n padding-bottom: 8px;\r\n }\r\n .MuiOutlinedInput-inputMarginDense {\r\n padding-bottom: 8px;\r\n padding-top: 8px;\r\n }\r\n .MuiInputBase-root.Mui-error {\r\n border: none;\r\n }\r\n`\r\nexport interface AppTextFieldProps {}\r\n\r\nconst useStyles = makeStyles(_ => ({\r\n outlinedRoot: {\r\n borderRadius: 18,\r\n border: 0,\r\n // height: 34,\r\n '&:hover $notchedOutline': {\r\n borderColor: _.palette.primary.main,\r\n },\r\n '&$focused $notchedOutline': {\r\n borderColor: _.palette.primary.main,\r\n borderWidth: 1,\r\n },\r\n '&$disabled': {\r\n background: '#f5F5F5',\r\n },\r\n '&$disabled $notchedOutline': {\r\n borderColor: _.palette.divider,\r\n },\r\n },\r\n notchedOutline: {},\r\n focused: {},\r\n disabled: {},\r\n input: {},\r\n}))\r\n\r\nexport const AppTextField: React.FC = ({\r\n InputProps,\r\n ...props\r\n}) => {\r\n const classes = useStyles(props)\r\n const CustomInputProps = {\r\n classes: {\r\n root: classes.outlinedRoot,\r\n notchedOutline: classes.notchedOutline,\r\n focused: classes.focused,\r\n input: classes.input,\r\n disabled: classes.disabled,\r\n },\r\n }\r\n return (\r\n \r\n )\r\n}\r\nAppTextField.defaultProps = {\r\n variant: 'outlined',\r\n size: 'small',\r\n}\r\nexport default AppTextField\r\n","import React from 'react'\r\nimport clsx from 'clsx'\r\nimport { Checkbox, CheckboxProps } from '@mui/material'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\nconst useStyles = makeStyles(_ => ({\r\n root: {\r\n '&:hover': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n icon: {\r\n borderRadius: '50%',\r\n width: 16,\r\n height: 16,\r\n boxShadow:\r\n 'inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)',\r\n backgroundColor: '#f5f8fa',\r\n backgroundImage:\r\n 'linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))',\r\n '$root.Mui-focusVisible &': {\r\n outline: '2px auto rgba(19,124,189,.6)',\r\n outlineOffset: 2,\r\n },\r\n 'input:hover ~ &': {\r\n backgroundColor: '#ebf1f5',\r\n },\r\n 'input:disabled ~ &': {\r\n boxShadow: 'none',\r\n background: 'rgba(206,217,224,.5)',\r\n },\r\n },\r\n checkedIcon: {\r\n backgroundColor: _.palette.primary.main,\r\n backgroundImage:\r\n 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',\r\n '&:before': {\r\n display: 'block',\r\n width: 16,\r\n height: 16,\r\n backgroundImage:\r\n \"url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath\" +\r\n \" fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 \" +\r\n \"1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\\\")\",\r\n content: '\"\"',\r\n },\r\n 'input:hover ~ &': {\r\n backgroundColor: '#106ba3',\r\n },\r\n },\r\n}))\r\n\r\n// Inspired by blueprintjs\r\nexport function AppCheckbox(props: CheckboxProps) {\r\n const classes = useStyles()\r\n\r\n return (\r\n }\r\n icon={}\r\n inputProps={{ 'aria-label': 'decorative checkbox' }}\r\n {...props}\r\n />\r\n )\r\n}\r\n","import {\r\n Avatar,\r\n List,\r\n ListItem,\r\n ListItemAvatar,\r\n ListItemText,\r\n} from '@mui/material'\r\nimport React from 'react'\r\nimport { AppTypography, SharedIcon } from 'shared'\r\nimport styled from 'styled-components'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\nexport interface AppHeaderProps {\r\n topText: string\r\n bottomText: string\r\n iconSrc: string\r\n hasRightElement?: boolean\r\n}\r\n\r\nconst StyledList = styled(List)`\r\n padding: 0;\r\n li {\r\n padding: 0;\r\n }\r\n`\r\nconst useStyles = makeStyles(theme => ({\r\n root: {\r\n width: 60,\r\n overflow: 'initial',\r\n backgroundColor: 'inherit',\r\n marginRight: 16,\r\n },\r\n}))\r\nexport const AppHeader: React.FC = ({\r\n bottomText,\r\n iconSrc,\r\n topText,\r\n}) => {\r\n const classes = useStyles()\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {topText}}\r\n secondary={\r\n \r\n {bottomText}\r\n \r\n }\r\n />\r\n \r\n \r\n )\r\n}\r\nAppHeader.defaultProps = {}\r\nexport default AppHeader\r\n","import { SnackbarProvider, SnackbarProviderProps } from 'notistack'\r\nimport React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { SharedIcon } from 'shared'\r\nimport { layoutSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport styled, { css } from 'styled-components'\r\nimport { BOTTOM_BAR_HEIGHT } from './layout/constants'\r\n\r\nconst StyledSnackbarProvider = styled(SnackbarProvider)<{\r\n $hasBottomGutter?: boolean\r\n $gutterSize?: number\r\n}>`\r\n svg {\r\n min-width: 1em;\r\n min-height: 1em;\r\n font-size: 2em;\r\n padding-right: 5px;\r\n }\r\n ${_ =>\r\n _.$hasBottomGutter &&\r\n css`\r\n margin-bottom: ${_.$gutterSize}px;\r\n `}\r\n`\r\nStyledSnackbarProvider.defaultProps = {\r\n $gutterSize: BOTTOM_BAR_HEIGHT,\r\n}\r\nexport interface AppSnackBarProviderProps extends SnackbarProviderProps {\r\n hasBottomGutter?: boolean\r\n gutterSize?: number\r\n}\r\n\r\nexport const AppSnackBarProvider: React.FC = ({\r\n hasBottomGutter,\r\n gutterSize,\r\n ...props\r\n}) => {\r\n const notistackRef = React.createRef()\r\n const dispatch = useAppDispatch()\r\n const { autoToogleSnackGap, bottomMenu } = useSelector(\r\n layoutSlice.stateSelectors\r\n )\r\n return (\r\n ,\r\n }}\r\n maxSnack={4}\r\n dense\r\n preventDuplicate\r\n ref={notistackRef}\r\n autoHideDuration={2500}\r\n TransitionProps={{\r\n onEntered: () => {\r\n autoToogleSnackGap &&\r\n dispatch(layoutSlice.actions.setSnackbarGutter(true))\r\n },\r\n onExiting: () => {\r\n autoToogleSnackGap &&\r\n dispatch(layoutSlice.actions.setSnackbarGutter(false))\r\n },\r\n }}\r\n anchorOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'center',\r\n }}\r\n {...props}\r\n >\r\n {props.children}\r\n \r\n )\r\n}\r\nAppSnackBarProvider.defaultProps = {\r\n hasBottomGutter: false,\r\n}\r\nexport default AppSnackBarProvider\r\n","import { ButtonProps, DialogTitle, Typography } from '@mui/material'\r\nimport { DialogProps } from '@mui/material'\r\nimport { nanoid } from '@reduxjs/toolkit'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { AppDialog } from 'shared'\r\nimport AppButton, { AppButtonProps } from 'shared/AppButton'\r\nimport FlexBox from 'shared/FlexBox'\r\nimport styled from 'styled-components'\r\nimport { Translations } from 'utils'\r\nimport { SharedIcon } from 'shared'\r\nimport { NARROW_INNER_WIDTH } from 'shared/layout/constants'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\n/**\r\n * NOTE: Popup with better customization for use inside components\r\n */\r\nconst Space = styled.div<{ gap?: number }>`\r\n width: 100%;\r\n padding-bottom: ${_ => _.theme.spacing(_.gap)};\r\n`\r\nSpace.defaultProps = {\r\n gap: 1,\r\n}\r\nconst Text = styled(Typography)`\r\n max-width: ${NARROW_INNER_WIDTH}px;\r\n`\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n title: {\r\n fontWeight: 'bold',\r\n maxWidth: NARROW_INNER_WIDTH,\r\n margin: 'auto',\r\n },\r\n}))\r\n\r\nexport type PopupButton = {\r\n text?: string\r\n preventClose?: boolean\r\n} & AppButtonProps\r\nexport type PopupProps = {\r\n variant?: 'info' | 'success' | 'warning' | 'error' | 'delete'\r\n title?: string\r\n description?: string\r\n closePopup?: () => void\r\n customIcon?: JSX.Element\r\n buttons?: PopupButton[]\r\n noButtons?: boolean\r\n noIcon?: boolean\r\n children?: React.ReactNode\r\n disableBackdropClick?: boolean\r\n} & DialogProps\r\n\r\nconst PopupIcon: React.FC<{ variant: PopupProps['variant'] }> = props => {\r\n const icon = {\r\n info: ,\r\n success: ,\r\n warning: ,\r\n error: ,\r\n delete: ,\r\n }\r\n\r\n return {icon[props.variant]}
\r\n}\r\n\r\nexport const AppPopup: React.FC = props => {\r\n const {\r\n variant,\r\n title,\r\n description,\r\n customIcon,\r\n closePopup,\r\n buttons,\r\n noButtons,\r\n noIcon,\r\n disableBackdropClick,\r\n ...dialogProps\r\n } = props\r\n\r\n const classes = useStyles()\r\n const { t } = useTranslation()\r\n const buttonColor: {\r\n info: ButtonProps['color']\r\n error: ButtonProps['color']\r\n success: ButtonProps['color']\r\n warning: ButtonProps['color']\r\n delete: ButtonProps['color']\r\n } = {\r\n info: 'primary',\r\n error: 'secondary',\r\n success: 'primary',\r\n warning: 'primary',\r\n delete: 'secondary',\r\n }\r\n const buttonText = {\r\n info: t(Translations.OK),\r\n error: t(Translations.OK),\r\n success: t(Translations.OK),\r\n warning: t(Translations.CLOSE),\r\n delete: t(Translations.CANCEL),\r\n }\r\n const buttonSecondText = {\r\n info: t(Translations.TRY_AGAIN),\r\n error: t(Translations.TRY_AGAIN),\r\n success: t(Translations.TRY_AGAIN),\r\n warning: t(Translations.TRY_AGAIN),\r\n delete: t(Translations.DELETE),\r\n }\r\n\r\n const renderButtons = () => {\r\n if (!buttons) return null\r\n\r\n const validButtons = buttons.filter(el => el)\r\n\r\n // empty array, defult button (OK)\r\n if (!validButtons.length) {\r\n return (\r\n \r\n {buttonText[variant]}\r\n \r\n )\r\n }\r\n\r\n // custom button\r\n if (validButtons.length === 1) {\r\n return validButtons.map(({ preventClose, ...prop }, i) => (\r\n {\r\n !preventClose && closePopup()\r\n prop.onClick && prop.onClick(e)\r\n }}\r\n >\r\n {prop.text || buttonText[variant]}\r\n \r\n ))\r\n }\r\n\r\n // up to 2 default buttons\r\n if (validButtons.length > 1) {\r\n return validButtons.map(({ preventClose, ...prop }, i) => (\r\n {\r\n !preventClose && closePopup()\r\n prop.onClick && prop.onClick(e)\r\n }}\r\n >\r\n {prop.text || (!i ? buttonSecondText[variant] : buttonText[variant])}\r\n \r\n ))\r\n }\r\n }\r\n\r\n return (\r\n {\r\n if (\r\n (disableBackdropClick && reason !== 'backdropClick') ||\r\n !disableBackdropClick\r\n ) {\r\n closePopup()\r\n }\r\n }}\r\n fullWidth={false}\r\n {...dialogProps}\r\n >\r\n {!noIcon &&\r\n (customIcon ? (\r\n {customIcon}
\r\n ) : (\r\n \r\n ))}\r\n {title && (\r\n \r\n {title}\r\n \r\n )}\r\n {description && (\r\n <>\r\n {description}\r\n \r\n >\r\n )}\r\n {props.children}\r\n {!noButtons && {renderButtons()}}\r\n \r\n )\r\n}\r\nAppPopup.defaultProps = {\r\n buttons: [],\r\n variant: 'info',\r\n // onClick: () => undefined,\r\n disableBackdropClick: false,\r\n}\r\n\r\nexport default AppPopup\r\n","import React from 'react'\r\nimport { AppPopup, PopupProps } from './AppPopup'\r\n\r\nexport type SetPopupProps = Omit\r\n\r\nconst initial = {\r\n showPopup(arg: boolean) {\r\n undefined\r\n },\r\n setPopup(args: SetPopupProps) {\r\n undefined\r\n },\r\n mounted: false,\r\n}\r\nexport const PopupContext = React.createContext(initial)\r\n\r\nexport const usePopup = () => {\r\n return React.useContext(PopupContext)\r\n}\r\n\r\nexport const PopupProvider: React.FC = ({ children }) => {\r\n const [show, setShow] = React.useState(false)\r\n const [popupProps, setPopupProps] = React.useState({})\r\n const mountedRef = React.useRef(false)\r\n const showPopup = (arg: boolean) => {\r\n if (mountedRef.current) {\r\n setShow(arg)\r\n }\r\n }\r\n const setPopup = (args: SetPopupProps) => {\r\n if (mountedRef.current) {\r\n setPopupProps(args)\r\n }\r\n }\r\n\r\n mountedRef.current = true\r\n React.useEffect(\r\n () => () => {\r\n mountedRef.current = false\r\n },\r\n []\r\n )\r\n\r\n return (\r\n \r\n {children}\r\n setShow(false)}\r\n // TransitionProps={{\r\n // onExited: () => setPopupProps({}),\r\n // }}\r\n {...popupProps}\r\n open={show}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default PopupProvider\r\n","import moment from 'moment'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { DetailsBox } from 'shared'\r\nimport styled, { css, keyframes } from 'styled-components'\r\nimport Translations from 'utils/translations'\r\nimport AppTypography from './AppTypography'\r\n\r\nconst rotate = keyframes`\r\n\tfrom { transform: rotate(0deg); }\r\n\tto { transform: rotate(360deg); }\r\n`\r\nconst SpinnerWrapper = styled.div`\r\n width: 170px;\r\n height: 170px;\r\n position: relative;\r\n margin: auto;\r\n`\r\n\r\nconst Spinner = styled.div<{ isRunning?: boolean }>`\r\n ${_ =>\r\n _.isRunning &&\r\n css`\r\n animation: ${rotate} 1s linear infinite;\r\n `}\r\n background: ${_ =>\r\n _.isRunning ? _.theme.palette.primary.main : _.theme.palette.divider};\r\n border-radius: 50%;\r\n height: 170px;\r\n width: 170px;\r\n position: relative;\r\n &:before {\r\n content: '';\r\n position: absolute;\r\n border-radius: 50%;\r\n ${_ =>\r\n _.isRunning &&\r\n css`\r\n background: linear-gradient(0deg, #dbdbdb 50%, #dbdbdbe6 100%) 0% 0%,\r\n linear-gradient(90deg, #dbdbdbe6 0%, hsla(0, 0%, 100%, 0.6) 100%) 100%\r\n 0%,\r\n linear-gradient(\r\n 180deg,\r\n hsla(0, 0%, 100%, 0.6) 0%,\r\n hsla(0, 0%, 100%, 0.3) 100%\r\n )\r\n 100% 100%,\r\n linear-gradient(\r\n 360deg,\r\n hsla(0, 0%, 100%, 0.3) 0%,\r\n hsla(0, 0%, 100%, 0) 100%\r\n )\r\n 0% 100%;\r\n `}\r\n background-repeat: no-repeat;\r\n background-size: 50% 50%;\r\n top: -1px;\r\n bottom: -1px;\r\n left: -1px;\r\n right: -1px;\r\n }\r\n &:after {\r\n content: '';\r\n position: absolute;\r\n background: #f5f5f5;\r\n border-radius: 50%;\r\n top: 3%;\r\n bottom: 3%;\r\n left: 3%;\r\n right: 3%;\r\n }\r\n`\r\nconst SpinnerContent = styled.div`\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n text-align: center;\r\n`\r\n\r\nexport interface TimeSpinnerProps {\r\n isRunning?: boolean\r\n parkingBeginDateTime?: string\r\n parkingExpireDateTime?: string\r\n /**in minutes;\r\n * additional times for payment and leave lot;\r\n * will be substracted from expireDateTime*/\r\n graceMinutes?: number\r\n currentDateTime?: string\r\n refCurrentTime?: number\r\n carId: string\r\n}\r\n\r\nexport const TimeSpinner: React.FC = ({\r\n isRunning,\r\n currentDateTime,\r\n parkingBeginDateTime,\r\n refCurrentTime,\r\n graceMinutes,\r\n parkingExpireDateTime,\r\n ...props\r\n}) => {\r\n const { t } = useTranslation()\r\n const [elapsedTime, setElapsedTime] = React.useState('')\r\n\r\n const getElapsedTimeString = () => {\r\n const runningDuration = moment.duration(\r\n moment(currentDateTime).diff(parkingBeginDateTime) +\r\n Date.now() -\r\n refCurrentTime,\r\n 'milliseconds'\r\n )\r\n const pausedDuration = moment.duration(\r\n moment(parkingExpireDateTime).diff(parkingBeginDateTime) -\r\n graceMinutes * 60000,\r\n 'milliseconds'\r\n )\r\n\r\n return (isRunning ? runningDuration : pausedDuration).format('HH:mm:ss', {\r\n trim: false,\r\n })\r\n }\r\n\r\n React.useEffect(() => {\r\n setElapsedTime(getElapsedTimeString())\r\n let timer: any\r\n if (isRunning) {\r\n timer = setInterval(() => {\r\n setElapsedTime(getElapsedTimeString())\r\n }, 1000)\r\n }\r\n return () => clearInterval(timer)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isRunning])\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {t(Translations.PARKING_TIMER)}:\r\n \r\n \r\n {elapsedTime}\r\n \r\n \r\n \r\n {moment(parkingBeginDateTime).format('MMM DD')}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default TimeSpinner\r\n","import { Alert, AlertProps } from '@mui/material'\r\nimport React from 'react'\r\nimport styled from 'styled-components'\r\nimport AppTypography, { AppTypographyProps } from './AppTypography'\r\nimport { makeStyles } from '@mui/styles'\r\n\r\ninterface AlertWrapperProps {\r\n /** MUI spacing */\r\n gutterTop?: number\r\n}\r\nconst AlertWrapper = styled.div`\r\n padding-top: ${_ => _.theme.spacing(_.gutterTop)};\r\n`\r\nAlertWrapper.defaultProps = {\r\n gutterTop: 2,\r\n}\r\nexport interface AppAlertProps extends AlertProps, AlertWrapperProps {\r\n typographyProps?: AppTypographyProps\r\n}\r\n\r\nconst useStyles = makeStyles(_ => ({\r\n message: { width: '100%' },\r\n}))\r\n\r\nexport const AppAlert: React.FC = ({\r\n typographyProps,\r\n gutterTop,\r\n ...props\r\n}) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n \r\n {props.children}\r\n \r\n \r\n )\r\n}\r\nAppAlert.defaultProps = {\r\n severity: 'info',\r\n icon: false,\r\n typographyProps: {\r\n color: 'primary',\r\n weight: 'bold',\r\n align: 'center',\r\n },\r\n}\r\nexport default AppAlert\r\n","import { InputBase, InputBaseProps } from '@mui/material'\r\nimport { makeStyles } from '@mui/styles'\r\nimport React from 'react'\r\nimport styled from 'styled-components'\r\n\r\nconst StyledAppInput = styled(InputBase)`\r\n /* .MuiAutocomplete-inputRoot .MuiAutocomplete-input {\r\n padding-top: 2px !important;\r\n padding-bottom: 2px !important;\r\n } */\r\n /* .MuiSelect-root {\r\n background: #f5f5f5;\r\n border-color: #d2d2d2;\r\n } */\r\n /* .MuiSelect-root {\r\n padding-top: 8px;\r\n padding-bottom: 8px;\r\n }\r\n .MuiOutlinedInput-inputMarginDense {\r\n padding-bottom: 8px; \r\n padding-top: 8px; */\r\n /* } */\r\n`\r\nexport interface AppInputProps {}\r\n\r\nconst useStyles = makeStyles(_ => ({\r\n outlinedRoot: {\r\n borderRadius: 18,\r\n // border: 0,\r\n // height: 34,\r\n '&:hover $notchedOutline': {\r\n borderColor: _.palette.primary.main,\r\n },\r\n '&$focused $notchedOutline': {\r\n borderColor: _.palette.primary.main,\r\n borderWidth: 1,\r\n },\r\n // '&$disabled': {\r\n // background: '#f5F5F5',\r\n // },\r\n // '&$disabled $notchedOutline': {\r\n // borderColor: _.palette.divider,\r\n // },\r\n },\r\n notchedOutline: {},\r\n focused: {},\r\n disabled: {},\r\n input: {},\r\n}))\r\n\r\nexport const AppInput: React.FC = ({ ...props }) => {\r\n const classes = useStyles(props)\r\n const CustomInputProps = {\r\n classes: {\r\n root: classes.outlinedRoot,\r\n notchedOutline: classes.notchedOutline,\r\n focused: classes.focused,\r\n input: classes.input,\r\n disabled: classes.disabled,\r\n },\r\n }\r\n return \r\n}\r\n// AppInput.defaultProps = {\r\n// variant: 'outlined',\r\n// size: 'small',\r\n// }\r\nexport default AppInput\r\n","import { Fade } from '@mui/material'\r\nimport React from 'react'\r\nimport { useSelector } from 'react-redux'\r\nimport { adsSlice, layoutSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport styled from 'styled-components'\r\nimport { BOTTOM_BAR_HEIGHT, INNER_WIDTH } from './layout/constants'\r\n\r\nconst AdSpace = styled.div<{ height: string }>`\r\n height: ${_ => _.height};\r\n`\r\nconst AdWrapper = styled.div<{ height: string }>`\r\n position: fixed;\r\n bottom: ${BOTTOM_BAR_HEIGHT}px;\r\n height: ${_ => _.height};\r\n left: 50%;\r\n width: 100%;\r\n max-width: ${INNER_WIDTH}px;\r\n z-index: 1;\r\n transform: translateX(-50%);\r\n img {\r\n height: ${_ => _.height};\r\n }\r\n`\r\n\r\nexport interface AdProps {}\r\n\r\nexport const Ad: React.FC = props => {\r\n const adsToAppend = useSelector(adsSlice.selectAdsToAppend)\r\n const [initAd, setInitAd] = React.useState('')\r\n const { scriptString } = useSelector(adsSlice.stateSelectors)\r\n const { innerWidth, height } = useSelector(layoutSlice.stateSelectors)\r\n const [adHeight, setAdHeight] = React.useState('0')\r\n const [runScript, setRunScript] = React.useState(false)\r\n const dispatch = useAppDispatch()\r\n\r\n React.useEffect(() => {\r\n if (typeof innerWidth === 'number' && typeof height === 'number') {\r\n const adHeight = Math.round((innerWidth * 6) / 14)\r\n const maxHeight = Math.round(Math.min(height / 3, 200))\r\n if (adHeight > maxHeight) {\r\n setAdHeight(`${maxHeight}px`)\r\n } else {\r\n setAdHeight(`${adHeight}px`)\r\n }\r\n }\r\n }, [height, innerWidth])\r\n\r\n React.useEffect(() => {\r\n if (initAd && scriptString && !runScript) {\r\n try {\r\n Function(scriptString)()\r\n setRunScript(true)\r\n } catch (err) {\r\n console.warn('Ads script load failed', err)\r\n dispatch(adsSlice.actions.removeScriptString())\r\n }\r\n }\r\n }, [scriptString, runScript, initAd, dispatch])\r\n\r\n React.useEffect(() => {\r\n if (!initAd && adsToAppend.length) {\r\n setInitAd(adsToAppend[0].fullHtmlString)\r\n dispatch(\r\n adsSlice.actions.removeAdsToAppend([adsToAppend[0].advertisementUrl])\r\n )\r\n }\r\n }, [adsToAppend, dispatch, initAd])\r\n\r\n React.useEffect(() => {\r\n if (initAd && adsToAppend.length && runScript) {\r\n adsToAppend.forEach(el => {\r\n const fragment = document\r\n .createRange()\r\n .createContextualFragment(el.fullHtmlString)\r\n fragment\r\n .querySelectorAll('.slide')\r\n ?.forEach(node =>\r\n document\r\n .getElementById('tez-slideshow-container')\r\n ?.appendChild(node)\r\n )\r\n })\r\n dispatch(\r\n adsSlice.actions.removeAdsToAppend(\r\n adsToAppend.map(({ advertisementUrl }) => advertisementUrl)\r\n )\r\n )\r\n }\r\n }, [adsToAppend, dispatch, initAd, runScript])\r\n\r\n React.useEffect(\r\n () => () => {\r\n dispatch(adsSlice.actions.addAllAdsToAppend())\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n []\r\n )\r\n\r\n return (\r\n \r\n \r\n {initAd &&
}\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Ad\r\n","import React from 'react'\r\nimport styled from 'styled-components'\r\nimport AppButton, { AppButtonProps } from './AppButton'\r\nimport FlexBox from './FlexBox'\r\n\r\nexport const ButtonsWrapper = styled(FlexBox)`\r\n border-radius: 28px;\r\n background: rgba(50, 163, 245, 0.2);\r\n .MuiButton-outlined {\r\n background: white;\r\n border-color: #32a3f5;\r\n }\r\n`\r\nexport type AppTabButtonsOptions = Partial &\r\n Required>\r\n\r\nexport interface AppTabButtonsProps {\r\n selected: string\r\n onClick: (value: string) => void\r\n options: AppTabButtonsOptions[]\r\n}\r\n\r\nexport const AppTabButtons: React.FC = ({\r\n selected,\r\n onClick,\r\n options,\r\n}) => {\r\n if (!options || !options.length) return null\r\n return (\r\n \r\n {options.map(el => (\r\n setTimeout(() => onClick(el.name), 200)}\r\n minWidth=\"100%\"\r\n translation={el.translation}\r\n {...el}\r\n />\r\n ))}\r\n \r\n )\r\n}\r\n\r\nexport default AppTabButtons\r\n","import { Divider } from '@mui/material'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport styled from 'styled-components'\r\nimport { Translations } from 'utils'\r\nimport AppTypography from './AppTypography'\r\n\r\nconst Wrapper = styled.div`\r\n position: relative;\r\n margin: 6px;\r\n p {\r\n position: absolute;\r\n background: white;\r\n top: -12px;\r\n left: 50%;\r\n z-index: 1;\r\n transform: translate(-50%, -50%);\r\n padding: 0 10px;\r\n top: 0;\r\n color: ${_ => _.theme.palette.divider};\r\n text-transform: uppercase;\r\n }\r\n`\r\n\r\nexport interface TextDividerProps {\r\n translation?: keyof typeof Translations\r\n}\r\n\r\nexport const TextDivider: React.FC = props => {\r\n const { t } = useTranslation()\r\n return (\r\n \r\n \r\n {props.translation && (\r\n \r\n {t(Translations[props.translation])}\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default TextDivider\r\n","import { useTranslation } from 'react-i18next'\r\nimport styled from 'styled-components'\r\nimport { Translations } from 'utils'\r\nimport { Input } from './Input'\r\nimport React from 'react'\r\n\r\nexport const PhoneNumberContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n margin-bottom: 15px;\r\n`\r\n\r\nexport const PhoneNumberInput: typeof Input = props => {\r\n const { t } = useTranslation()\r\n return (\r\n \r\n )\r\n}\r\nexport { default as CountryCodeInput } from './CountryCodeInput'\r\nexport default PhoneNumberInput\r\n","import { MenuItem, TextFieldProps } from '@mui/material'\r\nimport { SelectListOptionsProps } from 'shared/AppSelectListField/SelectListOptions'\r\nimport React from 'react'\r\nimport { AppTextField, AppTypography } from 'shared'\r\n\r\nexport interface AppSelectListFieldProps extends SelectListOptionsProps {\r\n value: number\r\n onChange: (\r\n e: React.ChangeEvent\r\n ) => void\r\n disabled?: boolean\r\n sufix: string\r\n name?: string\r\n $innerSufix?: boolean\r\n}\r\n\r\nexport const AppSelectListField: React.FC<\r\n AppSelectListFieldProps & TextFieldProps\r\n> = props => {\r\n const SelectListOptions = React.useMemo(() => {\r\n const arr = []\r\n for (let i = 0; i <= props.max; i = i + props.interval) {\r\n arr.push(i)\r\n }\r\n\r\n return arr.map(el => (\r\n \r\n ))\r\n }, [props.$innerSufix, props.interval, props.max, props.sufix])\r\n\r\n return (\r\n <>\r\n \r\n {SelectListOptions}\r\n \r\n {props.sufix && !props.$innerSufix && (\r\n {props.sufix}\r\n )}\r\n >\r\n )\r\n}\r\n\r\nexport default AppSelectListField\r\n","import moment from 'moment'\r\nimport React from 'react'\r\n\r\nexport const useCounter = (endDate: string, onEnd?: () => void) => {\r\n const [isRunning, setIsRunning] = React.useState(true)\r\n const getElapsedSeconds = React.useCallback(() => {\r\n let seconds = moment\r\n .duration(moment(endDate).diff(moment(), 'millisecond'))\r\n .asSeconds()\r\n if (seconds < 0) {\r\n seconds = 0\r\n }\r\n return seconds\r\n }, [endDate])\r\n\r\n const [seconds, setSeconds] = React.useState(getElapsedSeconds())\r\n const getElapsedTimeString = React.useCallback(\r\n (seconds: number) =>\r\n moment.duration(seconds, 'seconds').format('mm:ss', {\r\n trim: false,\r\n }),\r\n []\r\n )\r\n const [timeString, setTimeString] = React.useState(\r\n getElapsedTimeString(getElapsedSeconds())\r\n )\r\n\r\n React.useEffect(() => {\r\n if (isRunning) {\r\n const timer = setInterval(() => {\r\n setSeconds(getElapsedSeconds())\r\n }, 1000)\r\n return () => {\r\n clearInterval(timer)\r\n }\r\n }\r\n }, [getElapsedSeconds, isRunning])\r\n\r\n React.useEffect(() => {\r\n setTimeString(getElapsedTimeString(seconds))\r\n }, [getElapsedTimeString, seconds])\r\n\r\n React.useEffect(() => {\r\n if (seconds > 0) {\r\n setIsRunning(true)\r\n } else {\r\n setIsRunning(false)\r\n }\r\n }, [getElapsedSeconds, getElapsedTimeString, seconds])\r\n\r\n React.useEffect(() => {\r\n if (!isRunning) {\r\n onEnd()\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isRunning])\r\n\r\n return timeString\r\n}\r\n\r\nexport default useCounter\r\n","import React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport Translations from 'utils/translations'\r\nimport AppAlert from '../AppAlert'\r\nimport { useCounter } from './useCounter'\r\n\r\nexport interface CounterProps {\r\n title: keyof typeof Translations\r\n onEnd?: () => void\r\n endTime: string\r\n}\r\n\r\nexport const Counter: React.FC = props => {\r\n const { t } = useTranslation()\r\n const timeString = useCounter(props.endTime, props.onEnd)\r\n\r\n return (\r\n \r\n {`${t(Translations[props.title])}: ${timeString}`}\r\n \r\n )\r\n}\r\nCounter.defaultProps = {\r\n onEnd: () => undefined,\r\n}\r\nexport default Counter\r\n","import { Grid, GridProps } from '@mui/material'\r\nimport React from 'react'\r\n\r\nexport interface GridWrapperProps extends GridProps {\r\n itemProps?: GridProps\r\n}\r\n\r\nexport const GridWrapper: React.FC = ({\r\n itemProps,\r\n ...props\r\n}) => {\r\n const renderChildren = () =>\r\n React.Children.map(props.children, child =>\r\n React.isValidElement(child) ? (\r\n \r\n {child}\r\n \r\n ) : null\r\n )\r\n if (!renderChildren().length) return null\r\n return {renderChildren()}\r\n}\r\nGridWrapper.defaultProps = {\r\n spacing: 2,\r\n container: true,\r\n}\r\nexport default GridWrapper\r\n","import {\r\n SHOW_LOADER,\r\n HIDE_LOADER,\r\n SHOW_LOADING_PAGE,\r\n HIDE_LOADING_PAGE,\r\n} from './constants'\r\n\r\nexport const showLoader = (spinnerNames?: string[]) => ({\r\n type: SHOW_LOADER as typeof SHOW_LOADER,\r\n spinnerNames: spinnerNames || [],\r\n})\r\n\r\nexport const hideLoader = (spinnerNames?: string[]) => ({\r\n type: HIDE_LOADER as typeof HIDE_LOADER,\r\n spinnerNames: spinnerNames || [],\r\n})\r\n\r\nexport const showLoadingPage = () => ({\r\n type: SHOW_LOADING_PAGE as typeof SHOW_LOADING_PAGE,\r\n})\r\n\r\nexport const hideLoadingPage = () => ({\r\n type: HIDE_LOADING_PAGE as typeof HIDE_LOADING_PAGE,\r\n})\r\n\r\nexport type Actions =\r\n | ReturnType\r\n | ReturnType\r\n | ReturnType\r\n | ReturnType\r\n","import * as Yup from 'yup'\r\nimport Translations from 'utils/translations'\r\nimport { TFunction } from 'i18next'\r\n\r\nexport const passwordValidationShape = (t: TFunction) =>\r\n Yup.object().shape({\r\n password: Yup.string()\r\n .required(t(Translations.PASSWORD_CANNOT_BE_EMPTY))\r\n .matches(\r\n /(?=.*[A-Z]{1,})(?=.*[0-9]{1,})(?=.*[^A-Za-z0-9])(?=.*.{8,})/,\r\n t(Translations.MINIMUM_8_CHARACTERS_AT_LEAST_ONE_CAPITAL)\r\n ),\r\n confirmPassword: Yup.string()\r\n .required(t(Translations.CONFIRM_PASSWORD_CANNOT_BE_EMPTY))\r\n .oneOf([Yup.ref('password'), null], t(Translations.PASSWORD_NOT_MATCH)),\r\n })\r\n","import { Form, Formik } from 'formik'\r\nimport { useChangeLayout } from 'hooks'\r\nimport { useSnackbar } from 'notistack'\r\nimport { passwordValidationShape } from 'pages/auth/validations'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n Input,\r\n PaddingContainer,\r\n PageHeading,\r\n} from 'shared'\r\nimport { Translations, blurLastInput } from 'utils'\r\n\r\ninterface SetNewPasswordProps {\r\n handleSubmit(data: string): void\r\n}\r\n\r\nconst SetNewPassword: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n useChangeLayout()\r\n const { enqueueSnackbar } = useSnackbar()\r\n\r\n return (\r\n \r\n \r\n {\r\n props.handleSubmit(data.password)\r\n }}\r\n >\r\n {({\r\n values,\r\n errors,\r\n handleChange,\r\n handleBlur,\r\n validateForm,\r\n handleSubmit,\r\n }) => (\r\n \r\n )}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default SetNewPassword\r\n","import * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useHistory } from 'react-router'\r\nimport paths from 'routing/paths'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n FullLayout,\r\n PaddingContainer,\r\n PageHeading,\r\n SharedIcon,\r\n} from 'shared'\r\nimport { customerSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { UserRole } from 'typedef/customer'\r\nimport Translations from 'utils/translations'\r\n\r\ninterface SetNewPasswordCompleteProps {}\r\n\r\nconst SetNewPasswordComplete: React.FunctionComponent<\r\n SetNewPasswordCompleteProps\r\n> = props => {\r\n const { t } = useTranslation()\r\n const { push } = useHistory()\r\n const dispatch = useAppDispatch()\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n dispatch(customerSlice.actions.setRole(UserRole.User))\r\n push(paths.home.map)\r\n }}\r\n >\r\n {t(Translations.OK)}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SetNewPasswordComplete\r\n","import { createTheme } from '@mui/material/styles'\r\nimport { Theme } from '@mui/material'\r\ndeclare module '@mui/material/styles' {\r\n interface Palette {\r\n pin: Palette['primary']\r\n }\r\n interface PaletteOptions {\r\n pin: PaletteOptions['primary']\r\n }\r\n}\r\n\r\nexport const theme = createTheme({\r\n palette: {\r\n primary: {\r\n light: '#DCF3FF',\r\n main: '#32a3f5',\r\n dark: '#0485E3',\r\n contrastText: '#fff',\r\n },\r\n secondary: {\r\n light: '#FFEBEB',\r\n main: '#FF3333',\r\n },\r\n text: {\r\n primary: '#123123',\r\n secondary: '#646464',\r\n },\r\n divider: '#DBDBDB',\r\n pin: {\r\n main: '#3366EC',\r\n dark: '#1411A1',\r\n light: '#32A3F5',\r\n },\r\n },\r\n typography: {\r\n fontFamily: '\"SF Pro Display\", \"Helvetica\", \"Arial\", sans-serif',\r\n h1: {\r\n fontSize: '1.15rem',\r\n fontWeight: 700,\r\n },\r\n h2: {\r\n fontSize: '1.25rem',\r\n fontWeight: 700,\r\n },\r\n h3: {\r\n fontSize: '1.15rem',\r\n fontWeight: 700,\r\n },\r\n h6: {\r\n fontWeight: 700,\r\n fontSize: '1.15rem',\r\n },\r\n subtitle1: {\r\n fontSize: '1.5rem',\r\n },\r\n subtitle2: {\r\n fontWeight: 700,\r\n fontSize: '2rem',\r\n },\r\n body2: {\r\n fontSize: '0.9rem',\r\n },\r\n },\r\n components: {\r\n MuiModal: {\r\n styleOverrides: {\r\n root: {\r\n '.MuiPickersYear-yearButton': {\r\n fontSize: '1.1rem',\r\n },\r\n },\r\n },\r\n },\r\n MuiFormControl: {\r\n styleOverrides: {\r\n root: {\r\n width: '100%',\r\n },\r\n },\r\n },\r\n MuiDialogTitle: {\r\n styleOverrides: {\r\n root: {\r\n padding: '16px 8px',\r\n },\r\n },\r\n },\r\n MuiSelect: {\r\n styleOverrides: {\r\n select: {\r\n padding: 0,\r\n },\r\n },\r\n },\r\n MuiInputBase: {\r\n styleOverrides: {\r\n root: {\r\n background: '#FFFFFF',\r\n border: '1.25px #D2D2D2 solid',\r\n borderRadius: '17px',\r\n '&.Mui-error': {\r\n border: '1.25px #FF3333 solid',\r\n },\r\n },\r\n inputMultiline: {\r\n padding: '10px 20px',\r\n color: '#222',\r\n\r\n '&::placeholder': {\r\n color: '#DBDBDB',\r\n opacity: '1',\r\n },\r\n },\r\n },\r\n },\r\n MuiTextField: {\r\n styleOverrides: {\r\n root: {\r\n borderRadius: '17px',\r\n background: '#FFFFFF',\r\n '&.Mui-error': {\r\n border: '1.25px #FF3333 solid',\r\n },\r\n '.MuiOutlinedInput-notchedOutline': {\r\n border: '1.25px #D2D2D2 solid!important',\r\n borderRadius: '17px',\r\n },\r\n '.Mui-focused': {\r\n '.MuiOutlinedInput-notchedOutline': {\r\n borderColor: '#32a3f5!important',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n})\r\n\r\ndeclare module '@mui/styles' {\r\n interface DefaultTheme extends Theme {}\r\n}\r\n\r\nexport type CustomTheme = Theme\r\n","import { createTheme } from '@mui/material/styles'\r\nimport { CustomTheme } from './theme'\r\n\r\nexport const whiteTheme = (theme: CustomTheme) =>\r\n createTheme({\r\n ...theme,\r\n palette: {\r\n ...theme.palette,\r\n primary: {\r\n main: '#fff',\r\n },\r\n text: {\r\n primary: '#fff',\r\n },\r\n },\r\n components: {\r\n ...theme.components,\r\n MuiTypography: {\r\n styleOverrides: {\r\n paragraph: {\r\n color: '#fff',\r\n },\r\n },\r\n },\r\n MuiButton: {\r\n styleOverrides: {\r\n text: {\r\n color: '#fff',\r\n '&:hover': { backgroundColor: 'rgba(255, 255, 255, 0.3)' },\r\n },\r\n containedPrimary: {\r\n color: '#FF3333',\r\n backgroundColor: '#fff',\r\n '&:hover': {\r\n backgroundColor: '#f5f5f5',\r\n },\r\n '&:disabled': {\r\n color: '#fff',\r\n backgroundColor: '#D2D2D2',\r\n },\r\n },\r\n outlinedPrimary: {\r\n color: '#fff',\r\n borderColor: '#fff',\r\n '&:hover': {\r\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\r\n },\r\n },\r\n },\r\n },\r\n MuiStepper: {\r\n styleOverrides: {\r\n root: {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n },\r\n MuiStepConnector: {\r\n styleOverrides: {\r\n line: {\r\n color: '#fff',\r\n },\r\n },\r\n },\r\n MuiStepIcon: {\r\n styleOverrides: {\r\n text: {\r\n fill: '#fff',\r\n },\r\n root: {\r\n fill: 'rgba(255,255,255,.2)',\r\n },\r\n },\r\n },\r\n MuiCircularProgress: {\r\n styleOverrides: {\r\n colorPrimary: {\r\n color: '#fff',\r\n },\r\n },\r\n },\r\n },\r\n })\r\n","import { createGlobalStyle } from 'styled-components'\r\nimport bg from 'assets/images/bg.png'\r\n\r\nexport const GlobalStyle = createGlobalStyle`\r\nbody, html { \r\nheight: 100%;\r\nmargin: 0;\r\noverscroll-behavior-y: contain;\r\nscrollbar-width: none;\r\n}\r\nhtml::-webkit-scrollbar,\r\nbody::-webkit-scrollbar,\r\n#root::-webkit-scrollbar {\r\n display: none;\r\n}\r\n#root {\r\nbackground-image: url(${bg});\r\nscrollbar-width: none;\r\nbackground-size: cover;\r\ntop: 0;\r\nwidth: 100%;\r\nmin-height: 100%;\r\nmargin: 0 auto;\r\n.snackbarProvider-anchorOriginBottomCenter {\r\n z-index:2;\r\n}\r\n/* for lists */\r\n.item-enter {\r\nopacity: 0;\r\n}\r\n.item-enter-active {\r\nopacity: 1;\r\n\r\ntransition: all 250ms ease-in;\r\n}\r\n.item-exit {\r\nopacity: 1;\r\n}\r\n.item-exit-active {\r\nopacity: 0;\r\ntransition: all 250ms ease-in;\r\n}\r\n}\r\n`\r\n","import { useChangeLayout } from 'hooks'\r\nimport * as React from 'react'\r\nimport { Redirect, RouteComponentProps, useParams } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport { PageDialog } from 'shared'\r\nimport { showPopup } from 'store/globalPopup/actions'\r\nimport { hideLoader, showLoader } from 'store/loader'\r\nimport { customerSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport SetNewPassword from './SetNewPassword'\r\nimport SetNewPasswordComplete from './SetNewPasswordComplete'\r\nimport { ThemeProvider } from '@mui/material/styles'\r\nimport { whiteTheme } from 'themes'\r\n\r\ninterface ResetPasswordProps extends RouteComponentProps {}\r\n\r\nconst ResetPassword = (props: ResetPasswordProps) => {\r\n const [success, setSuccess] = React.useState(false)\r\n const { token } = useParams<{ token: string }>()\r\n\r\n const dispatch = useAppDispatch()\r\n useChangeLayout()\r\n\r\n const onSubmit = async (password: string) => {\r\n dispatch(showLoader())\r\n const promise = await dispatch(\r\n customerSlice.resetPassword({ password, confirmToken: token })\r\n )\r\n dispatch(hideLoader())\r\n if (customerSlice.resetPassword.fulfilled.match(promise)) {\r\n setSuccess(true)\r\n } else {\r\n // FIXME: update to new popup system\r\n dispatch(\r\n showPopup({\r\n ...promise.payload,\r\n handleAdditionalButtonClick: () => onSubmit(password),\r\n })\r\n )\r\n }\r\n }\r\n\r\n if (!token) return \r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ResetPassword\r\n","import * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n FullLayout,\r\n PaddingContainer,\r\n PageHeading,\r\n SharedIcon,\r\n} from 'shared'\r\nimport Translations from '../../../../utils/translations'\r\n\r\ninterface SendMailCompleteProps {\r\n goBack: () => void\r\n}\r\n\r\nconst SendMailComplete: React.FunctionComponent<\r\n SendMailCompleteProps\r\n> = props => {\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t(Translations.OK)}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SendMailComplete\r\n","export const countryList: string[] = [\r\n 'af',\r\n 'eg',\r\n 'ax',\r\n 'al',\r\n 'dz',\r\n 'as',\r\n 'vi',\r\n 'um',\r\n 'ad',\r\n 'ao',\r\n 'ai',\r\n 'aq',\r\n 'ag',\r\n 'gq',\r\n 'ar',\r\n 'am',\r\n 'aw',\r\n 'ac',\r\n 'az',\r\n 'et',\r\n 'au',\r\n 'bs',\r\n 'bh',\r\n 'bd',\r\n 'bb',\r\n 'by',\r\n 'be',\r\n 'bz',\r\n 'bj',\r\n 'bm',\r\n 'bt',\r\n 'bo',\r\n 'bq',\r\n 'ba',\r\n 'bw',\r\n 'br',\r\n 'vg',\r\n 'io',\r\n 'bn',\r\n 'bg',\r\n 'bf',\r\n 'bi',\r\n 'cv',\r\n 'ea',\r\n 'cl',\r\n 'cn',\r\n 'ck',\r\n 'cr',\r\n 'ci',\r\n 'cw',\r\n 'dk',\r\n 'de',\r\n 'dg',\r\n 'dm',\r\n 'do',\r\n 'dj',\r\n 'ec',\r\n 'sv',\r\n 'er',\r\n 'ee',\r\n 'fk',\r\n 'fo',\r\n 'fj',\r\n 'fi',\r\n 'fr',\r\n 'gf',\r\n 'pf',\r\n 'tf',\r\n 'ga',\r\n 'gm',\r\n 'ge',\r\n 'gh',\r\n 'gi',\r\n 'gd',\r\n 'gr',\r\n 'gl',\r\n 'gp',\r\n 'gu',\r\n 'gt',\r\n 'gg',\r\n 'gn',\r\n 'gw',\r\n 'gy',\r\n 'ht',\r\n 'hn',\r\n 'in',\r\n 'id',\r\n 'iq',\r\n 'ir',\r\n 'ie',\r\n 'is',\r\n 'im',\r\n 'il',\r\n 'it',\r\n 'jm',\r\n 'jp',\r\n 'ye',\r\n 'je',\r\n 'jo',\r\n 'ky',\r\n 'kh',\r\n 'cm',\r\n 'ca',\r\n 'ic',\r\n 'kz',\r\n 'qa',\r\n 'ke',\r\n 'kg',\r\n 'ki',\r\n 'cc',\r\n 'co',\r\n 'km',\r\n 'cg',\r\n 'cd',\r\n 'xk',\r\n 'hr',\r\n 'cu',\r\n 'kw',\r\n 'la',\r\n 'ls',\r\n 'lv',\r\n 'lb',\r\n 'lr',\r\n 'ly',\r\n 'li',\r\n 'lt',\r\n 'lu',\r\n 'mg',\r\n 'mw',\r\n 'my',\r\n 'mv',\r\n 'ml',\r\n 'mt',\r\n 'ma',\r\n 'mh',\r\n 'mq',\r\n 'mr',\r\n 'mu',\r\n 'yt',\r\n 'mx',\r\n 'fm',\r\n 'mc',\r\n 'mn',\r\n 'me',\r\n 'ms',\r\n 'mz',\r\n 'mm',\r\n 'na',\r\n 'nr',\r\n 'np',\r\n 'nc',\r\n 'nz',\r\n 'ni',\r\n 'nl',\r\n 'ne',\r\n 'ng',\r\n 'nu',\r\n 'kp',\r\n 'mp',\r\n 'mk',\r\n 'nf',\r\n 'no',\r\n 'om',\r\n 'at',\r\n 'pk',\r\n 'ps',\r\n 'pw',\r\n 'pa',\r\n 'pg',\r\n 'py',\r\n 'pe',\r\n 'ph',\r\n 'pn',\r\n 'pl',\r\n 'pt',\r\n 'pr',\r\n 'md',\r\n 're',\r\n 'rw',\r\n 'ro',\r\n 'ru',\r\n 'sb',\r\n 'zm',\r\n 'ws',\r\n 'sm',\r\n 'st',\r\n 'sa',\r\n 'se',\r\n 'ch',\r\n 'sn',\r\n 'rs',\r\n 'sc',\r\n 'sl',\r\n 'zw',\r\n 'sg',\r\n 'sx',\r\n 'sk',\r\n 'si',\r\n 'so',\r\n 'hk',\r\n 'mo',\r\n 'es',\r\n 'sj',\r\n 'lk',\r\n 'bl',\r\n 'sh',\r\n 'kn',\r\n 'lc',\r\n 'mf',\r\n 'pm',\r\n 'vc',\r\n 'za',\r\n 'sd',\r\n 'gs',\r\n 'kr',\r\n 'ss',\r\n 'sr',\r\n 'sz',\r\n 'sy',\r\n 'tj',\r\n 'tw',\r\n 'tz',\r\n 'th',\r\n 'tl',\r\n 'tg',\r\n 'tk',\r\n 'to',\r\n 'tt',\r\n 'ta',\r\n 'td',\r\n 'cz',\r\n 'tn',\r\n 'tr',\r\n 'tm',\r\n 'tc',\r\n 'tv',\r\n 'ug',\r\n 'ua',\r\n 'hu',\r\n 'uy',\r\n 'uz',\r\n 'vu',\r\n 'va',\r\n 've',\r\n 'ae',\r\n 'us',\r\n 'gb',\r\n 'vn',\r\n 'wf',\r\n 'cx',\r\n 'eh',\r\n 'cf',\r\n 'cy',\r\n]\r\n","import { useTranslation } from 'react-i18next'\r\nimport styled from 'styled-components'\r\nimport { Translations } from 'utils'\r\nimport React, { useEffect, useState } from 'react'\r\nimport PhoneInput, { CountryData, PhoneInputProps } from 'react-phone-input-2'\r\nimport 'react-phone-input-2/lib/style.css'\r\nimport { FormikHandlers, useFormikContext } from 'formik'\r\nimport { countryList } from 'utils/phoneNumberInput'\r\nimport i from './NumberError.png'\r\nimport { PersonalData } from 'pages/auth/signup/SignUp'\r\n\r\nexport const PhoneNumberContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`\r\n\r\nexport const StyledPhoneInput = styled(PhoneInput)`\r\n width: 100%;\r\n &.react-tel-input .form-control {\r\n border-radius: 32.5px;\r\n width: 100%;\r\n }\r\n &.react-tel-input .flag-dropdown {\r\n border-radius: 32.5px 0px 0px 32.5px;\r\n }\r\n\r\n &.react-tel-input .flag-dropdown .open {\r\n border-radius: 32.5px 0px 0px 32.5px;\r\n }\r\n &.react-tel-input .selected-flag {\r\n border-radius: 32.5px 0px 0px 32.5px;\r\n }\r\n &.react-tel-input :disabled {\r\n background-color: #dbdbdb !important;\r\n color: #646464;\r\n }\r\n &.react-tel-input input[disabled] + .flag-dropdown {\r\n cursor: not-allowed;\r\n background-color: #dbdbdb !important;\r\n opacity: 0.7;\r\n }\r\n &.react-tel-input .selected-flag {\r\n &:focus {\r\n background-color: #dbdbdb !important;\r\n }\r\n }\r\n &.react-tel-input .form-control.invalid-number {\r\n background-image: url(${i});\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n background-color: white;\r\n background-position-x: 97%;\r\n }\r\n`\r\n\r\nexport interface IPhoneInputProps extends PhoneInputProps {\r\n countryCodeFieldName: string\r\n phoneNumberFieldName: string\r\n disabled?: boolean\r\n errors?: string\r\n customHandleBlur?: (\r\n e: React.FocusEvent,\r\n handleBlur: FormikHandlers['handleBlur'],\r\n values: PersonalData\r\n ) => void\r\n}\r\n\r\nconst NewPhoneNumberInput = (props: IPhoneInputProps) => {\r\n const { t } = useTranslation()\r\n const [number, setNumber] = useState('')\r\n const { setFieldValue, handleBlur, values } = useFormikContext()\r\n const language = window.navigator.language\r\n\r\n const findMatchingCountry = (lang: string, countriesArray: string[]) => {\r\n const matchingCountry = countriesArray.find(country =>\r\n lang.includes(country.toLowerCase())\r\n )\r\n return matchingCountry || 'us'\r\n }\r\n\r\n const selectedCountry = findMatchingCountry(\r\n language.toLowerCase(),\r\n countryList\r\n )\r\n\r\n useEffect(() => {\r\n if (props.value) {\r\n setNumber(props.value)\r\n }\r\n }, [props.value])\r\n\r\n return (\r\n {\r\n setFieldValue(props.countryCodeFieldName, country.dialCode)\r\n setFieldValue(\r\n props.phoneNumberFieldName,\r\n number.slice(country.dialCode.length)\r\n )\r\n if (props.customHandleBlur) {\r\n props.customHandleBlur(e, handleBlur, {\r\n ...(values as PersonalData),\r\n phoneNumber: number.slice(country.dialCode.length),\r\n })\r\n }\r\n }}\r\n isValid={!props.errors}\r\n placeholder={t(Translations.COUNTRY_CODE_AND_PHONE_NUMBER)}\r\n value={props.value}\r\n onChange={value => {\r\n setNumber(value)\r\n }}\r\n />\r\n )\r\n}\r\nexport default NewPhoneNumberInput\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIFSURBVHgB3VbLUcNADJUCudMBLsH8ZrhhKgAqCFQAHTh0ABVgOiAVQG7MMIA7iOmASW5JbPFWdoLz2XUCPuXN7Pizu3rWSnoy0aaBqxZIEOxQv98i5oBEfFy9fEIS3Ce4i6jZ7PLra+Ky03ARyOFhGySfePQoTSMYD/j9nc2gLLvAuzvzjkajnq5d1yM5Pvaw+RnGYhi64jj+dhkR3/eo0QjV62bztMq7KYkcHPRkf/+a1gT2hLrXfGjl4pwktM4fHflmOMhu1Ibv75Tfz8RIz1nkhT8+bm2GEJczHRZg7x0uMY7yeimRuisSIi52klWRpleI12XZq1+PhkOTvhECn9A/ockj8gSvWotEzC1MPFFdYO5qFi4QiXg0Hn9RXUjTWAt8gQgVD5djqgkagomKkEMZ6kb56BLZ29ulmqC1ZvSwwPZ0htnkvjlTd5y2tjqQJ6pElnmF6M4RoVBVIIk6rv389rZqHE1RR5OHRukLHvEF5/PS8RcUWneJzOsuEBVFFuFoHpxGjI5huNbgaEPYapeLfzbrsuze5L4RRjuT5MM2netl4NRLXYjeAqLKRmYhudG9pj/NgW1kyMBnxOwFjey2qpFpux8MHlQJsux0mV46/xm0LzG3Kc+eDsiTSdYVXdj8Q5zA+LmuwdHbunH1z0nuXaCia/Rw9uck1rJAxla1+83DD0lLDZTTNG6tAAAAAElFTkSuQmCC\"","import styled from 'styled-components'\r\n\r\nconst PhoneNumberContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n margin-bottom: 15px;\r\n`\r\n\r\nexport default PhoneNumberContainer\r\n","import React, { useState, useEffect, useCallback } from 'react';\r\nimport { useGoogleReCaptcha } from 'react-google-recaptcha-v3';\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\nimport axios from '../../../src/api';\r\nimport { VERIFY_HUMAN } from '../../../src/api/constants';\r\nimport { Response } from '../../typedef/api';\r\nimport { CAPTCHA_V2_ENABLE, CAPTCHA_V3_ENABLE, CAPTCHA_V2_KEY, CAPTCHA_V3_KEY\r\n , CAPTCHA_VALIDATE_REGISTRATION, CAPTCHA_VALIDATE_RESEND_PIN\r\n , CAPTCHA_VALIDATE_FORGOT_PASSWORD, CAPTCHA_VALIDATE_ADD_NUMBER_FOR_NOTIFICATION\r\n , CAPTCHA_VALIDATE_PAYMENT } from 'api/config'\r\n\r\nenum reCapthaVersion{\r\n v2 = 2, \r\n v3 = 3\r\n}\r\n\r\nexport enum validateFeature{\r\n Registration = 1,\r\n ResendPin = 2,\r\n ForgotPassword = 3,\r\n AddNumberForNotification = 4,\r\n Payment = 5\r\n}\r\n\r\ninterface HybridRecaptchaProps {\r\n onValidationSuccess: () => void;\r\n onValidationFailure?: () => void;\r\n onTokenReceived: (token: string) => void;\r\n feature: validateFeature;\r\n}\r\n\r\nconst HybridRecaptchaContent: React.FC = ({\r\n onValidationSuccess,\r\n onValidationFailure,\r\n onTokenReceived, \r\n feature,\r\n}): React.ReactElement => {\r\n const [showRecaptchaV2, setShowRecaptchaV2] = useState(false); \r\n const [isRecaptchaValid, setIsRecaptchaValid] = useState(false); \r\n const { executeRecaptcha } = useGoogleReCaptcha();\r\n\r\n const handleRecaptchaV3 = useCallback(async (): Promise => {\r\n if(!CAPTCHA_V3_ENABLE && CAPTCHA_V2_ENABLE){\r\n setShowRecaptchaV2(true);\r\n return;\r\n }\r\n\r\n if (!CAPTCHA_V3_ENABLE || !featureIsOn(feature)) {\r\n onValidationSuccess();\r\n return;\r\n }\r\n\r\n if (isRecaptchaValid || showRecaptchaV2) { \r\n return;\r\n }\r\n\r\n if (!CAPTCHA_V3_KEY || !executeRecaptcha) {\r\n console.warn('reCAPTCHA v3 is not ready.');\r\n setTimeout(handleRecaptchaV3, 1000);\r\n return;\r\n }\r\n\r\n try {\r\n const token = await executeRecaptcha('verify_user');\r\n const isValid = await validateRecaptcha(token, reCapthaVersion.v3);\r\n\r\n if (isValid) {\r\n setIsRecaptchaValid(true);\r\n onTokenReceived(token); \r\n onValidationSuccess();\r\n sessionStorage.setItem('recaptchaToken',token);\r\n } else if (CAPTCHA_V2_ENABLE) {\r\n setShowRecaptchaV2(true);\r\n } else {\r\n onValidationFailure?.();\r\n }\r\n } catch (error) {\r\n console.error('Error during reCAPTCHA v3 validation:', error);\r\n }\r\n }, [executeRecaptcha, onValidationSuccess, onValidationFailure, onTokenReceived, showRecaptchaV2, feature, isRecaptchaValid]);\r\n \r\nconst handleRecaptchaV2 = useCallback(async (token: string | null): Promise => { \r\n if (!featureIsOn(feature)) {\r\n onValidationSuccess();\r\n return;\r\n }\r\n if (!token) {\r\n onValidationFailure?.();\r\n return;\r\n }\r\n\r\n try {\r\n const isValid = await validateRecaptcha(token, reCapthaVersion.v2);\r\n\r\n if (isValid) { \r\n setIsRecaptchaValid(true);\r\n onTokenReceived(token); \r\n onValidationSuccess();\r\n sessionStorage.setItem('recaptchaToken',token);\r\n } else {\r\n onValidationFailure?.();\r\n }\r\n } catch (error) {\r\n console.error('Error during reCAPTCHA v2 validation:', error); \r\n } \r\n }, [onValidationSuccess, onValidationFailure, onTokenReceived, feature]);\r\n\r\n const validateRecaptcha = async (token: string, version: reCapthaVersion): Promise => {\r\n try {\r\n const response = await axios.post>(`${VERIFY_HUMAN}`,\r\n {token: token, version: version}\r\n );\r\n return response.data?.data ?? false;\r\n } catch (error) {\r\n console.error(`reCAPTCHA ${version} validation error:`, error);\r\n return false;\r\n }\r\n };\r\n\r\n useEffect(() => { \r\n if (isRecaptchaValid) { \r\n return;\r\n } \r\n if (executeRecaptcha) {\r\n handleRecaptchaV3(); \r\n } \r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [executeRecaptcha]); \r\n\r\n const featureIsOn = (feature: validateFeature) => {\r\n switch (feature) {\r\n case validateFeature.Registration:\r\n return CAPTCHA_VALIDATE_REGISTRATION;\r\n case validateFeature.ResendPin:\r\n return CAPTCHA_VALIDATE_RESEND_PIN;\r\n case validateFeature.ForgotPassword:\r\n return CAPTCHA_VALIDATE_FORGOT_PASSWORD;\r\n case validateFeature.AddNumberForNotification:\r\n return CAPTCHA_VALIDATE_ADD_NUMBER_FOR_NOTIFICATION;\r\n case validateFeature.Payment:\r\n return CAPTCHA_VALIDATE_PAYMENT;\r\n default:\r\n return true;\r\n }\r\n };\r\n\r\n return (\r\n \r\n {showRecaptchaV2 && CAPTCHA_V2_KEY && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\ninterface AppProps {\r\n onValidationSuccess: () => void;\r\n onValidationFailure?: () => void;\r\n onTokenReceived: (token: string) => void; \r\n feature: validateFeature;\r\n}\r\n\r\nconst HybridRecaptcha: React.FC = ({ onValidationSuccess, onValidationFailure, onTokenReceived, feature }) => ( \r\n \r\n);\r\n\r\nexport default HybridRecaptcha;","import { Form, Formik } from 'formik'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { AppButton, FlexBox, PageHeading } from 'shared'\r\nimport NewPhoneNumberInput from 'shared/PhoneNumberAndCountryCodeInput'\r\nimport PhoneNumberContainer from 'shared/sidebar/SignUpContainer'\r\nimport {\r\n countryCodeRegex,\r\n phoneNumberRegex,\r\n Translations,\r\n blurLastInput,\r\n} from 'utils'\r\nimport * as Yup from 'yup'\r\nimport HybridRecaptcha from 'shared/ReCaptcha/HybridRecaptcha';\r\nimport { validateFeature } from 'shared/ReCaptcha/HybridRecaptcha';\r\n\r\n\r\ninterface SendMeMailProps {\r\n handleSubmit(phoneCountryCode: number, phoneNumber: string, recaptchaToken: string): void\r\n goBack: () => void\r\n}\r\n\r\nconst SendMeMail: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n const { enqueueSnackbar } = useSnackbar()\r\n const [recaptchaVerified, setRecaptchaVerified] = React.useState(false);\r\n const [recaptchaToken, setRecaptchaToken] = React.useState(null);\r\n\r\n const handleTokenReceived = (token: string) => {\r\n setRecaptchaToken(token);\r\n };\r\n\r\n const handleRecaptchaSuccess = () => {\r\n setRecaptchaVerified(true);\r\n };\r\n\r\n const handleRecaptchaFailure = () => {\r\n enqueueSnackbar(t(Translations.RECAPTCHA_VERIFICATION_FAILED), { variant: 'error' });\r\n setRecaptchaVerified(false);\r\n };\r\n\r\n\r\n const SignupSchema = Yup.object().shape({\r\n countryCode: Yup.string().matches(\r\n countryCodeRegex,\r\n t(Translations.INVALID_COUNTRY_CODE)\r\n ),\r\n phoneNumber: Yup.string()\r\n .matches(phoneNumberRegex, t(Translations.INVALID_PHONE_NUMBER))\r\n .required(t(Translations.FIELD_REQUIRED)),\r\n })\r\n\r\n return (\r\n <>\r\n {\r\n if (!recaptchaVerified) {\r\n enqueueSnackbar(t(Translations.PLEASE_COMPLETE_RECAPTCHA_VERIFICATION), { variant: 'warning' });\r\n return;\r\n }\r\n props.handleSubmit(parseInt(data.countryCode), data.phoneNumber, recaptchaToken)\r\n }}\r\n validationSchema={SignupSchema}\r\n validateOnChange={true}\r\n validateOnBlur={false}\r\n >\r\n {({\r\n values,\r\n errors,\r\n handleChange,\r\n handleBlur,\r\n validateForm,\r\n handleSubmit,\r\n }) => (\r\n \r\n )}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default SendMeMail\r\n","import { showPopup } from 'store/globalPopup/actions'\r\nimport { hideLoader, showLoader } from 'store/loader'\r\nimport { customerSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { ErrorCode } from 'typedef'\r\n\r\nexport const useSendEmail = (\r\n setSuccess: React.Dispatch>\r\n) => {\r\n const dispatch = useAppDispatch()\r\n\r\n const sendEmail = async (phoneCountryCode: number, phoneNumber: string, recaptchaToken: string) => {\r\n dispatch(showLoader())\r\n const promise = await dispatch(\r\n customerSlice.remindPassword({ phoneCountryCode, phoneNumber, recaptchaToken})\r\n )\r\n dispatch(hideLoader())\r\n if (customerSlice.remindPassword.fulfilled.match(promise)) {\r\n setSuccess(true)\r\n } else {\r\n if (promise.payload.code === ErrorCode.NoUserAssignedToGivenEMail) {\r\n setSuccess(true)\r\n return\r\n }\r\n dispatch(\r\n showPopup({\r\n ...promise.payload,\r\n handleAdditionalButtonClick: () =>\r\n sendEmail(phoneCountryCode, phoneNumber, recaptchaToken),\r\n })\r\n )\r\n }\r\n }\r\n\r\n return sendEmail\r\n}\r\n","import { useChangeLayout } from 'hooks'\r\nimport * as React from 'react'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport { PaddingContainer, PageDialog } from 'shared'\r\nimport SendMailComplete from './SendMailComplete'\r\nimport SendMeMail from './SendMeMail'\r\nimport { useSendEmail } from './useSendEmail'\r\n\r\ninterface ForgotPasswordProps {}\r\n\r\nexport interface PersonalData {\r\n email: string\r\n}\r\n\r\nconst ForgotPassword = (props: ForgotPasswordProps) => {\r\n const [success, setSuccess] = React.useState(false)\r\n const history = useHistory()\r\n const sendEmail = useSendEmail(setSuccess)\r\n useChangeLayout()\r\n const goBack = () => {\r\n history.push(paths.auth.login)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default ForgotPassword\r\n","import { useChangeLayout } from 'hooks'\r\nimport * as React from 'react'\r\nimport { useHistory, useParams } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport { PaddingContainer, PageDialog } from 'shared'\r\nimport SendMailComplete from './SendMailComplete'\r\nimport SendMeMail from './SendMeMail'\r\nimport { ThemeProvider } from '@mui/material/styles'\r\nimport { whiteTheme } from 'themes'\r\nimport { useSendEmail } from './useSendEmail'\r\n\r\nexport interface PersonalData {\r\n email: string\r\n}\r\n\r\nexport const ForgotPasswordRedirect = () => {\r\n const [success, setSuccess] = React.useState(false)\r\n const history = useHistory()\r\n const { carId } = useParams<{ carId: string }>()\r\n const sendEmail = useSendEmail(setSuccess)\r\n useChangeLayout()\r\n const goBack = () => {\r\n history.push(`${paths.parking.login}/${carId}`)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n","import { SharedIcon } from 'shared'\r\nimport * as React from 'react'\r\n\r\nexport interface LanguageData {\r\n name: string\r\n abbreviation: string\r\n flag: JSX.Element\r\n}\r\n\r\nexport const languageList: LanguageData[] = [\r\n {\r\n name: 'AMERICAN_ENGLISH',\r\n abbreviation: 'en-US',\r\n flag: ,\r\n },\r\n {\r\n name: 'BRITISH_ENGLISH',\r\n abbreviation: 'en-GB',\r\n flag: ,\r\n },\r\n {\r\n name: 'GERMAN',\r\n abbreviation: 'de-DE',\r\n flag: ,\r\n },\r\n {\r\n name: 'ITALIAN',\r\n abbreviation: 'it-IT',\r\n flag: ,\r\n },\r\n]\r\n","import {\r\n DialogTitle,\r\n Divider,\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n} from '@mui/material'\r\nimport { DialogProps } from '@mui/material'\r\nimport React from 'react'\r\nimport { AppDialog, AppTypography } from 'shared'\r\nimport styled from 'styled-components'\r\nimport { makeStyles } from '@mui/styles'\r\nimport CloseIcon from '@mui/icons-material/Close'\r\nimport { languageList } from './language'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { Translations } from 'utils'\r\n\r\nconst CloseIconBox = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n`\r\n\r\nconst StyledListItem = styled(ListItem)`\r\n padding-left: 0px;\r\n`\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n title: {\r\n paddingBottom: theme.spacing(1.5),\r\n paddingTop: theme.spacing(0),\r\n fontWeight: 'bold',\r\n color: 'black',\r\n },\r\n}))\r\n\r\ntype PopupProps = {\r\n closePopup: () => void\r\n addCloseButton?: boolean\r\n darkBackground?: boolean\r\n} & DialogProps\r\n\r\nexport const SelectLanguageDialog: React.FC = props => {\r\n const { addCloseButton, closePopup, darkBackground, ...dialogProps } = props\r\n const { i18n } = useTranslation()\r\n const classes = useStyles()\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n {addCloseButton && (\r\n \r\n closePopup()} />\r\n \r\n )}\r\n \r\n {t(Translations.SELECT_LANGUAGE)}\r\n \r\n \r\n {languageList.map(lang => {\r\n return (\r\n <>\r\n {\r\n i18n.changeLanguage(lang.abbreviation)\r\n closePopup()\r\n }}\r\n >\r\n {lang.flag}\r\n \r\n {t(lang.name)}\r\n \r\n }\r\n />\r\n \r\n \r\n >\r\n )\r\n })}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default SelectLanguageDialog\r\n","import { Form, Formik } from 'formik'\r\nimport { useChangeLayout, usePushToApp } from 'hooks'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useHistory } from 'react-router'\r\nimport paths from 'routing/paths'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n Input,\r\n PaddingContainer,\r\n PageHeading,\r\n SharedIcon,\r\n} from 'shared'\r\nimport PhoneNumberContainer from 'shared/sidebar/SignUpContainer'\r\nimport { showTerms } from 'store/globalPopup/actions'\r\nimport { hideLoader, showLoader } from 'store/loader'\r\nimport { termsSlice } from 'store/slices'\r\nimport { login } from 'store/slices/customerSlice'\r\nimport { useAppDispatch } from 'store/store'\r\nimport styled from 'styled-components'\r\nimport { LoginRequest, UserRole } from 'typedef/customer'\r\nimport { TermsType } from 'typedef/terms'\r\nimport { countryCodeRegex, phoneNumberRegex } from 'utils/regex'\r\nimport { Translations, blurLastInput } from 'utils'\r\nimport * as Yup from 'yup'\r\nimport NewPhoneNumberInput from 'shared/PhoneNumberAndCountryCodeInput'\r\nimport { Typography } from '@mui/material'\r\nimport SelectLanguageDialog from 'pages/select_language_dialog/SelectLanguageDialog'\r\nimport { languageList } from 'pages/select_language_dialog/language'\r\n\r\nconst ForgotButtonWrapper = styled.div`\r\n text-align: right;\r\n`\r\n\r\nconst Login: React.FC = props => {\r\n const { t, i18n } = useTranslation()\r\n const history = useHistory()\r\n const dispatch = useAppDispatch()\r\n const pushToApp = usePushToApp()\r\n useChangeLayout()\r\n const { enqueueSnackbar } = useSnackbar()\r\n const [isLanguageDialogOpen, setIsLanguageDialogOpen] =\r\n React.useState(false)\r\n\r\n const LoginSchema = Yup.object().shape({\r\n password: Yup.string().required(t(Translations.PASSWORD_CANNOT_BE_EMPTY)),\r\n countryCode: Yup.string().matches(\r\n countryCodeRegex,\r\n t(Translations.INVALID_COUNTRY_CODE)\r\n ),\r\n phoneNumber: Yup.string()\r\n .matches(phoneNumberRegex, t(Translations.PHONE_CANNOT_BE_EMPTY))\r\n .required(t(Translations.FIELD_REQUIRED)),\r\n })\r\n\r\n const loginUser = async (args: LoginRequest) => {\r\n dispatch(showLoader())\r\n const actionResult = await dispatch(login(args))\r\n dispatch(hideLoader())\r\n if (login.rejected.match(actionResult)) {\r\n enqueueSnackbar(t(Translations.WRONG_LOGIN_OR_PASSWORD))\r\n return\r\n }\r\n pushToApp()\r\n }\r\n\r\n const loginGuest = async () => {\r\n dispatch(showLoader())\r\n const actionResult = await dispatch(login({ mode: UserRole.Guest }))\r\n dispatch(hideLoader())\r\n if (login.rejected.match(actionResult)) {\r\n enqueueSnackbar(t(Translations.UNEXPECTED_ERROR_PLEASE_TRY_AGAIN))\r\n } else {\r\n pushToApp(UserRole.Guest)\r\n }\r\n }\r\n\r\n const onTermsClick = () => {\r\n dispatch(\r\n termsSlice.getTerms({\r\n type: TermsType.Login,\r\n })\r\n )\r\n dispatch(showTerms())\r\n }\r\n React.useEffect(() => {\r\n dispatch(termsSlice.actions.setLang({ lang: i18n.language }))\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n\r\n const getLanguageName = () => {\r\n const language = languageList.find(l =>\r\n l.abbreviation.includes(i18n.resolvedLanguage)\r\n )\r\n if (language) {\r\n return t(language.name)\r\n }\r\n return ''\r\n }\r\n\r\n return (\r\n \r\n \r\n {\r\n loginUser({\r\n phoneNumber: parseInt(phoneNumber),\r\n password,\r\n countryCode: parseInt(countryCode),\r\n mode: UserRole.User,\r\n })\r\n }}\r\n validationSchema={LoginSchema}\r\n validateOnBlur\r\n >\r\n {({ values, errors, handleChange, handleBlur, validateForm }) => (\r\n \r\n )}\r\n \r\n \r\n \r\n {t(Translations.TERMS_AND_CONDITIONS)}\r\n \r\n \r\n setIsLanguageDialogOpen(false)}\r\n open={isLanguageDialogOpen}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default Login\r\n","import { Form, Formik } from 'formik'\r\nimport { useChangeLayout, usePushToApp } from 'hooks'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n Input,\r\n PaddingContainer,\r\n PageHeading,\r\n} from 'shared'\r\nimport PhoneNumberContainer from 'shared/sidebar/SignUpContainer'\r\nimport { showTerms } from 'store/globalPopup/actions'\r\nimport { hideLoader, showLoader } from 'store/loader'\r\nimport { termsSlice } from 'store/slices'\r\nimport { login } from 'store/slices/customerSlice'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { LoginRequest, UserRole } from 'typedef/customer'\r\nimport { TermsType } from 'typedef/terms'\r\nimport { countryCodeRegex, phoneNumberRegex } from 'utils/regex'\r\nimport { Translations, blurLastInput } from 'utils'\r\nimport * as Yup from 'yup'\r\nimport { useHistory, useParams } from 'react-router-dom'\r\nimport { useSelector } from 'react-redux'\r\nimport { contactInformationsSlice, parkCarSlice } from 'store/slices'\r\nimport { ThemeProvider } from '@mui/material/styles'\r\nimport { whiteTheme } from 'themes'\r\nimport styled from 'styled-components'\r\nimport { paths } from 'routing'\r\nimport NewPhoneNumberInput from 'shared/PhoneNumberAndCountryCodeInput'\r\n\r\nconst ForgotButtonWrapper = styled.div`\r\n text-align: right;\r\n`\r\n\r\nexport const LoginRedirect = () => {\r\n const { t, i18n } = useTranslation()\r\n const history = useHistory()\r\n const dispatch = useAppDispatch()\r\n const pushToApp = usePushToApp()\r\n useChangeLayout()\r\n const { enqueueSnackbar } = useSnackbar()\r\n const { paymentRedirectionAvailable } = useSelector(\r\n contactInformationsSlice.stateSelectors\r\n )\r\n const { lot } = useSelector(parkCarSlice.stateSelectors)\r\n const { carId } = useParams<{ carId: string }>()\r\n\r\n const externalLogoUrl = lot ? lot.logoLink : undefined\r\n const title = lot ? lot.lotName : t(Translations.PARKING_MADE_EASY)\r\n\r\n const LoginSchema = Yup.object().shape({\r\n password: Yup.string().required(t(Translations.PASSWORD_CANNOT_BE_EMPTY)),\r\n countryCode: Yup.string().matches(\r\n countryCodeRegex,\r\n t(Translations.INVALID_COUNTRY_CODE)\r\n ),\r\n phoneNumber: Yup.string()\r\n .matches(phoneNumberRegex, t(Translations.PHONE_CANNOT_BE_EMPTY))\r\n .required(t(Translations.FIELD_REQUIRED)),\r\n })\r\n\r\n const loginUser = async (args: LoginRequest) => {\r\n dispatch(showLoader())\r\n const actionResult = await dispatch(login(args))\r\n dispatch(hideLoader())\r\n if (login.rejected.match(actionResult)) {\r\n enqueueSnackbar(t(Translations.WRONG_LOGIN_OR_PASSWORD))\r\n return\r\n }\r\n if (carId && paymentRedirectionAvailable !== null) {\r\n return\r\n } else {\r\n pushToApp()\r\n }\r\n }\r\n\r\n const onTermsClick = () => {\r\n dispatch(\r\n termsSlice.getTerms({\r\n type: TermsType.Login,\r\n })\r\n )\r\n dispatch(showTerms())\r\n }\r\n React.useEffect(() => {\r\n dispatch(termsSlice.actions.setLang({ lang: i18n.language }))\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n loginUser({\r\n phoneNumber: parseInt(phoneNumber),\r\n password,\r\n countryCode: parseInt(countryCode),\r\n mode: UserRole.User,\r\n })\r\n }}\r\n validationSchema={LoginSchema}\r\n validateOnBlur\r\n >\r\n {({ values, errors, handleChange, handleBlur, validateForm }) => (\r\n \r\n )}\r\n \r\n \r\n \r\n {t(Translations.TERMS_AND_CONDITIONS)}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n","import * as React from 'react'\r\nimport styled from 'styled-components'\r\nimport { useEffect } from 'react'\r\nimport { allowedCodeCharactersRegex } from '../utils/regex'\r\n\r\ninterface CodeInputProps {\r\n codeLength: number\r\n handleValidation: (codeValid: boolean) => void\r\n setPin: (pin: string) => void\r\n}\r\n\r\nconst Codecontainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n width: 100%;\r\n max-width: 200px;\r\n margin: auto;\r\n`\r\n\r\nconst Input = styled.input`\r\n width: 30px;\r\n height: 40px;\r\n text-align: center;\r\n border-radius: 5px;\r\n border: none;\r\n margin: 5px;\r\n\r\n &::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n }\r\n`\r\n\r\nconst CodeInput: React.FunctionComponent = ({\r\n codeLength,\r\n handleValidation,\r\n setPin,\r\n ...props\r\n}) => {\r\n const [code, setCode] = React.useState(\r\n new Array(codeLength).fill('')\r\n )\r\n const [activeInput, setActiveInput] = React.useState(0)\r\n\r\n const inputs = React.useRef[]>(\r\n [...Array(codeLength)].map(() => React.createRef())\r\n )\r\n\r\n useEffect(() => {\r\n const input = inputs.current[0].current as HTMLInputElement\r\n input.focus()\r\n }, [])\r\n\r\n const handleChange = (value: any) => {\r\n if (!allowedCodeCharactersRegex.test(value)) {\r\n const input = inputs.current[activeInput].current as HTMLInputElement\r\n input.value = ''\r\n return\r\n }\r\n\r\n const newCode = [...code]\r\n newCode[activeInput] = value\r\n\r\n setCode(newCode)\r\n\r\n if (activeInput !== codeLength - 1) {\r\n setActiveInput(activeInput + 1)\r\n\r\n const nextInput = inputs.current[activeInput + 1]\r\n .current as HTMLInputElement\r\n nextInput.focus()\r\n } else {\r\n const currentInput = inputs.current[activeInput]\r\n .current as HTMLInputElement\r\n\r\n currentInput.blur()\r\n }\r\n }\r\n\r\n const handleKeyDown = (event: React.KeyboardEvent) => {\r\n if (event.key !== 'Backspace' || activeInput === 0) return\r\n\r\n event.preventDefault()\r\n\r\n const nextIndex =\r\n activeInput === codeLength - 1 && code[activeInput] !== ''\r\n ? activeInput\r\n : activeInput - 1\r\n const nextInput = inputs.current[nextIndex].current as HTMLInputElement\r\n\r\n nextInput.value = ''\r\n\r\n const newCode = [...code]\r\n newCode[nextIndex] = ''\r\n\r\n setCode(newCode)\r\n\r\n setActiveInput(nextIndex)\r\n\r\n nextInput.focus()\r\n }\r\n\r\n const handleClick = (event: React.MouseEvent) => {\r\n event.preventDefault()\r\n\r\n setActiveInput(0)\r\n\r\n inputs.current.forEach(v => {\r\n const input = v.current as HTMLInputElement\r\n input.value = ''\r\n })\r\n\r\n setCode(new Array(codeLength).fill(''))\r\n\r\n const currentInput = inputs.current[0].current as HTMLInputElement\r\n\r\n currentInput.focus()\r\n }\r\n\r\n const handleOnInput = (event: React.FormEvent) => {\r\n const inputValue = event.currentTarget.value\r\n if (inputValue.length > 1) {\r\n handlePaste(inputValue)\r\n } else {\r\n handleChange(inputValue)\r\n }\r\n }\r\n\r\n const handlePaste = (pasteData: string) => {\r\n const newCode = pasteData\r\n .slice(0, codeLength)\r\n .split('')\r\n .map((char, index) =>\r\n allowedCodeCharactersRegex.test(char) ? char : code[index]\r\n )\r\n\r\n while (newCode.length < codeLength) {\r\n newCode.push('')\r\n }\r\n setCode(newCode)\r\n\r\n inputs.current.forEach((inputRef, index) => {\r\n if (inputRef.current) {\r\n inputRef.current.value = newCode[index] || ''\r\n }\r\n })\r\n\r\n const pin = newCode.join('')\r\n setPin(pin)\r\n\r\n if (pin.length < codeLength) {\r\n handleValidation(false)\r\n const nextInput = inputs.current[pin.length].current as HTMLInputElement\r\n nextInput.focus()\r\n setActiveInput(pin.length)\r\n } else {\r\n handleValidation(true)\r\n const currentInput = inputs.current[activeInput]\r\n .current as HTMLInputElement\r\n currentInput.blur()\r\n }\r\n }\r\n\r\n React.useEffect(() => {\r\n setPin(code.join(''))\r\n if (code.join('').length < codeLength) {\r\n handleValidation(false)\r\n } else {\r\n handleValidation(true)\r\n }\r\n }, [setPin, code, codeLength, handleValidation])\r\n\r\n React.useEffect(() => {\r\n inputs.current[0].current?.focus()\r\n }, [])\r\n\r\n return (\r\n <>\r\n \r\n {code.map((v, i) => (\r\n handleKeyDown(e)}\r\n onClick={handleClick}\r\n ref={inputs.current[i]}\r\n inputMode=\"numeric\"\r\n data-testid={`pinInput${i}`}\r\n autoComplete=\"one-time-code\"\r\n onInput={e => handleOnInput(e)}\r\n />\r\n ))}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default CodeInput\r\n","import * as customerApi from 'api/CustomerApi'\r\nimport { hasErrorCode } from 'api/utils'\r\nimport i18n from 'i18next'\r\nimport { Action } from 'redux'\r\nimport { ThunkDispatch } from 'redux-thunk'\r\nimport { getErrorPopupProps } from 'utils'\r\nimport { PhoneNumberAvailableParams } from '../../typedef/customer'\r\nimport Translations from '../../utils/translations'\r\nimport { showPopup } from '../globalPopup/actions'\r\nimport { hideLoader, showLoader } from '../loader/actions'\r\nimport { AppState } from '../store'\r\n\r\n//TODO: move to slice\r\nexport const resendRegistrationPin = (confirmToken: string, recaptchaToken: string) => {\r\n return async (\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n dispatch: ThunkDispatch,\r\n getState: () => AppState\r\n ) => {\r\n dispatch(showLoader())\r\n\r\n const isPinSent = await customerApi.resendRegistrationPin({ confirmToken, recaptchaToken })\r\n if (isPinSent) {\r\n dispatch(\r\n showPopup({\r\n variant: 'info',\r\n title: i18n.t(Translations.RESEND_CODE),\r\n description: i18n.t(Translations.ACTIVATION_CODE_HAS_BEEN_SENT),\r\n handleAdditionalButtonClick: () => undefined,\r\n })\r\n )\r\n } else {\r\n dispatch(\r\n showPopup({\r\n variant: 'warning',\r\n title: `${i18n.t(Translations.OOPS)}`,\r\n description: i18n.t(Translations.ACTIVATION_CODE_SEND_FAIL),\r\n handleAdditionalButtonClick: () => {\r\n dispatch(resendRegistrationPin(confirmToken, recaptchaToken))\r\n },\r\n })\r\n )\r\n }\r\n\r\n dispatch(hideLoader())\r\n }\r\n}\r\n\r\ninterface PhoneNumberAvailableArgs extends PhoneNumberAvailableParams {\r\n callback: () => void\r\n}\r\nexport const phoneNumberAvailable = ({\r\n callback,\r\n ...args\r\n}: PhoneNumberAvailableArgs) => {\r\n return async (\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n dispatch: ThunkDispatch,\r\n getState: () => AppState\r\n ) => {\r\n dispatch(showLoader())\r\n const result = await customerApi.phoneNumberAvailable(args)\r\n dispatch(hideLoader())\r\n\r\n if (hasErrorCode(result)) {\r\n dispatch(\r\n showPopup({\r\n ...getErrorPopupProps(result),\r\n handleAdditionalButtonClick: () =>\r\n dispatch(phoneNumberAvailable({ callback, ...args })),\r\n })\r\n )\r\n return false\r\n }\r\n if (!result.is) {\r\n dispatch(\r\n showPopup({\r\n title: i18n.t(Translations.ACCOUNT_ALREADY_EXISTS),\r\n description: i18n.t(Translations.PHONE_NUMBER_ALREADY_EXISTS),\r\n variant: 'error',\r\n })\r\n )\r\n return false\r\n }\r\n callback()\r\n }\r\n}\r\n","import { useSnackbar } from 'notistack'\r\nimport React, { useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { AppButton, AppStepper, FlexBox, PageHeading } from 'shared'\r\nimport CodeInput from 'shared/CodeInput'\r\nimport { resendRegistrationPin } from 'store/customer/thunks'\r\nimport { hideLoader, showLoader } from 'store/loader'\r\nimport { customerSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport Translations from 'utils/translations'\r\nimport HybridRecaptcha from '../../../shared/ReCaptcha/HybridRecaptcha';\r\nimport {validateFeature } from '../../../shared/ReCaptcha/HybridRecaptcha';\r\n\r\ninterface CodeStepProps {\r\n onSubmit: () => void\r\n confirmToken: string\r\n}\r\n\r\nconst CodeStep: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n const [codeValid, setCodeValid] = React.useState(false)\r\n const [pin, setPin] = React.useState('')\r\n const dispatch = useAppDispatch()\r\n const { enqueueSnackbar } = useSnackbar()\r\n\r\n const [recaptchaVerified, setRecaptchaVerified] = useState(false);\r\n const [recaptchaToken, setRecaptchaToken] = useState(null);\r\n const handleTokenReceived = (token: string) => {\r\n setRecaptchaToken(token);\r\n };\r\n\r\n const handleRecaptchaSuccess = () => {\r\n setRecaptchaVerified(true);\r\n };\r\n\r\n const handleRecaptchaFailure = () => {\r\n enqueueSnackbar(t(Translations.RECAPTCHA_VERIFICATION_FAILED), { variant: 'error' });\r\n setRecaptchaVerified(false);\r\n };\r\n\r\n const create = async () => {\r\n dispatch(showLoader())\r\n const promise = await dispatch(\r\n customerSlice.confirmRegister({\r\n confirmToken: props.confirmToken,\r\n pin,\r\n })\r\n )\r\n dispatch(hideLoader())\r\n if (customerSlice.confirmRegister.fulfilled.match(promise)) {\r\n props.onSubmit()\r\n } else {\r\n enqueueSnackbar(promise.payload.description)\r\n }\r\n }\r\n\r\n const resendCode = async () => {\r\n if (!recaptchaVerified) {\r\n enqueueSnackbar(t(Translations.PLEASE_COMPLETE_RECAPTCHA_VERIFICATION), { variant: 'warning' });\r\n return;\r\n }\r\n\r\n dispatch(showLoader())\r\n await dispatch(resendRegistrationPin(props.confirmToken, recaptchaToken))\r\n dispatch(hideLoader())\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t(Translations.CREATE)}\r\n \r\n \r\n {t(Translations.RESEND_CODE)}\r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default CodeStep\r\n","import { Form, Formik, FormikHandlers } from 'formik'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport paths from 'routing/paths'\r\nimport { AppButton, AppStepper, FlexBox, Input, PageHeading } from 'shared'\r\nimport PhoneNumberContainer from 'shared/sidebar/SignUpContainer'\r\nimport { phoneNumberAvailable } from 'store/customer/thunks'\r\nimport {\r\n countryCodeRegex,\r\n phoneNumberRegex,\r\n Translations,\r\n blurLastInput,\r\n} from 'utils'\r\nimport * as Yup from 'yup'\r\nimport { PersonalData } from './SignUp'\r\nimport NewPhoneNumberInput from 'shared/PhoneNumberAndCountryCodeInput'\r\n\r\ninterface PersonalDataStepProps {\r\n handleSubmit(): void\r\n personalData: PersonalData\r\n resetStep: () => void\r\n setPersonalData(data: PersonalData): void\r\n backToLogin: boolean\r\n}\r\n\r\nconst PersonalDataStep: React.FunctionComponent<\r\n PersonalDataStepProps\r\n> = props => {\r\n const { t } = useTranslation()\r\n const dispatch = useDispatch()\r\n const history = useHistory()\r\n const { enqueueSnackbar } = useSnackbar()\r\n React.useEffect(() => {\r\n props.resetStep()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n\r\n const SignupSchema = Yup.object().shape({\r\n firstName: Yup.string().required(t(Translations.FIRSTNAME_CANNOT_BE_EMPTY)),\r\n lastName: Yup.string().required(t(Translations.LASTNAME_CANNOT_BE_EMPTY)),\r\n email: Yup.string()\r\n .email(t(Translations.INVALID_EMAIL))\r\n .required(t(Translations.EMAIL_CANNOT_BE_EMPTY)),\r\n code: Yup.string().matches(\r\n countryCodeRegex,\r\n t(Translations.INVALID_COUNTRY_CODE)\r\n ),\r\n phoneNumber: Yup.string()\r\n .matches(phoneNumberRegex, t(Translations.INVALID_PHONE_NUMBER))\r\n .required(t(Translations.PHONE_CANNOT_BE_EMPTY)),\r\n })\r\n\r\n const customHandleBlur = (\r\n e: React.FocusEvent,\r\n handleBlur: FormikHandlers['handleBlur'],\r\n values: PersonalData\r\n ) => {\r\n handleBlur(e)\r\n props.setPersonalData(values)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {\r\n props.handleSubmit()\r\n }}\r\n validationSchema={SignupSchema}\r\n validateOnChange={false}\r\n validateOnBlur={false}\r\n >\r\n {({\r\n values,\r\n errors,\r\n handleChange,\r\n handleBlur,\r\n validateForm,\r\n submitForm,\r\n }) => {\r\n return (\r\n \r\n )\r\n }}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default PersonalDataStep\r\n","import * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n FlexBox,\r\n FullLayout,\r\n PaddingContainer,\r\n PageHeading,\r\n SharedIcon,\r\n} from 'shared'\r\nimport { CustomerTokens } from '../../../typedef/customer'\r\nimport Translations from '../../../utils/translations'\r\n\r\ninterface RegistrationCompleteProps {\r\n customer?: CustomerTokens\r\n onClick: () => void\r\n}\r\n\r\nconst RegistrationComplete: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t(Translations.OK)}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default RegistrationComplete\r\n","import React, { useState } from 'react';\r\nimport { unwrapResult } from '@reduxjs/toolkit';\r\nimport { Form, Formik } from 'formik';\r\nimport { useSnackbar } from 'notistack';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { AppButton, AppStepper, FlexBox, Input, PageHeading } from 'shared';\r\nimport { hideLoader, showLoader } from 'store/loader';\r\nimport { customerSlice } from 'store/slices';\r\nimport { useAppDispatch } from 'store/store';\r\nimport { Translations, blurLastInput } from 'utils';\r\nimport { passwordValidationShape } from '../validations';\r\nimport { PersonalData } from './SignUp';\r\nimport HybridRecaptcha from '../../../shared/ReCaptcha/HybridRecaptcha';\r\nimport {validateFeature } from '../../../shared/ReCaptcha/HybridRecaptcha';\r\n\r\n\r\ninterface SetPasswordStepProps {\r\n handleSubmit: (token: string, password: string) => void;\r\n personalData: PersonalData;\r\n goBack: () => void;\r\n}\r\n\r\nconst SetPasswordStep: React.FunctionComponent = props => {\r\n const { t } = useTranslation();\r\n const dispatch = useAppDispatch();\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n const [recaptchaVerified, setRecaptchaVerified] = useState(false);\r\n const [recaptchaToken, setRecaptchaToken] = useState(null);\r\n const handleTokenReceived = (token: string) => {\r\n setRecaptchaToken(token);\r\n };\r\n\r\n const handleRecaptchaSuccess = () => {\r\n setRecaptchaVerified(true);\r\n };\r\n\r\n const handleRecaptchaFailure = () => {\r\n enqueueSnackbar(t(Translations.RECAPTCHA_VERIFICATION_FAILED), { variant: 'error' });\r\n setRecaptchaVerified(false);\r\n };\r\n\r\n const handleSubmit = async ({ password }: { password: string }) => {\r\n if (!recaptchaVerified) {\r\n enqueueSnackbar(t(Translations.PLEASE_COMPLETE_RECAPTCHA_VERIFICATION), { variant: 'warning' });\r\n return;\r\n }\r\n\r\n const { firstName, lastName, phoneNumber, code, email } = props.personalData;\r\n dispatch(showLoader());\r\n const promise = await dispatch(\r\n customerSlice.register({\r\n firstName,\r\n lastName,\r\n phoneCountryCode: parseInt(code),\r\n phoneNumber,\r\n email,\r\n password,\r\n recaptchaToken\r\n })\r\n );\r\n dispatch(hideLoader());\r\n if (customerSlice.register.fulfilled.match(promise)) {\r\n const res = unwrapResult(promise);\r\n props.handleSubmit(res.confirmToken, password);\r\n } else {\r\n enqueueSnackbar(promise.payload.description, { variant: 'error' });\r\n }\r\n };\r\n\r\n return (\r\n <> \r\n \r\n \r\n \r\n\r\n \r\n {({ values, errors, handleChange, handleBlur, validateForm, submitForm, isSubmitting }) => (\r\n \r\n )}\r\n \r\n >\r\n );\r\n};\r\n\r\nexport default SetPasswordStep;","import { useChangeLayout, usePushToApp } from 'hooks'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { Route, Switch, useHistory } from 'react-router'\r\nimport { ConditionalRoute } from 'routing'\r\nimport paths from 'routing/paths'\r\nimport { AppButton, FlexBox, PaddingContainer } from 'shared'\r\nimport PageDialog from 'shared/PageDialog'\r\nimport { showTerms } from 'store/globalPopup/actions'\r\nimport { termsSlice } from 'store/slices'\r\nimport { actions } from 'store/slices/customerSlice'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { UserRole } from 'typedef'\r\nimport { TermsType } from 'typedef/terms'\r\nimport Translations from '../../../utils/translations'\r\nimport CodeStep from './CodeStep'\r\nimport PersonalDataStep from './PersonalDataStep'\r\nimport RegistrationComplete from './RegistrationComplete'\r\nimport SetPasswordStep from './SetPasswordStep'\r\n\r\nexport interface PersonalData {\r\n firstName: string\r\n lastName: string\r\n code: string\r\n phoneNumber: string\r\n email: string\r\n}\r\nconst SignUp = () => {\r\n const { t } = useTranslation()\r\n const [showSuccess, setShowSuccess] = React.useState(false)\r\n const [completeStep, setCompleteStep] = React.useState(0)\r\n const [personalData, setPersonalData] = React.useState({\r\n firstName: '',\r\n lastName: '',\r\n code: '',\r\n phoneNumber: '',\r\n email: '',\r\n })\r\n const [confirmToken, setConfirmToken] = React.useState('')\r\n const dispatch = useAppDispatch()\r\n const { push } = useHistory()\r\n const pushToApp = usePushToApp()\r\n useChangeLayout()\r\n\r\n React.useEffect(() => {\r\n if (completeStep === 1) {\r\n push(paths.auth.setPassword)\r\n }\r\n if (completeStep === 2) {\r\n push(paths.auth.code)\r\n }\r\n }, [completeStep, push])\r\n\r\n const submitPassword = (token: string) => {\r\n setConfirmToken(token)\r\n setCompleteStep(2)\r\n }\r\n const submitCode = () => {\r\n setShowSuccess(true)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n <>\r\n setCompleteStep(0)}\r\n handleSubmit={() => setCompleteStep(1)}\r\n backToLogin={true}\r\n />\r\n \r\n {\r\n dispatch(\r\n termsSlice.getTerms({\r\n type: TermsType.Login,\r\n })\r\n )\r\n dispatch(showTerms())\r\n }}\r\n >\r\n {t(Translations.TERMS_AND_CONDITIONS)}\r\n \r\n \r\n >\r\n \r\n \r\n push(paths.auth.signUp)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n pushToApp()\r\n dispatch(actions.setRole(UserRole.User))\r\n }}\r\n />\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default SignUp\r\n","import { useChangeLayout } from 'hooks'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { Route, Switch, useHistory } from 'react-router'\r\nimport { useParams } from 'react-router-dom'\r\nimport { ConditionalRoute } from 'routing'\r\nimport paths from 'routing/paths'\r\nimport { AppButton, FlexBox, PaddingContainer } from 'shared'\r\nimport PageDialog from 'shared/PageDialog'\r\nimport { showTerms } from 'store/globalPopup/actions'\r\nimport { termsSlice } from 'store/slices'\r\nimport { actions } from 'store/slices/customerSlice'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { UserRole } from 'typedef'\r\nimport { TermsType } from 'typedef/terms'\r\nimport Translations from '../../../utils/translations'\r\nimport CodeStep from './CodeStep'\r\nimport PersonalDataStep from './PersonalDataStep'\r\nimport RegistrationComplete from './RegistrationComplete'\r\nimport SetPasswordStep from './SetPasswordStep'\r\nimport { ThemeProvider } from '@mui/material/styles'\r\nimport { whiteTheme } from 'themes'\r\nimport { PersonalData } from './SignUp'\r\n\r\nexport const SignUpRedirect = () => {\r\n const { t } = useTranslation()\r\n const [showSuccess, setShowSuccess] = React.useState(false)\r\n const [completeStep, setCompleteStep] = React.useState(0)\r\n const [personalData, setPersonalData] = React.useState({\r\n firstName: '',\r\n lastName: '',\r\n code: '',\r\n phoneNumber: '',\r\n email: '',\r\n })\r\n const [confirmToken, setConfirmToken] = React.useState('')\r\n const dispatch = useAppDispatch()\r\n const { push } = useHistory()\r\n const { carId } = useParams<{ carId: string }>()\r\n useChangeLayout()\r\n\r\n React.useEffect(() => {\r\n if (completeStep === 1) {\r\n push(`${paths.parking.signUp}/${carId}/set-password`)\r\n }\r\n if (completeStep === 2) {\r\n push(`${paths.parking.signUp}/${carId}/code`)\r\n }\r\n }, [completeStep, push, carId])\r\n\r\n const submitPassword = (token: string) => {\r\n setConfirmToken(token)\r\n setCompleteStep(2)\r\n }\r\n const submitCode = () => {\r\n setShowSuccess(true)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n <>\r\n setCompleteStep(0)}\r\n handleSubmit={() => setCompleteStep(1)}\r\n backToLogin={false}\r\n />\r\n \r\n {\r\n dispatch(\r\n termsSlice.getTerms({\r\n type: TermsType.Login,\r\n })\r\n )\r\n dispatch(showTerms())\r\n }}\r\n >\r\n {t(Translations.TERMS_AND_CONDITIONS)}\r\n \r\n \r\n >\r\n \r\n \r\n push(`${paths.parking.signUp}/${carId}`)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n dispatch(actions.setRole(UserRole.User))\r\n push(`${paths.parking.login}/${carId}`)\r\n }}\r\n />\r\n \r\n \r\n >\r\n )\r\n}\r\n","import { Form, Formik } from 'formik'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { AppButton, FlexBox } from 'shared'\r\nimport { FindCarPayload } from 'typedef/customer'\r\nimport * as Yup from 'yup'\r\nimport { Input } from '../../shared/Input'\r\nimport { licencePlateRegex } from '../../utils/regex'\r\nimport Translations from '../../utils/translations'\r\n\r\ninterface FindCarsProps {\r\n findCar: (args: FindCarPayload) => void\r\n disabled?: boolean\r\n}\r\n\r\nexport const FindCarsForm: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n const { enqueueSnackbar } = useSnackbar()\r\n const FindCarSchema = Yup.object().shape({\r\n plate: Yup.string()\r\n .required(t(Translations.INVALID_LICENCE_PLATE))\r\n .matches(licencePlateRegex, t(Translations.INVALID_LICENCE_PLATE)),\r\n ccLast4Digits: Yup.number()\r\n .typeError(t(Translations.INVALID_CARD_NUMBER))\r\n .required(t(Translations.INVALID_CARD_NUMBER))\r\n .test('len', t(Translations.INVALID_CARD_NUMBER), val => {\r\n return val?.toString().length === 4\r\n }),\r\n })\r\n\r\n return (\r\n {\r\n props.findCar({\r\n plate: values.plate.replace(/\\s/g, ''),\r\n ccLast4Digits: values.ccLast4Digits,\r\n })\r\n }}\r\n validationSchema={FindCarSchema}\r\n validateOnMount={false}\r\n validateOnChange={false}\r\n >\r\n {({\r\n values,\r\n errors,\r\n handleChange,\r\n handleBlur,\r\n validateForm,\r\n submitForm,\r\n }) => (\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default FindCarsForm\r\n","import { unwrapResult } from '@reduxjs/toolkit'\r\nimport { useSnackbar } from 'notistack'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { batch, useSelector } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport { customerSlice, mapSlice, ticketsSlice } from 'store/slices'\r\nimport { useAppDispatch } from 'store/store'\r\nimport { UserRole } from 'typedef/customer'\r\nimport { FindCarPayload } from 'typedef/customer'\r\nimport Translations from '../../utils/translations'\r\nimport { FindCarsForm } from './FindCarsForm'\r\ninterface FindCarsContainerProps {}\r\n\r\nexport const FindCarsContainer: React.FunctionComponent<\r\n FindCarsContainerProps\r\n> = props => {\r\n const { t } = useTranslation()\r\n const { push } = useHistory()\r\n const { auth } = useSelector(customerSlice.stateSelectors).tokens\r\n const { enqueueSnackbar } = useSnackbar()\r\n const dispatch = useAppDispatch()\r\n const { pending } = useSelector(\r\n customerSlice.promiseStatusSelectors\r\n ).findCarStatus\r\n\r\n const findCar = React.useCallback(\r\n async (arg: FindCarPayload) => {\r\n const promise = await dispatch(customerSlice.findCar(arg))\r\n if (customerSlice.findCar.fulfilled.match(promise)) {\r\n const { ticket, tokens } = unwrapResult(promise)\r\n batch(async () => {\r\n if (tokens.auth !== auth) {\r\n dispatch(\r\n customerSlice.actions.setLogin({\r\n role: UserRole.Guest,\r\n tokens,\r\n })\r\n )\r\n dispatch(ticketsSlice.getTickets())\r\n }\r\n dispatch(\r\n mapSlice.actions.selectLot({\r\n lotId: ticket.lot.lotId,\r\n position: true,\r\n })\r\n )\r\n dispatch(mapSlice.getLotDetailsMap({ lotId: ticket.lot.lotId }))\r\n dispatch(mapSlice.actions.foundParkedCar({ lotId: ticket.lot.lotId }))\r\n push(paths.home.map)\r\n })\r\n } else {\r\n enqueueSnackbar(t(Translations.NO_PARKED_CARS))\r\n }\r\n },\r\n [auth, dispatch, enqueueSnackbar, push, t]\r\n )\r\n\r\n return \r\n}\r\n\r\nexport default FindCarsContainer\r\n","import { useChangeLayout } from 'hooks'\r\nimport * as React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useSelector } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { paths } from 'routing'\r\nimport {\r\n AppSnackBarProvider,\r\n AppSpinner,\r\n Placeholder,\r\n SharedIcon,\r\n WhiteBoxContainer,\r\n} from 'shared'\r\nimport { customerSlice } from 'store/slices'\r\nimport Translations from '../../utils/translations'\r\nimport { FindCarsContainer } from './FindCarsContainer'\r\ninterface FindCarViewProps {}\r\n\r\nexport const FindCarView: React.FunctionComponent = props => {\r\n const { t } = useTranslation()\r\n const title = t(Translations.FIND_CAR)\r\n const { push } = useHistory()\r\n const { pending } = useSelector(\r\n customerSlice.promiseStatusSelectors\r\n ).findCarStatus\r\n useChangeLayout(\r\n {\r\n topbar: {\r\n title,\r\n onClickBack: () => push(paths.home.map),\r\n },\r\n },\r\n 'app'\r\n )\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default FindCarView\r\n","import { Fade, Grid, Modal } from '@mui/material'\r\nimport { MobileDatePicker, MobileTimePicker } from '@mui/lab'\r\nimport { makeStyles } from '@mui/styles'\r\nimport moment, { Moment } from 'moment'\r\nimport React from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n AppButton,\r\n AppSpinner,\r\n AppTextField,\r\n FlexBox,\r\n WhiteBoxContainer,\r\n} from 'shared'\r\nimport AppTypography from 'shared/AppTypography'\r\nimport Translations from 'utils/translations'\r\n\r\nexport interface ParkingRatesModalProps {\r\n open: boolean\r\n loader?: boolean\r\n handleCalculate?: (entryDate?: string, exitDate?: string) => void\r\n handleClose?: () => void\r\n cleanup?: () => void\r\n title?: string\r\n}\r\n\r\nconst useStyles = makeStyles({\r\n modal: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n})\r\n\r\nexport const ParkingRatesModal: React.FC = props => {\r\n const { t } = useTranslation()\r\n const classes = useStyles()\r\n const [initDate, setInitDate] = React.useState(moment())\r\n const [entryDate, setEntryDate] = React.useState(moment())\r\n const [exitDate, setExitDate] = React.useState(moment())\r\n const onChangeEntryDate = (date: Moment | null) => {\r\n const entry = date.second(0)\r\n const exit = moment(exitDate)\r\n if (entry >= exit) {\r\n setEntryDate(exit.subtract(10, 'minutes'))\r\n } else {\r\n setEntryDate(entry)\r\n }\r\n }\r\n const onChangeExitDate = (date: Moment | null) => {\r\n const exit = date.second(0)\r\n const entry = moment(entryDate)\r\n if (exit <= entry) {\r\n setExitDate(entry.add(10, 'minutes'))\r\n } else {\r\n setExitDate(exit)\r\n }\r\n }\r\n\r\n const setInitDates = () => {\r\n const startDate = moment().second(0)\r\n const roundToFive = 5 - (startDate.minute() % 5)\r\n startDate.add(roundToFive, 'minute')\r\n setInitDate(startDate)\r\n setEntryDate(startDate)\r\n setExitDate(startDate.add(30, 'minute'))\r\n }\r\n\r\n const maxEntryTime = () => {\r\n if (moment(entryDate, true).isSame(exitDate, 'day')) {\r\n return moment(exitDate).subtract(10, 'minutes')\r\n } else {\r\n return moment(entryDate).endOf('day')\r\n }\r\n }\r\n const minExitTime = () => {\r\n if (moment(entryDate).isSame(exitDate, 'day')) {\r\n return moment(entryDate).add(10, 'minutes')\r\n } else {\r\n return moment(exitDate).startOf('day')\r\n }\r\n }\r\n const setDefaultDuration = (hours: number) => {\r\n const exit = moment(initDate).add(hours, 'hours')\r\n setEntryDate(initDate)\r\n setExitDate(exit)\r\n props.handleCalculate(initDate.toString(), exit.toString())\r\n }\r\n const cleanup = () => {\r\n setInitDates()\r\n props.cleanup()\r\n }\r\n React.useEffect(() => {\r\n cleanup()\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n \r\n