{"version":3,"sources":["stage.config.tsx","types/index.ts","global.config.tsx","components/Auth/index.tsx","components/Auth/Shared.tsx","components/Auth/ConfirmSignIn.tsx","components/Auth/SignInForm.tsx","images/bg.svg","components/Auth/ConfirmSignUp.tsx","components/Auth/ForgotPassword.tsx","components/Auth/ForgotPasswordSubmit.tsx","components/Auth/RequireNewPassword.tsx","Root.tsx","serviceWorker.ts","index.tsx","components/Spinner.tsx","lib/utils.ts","lib/userContext.ts","lib/cleanTypenameLink.ts","components/AnchorLink.tsx"],"names":["config","commission","supportEmail","analyticsUrl","supportedLanguages","supportFormUrl","termsOfServiceDoc","production","region","graphqlEndpoint","identityPoolId","userPoolId","userPoolWebClientId","serviceBucket","adminBucket","paymentPagePreviewUrl","hostedPaymentDomain","dashboardUrl","moneiApi","pibisiAccountId","AuthState","MfaType","EventType","AccountKeysUpdate","SubscriptionKeysUpdate","acquirers","paymentMethodsEnum","moment","locale","setLocale","mixed","defined","required","default","oneOf","notType","type","string","email","url","min","max","length","trim","lowercase","uppercase","matches","number","lessThan","moreThan","positive","negative","integer","date","array","boolean","setDefaultIndicator","LoadingOutlined","style","fontSize","spin","top","Cmp","Extra","styled","div","Description","p","ConfirmSignIn","withFormik","validationSchema","yup","shape","code","mapPropsToValues","remember","handleSubmit","a","props","setErrors","setSubmitting","Auth","confirmSignIn","currentUser","mfaType","rememberDevice","currentAuthenticatedUser","setState","authState","signedIn","message","isSubmitting","mfaDestination","password","resendCode","e","preventDefault","signIn","title","extra","AnchorLink","onClick","SMS_MFA","name","size","autoFocus","autoComplete","prefix","placeholder","block","loading","htmlType","schema","SignInForm","user","challengeName","requireNewPassword","challengeParam","CODE_DELIVERY_DESTINATION","confirmSignUp","values","Password","forgotPassword","ConfirmSignUp","resendSignUp","disabled","ForgotPassword","forgotPasswordSubmit","ForgotPasswordSubmit","passwordConfirm","RequireNewPassword","completeNewPassword","requiredAttributes","Container","bg","Content","Logo","img","initialState","init","allowedActions","signUp","LazyApp","lazyWithPreload","withAuthenticator","useState","state","setAuthState","window","history","pushState","location","pathname","handleSignOut","signOut","useEffect","directSignIn","checkAuth","error","directConfirmation","success","bypassCache","qs","parse","search","action","includes","directAuthState","preload","then","console","log","Spinner","fallback","Provider","value","onSignOut","setCurrentUser","userEmail","attributes","userName","userPhone","phone_number","userId","sub","termsOfServiceUrl","termsOfServiceAcceptedAt","accessLevel","getSignInUserSession","getIdToken","payload","getAccessLevel","src","renderAuthView","Boolean","hostname","match","configure","Storage","AWSS3","bucket","ReactDOM","render","Root","document","getElementById","navigator","serviceWorker","ready","registration","unregister","Wrapper","inline","delay","enumKeys","Object","keys","getIncrease","first","second","ratio","factory","Component","React","lazy","isUndefined","variable","capitalize","s","charAt","toUpperCase","slice","downloadFile","element","createElement","setAttribute","display","body","appendChild","click","removeChild","isObject","object","pick","obj","result","forEach","key","undefined","omit","ms","Promise","resolve","setTimeout","nullify","o","reduce","Array","isArray","map","toCents","amount","round","multiply","fromCents","divide","amountToInt","Big","times","toNumber","amountFromInt","unique","from","Set","arrayIncludesSome","some","parseJSON","JSON","isDefined","options","allowZero","allowEmptyString","isQrPayment","charge","paymentMethod","orderId","startsWith","getChangedKeys","obj1","obj2","dotObj1","dot","dotObj2","concat","filter","stringify","dateFormat","dateTime","localizedShort","truncate","str","substring","normalizePhone","phone","countryCode","parsePhoneNumberFromString","format","prettifyEvent","event","omitDeep","changed","clamp","Math","sortObjectKeysByValue","sort","b","localeCompare","acc","UserContext","createContext","newObj","i","val","omitDeepArrayWalk","arr","cleanTypenameLink","ApolloLink","operation","forward","variables","data","Link","externalRegex","href","external","test","target","rel"],"mappings":"mLAiDaA,EAAM,2BA7CE,CACnBC,WAAY,KACZC,aAAc,oBACdC,aACE,gGACFC,mBAAoB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MACzDC,eAAgB,4CAChBC,kBAAmB,qCAoBb,CACJC,YAAY,EACZC,OAAQ,YACRC,gBACE,iFACFC,eAAgB,iDAChBC,WAAY,sBACZC,oBAA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A4B,OAARA,EACxBb,EAASa,EAAK3E,GAEd2E,MAIXF,EAGF,SAASG,EAAkBC,EAAY7E,GAC5C,OAAO6E,EAAIjE,KAAI,SAAC+D,GACd,OAAIjE,MAAMC,QAAQgE,GACTC,EAAkBD,EAAK3E,GACN,kBAAR2E,EAAyBb,EAASa,EAAK3E,GAClD2E,KAzBX,oEAgCO,IAAMG,EAAoB,IAhCjC,OAgCqCC,IAAW,SAACC,EAAWC,GAI1D,OAHID,EAAUE,YACZF,EAAUE,UAAYpB,EAASkB,EAAUE,UAAW,eAE/CD,EAASD,GAAWpE,KAAI,SAACuE,GAAD,OAAUA,S,wJC5BrCC,EAAO3Q,IAAOa,EAAV,oDACU,SAACC,GAAD,OAAYA,EAAM+C,SAAW,OAAS,UAGpD+M,EAAgB,wBAETxO,EAA+E,SAAC,GAKtF,IAAD,IAJJyO,YAII,MAJG,IAIH,EAHJxO,EAGI,EAHJA,QACAyO,EAEI,EAFJA,SACGhQ,EACC,iBACJ,OAAIgQ,GAAYF,EAAcG,KAAKF,GAE/B,cAACF,EAAD,aACEK,OAAO,SACPC,IAAI,sBACJJ,KAAMA,EACN,gBAAe/P,EAAM+C,UACjB/C,IAKR,cAAC6P,EAAD,yBACEE,KAAMA,EACN,gBAAe/P,EAAM+C,UACjB/C,GAHN,IAIEuB,QAAS,SAACN,GACRA,EAAEC,iBACK,OAAPK,QAAO,IAAPA,KAAUN,S","file":"static/js/main.aaa4eb2f.chunk.js","sourcesContent":["type Stage = 'dev' | 'prod';\n\nconst stage = (process.env.REACT_APP_STAGE as Stage) || 'dev';\n\nconst globalConfig = {\n commission: 0.005,\n supportEmail: 'support@monei.com',\n analyticsUrl:\n 'https://eu-west-1.quicksight.aws.amazon.com/sn/start/analyses?directory_alias=monei-analytics',\n supportedLanguages: ['en', 'es', 'ca', 'pt', 'de', 'it', 'fr'],\n supportFormUrl: 'https://support.monei.com/hc/requests/new',\n termsOfServiceDoc: 'terms-of-service-partners-v1.pdf'\n};\n\nconst stageConfig = {\n dev: {\n production: false,\n region: 'eu-west-1',\n graphqlEndpoint:\n 'https://coeoe6nwznf23iffkkwxp72de4.appsync-api.eu-west-1.amazonaws.com/graphql',\n identityPoolId: 'eu-west-1:dfc71716-b3a8-46ec-8df3-bc7eb6999d11',\n userPoolId: 'eu-west-1_dqCMR7cXU',\n userPoolWebClientId: '6qmb8f8f2h8n5lsbo3gl3sv47b',\n serviceBucket: 'monei-dev-service-bucket',\n adminBucket: 'monei-dev-admin-bucket',\n paymentPagePreviewUrl: 'https://mo-js.microapps-staging.com/v2/payment-page/',\n hostedPaymentDomain: 'secure.microapps-staging.com',\n dashboardUrl: 'https://mo.microapps-staging.com',\n moneiApi: 'https://api.microapps-staging.com/v1',\n pibisiAccountId: 'efe79099-e3ee-43d4-a753-f207f9e41d62'\n },\n prod: {\n production: true,\n region: 'eu-west-1',\n graphqlEndpoint:\n 'https://maoisnzcbfdfxehmcqhdl3othq.appsync-api.eu-west-1.amazonaws.com/graphql',\n identityPoolId: 'eu-west-1:583131ef-0993-496f-8bee-3e83f775d2bf',\n userPoolId: 'eu-west-1_zG8t1XwNT',\n userPoolWebClientId: '6j4l7oa6e9uouu3rlt2av8pofp',\n serviceBucket: 'monei-prod-service-bucket',\n adminBucket: 'monei-prod-admin-bucket',\n paymentPagePreviewUrl: 'https://js.monei.com/v2/payment-page/',\n hostedPaymentDomain: 'secure.monei.com',\n dashboardUrl: 'https://dashboard.monei.com',\n moneiApi: 'https://api.monei.com/v1',\n pibisiAccountId: 'efe79099-e3ee-43d4-a753-f207f9e41d62'\n }\n};\n\nexport const config = {...globalConfig, ...stageConfig[stage]};\n","import {CognitoUser} from 'amazon-cognito-identity-js';\nimport {RcFile} from 'antd/lib/upload/interface';\nimport {FetchResult} from 'apollo-link';\n\nexport interface IUser extends CognitoUser {\n attributes: {\n 'custom:account_id': string;\n 'custom:tos_doc': string;\n 'custom:tos_accepted_at': string;\n email: string;\n name?: string;\n email_verified: boolean;\n phone_number: string;\n phone_number_verified: boolean;\n\n sub: string;\n };\n [key: string]: any;\n}\n\nexport interface IS3Object {\n bucket: string;\n region: string;\n key: string;\n mimeType: string;\n localUri: File | RcFile;\n}\n\nexport type MutateFunction = (\n variables: MutationVariables\n) => Promise>;\n\nexport enum AuthState {\n signIn = 'signIn',\n signUp = 'signUp',\n signedIn = 'signedIn',\n confirmSignUp = 'confirmSignUp',\n confirmSignIn = 'confirmSignIn',\n forgotPassword = 'forgotPassword',\n forgotPasswordSubmit = 'forgotPasswordSubmit',\n requireNewPassword = 'requireNewPassword',\n init = 'init'\n}\n\nexport enum MfaType {\n SMS_MFA = 'SMS_MFA',\n SOFTWARE_TOKEN_MFA = 'SOFTWARE_TOKEN_MFA'\n}\n\nexport type IAuthState = {\n authState: AuthState;\n currentUser?: IUser;\n email?: string;\n code?: string;\n password?: string;\n mfaDestination?: string;\n mfaType?: MfaType;\n amazonCustomerId?: string;\n referralCode?: string;\n skipNewsletter?: boolean;\n};\n\nexport interface IAuthQueryParams {\n email?: string;\n password?: string;\n code?: string;\n action?: string;\n amazonCustomerId?: string;\n status?: string;\n}\n\nexport interface IAuthProps extends IAuthState {\n setState(state: IAuthState): void;\n}\n\nexport enum EventType {\n CHARGE_PENDING = 'charge.pending',\n CHARGE_PENDING_PROCESSING = 'charge.pending_processing',\n CHARGE_UPDATED = 'charge.updated',\n CHARGE_AUTHORIZED = 'charge.authorized',\n CHARGE_REFUNDED = 'charge.refunded',\n CHARGE_PARTIALLY_REFUNDED = 'charge.partially_refunded',\n CHARGE_CAPTURED = 'charge.captured',\n CHARGE_CANCELED = 'charge.canceled',\n CHARGE_SUCCEEDED = 'charge.succeeded',\n CHARGE_FAILED = 'charge.failed',\n CHARGE_EXPIRED = 'charge.expired',\n CHARGE_CHARGEBACK = 'charge.chargeback',\n CHARGE_PAID_OUT = 'charge.paid_out',\n CAPTURE_PENDING = 'capture.pending',\n CAPTURE_SUCCEEDED = 'capture.succeeded',\n CAPTURE_FAILED = 'capture.failed',\n CHECKOUT_PENDING = 'checkout.pending',\n CHECKOUT_PENDING_PROCESSING = 'checkout.pending_processing',\n CHECKOUT_SUCCEEDED = 'checkout.succeeded',\n CHECKOUT_FAILED = 'checkout.failed',\n CHECKOUT_EXPIRED = 'checkout.expired',\n REFUND_PENDING = 'refund.pending',\n REFUND_SUCCEEDED = 'refund.succeeded',\n REFUND_FAILED = 'refund.failed',\n CANCEL_PENDING = 'cancel.pending',\n CANCEL_SUCCEEDED = 'cancel.succeeded',\n CANCEL_FAILED = 'cancel.failed',\n PENDING_PROCESSING = 'pending.processing',\n SETTLEMENT_COMPLETED = 'settlement.completed',\n SETTLEMENT_PENDING = 'settlement.pending',\n SETTLEMENT_SUSPENDED = 'settlement.suspended',\n ACCOUNT_PENDING = 'account.pending',\n ACCOUNT_BUSINESS_VERIFIED = 'account.business_verified',\n ACCOUNT_REPRESENTATIVE_VERIFIED = 'account.representative_verified',\n ACCOUNT_APPROVAL_REQUESTED = 'account.approval_requested',\n ACCOUNT_REVIEW_REQUESTED = 'account.review_requested',\n ACCOUNT_APPROVED = 'account.approved',\n ACCOUNT_REJECTED = 'account.rejected',\n ACCOUNT_SUSPENDED = 'account.suspended',\n ACCOUNT_ACTIVATED = 'account.activated',\n ACCOUNT_PAYOUTS_SUSPENDED = 'account.payouts_suspended',\n ACCOUNT_PAYOUTS_RESUMED = 'account.payouts_resumed',\n ACCOUNT_DATA_REQUESTED = 'account.data_requested',\n ACCOUNT_DELETED = 'account.deleted',\n ACCOUNT_DATA_UPDATED = 'account.data_updated',\n ACCOUNT_IBAN_UPDATED = 'account.iban_updated',\n ACCOUNT_PAYOUT_IBAN_UPDATED = 'account.payout_iban_updated',\n ACCOUNT_NOTE_UPDATED = 'account.note_updated',\n ACCOUNT_PLAN_UPDATED = 'account.plan_updated',\n ACCOUNT_BILLING_UPDATED = 'account.billing_updated',\n ACCOUNT_REVIEW_CONFIRMED = 'account.review_confirmed',\n ACCOUNT_CHURNED = 'account.churned',\n ACCOUNT_CHURN_REASON_UPDATED = 'account.churn_reason_updated',\n ACCOUNT_REACTIVATED = 'account.reactivated',\n ACCOUNT_BLOCKED = 'account.blocked',\n ACCOUNT_UNBLOCKED = 'account.unblocked',\n ACCOUNT_REFUNDS_ENABLED = 'account.refunds_enabled',\n ACCOUNT_REFUNDS_DISABLED = 'account.refunds_disabled',\n ACCOUNT_PAYOUT_TERMS_UPDATED = 'account.payout_terms_updated',\n ACCOUNT_TOKENIZATION_METHOD_ENABLED = 'account.tokenization_method_enabled',\n ACCOUNT_TOKENIZATION_METHOD_DISABLED = 'account.tokenization_method_disabled',\n ACCOUNT_RISK_PROFILE_UPDATED = 'account.risk_profile_updated',\n ACCOUNT_RISK_CHECK_COMPLETED = 'account.risk_check_completed',\n ACCOUNT_BANK_ACCOUNT_VERIFIED = 'account.bank_account_verified',\n ACCOUNT_PIBISI_VERIFIED = 'account.pibisi_verified',\n ACCOUNT_PIBISI_UNDER_REVIEW = 'account.pibisi_under_review',\n ACCOUNT_PIBISI_REJECTED = 'account.pibisi_rejected',\n ACCOUNT_TAGS_UPDATED = 'account.tags_updated',\n ACCOUNT_EXECUTIVE_ASSIGNED = 'account.executive_assigned',\n ACCOUNT_UPSELL = 'account.upsell',\n DOCUMENT_PENDING = 'document.pending',\n DOCUMENT_PROCESSING = 'document.processing',\n DOCUMENT_APPROVAL_REQUIRED = 'document.approval_required',\n DOCUMENT_APPROVED = 'document.approved',\n DOCUMENT_REJECTED = 'document.rejected',\n DOCUMENT_EXPIRED = 'document.expired',\n DOCUMENT_NOTE_UPDATED = 'document.note_updated',\n SUBSCRIPTION_PENDING = 'subscription.pending',\n SUBSCRIPTION_EXPIRED = 'subscription.expired',\n SUBSCRIPTION_TRIALING = 'subscription.trialing',\n SUBSCRIPTION_ACTIVATED = 'subscription.activated',\n SUBSCRIPTION_CANCELED = 'subscription.canceled',\n SUBSCRIPTION_PAUSED = 'subscription.paused',\n SUBSCRIPTION_PAST_DUE = 'subscription.past_due',\n SUBSCRIPTION_UPDATED = 'subscription.updated',\n PROVIDER_CREATED = 'provider.created',\n PROVIDER_UPDATED = 'provider.updated',\n PROVIDER_ENABLED = 'provider.enabled',\n PROVIDER_DISABLED = 'provider.disabled',\n ACCOUNT_INVOICE_PAID = 'account_invoice.paid',\n ACCOUNT_INVOICE_UNPAID = 'account_invoice.unpaid',\n ACCOUNT_INVOICE_PENDING = 'account_invoice.pending',\n ACCOUNT_INVOICE_PAST_DUE = 'account_invoice.past_due'\n}\n\nexport enum AccountKeysUpdate {\n ACQUIRER = 'acquirer',\n ACTIVATEDAT = 'activatedAt',\n ADMINEMAIL = 'adminEmail',\n APPROVALREQUESTEDAT = 'approvalRequestedAt',\n APPROVEDAT = 'approvedAt',\n BILLINGPLAN = 'billingPlan',\n BRANDING = 'branding',\n BUSINESS_ADDRESS_CITY = 'business.address.city',\n BUSINESS_ADDRESS_COUNTRY = 'business.address.country',\n BUSINESS_ADDRESS_LINE1 = 'business.address.line1',\n BUSINESS_ADDRESS_LINE2 = 'business.address.line2',\n BUSINESS_ADDRESS_STATE = 'business.address.state',\n BUSINESS_ADDRESS_ZIP = 'business.address.zip',\n BUSINESS_CAPITAL = 'business.capital',\n BUSINESS_COMPANYNAME = 'business.companyName',\n BUSINESS_CONFIRMSERVICESDESCRIPTION = 'business.confirmServicesDescription',\n BUSINESS_CONFIRMWEBSITE = 'business.confirmWebsite',\n BUSINESS_COUNTRY = 'business.country',\n BUSINESS_CREATIONDATE = 'business.creationDate',\n BUSINESS_DOCUMENTNUMBER = 'business.documentNumber',\n BUSINESS_EMAIL = 'business.email',\n BUSINESS_INDUSTRY = 'business.industry',\n BUSINESS_LASTUPDATEDATE = 'business.lastUpdateDate',\n BUSINESS_LEGALADDRESS = 'business.legalAddress',\n BUSINESS_LEGALDESCRIPTION = 'business.legalDescription',\n BUSINESS_LEGALFORM = 'business.legalForm',\n BUSINESS_LEGALNAME = 'business.legalName',\n BUSINESS_MCC = 'business.mcc',\n BUSINESS_MONTHLYVOLUME = 'business.monthlyVolume',\n BUSINESS_PHONE = 'business.phone',\n BUSINESS_POSITIONS = 'business.positions',\n BUSINESS_PREVIOUSNAMES = 'business.previousNames',\n BUSINESS_REGISTRYRECORDS = 'business.registryRecords',\n BUSINESS_RISKLABELS = 'business.riskLabels',\n BUSINESS_SERVICESDESCRIPTION = 'business.servicesDescription',\n BUSINESS_STARTACTIVITYDATE = 'business.startActivityDate',\n BUSINESS_STATUS = 'business.status',\n BUSINESS_VERIFICATIONATTEMPTS = 'business.verificationAttempts',\n BUSINESS_WEBSITE = 'business.website',\n RISK_PROFILE = 'riskProfile',\n RISK_PROFILE_NOTE = 'riskProfileNote',\n RISK_IGNORED_KEYWORDS = 'riskIgnoredKeywords',\n CHURN_REASON = 'churnReason',\n CHURN_REASON_OPTION = 'churnReasonOption',\n CHURN_NOTE = 'churnNote',\n USER_NOTE = 'userNote',\n BLOCKED = 'blocked',\n STATUS_REASON = 'statusReason',\n STATUS_NOTE = 'statusNote',\n CONTRACT = 'contract',\n CREATEDAT = 'createdAt',\n CUSTOMDOMAIN = 'customDomain',\n DATAUPDATEDAT = 'dataUpdatedAt',\n DEFAULTCURRENCY = 'defaultCurrency',\n DEFAULTTRANSACTIONTYPE = 'defaultTransactionType',\n DELETEDAT = 'deletedAt',\n DYNAMICBILLING = 'dynamicBilling',\n FEES_DAILYEXTRASEATSFEE = 'fees.dailyExtraSeatsFee',\n FEES_WEEKLYCUSTOMDOMAINFEE = 'fees.weeklyCustomDomainFee',\n FEES_DAILYPLATFORMFEE = 'fees.dailyPlatformFee',\n FEES_EXTRA = 'fees.extra',\n FEES_HIGHRISKFEE = 'fees.highRiskFee',\n FEES_STEPS = 'fees.steps',\n IBAN = 'iban',\n ID = 'id',\n NAME = 'name',\n NOTE = 'note',\n TAGS = 'tags',\n NOTIFICATIONS_EMAILCUSTOMERONREFUND = 'notifications.emailCustomerOnRefund',\n NOTIFICATIONS_EMAILCUSTOMERONSUCCESS = 'notifications.emailCustomerOnSuccess',\n NOTIFICATIONS_EMAILADMINONSUCCESS = 'notifications.emailAdminOnSuccess',\n PARTNER = 'partner',\n PAYOUTTERMS_FIRSTPERIOD = 'payoutTerms.firstPeriod',\n PAYOUTTERMS_IBAN = 'payoutTerms.iban',\n PAYOUTTERMS_PERIOD = 'payoutTerms.period',\n PAYOUTTERMS_RESERVEPERCENT = 'payoutTerms.reservePercent',\n PAYOUTTERMS_SUSPENDED = 'payoutTerms.suspended',\n PROMOCODE = 'promoCode',\n PUBLICBUSINESSDETAILS_ADDRESS_CITY = 'publicBusinessDetails.address.city',\n PUBLICBUSINESSDETAILS_ADDRESS_COUNTRY = 'publicBusinessDetails.address.country',\n PUBLICBUSINESSDETAILS_ADDRESS_LINE1 = 'publicBusinessDetails.address.line1',\n PUBLICBUSINESSDETAILS_ADDRESS_LINE2 = 'publicBusinessDetails.address.line2',\n PUBLICBUSINESSDETAILS_ADDRESS_STATE = 'publicBusinessDetails.address.state',\n PUBLICBUSINESSDETAILS_ADDRESS_ZIP = 'publicBusinessDetails.address.zip',\n PUBLICBUSINESSDETAILS_COMPANYNAME = 'publicBusinessDetails.companyName',\n PUBLICBUSINESSDETAILS_PHONE = 'publicBusinessDetails.phone',\n PUBLICBUSINESSDETAILS_SUPPORTPHONE = 'publicBusinessDetails.supportPhone',\n PUBLICBUSINESSDETAILS_SUPPORTWEBSITE = 'publicBusinessDetails.supportWebsite',\n PUBLICBUSINESSDETAILS_WEBSITE = 'publicBusinessDetails.website',\n REASON = 'reason',\n REFERRALCODE = 'referralCode',\n REJECTEDAT = 'rejectedAt',\n REPRESENTATIVES = 'representatives',\n RISKSCORE = 'riskScore',\n STATUS = 'status',\n SUSPENDEDAT = 'suspendedAt',\n TEST = 'test',\n TOKENIZATIONMETHODS_APPLEPAY_ENABLED = 'tokenizationMethods.applePay.enabled',\n TOKENIZATIONMETHODS_CLICKTOPAY = 'tokenizationMethods.clickToPay',\n TOKENIZATIONMETHODS_GOOGLEPAY_ENABLED = 'tokenizationMethods.googlePay.enabled',\n TRACEDETAILS_BROWSER = 'traceDetails.browser',\n TRACEDETAILS_BROWSERACCEPT = 'traceDetails.browserAccept',\n TRACEDETAILS_BROWSERVERSION = 'traceDetails.browserVersion',\n TRACEDETAILS_COUNTRYCODE = 'traceDetails.countryCode',\n TRACEDETAILS_DEVICEMODEL = 'traceDetails.deviceModel',\n TRACEDETAILS_DEVICETYPE = 'traceDetails.deviceType',\n TRACEDETAILS_IP = 'traceDetails.ip',\n TRACEDETAILS_LANG = 'traceDetails.lang',\n TRACEDETAILS_OS = 'traceDetails.os',\n TRACEDETAILS_OSVERSION = 'traceDetails.osVersion',\n TRACEDETAILS_SOURCE = 'traceDetails.source',\n TRACEDETAILS_SOURCEVERSION = 'traceDetails.sourceVersion',\n TRACEDETAILS_USERAGENT = 'traceDetails.userAgent',\n TRACEDETAILS_USEREMAIL = 'traceDetails.userEmail',\n TRACEDETAILS_USERID = 'traceDetails.userId',\n TRACEDETAILS_USERNAME = 'traceDetails.userName',\n UPDATEDAT = 'updatedAt',\n REVIEW_CONFIRMED = 'reviewConfirmed',\n SUBSCRIPTION_ACTIVATED = 'subscription.activated',\n SUBSCRIPTION_PENDING = 'subscription.pending',\n SUBSCRIPTION_CANCELED = 'subscription.canceled',\n SUBSCRIPTION_PAUSED = 'subscription.paused',\n SUBSCRIPTION_UPDATED = 'subscription.updated',\n SUBSCRIPTION_PAST_DUE = 'subscription.past_due',\n SUBSCRIPTION_TRIALING = 'subscription.trialing',\n ACCOUNT_EXECUTIVE_ASSIGNED = 'accountExecutive',\n ACCOUNT_UPSELL_EXECUTIVE = 'upsell.executive',\n ACCOUNT_UPSELL_PAYMENT_METHODS = 'upsell.paymentMethods',\n ACCOUNT_UPSELL_DATE = 'upsell.date'\n}\n\nexport enum SubscriptionKeysUpdate {\n PAUSE_INTERVAL_COUNT = 'pauseIntervalCount',\n PAUSED_AT_PERIOD_END = 'pauseAtPeriodEnd',\n CANCELED_AT_PERIOD_END = 'cancelAtPeriodEnd',\n AMOUNT = 'amount',\n INTERVAL = 'interval',\n INTERVAL_COUNT = 'intervalcount',\n CUSTOMER_EMAIL = 'customer.email',\n CUSTOMER_NAME = 'customer.name',\n CUSTOMER_PHONE = 'customer.phone',\n BILLING_DETAILS_EMAIL = 'billingDetails.email',\n BILLING_DETAILS_NAME = 'billingDetails.name',\n BILLING_DETAILS_COMPANY = 'billingDetails.company',\n BILLING_DETAILS_PHONE = 'billingDetails.phone',\n BILLING_DETAILS_ADDRESS_CITY = 'billingDetails.address.city',\n BILLING_DETAILS_ADDRESS_COUNTRY = 'billingDetails.address.country',\n BILLING_DETAILS_ADDRESS_LINE1 = 'billingDetails.address.line1',\n BILLING_DETAILS_ADDRESS_LINE2 = 'billingDetails.address.line2',\n BILLING_DETAILS_ADDRESS_ZIP = 'billingDetails.address.zip',\n BILLING_DETAILS_ADDRESS_STATE = 'billingDetails.address.state',\n SHIPPING_DETAILS_EMAIL = 'shippingDetails.email',\n SHIPPING_DETAILS_NAME = 'shippingDetails.name',\n SHIPPING_DETAILS_COMPANY = 'shippingDetails.company',\n SHIPPING_DETAILS_PHONE = 'shippingDetails.phone',\n SHIPPING_DETAILS_ADDRESS_CITY = 'shippingDetails.address.city',\n SHIPPING_DETAILS_ADDRESS_COUNTRY = 'shippingDetails.address.country',\n SHIPPING_DETAILS_ADDRESS_LINE1 = 'shippingDetails.address.line1',\n SHIPPING_DETAILS_ADDRESS_LINE2 = 'shippingDetails.address.line2',\n SHIPPING_DETAILS_ADDRESS_ZIP = 'shippingDetails.address.zip',\n SHIPPING_DETAILS_ADDRESS_STATE = 'shippingDetails.address.state'\n}\n\nexport enum acquirers {\n COMERCIA_GLOBAL_PAY = 'Comercia',\n CREDORAX = 'Finaro'\n}\n\nexport enum paymentMethodsEnum {\n card = 'Credit Card',\n bizum = 'Bizum'\n}\n\nexport type LabelValue = {value: string; label: string};\n\nexport type NonEmptyRecord = {[P in keyof T]-?: NonEmptyRecord>};\n","import {LoadingOutlined} from '@ant-design/icons';\nimport {message, notification, Spin} from 'antd';\nimport moment from 'moment';\nimport 'moment/locale/en-gb';\nimport React from 'react';\nimport {setLocale} from 'yup';\n\nmoment.locale('en-gb');\n\nsetLocale({\n mixed: {\n defined: 'this field is required',\n required: 'this field is required',\n default: 'this field is required',\n oneOf: 'must be one of the following values: ${values}',\n notType: ({type}: any) => `must be a ${type}`\n },\n string: {\n email: 'must be a valid email',\n url: 'must be a valid URL',\n min: 'must be at least ${min} characters',\n max: 'must be at most ${max} characters',\n length: 'must be exactly ${length} characters',\n trim: 'must be a trimmed string',\n lowercase: 'must be a lowercase string',\n uppercase: 'must be a upper case string',\n matches: 'this value is not valid'\n },\n number: {\n min: 'must be greater than or equal to ${min}',\n max: 'must be less than or equal to ${max}',\n lessThan: 'must be less than ${less}',\n moreThan: 'must be greater than ${more}',\n positive: 'must be a positive number',\n negative: 'must be a negative number',\n integer: 'must be an integer'\n },\n date: {\n min: 'must be greater than or equal to ${min}',\n max: 'must be less than or equal to ${max}'\n },\n array: {\n min: 'must be greater than or equal to ${min}',\n max: 'must be less than or equal to ${max}'\n },\n boolean: {\n // @ts-ignore\n default: 'this field is required'\n }\n});\n\nSpin.setDefaultIndicator();\n\nnotification.config({\n top: 70\n});\n\nmessage.config({\n top: 70\n});\n","/* tslint:disable:react-hooks-nesting */\nimport {message} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {ConfirmSignIn} from 'components/Auth/ConfirmSignIn';\nimport {SignInForm} from 'components/Auth/SignInForm';\nimport bg from 'images/bg.svg';\nimport {UserContext} from 'lib/userContext';\nimport {ILazyComponent} from 'lib/utils';\nimport qs from 'query-string';\nimport React, {Suspense, useEffect, useState} from 'react';\nimport styled from 'styled-components';\nimport {AuthState, IAuthProps, IAuthQueryParams, IAuthState, IUser} from 'types';\nimport {Spinner} from '../Spinner';\nimport {ConfirmSignUp} from './ConfirmSignUp';\nimport {ForgotPassword} from './ForgotPassword';\nimport {ForgotPasswordSubmit} from './ForgotPasswordSubmit';\nimport {RequireNewPassword} from './RequireNewPassword';\n\nconst Container = styled.div`\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 50px 20px 100px;\n height: 100%;\n background: url(${bg}) no-repeat 0 0;\n background-size: 100%;\n`;\n\nconst Content = styled.div`\n width: 380px;\n margin: 0 auto 50px;\n .ant-input-prefix {\n color: rgba(0, 0, 0, 0.25) !important;\n }\n .ant-card {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n }\n`;\n\nconst Logo = styled.img`\n width: 200px;\n height: 44px;\n margin-bottom: 30px;\n flex-shrink: 0;\n`;\n\nconst initialState: IAuthState = {\n authState: AuthState.init\n};\n\nconst allowedActions = [\n AuthState.signIn,\n AuthState.signUp,\n AuthState.forgotPassword,\n AuthState.confirmSignUp\n];\n\nexport const withAuthenticator = (Cmp: ILazyComponent) => {\n return () => {\n const [state, setState] = useState(initialState);\n\n const setAuthState = (state: IAuthState) => {\n if (state.authState === AuthState.signedIn) {\n window.history.pushState('', '', window.location.pathname);\n }\n setState(state);\n };\n\n const handleSignOut = async (state: IAuthState = {authState: AuthState.signIn}) => {\n await Auth.signOut();\n setState(state);\n window.history.pushState('', '', '/');\n };\n\n useEffect(() => {\n const directAuthState = ({email, password, code, action}: IAuthQueryParams) => {\n setAuthState({authState: action as AuthState, email, password, code});\n };\n\n const directSignIn = async (email: string, password: string) => {\n try {\n const user = await Auth.signIn(email, password);\n if (user.challengeName && user.challengeName === 'NEW_PASSWORD_REQUIRED') {\n return setAuthState({\n authState: AuthState.requireNewPassword,\n currentUser: user,\n email\n });\n }\n return await checkAuth();\n } catch (error: any) {\n if (error.code === 'UserNotConfirmedException') {\n return setAuthState({authState: AuthState.confirmSignUp, email, password});\n }\n message.error(error.message);\n setAuthState({authState: AuthState.signIn, email});\n }\n };\n\n const directConfirmation = async (email: string, code: string) => {\n try {\n await Auth.confirmSignUp(email, code);\n message.success('Your account is confirmed, please sign in');\n } catch (error: any) {\n message.error(error.message);\n } finally {\n setAuthState({authState: AuthState.signIn, email});\n }\n };\n\n const checkAuth = async () => {\n try {\n const currentUser = await Auth.currentAuthenticatedUser({bypassCache: true});\n setState({authState: AuthState.signedIn, currentUser});\n } catch {\n setAuthState({authState: AuthState.signIn});\n }\n };\n\n const {email, password, code, action} = qs.parse(window.location.search) as IAuthQueryParams;\n\n if (allowedActions.includes(action as AuthState)) {\n if (action === AuthState.signIn && email && password) {\n // noinspection JSIgnoredPromiseFromCall\n directSignIn(email, password);\n } else {\n directAuthState({email, password, code, action});\n }\n } else if (email && code) {\n // noinspection JSIgnoredPromiseFromCall\n directConfirmation(email, code);\n } else {\n // noinspection JSIgnoredPromiseFromCall\n checkAuth();\n }\n Cmp.preload().then(() => {\n console.log('App is loaded');\n });\n }, []);\n\n const renderAuthView = () => {\n const props: IAuthProps = {...state, setState: setAuthState};\n switch (state.authState) {\n case AuthState.confirmSignUp:\n return ;\n case AuthState.confirmSignIn:\n return ;\n case AuthState.forgotPassword:\n return ;\n case AuthState.forgotPasswordSubmit:\n return ;\n case AuthState.requireNewPassword:\n return ;\n default:\n return ;\n }\n };\n\n const getAccessLevel = (currentUser: IUser) => {\n const session = currentUser.getSignInUserSession()!;\n const {payload} = session.getIdToken();\n return payload['cognito:groups'][0];\n };\n\n if (state.authState === AuthState.init) return ;\n if (state.authState === AuthState.signedIn) {\n const currentUser = state.currentUser!;\n return (\n }>\n setState((state) => ({...state, currentUser: user})),\n userEmail: currentUser.attributes.email,\n userName: currentUser.attributes.name,\n userPhone: currentUser.attributes.phone_number,\n userId: currentUser.attributes.sub,\n termsOfServiceUrl: currentUser.attributes['custom:tos_doc'],\n termsOfServiceAcceptedAt: currentUser.attributes['custom:tos_accepted_at'],\n accessLevel: getAccessLevel(currentUser)\n }}>\n \n \n \n );\n }\n return (\n \n \n

Admin Dashboard

\n {renderAuthView()}\n
\n );\n };\n};\n","import styled from 'styled-components';\n\nexport const Extra = styled.div`\n margin-top: 1em;\n text-align: center;\n line-height: 1.6;\n a {\n white-space: nowrap;\n }\n`;\n\nexport const Description = styled.p`\n text-align: center;\n`;\n","import {LockOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input, Checkbox} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps, MfaType} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\nimport {Description, Extra} from './Shared';\n\ninterface IFormValues {\n code: string;\n remember: boolean;\n}\n\nconst C: React.FC & IAuthProps> = ({\n isSubmitting,\n setState,\n mfaDestination,\n email,\n password,\n mfaType,\n setSubmitting\n}) => {\n const backToSignIn = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.signIn, email});\n };\n\n const resendCode = async (e: React.SyntheticEvent) => {\n e.preventDefault();\n setSubmitting(true);\n await Auth.signIn(email!, password);\n setSubmitting(false);\n };\n\n return (\n Back to Sign In}>\n \n {mfaType === MfaType.SMS_MFA ? (\n <>\n To continue, please enter the 6-digit verification code sent to{' '}\n {mfaDestination}.\n \n ) : (\n <>\n To continue, please enter the 6-digit verification code generated by your{' '}\n authenticator app.\n \n )}\n \n
\n \n }\n placeholder=\"Verification code\"\n />\n \n

