{"version":3,"sources":["components/new-password-field/new-password-field.js","utils/errors.js","services/auth-service.js","utils/e164.js","services/account-service.js","services/signup-service.js","services/calls-service.js","services/user-service.js","services/number-service.js","services/sku-service.js","services/purchase-service.js","services/notify-service.js","services/invoice-service.js","services/metric-service.js","services/endpoint-service.js","store/store/initial-state.js","store/store/store.js","store/hooks/index.js","store/actions/types.js","store/actions/index.js","components/auth-provider/auth-provider.js","components/auth-provider/hooks/use-auth-user.js","store/reducers/index.js","store/reducers/account/index.js","store/reducers/user/index.js","store/reducers/endpoint/index.js","utils/stripe.js","components/fuse-animate/fuse-animate.js","images/phonethru-logo.svg","utils/valid.js","utils/mobile-login.js","utils/aus-phone.js","routes/login/login-page.js","components/password-strength-meter/password-strength-meter.js","components/loading/loading.js","routes/sign-up/sign-up-page.js","utils/purchases.js","routes/home/home-page.js","utils/call-credits.js","components/snackbar/api-error.js","utils/toast.js","utils/resolve-action.js","routes/service/service-page.js","images/visa-logo.svg","images/mastercard-logo.svg","components/checkout/checkout.js","utils/external-link.js","utils/checkout.js","routes/add-service/add-service.js","routes/account/account-page.js","utils/format.js","routes/calls/call-log-page.js","routes/support/support-page.js","routes/purchases/purchases-page.js","routes/close-account/close-account-page.js","routes/password/password-page.js","routes/add-card/add-card-page.js","routes/recharge/recharge-page.js","routes/recharge/recharge-service-page.js","routes/transfer/transfer-page.js","routes/transfer/transfer-service-page.js","routes/reactivate/reactivate-page.js","components/app/app.js","components/header-toolbar/header-toolbar.js","components/error-screen/error-screen.js","components/splash-screen/splash-screen.js","components/animated-switch/animated-switch.js","components/user-profile/user-profile.js","components/services-card/services-card.js","components/recent-calls/recent-calls.js","components/recent-purchases/recent-purchases.js","components/balance-card/balance-card.js","components/banner/banner.js","components/avatar-select/avatar-select.js","components/payment-method-card/credit-card.js","components/payment-method-card/payment-method-card.js","components/expander-table/expander-table.js","components/expander-table/hooks/index.js","components/expander-table-header/expander-table-header.js","components/expander-table-pager/expander-table-pager.js","components/expander-table-content/expander-table-content.js","components/expander-table-rows/expander-table-rows.js","components/faq-accordion/faq-accordion.js","components/stripe/stripe-input.js","components/stripe/add-payment-method.js","components/stripe/card-form.js","components/stripe/card-error.js","components/invoice-status/invoice-status.js","components/endpoint-card/endpoint-card.js","reportWebVitals.js","index.js"],"names":["NewPasswordField","id","name","label","password","error","helperText","exclusions","onChange","onBlur","useState","showPassword","state","setState","rating","score","variant","required","htmlFor","type","value","e","result","zxcvbn","target","warning","feedback","suggestions","fullWidth","endAdornment","position","title","aria-label","onClick","onMouseDown","preventDefault","edge","httpError","Promise","resolve","ky","HTTPError","response","text","then","body","data","JSON","parse","status","statusText","TimeoutError","instance","signInWithEmailAndPassword","email","willRemember","auth","reject","formData","FormData","append","post","json","catch","er","whoAmI","get","logout","requestPasswordReset","resetPassword","obj","requestOTP","username","e164ify","num","toString","replace","length","startsWith","patch","accountId","patchSet","object","properties","url","close","reason","delete","removePaymentMethod","paymentId","setPaymentMethod","tokenId","token","put","patchService","serviceId","setServiceAction","action","transferService","rxMobileNumber","rxPassword","substr","getServices","reactivationQuery","reactivate","numbers","verifyMobile","number","address","confirmMobile","verifyId","code","createAccount","getForAccount","offset","order","search","encodeURI","userId","setPassword","request","getRegions","getNumbers","regionId","getPriorNumbers","getSku","skuId","getSkus","purchase","addRequest","getPaymentsLast30Days","ets","moment","valueOf","sts","subtract","getChargesLast30Days","unix","deactivate","endpointId","initialState","account","services","dialActions","isFetching","didInvalidate","user","endpoint","StoreContext","createContext","StoreProvider","reducer","children","Provider","useReducer","useStore","useContext","SET_USER","CLEAR_USER","SET_ACCOUNT","CLEAR_ACCOUNT","FETCH_ACCOUNT","RECEIVE_ACCOUNT","INVALIDATE_ACCOUNT","SET_ACCOUNT_PAYMENT_METHOD","SET_SERVICES","SET_ENDPOINT","CLEAR_ENDPOINT","setUser","types","payload","fetchAccount","dispatch","effect","fetchAccountIfNeeded","invalidateAccount","setAccountPaymentMethod","paymentMethod","shouldFetchAccount","AccountService","receivedAt","Date","now","receiveAccount","fetchAccountError","AuthContext","React","AuthProvider","useEffect","AuthService","login","userName","history","push","useAuthUser","handlers","isPending","isError","isSuccess","isAuthenticated","set","createReducer","lastUpdated","hasOwnProperty","getStripeKey","process","REACT_APP_STAGE","FuseAnimate","forwardRef","props","ref","cloneElement","style","visibility","defaultProps","animation","runOnMount","targetQuerySelector","interruptBehavior","duration","delay","easing","display","setRef","undefined","memo","_extends","Object","assign","i","arguments","source","key","prototype","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgPhonethruLogo","_ref","svgRef","titleId","xmlns","width","height","viewBox","xmlSpace","fillRule","clipRule","strokeLinejoin","strokeMiterlimit","transform","d","fill","stroke","strokeWidth","ForwardRef","emailRegex","RegExp","mobileRegex","isValidMobile","test","mobileLogin","mobileNumber","ausPhone","substring","useStyles","makeStyles","theme","root","background","palette","primary","dark","darken","color","contrastText","minHeight","welcomeWrapper","paddingTop","logo","breakpoints","up","logoText","marginLeft","marginTop","panelLogo","panelLogoText","loginCard","maxWidth","loginContent","padding","welcomeTitle","fontWeight","welcomeText","lineHeight","loginTitle","marginBottom","loginField","loginButton","loginCheckbox","fontSize","formError","link","textDecoration","textDecorationColor","loginReducer","MobilePanel","classes","focusRef","useRef","useForm","mode","handleSubmit","control","formState","isValid","isSubmitting","onSubmit","loginMethod","loginError","view","otpId","finally","className","ErrorOutline","noValidate","defaultValue","rules","validate","validateMobile","render","field","fieldState","TextField","inputRef","message","formField","Button","disabled","to","PasswordPanel","location","handleClickShowPassword","handleMouseDownPassword","event","complete","current","focus","pathname","FormControl","clsx","margin","textField","InputLabel","OutlinedInput","InputAdornment","Tooltip","IconButton","Visibility","VisibilityOff","FormHelperText","OTPPanel","verifyState","setVerifyState","Typography","paragraph","otpPassword","maxLength","minLength","inputProps","LoginPage","match","nextState","apiError","document","getElementById","scrollTo","alt","translateX","Card","CardContent","hintList","listStyle","Meter","max","Hints","check","backgroundColor","borderRadius","Check","map","s","index","PasswordStrengthMeter","Loading","alignItems","justifyContent","LinearProgress","lazy","flexDirection","appBar","zIndex","drawer","toolbar","main","paddingRight","paddingLeft","pad","spacing","signupReducer","signUp","PhoneNumberForm","SignupService","stage","VerifyForm","verifyCode","firstName","lastName","AccountForm","pwCheck","scoreState","setScoreState","pwScore","mobileVerifyId","fallback","handlePasswordChange","SuccessPanel","handleClick","redirect","CheckCircleOutline","align","RecoveryPanel","component","Link","SignUpPage","AppBar","Toolbar","purchases","invoices","inv","amount","amountRefunded","date","description","receiptUrl","reference","content","flexGrow","HomePage","calls","showBalance","store","unloaded","all","CallsService","InvoiceService","EndpointService","results","balance","setAccount","setEndpoint","Fragment","callCredits","service","minutes","daysLeft","callCreditsExpiry","today","startOf","days","Math","round","asDays","card","flexWrap","red","minWidth","typography","actionRoot","icons","flexShrink","expand","transition","transitions","create","shortest","expandOpen","collapse","checkIcon","button","textTransform","SnackApiError","closeSnackbar","useSnackbar","expanded","setExpanded","CardActions","Collapse","in","timeout","unmountOnExit","Paper","gutterBottom","success","enqueueSnackbar","autoHideDuration","resolveAction","handlerAction","contacts","greetings","voicemails","schedules","voiceMenus","detail","longText","schedule","findAction","idx","day","hours","start","finish","checked","ahAction","currentAction","dialAction","j","sep","dialType","join","dialActionNumbers","file","actions","green","Accordion","withStyles","boxShadow","borderBottom","MuiAccordion","AccordionSummary","MuiAccordionSummary","AccordionDetails","MuiAccordionDetails","ForwardingList","console","log","isForwarding","RadioGroup","fetchServices","handleSelection","FormControlLabel","Radio","NicknameField","isEditing","autoFocus","placeholder","nickname","size","AboutAccordion","expandIcon","setServices","ServicePage","params","meta","filter","zone","SvgVisaLogo","x","y","enableBackground","points","SvgMastercardLogo","LandlineItem","sku","inclusions","CreditItem","quantity","expiryDays","ServiceItem","transferTo","TotalSection","taxRate","total","toFixed","subtotal","taxes","PaymentSection","onSuccess","onError","isStored","handleAccordionChange","panel","isExpanded","cardError","isMounted","scroller","smooth","containerId","price","ticketId","saveCard","PurchaseService","CircularProgress","options","buttonTitle","storeCheckbox","dense","Checkout","externalLink","window","open","totals","taxInc","addServiceReducer","ItemCard","pageState","expiryDate","add","format","priors","ChooseNumberCard","zones","zoneId","regions","selected","zoneDefaults","NumberService","selectedZone","scroll","scrollToTop","regionName","selectedRegionName","z","List","ListItem","role","ListItemIcon","Checkbox","disableRipple","tabIndex","ListItemText","LocationSelect","Select","labelId","MenuItem","PriorNumbersCard","NotificationCard","comment","NotifyService","TermsCard","termsAccepted","CheckoutCard","gDispatch","hasMinutes","cardUpdated","ApiErrorPanel","SentimentVeryDissatisfied","tz","Intl","DateTimeFormat","resolvedOptions","timeZone","region","r","AddServicePage","SkuService","n","isAvailable","inlineLink","closeButton","saveButton","mono","fontFamily","creditCard","borderWidth","widget","widgetTitle","PersonalDetailsForm","isDirty","dirtyFields","errors","changes","changeSet","UserService","toast","avatarUrl","initials","charAt","PrepaidBalancePanel","PaymentMethodPanel","brand","last4","expiry","href","rel","PurchasesPanel","count","sum","loaded","MetricService","metric","DangerZonePanel","fields","forEach","AccountPage","el","diff","humanize","hr","min","secs","seconds","dataLabel","CallSummary","row","from","startTime","CallContent","dangerouslySetInnerHTML","__html","direction","CallStatusIcon","CallLogPage","filtered","page","pageLength","pageCount","scrollTop","showLoader","menuAnchor","setMenuAnchor","tableRef","createRef","fetchData","useCallback","sorting","sort","column","rows","ExpanderTable","onData","columns","currentTarget","Menu","anchorEl","keepMounted","Boolean","onClose","reload","noData","rowKey","SummaryComponent","ContentComponent","onVisibilityChange","isVisible","viewportOffset","animateScroll","bodyText","emphasis","para","list","PhoneThruSupport","property","autoRecharge","accountType","RouteLink","ContactCard","contactCard","Call","Email","MobileNumberChangeContent","RechargingContent","EmailButton","mailToMove","mailToAdd","mailToSupport","mailToNumber","SupportPage","tocLinks","PurchaseSummary","PurchaseContent","PurchasesPage","charges","cardContent","ReasonSelect","CloseText","minutesRemaining","CloseAccountPage","submitting","confirm","reasons","lostMinutes","toLowerCase","PasswordPage","AddCardPage","listItem","paddingBottom","RechargeSelectList","active","Grid","container","item","forwarding","Credit","RechargePage","skuButton","ContentCard","SkuList","skus","remaining","recharge","credits","totalMinutes","closingCredits","RechargeServicePage","TransferSelectList","TransferPage","ReceivingAccountCard","rxAccountError","mobile","phone","toMobile","TransferServicePage","ReactivatePanel","recoverable","ReactivatePage","stripePromise","loadStripe","stripeOptions","fonts","cssSrc","createMuiTheme","values","xs","sm","md","lg","xl","secondary","light","AppSwitcher","AuthenticatedApp","UnauthenticatedApp","Container","exact","path","LoginRedirect","overrides","MuiButton","App","reducers","ThemeProvider","stripe","LogoutIcon","SvgIcon","outline","backButton","returnUrl","HeaderToolbar","useHistory","handleLogoutClick","justify","ArrowBack","Hidden","xsDown","HeadsetMic","smUp","ErrorScreen","scale","useMediaQuery","buttonText","buttonAction","Box","letterSpacing","pl","pt","pb","goBack","SplashScreen","group","routes","top","left","withRouter","classNames","enter","exit","avatar","avatarLarge","avatarRow","greeting","addressRow","linkButton","sideLinkButton","HomeProfile","Avatar","src","getGreeting","PhoneAndroid","smDown","mdUp","AccountProfile","howLong","dateRegistered","hour","joined","years","months","yr","mth","UserProfile","header","numbersRow","accordionSummary","accordionDetails","summary","borderTop","icon","down","sideManageButton","borderColor","rechargeButton","marginRight","ServiceForwarding","Schedule","Chat","Voicemail","FormatListNumbered","Block","ArrowRightAlt","LowCreditWarning","ServicesCard","lighten","headerRow","RecentCalls","sid","borderBottomWidth","AccordionPanelHeader","AccordionPanel","PanelHeader","Panel","RecentPurchases","isWide","CreditStatus","bgColor","textBox","BalanceCard","displayBalance","btn","btn2","AccountBanner","isClosed","closed","WatchLaterOutlined","RemoveCircle","blue","trialExpiry","isBefore","fromNow","trialEnds","avatars","AvatarSelectControlled","baseUrl","CreditCardPanel","cardLogo","PaymentMethodCard","canRemove","fetching","isLoaded","cardRef","ExpanderTableContext","rowsTotal","rowsFiltered","useImperativeHandle","isloaded","processData","ceil","useExpanderTable","TableHeader","columnDefs","columnClickHandler","col","clickHandler","ColumnHeader","buttonStyle","iconStyle","ExpanderTableHeader","warn","renderer","PagerControls","onClickNext","onClickPrevious","onClickFirst","onClickLast","is375","widthOffset","is460","is560","first","last","ExpanderTablePager","setIsVisible","getBoundingClientRect","innerHeight","visibleNow","viewPortOffset","currentTop","floor","disableUnderline","ExpanderTableContent","setShowLoader","timer","setTimeout","clearTimeout","RenderObject","stringify","ExpanderTableRows","square","grey","FAQAccordion","StripeInput","Component","elementRef","onReady","element","AddPaymentMethod","elements","useElements","useStripe","cardholder","cardNumber","cardExpiry","cardCvc","done","elOptions","base","updateCardholder","onElementChange","err","elementType","errorMessage","msg","InputLabelProps","shrink","InputProps","inputComponent","CardNumberElement","CardExpiryElement","CardCvcElement","cardElement","getElement","createToken","CardForm","storageInfo","decline_code","StripeCardError","InvoiceStatus","deviceRow","EndpointCard","deviceMake","deviceName","deviceOS","deviceOSVersion","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM"],"mappings":"gQAsFeA,UAzEU,SAAC,GAAqF,IAApFC,EAAmF,EAAnFA,GAAIC,EAA+E,EAA/EA,KAAMC,EAAyE,EAAzEA,MAAOC,EAAkE,EAAlEA,SAAUC,EAAwD,EAAxDA,MAAOC,EAAiD,EAAjDA,WAAiD,IAArCC,kBAAqC,MAA1B,GAA0B,EAAtBC,EAAsB,EAAtBA,SAAUC,EAAY,EAAZA,OAAY,EAChFC,mBAAS,CAACC,cAAc,IADwD,mBACnGC,EADmG,KAC5FC,EAD4F,KAuBpGC,EAAS,SAACC,GACZ,OAAQA,GACJ,KAAK,EAAI,MAAO,QAChB,KAAK,EAAI,MAAO,OAChB,KAAK,EAAI,MAAO,KAChB,KAAK,EAAI,MAAO,OAChB,KAAK,EAAI,MAAO,SAChB,QAAS,MAAO,SAIxB,OACI,eAAC,IAAD,CACIC,QAAQ,WACRX,MAAOA,EACPY,UAAU,EAHd,UAKI,cAAC,IAAD,CAAYC,QAASjB,GAAM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ACH,cAAC7W,GAAA,EAAD,CAAkB7C,KAAM,GAAI1O,UAAU,QAEtC,2DAOxB,cAAC4hB,GAAA,EAAD,CAAQqC,MAAI,EAAZ,SACI,cAACnjB,GAAA,EAAD,CAAQ1U,QAAQ,WACR2Q,MAAM,UACNiD,UAAWhB,EAAQykB,WAF3B,gCCjGL2K,GAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqBtgC,MAAK,YAAkD,IAA/CugC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCDdO,IAASruB,OAEL,cAAC,GAAD,IAEF4C,SAASC,eAAe,SAM1BgrB,GAAgBvgB,QAAQC,O","file":"static/js/main.e7f8f1a8.chunk.js","sourcesContent":["import React, {useState} from \"react\";\nimport {\n FormControl,\n FormHelperText,\n IconButton,\n InputAdornment,\n InputLabel,\n OutlinedInput,\n Tooltip\n} from \"@material-ui/core\";\nimport {Visibility, VisibilityOff} from \"@material-ui/icons\";\nimport zxcvbn from 'zxcvbn';\n\nconst NewPasswordField = ({id, name, label, password, error, helperText, exclusions=[], onChange, onBlur}) => {\n const [state, setState] = useState({showPassword: true})\n\n const handlePasswordChange = (e) => {\n // Calculate the score on what the password will be\n const result = zxcvbn(e.target.value, exclusions);\n // update the parent\n onChange(e, {\n score: result.score,\n rating: rating(result.score),\n warning: result.feedback.warning,\n suggestions: result.feedback.suggestions\n });\n }\n\n const handleClickShowPassword = (e) => {\n setState({...state, showPassword: !state.showPassword});\n }\n\n const handleMouseDownPassword = (e) => {\n e.preventDefault();\n }\n\n const rating = (score) => {\n switch (score) {\n case 0: return 'Awful'\n case 1: return 'Weak'\n case 2: return 'OK'\n case 3: return 'Good'\n case 4: return 'Strong'\n default: return 'Weak'\n }\n }\n\n return (\n \n {label || \"New Password\"}\n \n \n \n {state.showPassword ? : }\n \n \n \n }\n />\n {helperText}\n \n )\n}\n\nexport default NewPasswordField;","import ky from \"ky\";\n\n\n/**\n * httpError returns a promise that accepts an HTTP error response and resolves to a\n * standardised error object. The error object contains the HTTP status code and text and\n * a data property that will be an object if the server returned JSON or a string.\n *\n * @param error\n * @returns {Promise}\n */\nexport function httpError(error) {\n\n return new Promise((resolve) => {\n\n if (error instanceof ky.HTTPError) {\n //console.log('error type is ky.HTTPError')\n // We got a response from the server\n // Read the body to see if the server returned anything\n error.response.text().then(body => {\n // Convert the body to json. If it fails, fall back to the string\n let data;\n try {\n data = JSON.parse(body)\n }\n catch {\n data = body;\n }\n //console.log('httpError: error.response.status =', error.response.status)\n //console.log('httpError: error.response.statusText =', error.response.statusText)\n //console.log('httpError: data =', data)\n\n resolve({\n status: error.response.status,\n statusText: error.response.statusText,\n data\n })\n })\n\n } else if (error instanceof ky.TimeoutError) {\n // We timed out\n resolve({status: 0, statusText: 'The request timed out', data: null})\n\n } else {\n // It's a low level error. Networking issue?\n //console.log('httpError: unrecognised error type. error =', error);\n resolve( {status: 0, statusText: 'Check your internet connection', data: null})\n }\n })\n\n}\n\nconst exportedObject = {httpError}\n\nexport default exportedObject;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * AuthService provides user authentication API services\n */\nclass AuthService {\n\n signInWithEmailAndPassword = (email, password, willRemember, auth) => {\n // Sign in somehow - simulate with a delay now\n return new Promise((resolve, reject) => {\n\n const formData = new FormData();\n formData.append('username', email);\n formData.append('password', password);\n formData.append('remember', willRemember ? 'true' : 'false');\n formData.append('auth', auth ? auth : 'pw');\n formData.append('property', 'phonethru');\n\n // Post the formData to the login endpoint.\n ky.post('/api/v2/auth/login', { body: formData }).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * whoAmI returns data about the logged in user.\n *\n * @returns {Promise}\n */\n whoAmI = () => {\n\n return new Promise((resolve, reject) => {\n // hit the 'whoami' endpoint to see if we have a login cookie.\n ky.get('/api/v2/auth/whoami').json()\n .then( data => {\n resolve(data);\n })\n .catch(error => {\n if (error instanceof ky.HTTPError) {\n // We got a response from the server\n\n // 401 errors mean we're not authenticated which is what we're\n // trying to determine so it's not actually an error for our purposes\n if (error.response.status === 401) {\n resolve(null)\n return\n }\n\n // At this point the server response is an actual error...\n // Read the body to see if the server returned anything\n error.response.text().then(body => {\n // Convert the body to json. If it fails, fall back to the string\n let data;\n try {\n data = JSON.parse(body)\n } catch {\n data = body;\n }\n //console.log('promise', body)\n reject({\n status: error.response.status,\n statusText: error.response.statusText,\n data\n })\n })\n\n } else if (error instanceof ky.TimeoutError) {\n // We timed out\n reject({status: 0, statusText: 'The request timed out', data: null})\n } else {\n // It's a low level error. Networking issue?\n //console.log('error looks to be terminal')\n reject({status: 0, statusText: 'Check your internet connection', data: null})\n }\n })\n })\n\n }\n\n /**\n * Log out the current user\n * @returns {Promise}\n */\n logout = () => {\n // Perform the logout\n return new Promise( (resolve, reject) => {\n //console.log('logging out')\n ky.post('/api/v2/auth/logout')\n .then(() => resolve())\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n requestPasswordReset = (email) => {\n //console.log('AccountService.requestPasswordReset', email);\n return new Promise((resolve, reject) => {\n ky.post('/api/v2/auth/reset', {json: {email}})\n .then(() => resolve())\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n resetPassword = (obj) => {\n //console.log('AccountService.resetPassword', obj);\n return new Promise((resolve, reject) => {\n ky.post('/api/v2/auth/reset', {json: obj})\n .then(() => resolve())\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n requestOTP = (username) => {\n // Request a one-time password\n //console.log('AccountService.requestOTP', username);\n return new Promise((resolve, reject) => {\n ky.post('/api/v2/auth/otp', {json: {username}}).json()\n .then(response => resolve(response))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n}\n\n// Create a singleton instance of the service to export\nconst instance = new AuthService();\n\nexport default instance;","\n/***\n * Converts the passed text to an Australian E.164 phone number if possible\n * otherwise returns the passed value\n *\n * @param text\n * @returns {*}\n */\nexport default function e164ify(text) {\n // Strip all non-digits from the text\n let num = text.toString().replace(/\\D/g,'');\n // Strip any leading 0\n num = num.replace(/^0/g, '');\n // If we have 9 digits, treat it as a phone number\n if (num.length === 9) {\n return '+61' + num;\n }\n // If we have 11 digits and it starts with 61, it's already an E164 number\n if (num.length === 11 && num.startsWith('61')) {\n return '+' + num\n }\n return text;\n}\n","import ky from 'ky'\nimport { httpError } from '../utils/errors'\nimport e164ify from \"../utils/e164\";\n\n/**\n * AccountService provides account API services\n */\nclass AccountService {\n\n /**\n * get retrieves the account from the server\n *\n * @param id\n * @returns {Promise}\n */\n get = (id) => {\n //console.log('AccountService.get() id=', id)\n return new Promise((resolve, reject) => {\n // Get the account data, transforming any errors into a standardised error object\n ky.get('/api/v2/accounts/'+id).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * patch applies a partial update to an account\n *\n * @param accountId\n * @param patch\n * @returns {Promise}\n */\n patch = (accountId, patch) => {\n //console.log('AccountService.patch() accountId:', accountId, 'patch=', patch)\n return new Promise((resolve, reject) => {\n const patchSet = {object: 'account', id: accountId, properties: patch};\n const url = `/api/v2/accounts/${accountId}`\n ky.patch(url, {json: patchSet})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * close deactivates an account pending finalisation\n * PhoneThru accounts are finalised immediately\n *\n * @param accountId\n * @param reason\n * @returns {Promise}\n */\n close = (accountId, reason) => {\n //console.log('AccountService.close() accountId:', accountId, 'reason=', reason)\n return new Promise((resolve, reject) => {\n const data = {reason};\n const url = `/api/v2/accounts/${accountId}`\n ky.delete(url, {json: data})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * removePaymentMethod removes the default payment method (card) for the account\n *\n * @param accountId\n * @param paymentId\n * @returns {Promise}\n */\n removePaymentMethod = (accountId, paymentId) => {\n //console.log('AccountService.removePaymentMethod() accountId:', accountId, 'paymentId', paymentId)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/accounts/${accountId}/payment-method`\n ky.delete(url)\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * setPaymentMethod sets the default payment method (card) for the account\n * @param accountId\n * @param tokenId\n * @returns {Promise}\n */\n setPaymentMethod = (accountId, tokenId) => {\n //console.log('AccountService.setPaymentMethod() accountId:', accountId, 'token', tokenId)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/accounts/${accountId}/payment-method`\n const data = {token: tokenId};\n ky.put(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * patchService applies a partial update to an account's service\n *\n * @param accountId\n * @param serviceId\n * @param patch\n * @returns {Promise}\n */\n patchService = (accountId, serviceId, patch) => {\n //console.log('AccountService.patchService() accountId:', accountId, 'serviceId', serviceId, 'patch=', patch)\n return new Promise((resolve, reject) => {\n const patchSet = {object: 'service', id: serviceId, properties: patch};\n const url = `/api/v2/accounts/${accountId}/services/${serviceId}`\n ky.patch(url, {json: patchSet})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n setServiceAction = (accountId, serviceId, action) => {\n //console.log('AccountService.setServiceAction() accountId:', accountId, 'serviceId', serviceId, 'action=', action)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/accounts/${accountId}/services/${serviceId}/action`\n ky.post(url, {json: action})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n transferService = (accountId, serviceId, rxMobileNumber, rxPassword) => {\n //console.log('AccountService.transferService() accountId:', accountId, 'serviceId', serviceId, 'rxMobileNumber', rxMobileNumber, 'rxPassword', rxPassword)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/accounts/${accountId}/services/${serviceId}/transfer`\n const data = {\n accountId,\n serviceId,\n username: e164ify(rxMobileNumber).substr(1) + '@phonethru.com',\n password: rxPassword\n }\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n getServices = (accountId) => {\n //console.log('AccountService.getServices() accountId=', accountId)\n return new Promise((resolve, reject) => {\n // Get the account services data, transforming any errors into a standardised error object\n ky.get(`/api/v2/accounts/${accountId}/services`).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n reactivationQuery = (accountId) => {\n //console.log('AccountService.reactivationQuery() accountId=', accountId)\n return new Promise((resolve, reject) => {\n // Get the account services data, transforming any errors into a standardised error object\n ky.get(`/api/v2/accounts/${accountId}/reactivate`).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n reactivate = (accountId) => {\n //console.log('AccountService.reactivate() accountId=', accountId)\n return new Promise((resolve, reject) => {\n // Post a reactivation request.\n const url = `/api/v2/accounts/${accountId}/reactivate`;\n const data = { numbers: [] }; // don't want to auto-activate any numbers\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n}\n\n// Create a singleton instance of the service to export\nconst instance = new AccountService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * SignupService provides signup API services\n */\nclass SignupService {\n\n /**\n * verifyMobile sends a verification code to the passed mobile number.\n * The returned API result contains otpId that identifies the verification attempt\n * @param number\n * @returns {Promise}\n */\n verifyMobile = (number) => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/signup/pt/verify`\n const data = {address: number};\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * confirmMobile confirms a verification attempt identified by otpId with a code\n * @param verifyId\n * @param code\n * @returns {Promise}\n */\n confirmMobile = (verifyId, code) => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/signup/pt/verify`\n const data = {verifyId, code};\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * createAccount creates a phonethru account.\n * data is an object with the following properties\n * - firstName\n * - lastName\n * - mobileNumber\n * - mobileVerifyId\n * - password\n * It returns 201 if the account was created successfully\n * @param data\n * @returns {Promise}\n */\n createAccount = (data) => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/signup/pt`\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n}\n\n// Create a singleton instance of the service to export\nconst instance = new SignupService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * CallsService provides Call Log API services\n */\nclass CallsService {\n\n getForAccount = (accountId, offset= 0, length= 10, order='startTime,desc', search= '') => {\n\n /*\n console.warn('Faked call data incoming!')\n const fakeCalls = {\n calls: [\n {\n sid: 'b33f366c-e060-45d4-bd21-c6a81e86317c',\n to: '+61770101234',\n from: '+61355502479',\n direction: 'inbound',\n status: 'answered',\n startTime: '2021-07-05 02:37:13',\n endTime: '2021-07-05 02:41:44',\n duration: 271,\n },\n {\n sid: 'c5a56bec-af9e-4877-abb9-c5a2f193b5b4',\n to: '+61770101234',\n from: '+61355502479',\n direction: 'inbound',\n status: 'answered',\n startTime: '2021-07-04 02:32:12',\n endTime: '2021-07-04 02:32:28',\n duration: 16,\n\n },\n {\n sid: '75ca4963-3b2f-4981-9069-40de7d9eca93',\n to: '+61770101234',\n from: '+61491573087',\n direction: 'inbound',\n status: 'noanswer',\n startTime: '2021-07-03 05:31:50',\n endTime: '2021-07-03 05:31:50',\n duration: 0,\n\n }\n ],\n total: 120,\n filtered: 100\n }\n */\n\n let url = `/api/v2/accounts/${accountId}/calls` +\n `?offset=${offset}&length=${length}&order=${encodeURI(order)}&search=${encodeURI(search)}`;\n\n return new Promise((resolve, reject) => {\n // Get the account data, transforming any errors into a standardised error object\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new CallsService();\n\nexport default instance;","import ky from 'ky'\nimport {httpError} from '../utils/errors'\n\n/**\n * UserService provides user API services\n */\nclass UserService {\n\n /**\n * patch applies a partial update to a user\n *\n * @param accountId\n * @param userId\n * @param patch\n * @returns {Promise}\n */\n patch = (accountId, userId, patch) => {\n //console.log('UserService.patch() accountId:', accountId, 'userId', userId, 'patch=', patch)\n return new Promise((resolve, reject) => {\n const patchSet = {object: 'user', id: userId, properties: patch};\n const url = `/api/v2/accounts/${accountId}/users/${userId}`\n ky.patch(url, {json: patchSet})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * setPassword changes the user's password\n *\n * @param accountId\n * @param userId\n * @param password\n * @returns {Promise}\n */\n setPassword = (accountId, userId, password) => {\n //console.log('UserService.patch() accountId:', accountId, 'userId', userId, 'password', password)\n return new Promise((resolve, reject) => {\n const request = {password};\n const url = `/api/v2/accounts/${accountId}/users/${userId}/password`\n ky.put(url, {json: request})\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new UserService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * NumberService provides landline number search API services\n */\nclass NumberService {\n\n getRegions = () => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/purchase/regions`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n getNumbers = (regionId) => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/purchase/regions/${regionId}/numbers`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n getPriorNumbers = (accountId) => {\n // Returns a list of prior numbers allocated to this account and their availability\n return new Promise((resolve, reject) => {\n const url = `/api/v2/purchase/accounts/${accountId}/numbers/prior`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new NumberService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * SkuService provides SKU retrieval API services\n */\nclass SkuService {\n\n getSku = (skuId) => {\n //console.log('SkuService.getSku()', skuId)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/skus/${skuId}`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n getSkus = () => {\n //console.log('SkuService.getSkus()')\n return new Promise((resolve, reject) => {\n const url = `/api/v2/skus?f=type:credit`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new SkuService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * PurchaseService provides purchase API services\n */\nclass PurchaseService {\n\n purchase = (request) => {\n //console.log('PurchaseService.purchase() request:', request)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/purchase/accounts/${request.accountId}`\n ky.post(url, {json: request}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n}\n\n// Create a singleton instance of the service to export\nconst instance = new PurchaseService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * NotifyService provides notification request API services\n */\nclass NotifyService {\n\n addRequest = (data) => {\n //console.log('NotifyService.addRequest() data:', data)\n return new Promise((resolve, reject) => {\n const url = `/api/v2/notify/zone`\n ky.post(url, {json: data}).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new NotifyService();\n\nexport default instance;","import ky from 'ky'\nimport { httpError } from '../utils/errors'\n\n/**\n * InvoiceService provides Call Log API services\n */\nclass InvoiceService {\n\n search = (accountId, offset= 0, length= 10, order='date,desc', search= '') => {\n\n let url = `/api/v2/accounts/${accountId}/invoices` +\n `?offset=${offset}&length=${length}&order=${encodeURI(order)}&search=${encodeURI(search)}`;\n\n //console.log('InvoiceService.search() url', url, order)\n return new Promise((resolve, reject) => {\n // Get the account data, transforming any errors into a standardised error object\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new InvoiceService();\n\nexport default instance;","import ky from 'ky';\nimport { httpError } from '../utils/errors';\nimport moment from 'moment';\n\n/**\n * MetricService provides metric API services\n */\nclass MetricService {\n\n getPaymentsLast30Days = (id) => {\n //console.log('MetricService.get() id=', id)\n return new Promise((resolve, reject) => {\n // Get the metric data, transforming any errors into a standardised error object\n const ets = moment().valueOf();\n const sts = moment().subtract(30,'days').valueOf();\n const url = `/api/v2/accounts/${id}/metrics/payment-total?sts=${sts}&ets=${ets}`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n getChargesLast30Days = (id) => {\n //console.log('MetricService.get() id=', id)\n return new Promise((resolve, reject) => {\n // Get the metric data, transforming any errors into a standardised error object\n const ets = moment().unix();\n const sts = moment().subtract(30,'days').unix();\n\n //console.log('getChargesLast30days ets=', ets, 'sts=',sts, 'moment().valueOf=',moment().valueOf() )\n\n const url = `/api/v2/accounts/${id}/metrics/charge-total?sts=${sts}&ets=${ets}`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new MetricService();\n\nexport default instance;","import ky from 'ky'\nimport {httpError} from '../utils/errors'\n\n/**\n * EndpointService provides SIP endpoint API services\n */\nclass EndpointService {\n /**\n * getForAccount retrieves all endpoints for a given account from the server\n *\n * @param accountId\n * @returns {Promise}\n */\n getForAccount = (accountId) => {\n return new Promise((resolve, reject) => {\n // Get the endpoint data, transforming any errors into a standardised error object\n const url = `/api/v2/accounts/${accountId}/endpoints`\n ky.get(url).json()\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n\n /**\n * deactivate deactivates an endpoint\n *\n * @param accountId\n * @param endpointId\n * @returns {Promise}\n */\n deactivate = (accountId, endpointId) => {\n return new Promise((resolve, reject) => {\n const url = `/api/v2/accounts/${accountId}/endpoints/${endpointId}`\n ky.delete(url)\n .then(result => resolve(result))\n .catch(error => httpError(error).then(er => reject(er)))\n })\n }\n}\n\n// Create a singleton instance of the service to export\nconst instance = new EndpointService();\n\nexport default instance;","\nconst initialState = {\n account: {\n id: 0,\n services: [],\n dialActions: [],\n isFetching: false,\n didInvalidate: false,\n error: null,\n },\n user: {\n id: 0,\n },\n endpoint: {}\n}\n\nexport default initialState;","import React, { createContext, useReducer } from 'react';\nimport initialState from \"./initial-state\";\n\n// Create a context for the store\nexport const StoreContext = createContext(initialState);\n\n// Create a Provider HOC for the store\nexport const StoreProvider = ({ reducer, initialState, children }) => {\n return (\n \n );\n}\n","import {useContext} from \"react\";\nimport {StoreContext} from \"../store/store\";\n\n/**\n * store/hooks/index.js\n *\n * Returns an array containing the current state object, and store action dispatch method\n * Usage: const [state, dispatch] = useStore();\n */\n\nconst useStore = () => useContext(StoreContext);\n\nexport default useStore;","/**\n * store/actions/types.js\n *\n * Constants for action types\n *\n */\n\nexport const SET_USER = 'SET_USER'\nexport const CLEAR_USER = 'CLEAR_USER'\nexport const SET_ACCOUNT = 'SET_ACCOUNT'\nexport const CLEAR_ACCOUNT = \"CLEAR_ACCOUNT\"\nexport const FETCH_ACCOUNT = 'FETCH_ACCOUNT'\nexport const RECEIVE_ACCOUNT = 'RECEIVE_ACCOUNT'\nexport const FETCH_ACCOUNT_ERROR = 'FETCH_ACCOUNT_ERROR'\nexport const INVALIDATE_ACCOUNT = \"INVALIDATE_ACCOUNT\"\nexport const SET_ACCOUNT_PAYMENT_METHOD = \"SET_ACCOUNT_PAYMENT_METHOD\"\nexport const SET_SERVICES = \"SET_SERVICES\"\nexport const SET_ENDPOINT = \"SET_ENDPOINT\"\nexport const CLEAR_ENDPOINT = \"CLEAR_ENDPOINT\"\n","/**\n * store/actions/index.js\n *\n * Defines the available store actions.\n *\n * Actions can have an 'effect' function which acts like the useEffect Hook in that it is\n * executed prior being delegated to its reducer. If effect() return a truthy value the\n * action is cancelled and the store state is not affected.\n *\n */\n\nimport * as types from './types';\nimport initialState from \"../store/initial-state\";\nimport {AccountService} from \"../../services\";\n\n\n/**\n * setUser updates the store's user object e.g. after login.\n *\n * @param user\n * @returns {{payload: *, type: string}}\n */\nexport const setUser = user => ({\n type: types.SET_USER,\n payload: user\n});\n\n/**\n * clearUser removes the store's user object eg. after logout\n *\n * @returns {{payload: {}, type: string}}\n */\nexport const clearUser = () => ({\n type: types.CLEAR_USER,\n payload: {...initialState.user}\n});\n\n/**\n * setEndpoint updates the store's endpoint object.\n *\n * @param endpoint\n * @returns {{payload: *, type: string}}\n */\nexport const setEndpoint = endpoint => ({\n type: types.SET_ENDPOINT,\n payload: endpoint\n});\n\n/**\n * clearEndpoint removes the store's endpoint object eg. after deactivation\n *\n * @returns {{payload: {}, type: string}}\n */\nexport const clearEndpoint = () => ({\n type: types.CLEAR_ENDPOINT,\n payload: {...initialState.endpoint}\n});\n\n/**\n * setAccount updates the store's account object\n *\n * @param account\n * @returns {{payload: *, type: string}}\n */\nexport const setAccount = account => ({\n type: types.SET_ACCOUNT,\n payload: account\n});\n\n/**\n * clearAccount resets the store' account object\n * @param account\n * @returns {{payload: {blockeds: [], dialActions: [], isFetching: boolean, didInvalidate: boolean, id: number, greetings: [], voicemails: [], services: [], error: null, contacts: [], users: []}, type: string}}\n */\nexport const clearAccount = account => ({\n type: types.CLEAR_ACCOUNT,\n payload: {...initialState.account}\n});\n\n/**\n * fetchAccount fetches the account from the server asynchronously if the account\n * has not yet been set or have been invalidated.\n *\n * @param id\n * @param state\n * @param dispatch\n * @returns {{payload: *, effect: (function(): boolean), type: string}}\n */\nexport const fetchAccount = (id, state, dispatch) => ({\n type: types.FETCH_ACCOUNT,\n payload: id,\n effect: () => fetchAccountIfNeeded(id, state, dispatch)\n});\n\n/**\n * receiveAccount updates the account fetched from the server.\n *\n * @param account\n * @returns {{payload: *, type: string, receivedAt: number}}\n */\nexport const receiveAccount = account => ({\n type: types.RECEIVE_ACCOUNT,\n payload: account,\n receivedAt: Date.now()\n});\n\n/**\n * fetchAccountError updates the store's account with an API error encountered by the last fetch.\n *\n * @param error\n * @returns {{payload: *, type: string}}\n */\nexport const fetchAccountError = error => ({\n type: types.FETCH_ACCOUNT_ERROR,\n payload: error\n});\n\n/**\n * invalidateAccount invalidates the account object so it will be reloaded by the next fetchAccount action\n * @returns {{payload: {}, type: string}}\n */\nexport const invalidateAccount = () => ({\n type: types.INVALIDATE_ACCOUNT,\n payload: {}\n});\n\nexport const setAccountPaymentMethod = paymentMethod => ({\n type: types.SET_ACCOUNT_PAYMENT_METHOD,\n payload: paymentMethod,\n})\n\nexport const setServices = services => ({\n type: types.SET_SERVICES,\n payload: services,\n})\n\n// fetchAccountIfNeeded fetches the account from the server if it has not been loaded yet or has been invalidated.\nconst fetchAccountIfNeeded = (id, state, dispatch) => {\n if (id !==0 && shouldFetchAccount(state)) {\n AccountService.get(id)\n .then(account => dispatch(receiveAccount(account)))\n .catch(error => dispatch(fetchAccountError(error)))\n return false\n }\n return true\n}\n\n// shouldFetchAccount returns true if the account needs to be fetched from the server.\nconst shouldFetchAccount = (state) => {\n const account = state.account\n if (account.isFetching){\n return false\n } else if (!account.id) {\n return true\n } else {\n return account.didInvalidate\n }\n}\n\n","import React from \"react\";\nimport { AuthService } from \"../../services\";\nimport { SplashScreen, ErrorScreen } from \"../../components\";\nimport {useStore} from \"../../store\";\nimport {clearUser, clearAccount, setUser} from \"../../store/actions\";\n\n\n// Create a Context for our auth state\nconst AuthContext = React.createContext({})\n\n// This is an implementation of the AuthProvider as a functional component\nfunction AuthProvider({children}) {\n const [, dispatch] = useStore();\n const [state, setState] = React.useState({\n status: 'pending',\n error: null,\n user: null,\n })\n\n // Effect hook runs when component is loaded and updated\n React.useEffect(() => {\n\n // Get the user and set the state\n AuthService.whoAmI()\n .then((user) => {\n\n // Update the local state so the provider knows if we're logged in.\n setState({status: 'success', error: null, user: user || null})\n\n // Update the global store\n dispatch(setUser(user));\n\n })\n .catch(error => setState({status: 'error', error, user: null}))\n\n }, [dispatch]) // <- empty deps means we won't update after initial load\n\n /**\n * Logs in a user and adds the returned user object to the global store.\n *\n * @param userName\n * @param password\n * @param willRemember\n * @param nextUrl\n * @returns {Promise}\n */\n const login = (userName, password, willRemember, auth) => {\n // Perform the login\n return new Promise((resolve, reject) => {\n AuthService.signInWithEmailAndPassword(userName, password, willRemember, auth)\n .then(user => {\n //console.log('login successful, updating user in Store')\n // Update the auth context\n setState({status: 'success', error: null, user})\n\n // Update the global store\n dispatch(setUser(user));\n\n resolve();\n })\n .catch(error => {\n // If we're trying to sign in - pass all errors back to the login page\n reject(error);\n })\n })\n }\n\n /**\n * Logs out a user and clears the user from the global store.\n */\n const logout = (history) => {\n\n // Go to the login page page before we log out.\n // If we don't, the router will redirect us to the login page and store\n // our current location in the state. Login will then send us back to this page.\n if (history) {\n history.push(\"/login\");\n }\n\n AuthService.logout().then(() => {\n setState( { status: 'success', error: null, user: null });\n dispatch(clearUser())\n dispatch(clearAccount())\n })\n }\n\n\n // Figure out what we're going to render based on the authentication status\n let result;\n if (state.status === 'pending') {\n result = \n } else if (state.status === 'error') {\n result = \n } else {\n result = children\n }\n\n return (\n \n {result}\n \n )\n}\n\n/**\n * AuthProvider returns another component based on the authentication state of the user.\n * AuthService is used to retrieve the logged in user. is returned while the API call\n * is in flight. A successful API call returns a user object if the user is logged in, or null if the\n * user is not logged in. An unsuccessful call returns an error.\n * If the API call succeeded AuthProvider returns it's children prop, otherwise an error is displayed.\n */\n/*\nclass AuthProvider extends Component {\n state = {\n status: 'pending',\n error: null,\n user: null\n }\n\n componentDidMount() {\n console.log('AuthProvider mounted');\n\n // Get the user and set the state\n AuthService.whoAmI()\n .then(user => {\n this.setState({status: 'success', error: null, user});\n })\n .catch( (error) => {\n this.setState({status: 'error', error, user: null});\n })\n }\n\n // Method to set the user property\n setUser = user => {\n console.log('Auth provider calling set user')\n this.setState({user})\n }\n\n // Method to clear the user property\n clearUser = () => {\n this.setState({user: null})\n }\n\n render() {\n let result;\n if (this.state.status === 'pending') {\n result = \n } else if (this.state.status === 'error') {\n result = \n } else {\n result = this.props.children\n }\n return (\n \n {result}\n \n )\n }\n}\n*/\n\n\nexport { AuthProvider, AuthContext };","import React from \"react\";\nimport {AuthContext} from \"../auth-provider\";\n\n/**\n * useAuthUser returns the current authentication state from a context\n *\n * @returns {{isError: boolean, isAuthenticated: *, isPending: boolean, isSuccess: boolean}}\n */\nfunction useAuthUser() {\n\n const state = React.useContext(AuthContext)\n const isPending = state.status === 'pending'\n const isError = state.status === 'error'\n const isSuccess = state.status === 'success'\n const isAuthenticated = state.user && isSuccess\n return {\n ...state,\n isPending,\n isError,\n isSuccess,\n isAuthenticated,\n }\n}\n\nexport default useAuthUser;","import * as user from './user';\nimport * as account from './account';\nimport * as endpoint from \"./endpoint\";\nimport * as types from '../actions/types'\n\n\n/**\n * createReducer creates a Store level 'master' reducer that delegates to another action-specific reducer\n * The action-specific reducers are passed in as 'handlers'. handlers is an object with action.type properties\n * and a reducer function for that action type as the property value.\n *\n * If an action has an 'effect' property that is a function, effect() is called prior to the action being passed\n * to the handler. If the effect function returns a \"truthy\" value, the action is not processed and the current\n * state is returned. This allows the effect function to cancel further processing.\n *\n * @param handlers\n * @returns {function(...[*]=)}\n */\nconst createReducer = handlers => (state, action) => {\n\n // We can't find a handler for the passed action type, return the state as is.\n if (!handlers.hasOwnProperty(action.type)) {\n //console.warn('handler not found for ', action);\n return state;\n }\n\n // If the action has an effect - call it\n if (typeof(action.effect) === 'function' ) {\n // If the action effect returns false, then don't execute the action\n const cancel = action.effect();\n if (cancel) {\n return state;\n }\n }\n\n //console.log('processing action:', action)\n\n // Otherwise run the reducer for the action type to modify and return the state.\n const newState = handlers[action.type](state, action);\n //console.log('post-action state:', newState);\n return newState;\n};\n\n// Create a reducer function that delegates to action-specific reducer functions.\nexport default createReducer({\n [types.SET_USER]: user.set,\n [types.CLEAR_USER]: user.clear,\n [types.SET_ACCOUNT]: account.set,\n [types.CLEAR_ACCOUNT]: account.set,\n [types.FETCH_ACCOUNT]: account.fetch,\n [types.RECEIVE_ACCOUNT]: account.receive,\n [types.INVALIDATE_ACCOUNT]: account.invalidate,\n [types.SET_ACCOUNT_PAYMENT_METHOD]: account.setPaymentMethod,\n [types.SET_SERVICES]: account.setServices,\n [types.SET_ENDPOINT]: endpoint.set,\n [types.CLEAR_ENDPOINT]: endpoint.clear,\n})","/**\n * store/reducers/account/index.js\n *\n * Reducers for the account branch of the state tree.\n *\n * These reducers are delegated to by the root reducer in\n * store/reducers/index.js\n *\n */\n\n/**\n * sets the payload to state.account and clears the data fetching flags\n *\n * @param state\n * @param payload\n * @returns {{account: {isFetching: boolean, didInvalidate: boolean, error: null}}}\n */\nexport const set = (state, { payload }) => ({\n ...state,\n account: {\n ...payload,\n isFetching: false,\n didInvalidate: false,\n error: null,\n },\n});\n\n/**\n * sets the data fetching flags on state.account to indicate we're loading the account\n *\n * @param state\n * @returns {{account: {isFetching: boolean, didInvalidate: boolean, error: null}}}\n */\nexport const fetch = (state) => ({\n ...state,\n account: {\n ...state.account,\n isFetching: true,\n didInvalidate: false,\n error: null,\n }\n});\n\n/**\n * sets a received account into the store and clears the data fetching flags\n *\n * @param state\n * @param payload\n * @param receivedAt\n * @returns {{account: {lastUpdated: *, isFetching: boolean, didInvalidate: boolean, error: null}}}\n */\nexport const receive = (state, { payload, receivedAt }) => ({\n ...state,\n account: {\n ...payload,\n isFetching: false,\n didInvalidate: false,\n error: null,\n lastUpdated: receivedAt,\n },\n})\n\n/**\n * sets the data fetching flags on the account to indicate an error.\n *\n * @param state\n * @param payload\n * @returns {{account: {isFetching: boolean, didInvalidate: boolean, error: *}}}\n */\nexport const fetchError = (state, { payload }) => ({\n ...state,\n account: {\n ...state.account,\n isFetching: false,\n didInvalidate: false,\n error: payload,\n }\n});\n\n/**\n * Sets the didInvalidate flag on the current account object.\n * The next fetch action will reload the account.\n *\n * @param state\n * @param payload\n * @returns {{account: {didInvalidate: boolean}}}\n */\nexport const invalidate = (state, { payload }) => ({\n ...state,\n account: {\n ...state.account,\n didInvalidate: true,\n }\n})\n\n\nexport const setPaymentMethod = (state, { payload }) => ({\n ...state,\n account: {\n ...state.account,\n paymentMethod: payload,\n }\n})\n\nexport const setServices = (state, { payload }) => ({\n ...state,\n account: {\n ...state.account,\n services: payload\n }\n})","/**\n * store/user/index.js\n *\n * Actions for the store's user object.\n *\n */\n\n\n/**\n * sets the user object to the payload\n *\n * @param state\n * @param payload\n * @returns {{user: *}}\n */\nexport const set = (state, { payload }) => ({\n ...state,\n user: payload,\n});\n\n/**\n * clears the user object.\n *\n * @param state\n * @returns {{user: {}}}\n */\nexport const clear = (state) => ({\n ...state,\n user: {},\n})\n","/**\n * store/endpoint/index.js\n *\n * Actions for the store's endpoint object.\n *\n */\n\n\n/**\n * sets the user object to the payload\n *\n * @param state\n * @param payload\n * @returns {{endpoint: *}}\n */\nexport const set = (state, { payload }) => ({\n ...state,\n endpoint: payload,\n});\n\n/**\n * clears the user object.\n *\n * @param state\n * @returns {{endpoint: {}}}\n */\nexport const clear = (state) => ({\n ...state,\n endpoint: {},\n})\n","\n\nconst getStripeKey = () => {\n if (process.env.REACT_APP_STAGE === 'beta' || process.env.NODE_ENV !== 'production') {\n return 'pk_test_okju7XyNRoXfDWH7eLhOKPws';\n } else {\n return 'pk_live_3lRDz0x8auyzbykJdLYkgKcM';\n }\n}\n\nexport default getStripeKey;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { VelocityComponent } from 'velocity-react';\nimport 'velocity-animate/velocity.ui';\n\nconst FuseAnimate = React.forwardRef((props, ref) => {\n const children = React.cloneElement(props.children, {\n style: {\n ...props.children.style,\n visibility: 'hidden'\n }\n });\n return (\n \n {children}\n \n );\n});\n\nFuseAnimate.propTypes = {\n children: PropTypes.element.isRequired\n};\n\nFuseAnimate.defaultProps = {\n animation: 'transition.fadeIn',\n runOnMount: true,\n targetQuerySelector: null,\n interruptBehavior: 'stop',\n visibility: 'visible',\n duration: 300,\n delay: 50,\n easing: [0.4, 0.0, 0.2, 1],\n display: null,\n setRef: undefined\n};\n\nexport default React.memo(FuseAnimate);\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgPhonethruLogo(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"100%\",\n height: \"100%\",\n viewBox: \"0 0 534 109\",\n xmlSpace: \"preserve\",\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 2\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"matrix(1,0,0,1,-7.19378,-6.005)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Capa_1\",\n transform: \"matrix(1,0,0,1,6.68,6.005)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.589,29.619C92.98,10.183 67.078,5.615 47.641,19.226C44.296,21.568 41.387,24.278 38.933,27.259L26.465,18.528C27.113,16.934 27.448,15.226 27.448,13.476C27.448,9.083 25.301,4.957 21.705,2.439C18.759,0.376 15.185,-0.417 11.643,0.208C8.1,0.833 5.014,2.8 2.95,5.746C1.356,8.021 0.514,10.689 0.514,13.463C0.514,17.856 2.661,21.982 6.257,24.5C9.203,26.563 12.777,27.356 16.32,26.731C18.85,26.285 21.145,25.151 23.003,23.468L26.493,25.912L35.439,32.176C27.483,45.253 27.103,61.908 35.498,75.779L26.493,82.085L23.003,84.529C21.145,82.846 18.85,81.712 16.32,81.266C12.777,80.641 9.204,81.434 6.257,83.497C2.661,86.016 0.514,90.142 0.514,94.535C0.514,97.309 1.356,99.977 2.949,102.254C5.013,105.2 8.1,107.167 11.642,107.792C15.185,108.417 18.758,107.624 21.704,105.561C25.301,103.043 27.447,98.917 27.447,94.524C27.447,92.774 27.111,91.065 26.464,89.472L38.962,80.72C53.058,98.187 77.691,101.721 96.287,88.7C115.724,75.09 120.292,49.188 106.589,29.619ZM19.759,17.515C17.524,20.706 13.126,21.482 9.934,19.248C7.975,17.876 6.926,15.687 6.926,13.464C6.926,12.067 7.339,10.656 8.202,9.424C10.437,6.233 14.835,5.457 18.027,7.691C19.986,9.063 21.035,11.252 21.035,13.476C21.036,14.873 20.623,16.284 19.759,17.515ZM18.028,100.308C14.836,102.542 10.438,101.767 8.203,98.575C7.341,97.343 6.927,95.932 6.927,94.535C6.927,92.312 7.976,90.123 9.936,88.751C13.127,86.516 17.525,87.292 19.76,90.484C20.623,91.715 21.036,93.126 21.036,94.524C21.036,96.746 19.987,98.935 18.028,100.308ZM47.337,40.508L59.408,48.96C58.775,50.537 58.431,52.237 58.431,53.981C58.431,55.731 58.767,57.439 59.415,59.034L48.402,66.745C43.564,58.217 43.394,48.428 47.337,40.508ZM88.196,77.143C76.657,85.222 61.266,82.664 51.87,71.682L62.877,63.975C64.735,65.658 67.03,66.791 69.56,67.238C73.103,67.862 76.676,67.07 79.622,65.007C83.219,62.489 85.365,58.363 85.365,53.969C85.365,51.196 84.523,48.527 82.93,46.251C80.867,43.305 77.779,41.337 74.237,40.713C70.696,40.088 67.121,40.88 64.174,42.944C63.706,43.271 63.265,43.626 62.848,44.004L50.637,35.454C52.087,33.718 53.789,32.144 55.732,30.782C67.816,22.322 84.614,25.628 93.718,38.631C102.822,51.633 100.279,68.682 88.196,77.143ZM64.844,53.981C64.844,51.757 65.893,49.569 67.853,48.196C71.044,45.961 75.442,46.736 77.677,49.929C78.54,51.16 78.953,52.571 78.953,53.968C78.953,56.192 77.904,58.381 75.945,59.754C72.753,61.988 68.355,61.213 66.12,58.021C65.258,56.789 64.844,55.378 64.844,53.981Z\",\n style: {\n fill: \"current\",\n fillRule: \"nonzero\"\n }\n })), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"matrix(1,0,0,1,136.68,32.005)\"\n }, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.689,38.657L15.217,38.657L15.217,54.677C14.605,54.841 13.746,54.993 12.64,55.131C11.533,55.269 10.374,55.338 9.163,55.338C6.562,55.338 4.748,54.894 3.721,54.005C2.7,53.123 2.19,51.519 2.19,49.195L2.19,8.958C2.19,7.852 2.48,6.996 3.059,6.39C3.639,5.778 4.481,5.307 5.588,4.978C6.477,4.649 7.487,4.372 8.62,4.148C9.752,3.924 10.914,3.73 12.106,3.565C13.291,3.401 14.48,3.292 15.672,3.24C16.863,3.18 17.983,3.151 19.03,3.151C26.556,3.151 32.254,4.741 36.126,7.921C39.998,11.101 41.933,15.457 41.933,20.988C41.933,23.641 41.449,26.061 40.481,28.247C39.514,30.433 38.114,32.3 36.284,33.847C34.46,35.394 32.235,36.583 29.607,37.412C26.98,38.242 24.007,38.657 20.689,38.657ZM15.128,28.454L19.859,28.454C22.572,28.454 24.728,27.832 26.328,26.588C27.935,25.343 28.738,23.477 28.738,20.988C28.738,16.069 25.808,13.61 19.948,13.61C18.947,13.61 18.075,13.636 17.331,13.689C16.587,13.742 15.853,13.824 15.128,13.936L15.128,28.454ZM61.844,54.677C61.291,54.841 60.514,54.993 59.514,55.131C58.519,55.269 57.413,55.338 56.195,55.338C53.706,55.338 51.909,54.937 50.802,54.133C49.696,53.33 49.143,51.766 49.143,49.442L49.143,0.751C49.756,0.579 50.559,0.412 51.553,0.247C52.547,0.082 53.654,0 54.872,0C57.361,0 59.145,0.415 60.225,1.244C61.305,2.074 61.844,3.651 61.844,5.975L61.844,15.516C63.003,14.963 64.317,14.505 65.785,14.143C67.247,13.788 68.837,13.61 70.556,13.61C75.863,13.61 80.024,14.95 83.04,17.63C86.055,20.309 87.563,24.333 87.563,29.699L87.563,54.677C87.01,54.841 86.233,54.993 85.232,55.131C84.238,55.269 83.132,55.338 81.914,55.338C79.425,55.338 77.627,54.937 76.521,54.133C75.415,53.33 74.862,51.766 74.862,49.442L74.862,30.449C74.862,27.96 74.24,26.189 72.995,25.136C71.751,24.089 70.161,23.565 68.225,23.565C66.954,23.565 65.795,23.743 64.748,24.099C63.695,24.461 62.727,24.889 61.844,25.383L61.844,54.677ZM137.588,34.765C137.588,38.025 137.091,40.968 136.096,43.595C135.095,46.222 133.67,48.448 131.82,50.272C129.97,52.102 127.744,53.514 125.143,54.509C122.542,55.503 119.639,56 116.432,56C113.226,56 110.309,55.516 107.681,54.548C105.054,53.58 102.812,52.184 100.956,50.36C99.105,48.537 97.683,46.311 96.689,43.684C95.688,41.057 95.188,38.084 95.188,34.765C95.188,31.552 95.701,28.632 96.728,26.005C97.749,23.378 99.188,21.152 101.044,19.328C102.895,17.505 105.133,16.095 107.761,15.101C110.388,14.107 113.278,13.61 116.432,13.61C119.586,13.61 122.46,14.107 125.054,15.101C127.655,16.095 129.884,17.518 131.741,19.368C133.591,21.225 135.026,23.453 136.047,26.054C137.074,28.649 137.588,31.552 137.588,34.765ZM116.432,23.565C113.831,23.565 111.813,24.533 110.378,26.469C108.936,28.405 108.215,31.17 108.215,34.765C108.215,38.466 108.919,41.271 110.328,43.18C111.744,45.09 113.779,46.044 116.432,46.044C119.086,46.044 121.117,45.077 122.526,43.141C123.935,41.205 124.64,38.413 124.64,34.765C124.64,31.223 123.922,28.471 122.486,26.509C121.051,24.547 119.033,23.565 116.432,23.565ZM170.941,29.284C170.941,27.348 170.358,25.909 169.193,24.968C168.034,24.033 166.486,23.565 164.551,23.565C163.221,23.565 162.002,23.73 160.896,24.059C159.79,24.388 158.766,24.803 157.825,25.304L157.825,54.677C157.272,54.841 156.498,54.993 155.504,55.131C154.509,55.269 153.403,55.338 152.185,55.338C149.696,55.338 147.899,54.937 146.793,54.133C145.686,53.33 145.133,51.766 145.133,49.442L145.133,23.812C145.133,22.37 145.44,21.208 146.052,20.326C146.658,19.444 147.514,18.614 148.62,17.837C150.391,16.566 152.672,15.542 155.464,14.765C158.256,13.995 161.341,13.61 164.719,13.61C170.743,13.61 175.402,14.937 178.694,17.59C181.986,20.244 183.632,24.033 183.632,28.958L183.632,54.677C183.02,54.841 182.216,54.993 181.222,55.131C180.228,55.269 179.122,55.338 177.904,55.338C175.415,55.338 173.63,54.937 172.551,54.133C171.477,53.33 170.941,51.766 170.941,49.442L170.941,29.284ZM225.361,36.84L203.79,40.069C204.567,42.393 205.923,44.04 207.859,45.007C209.795,45.975 212.034,46.459 214.575,46.459C216.9,46.459 219.086,46.14 221.133,45.501C223.174,44.869 224.834,44.165 226.111,43.388C226.941,43.941 227.632,44.662 228.185,45.551C228.738,46.433 229.015,47.401 229.015,48.454C229.015,49.725 228.626,50.831 227.849,51.773C227.072,52.708 226.009,53.495 224.659,54.133C223.303,54.772 221.696,55.243 219.84,55.546C217.989,55.849 215.958,56 213.746,56C210.48,56 207.464,55.542 204.699,54.627C201.933,53.719 199.556,52.365 197.568,50.568C195.579,48.77 194.016,46.515 192.877,43.802C191.744,41.096 191.178,37.916 191.178,34.262C191.178,30.726 191.744,27.658 192.877,25.057C194.016,22.456 195.537,20.3 197.44,18.588C199.349,16.869 201.535,15.608 203.998,14.805C206.46,14.008 208.992,13.61 211.593,13.61C214.411,13.61 216.995,14.038 219.346,14.894C221.696,15.75 223.714,16.951 225.4,18.499C227.086,20.046 228.399,21.9 229.341,24.059C230.282,26.219 230.753,28.57 230.753,31.111C230.753,32.882 230.282,34.209 229.341,35.091C228.399,35.98 227.072,36.563 225.361,36.84ZM211.672,22.983C209.295,22.983 207.316,23.714 205.736,25.175C204.162,26.644 203.237,28.76 202.961,31.526L218.802,28.958C218.697,27.516 218.062,26.16 216.896,24.889C215.737,23.618 213.996,22.983 211.672,22.983ZM272.649,14.933L262.526,14.933L262.526,54.677C261.92,54.841 261.064,54.993 259.958,55.131C258.852,55.269 257.69,55.338 256.472,55.338C253.871,55.338 252.047,54.894 251,54.005C249.947,53.123 249.42,51.519 249.42,49.195L249.42,14.933L236.393,14.933C236.063,14.38 235.747,13.663 235.444,12.78C235.135,11.891 234.98,10.923 234.98,9.877C234.98,7.993 235.395,6.624 236.225,5.768C237.054,4.912 238.19,4.484 239.632,4.484L275.889,4.484C276.271,5.037 276.6,5.755 276.877,6.637C277.153,7.519 277.291,8.487 277.291,9.541C277.291,11.365 276.877,12.721 276.047,13.61C275.217,14.492 274.085,14.933 272.649,14.933ZM296.541,54.677C295.988,54.841 295.214,54.993 294.22,55.131C293.226,55.269 292.119,55.338 290.901,55.338C288.412,55.338 286.615,54.937 285.509,54.133C284.402,53.33 283.849,51.766 283.849,49.442L283.849,0.751C284.455,0.579 285.258,0.412 286.259,0.247C287.254,0.082 288.36,0 289.578,0C292.067,0 293.848,0.415 294.921,1.244C296.001,2.074 296.541,3.651 296.541,5.975L296.541,15.516C297.706,14.963 299.02,14.505 300.481,14.143C301.95,13.788 303.54,13.61 305.252,13.61C310.565,13.61 314.727,14.95 317.736,17.63C320.751,20.309 322.259,24.333 322.259,29.699L322.259,54.677C321.706,54.841 320.933,54.993 319.938,55.131C318.944,55.269 317.838,55.338 316.62,55.338C314.131,55.338 312.333,54.937 311.227,54.133C310.121,53.33 309.568,51.766 309.568,49.442L309.568,30.449C309.568,27.96 308.946,26.189 307.701,25.136C306.457,24.089 304.867,23.565 302.931,23.565C301.66,23.565 300.498,23.743 299.444,24.099C298.398,24.461 297.43,24.889 296.541,25.383L296.541,54.677ZM344.412,25.798L344.412,54.677C343.859,54.841 343.086,54.993 342.091,55.131C341.097,55.269 339.991,55.338 338.773,55.338C336.284,55.338 334.486,54.937 333.38,54.133C332.274,53.33 331.721,51.766 331.721,49.442L331.721,24.138C331.721,22.591 332.106,21.264 332.877,20.158C333.654,19.052 334.733,18.084 336.116,17.254C337.94,16.148 340.139,15.279 342.714,14.647C345.281,14.008 347.978,13.689 350.802,13.689C356.551,13.689 359.425,15.625 359.425,19.496C359.425,20.438 359.286,21.294 359.01,22.064C358.733,22.841 358.43,23.506 358.101,24.059C356.83,23.783 355.283,23.644 353.459,23.644C351.853,23.644 350.246,23.839 348.64,24.227C347.04,24.616 345.63,25.139 344.412,25.798ZM403.81,46.459C403.81,49.06 402.677,51.052 400.412,52.435C398.641,53.541 396.455,54.41 393.854,55.042C391.26,55.681 388.386,56 385.232,56C382.243,56 379.533,55.681 377.104,55.042C374.667,54.41 372.577,53.402 370.832,52.02C369.094,50.637 367.741,48.895 366.773,46.795C365.805,44.688 365.321,42.143 365.321,39.16L365.321,15.012C365.927,14.848 366.727,14.683 367.721,14.519C368.722,14.354 369.828,14.272 371.04,14.272C373.528,14.272 375.313,14.686 376.393,15.516C377.472,16.346 378.012,17.923 378.012,20.247L378.012,39.072C378.012,41.56 378.648,43.345 379.919,44.425C381.189,45.505 382.987,46.044 385.311,46.044C386.753,46.044 387.958,45.919 388.926,45.669C389.894,45.419 390.625,45.156 391.119,44.879L391.119,15.012C391.672,14.848 392.445,14.683 393.44,14.519C394.44,14.354 395.547,14.272 396.758,14.272C399.247,14.272 401.044,14.686 402.151,15.516C403.257,16.346 403.81,17.923 403.81,20.247L403.81,46.459Z\",\n style: {\n fill: \"current\",\n fillRule: \"nonzero\",\n stroke: \"current\",\n strokeWidth: 1\n }\n })))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgPhonethruLogo);\nexport default __webpack_public_path__ + \"static/media/phonethru-logo.f17721b5.svg\";\nexport { ForwardRef as ReactComponent };","\n\nconst emailRegex = RegExp(/^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/);\nconst mobileRegex = RegExp(/^(?:\\+?(61))? ?(?:\\((?=.*\\)))?(0?[4])\\)? ?(\\d\\d(?:[- ](?=\\d{3})|(?!\\d\\d[- ]?\\d[- ]))\\d\\d[- ]?\\d[- ]?\\d{3})$/ )\n\nexport const isValidEmail = (email) => {\n return emailRegex.test(email);\n}\n\nexport const isValidMobile = (number) => {\n return mobileRegex.test(number)\n}","import e164ify from \"./e164\";\n\nexport default function mobileLogin(mobileNumber) {\n return e164ify(mobileNumber).replace(/^\\+/, '') + '@phonethru.com'\n};\n","\n\n/***\n * Formats value as an Australian phone number\n *\n * @param value\n * @returns {*}\n */\nexport default function ausPhone(value) {\n\n if (typeof(value) === 'undefined') {\n return value;\n }\n /***\n * ausPhone takes an australian phone number in E164 format\n * and returns a formatted version with the country code removed\n */\n if (value.startsWith('+61') && value.length === 12) {\n if (value.startsWith('+614')) {\n // Format as a mobile number\n // +61414600261 => 0414 600 261\n return '0' + value.substring(3, 6) + ' ' + value.substring(6, 9) + ' ' + value.substring(9)\n } else {\n // format as a land line\n // +61390181851 => 03 9018 8151\n return '0' + value.substring(3, 4) + ' ' + value.substring(4, 8) + ' ' + value.substring(8)\n }\n } else {\n // return as-is\n return value;\n }\n}\n","import React, {useContext, useEffect, useRef, useState} from \"react\";\nimport {AuthContext} from \"../../components/auth-provider\";\nimport {\n Card,\n CardContent,\n Typography,\n TextField,\n FormControl,\n Button,\n FormHelperText, Tooltip\n} from \"@material-ui/core\";\nimport {OutlinedInput, InputLabel, InputAdornment, IconButton} from \"@material-ui/core\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {darken} from '@material-ui/core/styles/colorManipulator';\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport {Link} from 'react-router-dom'\nimport clsx from 'clsx';\nimport {ErrorOutline, Visibility, VisibilityOff} from \"@material-ui/icons\";\nimport {ReactComponent as Logo} from \"../../images/phonethru-logo.svg\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport e164ify from \"../../utils/e164\";\nimport {isValidMobile} from \"../../utils/valid\";\nimport mobileLogin from \"../../utils/mobile-login\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport {AuthService} from \"../../services\";\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: `linear-gradient(to left, ${theme.palette.primary.dark} 0%, ${darken(\n theme.palette.primary.dark,\n 0.5\n )} 100%)`,\n color: theme.palette.primary.contrastText,\n minHeight: '100%',\n },\n welcomeWrapper: {\n paddingTop: 108,\n },\n logo: {\n width: 50,\n height: 51,\n [theme.breakpoints.up('lg')]: {\n width: 75,\n height: 76,\n },\n },\n logoText: {\n marginLeft: 4,\n marginTop: 12,\n width: 175,\n height: 40,\n fill: 'white',\n [theme.breakpoints.up('lg')]: {\n marginTop: 22,\n width: 250,\n height: 57,\n },\n },\n panelLogo: {\n width: 200,\n height: 51,\n },\n panelLogoText: {\n marginLeft: 4,\n marginTop: 15,\n width: 175,\n height: 65,\n },\n loginCard: {\n maxWidth: 400,\n },\n loginContent: {\n padding: 32,\n [theme.breakpoints.up('md')]: {\n padding: 48,\n paddingTop: 128,\n },\n\n },\n welcomeTitle: {\n fontWeight: 300,\n },\n welcomeText: {\n marginTop: 16,\n lineHeight: 1.5,\n },\n loginTitle: {\n marginBottom: 32,\n },\n loginField: {\n marginBottom: 16,\n },\n loginButton: {\n marginTop: 16,\n },\n loginCheckbox: {\n fontSize: 14,\n },\n formError: {\n marginLeft: 14,\n marginTop: 4,\n marginBottom: 16,\n color: 'red',\n },\n link: {\n color: '#047e9f',\n fontWeight: 500,\n '&:hover': {\n textDecoration: 'underline',\n textDecorationColor: '#047e9f',\n },\n }\n}));\n\n\n// Reducer for local state\nconst loginReducer = (state, action) => {\n switch (action.type) {\n case 'update':\n return {\n ...state,\n ...action.payload,\n }\n default:\n return state\n }\n}\n\n// Hook for accessing local storage via the reducer\nconst useReducer = (reducer, initialState) => {\n const [state, setState] = useState(initialState)\n\n function dispatch(action) {\n const nextState = reducer(state, action)\n setState(nextState)\n }\n\n return [state, dispatch]\n}\n\n\nconst LoginPage = ({history, match, location}) => {\n const classes = useStyles();\n const focusRef = useRef();\n\n const [state, dispatch] = useReducer(loginReducer, {\n view: 'mobile', // View: 'mobile' or 'password' or 'otp'\n showPassword: false, // flag for password input: true = display password\n apiError: null, // API error object\n loginError: '',\n mobileNumber: '',\n loginMethod: '',\n password: '',\n otpId: '',\n otpPassword: '',\n });\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n return (\n\n
\n \n \n
\n \n
\n
\n\n \n \n Welcome!\n \n \n\n \n \n PhoneThru - a landline number for your mobile\n \n \n
\n\n {focusRef.current && focusRef.current.focus()}}>\n\n \n \n
\n \n
\n\n SIGN IN TO YOUR ACCOUNT\n\n {state.view === 'mobile' ?\n \n : null\n }\n\n {state.view === 'password' ?\n \n : null\n }\n\n {state.view === 'otp' ?\n \n : null\n }\n\n
\n
\n\n
\n \n\n );\n}\n\nconst MobilePanel = ({state, dispatch}) => {\n const classes = useStyles();\n const focusRef = useRef();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n\n const onSubmit = (data, loginMethod) => {\n\n // Clear any existing login errors\n dispatch({ type:'update', payload:{ loginError: '' } })\n\n return new Promise((resolve) => {\n if (loginMethod === 'password') {\n\n // Update our state\n dispatch({\n type:'update',\n payload:{\n mobileNumber: data.mobileNumber,\n loginMethod: loginMethod,\n view: 'password'\n },\n })\n resolve();\n\n } else if (loginMethod === 'otp') {\n\n // Call an API to send a OTP to the mobile number\n const login = mobileLogin(data.mobileNumber);\n AuthService.requestOTP(login)\n .then(result => {\n dispatch({\n type:'update',\n payload:{\n mobileNumber: data.mobileNumber,\n loginMethod: loginMethod,\n otpId: result.otpId,\n view: 'otp'\n },\n })\n })\n .catch(error => {\n if (error.status === 424) {\n // We weren't able to send the SMS\n dispatch({\n type:'update',\n payload: {\n loginError: 'Sorry, we can\\'t send a one-time password to your mobile right now. Try again later or login with your password.'\n },\n })\n\n } else {\n // Display a general API error\n dispatch({\n type:'update',\n payload: {\n loginError: \"Sorry, we can't process your login right now. Please try again later.\"\n },\n })\n }\n\n })\n .finally(() => {\n resolve();\n })\n }\n })\n }\n\n const validateMobile = (value) => {\n return isValidMobile(value) || 'Enter a valid Australian mobile number'\n }\n\n return (\n <>\n {state.loginError ?\n
\n {state.loginError}\n
\n : null\n }\n\n onSubmit(data, \"password\"))}\n >\n validateMobile(value),\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n \n )}\n />\n\n onSubmit(data, 'password')) }\n >\n SIGN IN WITH PASSWORD\n \n\n onSubmit(data, 'otp')) }\n >\n {isSubmitting ? state.loginMethod === 'otp' ? 'Sending OTP...' : 'SIGN IN WITH ONE-TIME PASSWORD' : 'SIGN IN WITH ONE-TIME PASSWORD'}\n \n\n
\n Don't have an account?\n \n Create an account\n \n
\n \n \n\n )\n}\n\nconst PasswordPanel = ({state, dispatch, history, location}) => {\n const classes = useStyles();\n const focusRef = useRef();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n // authState from AuthContext for login functionality\n const auth = useContext(AuthContext)\n\n const onSubmit = (data) => {\n\n // Clear any existing login errors\n dispatch({ type:'update', payload:{ loginError: '' } })\n\n return new Promise((resolve) => {\n const login = mobileLogin(state.mobileNumber);\n auth.login(login, data.password, true)\n .then(() => {\n // We've logged in.\n\n // If we came here via a router redirection because we weren't logged in previously\n // then the location.state will contain the location the user was headed for prior to\n // the redirection. If the target location is / or /home we'll end up there anyway\n // when AuthProvider triggers a re-render of AuthenticatedApp.\n // If the user was headed to another page though, we'll need to send then there manually.\n if (location.state && location.state.pathname !== '' &&\n location.state.pathname !== \"/\" && location.state.pathname !== \"/home\") {\n // Navigate to the url\n history.push(location.state.pathname);\n }\n\n })\n .catch(error => {\n // Set the error message.\n let message;\n if (error.status === 401) {\n message = 'The mobile number and password you entered did not match our records. Please double-check and try again.'\n } else {\n message = \"Oops! We can't process your login right now. Please try again later.\"\n }\n dispatch({ type:'update', payload: { loginError: message } })\n })\n .finally(() => {\n resolve() // Let RHF know we've finished submitting\n })\n })\n }\n\n const handleClickShowPassword = () => {\n dispatch({type:'update', payload: {showPassword: !state.showPassword}});\n };\n\n const handleMouseDownPassword = (event) => {\n event.preventDefault();\n };\n\n return (\n {\n focusRef.current && focusRef.current.focus();\n }}\n >\n
\n {state.loginError ?\n
\n {state.loginError}\n
\n : null\n }\n\n \n (\n\n \n Password\n \n \n \n {state.showPassword ? : }\n \n \n \n }\n />\n \n {error ? error.message : 'Enter your password'}\n \n \n )}\n />\n\n \n {isSubmitting ? 'Signing in...' : 'SIGN IN'}\n \n\n
\n {\n dispatch({\n type: 'update',\n payload:{\n view: 'mobile',\n loginError: '',\n },\n })\n }}\n >\n GO BACK\n \n
\n\n \n
\n \n\n )\n}\n\nconst OTPPanel = ({state, dispatch, history, location}) => {\n const focusRef = useRef();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n const [verifyState, setVerifyState] = useState({error: ''})\n const auth = useContext(AuthContext)\n\n const onSubmit = (data) => {\n\n // Clear any existing login errors\n dispatch({ type:'update', payload:{ loginError: '' } })\n\n return new Promise((resolve) => {\n\n auth.login(state.otpId, data.otpPassword, true, 'otp')\n .then(() => {\n // We've logged in.\n\n // If we came here via a router redirection because we weren't logged in previously\n // then the location.state will contain the location the user was headed for prior to\n // the redirection. If the target location is / or /home we'll end up there anyway\n // when AuthProvider triggers a re-render of AuthenticatedApp.\n // If the user was headed to another page though, we'll need to send then there manually.\n if (location.state && location.state.pathname !== '' &&\n location.state.pathname !== \"/\" && location.state.pathname !== \"/home\") {\n // Navigate to the url\n history.push(location.state.pathname);\n }\n\n })\n .catch(error => {\n if (error.data) {\n setVerifyState({ error: error.data.error })\n }\n })\n .finally(() => {\n resolve() // Let RHF know we've finished submitting\n })\n })\n }\n\n return (\n {\n focusRef.current && focusRef.current.focus();\n }}\n >\n
\n
\n { verifyState.error === '' ?\n \n We've sent a one-time password (OTP)\n to {ausPhone(e164ify(state.mobileNumber))}. Enter\n the password here to continue.\n \n : null\n }\n { verifyState.error === 'invalid_attempt' ?\n \n \n The one-time password was incorrect.\n \n

\n Check the password and try again - you have a limited number of tries!\n
\n : null\n }\n { verifyState.error === 'expired' ?\n \n \n The one-time password has expired.\n \n

\n You'll need to start again with a new OTP, sorry.\n
\n : null\n }\n { verifyState.error === 'too_many_attempts' ?\n <>\n \n \n The one-time password was incorrect.\n \n \n \n There have been too many unsuccessful tries for this OTP and it has been disabled.\n \n \n You'll need to start again with a new OTP, sorry.\n \n \n : null\n }\n
\n \n (\n \n )}\n />\n\n
\n \n {isSubmitting ? 'Signing In...' : 'Next'}\n \n
\n\n
\n {\n dispatch({\n type: 'update',\n payload:{\n view: 'mobile',\n loginError: '',\n },\n })\n }}\n >\n GO BACK\n \n
\n \n
\n \n )\n}\n\nexport default LoginPage;","import React from \"react\";\nimport './password-strength-meter.css'\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Check} from '@material-ui/icons'\n\nconst useStyles = makeStyles(theme => ({\n hintList: {\n listStyle: 'disc outside none',\n padding: '10px 10px 10px 25px',\n },\n}));\n\nconst PasswordStrengthMeter = ({check, variant = 'minimal'}) => {\n // console.log('PasswordStrengthMeter', variant);\n return (\n
\n \n { variant === 'full' ? : null }\n
\n )\n}\n\nconst Meter = ({value = 0}) => {\n return (\n \n )\n}\n\nconst Hints = ({check = {warning:'', suggestions:[]}}) => {\n const classes = useStyles();\n return (\n
\n { check.warning.length > 0 ?\n
{check.warning}
\n : null\n }\n { check.warning.length === 0 && check.suggestions.length === 0 ?\n
\n

You can use this password

\n
\n : null\n }\n
    \n { check.suggestions.map((s, index) => (\n
  • {s}
  • \n ))}\n
\n
\n )\n}\n\nexport default PasswordStrengthMeter;\n","import Typography from \"@material-ui/core/Typography\";\nimport LinearProgress from \"@material-ui/core/LinearProgress\";\nimport React from \"react\";\n\n\nconst Loading = () => {\n return (\n
\n
\n Loading...\n \n
\n
\n )\n}\n\nexport default Loading;","import React, {useRef, useState, useEffect, Suspense, useContext} from \"react\";\nimport MuiToolbar from \"@material-ui/core/Toolbar\";\nimport {Button, TextField} from \"@material-ui/core\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {FuseAnimate, ErrorScreen, AuthContext} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {ReactComponent as PhoneThruLogo} from \"../../images/phonethru-logo.svg\";\nimport {isValidMobile} from \"../../utils/valid\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Card from \"@material-ui/core/Card\";\nimport PasswordStrengthMeter from \"../../components/password-strength-meter/password-strength-meter\";\nimport Loading from \"../../components/loading/loading\";\nimport {CheckCircleOutline} from \"@material-ui/icons\";\nimport {Link} from \"react-router-dom\";\nimport e164ify from \"../../utils/e164\";\nimport {SignupService} from \"../../services\";\nimport mobileLogin from \"../../utils/mobile-login\";\n\n\n// NewPasswordField uses the zxcvbn library to check password strength is a large library as it contains password dictionaries,\n// so we lazy-load it to enable code splitting and minimize load time\nconst NewPasswordField = React.lazy(() => import('../../components/new-password-field/new-password-field'))\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection : 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n toolbar: {\n background: 'linear-gradient(45deg, ' + theme.palette.primary.main + ' 30%, ' + theme.palette.primary.dark + ' 90%)',\n // background: 'linear-gradient(45deg, ' + theme.palette.secondary.main + ' 30%, ' + theme.palette.secondary.dark + ' 90%)',\n // background: 'linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)',\n //backgroundColor: 'white',\n paddingRight: 6,\n paddingLeft: 10,\n },\n logo: {\n width: 122,\n height: 24,\n },\n pad: {\n marginBottom: theme.spacing(2),\n },\n formField: {\n marginBottom: 24,\n },\n}));\n\n// Reducer for local storage\nconst signupReducer = (state, action) => {\n switch (action.type) {\n case 'update':\n return {\n ...state,\n account: {\n ...state.account,\n ...action.payload.account,\n },\n signUp: {\n ...state.signUp,\n ...action.payload.signUp,\n }\n }\n default:\n return state\n }\n}\n\n// Hook for accessing local storage via the reducer\nconst useReducer = (reducer, initialState) => {\n const [state, setState] = useState(initialState)\n\n function dispatch(action) {\n const nextState = reducer(state, action)\n setState(nextState)\n }\n\n return [state, dispatch]\n}\n\nconst SignUpPage = ({history}) => {\n\n const classes = useStyles();\n const [state, dispatch] = useReducer(signupReducer, {\n signUp: {\n view: 'edit', // dialog view: e.g. 'edit', 'success' or 'error'\n stage: 'start', // dialog flow stage: 'start', 'verify', 'user', 'success', 'error', recovery\n apiError: null, // API error object\n },\n account: {\n mobileNumber: '',\n verifyId: '',\n verifyCode: '',\n firstName: '',\n lastName: '',\n email: '',\n password: '',\n }\n });\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n return (\n
\n \n \n \n \n \n \n\n
\n\n \n
\n\n Create Your Account\n\n { state.signUp.stage==='start' ?\n \n : null\n }\n\n { state.signUp.stage==='verify' ?\n \n : null\n }\n\n { state.signUp.stage==='user' ?\n \n : null\n }\n\n { state.signUp.stage === 'success' ?\n \n : null\n }\n\n { state.signUp.stage === 'error' && state.signUp.apiError ?\n
\n \n
\n : null\n }\n\n { state.signUp.stage === 'recovery' ?\n \n : null\n }\n\n
\n
\n\n
\n
\n );\n}\n\nconst PhoneNumberForm = ({state, dispatch}) => {\n const focusRef = useRef();\n const classes = useStyles();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n\n\n const onSubmit = (data) => {\n return new Promise((resolve) => {\n SignupService.verifyMobile( e164ify(data.mobileNumber) )\n .then((result) => {\n // Update the mobile number & verify ID then progress to the verification stage\n dispatch({\n type:'update',\n payload:{\n account: {\n mobileNumber: result.address,\n verifyId: result.verifyId\n },\n signUp: {\n stage: 'verify'\n },\n }\n })\n })\n .catch(error => {\n // Display an error message\n dispatch({\n type:'update',\n payload: {\n signUp: {\n stage: 'error',\n apiError: error,\n },\n }\n })\n })\n .finally(() => {\n resolve(); // resolve promise so RHF know's we've finished submitting\n })\n })\n }\n\n const validateMobile = (value) => {\n return isValidMobile(value) || 'Enter a valid Australian mobile number'\n }\n\n return (\n {\n focusRef.current && focusRef.current.focus();\n }}\n >\n
\n
\n \n Enter your mobile phone number.
We'll send your landline calls to this number.\n
\n
\n \n validateMobile(value),\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n \n )}\n />\n\n \n {isSubmitting ? 'Sending code...' : 'NEXT'}\n \n\n \n
\n \n )\n}\n\nconst VerifyForm = ({state, dispatch}) => {\n const focusRef = useRef();\n const classes = useStyles();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n const [verifyState, setVerifyState] = useState({error: ''})\n\n const onSubmit = (data) => {\n return new Promise((resolve) => {\n SignupService.confirmMobile(state.account.verifyId, data.verifyCode)\n .then(result => {\n // An invalid attempt with return a 200 OK so check error field in response for these codes:\n // - expired, too_many_attempts, invalid_attempt, duplicate_account\n if (!!result.error) {\n if (result.error === 'duplicate_account') {\n // Go to the recovery stage\n dispatch({\n type:'update',\n payload:{\n account: {\n verifyCode: data.verifyCode,\n },\n signUp: {\n stage: 'recovery'\n },\n }\n })\n\n } else {\n setVerifyState({error: result.error})\n }\n\n } else {\n // Success - move on to collect user details\n dispatch({\n type:'update',\n payload:{\n account: {\n verifyCode: data.verifyCode,\n },\n signUp: {\n stage: 'user'\n },\n }\n })\n }\n\n })\n .catch(error => {\n // Display an API error message\n dispatch({\n type:'update',\n payload: {\n signUp: {\n stage: 'error',\n apiError: error,\n },\n }\n })\n })\n .finally(() => {\n resolve() // Resolve the promise so RHF knows we're done.\n })\n })\n }\n\n const startOver = () => {\n dispatch({\n type:'update',\n payload:{\n signUp: {\n view: 'edit',\n stage: 'start',\n apiError: null,\n },\n account: {\n mobileNumber: '',\n verifyId: '',\n verifyCode: '',\n firstName: '',\n lastName: '',\n email: '',\n password: '',\n }\n }\n })\n }\n\n return (\n {\n focusRef.current && focusRef.current.focus();\n }}\n >\n
\n
\n { verifyState.error === '' ?\n \n We've sent a verification code\n to \n {ausPhone(state.account.mobileNumber)}. Enter\n the code here to continue.\n \n : null\n }\n { verifyState.error === 'invalid_attempt' ?\n \n \n The verification code was incorrect.\n \n

\n Check the code and try again - you have a limited number of tries!\n
\n : null\n }\n { verifyState.error === 'too_many_attempts' ?\n <>\n \n \n The verification code was incorrect.\n \n \n \n There have been too many unsuccessful tries for this code and it has been disabled.\n \n \n You'll need to start again with a new code, sorry.\n \n \n : null\n }\n { verifyState.error === 'expired' ?\n <>\n \n \n The verification code has expired.\n \n \n \n For security, verification codes are only valid for a limited time and this one is too old.\n \n \n You'll need to start again with a new code, sorry.\n \n \n : null\n }\n
\n \n (\n \n )}\n />\n\n \n {isSubmitting ? 'Sending...' : 'Next'}\n \n\n
\n \n
\n \n
\n \n )\n\n}\n\nconst AccountForm = ({state, dispatch}) => {\n const classes = useStyles();\n const {handleSubmit, control, formState:{isValid, isSubmitting}} = useForm({ mode: 'onChange' });\n const [scoreState, setScoreState] = useState({pwCheck:{\n score : 0,\n rating : '',\n warning : '',\n suggestions: [\n 'Use a few words, avoid common phrases',\n 'No need for symbols, digits, or uppercase letters',\n ],\n },\n })\n\n // Cache the password score so we can update it for password validation in the same render cycle\n let pwScore = scoreState.pwCheck.score\n\n // onSubmit is called by ReactHookForm when the form is submitted and valid.\n // It returns a promise that is used by RHF to set the isSubmitting flag.\n const onSubmit = (data) => {\n return new Promise((resolve) => {\n // Build API request data\n const request = {\n firstName: data.firstName,\n lastName: data.lastName,\n password: data.password,\n mobileNumber: state.account.mobileNumber,\n mobileVerifyId: state.account.verifyId,\n }\n SignupService.createAccount(request)\n .then(() => {\n // Account has been created display success message\n dispatch({\n type:'update',\n payload:{\n account: {\n firstName: data.firstName,\n lastName: data.lastName,\n password: data.password,\n },\n signUp: {\n stage: 'success'\n }\n }\n })\n\n })\n .catch(error => {\n if (error.status === 409) {\n // Go to the recovery stage\n dispatch({\n type:'update',\n payload:{\n account: {\n verifyCode: data.verifyCode,\n },\n signUp: {\n stage: 'recovery'\n },\n }\n })\n } else {\n // Display an API error message\n dispatch({\n type:'update',\n payload: {\n signUp: {\n stage: 'error',\n apiError: error,\n },\n }\n })\n }\n })\n .finally(() => {\n resolve() // Resolve the promise so RHF knows we're done.\n })\n\n })\n\n }\n\n const handlePasswordChange = (event, check, onChange) => {\n setScoreState({...scoreState, pwCheck: check})\n pwScore = check.score\n return onChange(event)\n }\n\n const isValidPassword = (value) => {\n return pwScore > 2\n }\n\n return(\n \n
\n Personal Details\n \n\n (\n \n )}\n />\n\n (\n \n )}\n />\n\n }>\n isValidPassword(value) || 'A strong password is required'\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n <>\n handlePasswordChange(event, check, onChange)}\n exclusions={['prisonconnect','telephoneer','phonethru']} // exclude from passwords\n />\n \n \n )}\n />\n \n\n
\n \n {isSubmitting ? 'Creating account...' : 'Create my Account'}\n \n
\n\n \n
\n
\n )\n}\n\nconst SuccessPanel = ({state, history}) => {\n // authState from AuthContext for login functionality\n const auth = useContext(AuthContext)\n\n const handleClick = (redirect) => {\n // Login and redirect to the add-service page if we clicked the add service button\n const login = mobileLogin(state.account.mobileNumber);\n auth.login(login, state.account.password, true)\n .then(() => {\n // We've logged in\n if (redirect !== '') {\n // Navigate to the url\n history.push(redirect);\n }\n\n })\n .catch(error => {\n // Set the error message.\n //console.warn('login failed. error:', error)\n })\n }\n\n return (\n
\n \n
\n \n
\n
\n \n \n Your account has been created. You can add a landline number to your account now or just take a look around and add a number later.\n \n \n
\n handleClick('/add-service')}\n >\n ADD A LANDLINE NUMBER\n \n
\n
\n handleClick('')}\n >\n Take a look around\n \n
\n
\n )\n}\n\nconst RecoveryPanel = ({state}) => {\n\n return (\n
\n \n
\n \n
\n
\n \n \n We found an existing account for {ausPhone(state.account.mobileNumber)}.\n

\n If you can't remember your password you can log in using a one-time password (OTP) sent to your mobile.\n
\n
\n
\n \n
\n
\n )\n}\n\n\nexport default SignUpPage;","// purchases accepts an array of invoices and returns an array of purchases\nconst purchases = (invoices) => {\n invoices = invoices || []\n return invoices.map(inv => {\n //console.log('invoice:', inv);\n let status = inv.status;\n if (inv.amount === inv.amountRefunded) {\n status = \"refund\"\n } else if (inv.amountRefunded > 0){\n status = \"part-refund\"\n }\n\n return {\n id: inv.id,\n accountId: inv.account.id,\n amount: inv.amount,\n amountRefunded: inv.amountRefunded,\n date: inv.date,\n description: inv.description,\n receiptUrl: inv.receiptUrl,\n reference: inv.reference,\n skuId: inv.skuId,\n status: status,\n }\n })\n}\n\nexport default purchases;","import React, {useState, useEffect} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {\n HeaderToolbar,\n Loading,\n ErrorScreen,\n UserProfile,\n ServicesCard,\n RecentCalls,\n RecentPurchases,\n BalanceCard,\n AccountBanner,\n EndpointCard\n} from \"../../components\";\nimport { useStore }from \"../../store\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {AccountService, CallsService, EndpointService, InvoiceService} from '../../services'\nimport {setAccount, setEndpoint} from \"../../store/actions\";\nimport purchases from \"../../utils/purchases\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n height : '100%',\n width : '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n flexGrow: 1,\n paddingTop: theme.spacing(2),\n // [theme.breakpoints.up('sm')]: {\n // marginRight: drawerWidth,\n // },\n },\n}));\n\nconst HomePage = (props) => {\n const classes = useStyles();\n const [state, setState] = useState({\n isPending : true,\n isError : false,\n isSuccess : false,\n error : {},\n calls : [],\n purchases : [],\n showBalance : true,\n });\n const {user} = useAuthUser(); // Get the logged in user\n const [store, dispatch] = useStore(); // Get the global store\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Get the user's account data on mount\n useEffect(() => {\n let unloaded = false; // Set a flag in case we're unloaded before the API call returns\n\n Promise.all([\n AccountService.get(user.accountId),\n CallsService.getForAccount(user.accountId, 0, 5),\n InvoiceService.search(user.accountId, 0, 5),\n EndpointService.getForAccount(user.accountId)\n ]).then((results) => {\n // results contains [account, callsResult, invoiceResult, endpointResult]\n if (!unloaded) {\n const account = results[0];\n const endpoint = results[3];\n\n // account.status = -1;\n // account.closed = '2020-07-07T00:00:00Z'\n // account.type=''\n // account.trialExpiry = '2020-07-06T00:00:00Z'\n // account.services[0].active = 0;\n // account.balance = -2500;\n\n // Only display the balance card for an open, prepaid account\n // const showBalance = (account.type === 'pre-paid' && (account.status === 1 ||\n // (account.status === 0 && typeof(account.closed) !== 'undefined') ))\n const showBalance = (account.type === 'pre-paid' && account.balance < 0)\n\n // Set the local state\n setState({\n isPending: false,\n isError:false,\n isSuccess: true,\n error: {},\n calls: results[1].calls,\n purchases: purchases(results[2].invoices),\n showBalance: showBalance,\n })\n\n // Set the global state\n dispatch(setAccount(account))\n dispatch(setEndpoint(endpoint))\n }\n })\n .catch((error) => {\n //console.log('HomePage: error:', error);\n if (!unloaded) {\n setState({\n isPending: false,\n isError: true,\n isSuccess: false,\n error,\n calls: null,\n invoices: null,\n showBalance: false,\n })\n }\n })\n\n // If you return a function from a useEffect hook, React runs it to clean up.\n return () => { unloaded = true }\n\n }, [user.accountId, dispatch])\n\n\n return (\n
\n \n \n \n\n { state.isPending && }\n\n { state.isError && }\n\n { state.isSuccess &&\n \n\n {/**/}\n {/* */}\n {/**/}\n\n
\n \n\n
\n\n
\n \n
\n\n {/* Display applicable account banners */}\n \n \n {/**/}\n {/**/}\n\n { state.showBalance ?\n
\n \n
\n :\n null\n }\n\n
\n \n
\n\n {store.endpoint.id ?\n
\n \n
\n :\n null\n }\n\n
\n \n
\n\n
\n \n
\n
\n\n
\n
\n }\n
\n );\n}\n\nexport default HomePage;","import moment from \"moment\";\n\n/**\n * callCredits accepts a DID service\n *\n * @param service\n * @returns {{minutes: number, daysLeft: number}}\n */\nconst callCredits = (service) => {\n if (typeof(service) === 'undefined') {\n return {minutes: 0, daysLeft: 0}\n }\n\n const minutes = service.callCredits || 0;\n\n // Calculate the number of days to expiry\n const e = moment(service.callCreditsExpiry); // expected that it will be in the future\n const today = moment().startOf('day');\n let days = Math.round(moment.duration(e - today).asDays())\n if (days < 0) {\n days = 0\n }\n // If we're out call credits, we have no days left\n const daysLeft = minutes > 0 ? days : 0;\n\n return { minutes, daysLeft }\n}\n\nexport default callCredits;","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useSnackbar } from 'notistack';\nimport Collapse from '@material-ui/core/Collapse';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ErrorIcon from '@material-ui/icons/Error';\nimport red from \"@material-ui/core/colors/red\";\n\nconst useStyles = makeStyles(theme => ({\n card: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap',\n flexGrow: 1,\n backgroundColor: red[500],\n color: 'white',\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 344,\n },\n },\n typography: {\n fontWeight: 'bold',\n display: \"flex\",\n flexGrow: 1,\n },\n actionRoot: {\n padding: '8px 8px 8px 16px',\n },\n icons: {\n marginLeft: 'auto',\n flexShrink: 0,\n color: 'white',\n },\n expand: {\n padding: '8px 8px',\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n collapse: {\n padding: 16,\n },\n checkIcon: {\n fontSize: 20,\n color: '#b3b3b3',\n paddingRight: 4,\n },\n button: {\n padding: 0,\n textTransform: 'none',\n },\n}));\n\nconst SnackApiError = React.forwardRef((props, ref) => {\n const classes = useStyles();\n const { closeSnackbar } = useSnackbar();\n const [expanded, setExpanded] = useState(false);\n\n const handleExpandClick = () => {\n setExpanded(!expanded);\n };\n\n const handleDismiss = () => {\n closeSnackbar(props.id);\n };\n\n return (\n \n \n \n {props.message}\n
\n \n \n \n \n \n \n
\n
\n \n \n The server reported an error:\n {props.error.status} / {props.error.statusText}\n \n \n
\n );\n});\n\nSnackApiError.propTypes = {\n id: PropTypes.number.isRequired,\n};\n\nexport default SnackApiError;","import React from \"react\";\nimport SnackApiError from \"../components/snackbar/api-error\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport IconClose from \"@material-ui/icons/Close\"\n\n\nexport const success = (message, enqueueSnackbar, closeSnackbar) => {\n enqueueSnackbar(message, {\n variant: 'success',\n autoHideDuration: 3000,\n action: (key) => (\n { closeSnackbar(key) }}>\n \n \n ),\n })\n}\n\nexport const apiError = (message, error, enqueueSnackbar) => {\n enqueueSnackbar(message, {\n autoHideDuration: 15000,\n content: (key, message) => (\n \n )\n })\n}\n","import moment from \"moment\";\nimport ausPhone from \"./aus-phone\";\n\n\nfunction resolveAction(account, service, handlerAction) {\n\n // Check parameters to prevent run-time errors\n account = account || {};\n service = service || {};\n // If we don't have an handler action object use the service's action\n if (typeof(handlerAction) === 'undefined') {\n handlerAction = service.action || {};\n }\n\n // Set up our action type data sources\n let contacts = account.contacts || [];\n let dialActions = account.dialActions || [];\n let greetings = account.greetings || [];\n let voicemails = account.voicemails || [];\n let schedules = service.schedules || [];\n let voiceMenus = service.voiceMenus || [];\n\n //console.log('account', account);\n //console.log('service', service);\n\n let type = handlerAction.type;\n let id = handlerAction.id;\n let action;\n let detail = {name: '', text: '', longText: ''};\n\n if (type === 'schedule') {\n // Special case for 'schedule' type because we need the actual action dictated by the schedule\n let schedule = findAction([schedules], id);\n\n action = findAction([dialActions, voicemails, greetings, voiceMenus], currentAction(schedule).id);\n if (action === null) {\n action = {type: 'reject'};\n }\n\n } else {\n if (type === 'reject') {\n action = {id: null, name:\"Reject All Calls\"};\n } else {\n action = findAction([dialActions, voicemails, greetings, voiceMenus], id);\n }\n }\n\n // Build an object with the number dialed, plus a description eg.\n // { longText: 'Calls are forwarded to xx,x...', name: 'Dial Chanel', text: '0412 236 548' }\n // { longText: 'Calls will be sent to After Hours Voicemail', name: 'After Hours Voicemail', text: 'After Hours Voicemail' }\n // { longText: 'Calls will be sent to Voice Menu', name: 'Voice Menu', text: 'Voice Menu' }\n // { longText: 'Callers hear Office Closed', name: 'Office Closed', text: 'office-closed-monday.mp3' }\n //console.log('detail=',detail);\n detail.name = action.name;\n\n switch (action.type || 'reject') {\n case 'dial':\n detail.text = dialActionNumbers(action);\n detail.longText = 'Calls are forwarded to ' + action.name;\n break;\n\n case 'voicemail':\n case 'ivr':\n detail.text = action.name;\n detail.longText = 'Calls will be sent to ' + action.name;\n break;\n\n case 'say':\n detail.text = action.name;\n detail.longText = 'Callers hear ' + action.name;\n break;\n\n case 'play':\n detail.text = action.file.name;\n detail.longText = 'Callers hear ' + action.name;\n break;\n\n case 'reject':\n detail.text = 'rejected';\n detail.longText = 'Calls are rejected immediately';\n break;\n\n default:\n detail.text = '';\n detail.longText = '';\n }\n\n return detail;\n\n\n /***\n * findAction returns the action with the passed ID from the\n * passed array of action arrays.\n *\n * @param actions\n * @param id\n * @returns {*}\n */\n function findAction(actions, id) {\n for (let i=0; i < actions.length; i++) {\n for (let j=0; j < actions[i].length; j++) {\n if (actions[i][j].id === id) {\n return actions[i][j];\n }\n }\n }\n return null;\n }\n\n function currentAction(schedule) {\n //console.log('currentAction', schedule);\n let now = moment(); // moment from current date/time\n let idx = now.day() - 1; // day is 0-6 => Sunday - Monday\n if (idx === -1) {\n idx = 6\n } // Sunday is at index 6\n let minutes = now.hours() * 60 + now.minutes(); // current time in minutes\n if (minutes >= schedule.schedule[idx].start &&\n minutes < schedule.schedule[idx].finish && schedule.schedule[idx].checked) {\n return schedule.action; // return the work hours action\n } else {\n return schedule.ahAction; // return the after hours action\n }\n }\n\n function dialActionNumbers(dialAction) {\n let numbers = [];\n for (let i=0; i < dialAction.contacts.length; i++) {\n for (let j=0; j < contacts.length; j++) {\n if (dialAction.contacts[i] === contacts[j].id) {\n // If the contact's number is a SIP address, use the contact name\n if (contacts[j].number.startsWith('sip')) {\n numbers.push( contacts[j].name )\n } else {\n numbers.push( ausPhone(contacts[j].number) );\n }\n break;\n }\n }\n }\n let sep = ', ';\n if (dialAction.dialType === 'simulring') {\n sep = ' + ';\n }\n return numbers.join(sep);\n }\n}\n\nexport default resolveAction;","import React, {useEffect, useState} from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport {makeStyles, withStyles} from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount, invalidateAccount, setServices} from \"../../store/actions\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport Button from \"@material-ui/core/Button\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport callCredits from \"../../utils/call-credits\";\nimport TextField from \"@material-ui/core/TextField\";\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\nimport CheckIcon from '@material-ui/icons/Check';\nimport CloseIcon from '@material-ui/icons/Close';\nimport LabelOutlinedIcon from '@material-ui/icons/LabelOutlined';\nimport TimerOutlinedIcon from '@material-ui/icons/TimerOutlined';\nimport PhoneForwardedOutlinedIcon from '@material-ui/icons/PhoneForwardedOutlined';\nimport HourglassEmptyOutlinedIcon from '@material-ui/icons/HourglassEmptyOutlined';\nimport ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport MuiAccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport MuiAccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport MuiAccordion from \"@material-ui/core/Accordion\";\nimport {Link} from \"react-router-dom\";\nimport {AccountService} from '../../services'\nimport {apiError} from \"../../utils/toast\";\nimport {useSnackbar} from \"notistack\";\nimport {FormControl, RadioGroup} from \"@material-ui/core\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport Radio from \"@material-ui/core/Radio\";\nimport resolveAction from \"../../utils/resolve-action\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n green: {\n color: 'green',\n },\n red: {\n color: 'red',\n }\n }));\n\nconst Accordion = withStyles({\n root: {\n // border: '1px solid rgba(0, 0, 0, .125)',\n boxShadow: 'none',\n '&:not(:last-child)': {\n borderBottom: 0,\n },\n '&:before': {\n display: 'none',\n },\n '&$expanded': {\n margin: 'auto',\n },\n },\n expanded: {},\n})(MuiAccordion)\n\nconst AccordionSummary = withStyles({\n root: {\n // backgroundColor: 'rgba(0, 0, 0, .03)',\n // borderBottom: '1px solid rgba(0, 0, 0, .125)',\n marginBottom: -1,\n minHeight: 56,\n '&$expanded': {\n minHeight: 56,\n },\n padding: 0,\n },\n content: {\n '&$expanded': {\n margin: '12px 0',\n },\n },\n expanded: {},\n})(MuiAccordionSummary);\n\nconst AccordionDetails = withStyles((theme) => ({\n root: {\n // backgroundColor: 'rgba(0, 0, 0, .03)',\n // padding: theme.spacing(2),\n padding: 0,\n },\n}))(MuiAccordionDetails);\n\nconst ServicePage = ({match}) => {\n // console.log('Service props', props);\n const serviceId = match.params.id;\n const classes = useStyles();\n const {user} = useAuthUser(); // Get logged in user\n const [store, dispatch] = useStore(); // Get the global store\n const [state, setState] = useState({\n service: { action:{ id:'', type: ''}, meta:{}},\n nickname: '',\n isForwarding: true,\n isEditing: false,\n isFetching: false\n })\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n useEffect(() => {\n const services = store.account.services.filter(s => s.id.toString() === serviceId)\n if (services.length === 1) {\n setState(state => ({\n ...state,\n service: services[0],\n isForwarding: services[0].action.type !== 'reject',\n }));\n }\n },[store.account, serviceId])\n\n const {minutes, daysLeft} = callCredits(state.service)\n\n return (\n
\n \n \n \n \n\n
\n { store.account.isFetching ? : null }\n { store.account.error && }\n { store.account.error === null && !store.account.isFetching ?\n \n
\n \n {ausPhone(state.service.number)}\n
{state.service.meta.zone}
\n\n
\n \n
Call Minutes
\n
{minutes} min left
\n
\n { minutes > 0 ?\n
\n \n
Expiry
\n
{daysLeft} {daysLeft === 1 ? 'day':'days'} left
\n
\n : null\n }\n { minutes <= 0 ?\n
\n \n
You have no call minutes remaining so you're not\n able to receive calls.
\n
\n : null\n }\n { daysLeft < 7 && minutes > 0 ?\n
\n \n
\n { daysLeft === 0 ?\n <>Your call minutes expire today. Recharge immediately to roll over\n your {minutes} remaining minutes.\n :\n <>You have only {daysLeft} { daysLeft === 1 ? 'day' : 'days'} before\n your call minutes expire. Recharge now to roll over\n your {minutes} remaining {minutes === 1 ? 'minute':'minutes'}.\n }\n
\n
\n : null\n }\n
\n \n RECHARGE\n \n
\n\n {/**/}\n\n \n\n \n\n
\n \n TRANSFER NUMBER\n \n
\n\n \n\n
\n
\n
\n : null\n }\n
\n
\n\n );\n}\n\n/*\nconst ForwardingSwitch = ({serviceId, state, setState, disabled, store, dispatch}) => {\n const {enqueueSnackbar} = useSnackbar();\n\n const handleSwitchChange = (e) => {\n //console.log('handleSwitchChange', e.target.checked)\n\n let action = {id: null, type: 'reject'}\n if (e.target.checked) {\n action = {id: store.account.dialActions[0].id, type: 'dial'}\n }\n\n // Save the new name to the server\n AccountService.setServiceAction(store.account.id, serviceId, action)\n .then(() => {\n // Update our page state\n if (action.type === 'reject')\n setState({\n ...state,\n service: {...state.service, action},\n isForwarding: action.type === 'reject',\n isFetching:false,\n })\n // Fetch the account services and update our global store.\n fetchServices(store.account.id, dispatch)\n })\n .catch((error) => {\n // update our state\n setState({...state, isFetching:false})\n // display a snackbar message\n apiError(\"Your change could not be saved.\", error, enqueueSnackbar)\n })\n\n setState({...state, isForwarding: e.target.checked})\n }\n\n\n return (\n <>\n
\n \n
Call Forwarding
\n
{state.isForwarding ? \"ON\" : \"OFF\"}
\n
\n \n
\n
\n
\n { state.isForwarding ?\n <>Incoming calls go to your mobile\n :\n <>Incoming calls are rejected\n }\n
\n \n )\n\n}\n*/\n\nconst ForwardingList = ({serviceId, state, setState, store, dispatch}) => {\n const {enqueueSnackbar} = useSnackbar();\n\n console.log('state.isForwarding=', state.isForwarding)\n\n console.log('state.service=', state.service);\n // const dialActionId = state.service.action.id || \"\";\n // console.log('dialActionId=', dialActionId);\n\n const dialActions = store.account.dialActions || [];\n\n const handleSelection = (e) => {\n console.log('handleSelection', e.target.value)\n let action = {id: null, type: 'reject'}\n if (e.target.value !== '') {\n action = {id: e.target.value, type: 'dial'}\n }\n console.log('action:', action);\n\n // Save the new action to the server\n AccountService.setServiceAction(store.account.id, serviceId, action)\n .then(() => {\n // Update our page state\n if (action.type === 'reject')\n setState({\n ...state,\n service: {...state.service, action},\n isForwarding: action.type === 'reject',\n isFetching:false,\n })\n // Fetch the account services and update our global store.\n fetchServices(store.account.id, dispatch)\n })\n .catch((error) => {\n // update our state\n setState({...state, isFetching:false})\n // display a snackbar message\n apiError(\"Your change could not be saved.\", error, enqueueSnackbar)\n })\n\n setState({...state, isForwarding: e.target.value !== ''})\n }\n\n return (\n <>\n
\n \n
Call Forwarding
\n {/*
{state.isForwarding ? \"ON\" : \"OFF\"}
*/}\n {/*
*/}\n {/* */}\n {/*
*/}\n
\n
Incoming calls will go to:
\n
\n \n handleSelection(e) }\n >\n { dialActions.map((dialAction, index) => (\n }\n label={resolveAction(store.account, state.service, dialAction).text}\n key={dialAction.id}\n />\n ))}\n } label=\"Reject all calls\"/>\n \n \n
\n \n )\n\n}\n\nconst NicknameField = ({serviceId, state, setState, store, dispatch}) => {\n const classes = useStyles();\n const {enqueueSnackbar} = useSnackbar();\n\n const handleNicknameEdit = (e) => {\n setState({...state, isEditing: true})\n }\n\n const handleCancelEdit = (e) => {\n setState({...state, isEditing: false})\n }\n\n const handleSaveEdit = (e) => {\n //console.log('handleSaveEdit', e)\n\n // Let the UI know we're busy\n setState({...state, isFetching: true})\n\n // Save the new name to the server\n AccountService.patchService(store.account.id, serviceId, {name: state.nickname})\n .then(() => {\n // Update our page state\n setState({...state, service: {...state.service, name:state.nickname}, isFetching:false, isEditing: false})\n // Invalidate the account so it's reloaded next time\n fetchServices(store.account.id, dispatch)\n })\n .catch((error) => {\n // update our state\n setState({...state, isFetching:false})\n // display a snackbar message\n apiError(\"Your change could not be saved.\", error, enqueueSnackbar)\n })\n }\n\n const handleNicknameChange = (e) => {\n setState({...state, nickname: e.target.value})\n }\n\n return (\n <>\n
\n \n { state.isEditing ?\n <>\n
\n \n
\n \n \n \n \n \n \n \n :\n <>\n
{state.service.name}
\n \n \n \n \n }\n
\n
A nickname for this number
\n \n )\n\n}\n\nconst AboutAccordion = ({daysLeft}) => {\n\n return (\n \n }>\n
About this service
\n
\n \n
\n
    \n
  • \n { daysLeft > 0 ?\n <>Unused call minutes will expire in {daysLeft} {daysLeft === 1 ? 'day':'days'}\n unless you recharge before.\n :\n <>Unused call minutes are lost if they expire. Recharge before\n expiry to roll-over your unused minutes.\n }\n
  • \n
  • If you use all your call minutes you need to\n recharge to keep receiving calls.\n
  • \n
  • Landline numbers and call minutes are not refundable.\n
  • \n
  • \n The landline number will be removed from your account\n if you have zero call minutes for 14 days or more.
    After that,\n you may be able to recover the number but a new setup fee will apply.\n
  • \n
\n
\n\n
\n
\n )\n}\n\nconst fetchServices = (accountId, dispatch) => {\n\n //console.log('fetchServices for ', accountId);\n AccountService.getServices(accountId)\n .then(services => {\n dispatch(setServices(services))\n })\n .catch(error => {\n //console.log('fetchServices error: error')\n dispatch(invalidateAccount())\n })\n}\n\nexport default ServicePage;\n\n\n\n\n\n\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgVisaLogo(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"Layer_1\",\n x: \"0px\",\n y: \"0px\",\n width: 1000.046,\n height: 323.65302,\n viewBox: \"0 0 1000.046 323.653\",\n enableBackground: \"new 0 0 258.381 161.154\",\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", {\n id: \"g4158\",\n transform: \"matrix(4.4299631,0,0,4.4299631,-81.165783,-105.04783)\"\n }, /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"116.145,95.719 97.858,95.719 109.296,24.995 127.582,24.995 \",\n id: \"polygon9\",\n style: {\n fill: \"#00579f\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m 182.437,26.724 c -3.607,-1.431 -9.328,-3.011 -16.402,-3.011 -18.059,0 -30.776,9.63 -30.854,23.398 -0.15,10.158 9.105,15.8 16.027,19.187 7.075,3.461 9.48,5.72 9.48,8.805 -0.072,4.738 -5.717,6.922 -10.982,6.922 -7.301,0 -11.213,-1.126 -17.158,-3.762 l -2.408,-1.13 -2.559,15.876 c 4.289,1.954 12.191,3.688 20.395,3.764 19.188,0 31.68,-9.481 31.828,-24.153 0.073,-8.051 -4.814,-14.22 -15.35,-19.261 -6.396,-3.236 -10.313,-5.418 -10.313,-8.729 0.075,-3.01 3.313,-6.093 10.533,-6.093 5.945,-0.151 10.313,1.278 13.622,2.708 l 1.654,0.751 2.487,-15.272 0,0 z\",\n id: \"path11\",\n style: {\n fill: \"#00579f\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m 206.742,70.664 c 1.506,-4.063 7.301,-19.788 7.301,-19.788 -0.076,0.151 1.503,-4.138 2.406,-6.771 l 1.278,6.094 c 0,0 3.463,16.929 4.215,20.465 -2.858,0 -11.588,0 -15.2,0 l 0,0 z m 22.573,-45.669 -14.145,0 c -4.362,0 -7.676,1.278 -9.558,5.868 l -27.163,64.855 19.188,0 c 0,0 3.159,-8.729 3.838,-10.609 2.105,0 20.771,0 23.479,0 0.525,2.483 2.182,10.609 2.182,10.609 l 16.932,0 -14.753,-70.723 0,0 z\",\n id: \"path13\",\n style: {\n fill: \"#00579f\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M 82.584,24.995 64.675,73.222 62.718,63.441 C 59.407,52.155 49.023,39.893 37.435,33.796 l 16.404,61.848 19.338,0 28.744,-70.649 -19.337,0 0,0 z\",\n id: \"path15\",\n style: {\n fill: \"#00579f\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m 48.045,24.995 -29.422,0 -0.301,1.429 c 22.951,5.869 38.151,20.016 44.396,37.02 L 56.322,30.94 c -1.053,-4.517 -4.289,-5.796 -8.277,-5.945 l 0,0 z\",\n id: \"path17\",\n style: {\n fill: \"#faa61a\"\n }\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgVisaLogo);\nexport default __webpack_public_path__ + \"static/media/visa-logo.0fc59266.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"defs\", {\n id: \"defs3411\"\n});\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"metadata\", {\n id: \"metadata3414\"\n});\n\nfunction SvgMastercardLogo(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"svg3409\",\n viewBox: \"0 0 1000.008 618.03103\",\n height: 618.03101,\n width: 1000.008,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2, _ref3, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"matrix(3.3557321,0,0,3.3557321,-1551.7864,-2007.0469)\",\n id: \"layer1\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"matrix(2.5579399,0,0,2.5579399,884.90115,-11.427398)\",\n id: \"g13\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(-502.86126,-22.613497)\",\n id: \"XMLID_328_\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n style: {\n fill: \"#ff5f00\"\n },\n id: \"rect19\",\n height: 56.599998,\n width: 31.5,\n className: \"st1\",\n y: 268.60001,\n x: 380.20001\n }), /*#__PURE__*/React.createElement(\"path\", {\n style: {\n fill: \"#eb001b\"\n },\n d: \"m 382.2,296.9 c 0,-11.5 5.4,-21.7 13.7,-28.3 -6.1,-4.8 -13.8,-7.7 -22.2,-7.7 -19.9,0 -36,16.1 -36,36 0,19.9 16.1,36 36,36 8.4,0 16.1,-2.9 22.2,-7.7 -8.3,-6.5 -13.7,-16.8 -13.7,-28.3 z\",\n className: \"st2\",\n id: \"XMLID_330_\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n style: {\n fill: \"#f79e1b\"\n },\n id: \"path22\",\n d: \"m 454.2,296.9 c 0,19.9 -16.1,36 -36,36 -8.4,0 -16.1,-2.9 -22.2,-7.7 8.4,-6.6 13.7,-16.8 13.7,-28.3 0,-11.5 -5.4,-21.7 -13.7,-28.3 6.1,-4.8 13.8,-7.7 22.2,-7.7 19.9,0 36,16.2 36,36 z\",\n className: \"st3\"\n })))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgMastercardLogo);\nexport default __webpack_public_path__ + \"static/media/mastercard-logo.cd0668ee.svg\";\nexport { ForwardRef as ReactComponent };","import React, {useEffect, useRef, useState} from \"react\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport { withStyles } from '@material-ui/core/styles';\nimport PhoneForwardedIcon from \"@material-ui/icons/PhoneForwarded\";\nimport Button from \"@material-ui/core/Button\";\nimport Radio from \"@material-ui/core/Radio\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount} from \"../../store/actions\";\nimport MuiAccordion from \"@material-ui/core/Accordion\";\nimport MuiAccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport MuiAccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport ShoppingCartIcon from '@material-ui/icons/ShoppingCart';\nimport TimerOutlinedIcon from '@material-ui/icons/TimerOutlined';\nimport {CreditCardPanel, StripeCardForm} from \"../../components\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {scroller} from \"react-scroll\";\nimport {ReactComponent as VisaLogo} from \"../../images/visa-logo.svg\";\nimport {ReactComponent as MasterCardLogo} from \"../../images/mastercard-logo.svg\";\nimport {PurchaseService} from \"../../services\";\nimport {CircularProgress} from \"@material-ui/core\";\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForward';\n\nconst Accordion = withStyles({\n root: {\n // border: '1px solid rgba(0, 0, 0, .125)',\n boxShadow: 'none',\n '&:not(:last-child)': {\n borderBottom: 0,\n },\n '&:before': {\n display: 'none',\n },\n '&$expanded': {\n margin: 'auto',\n },\n },\n expanded: {},\n})(MuiAccordion)\n\nconst AccordionSummary = withStyles({\n root: {\n // backgroundColor: 'rgba(0, 0, 0, .03)',\n // borderBottom: '1px solid rgba(0, 0, 0, .125)',\n marginBottom: -1,\n minHeight: 56,\n '&$expanded': {\n minHeight: 56,\n },\n padding: 0,\n },\n content: {\n '&$expanded': {\n margin: '12px 0',\n },\n },\n expanded: {},\n})(MuiAccordionSummary);\n\nconst AccordionDetails = withStyles((theme) => ({\n root: {\n // backgroundColor: 'rgba(0, 0, 0, .03)',\n // padding: theme.spacing(2),\n padding: 0,\n },\n}))(MuiAccordionDetails);\n\nconst Checkout = ({order, onSuccess, onError}) => {\n const [store, dispatch] = useStore(); // Get the global store\n\n // If we don't have an SKU then we can't proceed\n if (order.sku.id === '' || typeof(order.sku.id) === 'undefined') {\n onError({code:'invalid_sku_id', message:'SKU ID is required'})\n }\n\n // Scroll to the payment method section so the 'Buy' button is visible\n useEffect(() => {\n // const el = (location.state && location.state.scrollTo) || ''\n scroller.scrollTo('payment-method', {\n duration : 800,\n delay : 1200,\n smooth : 'easeInOutQuart',\n containerId : 'psb',\n });\n },[])\n\n // Make sure the account is available in the store\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch])\n\n //console.log('order', order);\n\n return (\n
\n
\n Checkout\n \n
\n\n
\n { order.sku.type === 'number' ?\n \n : null\n }\n { order.sku.type === 'credit' ?\n \n : null\n }\n { order.sku.type === 'service' ?\n \n : null\n }\n\n \n\n
\n\n \n\n
\n )\n}\n\n\nconst LandlineItem = ({order}) => {\n return (\n <>\n
\n
\n
\n
\n \n
\n
\n
{order.sku.name}
\n
{order.sku.meta.description}
\n\n
\n \n
{ausPhone(order.number.number)}
\n
\n \n
{order.number.zone}
\n
\n \n
{order.sku.meta.inclusions.description}
\n
\n
\n
\n
\n
\n \n )\n}\n\nconst CreditItem = ({order}) => {\n return (\n <>\n
\n
\n
\n
\n \n
\n
\n
{order.sku.name}
\n
{order.sku.meta.description}
\n\n
\n \n
{order.sku.meta.inclusions.minutes.quantity}
\n
\n \n
{order.sku.meta.inclusions.minutes.expiryDays} days
\n
\n \n
{ausPhone(order.number.number)}
\n
\n
\n
\n
\n
\n \n )\n}\n\nconst ServiceItem = ({order}) => {\n return (\n <>\n
\n
\n
\n
\n \n
\n
\n
{order.sku.name}
\n
{order.sku.meta.description}
\n\n
\n
Number
\n
{ausPhone(order.number.number)}
\n
\n
Transfer To
\n
{ausPhone(order.transferTo)}
\n
\n
\n
\n
\n
\n \n )\n}\n\n\nconst TotalSection = ({order}) => {\n if (order.sku.taxRate === 0) {\n return (\n
\n
Total including taxes
\n
\n
AUD
\n
${order.total.toFixed(2)}
\n
\n
\n )\n } else {\n return (\n <>\n
\n
Subtotal
\n
${order.subtotal.toFixed(2)}
\n
Taxes ({order.sku.taxRate}%)
\n
${order.taxes.toFixed(2)}
\n
\n
\n
\n
Total
\n
\n AUD\n ${order.total.toFixed(2)}\n
\n
\n \n )\n }\n}\n\nconst PaymentSection = ({order, store, onSuccess, onError}) => {\n\n // Payment method accordion state\n const isStored = store.account.paymentMethod && store.account.paymentMethod.type === 'card';\n //console.log('isStored', isStored)\n\n const [expanded, setExpanded] = useState(isStored ? 'stored' : 'new')\n\n // handleAccordionChange ensures only one accordion is expanded at a time.\n const handleAccordionChange = (panel) => (event, isExpanded) => {\n setExpanded(isExpanded ? panel : '');\n }\n //console.log('expanded', expanded);\n\n const [state, setState] = useState({cardError: null})\n //console.log('Payment Section state', state)\n\n\n //console.log('store.account', store.account);\n\n // Track our mounted state so we don't try and setState() after we're gone\n let isMounted = useRef(true)\n useEffect(() => {\n // React calls the return function when the component is unmounted\n return () => {isMounted.current = false}\n })\n\n // If we expand the 'new' accordion scroll the page so the Pay button is visible\n useEffect(() => {\n if (isStored && expanded === 'new') {\n scroller.scrollTo('payment-method', {\n duration : 800,\n delay : 200,\n smooth : 'easeInOutQuart',\n containerId : 'psb',\n });\n }\n }, [isStored, expanded])\n\n const onSubmit = (data) => {\n //console.log('PaymentMethodSection onSubmit', data);\n\n if (typeof(data) === 'undefined') {\n data = {}\n }\n\n // Clear any previous card errors\n setState({...state, cardError: null, isFetching: true})\n\n return new Promise((resolve, reject) => {\n\n const request = {\n accountId: store.account.id,\n skuId: order.sku.id,\n price: order.total * 100,\n number: order.number ? order.number.number || '' : '',\n serviceId: order.serviceId || 0,\n ticketId: order.ticketId || 0,\n tokenId: data.token ? data.token.id || '' : '',\n saveCard: data.saveCard || false,\n }\n\n // Process the the purchase\n PurchaseService.purchase(request)\n .then(result => {\n //console.log('checkout: purchase succeeded', result);\n\n // Let our parent component know the checkout was successful\n if (typeof(onSuccess) === 'function') {\n onSuccess(result);\n }\n if (isMounted.current) {\n setState({...state, isFetching: false});\n }\n resolve(); // Let the form know we're done.\n })\n .catch(error => {\n //console.log('purchase failed', error);\n if (error.status === 402) {\n // It's a card error so set the local cardError state\n // The error will be displayed in the CardForm component if\n // we're using a new card, or locally if we're using a saved card.\n setState({...state, cardError: error.data.error, isFetching: false})\n } else {\n // Treat it as an API error and pass it on up the chain\n if (typeof(onError) === 'function') {\n onError(error);\n }\n }\n resolve(); // Let the form know we're done.\n })\n })\n }\n\n if (isStored) {\n return (\n
\n \n }>\n
Pay with saved card
\n
\n \n
\n
\n \n
\n
\n onSubmit()}\n disabled={state.isFetching}\n className=\"w-full\"\n >\n { state.isFetching ?\n \n :\n `Pay $${order.total.toFixed(2)}`\n }\n \n
\n
\n
\n \n\n \n }>\n
Pay with another card
\n
\n \n
\n \n
\n
\n \n
\n )\n\n } else {\n return (\n
\n
\n Card Details\n
\n \n \n
\n
\n \n
\n )\n }\n\n}\n\nexport default Checkout;","\nexport default function externalLink(event, url) {\n event.preventDefault();\n window.open(url,'_blank','noopener noreferrer');\n}","/**\n * totals returns an object with calculated subtotal, taxes and total price in cents\n *\n * @param sku\n * @returns {{total: number, subtotal: number, taxes: number}}\n */\nexport const totals = (sku) => {\n let subtotal = 0;\n let taxes = 0;\n let total = 0;\n\n if (sku.taxInc) {\n total = sku.price/100;\n taxes = total - (total/((100+sku.taxRate)/100))\n subtotal = total - taxes;\n } else {\n subtotal = sku.price/100\n taxes = Math.round(sku.taxRate * sku.price/100)/100\n total = subtotal + taxes\n }\n\n return { subtotal, taxes, total }\n}","import React, {useEffect, useState} from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport {Button, Checkbox, InputLabel, Select, TextField} from \"@material-ui/core\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useStore} from \"../../store\";\nimport {invalidateAccount} from \"../../store/actions\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport {NumberService, SkuService, NotifyService} from \"../../services\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport Accordion from \"@material-ui/core/Accordion\"\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\"\nimport ListIcon from '@material-ui/icons/List';\nimport RoomIcon from '@material-ui/icons/Room';\nimport { animateScroll as scroll } from \"react-scroll\"\nimport moment from \"moment\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport Checkout from \"../../components/checkout/checkout\";\nimport {CheckCircleOutline, SentimentVeryDissatisfied} from \"@material-ui/icons\";\nimport {Link} from \"react-router-dom\";\nimport {isValidEmail} from \"../../utils/valid\";\nimport externalLink from \"../../utils/external-link\";\nimport {totals} from \"../../utils/checkout\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n}));\n\n// Reducer for local storage\nconst addServiceReducer = (state, action) => {\n switch (action.type) {\n case 'update':\n return {\n ...state,\n ...action.payload,\n }\n default:\n return state\n }\n}\n\n// Hook for accessing local storage via the reducer\nconst useReducer = (reducer, initialState) => {\n const [state, setState] = useState(initialState)\n\n function dispatch(action) {\n const nextState = reducer(state, action)\n setState(nextState)\n }\n\n return [state, dispatch]\n}\n\nconst landLineSKU = 'SET-PTLL-001'\n\nconst AddServicePage = ({location}) => {\n const classes = useStyles();\n\n const [state, dispatch] = useReducer(addServiceReducer, {\n view: 'start', // current view\n priors: [], // prior numbers for this account\n number: { // selected number\n number:'',\n zone: '',\n },\n sku: {\n id: '',\n name: '',\n taxRate: 0,\n price: 0,\n meta: {\n description: '',\n inclusions: {\n minutes: {\n quantity: 0,\n expiryDays: 0,\n },\n }\n }\n },\n isFetching: false,\n error: null\n });\n\n const {user} = useAuthUser();\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Get the SKU we'll be using and any prior numbers\n useEffect(() => {\n dispatch({type:'update', payload: {isFetching: true}})\n Promise.all([\n SkuService.getSku(landLineSKU),\n NumberService.getPriorNumbers(user.accountId)\n ])\n .then(results => {\n // Filter prior numbers to only show available numbers\n const priors = results[1].filter(n => { return n.isAvailable});\n dispatch({type:'update', payload: {sku: results[0], priors, isFetching: false}})\n })\n .catch(error => {\n dispatch({type:'update', payload: {error, isFetching: false}})\n })\n }, [user.accountId])\n\n return (\n
\n \n \n \n \n\n
\n { state.isFetching ? : null }\n { state.error && }\n { state.error === null && !state.isFetching ?\n <>\n {state.view === 'start' ?\n \n : null\n }\n {state.view === 'priors' ?\n \n : null\n }\n {state.view === 'choose' ?\n \n : null\n }\n {state.view === 'terms' ?\n \n : null\n }\n {state.view === 'checkout' ?\n \n : null\n }\n {state.view === 'success' ?\n \n :null\n }\n {state.view === 'error' ?\n \n :null\n }\n \n : null\n }\n
\n\n
\n\n );\n}\n\nconst ItemCard = ({pageState, dispatch}) => {\n const classes = useStyles();\n\n const sku = pageState.sku;\n const minutes = pageState.sku.meta.inclusions.minutes;\n\n const handleNew = () => {\n dispatch({ type: 'update', payload: {view: 'choose'}})\n }\n\n const handlePriors = () => {\n dispatch({ type: 'update', payload: {view: 'priors'}})\n }\n\n const expiryDate = moment().add(minutes.expiryDays, \"days\").format('D MMMM YYYY')\n\n return (\n \n
\n \n Add a Landline number\n
\n\n
\n
$
\n
{sku.price/100}
\n
setup
\n
\n\n
\n\n
\n
    \n
  • \n One-off fee includes landline number setup and \n {minutes.quantity} call minutes\n
  • \n
  • \n Call minutes expire in {minutes.expiryDays} days.\n ({expiryDate})\n
  • \n
  • \n Unused call minutes roll-over when you recharge before expiry.\n
  • \n
  • \n Landline number may be removed from your account\n if you do not recharge before call minutes expire.\n
  • \n
\n
\n\n { pageState.priors.length > 0 ?\n
\n \n Recover a previous number\n \n
\n : null\n }\n\n \n { pageState.priors.length > 0 ? 'Choose a New Number' : 'Choose Number' }\n \n
\n
\n
\n )\n}\n\nconst ChooseNumberCard = ({dispatch}) => {\n const [state, setState] = useState({\n zones: [],\n zoneId: '',\n regions: [],\n regionId: '',\n numbers: [],\n selected: {number: '', zone:''},\n isFetching: false,\n error: null,\n })\n\n const [expanded, setExpanded] = useState('')\n\n // handleClick sets the selected number and progresses to the terms view\n const handleClick = () => {\n dispatch({type:'update', payload:{view:'terms', number: state.selected}})\n }\n\n // handleAccordionChange ensures only one accordion is expanded at a time.\n const handleAccordionChange = (panel) => (event, isExpanded) => {\n setExpanded(isExpanded ? panel : '');\n }\n\n // handleNumberSelect is called when the user selects\n // a number from the 'other numbers' list\n const handleNumberSelect = (value) => () => {\n setState({...state, selected: value})\n // scroll to the top of the page so we can see the selected number\n scroll.scrollToTop({containerId: 'psb', smooth: true, duration: 300});\n }\n\n // fetchMoreNumbers fetches another batch of numbers when the\n const fetchMoreNumbers = (regionId) => {\n setState({...state, isFetching: true})\n NumberService.getNumbers(regionId)\n .then(numbers => {\n const selected = numbers.length > 0 ? numbers[0] : {number:'', zone:''};\n setState({...state, numbers, selected, isFetching: false})\n // scroll to the top of the page so we can see the selected number\n scroll.scrollToTop({containerId: 'psb', smooth: true, duration: 300});\n })\n .catch(error => {\n setState({...state, error, isFetching: false})\n })\n }\n\n // Load zones & initial number set\n useEffect(()=>{\n setState(state =>({...state, isFetching: true}));\n\n const {zoneId, regionId} = zoneDefaults(); // {zoneId:'vic', regionId:'vic03'}\n\n // Retrieve zones and a default set of numbers\n Promise.all([\n NumberService.getRegions(),\n NumberService.getNumbers(regionId)\n ]).then(results => {\n // results contains [zones, numbers]\n const [zones, numbers] = results\n let selected = {number:'', zone:''}\n if (numbers.length > 0) {\n selected = numbers[0]\n }\n const regions = selectedZone(zoneId, zones).regions\n\n setState(state => ({\n ...state,\n zones,\n zoneId,\n numbers,\n selected,\n regions,\n regionId,\n isFetching: false,\n error: null,\n }))\n }).catch(error => {\n setState(state => ({...state, error, isFetching: false}));\n })\n }, []) // run on load\n\n // Load more numbers when the regionId changes\n useEffect(() => {\n if (state.regionId !== '') {\n setState(state => ({...state, isFetching: true}));\n NumberService.getNumbers(state.regionId)\n .then(numbers => {\n const selected = numbers.length > 0 ? numbers[0] : {number:'', zone:''};\n setState(state => ({...state, numbers, selected, isFetching: false}))\n // scroll to the top of the page so we can see the selected number\n scroll.scrollToTop({containerId: 'psb', smooth: true, duration: 300});\n })\n .catch(error => {\n setState(state => ({...state, error, isFetching: false}));\n })\n }\n }, [state.regionId])\n\n const regionName = selectedRegionName(state);\n\n // selectedZone returns the zone object identified by zoneId\n const selectedZone = (zoneId, zones) => {\n if (zoneId !== '' || zones.length > 0) {\n // find the zone\n const zone = zones.filter(z => {\n return z.id === zoneId\n })\n if (zone.length > 0) {\n return zone[0]\n }\n }\n return {id: '', name: '', regions: []}\n }\n\n return (\n \n
\n { state.selected.number !== '' && state.error === null && !state.isFetching ?\n
\n
Your landline number from the {regionName} region will be:
\n
{ausPhone(state.selected.number)}
\n
{state.selected.zone}
\n
\n \n Continue\n \n
\n
\n : null\n }\n\n { state.selected.number === '' && state.error === null && !state.isFetching ?\n \n : null\n }\n\n { state.selected.number !== '' && state.error === null && !state.isFetching ?\n \n }>\n
\n \n \n Show other landline numbers from {regionName}\n \n
\n
\n \n
\n \n\n {state.numbers.map(number => (\n \n \n \n \n \n {ausPhone(number.number)}\n ({number.zone})\n \n \n ))}\n \n\n
\n fetchMoreNumbers(state.regionId)}\n className=\"w-full\"\n disabled={state.isFetching}\n >\n Show Different Numbers\n \n
\n
\n
\n \n : null\n }\n\n { state.error === null && !state.isFetching ?\n \n }>\n
\n \n \n Choose a different location\n \n
\n\n
\n \n \n \n \n : null\n }\n\n { state.error !== null ?\n \n : null\n }\n\n { state.isFetching ?\n \n : null\n }\n
\n \n )\n\n}\n\nconst LocationSelect = ({state, setState}) => {\n\n // Handles the change event on the State list box\n const onZoneChange = (data) => {\n const zoneId = data.target.value || ''; // Get the state e.g. 'vic'\n const regionId = zoneId + '01' // Get the first child region e.g. 'vic01'\n const zone = state.zones.filter(e => {return e.id === zoneId });\n if (zone.length > 0) {\n setState({...state, zoneId, regionId, regions: zone[0].regions});\n }\n }\n\n const onRegionChange = (data) => {\n const regionId = data.target.value || '';\n setState({...state, regionId});\n if (regionId !== '') {\n // Scroll to the top of screen to show the new number\n scroll.scrollToTop({containerId: 'psb', smooth: true, duration: 300});\n }\n }\n\n return (\n
\n \n Choose a state\n \n { state.zones.map((value, index) => (\n \n {value.name}\n \n ))}\n \n \n\n \n Choose a region\n \n { state.regions.map((value, index) => (\n \n {value.name}\n \n ))}\n \n \n
\n )\n}\n\nconst PriorNumbersCard = ({pageState, dispatch}) => {\n\n const [state, setState] = useState({\n selected: {\n number: pageState.priors[0].number,\n zone: pageState.priors[0].zone,\n }})\n\n const handleClick = () => {\n dispatch({type:'update', payload:{number: state.selected, view:'terms'}})\n }\n\n // handleNumberSelect is called when the user selects\n // a number from the 'other numbers' list\n const handleNumberSelect = (value) => () => {\n setState({...state, selected: value})\n // scroll to the top of the page so we can see the selected number\n scroll.scrollToTop({containerId: 'psb', smooth: true, duration: 300});\n }\n\n return (\n
\n \n
\n
\n\n
Your landline number will be:
\n
{ausPhone(state.selected.number)}
\n
{state.selected.zone}
\n
\n \n Continue\n \n
\n
\n\n { pageState.priors.length > 0 ?\n \n }>\n
\n \n \n Show other available landline numbers you've had before\n \n
\n
\n \n
\n \n\n {pageState.priors.map(number => (\n \n \n \n \n \n {ausPhone(number.number)}\n ({number.zone})\n \n \n ))}\n \n\n
\n
\n \n : null\n }\n\n
\n \n
\n )\n}\n\nconst NotificationCard = ({regionId, regionName}) => {\n const {handleSubmit, control} = useForm({ mode: 'onChange' });\n const [state, setState] = useState({success: false})\n\n // onSubmit is called by ReactHookForm when the form is submitted and valid.\n // It returns a promise that is used by RHF to set the isSubmitting flag.\n const onSubmit = (data) => {\n return new Promise((resolve) => {\n const request = {\n comment: data.comment,\n email: data.email,\n regionId: regionId,\n }\n NotifyService.addRequest(request)\n .then(() => {\n // Notification has been created display success message\n setState({...state, email: data.email, success: true})\n })\n .catch(error => {\n setState({...state, error})\n })\n .finally(() => {\n resolve() // Resolve the promise so RHF knows we're done.\n })\n })\n }\n\n return (\n
\n { !state.success && !state.error ?\n <>\n Out of Stock\n\n
Sorry! We're out of numbers from the {regionName} region at the moment.
\n\n \n
Enter your email address and we'll notify you as soon as we have numbers available.
\n\n isValidEmail(value) || value === '' || 'Please enter a valid email address',\n required: 'Please enter your email address',\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n \n )}\n />\n\n
If you need a number in a specific area or town, let us know where.
\n\n (\n \n )}\n />\n\n
\n \n NOTIFY ME\n \n
\n \n \n : null\n }\n\n {state.success ?\n
\n \n
\n \n
\n
\n \n \n Thanks - we'll email you at {state.email} when we have numbers back in stock.\n \n \n
\n \n
\n
\n : null\n }\n\n { state.error && !state.success ?\n \n : null\n }\n\n
\n )\n}\n\nconst TermsCard = ({pageState, dispatch}) => {\n const classes = useStyles();\n\n const sku = pageState.sku;\n const minutes = pageState.sku.meta.inclusions.minutes;\n\n const [state, setState] = useState({termsAccepted: false})\n\n const handleCheck = (e) => {\n setState({...state, termsAccepted: e.target.checked})\n }\n\n const handleClick = () => {\n dispatch({type:'update', payload:{view:'checkout'}})\n }\n\n // const expiryDate = moment().add(28, \"days\").format('D/M/YY')\n\n return (\n \n
\n \n
HERE'S WHAT YOU'RE GETTING
\n\n
\n
    \n
  • \n {ausPhone(pageState.number.number)} will be added to your account\n automatically after checkout.\n
  • \n
  • \n The ${sku.price/100} setup fee is a once-off charge and\n includes {minutes.quantity} call minutes to use with this number.\n
  • \n
  • Unused call minutes will expire\n in {minutes.expiryDays} days unless you recharge before.\n
  • \n
  • If you use all your call minutes you need to\n recharge to keep receiving calls.\n
  • \n
  • Landline numbers and call minutes are not refundable.\n
  • \n
  • \n The landline number will be removed from your account\n if you have zero call minutes for 14 days or more.
    After that,\n you may be able to recover the number but a new setup fee will apply.\n
  • \n
\n\n \n }\n />\n
\n\n\n \n Proceed to checkout\n \n
\n
\n
\n )\n}\n\nconst CheckoutCard = ({pageState, dispatch}) => {\n const classes = useStyles();\n\n const {subtotal, taxes, total} = totals(pageState.sku);\n // const subtotal = (pageState.sku.price/100);\n // const taxes = (subtotal * pageState.sku.taxRate/100);\n // const total = subtotal + taxes;\n\n const order = {\n sku: pageState.sku,\n number: pageState.number,\n subtotal: subtotal,\n taxes: taxes,\n total: total,\n }\n\n // Get the global dispatch function\n const [, gDispatch] = useStore();\n\n const onSuccess = (purchase) => {\n // the checkout completed successfully\n dispatch({type:'update', payload: {\n order,\n purchase,\n view: 'success',\n }\n })\n\n // Invalidate the account in global store so we retrieve\n // the new service, dialActions, account status and paymentMethod if saved.\n gDispatch(invalidateAccount())\n }\n\n const onError = (error) => {\n // the checkout failed\n\n // display error panel\n dispatch({type:'update', payload:{order, error, view: 'error'} })\n }\n\n // The checkout card basically wraps the\n // Checkout component, injecting the SKU to be charged.\n return (\n \n
\n \n \n \n
\n
\n )\n}\n\nconst SuccessPanel = ({pageState}) => {\n const classes = useStyles();\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n const number = ausPhone(pageState.number.number)\n const hasMinutes = pageState.sku.meta.hasMinutes;\n const minutes = pageState.sku.meta.inclusions.minutes.quantity;\n const expiryDays = pageState.sku.meta.inclusions.minutes.expiryDays;\n const receiptUrl = pageState.purchase.purchase.receiptUrl;\n\n return (\n \n
\n \n \n
\n \n
\n
\n {/*
*/}\n
\n Thank you for your purchase!\n
\n
\n Your landline number {number} is\n set up and ready to forward calls to your mobile.\n
\n
    \n
  • \n You'll see this number as the caller ID when you receive a call via your PhoneThru service.\n
  • \n { hasMinutes ?\n
  • \n You have {minutes} call minutes to use with this number. They're good\n for {expiryDays} days.\n
  • \n : null\n }\n { pageState.purchase.cardUpdated ?\n
  • Your card has been saved. You can change or remove your saved\n card on the account page.
  • \n : null\n }\n
\n\n
\n \n
\n\n {/*
*/}\n
\n \n
\n
\n
\n
\n )\n}\n\nconst ApiErrorPanel = ({error}) => {\n\n return (\n \n
\n
\n \n
\n \n Sorry, it looks like there's a problem at our end. Please try again later.\n \n {error.status}/{error.statusText}\n
\n
\n )\n}\n\nconst zoneDefaults = () => {\n let tz = '';\n try {\n tz = Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch {}\n switch (tz) {\n case 'Australia/Melbourne': return {zoneId: 'vic', regionId: 'vic01'};\n case 'Australia/Brisbane': return {zoneId: 'qld', regionId: 'qld01'};\n case 'Australia/Lindeman': return {zoneId: 'qld', regionId: 'qld01'};\n case 'Australia/Sydney': return {zoneId: 'nsw', regionId: 'nsw01'};\n case 'Australia/Lord_Howe': return {zoneId: 'nsw', regionId: 'nsw01'};\n case 'Australia/Hobart': return {zoneId: 'tas', regionId: 'tas01'};\n case 'Australia/Adelaide': return {zoneId: 'sa', regionId: 'sa01'};\n case 'Australia/Perth': return {zoneId: 'wa', regionId: 'wa01'};\n case 'Australia/Eucla': return {zoneId: 'wa', regionId: 'wa01'};\n case 'Australia/Darwin': return {zoneId: 'nt', regionId: 'nt01'};\n case 'Australia/Canberra': return {zoneId: 'act', regionId: 'act01'};\n case 'Australia/ACT': return {zoneId: 'act', regionId: 'act01'};\n default: return {zoneId: 'vic', regionId: 'vic01'};\n }\n\n}\n\nconst selectedRegionName = (state) => {\n if (state.regionId === '' || state.zoneId === '' || state.zones.length === 0) {\n return ''\n }\n // find the zone\n const zone = state.zones.filter(z => { return z.id === state.zoneId })\n if (zone.length > 0) {\n // find the region\n const region = zone[0].regions.filter(r => { return r.id === state.regionId})\n if (region.length > 0) {\n return region[0].name\n }\n }\n return ''\n}\n\nexport default AddServicePage;\n\n\n\n\n\n\n","import React, {useEffect, useState} from \"react\";\nimport {Link} from \"react-router-dom\"\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {\n AccountBanner,\n AvatarSelect,\n ErrorScreen,\n HeaderToolbar,\n Loading,\n PaymentMethodCard,\n UserProfile\n} from \"../../components\";\nimport {TextField} from \"@material-ui/core\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Card from \"@material-ui/core/Card\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {fetchAccount, setUser} from \"../../store/actions\";\nimport {useStore} from \"../../store\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport { SentimentVeryDissatisfied } from \"@material-ui/icons\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport {UserService} from \"../../services\";\nimport {MetricService} from \"../../services\";\nimport {useSnackbar} from \"notistack\";\nimport * as toast from '../../utils/toast'\nimport {ReactComponent as VisaLogo} from \"../../images/visa-logo.svg\";\nimport {ReactComponent as MasterCardLogo} from \"../../images/mastercard-logo.svg\";\nimport Info from \"@material-ui/icons/Info\"\nimport AddCircleOutline from \"@material-ui/icons/AddCircleOutline\"\nimport {scroller} from 'react-scroll';\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: theme.spacing(2),\n justifyContent: 'center',\n // [theme.breakpoints.up('sm')]: {\n // marginRight: drawerWidth,\n // },\n },\n link: {\n color: '#047e9f',\n fontWeight: 700,\n fontSize: 14,\n '&:hover': {\n textDecoration: 'underline',\n textDecorationColor: '#047e9f',\n },\n },\n inlineLink: {\n color: '#047e9f',\n fontWeight: 700,\n '&:hover': {\n textDecoration: 'underline',\n textDecorationColor: '#047e9f',\n },\n },\n closeButton: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.primary.contrastText,\n },\n saveButton: {\n minWidth: 100,\n },\n mono: {\n fontFamily: '\"Courier New\", Courier, monospace',\n // fontWeight: 700,\n fontSize: 16,\n },\n creditCard: {\n display: 'flex',\n borderWidth: 1,\n borderRadius: 4,\n marginBottom: 16,\n maxWidth: 350,\n minHeight: 143,\n },\n widget: {\n marginTop: 8,\n marginBottom: 12,\n padding: 8,\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n borderRadius: 3,\n },\n widgetTitle: {\n color: 'rgba(255,255,255,0.75)',\n },\n}));\n\n\nconst AccountPage = ({location}) => {\n const classes = useStyles();\n const {user} = useAuthUser(); // Get logged in user\n const [store, dispatch] = useStore(); // Get the global store\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // If we have a location state with a scrollTo property, scroll to that element\n useEffect(() => {\n const el = (location.state && location.state.scrollTo) || ''\n if (el !== '') {\n scroller.scrollTo(el, {\n duration : 800,\n delay : 1200,\n offset : -70,\n smooth : 'easeInOutQuart',\n containerId : 'psb',\n });\n }\n },[location])\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n // console.log('store.account',store.account)\n // store.account.type='post-paid'\n // store.account.status = -1\n // store.account.balance = -2500\n\n return (\n
\n \n \n \n \n\n
\n { store.account.isFetching ? : null }\n { store.account.error && }\n { store.account.error === null && !store.account.isFetching ?\n <>\n\n \n\n {/* Display applicable account banners */}\n \n \n\n \n\n { store.account.type === 'pre-paid' && store.account.balance < 0 ?\n \n : null\n }\n\n \n\n \n\n \n \n : null\n }\n
\n\n
\n\n );\n}\n\nconst PersonalDetailsForm = () => {\n const classes = useStyles();\n const {handleSubmit, control, formState:{isSubmitting, isDirty, dirtyFields, errors}} = useForm({ mode: 'onChange' });\n const isValid = Object.keys(errors).length === 0;\n const [store, dispatch] = useStore(); // Get the global store\n const {enqueueSnackbar, closeSnackbar} = useSnackbar(); // Snackbar Hook for notifications\n\n // onSubmit is called by ReactHookForm when the form is submitted and valid.\n // It returns a promise that is used by RHF to set the isSubmitting flag.\n const onSubmit = (data) => {\n\n return new Promise((resolve) => {\n\n // If the form hasn't been changed, bail out\n if (!isDirty) { return }\n\n const changes = changeSet(dirtyFields, data);\n UserService.patch(store.user.accountId, store.user.id, changes)\n .then(() => {\n // notify the user\n toast.success(\"Changes saved\", enqueueSnackbar, closeSnackbar);\n // Update the global store\n dispatch(setUser({...store.user, ...changes}))\n\n })\n .catch(error => {\n // Notify the user we hit an error\n toast.apiError(\"Your changes weren't saved!\", error, enqueueSnackbar);\n\n })\n .finally(() => {\n resolve(); // resolve the promise so RHF knows we've finished submitting\n })\n\n })\n\n }\n\n return(\n \n
\n \n
\n Personal Details\n \n {/*\n Input field names should correspond to the field name in the API call\n */}\n
\n\n
\n
\n (\n \n )}\n />\n
\n\n (\n \n )}\n />\n
\n\n
\n\n
\n (\n \n )}\n />\n
\n\n
\n \n {isSubmitting ? 'Saving...' : 'Save'}\n \n
\n\n \n
\n
\n
\n
\n )\n}\n\nconst PrepaidBalancePanel = ({balance=0, status=0}) => {\n\n return(\n \n
\n \n
\n Account Balance\n
\n { balance > 0 ?\n
${(balance/100).toFixed(2)}
\n :\n
${(balance/100).toFixed(2)}
\n }\n
\n
\n
\n
\n
\n )\n}\n\nconst PaymentMethodPanel = ({accountId=0, paymentMethod={ id: '', type: '', brand: '', last4: '', expiry: ''}}) => {\n const classes = useStyles();\n\n return(\n \n
\n \n
\n Payment Method\n
\n {paymentMethod.type !== '' ?\n \n :\n
\n
\n
\n \n \n
\n \n
\n
\n }\n
\n
\n \n
\n Your card information is securely stored by our payments\n partner \n Stripe\n , one of the world's leading online\n payment providers. We do not store your card details on our servers.\n
\n
\n\n
\n
\n \n
\n \n )\n}\n\nconst PurchasesPanel = ({accountId}) => {\n const classes = useStyles();\n const [state, setState] = useState({\n isFetching : false,\n error : null,\n count : 0,\n sum : 0,\n })\n\n // Load the metric\n useEffect(() => {\n if (accountId === 0) { return }\n let loaded = true;\n\n setState({isFetching: true, error: null, count: 0, sum: 0})\n MetricService.getPaymentsLast30Days(accountId)\n .then(metric => {\n if (loaded) {\n setState({isFetching: false, error: null, count: metric.count, sum: metric.sum})\n }\n })\n .catch(error => {\n if (loaded) {\n setState({isFetching: false, count:0, sum:0, error})\n }\n })\n\n return () => {loaded = false}\n },[accountId])\n\n return (\n \n
\n \n { state.isFetching ?\n
\n :\n
\n Purchases\n { state.error ? : null }\n { state.error === null && !state.isFetching ?\n
\n
\n
\n Last 30 Days\n {state.count}\n Purchases\n
\n
\n ${(state.sum/100).toFixed(2)}\n Total\n
\n
\n
\n : null\n }\n \n
\n }\n
\n
\n
\n )\n}\n\nconst DangerZonePanel = ({status}) => {\n const classes = useStyles();\n\n return (\n \n
\n \n
\n Close Account\n
\n
Cancel all services and close this account.
\n
\n \n Close Account\n \n
\n
\n
\n
\n )\n}\n\nconst changeSet = (dirtyFields, fields) => {\n let set = {};\n Object.keys(dirtyFields).forEach((field) => {\n set[field] = fields[field]\n })\n return set;\n}\n\nconst ApiErrorPanel = ({error}) => (\n \n
\n
\n \n
\n \n Sorry, it looks like there's a problem at our end and we can't load this information.\n \n {error.status}/{error.statusText}\n
\n
\n)\n\n\nexport default AccountPage;","import moment from \"moment\";\n\n/***\n * format returns a formatted string for the passed format name and value\n *\n * @param name\n * @param value\n * @returns {*}\n */\nfunction format(name, value) {\n let result = value;\n let date;\n switch (name) {\n case 'date':\n date = moment(value);\n result = date.format('DD MMM HH:mm:ss');\n break;\n\n case 'date-long':\n date = moment(value);\n result = date.format('D MMMM YYYY');\n break;\n\n case 'time-12h':\n date = moment(value);\n result = date.format('h:mm:ss') + ' ' + date.format('a');\n break;\n\n case 'time-12h-short':\n date = moment(value);\n result = date.format('h:mm') + ' ' + date.format('a');\n break;\n\n case 'ago':\n date = moment(value);\n result = moment.duration(moment().diff(date)).humanize() + ' ago';\n break;\n\n case 'date-only':\n date = moment(value);\n result = date.format('D MMM YY');\n break;\n\n case 'direction':\n if (value.indexOf('inbound')===0 || value.indexOf('Inbound')===0) {\n result = 'incoming';\n }\n break;\n\n case 'status':\n if (value === 'no-answer' || value === 'noanswer') {\n result = 'no answer';\n }\n break;\n\n case 'duration':\n let duration = moment.duration(value, 'seconds');\n let hr = duration.hours();\n let min = duration.minutes();\n let secs = duration.seconds();\n if (value > 0) {\n result = secs + 's';\n if (min > 0) { result = min + 'm ' + result; }\n if (hr > 0) { result = hr + 'h ' + result; }\n } else {\n result = \"—\";\n }\n break;\n\n default:\n return result\n }\n return result\n}\n\nexport default format","import React, {useCallback, useEffect, useState} from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {\n ExpanderTable, ExpanderTableContent,\n ExpanderTableHeader,\n ExpanderTablePager, ExpanderTableRows,\n HeaderToolbar,\n} from \"../../components\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Menu from \"@material-ui/core/Menu\";\nimport {fetchAccount} from \"../../store/actions\";\nimport {useStore} from \"../../store\";\nimport {ErrorScreen} from \"../../components\";\nimport {Loading} from \"../../components\";\nimport {animateScroll} from 'react-scroll'\nimport ausPhone from \"../../utils/aus-phone\";\nimport format from \"../../utils/format\";\nimport {CallsService} from \"../../services\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport IconButton from \"@material-ui/core/IconButton\"\nimport Phone from \"@material-ui/icons/Phone\"\nimport PhoneForwarded from \"@material-ui/icons/PhoneForwarded\"\nimport PhoneDisabled from \"@material-ui/icons/PhoneDisabled\"\nimport PhoneMissed from \"@material-ui/icons/PhoneMissed\"\nimport CallEnd from \"@material-ui/icons/CallEnd\"\nimport MoreVert from \"@material-ui/icons/MoreVert\";\nimport Refresh from \"@material-ui/icons/Refresh\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display : 'flex',\n flexDirection : 'column',\n flexGrow : 1,\n marginTop : theme.spacing(2),\n },\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n}));\n\n\nconst CallLogPage = (props) => {\n const classes = useStyles();\n // const {user} = useAuthUser(); // Get logged in user\n const [store, dispatch] = useStore(); // Get the global store\n const [state, setState] = useState({\n isFetching : false,\n error : null,\n calls : [], // Call data\n total : 0, // total number of calls\n filtered : 0, // total number of calls after filtering\n page : 0, // current page (numbered from 0)\n pageLength : 10, // number of records to display per page\n pageCount : 0, // total number of pages available\n scrollTop : false, // If set, scroll to the top of the page after fetching\n showLoader : false, // if true display the table loading indicator\n });\n const [menuAnchor, setMenuAnchor] = useState(null)\n const tableRef = React.createRef();\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch])\n\n\n // fetchData is a callback that returns row data for the ExpanderTable\n //\n // When the table requires data it calls this function passing four parameters:\n // - page: the page number (first page is zero)\n // - pageLength: the maximum number of rows to return\n // - sorting: the expected sort columns and order of the result set.\n // - search: the user's search term if any\n //\n // The callback should return an object:\n // {\n // rows: array - the result rows (or an empty array)\n // total: int - the total number of rows available\n // filtered: int - the total number of rows returned after applying the search term.\n // }\n //\n // The function should be memoized using useCallback otherwise a new function will be passed to the\n // table each render which will cause the table to request the data each time it renders.\n const fetchData = useCallback((page, pageLength, sorting={}) => {\n return new Promise((resolve, reject) => {\n\n // If we don't have an accountId yet, we can't proceed...\n if (store.account.id === 0) {\n resolve({total: 0, filtered: 0, rows: []})\n return\n }\n\n // Set the sort order\n const sort = sorting.column && sorting.direction ? sorting.column+','+sorting.direction : 'startTime,desc';\n\n CallsService.getForAccount(store.account.id, page * pageLength, pageLength, sort)\n .then(result => {\n resolve({\n total : result.total,\n filtered : result.filtered,\n rows : result.calls,\n })\n })\n .catch(error => {\n setState(s =>({...s, isFetching: false, error}))\n })\n\n })\n }, [store.account.id])\n\n\n const handlePageVisibility = (isVisible, viewportOffset) => {\n // If the page controls at the bottom of the table are offscreen and above\n // the viewport, scroll to the top\n if (!isVisible && viewportOffset < 0) {\n animateScroll.scrollToTop({containerId: 'psb'});\n }\n }\n\n const handleMenuButtonClick = (event) => {\n // Open the menu at the\n setMenuAnchor(event.currentTarget)\n }\n const handleMenuItemClick = (event) => {\n if (event.target.id === 'refresh' && tableRef.current) {\n tableRef.current.reload();\n }\n setMenuAnchor(null);\n }\n const handleMenuClose = (event) => {\n setMenuAnchor(null);\n }\n\n return(\n
\n \n \n \n \n\n \n
\n { store.account.error &&
}\n { state.error &&
}\n { store.account.isFetching ?
: null }\n {store.account.error === null && state.error === null && !store.account.isFetching ?\n
\n Call Log\n\n \n\n \n
\n \n \n \n \n \n \n Refresh\n \n \n
\n
\n\n \n \n \n\n \n \n
\n : null\n }\n
\n
\n
\n )\n\n}\n\n// CallSummary renders the header for a row in the ExpanderTable\nconst CallSummary = ({row}) => {\n return (\n
\n
\n
{ausPhone(row.from)}
\n
{ausPhone(row.to)}
\n
{format('ago',row.startTime)}
\n
{format('duration', row.duration)}
\n
\n )\n}\n\n// CallContent renders the content in the expander in the ExpanderTable\nconst CallContent = ({row}) => {\n const classes = {\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n };\n\n return (\n
\n\n
\n
\n
Time
\n
\n {format('date-long', row.startTime)}\n \n
\n
\n
\n
Direction
\n
{format('direction', row.direction)}
\n
\n
\n\n
\n
\n
From
\n
{ausPhone(row.from)}
\n
\n
\n
To
\n
{ausPhone(row.to)}
\n
\n
\n\n
\n
\n
Duration
\n
{format('duration', row.duration)}
\n
\n
\n
Status
\n
{row.status}
\n
\n
\n\n
\n )\n}\n\nconst CallStatusIcon = ({status, fontSize}) => {\n switch (status) {\n case 'completed':\n return \n case 'cancel':\n return \n case 'no-answer':\n case 'noanswer':\n return \n case 'failed':\n return \n default:\n return \n }\n}\n\nexport default CallLogPage;","import React, {useEffect, useState} from \"react\";\nimport {Link as RouteLink} from 'react-router-dom';\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, FuseAnimate, HeaderToolbar, Loading} from \"../../components\";\nimport {Link} from \"@material-ui/core\";\nimport {Typography} from \"@material-ui/core\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Button from \"@material-ui/core/Button\";\nimport {Call, Email} from \"@material-ui/icons\";\nimport clsx from \"clsx\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount} from \"../../store/actions\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {FAQAccordion} from \"../../components\";\nimport {ReactComponent as Logo} from \"../../images/phonethru-logo.svg\";\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n justifyContent: \"center\",\n },\n bodyText: {\n fontWeight : 300,\n },\n emphasis: {\n fontWeight: 700,\n },\n para: {\n fontWeight : 300,\n marginBottom: 16,\n },\n link: {\n color: '#653ab1',\n fontWeight: 700,\n '&:hover': {\n textDecoration: 'underline',\n textDecorationColor: '#653ab1',\n },\n },\n list: {\n fontWeight: 300,\n listStyle: 'disc outside none',\n padding: '10px 10px 10px 25px',\n },\n panelLogo: {\n width: 200,\n height: 51,\n },\n}));\n\nconst SupportPage = () => {\n const classes = useStyles();\n const {user} = useAuthUser(); // Get logged in user\n const [store, dispatch] = useStore(); // Get the global store\n\n // Set up local state\n const [state, setState] = useState({\n property : '',\n tocLinks : [],\n })\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n // Set the Table of Contents links\n useEffect(()=>{\n if (store.account.property) {\n setState({\n property: store.account.property,\n // tocLinks: tocLinks\n })\n }\n }, [store.account.property])\n\n return (\n
\n \n \n \n \n\n
\n\n { store.account.isFetching ? : null }\n\n { store.account.error && }\n\n { store.account.error === null && !store.account.isFetching ?\n
\n \n \n \n\n { state.property === 'phonethru' ?\n \n : null\n }\n
\n : null\n }\n
\n
\n );\n}\n\nconst PhoneThruSupport = ({accountId, property, autoRecharge, accountType}) => {\n const classes = useStyles();\n\n return (\n \n \n
\n Mobile & Number Changes\n\n \n \n \n\n \n
\n
\n To add another landline number to your account tap the Add Number button under the My\n Numbers section on the Home page, or tap the button below.\n
\n
\n There is a one-time $9 set up fee for a new landline number.\n
\n
\n \n Add A Landline Number\n \n
\n\n
\n
\n
\n
\n\n \n
\n Landline Numbers\n\n \n
\n
\n To 'turn off' a landline number tap it on the Home page to show the Manage Number button\n and tap the button to go to the service page.\n
\n
\n In the Call Forwarding section you'll see a\n switch. Turn the switch off to stop receiving calls. You can follow the same process to\n turn Call Forwarding back on when you're ready to receive calls again.\n
\n
\n Turning Call Forwarding off does not affect the expiry of the call minutes on the landline number.\n
\n
\n Calls to your landline number are rejected when call forwarding is turned off.\n Your caller will hear a 'busy' tone.\n
\n
\n You do not use call minutes for rejected calls.\n
\n
\n
\n\n \n
\n
\n Landline numbers are automatically removed from your account if you have had zero\n call minutes for more than two weeks.\n
\n
\n You may be able to recover your old landline number.\n
\n
\n
\n\n \n
\n
\n To recover a previous landline number, tap the Add Number button under the My\n Numbers section on the Home page, or tap the button below.\n
\n
\n If your previous landline number is available, you will see\n a button labelled Recover a Previous Number. If you do not see the\n button, then your previous number is not available.\n
\n
\n Tap the Recover a Previous Number button and your first available\n previous number will be selected. Expand Show other available landline numbers\n you've had before to see a list of all available previous numbers.\n
\n
\n The one-time landline number $9 set up fee applies when\n recovering a previous number.\n
\n
\n \n Add A Landline Number\n \n
\n\n
\n
\n
\n
\n\n \n
\n Call Minutes\n\n \n
\n
\n Call minutes are automatically rolled over when you recharge.\n
\n
\n For example, you purchase an \"XL\" recharge on the first of the month. The call minutes will expire on the 28th of the month if you haven't used them before.\n On the 26th of the month you still have 245 minutes remaining and you're unlikely to use them all before they expire.\n
\n
\n Any recharge purchased before your call minutes expire will roll over your remaining minutes and extend their expiry date.\n
\n
\n It's not quite payday and finances are a bit tight, so you purchase a cheaper \"M\" recharge with 290 call minutes. Your existing 245 call minutes are rolled over to give you a total of\n 535 call minutes with 28 days expiry.\n
\n
\n\n
\n\n \n \n \n
\n
\n\n
\n )\n}\n\nconst ContactCard = ({accountId}) => {\n const classes = useStyles();\n\n return (\n
\n \n
\n
\n
\n \n \n (03) 9999 7555\n \n
\n
\n \n \n
\n
\n
\n
\n )\n}\n\nconst MobileNumberChangeContent = ({property}) => {\n const classes = useStyles();\n\n return (\n
\n
\n You can't change your the mobile number on this account, but you can create a new account with your\n new mobile number and transfer your landline number to the new account.\n
\n
\n Transferring a landline number to another account is a paid service.\n
\n
\n You can start the transfer process by tapping the landline number on the Home page, then\n tapping Manage Number then the Transfer Number button on the Service Detail page.
\n You can also go straight to\n the transfer page with the button below.\n
\n
\n A couple of notes about transferring a landline number:\n
    \n
  • \n You'll need to know the password of the receiving account. The receiving account is the\n mobile number you're transferring to.\n
  • \n
  • \n The landline will transfer to the receiving account with its existing call minutes and\n expiry.\n
  • \n
\n
\n
\n \n Transfer Landline Number\n \n
\n
\n )\n}\n\nconst RechargingContent = ({autoRecharge, accountType}) => {\n const classes = useStyles();\n\n return (\n \n
\n When your call minutes are getting low you'll see a RECHARGE button below the\n number on the home page or you can\n use the recharge page at any time.\n
\n
\n \n Recharge Now\n \n
\n
\n )\n}\n\nconst EmailButton = ({variant, accountId, title=\"Email Now\"}) => {\n const classes = useStyles();\n\n const mailToMove = `mailto:hello@phonethru.com?subject=Number%20location%20query%20(Account%20${accountId})`\n const mailToAdd = `mailto:hello@phonethru.com?subject=Additional%20landline%20number%20(Account%20${accountId})`\n const mailToSupport = `mailto:hello@phonethru.com?subject=Support%20query%20(Account%20${accountId})`\n const mailToNumber = `mailto:hello@phonethru.com?subject=Number%20Change%20(Account%20${accountId})`\n\n return (\n \n { variant === 'move' ?\n \n : null\n }\n { variant === 'add' ?\n \n : null\n }\n { variant === 'number-change' ?\n \n : null\n }\n { variant === 'link' ?\n \n {title}\n \n : null\n }\n \n )\n}\n\nexport default SupportPage;","import React, {useCallback, useEffect, useState} from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {\n ExpanderTable, ExpanderTableContent,\n ExpanderTableHeader,\n ExpanderTablePager, ExpanderTableRows,\n HeaderToolbar,\n} from \"../../components\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Menu from \"@material-ui/core/Menu\";\nimport {fetchAccount} from \"../../store/actions\";\nimport {useStore} from \"../../store\";\nimport {ErrorScreen} from \"../../components\";\nimport {Loading} from \"../../components\";\nimport {InvoiceStatus} from \"../../components\";\nimport {animateScroll} from 'react-scroll'\nimport format from \"../../utils/format\";\nimport {InvoiceService} from \"../../services\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport IconButton from \"@material-ui/core/IconButton\"\nimport MoreVert from \"@material-ui/icons/MoreVert\";\nimport Refresh from \"@material-ui/icons/Refresh\";\nimport Button from \"@material-ui/core/Button\";\nimport externalLink from \"../../utils/external-link\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport purchases from \"../../utils/purchases\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display : 'flex',\n flexDirection : 'column',\n flexGrow : 1,\n marginTop : theme.spacing(2),\n },\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n}));\n\n\nconst PurchasesPage = ({location}) => {\n const classes = useStyles();\n const [store, dispatch] = useStore(); // Get the global store\n const [state, setState] = useState({\n isFetching : false,\n error : null,\n charges : [], // Charge data\n total : 0, // total number of calls\n filtered : 0, // total number of calls after filtering\n page : 0, // current page (numbered from 0)\n pageLength : 10, // number of records to display per page\n pageCount : 0, // total number of pages available\n scrollTop : false, // If set, scroll to the top of the page after fetching\n showLoader : false, // if true display the table loading indicator\n });\n const [menuAnchor, setMenuAnchor] = useState(null)\n const tableRef = React.createRef();\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch])\n\n // fetchData is a callback that returns row data for the ExpanderTable\n //\n // When the table requires data it calls this function passing four parameters:\n // - page: the page number (first page is zero)\n // - pageLength: the maximum number of rows to return\n // - sorting: the expected sort columns and order of the result set.\n // - search: the user's search term if any\n //\n // The callback should return an object:\n // {\n // rows: array - the result rows (or an empty array)\n // total: int - the total number of rows available\n // filtered: int - the total number of rows returned after applying the search term.\n // }\n //\n // The function should be memoized using useCallback otherwise a new function will be passed to the\n // table each render which will cause the table to request the data each time it renders.\n const fetchData = useCallback((page, pageLength, sorting={}) => {\n return new Promise((resolve, reject) => {\n\n // If we don't have an accountId yet, we can't proceed...\n if (store.account.id === 0) {\n resolve({total: 0, filtered: 0, rows: []})\n return\n }\n\n // Set the sort order\n const sort = sorting.column && sorting.direction ? sorting.column+','+sorting.direction : 'date,desc';\n\n InvoiceService.search(store.account.id, page * pageLength, pageLength, sort)\n .then(result => {\n resolve({\n total : result.total,\n filtered : result.filtered,\n rows : purchases(result.invoices), // convert invoices to purchases\n })\n })\n .catch(error => {\n setState(s =>({...s, isFetching: false, error}))\n })\n\n })\n }, [store.account.id])\n\n const handlePageVisibility = (isVisible, viewportOffset) => {\n // If the page controls at the bottom of the table are offscreen and above\n // the viewport, scroll to the top\n if (!isVisible && viewportOffset < 0) {\n animateScroll.scrollToTop({containerId: 'psb'});\n }\n }\n\n const handleMenuButtonClick = (event) => {\n // Open the menu at the\n setMenuAnchor(event.currentTarget)\n }\n const handleMenuItemClick = (event) => {\n if (event.target.id === 'refresh' && tableRef.current) {\n tableRef.current.reload();\n }\n setMenuAnchor(null);\n }\n const handleMenuClose = (event) => {\n setMenuAnchor(null);\n }\n\n return(\n
\n \n \n \n \n\n \n
\n { store.account.error &&
}\n { state.error &&
}\n { store.account.isFetching ?
: null }\n { store.account.error === null && state.error === null && !store.account.isFetching ?\n
\n Purchases\n\n \n\n \n
\n \n \n \n \n \n \n Refresh\n \n \n
\n
\n\n \n \n \n\n \n \n
\n : null\n }\n
\n
\n
\n )\n\n}\n\n// PurchaseSummary renders the header for a row in the ExpanderTable\nconst PurchaseSummary = ({row}) => {\n return (\n
\n
{format('date-only', row.date)}
\n
{row.reference}
\n
${((row.amount - row.amountRefunded)/100).toFixed(2)}
\n
\n \n
\n
\n )\n}\n\n// PurchaseContent renders the content in the expander in the ExpanderTable\nconst PurchaseContent = ({row}) => {\n const classes = {\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n };\n\n return (\n
\n
\n
\n
Date
\n
{format('date-long',row.date)}
\n
\n
\n
Amount
\n
${(row.amount/100).toFixed(2)}
\n
\n
\n
\n
\n
Item
\n
{row.description}
\n
\n { row.amountRefunded > 0 ?\n
\n
Refunded
\n
${(row.amountRefunded/100).toFixed(2)}
\n
\n : null\n }\n
\n
\n
\n
Reference
\n
{row.reference}
\n
\n
\n
Status
\n
{row.status}
\n
\n
\n\n \n
\n )\n}\n\n\nexport default PurchasesPage;","import React, {useContext, useEffect, useState} from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {AuthContext, ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport Button from \"@material-ui/core/Button\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount, invalidateAccount} from \"../../store/actions\";\nimport Typography from \"@material-ui/core/Typography\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport {Card} from \"@material-ui/core\";\nimport red from \"@material-ui/core/colors/red\";\nimport {AccountService} from \"../../services\";\nimport {useSnackbar} from \"notistack\";\nimport {apiError} from '../../utils/toast'\nimport TextField from \"@material-ui/core/TextField\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display : 'flex',\n flexDirection : 'column',\n flexGrow : 1,\n marginTop : theme.spacing(2),\n },\n cardContent: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n padding: 24,\n minHeight: 443,\n maxWidth: 340,\n },\n closeButton: {\n backgroundColor: red[600],\n color: \"white\",\n '&:focus, &:active, &:hover': {\n backgroundColor: red[600],\n },\n marginTop: 36,\n width: 200,\n },\n title: {\n marginBottom: 16,\n }\n}));\n\nconst CloseAccountPage = ({location, history}) => {\n const classes = useStyles();\n const [store, dispatch] = useStore(); // Get the global store\n const [state, setState] = useState({\n stage : 'start',\n submitting : false,\n reason : 0,\n confirm : '',\n })\n const {enqueueSnackbar} = useSnackbar()\n\n const reasons = [\n {value: 1, reason: 'My inmate has been released.'},\n {value: 2, reason: 'It wasn\\'t saving me money.'},\n {value: 3, reason: 'I don\\'t need it any more.'},\n {value: 4, reason: 'I\\'m moving to another provider.'},\n {value: 5, reason: 'I\\'d rather not say.'},\n ]\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch])\n\n\n // store.account.property = 'prisonconnect'\n // store.account.type=\"post-paid\"\n\n const lostMinutes = minutesRemaining(store.account)\n\n const handleInputChange = (event) => {\n setState({\n ...state,\n [event.target.name]: event.target.value,\n })\n }\n\n const handleCloseButtonClick = (event) => {\n event.preventDefault();\n setState({...state, submitting: true})\n\n AccountService.close(store.account.id, reasons[state.reason-1].reason)\n .then(() => {\n dispatch(invalidateAccount()) // reload the account\n setState({...state, submitting: false, stage: 'complete'})\n })\n .catch(error => {\n apiError(\"Sorry, we can't close your account right now.\", error, enqueueSnackbar);\n setState({...state, submitting: false})\n })\n }\n\n const handleTextChange = (event) => {\n setState({\n ...state,\n [event.target.name]: event.target.value.toLowerCase(),\n })\n }\n\n return (\n
\n \n \n \n \n\n \n
\n { store.account.error &&
}\n { store.account.isFetching ?
: null }\n { store.account.error === null && !store.account.isFetching ?\n
\n \n
\n\n {state.stage === 'start' ?\n <>\n Close Account\n \n We're sorry to see you go!\n \n \n Please share the reason you're closing your account today.\n \n\n \n\n {lostMinutes > 0 ?\n
\n Warning\n {lostMinutes} unused call minutes will be lost!\n \n Type \"close\" on the line below to show you\n really want to close this account and lose {lostMinutes} call minutes.\n \n \n
\n : null\n }\n\n 0 && state.confirm !== 'close')}\n >\n { state.submitting ? : 'Close Account Now'}\n \n \n : null\n }\n\n {state.stage === 'complete' ?\n \n : null\n }\n\n
\n
\n
\n : null\n }\n
\n
\n
\n )\n}\n\n\nconst ReasonSelect = ({reason, onChange}) => {\n return (\n \n )\n}\n\n\nconst CloseText = ({account, history}) => {\n const classes = useStyles();\n const auth = useContext(AuthContext)\n\n const handleLogoutButtonClick = (event) => {\n event.preventDefault();\n auth.logout();\n history.push('/');\n }\n\n //console.log('account=',account)\n return (\n <>\n Account Closed\n\n \n \n Thank you, your account has been closed.\n \n \n\n {/**/}\n {/* */}\n {/* Our team will finalise your account within one business day.*/}\n {/* */}\n {/**/}\n\n { account.type === 'post-paid' ?\n <>\n \n \n As part of the finalization process, we'll charge any unbilled calls to your credit card\n and email you a final receipt.\n \n \n \n : null\n }\n { account.type === 'pre-paid' ?\n <>\n { account.balance > 0 ?\n \n \n As part of the finalization process, your balance\n of ${(account.balance/100).toFixed(2)} will be refunded to your card.\n
\n We'll email a receipt when the refund has been issued and you will normally\n see the money in your account 2-3 business days after that.\n
\n
\n
\n : null\n }\n \n : null\n }\n\n \n \n Thanks for being a customer and bye for now!\n \n \n\n \n \n \n \n )\n\n}\n\nconst minutesRemaining = (account) => {\n if (!account) {\n return 0;\n }\n if (!account.services) {\n return 0;\n }\n let minutes = 0;\n for (let i=0; i < account.services.length; i++) {\n minutes += account.services[i].callCredits;\n }\n return minutes;\n}\n\nexport default CloseAccountPage;","import React, {Suspense, useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, FuseAnimate, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Card from \"@material-ui/core/Card\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport {UserService} from \"../../services\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {Button} from \"@material-ui/core\";\nimport PasswordStrengthMeter from \"../../components/password-strength-meter/password-strength-meter\";\nimport NewPasswordField from \"../../components/new-password-field/new-password-field\";\nimport {CheckCircleOutline} from \"@material-ui/icons\";\nimport {Link} from \"react-router-dom\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n}));\n\n\nconst PasswordPage = ({location}) => {\n const classes = useStyles();\n const {user} = useAuthUser(); // Get logged in user\n const [state, setState] = useState({success: false, error: null})\n\n const {handleSubmit, control, formState:{isValid, isSubmitting}} = useForm({ mode: 'onChange' });\n const [scoreState, setScoreState] = useState({pwCheck:{\n score : 0,\n rating : '',\n warning : '',\n suggestions: [\n 'Use a few words, avoid common phrases',\n 'No need for symbols, digits, or uppercase letters',\n ],\n },\n })\n\n //console.log('user', user)\n\n\n // Cache the password score so we can update it for password validation in the same render cycle\n let pwScore = scoreState.pwCheck.score\n\n // onSubmit is called by ReactHookForm when the form is submitted and valid.\n // It returns a promise that is used by RHF to set the isSubmitting flag.\n const onSubmit = (data) => {\n return new Promise((resolve) => {\n UserService.setPassword(user.accountId, user.id, data.password)\n .then(() => {\n // password has been updated - display a success message\n setState({...state, success: true})\n })\n .catch(error => {\n // Display an API error message\n setState({...state, error})\n })\n .finally(() => {\n resolve() // Resolve the promise so RHF knows we're done.\n })\n })\n }\n\n const handlePasswordChange = (event, check, onChange) => {\n //console.log('handlePasswordChange check', check)\n setScoreState({...scoreState, pwCheck: check})\n pwScore = check.score\n return onChange(event)\n }\n\n const isValidPassword = (value) => {\n //console.log('isValidPassword',value, pwScore)\n return pwScore > 2\n }\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n // useEffect(()=> {\n // dispatch(fetchAccount(user.accountId, store, dispatch))\n // }, [user.accountId, store, dispatch])\n\n return (\n
\n \n \n \n \n\n
\n { state.error && }\n { state.error === null && !state.success ?\n
\n \n \n
\n Change Password\n \n }>\n isValidPassword(value) || 'A strong password is required'\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n <>\n handlePasswordChange(event, check, onChange)}\n exclusions={['prisonconnect','telephoneer','phonethru']} // exclude from passwords\n />\n \n \n )}\n />\n \n\n
\n \n {isSubmitting ? 'Changing password...' : 'Change Password'}\n \n
\n\n \n
\n
\n
\n
\n : null\n }\n { state.success ?\n
\n \n \n \n \n \n
\n : null }\n
\n
\n )\n}\n\nconst SuccessPanel = () => {\n\n return (\n
\n \n
\n \n
\n
\n \n \n Your password has been updated!\n \n \n
\n \n
\n
\n )\n}\n\nexport default PasswordPage;","import React, {useEffect} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount} from \"../../store/actions\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {\n AddPaymentMethod,\n ErrorScreen,\n HeaderToolbar,\n Loading, PaymentMethodCard\n} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Card from \"@material-ui/core/Card\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n}));\n\nconst AddCardPage = ({location}) => {\n const classes = useStyles();\n const [store, dispatch] = useStore(); // Get the global store\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch])\n\n return (\n
\n \n \n \n \n\n
\n { store.account.isFetching ? : null }\n { store.account.error && }\n { store.account.error === null && !store.account.isFetching ?\n \n
\n \n {store.account.paymentMethod && store.account.paymentMethod.type !== '' ?\n \n :\n \n }\n \n
\n
\n : null\n }\n
\n
\n )\n\n}\n\nexport default AddCardPage","import React, {useEffect} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount} from \"../../store/actions\";\nimport {Link, Redirect} from \"react-router-dom\";\nimport Grid from \"@material-ui/core/Grid\";\nimport clsx from \"clsx\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport Button from \"@material-ui/core/Button\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport Typography from \"@material-ui/core/Typography\";\nimport callCredits from \"../../utils/call-credits\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n listItem: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginBottom: theme.spacing(2),\n borderRadius: 3,\n maxWidth: 400,\n },\n number: {\n fontSize: 18,\n fontWeight: 700,\n '&.inActive': {\n textDecoration: 'line-through',\n },\n },\n}));\n\n//\n// If the account has only 1 service, the recharge page redirects\n// to the service recharge page, /recharge/.\n//\n// If the account has no services, it displays a prompt with a link\n// to add a service /add-service\n//\n// If there is more than one service, a pick list is displayed to\n// allow the user to choose which service to recharge.\n//\nconst RechargePage = ({location}) => {\n const classes = useStyles();\n const [store, dispatch] = useStore();\n const {user} = useAuthUser(); // Get logged in user\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n return (\n
\n \n \n \n \n\n
\n { store.account.isFetching ? : null }\n { store.account.error && }\n { store.account.error === null && !store.account.isFetching ?\n \n
\n \n
\n
\n : null\n }\n
\n
\n );\n\n}\n\nconst RechargeSelectList = ({account}) => {\n const classes = useStyles();\n\n // Only show active services\n let services = [];\n if (account.services) {\n services = account.services.filter((service) => {\n return service.active;\n })\n }\n\n // Test stuff...\n // services = [\n // {id:'101000000001', number: '+61398765432', name:'PhoneThru', meta:{zone:'Melbourne'}, callCredits: 236, callCreditsExpiry:'2021-06-19 23:59:59'},\n // {id:'101000000002', number: '+61354621789', name:'PhoneThru', meta:{zone:'Castlemaine'}, callCredits: 123, callCreditsExpiry:'2021-06-18 23:59:59'}\n // ]\n //\n // services = [];\n\n // Redirect if there's only one number\n if (services.length === 1) {\n return \n }\n\n if (services.length === 0) {\n if (account.status < 1) {\n // The account is closed\n return (\n \n Recharge\n Your account is currently closed but you can reactivate it.\n
\n \n Reactivate my account\n \n
\n
\n )\n\n } else {\n // There's zero services...\n return (\n \n Recharge\n Hmm, we couldn't find any numbers you can recharge, but you can add one!\n
\n \n Add a Number\n \n
\n
\n )\n }\n\n } else {\n // There's > 1 service...\n return (\n \n Choose a number to recharge\n \n\n { services.map((service, index) => (\n \n \n
{service.name}
\n
\n {ausPhone(service.number)}\n
\n { service.meta.zone !=='' ?
{service.meta.zone}
:null}\n \n \n \n
\n \n ))}\n
\n
\n )\n }\n}\n\nconst Credit = ({service}) => {\n const {minutes, daysLeft} = callCredits(service);\n\n if (minutes > 0) {\n return (\n <>\n {/**/}\n
{minutes} min ({daysLeft} {daysLeft === 1 ? 'day':'days'}) left
\n \n )\n } else {\n return (\n <>\n {/**/}\n
No minutes left
\n \n )\n }\n}\n\n\nexport default RechargePage;\n","import React, {useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {SkuService} from \"../../services\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport Button from \"@material-ui/core/Button\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport {Checkbox} from \"@material-ui/core\";\nimport useStore from \"../../store/hooks\";\nimport {fetchAccount, invalidateAccount} from \"../../store/actions\";\nimport Checkout from \"../../components/checkout/checkout\";\nimport {CheckCircleOutline, SentimentVeryDissatisfied} from \"@material-ui/icons\";\nimport externalLink from \"../../utils/external-link\";\nimport {Link} from \"react-router-dom\";\nimport {totals} from \"../../utils/checkout\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n skuButton: {\n textTransform: 'none',\n padding: 0,\n }\n}));\n\nconst RechargeServicePage = ({location, match}) => {\n const classes = useStyles();\n const serviceId = match.params.id;\n //console.log('serviceId', serviceId)\n\n const [store, dispatch] = useStore()\n const {user} = useAuthUser()\n\n const [state, setState] = useState({\n view: 'start', // current view\n sku: {\n id: '',\n name: '',\n type: '',\n taxRate: 0,\n taxInc: false,\n price: 0,\n meta: {\n description: '',\n inclusions: {\n minutes: {\n quantity: 0,\n expiryDays: 0,\n },\n }\n }\n },\n skus: [],\n service: {id:0, number:'', callCredits:0 },\n purchase: {},\n order: {},\n termsAccepted: false,\n isFetching: false,\n error: null\n });\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n // Load SKUs on mount\n useEffect(() => {\n setState(state => ({...state, isFetching: true}));\n SkuService.getSkus()\n .then(skus => {\n setState(state => ({...state, skus, isFetching: false}));\n })\n .catch(error => {\n setState(state => ({...state, error, isFetching: false}));\n })\n }, []) // <- load on start\n\n // Set the selected service\n useEffect(() => {\n const services = store.account.services.filter(s => s.id.toString() === serviceId);\n if (services.length > 0) {\n setState(state => ({...state, service: services[0]}));\n }\n }, [serviceId, state.service, store.account])\n\n //console.log('state', state);\n\n return (\n
\n \n \n \n \n\n
\n { state.isFetching || store.account.isFetching ? : null }\n { store.account.error && }\n { state.error && }\n { state.error === null && !state.isFetching && store.account.error === null && !store.account.isFetching ?\n \n : null\n }\n
\n\n
\n );\n}\n\nconst ContentCard = ({state, setState}) => {\n const classes = useStyles();\n\n return (\n \n
\n \n { state.view !== 'checkout' ?\n <>\n Recharge\n \n {ausPhone(state.service.number)}\n \n \n : null\n }\n { state.view === 'start' ?\n \n : null\n }\n { state.view === 'terms' ?\n \n : null\n }\n { state.view === 'checkout' ?\n \n : null\n }\n { state.view === 'success' ?\n \n : null\n }\n {state.view === 'error' ?\n \n :null\n }\n \n
\n
\n\n )\n}\n\nconst SkuList = ({state, setState}) => {\n const classes = useStyles();\n\n const handleClick = (sku) => {\n //console.log('sku', sku)\n setState({...state, sku, view: 'terms'})\n }\n\n const getSize = (name) => {\n // Assumes the name is in the form \" - \"\n const idx = name.indexOf(' - ')\n if (idx === -1) {\n return '';\n }\n return name.substr(name.indexOf(' - ')+3);\n }\n\n return (\n <>\n
\n {/*Choose a recharge size*/}\n
Choose a recharge size
\n
\n \n\n { state.skus.map((sku) => (\n {handleClick(sku)}}>\n
\n {getSize(sku.name)}\n
\n \n {sku.meta.inclusions.minutes.quantity} minutes\n for ${(sku.price/100).toFixed(0)}\n \n {(sku.price/sku.meta.inclusions.minutes.quantity).toFixed(1)}c per minute\n
\n\n
\n
\n ))}\n
\n \n )\n\n}\n\nconst TermsCard = ({state, setState}) => {\n const minutes = state.sku.meta.inclusions.minutes;\n const price = (state.sku.price/100).toFixed(0)\n const number = state.service.number;\n const remaining = state.service.callCredits;\n\n const handleCheck = (e) => {\n setState({...state, termsAccepted: e.target.checked})\n }\n\n const handleClick = () => {\n setState({...state, view:'checkout'})\n }\n\n const handleBackClick = () => {\n setState({...state, view:'start'})\n }\n\n return (\n \n
\n {/**/}\n
HERE'S WHAT YOU'RE GETTING
\n\n
\n
    \n
  • \n {minutes.quantity} call minutes for ${price}\n
  • \n { state.service.callCredits > 0 ?\n
  • Your remaining {remaining} minutes will be rolled over\n to give you a total of {remaining+minutes.quantity} minutes to use in the\n next {minutes.expiryDays} days.\n
  • \n : null\n }\n
  • Unused call minutes will expire\n in {minutes.expiryDays} days unless you recharge before.\n
  • \n
  • \n Call minutes can only be used for calls\n to {ausPhone(number)} and are\n not refundable.\n
  • \n
\n\n \n }\n />\n
\n\n\n \n Proceed to checkout\n \n\n
\n \n
\n
\n
\n )\n\n}\n\nconst CheckoutCard = ({state, setState}) => {\n\n const {subtotal, taxes, total} = totals(state.sku);\n // let subtotal = 0;\n // let taxes = 0;\n // let total = 0;\n //\n // if (state.sku.taxInc) {\n // total = state.sku.price/100;\n // taxes = total - (total/((100+state.sku.taxRate)/100))\n // subtotal = total - taxes;\n // } else {\n // subtotal = state.sku.price/100\n // taxes = Math.round(state.sku.taxRate * state.sku.price/100)/100\n // total = subtotal + taxes\n // }\n\n const order = {\n sku: state.sku,\n serviceId: state.service.id,\n number: {number: state.service.number, zone: state.service.meta.zone},\n subtotal: subtotal,\n taxes: taxes,\n total: total,\n }\n\n // Get the global dispatch function\n const [, dispatch] = useStore();\n\n const onSuccess = (purchase) => {\n // the checkout completed successfully\n //console.log('checkout succeeded', purchase);\n setState({...state, purchase, order, view: 'success'})\n\n // Invalidate the account in global store so we retrieve\n // the new service, dialActions, account status and paymentMethod if saved.\n dispatch(invalidateAccount())\n }\n\n const onError = (error) => {\n // the checkout failed\n //console.log('checkout failed', error);\n\n // display error panel\n setState({...state, order, error, view:'error'})\n }\n\n // The checkout card basically wraps the\n // Checkout component, injecting the SKU to be charged.\n return (\n \n
\n \n
\n
\n )\n}\n\nconst SuccessPanel = ({state, setState}) => {\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n const number = state.purchase.recharge.number;\n const minutes = state.purchase.recharge.credits;\n const expiryDays = state.purchase.recharge.expiryDays;\n const receiptUrl = state.purchase.purchase.receiptUrl;\n const totalMinutes = state.purchase.recharge.closingCredits\n\n //console.log('receiptUrl', receiptUrl);\n //console.log('*** state', state);\n\n return (\n \n
\n {/**/}\n \n
\n \n
\n
\n {/*
*/}\n
\n Thank you for your purchase!\n
\n
\n {minutes} call minutes have been added\n to {ausPhone(number)}.\n
\n
    \n
  • \n You have a total of {totalMinutes} call minutes that will expire in {expiryDays} days.\n
  • \n { state.purchase.cardUpdated ?\n
  • Your card has been saved. You can change or remove your saved\n card on the account page.
  • \n : null\n }\n
\n\n
\n \n
\n\n {/*
*/}\n
\n \n
\n {/*
*/}\n
\n
\n )\n}\n\nconst ApiErrorPanel = ({error}) => {\n\n return (\n \n
\n
\n \n
\n \n Sorry, it looks like there's a problem at our end. Please try again later.\n \n {error.status}/{error.statusText}\n
\n
\n )\n}\n\nexport default RechargeServicePage;\n","import React, {useEffect} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {useStore} from \"../../store\";\nimport {fetchAccount} from \"../../store/actions\";\nimport {Link, Redirect} from \"react-router-dom\";\nimport Grid from \"@material-ui/core/Grid\";\nimport clsx from \"clsx\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport Typography from \"@material-ui/core/Typography\";\nimport callCredits from \"../../utils/call-credits\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n listItem: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginBottom: theme.spacing(2),\n borderRadius: 3,\n maxWidth: 400,\n },\n number: {\n fontSize: 18,\n fontWeight: 700,\n '&.inActive': {\n textDecoration: 'line-through',\n },\n },\n}));\n\n//\n// If the account has only 1 service, the transfer page redirects\n// to the service transfer page, /transfer/.\n//\n// If the account has no services, it redirect to /home\n//\n// If there is more than one service, a pick list is displayed to\n// allow the user to choose which service to transfer.\n//\nconst TransferPage = ({location}) => {\n const classes = useStyles();\n const [store, dispatch] = useStore();\n const {user} = useAuthUser(); // Get logged in user\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n return (\n
\n \n \n \n \n\n
\n { store.account.isFetching ? : null }\n { store.account.error && }\n { store.account.error === null && !store.account.isFetching ?\n \n
\n \n
\n
\n : null\n }\n
\n
\n );\n\n}\n\nconst TransferSelectList = ({account}) => {\n const classes = useStyles();\n\n // Only show active services\n let services = [];\n if (account.services) {\n services = account.services.filter((service) => {\n return service.active;\n })\n }\n\n // Test stuff...\n // services = [\n // {id:'101000000001', number: '+61398765432', name:'PhoneThru', meta:{zone:'Melbourne'}, callCredits: 236, callCreditsExpiry:'2021-06-19 23:59:59'},\n // {id:'101000000002', number: '+61354621789', name:'PhoneThru', meta:{zone:'Castlemaine'}, callCredits: 123, callCreditsExpiry:'2021-06-18 23:59:59'}\n // ]\n //\n // services = [];\n\n // Redirect if there's only one number\n if (services.length === 1) {\n //console.log('redirecting to only available service')\n return \n }\n\n if (services.length === 0) {\n // There's zero services...\n return \n\n } else {\n // There's > 1 service...\n return (\n \n Choose a number to transfer\n \n\n { services.map((service, index) => (\n \n \n
{service.name}
\n
\n {ausPhone(service.number)}\n
\n { service.meta.zone !=='' ?
{service.meta.zone}
:null}\n \n \n \n
\n \n ))}\n
\n
\n )\n }\n}\n\nconst Credit = ({service}) => {\n const {minutes, daysLeft} = callCredits(service);\n\n if (minutes > 0) {\n return
{minutes} min ({daysLeft} {daysLeft === 1 ? 'day':'days'}) left
\n\n } else {\n return
No minutes left
\n\n }\n}\n\n\nexport default TransferPage;\n","import React, {useEffect, useRef, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {AccountService, SkuService} from \"../../services\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport Button from \"@material-ui/core/Button\";\nimport {\n FormControl, FormHelperText,\n IconButton,\n InputAdornment,\n InputLabel,\n OutlinedInput,\n TextField\n} from \"@material-ui/core\";\nimport useStore from \"../../store/hooks\";\nimport {fetchAccount, invalidateAccount} from \"../../store/actions\";\nimport Checkout from \"../../components/checkout/checkout\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n SentimentVeryDissatisfied,\n Visibility,\n VisibilityOff\n} from \"@material-ui/icons\";\nimport externalLink from \"../../utils/external-link\";\nimport {Link} from \"react-router-dom\";\nimport {Controller, useForm} from \"react-hook-form\";\nimport {isValidMobile} from \"../../utils/valid\";\nimport clsx from \"clsx\";\nimport e164ify from \"../../utils/e164\";\nimport {totals} from \"../../utils/checkout\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n skuButton: {\n textTransform: 'none',\n padding: 0,\n },\n formField: {\n marginBottom: 24,\n },\n}));\n\nconst TransferServicePage = ({location, match}) => {\n const classes = useStyles();\n const serviceId = match.params.id;\n\n const [store, dispatch] = useStore()\n const {user} = useAuthUser()\n\n const [state, setState] = useState({\n view: 'start', // current view\n sku: {\n id: '',\n name: '',\n type: '',\n taxRate: 0,\n taxInc: false,\n price: 0,\n meta: {\n description: '',\n inclusions: {\n minutes: {\n quantity: 0,\n expiryDays: 0,\n },\n }\n }\n },\n service: {\n id: 0,\n number: '',\n callCredits: 0,\n },\n purchase: {},\n order: {},\n termsAccepted: false,\n isFetching: false,\n error: null,\n mobileNumber: '',\n password: '',\n showPassword: false,\n rxAccountError: '',\n ticketId: '',\n });\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n // Make sure the account is available in the store\n useEffect(()=> {\n dispatch(fetchAccount(user.accountId, store, dispatch))\n }, [user.accountId, store, dispatch])\n\n // Load SKUs on mount\n useEffect(() => {\n setState(state => ({...state, isFetching: true}));\n SkuService.getSku('SVC-PTTX-001')\n .then(sku => {\n setState(state => ({...state, sku, isFetching: false}));\n })\n .catch(error => {\n setState(state => ({...state, error, isFetching: false}));\n })\n }, []) // <- load on start\n\n // Set the selected service\n useEffect(() => {\n const services = store.account.services.filter(s => s.id.toString() === serviceId);\n if (services.length > 0) {\n setState(state => ({...state, service: services[0]}));\n }\n }, [serviceId, state.service, store.account])\n\n return (\n
\n \n \n \n \n\n
\n { state.isFetching || store.account.isFetching ? : null }\n { store.account.error && }\n { state.error && }\n { state.error === null && !state.isFetching && store.account.error === null && !store.account.isFetching ?\n \n : null\n }\n
\n\n
\n );\n}\n\nconst ContentCard = ({state, setState}) => {\n\n return (\n \n
\n { state.view === 'start' ?\n \n : null\n }\n { state.view === 'terms' ?\n \n : null\n }\n { state.view === 'checkout' ?\n \n : null\n }\n { state.view === 'success' ?\n \n : null\n }\n {state.view === 'error' ?\n \n :null\n }\n
\n
\n\n )\n}\n\nconst ItemCard = ({state, setState}) => {\n const classes = useStyles();\n\n const sku = state.sku;\n\n const handleNew = () => {\n setState({...state, view: 'terms'})\n }\n\n return (\n \n
\n \n Transfer Landline Number\n
\n\n
\n
$
\n
{sku.price/100}
\n
\n\n
\n\n
\n
    \n
  • \n This paid service will transfer landline\n number {ausPhone(state.service.number)} to another mobile number.\n
  • \n
  • \n The mobile number you're transferring to must have an account already set up.\n
  • \n
  • \n Any remaining call minutes will be transferred with the landline number.\n
  • \n
\n
\n\n \n Transfer {ausPhone(state.service.number)}\n \n
\n
\n
\n )\n}\n\nconst ReceivingAccountCard = ({state, setState}) => {\n const classes = useStyles();\n const focusRef = useRef();\n const {user} = useAuthUser();\n const {handleSubmit, control, formState:{ isValid, isSubmitting }} = useForm({ mode: 'onChange' });\n\n const onSubmit = (data, event) => {\n\n if (state.rxAccountError !== '') {\n setState({...state, rxAccountError:''});\n }\n\n return new Promise((resolve) => {\n const mobile = e164ify(data.mobileNumber);\n if (mobile === user.phone) {\n // User has entered their own phone number...\n setState({...state, rxAccountError: 'You have entered the mobile number for this account. '+\n 'Enter the mobile number for the receiving account.'})\n resolve();\n return\n }\n // Call the AccountService to create a transfer ticket.\n AccountService.transferService(user.accountId, state.service.id, data.mobileNumber, data.password)\n .then(result => {\n setState({...state, mobileNumber: mobile, ticketId: result.ticketId, view:'checkout' })\n resolve();\n })\n .catch(error => {\n if (error.status === 401 || error.status === 403) {\n setState({...state, mobileNumber: mobile, rxAccountError: 'bad_rx'});\n } else {\n setState({...state, mobileNumber: mobile, rxAccountError: \"Sorry, we're not able to verify the receiving account right now. Please try again later.\"});\n }\n resolve();\n })\n })\n }\n\n const handleClickShowPassword = () => {\n setState({...state, showPassword: !state.showPassword});\n };\n\n const handleMouseDownPassword = (event) => {\n event.preventDefault();\n };\n\n const validateMobile = (value) => {\n if (state.rxAccountError !== '') {\n setState({...state, rxAccountError:''});\n }\n return isValidMobile(value) || 'Enter the receiving mobile number'\n }\n\n return (\n {\n focusRef.current && focusRef.current.focus();\n }}>\n
\n \n Receiving Account \n
\n {/*
{sku.name}
*/}\n\n
\n Enter the mobile number for the receiving account. After the\n transfer is complete, calls to {ausPhone(state.service.number)} will go to the mobile number\n you enter here.\n
\n\n { state.rxAccountError ?\n \n
\n \n { state.rxAccountError === 'bad_rx' ?\n
\n We couldn't find an account with that mobile number and password.
\n
    \n
  • \n Confirm that you have created an account\n for {ausPhone(state.mobileNumber)}.\n
  • \n
  • \n Check that you have entered the password for the receiving account correctly.\n You can tap the icon to show the\n password.
  • \n
\n
\n :\n
{state.rxAccountError}
\n }\n
\n
\n : null\n }\n\n onSubmit(data, event))}\n >\n validateMobile(value),\n }}\n render={ ({field: {onChange, value}, fieldState:{error} }) => (\n \n )}\n />\n\n (\n\n \n Password\n \n \n {state.showPassword ? : }\n \n \n }\n />\n \n {error ? error.message : 'Enter the password for the receiving account'}\n \n \n )}\n />\n\n {/**/}\n {/* SIGN IN WITH PASSWORD*/}\n {/**/}\n\n {/**/}\n {/* {isSubmitting ? state.loginMethod === 'otp' ? 'Sending OTP...' : 'SIGN IN WITH ONE-TIME PASSWORD' : 'SIGN IN WITH ONE-TIME PASSWORD'}*/}\n {/**/}\n\n {/*
*/}\n {/* Don't have an account?*/}\n {/* */}\n {/* Create an account*/}\n {/* */}\n {/*
*/}\n\n \n CONTINUE\n \n \n\n\n
\n
\n
\n )\n}\n\n\nconst CheckoutCard = ({state, setState}) => {\n const classes = useStyles();\n\n const {subtotal, taxes, total} = totals(state.sku);\n // let subtotal = 0;\n // let taxes = 0;\n // let total = 0;\n //\n // if (state.sku.taxInc) {\n // total = state.sku.price/100;\n // taxes = total - (total/((100+state.sku.taxRate)/100))\n // subtotal = total - taxes;\n // } else {\n // subtotal = state.sku.price/100\n // taxes = Math.round(state.sku.taxRate * state.sku.price/100)/100\n // total = subtotal + taxes\n // }\n\n const order = {\n sku: state.sku,\n serviceId: state.service.id,\n ticketId: state.ticketId,\n number: {number: state.service.number, zone: state.service.meta.zone},\n transferTo: state.mobileNumber,\n subtotal: subtotal,\n taxes: taxes,\n total: total,\n }\n\n // Get the global dispatch function\n const [, dispatch] = useStore();\n\n const onSuccess = (purchase) => {\n // the checkout completed successfully\n setState({...state, purchase, order, view: 'success'})\n\n // Invalidate the account in global store so we retrieve\n // the new service, dialActions, account status and paymentMethod if saved.\n dispatch(invalidateAccount())\n }\n\n const onError = (error) => {\n // the checkout failed\n\n // display error panel\n setState({...state, order, error, view:'error'})\n }\n\n // The checkout card basically wraps the\n // Checkout component, injecting the SKU to be charged.\n return (\n \n
\n \n \n \n
\n
\n )\n}\n\nconst SuccessPanel = ({state, setState}) => {\n const classes = useStyles();\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n\n const number = state.order.number.number;\n const toMobile = state.order.transferTo;\n const receiptUrl = state.purchase.purchase.receiptUrl;\n\n return (\n \n
\n \n \n
\n \n
\n
\n {/*
*/}\n
\n Thank you for your purchase!\n
\n
\n {ausPhone(number)} has been successfully\n transferred to {ausPhone(toMobile)} and has\n been removed from this account.\n
\n
    \n
  • \n Make sure {ausPhone(number)} is added to\n Contacts on {ausPhone(toMobile)} so your\n device knows you're expecting calls from the landline number.\n
  • \n { state.purchase.cardUpdated ?\n
  • Your card has been saved. You can change or remove your saved\n card on the account page.
  • \n : null\n }\n
\n\n
\n \n
\n\n {/*
*/}\n
\n \n
\n
\n
\n
\n )\n}\n\nconst ApiErrorPanel = ({error}) => {\n\n return (\n \n
\n
\n \n
\n \n Sorry, it looks like there's a problem at our end. Please try again later.\n \n {error.status}/{error.statusText}\n
\n
\n )\n}\n\nexport default TransferServicePage;\n","import React, {useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport {ErrorScreen, HeaderToolbar, Loading} from \"../../components\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport {useAuthUser} from \"../../components/auth-provider\";\nimport {useStore} from \"../../store\";\nimport {invalidateAccount} from \"../../store/actions\";\nimport {Link} from \"react-router-dom\";\nimport Grid from \"@material-ui/core/Grid\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport Button from \"@material-ui/core/Button\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport FuseAnimate from \"../../components/fuse-animate/fuse-animate\";\nimport Card from \"@material-ui/core/Card\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {AccountService} from \"../../services\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n marginTop: 16,\n justifyContent: \"center\",\n },\n card: {\n display: 'flex',\n flexDirection: 'column',\n padding: 24,\n width: '100%',\n maxWidth: 340,\n [theme.breakpoints.up('sm')]: {\n maxWidth: 360,\n },\n },\n listItem: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginBottom: theme.spacing(2),\n borderRadius: 3,\n maxWidth: 400,\n },\n number: {\n fontSize: 18,\n fontWeight: 700,\n '&.inActive': {\n textDecoration: 'line-through',\n },\n },\n}));\n\n//\n// If the account has only 1 service, the recharge page redirects\n// to the service recharge page, /recharge/.\n//\n// If the account has no services, it displays a prompt with a link\n// to add a service /add-service\n//\n// If there is more than one service, a pick list is displayed to\n// allow the user to choose which service to recharge.\n//\nconst ReactivatePage = ({location}) => {\n const classes = useStyles();\n const {user} = useAuthUser(); // Get logged in user\n const [, dispatch] = useStore()\n const [state, setState] = useState({\n priors: [],\n isFetching: false,\n error: null,\n })\n\n // Make a reactivation query to get prior numbers for this account.\n useEffect(()=> {\n setState(state => ({...state, isFetching: true}));\n AccountService.reactivationQuery(user.accountId)\n .then(priors => {\n setState(state => ({...state, priors}));\n\n // PhoneThru accounts can be reactivated immediately\n AccountService.reactivate(user.accountId)\n .then(result => {\n if (result.state.code === 200) {\n // success - nothing more to do\n setState(state => ({...state, isFetching:false}));\n // Invalidate the account so it's reloaded next time we need it.\n dispatch(invalidateAccount());\n } else {\n // We hit a problem - display an error\n const error = {\n status: result.state.code,\n statusText: `Request id ${result.id} could not be completed`,\n }\n // noinspection JSCheckFunctionSignatures\n setState(state => ({...state, error, isFetching:false}));\n }\n })\n .catch(error => {\n setState(state => ({...state, error, isFetching:false}));\n })\n })\n .catch(error => {\n setState(state => ({...state, error, isFetching:false}));\n })\n }, [user.accountId, dispatch])\n\n return (\n
\n \n \n \n \n\n
\n { state.isFetching ? : null }\n { state.error && }\n { state.error === null && !state.isFetching ?\n \n
\n \n
\n
\n : null\n }\n
\n
\n );\n\n}\n\nconst ReactivatePanel = ({state}) => {\n const classes = useStyles();\n\n // Filter the priors for those that are available\n const recoverable = state.priors.filter(n => {return n.isAvailable});\n\n // Test stuff...\n // const recoverable = [\n // {number: '+61398765432', zone:'Melbourne', isAvailable: true},\n // {number: '+61354621789', zone:'Castlemaine', isAvailable: true}\n // ]\n // const recoverable = [];\n\n if (recoverable.length === 0) {\n // There's zero numbers...\n return (\n \n Reactivation Complete\n Welcome back!\n Your account has been reactivated.\n\n
\n \n Add a Number\n \n
\n
\n )\n\n } else {\n // There's > 1 number returned...\n return (\n \n Reactivation Complete\n Welcome back!\n Your account has been reactivated.\n\n { recoverable.length === 1 ?\n We found a number you had before that's still available.\n :\n We found some numbers you had before that are still available.\n }\n\n \n { recoverable.map((number) => (\n \n \n
\n {ausPhone(number.number)}\n
\n { number.zone !=='' ?
{number.zone}
:null}\n
\n \n ))}\n
\n\n { recoverable.length === 1 ?\n If you'd like to get this number back, tap the\n button below then tap RECOVER A PREVIOUS NUMBER on the next page.\n \n :\n If you'd like to get one of these numbers back, tap the\n button below then tap RECOVER A PREVIOUS NUMBER on the next page.\n \n }\n\n
\n \n Add a Number\n \n
\n
\n )\n }\n}\n\nexport default ReactivatePage;\n","import React from \"react\";\nimport { AuthProvider, useAuthUser } from \"../auth-provider\";\nimport { BrowserRouter as Router, Route, Switch, Redirect } from \"react-router-dom\";\nimport Container from \"@material-ui/core/Container\";\nimport {createMuiTheme, ThemeProvider} from '@material-ui/core/styles'\nimport PerfectScrollbar from 'react-perfect-scrollbar'\nimport 'react-perfect-scrollbar/dist/css/styles.css';\nimport { AnimatedSwitch} from \"../index\";\nimport {SnackbarProvider} from \"notistack\";\nimport { StoreProvider } from \"../../store/store/store\";\nimport initialState from \"../../store/store/initial-state\";\nimport reducers from \"../../store/reducers\"\nimport {loadStripe} from \"@stripe/stripe-js\";\nimport getStripeKey from \"../../utils/stripe\";\nimport {Elements} from \"@stripe/react-stripe-js\"\nimport {\n LoginPage,\n SignUpPage,\n HomePage,\n ServicePage,\n AddServicePage,\n AccountPage,\n CallLogPage,\n SupportPage,\n PurchasesPage,\n CloseAccountPage,\n PasswordPage,\n AddCardPage,\n RechargePage,\n RechargeServicePage,\n TransferPage,\n TransferServicePage,\n ReactivatePage,\n} from \"../../routes\";\n\nconst stripePromise = loadStripe(getStripeKey())\nconst stripeOptions = {\n fonts: [\n { cssSrc: \"https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;700&display=swap\"}\n ]\n}\n\nconst theme = createMuiTheme({\n // Customise theme options here...\n breakpoints: {\n keys: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n values: {\n xs: 0,\n sm: 600,\n md: 768,\n lg: 1024,\n xl: 1280,\n }\n },\n typography: {\n fontFamily: ['Mulish','Roboto','\"Helvetica Neue\"','Arial','sans-serif'].join(','),\n },\n palette: {\n secondary: {\n main: '#673ab7',\n light: '#9a67ea',\n dark: '#320b86',\n }\n }\n});\n\n// Customise Material UI Button as a workaround for a Safari iOS bug that doesn't update the\n// color of a disabled button that is later enabled. Specifying a transition to the colour prop\n// forces the button to redraw.\ntheme.overrides = {\n MuiButton: {\n root: {\n transition: 'color 0.01s', // Workaround for Safari iOS bug that doesn't update\n }\n }\n}\n\n/**\n * AppSwitcher returns a root component based on the user's auth status\n * @returns {*}\n * @constructor\n */\nfunction AppSwitcher() {\n const auth = useAuthUser()\n return auth.user ? : \n}\n\n/**\n * AuthenticatedApp is the root component for unauthenticated users\n * @returns {*}\n * @constructor\n */\nfunction AuthenticatedApp() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {/* */}\n {/* */}\n \n {/* */}\n \n \n \n {/* */}\n \n \n \n \n \n )\n}\n\n/**\n * UnauthenticatedApp is the root component when the user is not logged in\n *\n * @returns {*}\n * @constructor\n */\nfunction UnauthenticatedApp() {\n return (\n \n \n \n {/**/}\n {/**/}\n \n \n )\n}\n\n/**\n * LoginRedirect is a Route that redirects to the login page passing the matched location\n * to the login page as state. If the user then logs in successfully, the login page\n * loads the passed location/URL.\n * e.g. user is not logged in but clicks a link in a text to take them to /recharge.\n * They're redirected to the login page to sign in and the login page sends them to /recharge.\n *\n * @param props\n * @returns {*}\n * @constructor\n */\nfunction LoginRedirect(props) {\n return (\n }\n />\n )\n}\n\n/**\n * App is the entry point from index.js\n *\n * It uses AuthProvider to determine if the user is logged in and the\n * AppSwitcher component to display the appropriate root component.\n *\n * @returns {*}\n * @constructor\n */\nfunction App() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App;","import React, {useContext} from 'react'\nimport {Link, useHistory} from \"react-router-dom\"\nimport { makeStyles } from '@material-ui/core/styles';\nimport MuiToolbar from \"@material-ui/core/Toolbar\";\nimport Button from \"@material-ui/core/Button\"\nimport IconButton from \"@material-ui/core/IconButton\";\nimport SvgIcon from \"@material-ui/core/SvgIcon\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Hidden from \"@material-ui/core/Hidden\";\nimport { AuthContext } from \"../../components\";\nimport { HeadsetMic } from \"@material-ui/icons\"\nimport { ArrowBack } from \"@material-ui/icons\";\nimport {ReactComponent as PhoneThruLogo} from \"../../images/phonethru-logo.svg\";\n\n\n// Create the logout icon which is inexplicably missing from the Material UI icon library\nconst LogoutIcon = (props) => (\n \n \n \n)\n\nconst useStyles = makeStyles((theme) => ({\n toolbar: {\n background: 'linear-gradient(45deg, ' + theme.palette.primary.main + ' 30%, ' + theme.palette.primary.dark + ' 90%)',\n //background: 'linear-gradient(45deg, ' + theme.palette.secondary.main + ' 30%, ' + theme.palette.secondary.dark + ' 90%)',\n //background: 'linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)',\n //backgroundColor: 'white',\n paddingRight: 6,\n paddingLeft: 10,\n },\n logo: {\n paddingLeft: 6,\n width: 120,\n height: 24,\n },\n button: {\n textTransform: 'none',\n //color: '#0000008a',\n color: 'white',\n '&:focus': {\n outline: 'none',\n },\n },\n backButton: {\n textTransform: 'none',\n paddingLeft: 0,\n color: 'white',\n },\n}));\n\n\n\nconst HeaderToolbar = ({location}) => {\n const classes = useStyles();\n const auth = useContext(AuthContext)\n const history = useHistory();\n\n // Set the returnTo location\n const state = initialState(location);\n\n const handleLogoutClick = (event) => {\n event.preventDefault();\n auth.logout(history);\n }\n\n\n return (\n // Header\n \n \n \n { state.location === '/home' &&\n \n \n \n }\n { state.location !== '/home' &&\n \n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n \n\n \n\n )\n\n}\n\n\nconst initialState = (location) => {\n\n if (location.startsWith('/support/')) {\n return {returnUrl: '/support', label: 'Support', location}\n } else if (location.startsWith('/account/')) {\n return {returnUrl: '/account', label: 'Account', location}\n } else if (location === '/home') {\n return {returnUrl: '', label: '', location}\n } else {\n return {returnUrl: '/home', label: 'Home', location}\n }\n\n}\n\nexport default HeaderToolbar;\n","import Typography from \"@material-ui/core/Typography\";\nimport React, {useEffect} from \"react\";\nimport ErrorOutline from \"@material-ui/icons/ErrorOutline\"\nimport Box from \"@material-ui/core/Box\";\nimport Button from \"@material-ui/core/Button\";\nimport {useHistory} from \"react-router-dom\"\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport {useMediaQuery} from \"@material-ui/core\";\nimport red from \"@material-ui/core/colors/red\";\n\n\nconst ErrorScreen = (props) => {\n let history = useHistory();\n const scale = useMediaQuery('(max-width: 320px)') ? 0.85 : 1.0;\n //console.log('scale=', scale)\n\n // Scroll to top on mount\n useEffect( () => {\n document.getElementById('psb').scrollTo(0,0);\n }, []) // <- empty deps means it runs only on load\n\n\n const state = props.error.status === 503 ? {\n title : \"Ooh, bad timing.\",\n message : \"Sorry, we're down for maintenance right now. Please try again in a few minutes.\",\n buttonText : \"Try Again\",\n buttonAction: \"reload\",\n } : props.error.status >= 500 ? {\n title : \"Oops, that's not good.\",\n message : \"Look's like we have an internal issue. Try again in a few minutes.\",\n buttonText : \"Go Back\",\n buttonAction: \"back\",\n } : props.error.status === 404 ? {\n title : \"I'm sure it was here...\",\n message : \"Sorry, the page you're looking for isn't here any more. Head to the Home page and find your way from there.\",\n buttonText : 'Go to Home',\n buttonAction: 'home',\n } : {\n title : \"Something's gone wrong...\",\n message : \"Sorry, the server didn't like what we sent. Try reloading the page.\",\n buttonText : 'Reload the Page',\n buttonAction: 'reload',\n }\n\n const handleClick = () => {\n if (state.buttonAction === 'reload') {\n // Reload the page from the server, not the cache\n window.location.reload(true);\n }\n if (state.buttonAction === 'back') {\n history.goBack();\n }\n if (state.buttonAction === 'home') {\n history.push(\"/\");\n }\n }\n\n return (\n \n \n \n \n \n {props.error.status}\n \n \n \n \n {state.title}\n\n \n \n \n \n {state.message}\n \n \n {state.buttonAction !== '' &&\n \n \n \n }\n \n \n )\n}\n\nexport default ErrorScreen;","import React from 'react';\n\nfunction SplashScreen() {\n return (\n
\n
\n
\n {/*\"logo\"*/}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n );\n}\n\nexport default React.memo(SplashScreen);\n","import React from 'react'\nimport { Switch, withRouter } from 'react-router-dom'\nimport {TransitionGroup, CSSTransition} from \"react-transition-group\";\nimport makeStyles from \"@material-ui/core/styles/makeStyles\";\nimport './styles.css'\n\nconst useStyles = makeStyles((theme) => ({\n group: {\n position: 'relative',\n height : '100%',\n width : '100%',\n },\n routes: {\n position: 'absolute',\n width : '100%',\n height : '100%',\n top : 0,\n left : 0,\n },\n}));\n\n\nconst AnimatedSwitch = (props) => {\n const classes = useStyles();\n return (\n\n \n \n
\n \n {props.children}\n \n
\n \n
\n)};\n\nexport default withRouter(AnimatedSwitch);","import React from 'react'\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Card, Avatar, Hidden} from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport {Link} from \"react-router-dom\";\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport Grid from \"@material-ui/core/Grid\";\nimport moment from \"moment\";\nimport { PhoneAndroid } from \"@material-ui/icons\"\nimport ausPhone from \"../../utils/aus-phone\";\n\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n avatar: {\n // background: 'linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)',\n background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',\n width: theme.spacing(5),\n height: theme.spacing(5),\n fontSize: 18,\n },\n avatarLarge: {\n background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',\n width: theme.spacing(15),\n height: theme.spacing(15),\n fontSize: 48,\n marginBottom: 8,\n marginTop: 8,\n },\n avatarRow: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n paddingBottom: 12,\n },\n greeting: {\n paddingLeft: 12,\n paddingRight: 4,\n },\n userName: {\n fontWeight: 500,\n },\n addressRow: {\n display: 'flex',\n flexDirection: 'row',\n paddingTop: 4,\n paddingLeft: 8,\n },\n address: {\n paddingLeft: 8,\n },\n linkButton: {\n marginTop: 24,\n },\n sideLinkButton: {\n minWidth: 180,\n },\n link: {\n color: '#047e9f',\n fontWeight: 700,\n '&:hover': {\n textDecoration: 'underline',\n textDecorationColor: '#047e9f',\n },\n },\n}));\n\nconst UserProfile = ({user, variant='home', animation, delay}) => {\n\n return (\n <>\n { variant === 'home' ?\n \n :\n \n }\n \n )\n}\n\n\nconst HomeProfile = ({user, animation, delay}) => {\n const classes = useStyles();\n\n // The initials are used as a fallback for the avatar if the user hasn't selected one.\n\n const initials = user.firstName && user.lastName ?\n user.firstName.charAt(0) + user.lastName.charAt(0) : '';\n const avatarUrl = '/assets/images/avatars/' + user.avatarUrl;\n\n return (\n \n \n\n \n \n
\n {initials}\n \n {getGreeting()}, {user.firstName}\n \n
\n\n
\n {ausPhone(user.phone)}\n
\n
\n\n \n \n \n \n \n\n
\n \n \n \n\n
\n
\n )\n}\n\n\nconst AccountProfile = ({user, animation, delay}) => {\n const classes = useStyles();\n\n // The initials are used as a fallback for the avatar if the user hasn't selected one.\n const initials = user.firstName && user.lastName ?\n user.firstName.charAt(0) + user.lastName.charAt(0) : '';\n const avatarUrl = '/assets/images/avatars/' + user.avatarUrl;\n\n return (\n \n \n
\n {initials}\n {user.firstName} {user.lastName}\n
{ausPhone(user.phone)}
\n
Account Number {user.accountId}
\n
Customer for {howLong(user.dateRegistered)}
\n
\n
\n \n Change Password\n \n
\n
\n \n \n )\n}\n\n/***\n * Returns a time-of-day greeting given an hour\n * If the hour is undefined the current hour is used.\n *\n * @param hour\n * @returns {string}\n */\nfunction getGreeting() {\n const hour = moment().hour();\n let greeting = \"Good evening\";\n if (hour > 11 && hour < 18) {\n greeting = \"Good afternoon\";\n } else if (hour > 4 && hour < 12) {\n greeting = \"Good morning\"\n }\n return greeting\n}\n\nfunction howLong(joined) {\n const duration = moment.duration(moment().diff(moment(joined)));\n const years = duration.years()\n const months = duration.months();\n const yr = years === 1 ? 'year' : 'years'\n const mth = months === 1 ? 'month' : 'months'\n if (years === 0 && months === 0) {\n return duration.humanize()\n } else if (years > 0) {\n if (months > 0) {\n return `${years} ${yr} and ${months} ${mth}`\n }\n return `${years} ${yr}`\n } else {\n return `${months} ${mth}`\n }\n}\n\n\nexport default UserProfile;","import React from \"react\";\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Accordion from \"@material-ui/core/Accordion\"\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\"\nimport {Link} from \"react-router-dom\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Card} from \"@material-ui/core\";\nimport Hidden from \"@material-ui/core/Hidden\";\nimport clsx from 'clsx';\nimport ausPhone from \"../../utils/aus-phone\";\nimport {ArrowRightAlt, Schedule, Chat, FormatListNumbered, Voicemail, Block} from \"@material-ui/icons\";\nimport resolveAction from \"../../utils/resolve-action\";\nimport callCredits from \"../../utils/call-credits\";\nimport TimerOutlinedIcon from '@material-ui/icons/TimerOutlined';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n header: {\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n numbersRow: {\n marginTop: theme.spacing(2),\n // marginBottom: theme.spacing(2),\n },\n accordionSummary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n borderRadius: 4,\n },\n accordionDetails: {\n backgroundColor: '#e8eaf6', // Indigo 50 //theme.palette.primary.light,\n color: theme.palette.primary.contrastText,\n paddingTop: 16,\n },\n summary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n minHeight: 48,\n borderRadius: 4,\n borderTop: '1px solid rgba(0, 0, 0, 0.12)',\n },\n icon: {\n color: theme.palette.primary.contrastText,\n },\n number: {\n fontSize: 18,\n fontWeight: 700,\n '&.inActive': {\n textDecoration: 'line-through',\n },\n },\n forwarding: {\n flexWrap: 'nowrap',\n marginTop: 0,\n marginBottom: 2,\n [theme.breakpoints.down('xs')]: {\n // maxWidth: 220,\n },\n },\n sideManageButton: {\n color: 'white',\n borderColor: 'white',\n minWidth: 150,\n '&.Mui-disabled': {\n color: 'grey !important',\n borderColor: 'grey !important',\n }\n },\n linkButton: {\n marginTop: 4,\n },\n rechargeButton: {\n minWidth: 150,\n marginRight: 8,\n [theme.breakpoints.down('sm')]: {\n minWidth: 90,\n marginRight: 0,\n },\n }\n}));\n\n\nconst ServicesCard = ({ account, animation, delay }) => {\n const classes = useStyles();\n\n // Only show active services\n let services = [];\n if (account.services) {\n services = account.services.filter((service) => {\n return service.active;\n })\n }\n\n return (\n \n \n\n My Numbers\n\n
\n\n { services.length === 0 ?\n You have no active numbers.\n : null\n }\n\n \n { services.map((service, index) => (\n
\n \n }\n >\n \n
{service.name}
\n
\n {ausPhone(service.number)}\n
\n { service.meta.zone !=='' ?
{service.meta.zone}
:null}\n \n \n \n \n \n \n
\n\n \n\n \n \n \n \n \n\n
\n \n
\n ))}\n
\n\n \n\n { services.map((service, index) => (\n
\n
\n \n \n \n {service.name}\n \n {ausPhone(service.number)}\n \n { service.meta.zone !== '' ? {service.meta.zone}:null}\n \n \n \n \n \n \n \n \n\n \n \n \n \n
\n \n
\n ))}\n
\n\n\n
\n \n
\n
\n\n )\n}\n\n\nconst ServiceForwarding = ({account, service}) => {\n\n // Choose which icon we'll use\n let icon;\n let type = service.action ? service.action.type : '';\n if (type === 'dial') {\n icon = null // \n } else if (type === 'schedule') {\n icon = \n } else if (type === 'say' || type === 'play') {\n icon = \n } else if (type === 'voicemail') {\n icon = \n } else if (type === 'ivr') {\n icon = \n } else if (type === 'reject') {\n icon = \n }\n\n // Resolve the number we're actually forwarding to\n const text = resolveAction(account, service).text;\n\n return (\n \n {icon} {text}\n \n )\n}\n\nconst Credit = ({service}) => {\n const {minutes, daysLeft} = callCredits(service);\n\n if (minutes > 0) {\n return (\n <>\n \n
{minutes} min ({daysLeft} {daysLeft === 1 ? 'day':'days'}) left
\n \n )\n } else {\n return (\n <>\n \n
No minutes left
\n \n )\n }\n}\n\nconst LowCreditWarning = ({service}) => {\n const classes = useStyles();\n\n const {minutes, daysLeft} = callCredits(service);\n\n if (minutes <= 0) {\n return (\n
\n \n
You have run out of call minutes for this number!
\n \n RECHARGE\n \n
\n )\n }\n if (minutes < 25) {\n return (\n
\n \n
Your call minutes are getting low.
\n \n RECHARGE\n \n
\n )\n }\n if (daysLeft < 7) {\n return (\n
\n \n
Your call minutes will expire soon. Recharge now to keep them.
\n \n RECHARGE\n \n
\n )\n }\n return null\n}\n\nexport default ServicesCard","import {lighten, makeStyles} from \"@material-ui/core/styles\";\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport {Card} from \"@material-ui/core\";\nimport Accordion from \"@material-ui/core/Accordion\"\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\"\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport {Link} from \"react-router-dom\";\nimport React from \"react\";\nimport ausPhone from \"../../utils/aus-phone\";\nimport format from '../../utils/format';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n accordionSummary: {\n '&:hover, &:focus, &:active': {\n // backgroundColor: grey[200],\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n },\n expanded: {\n // backgroundColor: grey[200],\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n accordionDetails: {\n // backgroundColor: grey[50],\n backgroundColor: lighten(theme.palette.primary.light, 0.95)\n },\n linkButton: {\n marginTop: 24,\n },\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n headerRow: {\n display: 'flex',\n flexGrow: 1,\n textTransform: 'uppercase',\n paddingBottom: '0.5rem',\n marginLeft: 16,\n marginRight: 48,\n },\n}));\n\n\nconst RecentCalls = ({ calls, animation, delay }) => {\n const classes = useStyles();\n\n //console.log('RecentCalls: calls =', calls);\n\n return (\n \n \n Recent Calls\n\n
\n\n {/* Column Headers */}\n
\n
\n
From
\n
To
\n
When
\n
Duration
\n
\n
\n\n { calls.length === 0 ?
No recent calls.
: null }\n\n {/* Table Row */}\n { calls.map((call) => (\n \n }\n >\n
\n
{ausPhone(call.from)}
\n
{ausPhone(call.to)}
\n
{format('ago',call.startTime)}
\n
{format('duration', call.duration)}
\n
\n \n\n \n
\n\n
\n
\n
Time
\n
\n {format('date-long', call.startTime)}\n \n
\n
\n
\n
Direction
\n
{format('direction', call.direction)}
\n
\n
\n\n
\n
\n
From
\n
{ausPhone(call.from)}
\n
\n
\n
To
\n
{ausPhone(call.to)}
\n
\n
\n\n
\n
\n
Duration
\n
{format('duration', call.duration)}
\n
\n
\n
Status
\n
{call.status}
\n
\n
\n\n
\n \n
\n ))}\n\n
\n\n\n \n\n
\n
\n )\n}\n\n\n\nexport default RecentCalls;","import React from \"react\";\nimport {lighten, makeStyles} from \"@material-ui/core/styles\";\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport {Card, Paper} from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport {Link} from \"react-router-dom\";\nimport Accordion from \"@material-ui/core/Accordion\";\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport format from '../../utils/format';\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport externalLink from \"../../utils/external-link\";\nimport {InvoiceStatus} from \"../../components\";\nimport clsx from \"clsx\";\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n accordionSummary: {\n '&:hover, &:focus, &:active': {\n // backgroundColor: grey[200],\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n },\n expanded: {\n // backgroundColor: grey[200],\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n accordionDetails: {\n // backgroundColor: grey[50],\n backgroundColor: lighten(theme.palette.primary.light, 0.95)\n },\n linkButton: {\n marginTop: 24,\n },\n dataLabel: {\n minWidth: 75,\n fontWeight: 500,\n },\n panel: {\n minHeight: 48,\n display: 'flex',\n alignItems: 'center',\n borderBottomWidth: 1,\n },\n}));\n\n\nconst RecentPurchases = ({ purchases, animation, delay }) => {\n const classes = useStyles();\n const isWide = useMediaQuery(theme => theme.breakpoints.up('md'));\n\n return (\n \n \n Recent Purchases\n\n
\n\n {/* Column Headers */}\n { isWide ? : }\n\n {/* No items */}\n { purchases.length === 0 ?
No recent purchases.
: null }\n\n {/* Table */}\n { isWide ? : }\n\n
\n\n \n\n
\n
\n )\n}\n\n\nconst AccordionPanelHeader = () => {\n return (\n
\n
\n
Date
\n
Reference
\n
Amount
\n
Status
\n
\n
\n )\n}\n\nconst AccordionPanel = ({purchases}) => {\n const classes = useStyles();\n\n return purchases.map((purchase) => (\n \n }\n >\n
\n
{format('date-only', purchase.date)}
\n
{purchase.reference}
\n
${(purchase.amount/100).toFixed(2)}
\n
\n \n
\n
\n \n\n \n
\n
\n
Item
\n
{purchase.description}
\n
\n
\n
Reference
\n
{purchase.reference}
\n
\n\n \n\n
\n \n
\n ))\n}\n\nconst PanelHeader = () => {\n return (\n
\n
\n
Date
\n
Reference
\n
Amount
\n
Status
\n
\n
\n )\n}\n\nconst Panel = ({purchases}) => {\n const classes = useStyles();\n\n return (\n \n { purchases.map((purchase) => (\n
\n
\n
{format('date-only', purchase.date)}
\n
{purchase.reference}
\n
${(purchase.amount/100).toFixed(2)}
\n
\n \n
\n \n
\n
\n ))}\n
\n )\n}\n\nexport default RecentPurchases;","import FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport {Card, Hidden} from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport {Link} from \"react-router-dom\";\nimport React from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport red from \"@material-ui/core/colors/red\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n header: {\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: theme.spacing(3),\n },\n balance: {\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'space-around',\n },\n [theme.breakpoints.up('md')]: {\n justifyContent: 'space-between',\n },\n fontSize: 24,\n fontWeight: 700,\n },\n linkButton: {\n marginTop: 24,\n },\n sideLinkButton: {\n minWidth: 180,\n },\n}));\n\nconst BalanceCard = ({ account: {balance, status}, animation, delay }) => {\n //console.log('BalanceCard: balance =', balance, 'status =', status);\n const classes = useStyles();\n\n // The initials are used as a fallback for the avatar if the user hasn't selected one.\n const displayBalance = '$' + (balance/100).toFixed(2);\n\n return (\n \n \n\n \n \n Account Balance\n \n \n \n \n \n\n \n\n \n {displayBalance}\n\n \n \n \n \n \n \n\n \n\n { status === 1 ?\n \n \n \n : null\n }\n\n \n \n )\n}\n\n\nconst CreditStatus = ({status, balance}) => {\n\n let state = {\n status: '',\n bgColor: ''\n };\n\n if (balance > 0) {\n if (status === 0) {\n state = {status: 'Suspended', bgColor: red[700]}\n } else {\n state = {status: 'Active', bgColor: '#237a23'}\n }\n } else {\n state = {status: 'No credit', bgColor: red[700]}\n }\n\n const classes = {\n textBox : {\n color: 'white',\n backgroundColor: state.bgColor,\n paddingLeft: 8,\n paddingRight: 8,\n paddingTop: 4,\n paddingBottom: 4,\n fontSize: 11,\n fontWeight: 500,\n borderRadius: 2\n }\n };\n\n return (\n
{state.status}
\n )\n\n}\n\nexport default BalanceCard;","import React from \"react\";\nimport Button from \"@material-ui/core/Button\";\nimport {Link} from 'react-router-dom'\nimport Typography from \"@material-ui/core/Typography\";\nimport { RemoveCircle, WatchLaterOutlined, Info, ErrorOutline } from \"@material-ui/icons\"\nimport FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport red from \"@material-ui/core/colors/red\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport moment from \"moment\";\nimport {useMediaQuery} from \"@material-ui/core\";\nimport blue from \"@material-ui/core/colors/blue\";\nimport clsx from 'clsx';\n\n\nconst useStyles = makeStyles((theme) => ({\n btn: {\n [theme.breakpoints.up('sm')]: {\n width: 180,\n minWidth: 180,\n },\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n },\n },\n btn2: {\n [theme.breakpoints.up('md')]: {\n width: 180,\n minWidth: 180,\n },\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n },\n}));\n\n\n// The banner is only rendered if it's conditions are met...\nconst AccountBanner = ({account, variant='', className, animation, delay}) => {\n const classes = useStyles();\n const isWide = useMediaQuery(theme => theme.breakpoints.up('sm'));\n\n // If we haven't got an account, we've got nothing to display\n if (account.id === 0) {\n return null;\n }\n\n const isClosed = typeof(account.closed) === 'undefined' ? false : typeof (account.closed) === 'string';\n\n const trialEnds = () => {\n // Set the trial end message\n let msg;\n let expiry = moment(account.trialExpiry);\n if (expiry.isBefore()) {\n msg = 'Your trial period ended ' + expiry.fromNow() + '. Upgrade now to keep your number!';\n } else {\n msg = 'Your trial period ends ' + expiry.fromNow() + '.';\n }\n return msg\n }\n\n switch (variant) {\n case 'suspended':\n if (account.status === 0 && !isClosed) {\n return (\n \n
\n
\n \n Your account is suspended.\n
\n
\n
\n )\n }\n return null;\n\n case 'pendingClosed':\n if (account.status === 0 && isClosed) {\n return (\n \n
\n
\n \n This account has been closed and is waiting to be shut down.\n
\n
\n
\n )\n }\n return null;\n\n case 'reactivate':\n if (account.status === -1) {\n return (\n \n
\n
\n \n Your account is closed.\n
\n \n
\n
\n )\n }\n return null\n\n case 'upgrade':\n if (account.status === 2) {\n return (\n \n
\n
\n \n {trialEnds()}\n
\n \n
\n
\n )\n }\n return null;\n\n default:\n return null;\n\n }\n\n}\n\nexport default AccountBanner;","import React from \"react\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport {InputLabel, Select} from \"@material-ui/core\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\n\nconst avatars = [\n 'avatar-01.svg',\n 'avatar-02.svg',\n 'avatar-03.svg',\n 'avatar-04.svg',\n 'avatar-05.svg',\n 'avatar-06.svg',\n 'avatar-07.svg',\n 'avatar-08.svg',\n 'avatar-09.svg',\n 'avatar-10.svg',\n 'avatar-11.svg',\n 'avatar-12.svg',\n 'avatar-13.svg',\n 'avatar-14.svg',\n 'avatar-15.svg',\n 'avatar-16.svg',\n 'avatar-17.svg',\n 'avatar-18.svg',\n 'avatar-19.svg',\n 'avatar-20.svg',\n 'avatar-21.svg',\n 'avatar-22.svg',\n 'avatar-23.svg',\n 'avatar-24.svg',\n 'avatar-25.svg',\n 'avatar-26.svg',\n 'avatar-27.svg',\n 'avatar-28.svg',\n 'avatar-29.svg',\n 'avatar-30.svg',\n 'avatar-31.svg',\n 'avatar-32.svg',\n 'avatar-33.svg',\n 'avatar-34.svg',\n 'avatar-35.svg',\n 'avatar-36.svg',\n 'avatar-37.svg',\n 'avatar-38.svg',\n 'avatar-39.svg',\n 'avatar-40.svg',\n 'avatar-41.svg',\n 'avatar-42.svg',\n 'avatar-43.svg',\n 'avatar-44.svg',\n 'avatar-45.svg',\n 'avatar-46.svg',\n 'avatar-47.svg',\n 'avatar-48.svg',\n]\n\n// Standard controlled component\nconst AvatarSelectControlled = ({value, onChange, initials='A', baseUrl='/assets/images/avatars/'}) => {\n\n return (\n \n Avatar\n \n \n {initials}\n \n { avatars.map((value, index) => (\n \n \n \n ))}\n \n \n )\n}\n\n// React Hook Form 6 version - does not work with RHF 7\n// const AvatarSelect = ({defaultValue, register, control, initials='A', baseUrl='/assets/images/avatars/'}) => {\n//\n// return (\n// \n// Avatar\n// \n// \n// {initials}\n// \n// { avatars.map((key, index) => (\n// \n// {key}/\n// \n// ))}\n// \n// }\n// />\n// \n// )\n//\n// }\n\nexport default AvatarSelectControlled;","import React from \"react\";\nimport {ReactComponent as VisaLogo} from \"../../images/visa-logo.svg\";\nimport {ReactComponent as MasterCardLogo} from \"../../images/mastercard-logo.svg\";\nimport CreditCard from \"@material-ui/icons/CreditCard\";\n\nconst CreditCardPanel = ({paymentMethod={ id: '', type: '', brand: '', last4: '', expiry: '', name: ''}}) => {\n\n let cardLogo;\n switch (paymentMethod.brand.toLowerCase()) {\n case 'visa':\n cardLogo = \n break;\n\n case 'mastercard':\n cardLogo = \n break;\n\n default:\n cardLogo = \n }\n\n return (\n
\n
\n {cardLogo}\n
\n
**** **** **** {paymentMethod.last4}
\n
\n
{paymentMethod.name}
\n
Expiry {paymentMethod.expiry}
\n
\n
\n )\n\n}\n\nexport default CreditCardPanel","import React, {useState} from \"react\";\nimport {CircularProgress} from \"@material-ui/core\";\nimport Button from \"@material-ui/core/Button\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {AccountService} from \"../../services\";\nimport {setAccountPaymentMethod} from \"../../store/actions\";\nimport * as toast from \"../../utils/toast\";\nimport {useStore} from \"../../store\";\nimport {useSnackbar} from \"notistack\";\nimport CreditCardPanel from \"./credit-card\";\n\nconst useStyles = makeStyles((theme) => ({\n mono: {\n fontFamily: '\"Courier New\", Courier, monospace',\n fontSize: 16,\n },\n creditCard: {\n display: 'flex',\n borderWidth: 1,\n borderRadius: 4,\n marginBottom: 16,\n maxWidth: 350,\n },\n}));\n\n\nconst PaymentMethodCard = ({accountId=0, paymentMethod={ id: '', type: '', brand: '', last4: '', expiry: '', name:''}, canRemove=true}) => {\n const classes = useStyles();\n const [state, setState] = useState({fetching: false, isLoaded: true})\n const [, dispatch] = useStore();\n const {enqueueSnackbar} = useSnackbar(); // Snackbar Hook for notifications\n const cardRef = React.createRef();\n\n const removeCard = (event) => {\n\n setState({...state, fetching: true})\n AccountService.removePaymentMethod(accountId)\n .then((result) => {\n // Update the global store\n dispatch(setAccountPaymentMethod({\n id: '', type: '', brand: '', last4: '', expiry: '',\n }))\n\n // if we're still displaying the card, update the state\n if (cardRef.current) {\n setState({...state, fetching: false})\n }\n })\n .catch(error => {\n // Notify the user we hit an error\n toast.apiError(\"Your card could not be removed\", error, enqueueSnackbar);\n setState({...state, fetching: false})\n })\n }\n\n paymentMethod.expiry = paymentMethod.expiry.replace('/20','/')\n if (paymentMethod.expiry.length === 4) {\n paymentMethod.expiry = '0' + paymentMethod.expiry\n }\n\n return (\n
\n
\n \n { canRemove ?\n
\n {state.fetching ?\n
\n \n
\n :\n \n }\n
\n : null\n }\n
\n
\n )\n}\n\nexport default PaymentMethodCard","import React, {createContext, useEffect, useImperativeHandle, useState} from \"react\";\nimport PropTypes from \"prop-types\";\n\n\n// Create a Context for our table\nconst ExpanderTableContext = createContext({})\n\nconst ExpanderTable = React.forwardRef(({page = 0, pageLength = 10, sorting = {}, columns=[], onData, children}, ref) => {\n const [state, setState] = useState({\n isFetching : false,\n page : page,\n pageLength : pageLength,\n pageCount : 0,\n rows : [],\n rowsTotal : 0,\n rowsFiltered : 0,\n sorting : sorting,\n search : '',\n columns : columns,\n })\n\n // Expose the reload method to the parent\n useImperativeHandle(ref, ()=> ({\n reload: fetchData,\n }))\n\n // Fetch table data on input change...\n useEffect(() => {\n if (!onData) { return }\n\n let isloaded = true;\n\n // Set the isFetching flag\n setState(s => ({...s, isFetching: true}))\n\n onData(state.page, state.pageLength, state.sorting, state.search)\n .then(result => {\n if (isloaded) {\n setState(s => ({...s, isFetching: false, ...processData(result)}))\n }\n })\n\n // Return a clean up function...\n return () => { isloaded = false }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n },[onData, state.page, state.pageLength, state.sorting, state.search])\n\n const fetchData = () => {\n if (!onData) { return }\n setState(s => ({...s, isFetching: true}))\n onData(state.page, state.pageLength, state.sorting, state.search)\n .then(result => {\n setState(s => ({...s, isFetching: false, ...processData(result)}))\n })\n }\n\n const processData = (result) => {\n //console.log('expandertable result', result);\n const rows = result.rows || [];\n const rowsTotal = result.total || rows.length;\n const rowsFiltered = result.filtered || rowsTotal;\n const pageCount = Math.ceil(rowsFiltered / state.pageLength) - 1;\n return { rows, rowsTotal, rowsFiltered, pageCount }\n }\n\n return (\n \n
\n {children}\n
\n
\n )\n})\n\nExpanderTable.propTypes = {\n onData : PropTypes.func,\n page : PropTypes.number,\n pageLength : PropTypes.number,\n sorting : PropTypes.object,\n}\n\nexport { ExpanderTable, ExpanderTableContext };","import {useContext} from \"react\";\nimport {ExpanderTableContext} from \"../expander-table\"\n\n/**\n * expander-table/hooks/index.js\n *\n * Returns an array containing the current state object, and store action dispatch method\n * Usage: const [state, setState] = useExpanderTable();\n */\n// export default useExpanderTable => useContext(ExpanderTableContext);\n\nfunction useExpanderTable() {\n const {state, setState} = useContext((ExpanderTableContext));\n return [state, setState]\n}\n\nexport default useExpanderTable;","import React from \"react\";\nimport useExpanderTable from \"../expander-table/hooks\"\nimport ArrowUpward from \"@material-ui/icons/ArrowUpward\"\nimport clsx from 'clsx';\nimport './styles.css'\n\nconst ExpanderTableHeader = ({className=\"\", component, children}) => {\n const [state, setState] = useExpanderTable();\n\n if (!state) {\n console.warn(\"ExpanderTableHeader must be a descendant of ExpanderTable\")\n return null;\n }\n\n const handleHeaderClick = (column='') => {\n if (column === '') { return }\n\n let sorting = {column: column, direction: 'desc'}\n\n // If we're already sorted by that column, reverse direction\n if (state.sorting.column === sorting.column) {\n sorting.direction = state.sorting.direction === 'asc' ? 'desc' : 'asc';\n }\n setState({...state, sorting})\n }\n\n // Generate the render content\n\n // Get the columns defs from the table state\n const columnDefs = state.columns || [];\n\n // Get the header renderer\n const renderer = component || TableHeader;\n\n // If the user has specified another component, use that...\n\n // Default to displaying just the child elements children if there's no columns defs\n // let content = children;\n // Create headers for each defined column\n // if (columnDefs.length > 0) {\n // content = \n // content = <>\n // {columnDefs.map((col) => (\n // \n // ))}\n // {children}\n // \n // }\n\n return (\n
\n {renderer({columnDefs: columnDefs, columnClickHandler: handleHeaderClick, sorting: state.sorting})}\n {children}\n
\n )\n}\n\nconst TableHeader = ({columnDefs=[], columnClickHandler, sorting}) => {\n return (\n <>\n {columnDefs.map((col) => (\n \n ))}\n \n )\n}\n\nexport const ColumnHeader = ({col, sorting={}, clickHandler, children}) => {\n\n let buttonStyle = '';\n if (clickHandler && col.field) {\n buttonStyle = 'cursor-pointer align-center';\n }\n\n let iconStyle = 'expander-table-header-icon '\n const {column, direction} = sorting\n if (column && direction && column === col.field) {\n if (direction === 'asc') {\n iconStyle += 'expander-table-header-arrow-up'\n } else if (direction === 'desc') {\n iconStyle += 'expander-table-header-arrow-down'\n }\n } else {\n iconStyle += 'expander-table-header-arrow-none'\n }\n\n return (\n
clickHandler(col.field)}>\n
\n {children || col.title} \n
\n
\n )\n}\n\nexport default ExpanderTableHeader","import React, {createRef, useEffect, useState} from \"react\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport FirstPage from \"@material-ui/icons/FirstPage\";\nimport NavigateBefore from \"@material-ui/icons/NavigateBefore\";\nimport NavigateNext from \"@material-ui/icons/NavigateNext\";\nimport LastPage from \"@material-ui/icons/LastPage\";\nimport useExpanderTable from \"../expander-table/hooks\";\nimport {useMediaQuery} from \"@material-ui/core\";\n\nconst ExpanderTablePager = ({onVisibilityChange}) => {\n const [state, setState] = useExpanderTable();\n const [isVisible, setIsVisible] = useState(false)\n const ref = createRef();\n\n // This should run after each render\n useEffect(() => {\n if (onVisibilityChange && ref.current) {\n\n // Get the current visibility\n const top = ref.current.getBoundingClientRect().top;\n const innerHeight = window.innerHeight;\n const visibleNow = ((top >= 0) && (top <= innerHeight));\n const viewPortOffset = top < 0 ? top : top < innerHeight ? 0 : top - innerHeight\n\n // If it has changed from last time, update the state and call the callback function\n if (isVisible !== visibleNow) {\n setIsVisible(visibleNow);\n onVisibilityChange(visibleNow, viewPortOffset);\n }\n }\n }, [onVisibilityChange, ref, isVisible])\n\n if (!state) {\n console.warn(\"ExpanderTableContent must be a descendant of ExpanderTable\")\n return null;\n }\n\n const nextPage = () => {\n if (state.page < state.pageCount && !state.isFetching) {\n setState({...state, page: state.page+1})\n }\n }\n\n const previousPage = () => {\n if (state.page > 0 && !state.isFetching) {\n setState({...state, page: state.page-1})\n }\n }\n\n const firstPage = () => {\n setState({...state, page: 0})\n }\n\n const lastPage = () => {\n setState({...state, page: state.pageCount})\n }\n\n const handlePageLength = (event) => {\n const pageLength = event.target.value\n\n // Calculate the new pageCount\n const pageCount = Math.ceil(state.rowsFiltered/pageLength) - 1;\n\n // Select the page with the current record\n const currentTop = state.page * state.pageLength + 1\n const page = Math.floor(currentTop / pageLength);\n\n setState({...state, pageLength, pageCount, page})\n }\n\n return (\n
\n \n\n \n
\n\n )\n}\n\nconst PagerControls = ({state, onClickNext, onClickPrevious, onClickFirst, onClickLast, widthOffset=0}) => {\n\n const is375 = useMediaQuery('(max-width:374px)');\n const is460 = useMediaQuery('(max-width:460px)');\n const is560 = useMediaQuery('(max-width:560px)');\n const isWide = useMediaQuery('(min-width:768px)');\n\n if (state.rowsFiltered === 0) {\n return null\n }\n const first = state.page * state.pageLength + 1;\n const last = Math.min(first + state.pageLength - 1, state.rowsFiltered, state.rowsTotal);\n\n if (is375) {\n return (\n
\n \n {state.page + 1} / {state.pageCount + 1}\n \n
\n )\n\n } else if (is460) {\n return (\n
\n \n \n {state.page + 1} / {state.pageCount + 1}\n \n \n
\n )\n\n } else if (is560) {\n return (\n
\n Page {state.page + 1} of {state.pageCount + 1}\n \n \n \n \n
\n )\n } else {\n let description;\n // Display based on filtered / unfiltered\n if (state.rowsFiltered === state.rowsTotal) {\n // No filtered records\n if (isWide) {\n description = `Showing ${first} to ${last} of ${state.rowsTotal} entries`\n } else {\n description = `${first} to ${last} of ${state.rowsTotal}`\n }\n\n } else {\n // Filtered records\n if (isWide) {\n description = `Showing ${first} to ${last} of ${state.rowsFiltered} entries (filtered from ${state.rowsTotal} entries)`\n } else {\n description = `Showing ${first} to ${last} of ${state.rowsFiltered}/${state.rowsTotal}`\n }\n\n }\n return (\n
\n {description}\n
\n \n \n \n \n
\n
\n )\n }\n}\n\n\nexport default ExpanderTablePager;","import React, {useEffect, useState} from \"react\";\nimport useExpanderTable from '../expander-table/hooks';\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport PropTypes from \"prop-types\";\n\nconst ExpanderTableContent = ({noData = 'Nothing to show', children}) => {\n const [state, ] = useExpanderTable();\n const [showLoader, setShowLoader] = useState(false);\n\n // Delay showing the table loader if we're getting responses in under 250ms\n useEffect(() => {\n\n if (state.isFetching) {\n const timer = setTimeout(() => setShowLoader(true), 200)\n return () => {clearTimeout(timer)}\n } else {\n setShowLoader( false)\n }\n }, [state.isFetching])\n\n\n if (!state) {\n console.warn(\"ExpanderTableContent must be a descendant of ExpanderTable\")\n return null;\n }\n\n return (\n
\n { state.rows.length === 0 ?\n
{ state.isFetching ? '' : noData}
\n : null\n }\n\n {children}\n\n { showLoader ?\n
\n
\n
\n \n
\n
\n
\n : null\n }\n\n
\n )\n}\n\nExpanderTableContent.propTypes = {\n noData : PropTypes.string\n}\n\nexport default ExpanderTableContent;","import React from \"react\";\nimport Accordion from \"@material-ui/core/Accordion\";\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport PropTypes from \"prop-types\";\nimport useExpanderTable from \"../expander-table/hooks\";\nimport {lighten, makeStyles} from \"@material-ui/core/styles\";\n\nconst useStyles = makeStyles((theme) => ({\n accordionSummary: {\n '&:hover, &:focus, &:active': {\n // backgroundColor: grey[200],\n // backgroundColor: fade(theme.palette.secondary.light, 0.4),\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n },\n expanded: {\n // backgroundColor: grey[200],\n // backgroundColor: fade(theme.palette.secondary.light, 0.4),\n backgroundColor: lighten(theme.palette.primary.light, 0.85)\n },\n accordionDetails: {\n // backgroundColor: grey[50],\n backgroundColor: lighten(theme.palette.primary.light, 0.95),\n },\n}));\n\n\nconst ExpanderTableRows = ({rowKey, SummaryComponent, ContentComponent}) => {\n const classes = useStyles();\n const [state, ] = useExpanderTable();\n\n if (!state) {\n console.warn(\"ExpanderTableRows must be a descendant of ExpanderTable\")\n return null;\n }\n\n if (!SummaryComponent) {SummaryComponent = RenderObject}\n if (!ContentComponent) {ContentComponent = RenderObject}\n\n return (\n <>\n { state.rows.map((row) => (\n \n }\n >\n
\n \n
\n \n \n \n \n
\n )\n )}\n \n )\n}\n\nconst RenderObject = (row) => (\n
{JSON.stringify(row)}
\n)\n\nExpanderTableRows.propTypes = {\n rowKey : PropTypes.any.isRequired,\n SummaryComponent : PropTypes.elementType.isRequired,\n ContentComponent : PropTypes.elementType.isRequired,\n}\n\nexport default ExpanderTableRows;","import React from \"react\";\nimport Accordion from \"@material-ui/core/Accordion\";\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport grey from \"@material-ui/core/colors/grey\";\n\nconst useStyles = makeStyles((theme) => ({\n accordionSummary: {\n fontSize: 16,\n fontWeight: 300,\n '&:hover, &:focus': {\n backgroundColor: grey[200],\n },\n },\n expanded: {\n backgroundColor: grey[200],\n fontWeight: 700,\n },\n accordionDetails: {\n backgroundColor: grey[50],\n },\n}));\n\nconst FAQAccordion = ({title, children}) => {\n const classes = useStyles();\n\n return (\n \n }\n >\n {title}\n \n \n
\n {children}\n
\n
\n
\n )\n}\n\nexport default FAQAccordion;","import React, { useRef, useImperativeHandle } from 'react'\n\nconst StripeInput = ( { component: Component, inputRef, ...props } ) => {\n const elementRef = useRef();\n useImperativeHandle(inputRef, () => ({\n focus: () => elementRef.current.focus\n }));\n return (\n (elementRef.current = element)}\n {...props}\n />\n )\n}\nexport default StripeInput","import React, {useState} from \"react\";\nimport { TextField, Button, Typography, CircularProgress } from \"@material-ui/core\";\nimport {CardNumberElement, CardExpiryElement, CardCvcElement, useElements, useStripe} from \"@stripe/react-stripe-js\"\nimport StripeInput from \"./stripe-input\";\nimport Info from \"@material-ui/icons/Info\";\nimport {AccountService} from \"../../services\";\nimport {useStore} from \"../../store\";\nimport {useSnackbar} from \"notistack\";\nimport * as toast from \"../../utils/toast\";\nimport {setAccountPaymentMethod} from \"../../store/actions\";\n\nconst AddPaymentMethod = ({accountId=0}) => {\n const elements = useElements();\n const stripe = useStripe();\n const [state, setState] = useState({\n cardholder: {error: '', complete: false, value: ''},\n cardNumber: {error: '', complete: false},\n cardExpiry: {error: '', complete: false},\n cardCvc: {error: '', complete: false},\n done: false,\n isFetching: false,\n })\n const [, dispatch] = useStore();\n const {enqueueSnackbar, closeSnackbar} = useSnackbar(); // Snackbar Hook for notifications\n\n // Styling for stripe elements\n const elOptions = {\n style: {\n base: {\n fontFamily: 'Mulish',\n fontSize: '16px',\n }\n }\n }\n\n // If stripe.js hasn't loaded yet, we'll get a null value\n if (!elements || !stripe) {\n return null\n }\n\n const canSubmit = () => {\n return state.cardholder.complete &&\n state.cardNumber.complete &&\n state.cardExpiry.complete &&\n state.cardCvc.complete\n }\n\n const onCardholderChange = (e) => {\n updateCardholder(e.target.value);\n }\n\n const validateCardholder = () => {\n updateCardholder(state.cardholder.value);\n }\n\n const updateCardholder = (value) => {\n const cardholder = {\n error: value.length === 0 ? 'Cardholder name is required' : '',\n complete: value.length > 0,\n value: value,\n }\n setState({...state, cardholder})\n }\n\n const onElementChange = (e) => {\n const err = e.error ? e.error.message : '';\n setState({...state, [e.elementType]: {error: err, complete: e.complete}})\n }\n\n const onSubmit = (e) => {\n //console.log('onSubmit e=', e)\n const cardElement = elements.getElement(CardNumberElement);\n setState({...state, isFetching: true})\n stripe.createToken(cardElement, {name: state.cardholder.value})\n .then((result) => {\n\n // Send token to the server to turn into a source...\n AccountService.setPaymentMethod(accountId, result.token.id)\n .then((result) => {\n setState({...state, done: true, isFetching: false})\n\n // Update the account\n dispatch(setAccountPaymentMethod(result))\n\n // Inform the user it worked\n toast.success('Your card was added', enqueueSnackbar, closeSnackbar)\n\n })\n .catch((error) => {\n errorMessage(error);\n setState({...state, isFetching: false})\n })\n\n })\n .catch((error) => {\n errorMessage(error);\n setState({...state, isFetching: false})\n })\n }\n\n const errorMessage = (error) => {\n if (error.status === 402) {\n // It's a card error, trim the prefix and use the remainder as the error message\n const msg = error.data.error.replace(\"card add error: \", \"\")\n toast.apiError(msg, error, enqueueSnackbar);\n } else {\n // It's a generic error?\n toast.apiError(\"Your card could not be added\", error, enqueueSnackbar);\n }\n }\n\n return (\n
\n Add Payment Method\n\n {state.cardholder.error}}\n />\n\n {state.cardNumber.error}}\n margin=\"normal\"\n />\n\n
\n {state.cardExpiry.error}}\n margin=\"normal\"\n />\n\n {state.cardCvc.error}}\n margin=\"normal\"\n />\n
\n\n
\n \n
\n Your card information is securely stored by our payments\n partner \n Stripe\n , one of the world's leading online\n payment providers. We do not store your card details on our servers.\n
\n
\n\n \n {state.isFetching ?\n \n : 'Add Card'}\n \n
\n )\n}\n\nexport default AddPaymentMethod;","import React, {useEffect, useRef, useState} from \"react\";\nimport {TextField, Button, Typography, CircularProgress, Checkbox} from \"@material-ui/core\";\nimport {CardNumberElement, CardExpiryElement, CardCvcElement, useElements, useStripe} from \"@stripe/react-stripe-js\"\nimport StripeInput from \"./stripe-input\";\nimport Info from \"@material-ui/icons/Info\";\nimport {useSnackbar} from \"notistack\";\nimport * as toast from \"../../utils/toast\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport {scroller} from \"react-scroll\";\nimport {StripeCardError} from \"../index\";\n\nconst CardForm = ({onSubmit, cardError, options={storageInfo:false, storeCheckbox: false, buttonTitle: 'Submit', dense: true} }) => {\n const elements = useElements();\n const stripe = useStripe();\n const [state, setState] = useState({\n cardholder: {error: '', complete: false, value: ''},\n cardNumber: {error: '', complete: false},\n cardExpiry: {error: '', complete: false},\n cardCvc: {error: '', complete: false},\n done: false,\n saveCard: false,\n isFetching: false,\n })\n const {enqueueSnackbar} = useSnackbar(); // Snackbar Hook for notifications\n\n // Styling for stripe elements\n const elOptions = {\n style: {\n base: {\n fontFamily: 'Mulish',\n fontSize: '16px',\n }\n }\n }\n\n // Scroll to the payment method section so the 'Buy' button\n // is still visible when we show the storage information info\n useEffect(() => {\n if (state.saveCard) {\n scroller.scrollTo('payment-method', {\n duration : 800,\n delay : 200,\n smooth : 'easeInOutQuart',\n containerId : 'psb',\n });\n }\n\n },[state.saveCard])\n\n // Track our mounted state so we don't try and setState() after we're gone\n let isMounted = useRef(true)\n useEffect(() => {\n // React calls the return function when the component is unmounted\n return () => {isMounted.current = false}\n },[])\n\n // If stripe.js hasn't loaded yet, we'll get a null value\n if (!elements || !stripe) {\n return null\n }\n\n const canSubmit = () => {\n return state.cardholder.complete &&\n state.cardNumber.complete &&\n state.cardExpiry.complete &&\n state.cardCvc.complete\n }\n\n const onCardholderChange = (e) => {\n updateCardholder(e.target.value);\n }\n\n const validateCardholder = () => {\n updateCardholder(state.cardholder.value);\n }\n\n const updateCardholder = (value) => {\n const cardholder = {\n error: value.length === 0 ? 'Please enter the cardholder name' : '',\n complete: value.length > 0,\n value: value,\n }\n setState({...state, cardholder})\n }\n\n const onElementChange = (e) => {\n const err = e.error ? e.error.message : '';\n setState({...state, [e.elementType]: {error: err, complete: e.complete}})\n }\n\n const onFormSubmit = () => {\n // Check the cardholder name is entered\n if (!state.cardholder.complete) {\n setState({...state, cardholder: {...state.cardholder, error: 'Please enter the cardholder name'}})\n return\n }\n const cardElement = elements.getElement(CardNumberElement);\n setState({...state, isFetching: true})\n\n stripe.createToken(cardElement, {name: state.cardholder.value})\n .then((result) => {\n const {error, token} = result;\n if (token) {\n // Call the submit callback passing the token back.\n // onSubmit should be a promise that is resolved when the parent has finished processing.\n // We could use it to turn off isFetching if we were still displayed, but this component\n // is unmounted when we're done either way\n if (typeof(onSubmit) === 'function') {\n //console.log('CardForm calling onSubmit');\n onSubmit({token, saveCard: state.saveCard})\n .then(() => {\n //console.log('CardForm .then() invoked');\n if (isMounted.current) {\n //console.log('CardForm .then() resetting isFetching');\n setState({...state, isFetching: false})\n }\n })\n }\n } else {\n // Stripe error object properties:\n // {\n // type: api_connection_error || api_error || authentication_error || card_error ||\n // idempotency_error || invalid_request_error || rate_limit_error\n // code: e.g. authentication_required, expired_card\n // decline_code: if the error is because of a card_error\n // message: human readable string. if card_error can show to user.\n // }\n if (error.type === 'validation_error') {\n if (error.code.indexOf('number') !== -1) {\n state.cardNumber.error = error.message\n } else if (error.code.indexOf('expiry') !== -1) {\n state.cardExpiry.error = error.message\n } else if (error.code.indexOf('cvc') !== -1) {\n state.cardCvc.error = error.message\n }\n } else if (error.type === 'card_error') {\n const err = {status: error.type , statusText: error.decline_code ? error.code + \":\" + error.decline_code : error.code }\n toast.apiError(error.message, err, enqueueSnackbar)\n } else {\n const err = {status: error.type , statusText: error.code}\n toast.apiError(\"Sorry, something's gone wrong at our end. You have not been charged.\", err, enqueueSnackbar);\n }\n setState({...state, isFetching: false})\n }\n })\n }\n\n const handleCheck = (e) => {\n setState({...state, saveCard: e.target.checked})\n }\n\n return (\n
\n\n {state.cardholder.error}}\n />\n\n {state.cardNumber.error}}\n margin={options.dense ? 'dense':'normal'}\n />\n\n
\n {state.cardExpiry.error}}\n margin={options.dense ? 'dense':'normal'}\n />\n\n {state.cardCvc.error}}\n margin={options.dense ? 'dense':'normal'}\n />\n
\n\n { options.storeCheckbox ?\n Update my account to use this card}\n margin={options.dense ? 'dense':'normal'}\n control={\n \n }\n />\n : null\n }\n\n { options.storageInfo || state.saveCard ?\n
\n \n
\n Your card information is securely stored by our payments\n partner \n Stripe\n , one of the world's leading online\n payment providers. We do not store your card details on our servers.\n
\n
\n : null\n }\n\n \n\n \n {state.isFetching ? : options.buttonTitle }\n \n
\n )\n}\n\nexport default CardForm;","import FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport React from \"react\";\n\n\nconst StripeCardError = ({error}) => {\n\n if (!error) {\n //console.log('no error!')\n return null\n }\n\n // It's a 'payment required' card error, handle it here.\n switch (error.code) {\n case 'card_declined':\n if (error.message.indexOf('insufficient') > -1) {\n error.code = 'insufficient_funds'\n }\n break;\n\n case 'incorrect_cvc':\n case 'expired_card':\n break;\n\n default:\n error.code = 'generic'\n break;\n }\n\n return (\n \n
\n { error.code === 'incorrect_cvc' ?\n
\n
Your card's security code is incorrect.
\n
\n Check the CVC code and try again.\n
\n
\n : null\n }\n { error.code === 'expired_card' ?\n
\n
Your card has expired.
\n
\n Update your card details and try again.\n
\n
\n : null\n }\n { error.code === 'insufficient_funds' ?\n
\n
Your card has insufficient funds.
\n
\n Check your card is unlocked for online use and there is enough money\n available in your bank account.\n
\n
\n : null\n }\n { error.code === 'card_declined' ?\n
\n
Your card was declined.
\n
\n We don't know why exactly - banks don't give us much information for privacy reasons. You may need to\n contact your bank to find out why the card was declined.\n
\n
\n : null\n }\n { error.code === 'generic' ?\n
\n
Sorry, something went wrong.
\n
\n {error.message}\n
\n
\n : null\n }\n
\n
\n )\n}\n\nexport default StripeCardError;","import React from \"react\";\n\nconst InvoiceStatus = ({status}) => {\n\n let state;\n\n switch (status) {\n case 'paid':\n case 'part-refund':\n state = {status:'Paid', bgColor:'#31a331'}; // Green\n break;\n\n case 'disputed':\n state = {status:'Disputed', bgColor:'#bd0007'}; // Red\n break;\n\n case 'refund':\n state = {status:'Refund', bgColor:'#8d8c8c'}; // Gray\n break;\n\n default:\n state = {status:status, bgColor:'#cf9a0b'}; // Yellow\n }\n\n const classes = {\n textBox : {\n display: 'inline-block',\n color: 'white',\n backgroundColor: state.bgColor,\n paddingLeft: 8,\n paddingRight: 8,\n paddingTop: 4,\n paddingBottom: 4,\n fontSize: 11,\n fontWeight: 500,\n borderRadius: 2\n }\n };\n\n return (\n
{state.status}
\n )\n}\n\nexport default InvoiceStatus;","import FuseAnimate from \"../fuse-animate/fuse-animate\";\nimport {Card, CircularProgress, Hidden} from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport * as toast from \"../../utils/toast\";\nimport React, {useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {PhoneAndroid} from \"@material-ui/icons\";\nimport {useStore} from \"../../store\";\nimport {useSnackbar} from \"notistack\";\nimport {EndpointService} from \"../../services\";\nimport {clearEndpoint, fetchAccount, invalidateAccount} from \"../../store/actions\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(2),\n },\n header: {\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: theme.spacing(3),\n },\n deviceRow: {\n display: 'flex',\n flexDirection: 'row',\n paddingTop: 4,\n paddingLeft: 8,\n textTransform: 'capitalize',\n },\n linkButton: {\n marginTop: 24,\n },\n sideLinkButton: {\n minWidth: 180,\n },\n}));\n\nconst EndpointCard = ({ endpoint , animation, delay }) => {\n const classes = useStyles();\n const [state, setState] = useState({fetching: false, isLoaded: true, reload: false})\n const [store, dispatch] = useStore();\n const {enqueueSnackbar, closeSnackbar} = useSnackbar(); // Snackbar Hook for notifications\n\n // Make sure the account is available in the store and reload it if state.reload changes\n useEffect(()=> {\n if (store.user.accountId) {\n dispatch(fetchAccount(store.user.accountId, store, dispatch))\n }\n }, [store.user.accountId, store, dispatch, state.reload])\n\n const deactivateEndpoint = (event) => {\n setState({...state, fetching: true})\n EndpointService.deactivate(endpoint.accountId, endpoint.id)\n .then((result) => {\n\n // Invalidate the store because services will have changed\n dispatch(invalidateAccount())\n\n // remove the deactivated endpoint\n dispatch(clearEndpoint());\n\n setState({...state, fetching: false, reload: true})\n\n // notify the user we succeeded\n toast.success(\"Your Receiver app has been deactivated\", enqueueSnackbar, closeSnackbar)\n })\n .catch(error => {\n // notify the user we hit an error\n setState({...state, fetching: false})\n toast.apiError(\"Your Receiver app could not be deactivated\", error, enqueueSnackbar)\n })\n }\n\n return (\n \n \n Receiver App\n\n \n\n \n
\n \n \n {endpoint.deviceMake} {endpoint.deviceName}   [{endpoint.deviceOS} {endpoint.deviceOSVersion}]\n \n
\n
\n \n \n \n \n \n\n
\n \n \n \n\n
\n
\n )\n}\n\nexport default EndpointCard;","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport { App } from './components';\nimport reportWebVitals from './reportWebVitals';\n\nReactDOM.render(\n // \n ,\n // ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals(console.log);\n"],"sourceRoot":""}