\n Remember this device?\n

\n \n \n Lost your code? Resend Code\n \n
\n \n );\n};\n\nexport const ConfirmSignIn = withFormik({\n validationSchema: () =>\n yup.object().shape({\n code: yup.string().required()\n }),\n mapPropsToValues: ({code = ''}) => ({code, remember: true}),\n handleSubmit: async ({code, remember}, {props, setErrors, setSubmitting}) => {\n try {\n await Auth.confirmSignIn(props.currentUser, code, props.mfaType);\n if (remember) await Auth.rememberDevice();\n const currentUser = await Auth.currentAuthenticatedUser();\n props.setState({authState: AuthState.signedIn, currentUser});\n } catch (error: any) {\n setErrors({code: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","import {IdcardOutlined, LockOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\nimport {Extra} from './Shared';\n\ninterface IFormValues {\n email: string;\n password: string;\n}\n\nconst C: React.FC & IAuthProps> = ({isSubmitting, setState, values}) => {\n const resetPassword = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.forgotPassword, email: values.email});\n };\n\n return (\n \n
\n \n }\n placeholder=\"Email\"\n />\n \n \n }\n placeholder=\"Password\"\n />\n \n \n \n Forgot your password? Reset password\n \n
\n
\n );\n};\n\nconst schema = yup.object().shape({\n email: yup.string().email().required(),\n password: yup.string().min(6).required()\n});\n\nexport const SignInForm = withFormik({\n validationSchema: schema,\n mapPropsToValues: ({email = '', password = ''}) => ({email, password}),\n handleSubmit: async ({email, password}, {props, setErrors, setSubmitting}) => {\n try {\n const user = await Auth.signIn(email, password);\n if (user.challengeName) {\n if (user.challengeName === 'NEW_PASSWORD_REQUIRED') {\n return props.setState({\n authState: AuthState.requireNewPassword,\n currentUser: user,\n email\n });\n }\n if (user.challengeName === 'SMS_MFA' || user.challengeName === 'SOFTWARE_TOKEN_MFA') {\n return props.setState({\n email,\n password,\n authState: AuthState.confirmSignIn,\n currentUser: user,\n mfaDestination: user.challengeParam?.CODE_DELIVERY_DESTINATION,\n mfaType: user.challengeName\n });\n }\n }\n // get current user, CognitoUser returned form Auth.signIn does not have attributes\n const currentUser = await Auth.currentAuthenticatedUser();\n props.setState({authState: AuthState.signedIn, currentUser, email});\n } catch (error: any) {\n // render confirm view if user is not confirmed\n if (error.code === 'UserNotConfirmedException') {\n return props.setState({authState: AuthState.confirmSignUp, email, password});\n }\n if (error.code === 'NotAuthorizedException') {\n return setErrors({password: error.message});\n }\n setErrors({password: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","export default __webpack_public_path__ + \"static/media/bg.33950fbc.svg\";","import {IdcardOutlined, LockOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\nimport {Extra} from './Shared';\n\ninterface IFormValues {\n email: string;\n code: string;\n}\n\nconst C: React.FC & IAuthProps> = ({\n isSubmitting,\n setSubmitting,\n setState,\n values\n}) => {\n const resendCode = async (e: React.SyntheticEvent) => {\n e.preventDefault();\n setSubmitting(true);\n await Auth.resendSignUp(values.email);\n setSubmitting(false);\n };\n const backToSignIn = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.signIn, email: values.email});\n };\n return (\n Back to Sign In}>\n
\n \n }\n placeholder=\"Email\"\n />\n \n \n }\n placeholder=\"Confirmation code\"\n />\n \n \n \n Lost your code? Resend Code\n \n \n \n );\n};\n\nconst schema = yup.object().shape({\n email: yup.string().email().required(),\n code: yup.string().required()\n});\n\nexport const ConfirmSignUp = withFormik({\n validationSchema: schema,\n mapPropsToValues: ({email = '', code = ''}) => ({email, code}),\n handleSubmit: async ({email, code}, {props, setErrors, setSubmitting}) => {\n try {\n await Auth.confirmSignUp(email, code);\n // sign in user after email is confirmed\n await Auth.signIn(email, props.password);\n // get current user, CognitoUser returned form Auth.signIn does not have attributes\n const currentUser = await Auth.currentAuthenticatedUser();\n props.setState({authState: AuthState.signedIn, currentUser});\n } catch (error: any) {\n setErrors({code: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","import {IdcardOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\nimport {Extra} from './Shared';\n\ninterface IFormValues {\n email: string;\n}\n\nconst C: React.FC & IAuthProps> = ({isSubmitting, setState, values}) => {\n const backToSignIn = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.signIn, email: values.email});\n };\n const goToSubmit = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.forgotPasswordSubmit});\n };\n return (\n Back to Sign In}>\n
\n \n }\n placeholder=\"Email\"\n />\n \n \n \n I already have a code\n \n
\n \n );\n};\n\nconst schema = yup.object().shape({\n email: yup.string().email().required()\n});\n\nexport const ForgotPassword = withFormik({\n validationSchema: schema,\n mapPropsToValues: ({email = ''}) => ({email}),\n handleSubmit: async ({email}, {props, setErrors, setSubmitting}) => {\n try {\n await Auth.forgotPassword(email);\n props.setState({authState: AuthState.forgotPasswordSubmit, email});\n } catch (error: any) {\n if (error.code === 'UserNotFoundException') {\n return setErrors({email: 'Email does not exist'});\n }\n setErrors({email: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","import {IdcardOutlined, LockOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\nimport {Extra} from './Shared';\n\ninterface IFormValues {\n email: string;\n code: string;\n password: string;\n}\n\nconst C: React.FC & IAuthProps> = ({\n isSubmitting,\n setSubmitting,\n setState,\n values,\n email\n}) => {\n const resendCode = async (e: React.SyntheticEvent) => {\n e.preventDefault();\n setSubmitting(true);\n await Auth.forgotPassword(values.email);\n setSubmitting(false);\n };\n const backToSignIn = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.signIn, email: values.email});\n };\n return (\n Back to Sign In}>\n
\n {!email && (\n \n }\n placeholder=\"Email\"\n />\n \n )}\n \n }\n placeholder=\"Code\"\n />\n \n \n }\n placeholder=\"New password\"\n />\n \n\n \n \n Lost your code? Resend code\n \n
\n \n );\n};\n\nconst schema = yup.object().shape({\n code: yup.string().required(),\n password: yup.string().min(6).required()\n});\n\nexport const ForgotPasswordSubmit = withFormik({\n validationSchema: schema,\n mapPropsToValues: ({email = '', code = '', password = ''}) => ({email, code, password}),\n handleSubmit: async ({email, code, password}, {props, setErrors, setSubmitting}) => {\n try {\n await Auth.forgotPasswordSubmit(email, code, password);\n props.setState({authState: AuthState.signIn, email});\n } catch (error: any) {\n if (error.code === 'CodeMismatchException') {\n return setErrors({code: error.message});\n }\n setErrors({password: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","import {LockOutlined} from '@ant-design/icons/lib';\nimport {Button, Card} from 'antd';\nimport {Auth} from 'aws-amplify';\nimport {FormikProps, withFormik} from 'formik';\nimport {Form, FormItem, Input} from 'formik-antd';\nimport React from 'react';\nimport {AuthState, IAuthProps} from 'types';\nimport * as yup from 'yup';\nimport {AnchorLink} from '../AnchorLink';\n\ninterface IFormValues {\n password: string;\n passwordConfirm: string;\n}\n\nconst C: React.FC & IAuthProps> = ({isSubmitting, setState, email}) => {\n const backToSignIn = (e: React.SyntheticEvent) => {\n e.preventDefault();\n setState({authState: AuthState.signIn, email});\n };\n return (\n Back to Sign In}>\n
\n \n }\n placeholder=\"Password\"\n />\n \n \n }\n placeholder=\"Password confirmation\"\n />\n \n \n
\n \n );\n};\n\nconst schema = yup.object().shape({\n password: yup.string().min(6).required(),\n passwordConfirm: yup\n .string()\n .oneOf([yup.ref('password')], \"passwords don't match\")\n .required('password confirmation is required')\n});\n\nexport const RequireNewPassword = withFormik({\n validationSchema: schema,\n mapPropsToValues: ({password = ''}) => ({password, passwordConfirm: ''}),\n handleSubmit: async ({password}, {props, setErrors, setSubmitting}) => {\n try {\n await Auth.completeNewPassword(\n props.currentUser,\n password,\n props.currentUser!.challengeParam!.requiredAttributes\n );\n props.setState({authState: AuthState.signIn, email: props.email});\n } catch (error: any) {\n if (error.code === 'CodeMismatchException') {\n return setErrors({password: error.message});\n }\n setErrors({password: error.message});\n } finally {\n setSubmitting(false);\n }\n }\n})(C);\n","import {withAuthenticator} from 'components/Auth';\nimport {lazyWithPreload} from 'lib/utils';\n\nconst LazyApp = lazyWithPreload(() => import(/* webpackChunkName: \"app\" */ './App'));\n\nexport default withAuthenticator(LazyApp);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as {env: {[key: string]: string}}).env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config?.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config?.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","import {Auth, Storage} from 'aws-amplify';\nimport 'global.config';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport {config} from 'stage.config';\nimport Root from './Root';\nimport * as serviceWorker from './serviceWorker';\n\nAuth.configure({\n identityPoolId: config.identityPoolId,\n region: config.region,\n userPoolId: config.userPoolId,\n userPoolWebClientId: config.userPoolWebClientId\n});\n\nStorage.configure({\n AWSS3: {\n bucket: config.serviceBucket,\n region: config.region\n }\n});\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import {Spin} from 'antd';\nimport React from 'react';\nimport styled from 'styled-components';\n\ntype Props = {\n delay?: number;\n inline?: boolean;\n};\n\nconst Wrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n position: ${(props: Props) => (props.inline ? 'relative' : 'absolute')};\n padding: 25px;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nexport const Spinner: React.FC = ({delay = 500, inline, ...props}) => (\n \n \n \n);\n","import Big from 'big.js';\nimport dot from 'dot-object';\nimport {CountryCode, parsePhoneNumberFromString} from 'libphonenumber-js';\nimport {divide, multiply, round} from 'mathjs';\nimport React, {ComponentType, LazyExoticComponent} from 'react';\nimport {ChargeFieldsFragment} from '../api/generated';\nimport {omitDeep} from './cleanTypenameLink';\n\nexport function enumKeys(e: E): Array {\n return Object.keys(e) as Array;\n}\n\nexport function enumValues(e: E): Array {\n return Object.values(e) as Array;\n}\n\n/**\n * Calculates percentage rate\n * @param num\n * @param denom\n */\nexport const getRate = (num = 0, denom = 1) => {\n if (denom === 0) return 0;\n const ratio = num / denom;\n return (ratio > 1 ? 1 : ratio) * 100;\n};\n\n/**\n * Calculates increase in percentages\n * @param first\n * @param second\n */\nexport const getIncrease = (first = 0, second = 1) => {\n if (first === 0 && second === 0) return 0;\n if (second === 0) return 100;\n const ratio = (first - second) / second;\n if (ratio > 100) return 100;\n return ratio * 100;\n};\n\nexport interface ILazyComponent> extends LazyExoticComponent {\n preload: () => Promise;\n}\n\n/**\n * Lazy load component and add preload method\n * Call Component.preload() to fetch async chunks\n * @param factory\n */\nexport const lazyWithPreload = >(\n factory: () => Promise<{default: T}>\n) => {\n const Component = React.lazy(factory) as ILazyComponent;\n Component.preload = factory;\n return Component;\n};\n\n/**\n * Get random int in rage\n * @param min\n * @param max\n */\nexport const getRandomInt = (min: number, max: number) => {\n return Math.round(Math.random() * (max - min) + min);\n};\n\n/**\n *intersperse: Return an array with the separator interspersed between\n * each element of the input array.\n *\n * > intersperse([1,2,3], 0)\n * [1,0,2,0,3]\n */\nexport function intersperse(arr: any[], sep: any) {\n if (arr.length === 0) return [];\n return arr.slice(1).reduce((xs, x) => xs.concat([sep, x]), [arr[0]]);\n}\n\n/**\n * Checks if variable is undefined or null\n * @param variable\n */\nexport const isUndefined = (variable: any) => {\n return typeof variable === 'undefined' || variable === null;\n};\n\n/**\n * Capitalize firs letter\n * @param s - string\n */\nexport const capitalize = (s: string) => {\n return s.charAt(0).toUpperCase() + s.slice(1);\n};\n\nexport const downloadTextAsFile = ({\n fileName,\n text,\n type\n}: {\n fileName: string;\n text: string;\n type: string;\n}) => {\n const element = document.createElement('a');\n element.setAttribute('href', `data:${type};charset=utf-8,${encodeURIComponent(text)}`);\n element.setAttribute('download', fileName);\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n};\n\nexport const downloadFile = (url: string, name?: string) => {\n const element = document.createElement('a');\n element.setAttribute('href', url);\n element.setAttribute('download', name ?? 'true');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n};\n\n/**\n * Returns zero if number is negative\n * @param n\n */\nexport const positiveOrZero = (n: number) => {\n return n > 0 ? n : 0;\n};\n\n/**\n * Makes sure that the object is of type object and is not null.\n */\nexport const isObject = (object: any) => object != null && typeof object === 'object';\n\nexport const pick = (obj: {[key: string]: any} | undefined, keys: string[]) => {\n const result: {[key: string]: any} = {};\n if (!obj) return result;\n keys.forEach((key) => {\n if (obj[key] === undefined) return;\n result[key] = obj[key];\n });\n return result;\n};\n\nexport const omit = (obj: {[key: string]: any} | undefined, keys: string[]) => {\n const result: {[key: string]: any} = {};\n if (!obj) return result;\n Object.keys(obj).forEach((key) => {\n if (keys.includes(key)) return;\n result[key] = obj[key];\n });\n return result;\n};\n\nexport const delay = (ms: number) =>\n new Promise((resolve) => {\n setTimeout(() => resolve(), ms);\n });\n\n/**\n * Check if object is empty\n * @param o - object to test\n */\nexport function isEmpty(o?: object) {\n if (!o) return true;\n return Object.keys(o).length === 0;\n}\n\nexport function nullify(o: any) {\n if (!isObject(o)) return o;\n return Object.keys(o).reduce((result, key) => {\n if (['', undefined].includes(o[key])) {\n result[key] = null;\n } else if (Array.isArray(o[key])) {\n result[key] = o[key].map(nullify);\n } else if (isObject(o[key])) {\n result[key] = nullify(o[key]);\n } else {\n result[key] = o[key];\n }\n return result;\n }, {} as any);\n}\n\nexport const toCents = (amount: number | null = null) => {\n if (amount === null) return null;\n return round(multiply(amount, 100));\n};\n\nexport const fromCents = (amount: number | null = null) => {\n if (amount === null) return null;\n return round(divide(amount, 100));\n};\n\nexport const amountToInt = (amount: number) => {\n return Big(amount).times(100).toNumber();\n};\n\nexport const amountFromInt = (amount: number) => {\n return Big(amount).div(100).toNumber();\n};\n\nexport const unique = (array: T[]) => {\n return Array.from(new Set(array));\n};\nexport const randomHex = (size: number) => {\n return [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');\n};\nexport const arrayIncludesSome = (array: any[], values: any[]) => {\n return values.some((value) => array.includes(value));\n};\n\nexport const parseJSON = >(string: string) => {\n try {\n return JSON.parse(string) as T;\n } catch (error) {\n return undefined;\n }\n};\n\nexport const isDefined = (\n value: any,\n options: {allowZero?: boolean; allowEmptyString?: boolean} = {\n allowZero: true,\n allowEmptyString: true\n }\n) => {\n if (options.allowEmptyString && value === '') return true;\n if (options.allowZero && value === 0) return true;\n return Boolean(value);\n};\n\nexport const isQrPayment = (charge: ChargeFieldsFragment) => {\n return !!charge.paymentMethod && charge.orderId?.startsWith('QR');\n};\n\n/**\n * Get changed keys from two objects in dot notation\n * @param obj1\n * @param obj2\n */\nexport const getChangedKeys = (obj1: any = {}, obj2: any = {}) => {\n const dotObj1 = dot.dot(obj1);\n const dotObj2 = dot.dot(obj2);\n const keys = unique(Object.keys(dotObj1).concat(Object.keys(dotObj2)));\n return keys.filter((key) => JSON.stringify(dotObj1[key]) !== JSON.stringify(dotObj2[key]));\n};\n\nexport const dateFormat = {\n dateTime: 'DD/MM/YY HH:mm',\n localizedShort: 'lll'\n};\n\nexport const truncate = (str: string | null | undefined, length: number) => {\n if (!str) return '';\n if (str.length <= length) return str;\n return `${str.substring(0, length)}...`;\n};\n\nexport const normalizePhone = (phone?: string | null, countryCode?: string | null) => {\n if (!phone) return null;\n return parsePhoneNumberFromString(phone, countryCode as CountryCode)?.format('E.164');\n};\n\nexport const openNewTab = (url: string | undefined) => url && window.open(url, '_blank');\n\nexport const prettifyEvent = (event: any) =>\n JSON.stringify(\n omitDeep(\n {\n ...event,\n changed: undefined\n },\n '__typename'\n ),\n null,\n 2\n );\n\nexport const clamp = (value: number, min: number, max: number) => {\n return Math.min(Math.max(value, min), max);\n};\n\nexport const sortObjectKeysByValue = (obj: Record): Record => {\n const sortedKeys = Object.keys(obj).sort((a, b) => obj[a].localeCompare(obj[b]));\n\n return sortedKeys.reduce((acc: Record, key) => {\n acc[key] = obj[key];\n return acc;\n }, {});\n};\n","import React from 'react';\nimport {IAuthState} from 'types';\n\nexport interface IUserContext {\n userId: string;\n userEmail: string;\n userName?: string;\n userPhone?: string;\n accessLevel: string;\n termsOfServiceUrl?: string;\n termsOfServiceAcceptedAt?: string;\n setCurrentUser(user: any): void;\n onSignOut(state?: IAuthState): void;\n storeId?: string;\n}\n\nexport const UserContext = React.createContext({\n userId: '',\n userEmail: '',\n userName: '',\n accessLevel: '',\n setCurrentUser: () => {},\n onSignOut: () => {}\n});\n","import {ApolloLink} from 'apollo-link';\n\nexport function omitDeep(obj: any, key: any) {\n const keys = Object.keys(obj);\n const newObj: any = {};\n keys.forEach((i) => {\n if (i !== key) {\n const val = obj[i];\n if (Array.isArray(val)) {\n newObj[i] = omitDeepArrayWalk(val, key);\n } else if (typeof val === 'object' && val !== null) {\n newObj[i] = omitDeep(val, key);\n } else {\n newObj[i] = val;\n }\n }\n });\n return newObj;\n}\n\nexport function omitDeepArrayWalk(arr: any[], key: any): object {\n return arr.map((val) => {\n if (Array.isArray(val)) {\n return omitDeepArrayWalk(val, key);\n } else if (typeof val === 'object') return omitDeep(val, key);\n return val;\n });\n}\n\n/**\n * An apollo link that removes __typename field from variables\n */\nexport const cleanTypenameLink = new ApolloLink((operation, forward) => {\n if (operation.variables) {\n operation.variables = omitDeep(operation.variables, '__typename');\n }\n return forward!(operation).map((data) => data);\n});\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n disabled?: boolean;\n external?: boolean;\n}\n\nconst Link = styled.a`\n pointer-events: ${(props) => (props.disabled ? 'none' : 'auto')};\n`;\n\nconst externalRegex = /^[a-zA-Z0-9+.-]+:\\/\\//;\n\nexport const AnchorLink: React.FC> = ({\n href = '#',\n onClick,\n external,\n ...props\n}) => {\n if (external || externalRegex.test(href)) {\n return (\n \n );\n }\n return (\n {\n e.preventDefault();\n onClick?.(e);\n }}\n />\n );\n};\n"],"sourceRoot":""}