{"version":3,"sources":["styles/colors.js","graphql/queries/index.js","context/OrganizationContext.js","components/Loader.js","components/Layout.js","components/EmbedLayout.js","components/HomeLayout.js","components/Button.js","components/Flex.js","components/Input.js","components/CodeInputBoxes.js","components/Icons.js","components/Icon.js","components/Error.js","util/NPECheck.js","util/ErrorUtil.js","components/Home.js","components/BusinessPreview.js","util/Price.js","util/contactConstants.js","context/AppContext.js","util/CouponParentTypes.js","components/Invite.js","components/PhoneInput.js","components/InviteFriends.js","components/AcceptCoupon.js","components/BalancePreview.js","components/OrganizationList.js","components/Unsubscribed.js","components/InviteError.js","util/MediaQuery.js","components/JoinReferral.js","components/CouponsList.js","components/Discounts.js","components/Embed.js","components/App.js","graphql/ApolloLinks.js","index.js","assets/images/cto-full-logo.png"],"names":["lightBlack","black","white","blackBlue","grey","whiteGrey","seaGreen","lightGrey","darkGrey","red","background","green","orange","cream","lightCream","smoke","darkBlue","grey1","grey2","grey3","grey4","grey5","grey6","yellow","purple","lightPurple","gql","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","GET_ORGANIZATION","_templateObject10","GET_ORGANIZATION_LIST","_templateObject11","SEND_PHONE_CODE","_templateObject12","_templateObject13","_templateObject14","_templateObject15","_templateObject16","_templateObject17","_templateObject18","_templateObject19","_templateObject20","_templateObject21","_templateObject22","_templateObject23","VERIFY_PHONE_CODE","_templateObject24","VERIFY_PHONE_CODE_EMBED","_templateObject25","CREATE_REFERENCE","_templateObject26","GET_REFERENCE_BY_ID","_templateObject27","GET_REFERENCE","_templateObject28","CREATE_COUPON","_templateObject29","GET_ACTIVE_COUPONS","_templateObject30","UPDATE_REF_CLICK_COUNT","_templateObject31","_templateObject32","OrganizationContext","createContext","LoaderSizes","Object","freeze","VerySmall","Small","Medium","Large","LoaderSizesMap","scale","size","concat","StyledLoader","styled","div","props","color","Loader","_ref","colors","React","createElement","className","LayoutContainer","EmbedLayoutContainer","LoaderContainer","ViewContainer","EmbedViewContainer","withRouter","_refData$getReference","location","component","Component","rest","_objectWithoutProperties","_excluded","history","useHistory","setOrganization","useContext","query","orgId","ref","o","url","parse","window","toString","isEmbedRoute","pathname","data","refData","loading","refLoading","error","refError","useQuery","variables","referenceId","skip","organizationId","getReferenceById","useEffect","_data$getOrganization","getOrganization","activeSubscriber","push","_id","Redirect","to","Route","assign","render","matchProps","onError","console","innerHeight","HomeLayout","ButtonContainer","button","radius","width","margin","textColor","padding","display","alignSelf","darken","xsWidth","xsHeight","xsMargin","Button","text","onClick","type","justify","Flex","direction","align","flex","height","borderRight","flexWrap","InputContainer","PhoneInputStyle","input","borderRadius","Cleave","placeholdercolor","xsheight","HeaderStyle","top","FooterStyle","PhoneNumberInput","_ref3","header","footer","placeholder","placeholderColor","value","onChange","required","options","phone","phoneRegionCode","maxLength","Container","Input","CodeInputBoxes","constructor","params","super","this","state","Array","length","fill","lastValue","inputs","valueAt","index","currentValue","currentValueSaved","setState","focus","split","onComplete","charAt","join","renderInput","key","autoFocus","pattern","event","target","onKeyDown","keyCode","preventDefault","map","_","defaultProps","IconEnum","RightArrow","UploadRegular","AngleDownRegular","CogsRegular","DollarSquareRegular","EnvelopeOpenRegular","HomeRegular","ImportRegular","PlusRegular","SearchRegular","TagRegular","UsersRegular","LeftArrow","CheckCircleSolid","HistorySolid","LinkSolid","MenuSolid","MobileSolid","PaperPlaneSolid","TimesCircleSolid","CommentSolid","DollarSquareSolid","PaperPlaneRegular","SignOut","Warning","DollarSign","Icons","Icon","icon","left","right","position","zIndex","active","activeColor","inactiveColor","cursor","FontAwesomeIcon","style","fontSize","transition","ErrorContainer","Error","object","nestedProps","substitute","arguments","undefined","nested","val","prop","shift","getErrorMessage","errorMsg","NPECheck","form","BodyText","BottomText","CodeText","Body","LogoContainer","LogoImg","img","Home","phoneNumber","setPhoneNumber","useState","setError","codeInputIsVisible","setCodeInputIsVisible","sendPhoneCode","useMutation","onCompleted","log","verifyPhoneCode","verifyLoading","token","localStorage","setItem","onSubmit","e","src","Logo","Fragment","phoneCode","ImageContainer","InfoContainer","Name","Address","BusinessPreview","organization","address","city","logoUrl","name","output","price","withFixed","toFixed","originalSources","ORG","SELF","REF","SMS","MODAL","AppContext","CouponParentTypes","Referred","Affiliate","bg","Header","Image","HeaderText","BusinessPreviewContainer","OuterContainer","TOS","TOSLink","a","Invite","setApp","originalSource","setOriginalSource","createReference","createCoupon","couponLoading","couponParentType","updateClickCount","c","configurations","first","Price","firstTimeRecipientCredit","repeat","repeatRecipientCredit","affiliate","affiliateCredit","posterImageUrl","href","rel","PhoneInput","InnerContainer","IconContainer","IconContainerGrey","Selection","TextContainer","SelectionTitle","SelectionSubtitle","BackButton","TopButtonContainer","InviteFriends","_data$getReference","_data$getReference2","_coupData$activeCoupo","tooltipRef","setTooltipRef","coupData","coupLoading","navigator","platform","test","inviteLink","getReference","origin","presetMessage","textDecoration","dummy","document","body","appendChild","select","execCommand","removeChild","copyToClipboard","ReactTooltip","show","setTimeout","hide","data-tip","data-event","activeCoupons","place","effect","websiteUrl","reservationUrl","open","shortReservationUrl","shortWebsiteUrl","AcceptCoupon","BalancePreview","reduce","acc","item","amount","OrgBox","OrganizationList","getOrganizationList","org","Unsubscribed","InviteError","app","mediaQuery","queryTemplate","_len","queryRest","_key","rulesTemplate","_len2","rulesRest","_key2","css","sizes","mobileQueryString","useMedia","matchQuery","matchMedia","isMatch","setIsMatch","matches","handler","addListener","removeListener","JoinButton","JoinReferral","isMobile","TableContainer","Wrapper","Heading","Row","sticky","HeadText","HeadingText","Column","CouponList","coupons","total","parseInt","coupon","expirationTime","redemptionExpiration","moment","format","BalanceContainer","ValidCouponContainer","Discounts","DefaultColors","backgroundColor","buttonTextColor","buttonColor","Content","successMsg","HeaderDiv","FormDiv","SubHeadingText","CodeBoxContainer","CloseContiner","Terms","p","DefaultText","Embed","_organization$integra","_organization$integra2","_organization$integra3","_organization$integra4","_organization$integra5","_organization$integra6","showSuccessMessage","setShowSuccessMessage","updateFrameDimensions","getWindowsDimensions","_document","_window","_window2","_window3","_window4","_window4$screen","_window5","_window5$screen","_window6","_window6$screen","_window7","_window7$screen","innerWidth","documentElement","clientWidth","clientHeight","contentHeight","getElementById","offsetHeight","orientation","screen","mozOrientation","msOrientation","screenWidth","screenHeight","availHeight","availWidth","parent","postMessage","action","args","status","verifyPhoneCodeEmbed","id","bgColor","integration","btnTextColor","btnColor","close","headline","successText","replaceAll","introductoryText","flexDirection","App","appValue","useMemo","orgValue","Router","basename","Switch","exact","path","Provider","Layout","authLink","ApolloLink","operation","forward","context","getHeaders","authorization","getItem","headers","setContext","errorLink","graphQLErrors","networkError","forEach","_ref2","message","locations","httpLink","HttpLink","uri","credentials","omitTypeNameLink","operationName","omitDeep","obj","keys","newObj","i","isArray","omitDeepArrayWalk","arr","client","ApolloClient","link","from","cache","InMemoryCache","ReactDOM","ApolloProvider","module","exports"],"mappings":"gTAAe,GACbA,WAAY,OACZC,MAAO,UACPC,MAAO,UACPC,UAAW,UACXC,KAAM,UACNC,UAAW,UACXC,SAAU,UACVC,UAAW,UACXC,SAAU,UACVC,IAAK,UACLC,WAAY,UACZC,MAAO,UACPC,OAAQ,UACRC,MAAO,UACPC,WAAY,UACZC,MAAO,UACPC,SAAU,UACVC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,OAAQ,UACRC,OAAQ,UACRC,YAAa,Y,OCpBiBC,YAAGC,MAAAC,YAAA,+OAgBHF,YAAGG,MAAAD,YAAA,+cA0BNF,YAAGI,MAAAF,YAAA,0VAoBFF,YAAGK,MAAAH,YAAA,6JAQFF,YAAGM,MAAAJ,YAAA,wHAQJF,YAAGO,MAAAL,YAAA,0KASNF,YAAGQ,MAAAN,YAAA,gKAYKF,YAAGS,MAAAP,YAAA,6TAkBEF,YAAGU,MAAAR,YAAA,mmBArHpC,MAsJMS,EAAmBX,YAAGY,MAAAV,YAAA,q4BA4CtBW,GAAwBb,YAAGc,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Ae2e,EAAS,YAAA3e,OAAWwd,MAGvEe,GAAcva,QAAQgK,IAAI,oBAADhO,OAAqBue,MAGvCK,GAAW,IAAIC,KAAS,CACnCC,IAAI,GAAD9e,OA7CmD,GA6CvC,YACf+e,YAAa,gBAGFC,GAAmB,IAAIpB,IAAW,CAACC,EAAWC,KACrDD,EAAU/a,WAAyC,gBAA5B+a,EAAUoB,gBACnCpB,EAAU/a,UAAYoc,GAASrB,EAAU/a,UAAW,eAE/Cgb,EAAQD,GAAW1U,IAAK5G,GACtBA,KAKX,SAAS2c,GAASC,EAAKxW,GACrB,MAAMyW,EAAO7f,OAAO6f,KAAKD,GACnBE,EAAS,GASf,OARAD,EAAKZ,QAASc,IACZ,GAAIA,IAAM3W,EAAK,CACb,MAAM6D,EAAM2S,EAAIG,GACZ3X,MAAM4X,QAAQ/S,GAAM6S,EAAOC,GAQrC,SAASE,EAAkBC,EAAK9W,GAC9B,OAAO8W,EAAItW,IAAKqD,GACV7E,MAAM4X,QAAQ/S,GAAagT,EAAkBhT,EAAK7D,GACnC,kBAAR6D,EAAyB0S,GAAS1S,EAAK7D,GAC3C6D,GAZ+BgT,CAAkBhT,EAAK7D,GACT0W,EAAOC,GAAjC,kBAAR9S,GAA4B,OAARA,EAA0B0S,GAAS1S,EAAK7D,GAC3D6D,KAGd6S,EC3DT,MAAMK,GAAS,IAAIC,IAAa,CAC9BC,KAAMC,YAAK,CACTlC,GACAqB,GACAX,GACAO,KAEFkB,MAAO,IAAIC,MAGbC,IAASnc,OACPpD,IAAAC,cAACuf,IAAc,CAACP,OAAQA,IACtBjf,IAAAC,cAACsc,GAAG,OAENnJ,SAASwH,eAAe,U,mBC7B1B6E,EAAOC,QAAU,IAA0B,2C","file":"static/js/main.0a1f1a3e.chunk.js","sourcesContent":["export default {\n lightBlack: '#333',\n black: '#000000',\n white: '#FFFFFF',\n blackBlue: '#3E4C6F',\n grey: '#828282',\n whiteGrey: '#F2F2F2',\n seaGreen: '#27BBAD',\n lightGrey: '#BDBDBD',\n darkGrey: '#4F4F4F',\n red: '#E63946',\n background: '#FAFAFA',\n green: '#419D78',\n orange: '#FF6802',\n cream: '#FFF9F5',\n lightCream: '#FFFDFB',\n smoke: '#FBFBFF',\n darkBlue: '#083D77',\n grey1: '#333333',\n grey2: '#4F4F4F',\n grey3: '#828282',\n grey4: '#BDBDBD',\n grey5: '#E0E0E0',\n grey6: '#F2F2F2',\n yellow: '#FFBA49',\n purple: '#1E1449',\n lightPurple: ' #9999cc',\n};\n","import gql from \"graphql-tag\";\n\n/************************************************\n USER\n ************************************************/\n\nexport const GET_CURRENT_USER = gql`\n query getCurrentUser {\n getCurrentUser {\n _id\n email\n phoneNumber\n firstName\n organizationContextId\n currentOrganizationRole\n lastName\n couponIds\n visitIds\n }\n }\n`;\n\nexport const UPDATE_USER_INFO = gql`\n mutation updateUserInfo(\n $email: String!\n $firstName: String!\n $lastName: String!\n $phoneNumber: String!\n ) {\n updateUserInfo(\n email: $email\n firstName: $firstName\n lastName: $lastName\n phoneNumber: $phoneNumber\n ) {\n _id\n email\n phoneNumber\n firstName\n organizationContextId\n currentOrganizationRole\n lastName\n couponIds\n visitIds\n }\n }\n`;\n\nexport const REGISTER_USER = gql`\n mutation register(\n $email: String!\n $firstName: String!\n $lastName: String!\n $phoneNumber: String!\n $password: String!\n ) {\n register(\n email: $email\n firstName: $firstName\n lastName: $lastName\n phoneNumber: $phoneNumber\n password: $password\n ) {\n token\n }\n }\n`;\n\nexport const PASSWORD_LOGIN = gql`\n mutation passwordLogin($email: String!, $password: String!) {\n passwordLogin(email: $email, password: $password) {\n token\n }\n }\n`;\n\nexport const PASSWORD_FORGOT = gql`\n mutation passwordForgot($email: String!) {\n passwordForgot(email: $email) {\n message\n }\n }\n`;\n\nexport const PASSWORD_RESET = gql`\n mutation passwordReset($password: String!, $code: String!) {\n passwordReset(password: $password, code: $code) {\n message\n status\n }\n }\n`;\n\nexport const PHONE_LOGIN = gql`\n mutation phoneLogin($email: String!, $phoneNumber: String!) {\n phoneLogin(email: $email, phoneNumber: $PhoneNumber) {\n token\n }\n }\n`;\n\n/************************************************\n ORGANIZATION\n ************************************************/\n\nexport const CREATE_ORGANIZATION = gql`\n mutation createOrganization(\n $name: String!\n $address: AddressInput\n $logoUrl: String!\n $posterImageUrl: String!\n ) {\n createOrganization(\n name: $name\n address: $address\n logoUrl: $logoUrl\n posterImageUrl: $posterImageUrl\n ) {\n token\n }\n }\n`;\n\nexport const GET_CURRENT_ORGANIZATION = gql`\n query getCurrentOrganization {\n getCurrentOrganization {\n _id\n name\n createdAt\n logoUrl\n posterImageUrl\n phoneNumber\n activeSubscriber\n address {\n address1\n address2\n city\n state\n zip\n country\n }\n configurations {\n affiliateCredit\n firstTimeRecipientCredit\n repeatRecipientCredit\n returnLimit\n couponActivationExpiration\n couponRedemptionExpiration\n websiteUrl\n reservationUrl\n welcomeMessage\n }\n }\n }\n`;\n\nexport const GET_ORGANIZATION = gql`\n query getOrganization($organizationId: String!) {\n getOrganization(organizationId: $organizationId) {\n _id\n name\n createdAt\n logoUrl\n posterImageUrl\n activeSubscriber\n phoneNumber\n address {\n address1\n address2\n city\n state\n zip\n country\n }\n configurations {\n affiliateCredit\n firstTimeRecipientCredit\n repeatRecipientCredit\n returnLimit\n couponActivationExpiration\n couponRedemptionExpiration\n websiteUrl\n reservationUrl\n welcomeMessage\n shortWebsiteUrl\n shortReservationUrl\n }\n integration {\n headline\n buttonColor\n buttonTextColor\n backgroundColor\n introductoryText\n integrationType\n successText\n }\n }\n }\n`;\n\nexport const GET_ORGANIZATION_LIST = gql`\n query getOrganizationList {\n getOrganizationList {\n _id\n name\n createdAt\n logoUrl\n posterImageUrl\n activeSubscriber\n address {\n address1\n address2\n city\n state\n zip\n country\n }\n configurations {\n affiliateCredit\n firstTimeRecipientCredit\n repeatRecipientCredit\n returnLimit\n couponActivationExpiration\n couponRedemptionExpiration\n websiteUrl\n reservationUrl\n welcomeMessage\n }\n }\n }\n`;\n\nexport const UPDATE_ORGANIZATION_INFO = gql`\n mutation updateOrganizationInfo(\n $name: String!\n $address: AddressInput\n $logoUrl: String!\n $posterImageUrl: String!\n ) {\n updateOrganizationInfo(\n name: $name\n address: $address\n logoUrl: $logoUrl\n posterImageUrl: $posterImageUrl\n ) {\n _id\n name\n createdAt\n logoUrl\n posterImageUrl\n activeSubscriber\n address {\n address1\n address2\n city\n state\n zip\n country\n }\n configurations {\n affiliateCredit\n firstTimeRecipientCredit\n repeatRecipientCredit\n returnLimit\n couponActivationExpiration\n couponRedemptionExpiration\n websiteUrl\n reservationUrl\n welcomeMessage\n }\n }\n }\n`;\n\nexport const UPDATE_ORGANIZATION_CONFIGURATION = gql`\n mutation updateOrganizationConfiguration(\n $configurations: OrganizationConfigurationsInput!\n ) {\n updateOrganizationConfiguration(configurations: $configurations) {\n _id\n name\n createdAt\n logoUrl\n posterImageUrl\n activeSubscriber\n address {\n address1\n address2\n city\n state\n zip\n country\n }\n configurations {\n affiliateCredit\n firstTimeRecipientCredit\n repeatRecipientCredit\n returnLimit\n couponActivationExpiration\n couponRedemptionExpiration\n websiteUrl\n reservationUrl\n welcomeMessage\n }\n }\n }\n`;\n\n/************************************************\n ROLES\n ************************************************/\n\nexport const GET_ORGANIZATION_ROLES = gql`\n query getOrganizaationRoles {\n getOrganizationRoles {\n _id\n userId\n email\n organizationId\n acceptedAt\n accessLevel\n user {\n firstName\n lastName\n email\n }\n }\n }\n`;\n\nexport const GET_USER_ROLES = gql`\n query getUserRoles {\n getUserRoles {\n _id\n userId\n email\n organizationId\n acceptedAt\n accessLevel\n user {\n firstName\n lastName\n email\n }\n organization {\n name\n logoUrl\n }\n }\n }\n`;\n\nexport const CREATE_ROLE = gql`\n mutation createRole($email: String!, $accessLevel: String!) {\n createRole(email: $email, accessLevel: $accessLevel) {\n _id\n userId\n email\n organizationId\n acceptedAt\n accessLevel\n }\n }\n`;\n\nexport const DELETE_ROLE = gql`\n mutation deleteRole($roleId: String!) {\n deleteRole(roleId: $roleId)\n }\n`;\n\nexport const ACCEPT_ROLE = gql`\n mutation acceptRole($roleId: String!, $doesAccept: Boolean!) {\n acceptRole(roleId: $roleId, doesAccept: $doesAccept) {\n token\n }\n }\n`;\n\n/************************************************\n CONTACT\n ************************************************/\n\nexport const CREATE_CONTACT = gql`\n mutation createContact($phoneNumber: String!) {\n createContact(phoneNumber: $phoneNumber)\n }\n`;\n\nexport const GET_CONTACTS = gql`\n query getContacts {\n getContacts {\n _id\n phoneNumber\n organizationId\n }\n }\n`;\n\n/************************************************\n Message\n ************************************************/\n\nexport const SEND_CUSTOM_TEXT = gql`\n mutation sendCustomText(\n $phoneNumber: String!\n $message: String!\n $mediaUrl: String\n $organizationId: String\n $messageType: String\n ) {\n sendCustomText(\n phoneNumber: $phoneNumber\n message: $message\n mediaUrl: $mediaUrl\n organizationId: $organizationId\n messageType: $messageType\n )\n }\n`;\n\nexport const SEND_WELCOME_TEXT = gql`\n mutation sendWelcomeText {\n sendWelcomeText\n }\n`;\n\nexport const SEND_PHONE_CODE = gql`\n mutation sendPhoneCode(\n $phoneNumber: String!\n $organizationId: String\n $originalSource: String\n ) {\n sendPhoneCode(\n phoneNumber: $phoneNumber\n organizationId: $organizationId\n originalSource: $originalSource\n )\n }\n`;\n\nexport const VERIFY_PHONE_CODE = gql`\n mutation verifyPhoneCode(\n $phoneNumber: String!\n $phoneCode: String!\n $organizationId: String\n ) {\n verifyPhoneCode(\n phoneNumber: $phoneNumber\n phoneCode: $phoneCode\n organizationId: $organizationId\n ) {\n token\n }\n }\n`;\nexport const VERIFY_PHONE_CODE_EMBED = gql`\n mutation verifyPhoneCodeEmbed(\n $phoneNumber: String!\n $organizationId: String\n $phoneCode: String!\n ) {\n verifyPhoneCodeEmbed(\n phoneNumber: $phoneNumber\n organizationId: $organizationId\n phoneCode: $phoneCode\n )\n }\n`;\n\nexport const CREATE_REFERENCE = gql`\n mutation createReference($organizationId: String!) {\n createReference(organizationId: $organizationId) {\n _id\n userId\n organizationId\n createdAt\n }\n }\n`;\n\n/************************************************\n Message\n ************************************************/\n\nexport const GET_REFERENCE_BY_ID = gql`\n query getReferenceById($referenceId: String!) {\n getReferenceById(referenceId: $referenceId) {\n _id\n userId\n organizationId\n createdAt\n }\n }\n`;\n\nexport const GET_REFERENCE = gql`\n query getReference($organizationId: String!) {\n getReference(organizationId: $organizationId) {\n _id\n userId\n organizationId\n createdAt\n }\n }\n`;\n\n/************************************************\n Coupon\n ************************************************/\n\nexport const CREATE_COUPON = gql`\n mutation createCoupon($referenceId: String!, $couponParentType: String!) {\n createCoupon(\n referenceId: $referenceId\n couponParentType: $couponParentType\n ) {\n _id\n userId\n amount\n referenceId\n activationExpiration\n redemptionExpiration\n acceptedAt\n redeemedAt\n type\n }\n }\n`;\n\nexport const GET_ACTIVE_COUPONS = gql`\n query getCouponBalance($organizationId: String!) {\n activeCoupons: getCouponBalance(organizationId: $organizationId) {\n _id\n amount\n redemptionExpiration\n }\n }\n`;\n\nexport const GET_COUPON_EXPIRATION = gql`\n query getCouponExpiration($organizationId: String!) {\n getCouponExpiration(organizationId: $organizationId) {\n expirationTime\n expirationAmount\n }\n }\n`;\n\nexport const UPDATE_REF_CLICK_COUNT = gql`\n mutation updateClickCount($referenceId: String!) {\n updateClickCount(referenceId: $referenceId) {\n _id\n }\n }\n`;\n","import { createContext } from 'react';\n\nexport const OrganizationContext = createContext(null);\n","import React from 'react';\nimport styled from 'styled-components';\nimport colors from '../styles/colors';\n\nexport const LoaderSizes = Object.freeze({\n VerySmall: 'VerySmall',\n Small: 'Small',\n Medium: 'Medium',\n Large: 'Large',\n});\n\nconst LoaderSizesMap = {\n [LoaderSizes.VerySmall]: 24,\n [LoaderSizes.Small]: 30,\n [LoaderSizes.Medium]: 40,\n [LoaderSizes.Large]: 60,\n};\n\nconst scale = (size, scale) => `${size * scale}px`;\n\nconst StyledLoader = styled.div`\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ${(props) => scale(props.size, 1)};\n height: ${(props) => scale(props.size, 1)};\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ${(props) => scale(props.size, 0.8)};\n height: ${(props) => scale(props.size, 0.8)};\n margin: ${(props) => scale(props.size, 0.1)};\n border: ${(props) => scale(props.size, 0.066)} solid ${(props) => props.color};\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${(props) => props.color} transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n\nexport default function Loader({\n size = LoaderSizes.Large,\n color = colors.seaGreen,\n}) {\n return (\n \n
\n
\n
\n {/*
*/}\n
\n
\n \n );\n}\n","/* eslint-disable react/jsx-props-no-spreading */\nimport React, { useContext, useEffect } from \"react\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport styled from \"styled-components\";\nimport { Route, withRouter, Redirect, useHistory } from \"react-router-dom\";\nimport url from \"url\";\nimport colors from \"../styles/colors\";\nimport { GET_ORGANIZATION, GET_REFERENCE_BY_ID } from \"../graphql/queries\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\n\nconst LayoutContainer = styled.div`\n height: 100vh;\n width: 100vw;\n background: ${colors.background};\n display: flex;\n align-items: center;\n justify-content: center;\n`;\nconst EmbedLayoutContainer = styled.div`\n background: ${colors.background};\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n`;\n\n// desktop will be in mobile type view for mvp\nconst ViewContainer = styled.div`\n display: flex;\n overflow-y: scroll;\n -ms-overflow-style: none;\n scrollbar-width: none;\n align-items: center;\n justify-content: center;\n background: ${colors.white};\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n height: 100%;\n width: 100%;\n max-width: 768px;\n`;\n\nconst EmbedViewContainer = styled.div`\n display: flex;\n -ms-overflow-style: none;\n scrollbar-width: none;\n align-items: center;\n justify-content: center;\n background: ${colors.white};\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n height: 100%;\n width: 100%;\n max-width: 768px;\n`;\n\nfunction Layout({ location, component: Component, ...rest }) {\n\n const history = useHistory();\n const { setOrganization } = useContext(OrganizationContext);\n\n const {\n query: { orgId, ref, o },\n } = url.parse(window.location.toString(), true);\n const isEmbedRoute = location?.pathname === '/embed/'\n\n\n const {\n data: refData,\n loading: refLoading,\n error: refError,\n } = useQuery(GET_REFERENCE_BY_ID, {\n variables: {\n referenceId: ref,\n },\n skip: !ref,\n });\n const organizationId = refData?.getReferenceById?.organizationId || orgId || o\n const { data, loading, error } = useQuery(GET_ORGANIZATION, {\n variables: {\n organizationId,\n },\n skip: !(organizationId),\n });\n\n\n useEffect(() => {\n if (data && data.getOrganization) {\n setOrganization(data.getOrganization);\n if (!data.getOrganization.activeSubscriber)\n history.push(`/unsubscribed?orgId=${data?.getOrganization?._id}`);\n }\n }, [data, setOrganization, history]);\n\n\n if (loading || refLoading) {\n return (\n \n \n \n );\n }\n\n if (error || (ref && refError)) {\n return ;\n }\n\n return (\n (\n !isEmbedRoute ?\n \n \n \n \n \n :\n \n \n \n \n \n )}\n />\n );\n}\n\nexport default withRouter(Layout);\n","/* eslint-disable react/jsx-props-no-spreading */\nimport React, { useContext, useEffect } from \"react\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport styled from \"styled-components\";\nimport { Route, withRouter, useHistory } from \"react-router-dom\";\nimport url from \"url\";\nimport colors from \"../styles/colors\";\nimport { GET_ORGANIZATION } from \"../graphql/queries\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\n\nconst LayoutContainer = styled.div`\n background: ${colors.background};\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n`;\n\n// desktop will be in mobile type view for mvp\nconst ViewContainer = styled.div`\n display: flex;\n -ms-overflow-style: none;\n scrollbar-width: none;\n align-items: center;\n justify-content: center;\n background: ${colors.white};\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n height: 100%;\n width: 100%;\n max-width: 768px;\n`;\n\nfunction Layout({ location, component: Component, ...rest }) {\n const history = useHistory();\n const { query: { orgId } } = url.parse(window.location.toString(), true);\n const { data, loading, error } = useQuery(GET_ORGANIZATION, {\n variables: {\n organizationId: orgId\n },\n onError(error) {\n console.error(error);\n }\n });\n\n const { setOrganization } = useContext(OrganizationContext);\n useEffect(() => {\n if (data && data.getOrganization) {\n setOrganization(data.getOrganization);\n }\n }, [data, setOrganization, history]);\n\n if (loading || error || !data?.getOrganization) {\n return (\n \n \n \n );\n }\n\n\n\n return (\n (\n \n \n \n \n \n )}\n />\n );\n}\n\nexport default withRouter(Layout);\n","/* eslint-disable react/jsx-props-no-spreading */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Route } from 'react-router-dom';\nimport colors from '../styles/colors';\n\nconst LayoutContainer = styled.div`\n /* height: ${`${window.innerHeight}px`}; */\n width: 100vw;\n background: ${colors.background};\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst ViewContainer = styled.div`\n background: ${colors.white};\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n height: 100%;\n width: 100%;\n max-width: 768px;\n /* padding: 15px; */\n padding: 5px;\n box-sizing: border-box;\n`;\n\nexport default function HomeLayout({ location, component: Component, ...rest }) {\n return (\n (\n \n \n \n \n \n )}\n />\n );\n}\n","import React from \"react\";\nimport { darken } from \"polished\";\nimport styled from \"styled-components\";\nimport colors from \"../styles/colors\";\nimport Loader, { LoaderSizes } from \"./Loader\";\n\nconst ButtonContainer = styled.button`\n -webkit-appearance: none;\n cursor: pointer;\n border-radius: ${(props) => props.radius || \"5px\"};\n background: ${(props) => props.background || colors.seaGreen};\n width: ${(props) => props.width || \"150px\"};\n margin: ${(props) => props.margin || \"0\"};\n color: ${(props) => props.textColor || colors.white};\n font-size: 1.4rem;\n transition: all 0.3s;\n padding: ${(props) => props.padding || \"0 15px\"};\n height: 50px;\n font-weight: 600;\n display: ${(props) => props.display || \"flex\"};\n align-items: center;\n align-self: ${(props) => props.alignSelf || null};\n justify-content: center;\n &:hover {\n background: ${(props) =>\n props.background\n ? darken(\"0.05\", props.background)\n : darken(\"0.05\", colors.seaGreen)};\n }\n @media (max-width: 450px) {\n width: ${(props) => props.xsWidth || \"100%-30px\"};\n min-height: ${(props) => props.xsHeight || \"40px\"};\n max-height: ${(props) => props.xsHeight || \"40px\"};\n margin: ${(props) => props.xsMargin || \"0\"};\n }\n @media (max-height: 480px) {\n /* width: ${(props) => props.xsWidth || \"100%-30px\"}; */\n min-height: ${(props) => props.xsHeight || \"40px\"};\n max-height: ${(props) => props.xsHeight || \"40px\"};\n margin: ${(props) => props.xsMargin || \"0\"};\n }\n`;\n\nexport default function Button({\n text,\n onClick,\n margin,\n type,\n width,\n loading,\n background,\n xsWidth,\n alignSelf,\n display,\n justify,\n xsHeight,\n textColor,\n xsMargin,\n radius,\n}) {\n return (\n \n {loading ? (\n \n ) : (\n text\n )}\n \n );\n}\n","import styled from 'styled-components';\n\nexport const Flex = styled.div`\n display: flex;\n flex-direction: ${(props) => props.direction};\n justify-content: ${(props) => props.justify};\n align-items: ${(props) => props.align};\n width: ${(props) => props.width};\n flex: ${(props) => props.flex};\n margin: ${(props) => props.margin};\n padding: ${(props) => props.padding};\n height: ${(props) => props.height};\n border-right: ${(props) => props.borderRight};\n flex-wrap: ${(props) => props.flexWrap};\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport Cleave from \"cleave.js/react\";\nimport \"cleave.js/dist/addons/cleave-phone.us\";\nimport colors from \"../styles/colors\";\nimport { Flex } from \"./Flex\";\n\nconst InputContainer = styled.div`\n display: flex;\n width: ${(props) => props.width};\n @media screen and (max-width: 450px) {\n width: ${(props) => props.xsWidth};\n }\n \n`;\n\nconst InputStyle = styled.input`\n width: ${(props) => props.width};\n padding: 10px;\n border-radius: 5px;\n background: ${colors.white};\n border: 1px solid ${colors.grey5};\n height: 50px;\n \n`;\n\nconst AddressContainer = styled.div`\n width: 400px;\n border-radius: 5px;\n background: ${colors.white};\n display: flex;\n flex-direction: column;\n`;\n\nconst AddressInputStyle = styled.input`\n padding: 10px;\n width: 100%;\n box-sizing: border-box;\n border-radius: ${(props) => props.borderRadius};\n background: ${colors.white};\n border: 1px solid ${colors.grey5};\n outline: none;\n`;\n\nconst PhoneInputStyle = styled(Cleave)`\n width: ${(props) => props.width || \"100%\"};\n padding: 0px 15px;\n height: 50px;\n border-radius: 5px;\n background: ${colors.white};\n border: 1px solid ${colors.grey5};\n line-height: 140%;\n font-size: 1.6rem;\n ::placeholder {\n color: ${(props) => props.placeholdercolor};\n }\n @media only screen and (min-width: 200px) and (max-width: 768px) {\n height: ${(props) => props.xsheight || \"50px\"};\n }\n`;\n\nconst HeaderStyle = styled.div`\n font-size: 1.2rem;\n color: ${colors.grey3};\n margin: ${(props) => (props.top ? \"0px 0px 10px 0px\" : \"30px 0px 10px 0px\")};\n`;\n\nconst FooterStyle = styled.div`\n font-size: 1.2rem;\n color: ${colors.grey3};\n`;\n\nexport default function Input({\n width,\n header,\n footer,\n type,\n placeholder,\n value,\n onChange,\n top,\n required,\n minLength,\n}) {\n return (\n \n {header && {header}}\n \n {footer && {footer}}\n \n );\n}\n\nexport function AddressInput({\n header,\n footer,\n top,\n address1Value,\n address1OnChange,\n address2Value,\n address2OnChange,\n cityValue,\n cityOnChange,\n stateValue,\n stateOnChange,\n zipValue,\n zipOnChange,\n}) {\n return (\n \n {header && {header}}\n \n \n \n \n \n \n \n \n \n {footer && {footer}}\n \n );\n}\n\nexport function PhoneNumberInput({\n height,\n width,\n header,\n footer,\n type,\n placeholder,\n placeholderColor,\n value,\n onChange,\n top,\n required,\n xsWidth,\n xsHeight,\n}) {\n return (\n \n {header && {header}}\n \n {footer && {footer}}\n \n );\n}\n\nexport function MoneyInput({\n height,\n width,\n header,\n footer,\n type,\n placeholder,\n value,\n onChange,\n top,\n required,\n}) {\n return (\n \n {header && {header}}\n \n {footer && {footer}}\n \n );\n}\n\nexport function TimeLimitDayInput({\n height,\n width,\n header,\n footer,\n type,\n placeholder,\n value,\n onChange,\n top,\n required,\n}) {\n return (\n \n {header && {header}}\n \n {footer && {footer}}\n \n );\n}\n","import React, { Component } from \"react\";\nimport styled from \"styled-components\";\nimport colors from \"../styles/colors\";\n\nconst Container = styled.div`\n margin: ${(props) => props.margin};\n`;\n\nconst Input = styled.input`\n border: 2px solid ${colors.grey5};\n height: ${(props) => props.height || \"70px\"};\n width: ${(props) => props.width || \"50px\"};\n border-radius: 5px;\n background-color: white;\n transition: all 0.1s;\n margin-right: 10px;\n outline: 0px;\n font-size: 24px;\n text-align: center;\n padding: 0px;\n box-shadow: none;\n -moz-appearance: textfield;\n @media (max-width: 320px) {\n width: 25px;\n }\n @media (min-width: 425px) and (max-width: 1024px) {\n width: ${(props) => props.xsWidth || \"35px\"};\n }\n &:focus {\n border: 2px solid ${colors.purple};\n }\n`;\n\nexport default class CodeInputBoxes extends Component {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = {\n length: 4,\n onChange: () => {},\n onComplete: () => {},\n };\n\n constructor(params) {\n super(params);\n this.state = {\n value: new Array(this.props.length).fill(\"\"),\n lastValue: new Array(this.props.length).fill(\"\"),\n };\n\n this.inputs = [];\n }\n\n onChange(valueAt, index) {\n const currentValue = [...this.state.value];\n const currentValueSaved = currentValue;\n\n // Single Character Press\n if (valueAt.length === 1) {\n currentValue[index] = valueAt;\n this.setState({\n value: currentValue,\n lastValue: currentValueSaved,\n });\n if (this.inputs[index + 1]) {\n this.inputs[index + 1].focus();\n }\n } else if (valueAt.length === this.props.length) {\n //code pasted\n this.setState({\n value: valueAt.split(\"\"),\n lastValue: currentValue,\n });\n this.props.onChange(valueAt);\n this.props.onComplete(valueAt);\n if (this.inputs[index + 1]) {\n this.inputs[index + 1].focus();\n }\n } else if (valueAt.length > 0 && valueAt.length < this.props.length) {\n // More than 1 character, less than the total number required\n this.onChange(valueAt.charAt(valueAt.length - 1), index);\n }\n\n if (index + 1 === this.props.length) {\n this.props.onComplete(currentValue.join(\"\"));\n }\n }\n\n renderInput(index) {\n const value = this.state.value[index];\n return (\n (this.inputs[index] = ref)}\n onChange={(event) => this.onChange(event.target.value, index)}\n onKeyDown={(event) => {\n if (event.keyCode === 8 || event.keyCode === 46) {\n // handle backspace or delete\n event.preventDefault();\n const currentValue = [...this.state.value];\n const currentValueSaved = currentValue;\n currentValue[index] = \"\";\n this.setState({\n value: currentValue,\n lastValue: currentValueSaved,\n });\n if (index !== 0) {\n this.inputs[index - 1].focus();\n }\n } else if (event.keyCode === 37) {\n // navigate left with left arrow key\n event.preventDefault();\n if (index !== 0) {\n this.inputs[index - 1].focus();\n }\n } else if (event.keyCode === 39) {\n // navigate right with right arrow key\n event.preventDefault();\n if (index !== this.state.value.length - 1) {\n this.inputs[index + 1].focus();\n }\n } else if (\n // prohibit weird edge behavior when up, down, +, or - are pressed\n event.keyCode === 38 ||\n event.keyCode === 40 ||\n event.keyCode === 107 ||\n event.keyCode === 109\n ) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n\n render() {\n return (\n \n {this.state.value.map((_, index) => {\n return this.renderInput(index);\n })}\n \n );\n }\n}\n","/* eslint-disable import/no-duplicates */\nimport { faAngleDown as AngleDownRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faCogs as CogsRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faUsdSquare as DollarSquareRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faEnvelopeOpenText as EnvelopeOpenRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faHome as HomeRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faFileImport as ImportRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faPlus as PlusRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faSearch as SearchRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faTag as TagRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faUsers as UsersRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faArrowLeft as LeftArrow } from '@fortawesome/pro-regular-svg-icons';\nimport { faArrowRight as RightArrow } from '@fortawesome/pro-regular-svg-icons';\nimport { faCheckCircle as CheckCircleSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faHistory as HistorySolid } from '@fortawesome/free-solid-svg-icons';\nimport { faLink as LinkSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faBars as MenuSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faMobileAlt as MobileSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faPaperPlane as PaperPlaneSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faTimesCircle as TimesCircleSolid } from '@fortawesome/free-solid-svg-icons';\nimport { faCommentAltDots as CommentSolid } from '@fortawesome/pro-solid-svg-icons';\nimport { faUsdSquare as DollarSquareSolid } from '@fortawesome/pro-solid-svg-icons';\nimport { faPaperPlane as PaperPlaneRegular } from '@fortawesome/free-regular-svg-icons';\nimport { faSignOut as SignOut } from '@fortawesome/pro-regular-svg-icons';\nimport { faUpload as UploadRegular } from '@fortawesome/pro-regular-svg-icons';\nimport { faExclamationTriangle as Warning } from '@fortawesome/free-solid-svg-icons';\nimport { faDollarSign as DollarSign } from '@fortawesome/pro-regular-svg-icons';\n\nexport const IconEnum = {\n RightArrow,\n UploadRegular,\n AngleDownRegular,\n CogsRegular,\n DollarSquareRegular,\n EnvelopeOpenRegular,\n HomeRegular,\n ImportRegular,\n PlusRegular,\n SearchRegular,\n TagRegular,\n UsersRegular,\n LeftArrow,\n CheckCircleSolid,\n HistorySolid,\n LinkSolid,\n MenuSolid,\n MobileSolid,\n PaperPlaneSolid,\n TimesCircleSolid,\n CommentSolid,\n DollarSquareSolid,\n PaperPlaneRegular,\n SignOut,\n Warning,\n DollarSign\n};\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport colors from '../styles/colors';\nimport { IconEnum } from './Icons';\n\nexport const Icons = IconEnum;\n\nexport default function Icon({\n icon = Icons.TagRegular,\n onClick = null,\n size = 25,\n top,\n left,\n right,\n position = 'relative',\n zIndex,\n active,\n activeColor = colors.seaGreen,\n inactiveColor = colors.grey3,\n margin,\n}) {\n const color = active ? activeColor : inactiveColor;\n const cursor = onClick ? 'pointer' : null;\n return (\n \n );\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport colors from '../styles/colors';\nimport Icon from './Icon';\nimport { IconEnum as Icons } from './Icons';\n\nconst ErrorContainer = styled.div`\n color: ${colors.grey1};\n margin: ${(props) => props.margin || '0px'};\n text-align: center;\n align-items: center;\n font-size: 1.2rem;\n position: absolute;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n`;\n\nexport default function Error({ error, margin }) {\n return (\n \n \n {error}\n \n );\n}\n","// /////////////////////////////////////////////////////////////////////////////////////////////////////////////\n//\n// NPECheck\n//\n// Usage: NPECheck(param1, param2, param3)\n// param1 = the JS object being used as a hashmap\n// param2 = the nested property value path in JSON pointer syntax, https://tools.ietf.org/html/rfc6901\n// param3 = a message to display if the property does not exist or the property value is\n// null, undefined, or empty string.\n//\n// Example in JSX:\n//\n// return ({ NPECheck(this.props.dockerImage, \"layers/count\", \"Not specified\") });\n//\n// /////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nexport default function (object, nestedProps, substitute = 'Not specified') {\n if (!object) return null;\n const nested = nestedProps.split('/');\n let val = object;\n\n while (nested.length > 0) {\n const prop = nested.shift();\n if (!val[prop] && val[prop] !== 0) {\n return substitute;\n }\n val = val[prop];\n }\n\n if (!val && val !== 0) {\n return substitute;\n }\n return val;\n}\n","import NPECheck from './NPECheck';\n\nexport function getErrorMessage(error) {\n if (!error) return null;\n\n let errorMsg = NPECheck(error, 'graphQLErrors/0/message', null);\n if (errorMsg) return errorMsg;\n\n errorMsg = NPECheck(error, 'networkError/result/errors/0/message', null);\n if (errorMsg) return errorMsg;\n}\n\nexport function getJoiErrors(error) {\n if (!error) return null;\n const errorMsg = NPECheck(error, 'graphQLErrors/0/extensions/exception/invalidArgs', null);\n if (errorMsg) return errorMsg;\n}\n","import React, { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport { useHistory } from \"react-router-dom\";\nimport colors from \"../styles/colors\";\nimport Loader from \"./Loader\";\nimport Button from \"./Button\";\nimport { PhoneNumberInput } from \"./Input\";\nimport CodeInputBoxes from \"./CodeInputBoxes\";\nimport Error from \"./Error\";\nimport { getErrorMessage } from \"../util/ErrorUtil\";\nimport { SEND_PHONE_CODE, VERIFY_PHONE_CODE } from \"../graphql/queries\";\nimport Logo from \"../assets/images/cto-full-logo.png\";\n\nconst LoaderContainer = styled.div`\n\tmin-height: 95vh;\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n`;\n\nconst Container = styled.form`\n\toverflow-y: scroll;\n\t-ms-overflow-style: none;\n\tscrollbar-width: none;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tmax-height: 95vh;\n\tmin-height: 95vh;\n\tposition: relative;\n\t@media screen and (max-height: 480px) {\n\t\tmax-height: 92vh;\n\t\tmin-height: 92vh;\n\t\tpadding-bottom: unset;\n\t} ;\n`;\n\nconst BodyText = styled.div`\n\tmargin-top: 15px;\n\tmargin-bottom: 15px;\n\tfont-weight: 600;\n\tfont-size: 1.8rem;\n\tcolor: ${colors.grey1};\n\tmax-height: 70vh;\n\toverflow-y: auto;\n`;\n\nconst BottomText = styled.div`\n\tmargin-top: 15px;\n\tmargin-bottom: 15px;\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n\tcolor: ${colors.grey4};\n`;\n\nconst CodeText = styled.div`\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n\tcolor: ${colors.grey2};\n\tmargin: 30px 0px 15px 0px;\n`;\n\nconst Body = styled.div`\n\tmargin: 0 15px 10px 15px;\n\tpadding-bottom: 60px;\n\toverflow-y: auto;\n\tposition: relative;\n`;\n\nconst LogoContainer = styled.div`\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-bottom: 40px;\n\tmargin-top: 40px;\n`;\n\nconst LogoImg = styled.img`\n\twidth: 120px;\n`;\n\nconst ButtonContainer = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-around;\n\twidth: 100%;\n z-index:10;\n\tflex-direction: row;\n\tposition: absolute;\n\tbackground-color: ${colors.white};\n\tbottom: 0px;\n\talign-items: center;\n\tmax-width: 768px;\n\n\t@media screen and (max-width: 768px) {\n\t\tmin-height: 70px;\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\t@media screen and (max-width: 1024px) {\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\n\t@media screen and (max-width: 450px) {\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tbottom: 0px;\n\t\tbackground: ${colors.white};\n\t\theight: max-content;\n\t} ;\n`;\n\nexport default function Home() {\n\tconst history = useHistory();\n\tconst [phoneNumber, setPhoneNumber] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [codeInputIsVisible, setCodeInputIsVisible] = useState(false);\n\tconst [sendPhoneCode, { loading }] = useMutation(SEND_PHONE_CODE, {\n\t\tvariables: {\n\t\t\tphoneNumber,\n\t\t},\n\t\tonCompleted(data) {\n\t\t\tsetCodeInputIsVisible(true);\n\t\t},\n\t\tonError(error) {\n\t\t\tsetError(getErrorMessage(error));\n\t\t\tconsole.log(error);\n\t\t},\n\t});\n\tconst [verifyPhoneCode, { loading: verifyLoading }] = useMutation(\n\t\tVERIFY_PHONE_CODE,\n\t\t{\n\t\t\tasync onCompleted(data) {\n\t\t\t\tif (data.verifyPhoneCode.token) {\n\t\t\t\t\tif (error) setError(\"\");\n\t\t\t\t\tlocalStorage.setItem(\n\t\t\t\t\t\t\"CHECK_THIS_OUT_AUTH_TOKEN\",\n\t\t\t\t\t\tdata.verifyPhoneCode.token,\n\t\t\t\t\t);\n\t\t\t\t\thistory.push(\"/organizations\");\n\t\t\t\t} else {\n\t\t\t\t\tsetError(\"There was an error. Please contact support.\");\n\t\t\t\t}\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tsetError(getErrorMessage(error));\n\t\t\t\tconsole.log(error);\n\t\t\t},\n\t\t},\n\t);\n\n\t// not 100% sure why organization return null on 1st render\n\tif (verifyLoading) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t {\n\t\t\t\te.preventDefault();\n\t\t\t\tsendPhoneCode();\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tPlease enter your phone number to check your current balance!\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tsetPhoneNumber(e.target.value);\n\t\t\t\t\t\tif (codeInputIsVisible) {\n\t\t\t\t\t\t\tsetCodeInputIsVisible(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (error) setError(\"\");\n\t\t\t\t\t}}\n\t\t\t\t\twidth=\"calc(100% - 35px)\"\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\tDon't have an account yet? You must be referred in order to login\n\t\t\t\t\tto Check This Out.\n\t\t\t\t\n\t\t\t\t{codeInputIsVisible && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWe just sent a 4-digit code to your mobile phone, please\n\t\t\t\t\t\t\tenter it below.\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tif (error) setError(\"\");\n\t\t\t\t\t\t\t\tverifyPhoneCode({\n\t\t\t\t\t\t\t\t\tvariables: {\n\t\t\t\t\t\t\t\t\t\tphoneNumber,\n\t\t\t\t\t\t\t\t\t\tphoneCode,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{error && (\n\t\t\t\t\t\n\t\t\t\t\t\t{error}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\n\t\t\t{!codeInputIsVisible && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport colors from '../styles/colors';\n\nconst Logo = styled.div`\n height: 100px;\n width: 100px;\n min-width: 100px;\n border-radius: 50%;\n margin-right: 15px;\n border: 1px solid ${colors.grey5};\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n background-color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n`;\n\nconst ImageContainer = styled.img`\n width: 100%;\n height: auto;\n`;\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n position: relative;\n overflow: hidden;\n width: 100% !important;\n`;\n\nconst InfoContainer = styled.div`\nwidth: 100% !important;\n > div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n /* max-width: calc(100% - 145px); */\n }\n`;\n\nconst Name = styled.div`\n color: ${colors.white};\n font-weight: 600;\n font-size: 1.8rem;\n`;\n\n/* const Logout = styled.div`\n color: ${colors.white};\n font-weight: 500;\n font-size: 1.6rem;\n margin-left: auto;\n display: inline-block;\n width:200px;\n cursor: pointer;\n`;\n */\nconst Address = styled.div`\n color: ${colors.grey6};\n font-weight: 500;\n font-size: 1.4rem;\n`;\n\nexport default function BusinessPreview({ organization }) {\n\n if (!organization) {\n return null;\n }\n\n const address = `${organization.address.city}, ${organization.address.state}`;\n return (\n \n \n \n \n \n \n {organization.name}\n \n
\n {address}\n
\n
\n {/* {\n\n localStorage.removeItem(\"CHECK_THIS_OUT_AUTH_TOKEN\");\n history.push('/home')\n }}>\n {localStorage.CHECK_THIS_OUT_AUTH_TOKEN ? 'Logout':'Login'}\n */}\n
\n );\n}\n","export const output = (price, withFixed = false) => {\n if (price.toString().split('')[price.length - 1] === '.') {\n return price;\n }\n\n if (withFixed) {\n price /= 100;\n return price.toFixed(2);\n }\n\n return price / 100;\n};\n\nexport const convertToCents = (dollarAmount) => {\n return Math.round(dollarAmount * 100);\n};\n","export const originalSources = Object.freeze({\n ORG: \"ORG\",\n SELF: \"SELF\",\n REF: \"REF\",\n SMS: \"SMS\",\n MODAL: \"MODAL\",\n });","import { createContext } from 'react';\n\nexport const AppContext = createContext(null);\n","const CouponParentTypes = Object.freeze({\n Referred: 'Referred',\n Affiliate: 'Affiliate',\n});\n\nexport default CouponParentTypes;\n","import React, { useContext, useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { useHistory } from \"react-router-dom\";\nimport url from \"url\";\nimport colors from \"../styles/colors\";\nimport Button from \"./Button\";\nimport BusinessPreview from \"./BusinessPreview\";\nimport * as Price from \"../util/Price\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport { PhoneNumberInput } from \"./Input\";\nimport CodeInputBoxes from \"./CodeInputBoxes\";\nimport Error from \"./Error\";\nimport { originalSources } from \"../util/contactConstants\";\nimport {\n CREATE_COUPON,\n CREATE_REFERENCE,\n SEND_PHONE_CODE,\n UPDATE_REF_CLICK_COUNT,\n VERIFY_PHONE_CODE,\n} from \"../graphql/queries\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport { getErrorMessage } from \"../util/ErrorUtil\";\nimport { AppContext } from \"../context/AppContext\";\nimport CouponParentTypes from \"../util/CouponParentTypes\";\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.div`\n overflow-y: scroll;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n display: flex;\n flex-direction: column;\n width: 100%;\n background: ${colors.bg};\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst CodeText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.grey2};\n margin: 30px 0px 15px 0px;\n`;\n\nconst Image = styled.div`\n background-image: ${(props) =>\n `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 200px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 2.4rem;\n font-weight: bold;\n color: ${colors.grey1};\n line-height: 140%;\n margin-bottom: 15px;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.8rem;\n line-height: 140%;\n color: ${colors.grey2};\n margin-bottom: 15px;\n`;\n\nconst Body = styled.div`\n flex: 1;\n margin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nconst TOS = styled.div`\n color: ${colors.grey3};\n margin: 25px 15px 10px 15px;\n text-align: center;\n`;\n\nconst TOSLink = styled.a`\n color: ${colors.seaGreen};\n`;\n\n/**\n * This function handles invites from both an organization\n * and a referrer\n */\nfunction Invite() {\n const history = useHistory();\n const { organization } = useContext(OrganizationContext);\n const { setApp } = useContext(AppContext);\n const {\n query: { ref },\n } = url.parse(window.location.toString(), true);\n const [phoneNumber, setPhoneNumber] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [codeInputIsVisible, setCodeInputIsVisible] = useState(false);\n const [originalSource, setOriginalSource] = useState(originalSources.ORG);\n const { query } = url.parse(window.location.toString(), true);\n\n useEffect(() => {\n function updateOriginalSource() {\n if (query.ref) {\n setOriginalSource(originalSources.REF);\n } else if (query.orgId) {\n setOriginalSource(originalSources.ORG);\n } else if (query.o) {\n setOriginalSource(originalSources.SMS);\n }\n }\n updateOriginalSource();\n }, [query]);\n\n const [sendPhoneCode, { loading }] = useMutation(SEND_PHONE_CODE, {\n variables: {\n organizationId: organization?._id,\n phoneNumber,\n originalSource,\n },\n onCompleted(data) {\n setCodeInputIsVisible(true);\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n });\n const [createReference, { loading: refLoading }] = useMutation(\n CREATE_REFERENCE,\n {\n async onCompleted(data) {\n history.push(`/inviteFriends/?orgId=${organization?._id}`);\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n }\n );\n\n const [createCoupon, { loading: couponLoading }] = useMutation(\n CREATE_COUPON,\n {\n async onCompleted(data) {\n await createReference({\n variables: {\n organizationId: organization?._id,\n },\n });\n },\n onError(error) {\n setApp({ error: getErrorMessage(error) });\n history.push(`/inviteError/?orgId=${organization?._id}`);\n console.log(error);\n },\n }\n );\n\n const [verifyPhoneCode, { loading: verifyLoading }] = useMutation(\n VERIFY_PHONE_CODE,\n {\n async onCompleted(data) {\n if (data.verifyPhoneCode.token) {\n localStorage.setItem(\n \"CHECK_THIS_OUT_AUTH_TOKEN\",\n data.verifyPhoneCode.token\n );\n\n if (ref) {\n await createCoupon({\n variables: {\n referenceId: ref,\n couponParentType: CouponParentTypes.Referred,\n },\n });\n } else {\n await createReference({\n variables: {\n organizationId: organization._id,\n },\n });\n }\n } else {\n setError(\"There was an error. Please contact support.\");\n }\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n }\n );\n\n const [updateClickCount] = useMutation(UPDATE_REF_CLICK_COUNT, {\n variables: {\n referenceId: ref,\n },\n });\n\n useEffect(() => {\n if (ref) updateClickCount();\n }, []); // eslint-disable-line\n\n // not 100% sure why organization return null on 1st render\n if (!organization || refLoading || verifyLoading || couponLoading) {\n return (\n \n \n \n );\n }\n const c = organization.configurations;\n\n const first = Price.output(c.firstTimeRecipientCredit, true);\n const repeat = Price.output(c.repeatRecipientCredit, true);\n const affiliate = Price.output(c.affiliateCredit, true);\n\n return (\n \n \n
\n \n \n \n \n
\n \n \n {ref\n ? `Your friend is sending you a cash gift to ${organization.name}`\n : first === repeat\n ? `Send $${first}\n to a friend and\n get $${affiliate}\n for yourself when they redeem their discount.`\n : `Send a discount to a friend and get $${affiliate} for yourself. Enter your phone number below to get started.`}\n \n \n {ref\n ? \"Hit the button below to verify your phone number and accept your discount.\"\n : `You and your friend will earn a discount $${affiliate} to ${organization.name} for every single customer you refer. No limits on the number of invitations. Referral credits can be combined and credits don’t expire.`}\n \n \n\n \n Please enter your phone number. We need it to verify who you are\n \n\n {\n setPhoneNumber(e.target.value);\n if (codeInputIsVisible) {\n setCodeInputIsVisible(false);\n }\n if (error) setError(\"\");\n }}\n width=\"calc(100% - 30px)\"\n required\n />\n\n {codeInputIsVisible && (\n <>\n \n We just sent a 4-digit code to your mobile phone, please enter\n it below.\n \n {\n if (error) setError(\"\");\n verifyPhoneCode({\n variables: {\n phoneNumber,\n phoneCode,\n organizationId: organization?._id,\n },\n });\n }}\n />\n \n )}\n {error && (\n \n {error}\n \n )}\n \n \n By using Check This Out, you agree to the  \n \n Terms of Use and Privacy Policy\n \n \n {!codeInputIsVisible && (\n sendPhoneCode()}\n />\n )}\n
\n
\n );\n}\n\nexport default Invite;\n","import React, { useContext, useState } from 'react';\nimport { useMutation } from '@apollo/react-hooks';\nimport styled from 'styled-components';\nimport { useHistory } from 'react-router-dom';\nimport colors from '../styles/colors';\nimport Button from './Button';\nimport BusinessPreview from './BusinessPreview';\nimport { PhoneNumberInput } from './Input';\nimport { OrganizationContext } from '../context/OrganizationContext';\nimport Loader from './Loader';\nimport { SEND_PHONE_CODE, VERIFY_PHONE_CODE, CREATE_REFERENCE } from '../graphql/queries';\nimport CodeInputBoxes from './CodeInputBoxes';\nimport Error from './Error';\nimport { getErrorMessage } from '../util/ErrorUtil';\nimport {originalSources} from '../util/contactConstants'\nimport { useEffect } from 'react';\nimport url from \"url\";\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.form`\n overflow-y: scroll;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n background: ${colors.bg};\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst Image = styled.div`\n background-image: ${(props) => `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 120px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 1.8rem;\n font-weight: bold;\n color: ${colors.grey1};\n margin-bottom: 5px;\n line-height: 140%;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.grey2};\n margin-bottom: 15px;\n line-height: 140%;\n`;\n\nconst CodeText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.grey2};\n margin: 30px 0px 15px 0px;\n`;\n\nconst Body = styled.div`\n flex: 1;\n margin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nfunction PhoneInput() {\n const history = useHistory();\n const { organization } = useContext(OrganizationContext);\n const [phoneNumber, setPhoneNumber] = useState('');\n const [error, setError] = useState('');\n const [codeInputIsVisible, setCodeInputIsVisible] = useState(false);\n const [originalSource, setOriginalSource] = useState(originalSources.ORG)\n const { query } = url.parse(window.location.toString(), true);\n \n useEffect(() => {\n function updateOriginalSource(){\n if (query.ref) {\n setOriginalSource(originalSources.REF);\n } else if (query.orgId) {\n setOriginalSource(originalSources.ORG);\n } else if (query.o) {\n setOriginalSource(originalSources.SMS);\n }\n }\n updateOriginalSource()\n }, [query]);\n\n \n\n const [sendPhoneCode, { loading }] = useMutation(SEND_PHONE_CODE, {\n variables: {\n organizationId: organization._id,\n phoneNumber,\n originalSource\n \n },\n onCompleted(data) {\n setCodeInputIsVisible(true);\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n });\n const [createReference, { loading: refLoading }] = useMutation(CREATE_REFERENCE, {\n async onCompleted(data) {\n history.push(`/inviteFriends/?orgId=${organization._id}`);\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n });\n const [verifyPhoneCode, { loading: verifyLoading }] = useMutation(VERIFY_PHONE_CODE, {\n async onCompleted(data) {\n if (data.verifyPhoneCode.token) {\n localStorage.setItem('CHECK_THIS_OUT_AUTH_TOKEN', data.verifyPhoneCode.token);\n await createReference({\n variables: {\n organizationId: organization._id,\n \n },\n });\n } else {\n setError('There was an error. Please contact support.');\n }\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n });\n\n // not 100% sure why organization return null on 1st render\n if (!organization || refLoading || verifyLoading) {\n return (\n \n \n \n );\n }\n\n return (\n \n {\n e.preventDefault();\n sendPhoneCode();\n }}\n >\n
\n \n \n \n \n
\n \n \n Please enter your phone number\n \n \n We need it to verify who you are\n \n {\n setPhoneNumber(e.target.value);\n if (codeInputIsVisible) {\n setCodeInputIsVisible(false);\n }\n if (error) setError('');\n }}\n width=\"calc(100% - 30px)\"\n required\n />\n {codeInputIsVisible\n && (\n <>\n \n We just sent a 4-digit code to your mobile phone, please enter it below.\n \n {\n if (error) setError('');\n verifyPhoneCode({\n variables: {\n phoneNumber,\n phoneCode,\n organizationId: organization._id,\n \n },\n });\n }}\n />\n \n )}\n {error && (\n \n {error}\n \n )}\n \n {!codeInputIsVisible && (\n \n )}\n \n
\n );\n}\n\nexport default PhoneInput;\n","import React, { useContext, useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { useHistory } from \"react-router-dom\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport ReactTooltip from \"react-tooltip\";\nimport colors from \"../styles/colors\";\nimport * as Price from \"../util/Price\";\nimport BusinessPreview from \"./BusinessPreview\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport { Flex } from \"./Flex\";\nimport Icon from \"./Icon\";\nimport { IconEnum as Icons } from \"./Icons\";\nimport { GET_ACTIVE_COUPONS, GET_REFERENCE } from \"../graphql/queries\";\nimport Button from \"./Button\";\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.div`\n overflow-y: auto;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n width: 100%;\n background: ${colors.bg};\n padding-bottom: 40px;\n /* box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05); */\n /* min-height: 75vw; */\n /* @media screen and (max-width: 450px) {\n padding-bottom: unset;\n } */\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst InnerContainer = styled.div`\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n background: ${colors.bg};\n /* box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05); */\n @media screen and (max-width: 450px) {\n max-height: 70vh;\n min-height: 70vh;\n padding-bottom: unset;\n }\n @media screen and (max-height: 480px) and (max-width: 450px) {\n padding-bottom: 200px;\n }\n`;\n\nconst Image = styled.div`\n background-image: ${(props) =>\n `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 120px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 1.8rem;\n color: ${colors.grey1};\n margin-bottom: 15px;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.grey2};\n`;\n\nconst Body = styled.div`\n padding: 20px 20px 100px 20px;\n text-align: center;\n background: ${colors.white};\n\n @media screen and (orientation: portrait) {\n /* padding: unset;\n max-height: 40vh;\n min-height: 40vh;\n overflow: auto; */\n padding: 20px 20px 250px 20px;\n }\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst IconContainer = styled.div`\n background: ${colors.seaGreen};\n height: 40px;\n width: 40px;\n min-width: 40px;\n border-radius: 10px;\n margin-right: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst IconContainerGrey = styled.div`\n background: ${colors.grey3};\n height: 40px;\n width: 40px;\n min-width: 40px;\n border-radius: 10px;\n margin-right: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Selection = styled.div`\n width: fit-content;\n margin-top: 50px;\n cursor: pointer;\n width: 100%;\n`;\n\nconst TextContainer = styled.div`\n text-align: left;\n display: flex;\n width: 60%;\n flex-direction: column;\n justify-content: center;\n`;\n\nconst SelectionTitle = styled.div`\n font-size: 1.4rem;\n color: ${colors.grey1};\n font-weight: bold;\n`;\n\nconst SelectionSubtitle = styled.div`\n margin-top: 5px;\n font-weight: 600;\n font-size: 1.4rem;\n color: ${colors.grey3};\n word-break: break-word;\n margin-right: 20px;\n`;\n\nconst BackButton = styled.div`\n background: rgba(0, 0, 0, 0.8);\n border-radius: 10px;\n color: ${colors.white};\n font-size: 1.4rem;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 5px 15px;\n margin: 5px;\n cursor: pointer;\n`;\n\nconst TopButtonContainer = styled.div`\n position: absolute;\n height: fit-content;\n width: 100%;\n top: 0px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n justify-content: space-around;\n width: 100%;\n flex-direction: row;\n position: fixed;\n background-color: ${colors.white};\n bottom: 0px;\n height: 75px;\n /* bottom: 32px; */\n align-items: center;\n max-width: 768px;\n\n @media screen and (max-width: 768px) and (max-height: 480px) {\n height: 75px;\n bottom: 0px;\n align-items: center;\n }\n @media screen and (max-width: 1024px) and (max-height: 480px) {\n height: 75px;\n bottom: 0px;\n align-items: center;\n }\n\n @media screen and (max-width: 450px) {\n flex-direction: column;\n align-items: center;\n bottom: 0px;\n background: ${colors.white};\n height: max-content;\n }\n @media screen and (max-height: 480px) and (max-width: 450px) {\n bottom: 0px;\n padding-bottom: 20px;\n height: 8vh;\n }\n @media screen and (max-height: 480px) and (max-width: 320px) {\n height: 75px;\n } ;\n`;\n\n// looks hacky but is a more browser compatible way of copying text\n// as opposed to navigator.clipboard.writeText()\nfunction copyToClipboard(text) {\n const dummy = document.createElement(\"textarea\");\n document.body.appendChild(dummy);\n dummy.value = text;\n dummy.select();\n document.execCommand(\"copy\");\n document.body.removeChild(dummy);\n}\n\nfunction InviteFriends() {\n const history = useHistory();\n const [tooltipRef, setTooltipRef] = useState(null);\n const { organization } = useContext(OrganizationContext);\n // TODO: refactor and clean up\n const { data: coupData, loading: coupLoading } = useQuery(\n GET_ACTIVE_COUPONS,\n {\n variables: {\n organizationId: organization?._id,\n },\n }\n );\n\n const { data, loading } = useQuery(GET_REFERENCE, {\n variables: {\n organizationId: organization?._id,\n },\n });\n\n if (!organization || loading || coupLoading) {\n return (\n \n \n \n );\n }\n const isIOS =\n navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\n const inviteLink = data?.getReference?._id\n ? `${window.location.origin}/user/invite/?ref=${data?.getReference?._id}`\n : \"\";\n const c = organization?.configurations;\n // const e = expireData?.getCouponExpiration;\n const first = Price.output(c?.firstTimeRecipientCredit, true);\n const repeat = Price.output(c?.repeatRecipientCredit, true);\n const affiliate = Price.output(c?.affiliateCredit, true);\n\n // issue with & (and potentially others) being a delimiter and truncating text when injecting into native texting apps\n const presetMessage = `Hi, I had a great experience at ${organization.name} and I think you should check it out too. Redeem this discount for up to $${first} when you make a purchase at ${organization.name}, we'll both get a discount! Click here to activate your discount: ${inviteLink}`;\n\n return (\n \n \n
\n \n \n history.push(\"/organizations\")}>\n \n
GO BACK
\n
\n {/* {coupData?.activeCoupons?.length > 0 && (\n \n \n\n {\n \n history.push(`/discounts/?orgId=${organization._id}`)\n }\n >\n Discounts!\n
\n }\n \n )} */}\n \n \n \n \n \n \n {inviteLink && (\n \n Invite Friends\n\n \n {first === repeat\n ? `Send friends $${first} and earn $${affiliate}\n when they redeem their discounts at ${organization.name}`\n : `Send friends $${first} if they haven't been to ${organization.name} or\n $${repeat} if they have and earn $${affiliate}\n when they redeem their discount. Discount redemption is limited to one per table.`}\n \n <>\n {\" \"}\n \n \n \n \n \n \n \n \n \n \n \n \n {\n copyToClipboard(inviteLink);\n ReactTooltip.show(tooltipRef);\n setTimeout(() => {\n ReactTooltip.hide(tooltipRef);\n }, 3000);\n }}\n >\n \n \n \n \n \n Copy your Invite Link\n {inviteLink}\n \n \n \n {coupData?.activeCoupons?.length > 0 && (\n history.push(`/discounts/?orgId=${organization?._id}`)}>\n \n \n \n \n \n \n \n \n \n )}\n \n \n )}\n \n \n {(c?.websiteUrl || c?.reservationUrl) && (\n \n {c?.reservationUrl && (\n \n window.open(\n c.shortReservationUrl || c?.reservationUrl,\n \"_blank\"\n )\n }\n width=\"40%\"\n xsWidth=\"70%\"\n xsHeight=\"35px\"\n />\n )}\n {c?.websiteUrl && (\n \n window.open(c.shortWebsiteUrl || c?.websiteUrl, \"_blank\")\n }\n xsWidth=\"70%\"\n xsHeight=\"35px\"\n />\n )}\n \n )}\n \n\n \n );\n}\n\nexport default InviteFriends;\n","import React, { useContext, useState } from \"react\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport styled from \"styled-components\";\nimport { useHistory } from \"react-router-dom\";\nimport url from \"url\";\nimport colors from \"../styles/colors\";\nimport Button from \"./Button\";\nimport BusinessPreview from \"./BusinessPreview\";\nimport { PhoneNumberInput } from \"./Input\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport {\n\tSEND_PHONE_CODE,\n\tVERIFY_PHONE_CODE,\n\tCREATE_REFERENCE,\n\tCREATE_COUPON,\n} from \"../graphql/queries\";\nimport CodeInputBoxes from \"./CodeInputBoxes\";\nimport Error from \"./Error\";\nimport { getErrorMessage } from \"../util/ErrorUtil\";\nimport CouponParentTypes from \"../util/CouponParentTypes\";\nimport { AppContext } from \"../context/AppContext\";\nimport { originalSources } from \"../util/contactConstants\";\n\nconst LoaderContainer = styled.div`\n\tmin-height: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n`;\n\nconst Container = styled.div`\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\t-ms-overflow-style: none;\n\tscrollbar-width: none;\n\tmin-height: 80vh;\n\twidth: 100%;\n\tpadding-bottom: 100px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tbackground: ${colors.bg};\n\tposition: relative;\n`;\n\nconst Header = styled.div`\n\tposition: relative;\n\tbackground: red;\n\twidth: 100%;\n\theight: fit-content;\n\tbackground: red;\n\tbox-sizing: border-box;\n`;\n\nconst Image = styled.div`\n\tbackground-image: ${(props) =>\n\t\t`linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n\tbackground-size: cover;\n\tbackground-position: center;\n\tbackground-origin: unset;\n\theight: 120px;\n\twidth: 100%;\n`;\n\nconst HeaderText = styled.div`\n\tfont-size: 1.8rem;\n\tfont-weight: bold;\n\tcolor: ${colors.grey1};\n\tmargin-bottom: 5px;\n`;\n\nconst BodyText = styled.div`\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n\tcolor: ${colors.grey2};\n\tmargin-bottom: 15px;\n`;\n\nconst CodeText = styled.div`\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n\tcolor: ${colors.grey2};\n\tmargin: 15px 0px;\n`;\n\nconst Body = styled.div`\n\tflex: 1;\n\tmargin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n\tposition: absolute;\n\tbottom: -25px;\n\tleft: 15px;\n\twidth: 100%;\n`;\n\nconst OuterContainer = styled.form`\n\theight: 100vh;\n\twidth: 100%;\n`;\n\nconst ButtonContainer = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-around;\n\twidth: 100%;\n\tflex-direction: row;\n\tposition: absolute;\n\tbackground-color: ${colors.white};\n\tbottom: 0px;\n\tmin-height: 75px;\n\tbottom: 32px;\n\talign-items: center;\n\tmax-width: 768px;\n\n\t@media screen and (max-width: 768px) {\n\t\tmin-height: 70px;\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\t@media screen and (max-width: 1024px) {\n\t\tmin-height: 100px;\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\n\t@media screen and (max-width: 450px) {\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tbottom: 0px;\n\t\tbackground: ${colors.white};\n\t\theight: max-content;\n\t} ;\n`;\n\nfunction AcceptCoupon() {\n\tconst history = useHistory();\n\tconst { organization } = useContext(OrganizationContext);\n\tconst { setApp } = useContext(AppContext);\n\tconst [phoneNumber, setPhoneNumber] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [codeInputIsVisible, setCodeInputIsVisible] = useState(false);\n\tconst [sendPhoneCode, { loading }] = useMutation(SEND_PHONE_CODE, {\n\t\tvariables: {\n\t\t\torganizationId: organization._id,\n\t\t\tphoneNumber,\n\t\t\toriginalSource: originalSources.REF,\n\t\t},\n\t\tonCompleted(data) {\n\t\t\tsetCodeInputIsVisible(true);\n\t\t},\n\t\tonError(error) {\n\t\t\tsetError(getErrorMessage(error));\n\t\t\tconsole.log(error);\n\t\t},\n\t});\n\tconst [createReference, { loading: refLoading }] = useMutation(\n\t\tCREATE_REFERENCE,\n\t\t{\n\t\t\tasync onCompleted(data) {\n\t\t\t\thistory.push(`/inviteFriends/?orgId=${organization._id}`);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tsetError(getErrorMessage(error));\n\t\t\t\tconsole.log(error);\n\t\t\t},\n\t\t},\n\t);\n\tconst [createCoupon, { loading: couponLoading }] = useMutation(\n\t\tCREATE_COUPON,\n\t\t{\n\t\t\tasync onCompleted(data) {\n\t\t\t\tawait createReference({\n\t\t\t\t\tvariables: {\n\t\t\t\t\t\torganizationId: organization._id,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tsetApp({ error: getErrorMessage(error) });\n\t\t\t\thistory.push(`/inviteError/?orgId=${organization._id}`);\n\t\t\t\tconsole.log(error);\n\t\t\t},\n\t\t},\n\t);\n\tconst [verifyPhoneCode, { loading: verifyLoading }] = useMutation(\n\t\tVERIFY_PHONE_CODE,\n\t\t{\n\t\t\tasync onCompleted(data) {\n\t\t\t\tif (data.verifyPhoneCode.token) {\n\t\t\t\t\tlocalStorage.setItem(\n\t\t\t\t\t\t\"CHECK_THIS_OUT_AUTH_TOKEN\",\n\t\t\t\t\t\tdata.verifyPhoneCode.token,\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tconst {\n\t\t\t\t\t\tquery: { ref },\n\t\t\t\t\t} = url.parse(window.location.toString(), true);\n\t\t\t\t\tawait createCoupon({\n\t\t\t\t\t\tvariables: {\n\t\t\t\t\t\t\treferenceId: ref,\n\t\t\t\t\t\t\tcouponParentType: CouponParentTypes.Referred,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsetError(\"There was an error. Please contact support.\");\n\t\t\t\t}\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tsetError(getErrorMessage(error));\n\t\t\t\tconsole.log(error);\n\t\t\t},\n\t\t},\n\t);\n\n\t// not 100% sure why organization return null on 1st render\n\tif (!organization || refLoading || verifyLoading || couponLoading) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t {\n e.preventDefault();\n sendPhoneCode();\n }}>\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tPlease enter your phone number\n\t\t\t\t\tWe need it to verify who you are\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPhoneNumber(e.target.value);\n\t\t\t\t\t\t\tif (codeInputIsVisible) {\n\t\t\t\t\t\t\t\tsetCodeInputIsVisible(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\twidth=\"calc(100% - 30px)\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t{codeInputIsVisible && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tWe just sent a 4-digit code to your mobile phone, please\n\t\t\t\t\t\t\t\tenter it below.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tverifyPhoneCode({\n\t\t\t\t\t\t\t\t\t\tvariables: {\n\t\t\t\t\t\t\t\t\t\t\tphoneNumber,\n\t\t\t\t\t\t\t\t\t\t\tphoneCode,\n\t\t\t\t\t\t\t\t\t\t\torganizationId: organization._id,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{error && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t
\n\t\t\t{!codeInputIsVisible && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t);\n}\n\nexport default AcceptCoupon;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport colors from \"../styles/colors\";\nimport { GET_ACTIVE_COUPONS } from \"../graphql/queries\";\nimport Loader from \"./Loader\";\nimport * as Price from \"../util/Price\";\n\nconst Logo = styled.div`\n\theight: 50px;\n\twidth: 50px;\n\tborder-radius: 50%;\n\tmargin-right: 15px;\n\tborder: 1px solid ${colors.grey5};\n\tbackground-color: white;\n\tbox-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n`;\n\nconst ImageContainer = styled.img`\n\twidth: 100%;\n\theight: auto;\n`;\n\nconst Container = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: fit-content;\n\tposition: relative;\n`;\n\nconst InfoContainer = styled.div``;\n\nconst Name = styled.div`\n\tcolor: ${colors.white};\n\tfont-weight: 600;\n\tfont-size: 1.8rem;\n`;\n\nconst Address = styled.div`\n\tcolor: ${colors.grey6};\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n`;\n\nconst LoaderContainer = styled.div`\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\talign-self: center;\n\tposition: absolute;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n`;\n\nexport default function BalancePreview({ organization }) {\n\tconst { data, loading } = useQuery(GET_ACTIVE_COUPONS, {\n\t\tvariables: {\n\t\t\torganizationId: organization._id,\n\t\t},\n\t});\n\tif (!organization) {\n\t\treturn null;\n\t}\n\n\tif (loading) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{organization.name}\n\t\t\t\t
\n\t\t\t\t\t{`$${Price.output(\n\t\t\t\t\t\tdata.activeCoupons.reduce(\n\t\t\t\t\t\t\t(acc, item) => (acc += item.amount),\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t)}`}\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useQuery } from '@apollo/react-hooks';\nimport { useHistory } from 'react-router-dom';\nimport colors from '../styles/colors';\nimport Loader from './Loader';\nimport { GET_ORGANIZATION_LIST } from '../graphql/queries';\nimport BalancePreview from './BalancePreview';\nimport Logo from '../assets/images/cto-full-logo.png';\n\nconst LoaderContainer = styled.div`\n min-height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.form`\n overflow-y: scroll;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n`;\n\nconst OrgBox = styled.div`\n width: 100%;\n height: 100px;\n background-image: ${(props) => `linear-gradient(180deg, rgba(0, 0, 0, 0) -400%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n display: flex;\n align-items: center;\n cursor: pointer;\n`;\n\nconst HeaderText = styled.div`\n font-size: 1.4rem;\n color: ${colors.grey1};\n font-weight: 500;\n margin: 15px 0px;\n`;\n\nconst InfoContainer = styled.div`\n margin-left: 15px;\n`;\n\nconst LogoContainer = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 30px 0px;\n background: ${colors.grey6};\n`;\n\nconst LogoImg = styled.img`\n width: 120px;\n`;\n\nexport default function OrganizationList() {\n const history = useHistory();\n const { data, loading } = useQuery(GET_ORGANIZATION_LIST);\n\n if (loading) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n \n \n Your Discounts\n \n {(() => {\n if (data?.getOrganizationList.length > 0) {\n return data.getOrganizationList.map((org, index) => {\n return (\n history.push(`/inviteFriends/?orgId=${org._id}`)}\n src={org.posterImageUrl}\n >\n \n \n \n \n );\n });\n }\n return (\n \n You are not part of any organizations\n \n );\n })()}\n \n );\n}\n","import React, { useContext } from 'react';\nimport styled from 'styled-components';\nimport colors from '../styles/colors';\nimport BusinessPreview from './BusinessPreview';\nimport { OrganizationContext } from '../context/OrganizationContext';\nimport Loader from './Loader';\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.form`\n overflow-y: scroll;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n background: ${colors.bg};\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst Image = styled.div`\n background-image: ${(props) => `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 120px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 1.8rem;\n font-weight: bold;\n color: ${colors.grey1};\n margin-bottom: 5px;\n line-height: 140%;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.grey2};\n margin-bottom: 15px;\n line-height: 140%;\n`;\n\nconst Body = styled.div`\n flex: 1;\n margin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nexport default function Unsubscribed() {\n const { organization } = useContext(OrganizationContext);\n\n // not 100% sure why organization return null on 1st render\n if (!organization) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n
\n \n \n \n \n
\n \n \n {`${organization.name} is no longer using this service`}\n \n \n We apologize for any inconvenience this may cause\n \n \n
\n
\n );\n}\n","import React, { useContext } from 'react';\nimport styled from 'styled-components';\nimport { useHistory } from 'react-router-dom';\nimport colors from '../styles/colors';\nimport Button from './Button';\nimport BusinessPreview from './BusinessPreview';\nimport { OrganizationContext } from '../context/OrganizationContext';\nimport { AppContext } from '../context/AppContext';\nimport Loader from './Loader';\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.div`\n overflow-y: scroll;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n background: ${colors.bg};\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst Image = styled.div`\n background-image: ${(props) => `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 120px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 2.4rem;\n font-weight: bold;\n color: ${colors.grey1};\n line-height: 140%;\n margin-bottom: 15px;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.8rem;\n line-height: 140%;\n color: ${colors.grey2};\n`;\n\nconst Body = styled.div`\n flex: 1;\n margin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nfunction InviteError() {\n const history = useHistory();\n const { organization } = useContext(OrganizationContext);\n const { app } = useContext(AppContext);\n\n // not 100% sure why organization returns null on 1st render\n if (!organization) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n
\n \n \n \n \n
\n \n \n There was an error\n \n \n {app?.error || 'Please try again or contact support'}\n \n \n history.push('/organizations')}\n />\n
\n
\n );\n}\n\nexport default InviteError;\n","import { useEffect, useState } from 'react';\nimport { css } from 'styled-components';\n\nconst mediaQuery = (queryTemplate, ...queryRest) => (rulesTemplate, ...rulesRest) => css`\n @media ${css(queryTemplate, ...queryRest)} {\n ${css(rulesTemplate, ...rulesRest)}\n }\n`;\n\nconst sizes = {\n tablet: 768,\n desktop: 992,\n giant: 1170,\n};\n\nexport const mobileQueryString = `(max-width: ${(sizes.desktop - 1) / 16}em)`;\n\nexport const media = {\n handheld: mediaQuery`(max-width: ${(sizes.tablet - 1) / 16}em)`,\n tablet: mediaQuery`(min-width: ${sizes.tablet / 16}em)`,\n tabletOnly: mediaQuery`(min-width: ${sizes.tablet / 16}em) and (max-width: ${(sizes.desktop - 1) / 16}em)`,\n mobile: mediaQuery`${mobileQueryString}`,\n desktop: mediaQuery`(min-width: ${sizes.desktop / 16}em)`,\n giant: mediaQuery`(min-width: ${sizes.giant / 16}em)`,\n minWidth: (pxValue) => mediaQuery`(min-width: ${pxValue / 16}em)`,\n print: mediaQuery`print`,\n};\n\nexport const useMedia = (query) => {\n const matchQuery = window && window.matchMedia(query);\n const [isMatch, setIsMatch] = useState(matchQuery.matches);\n\n useEffect(() => {\n const handler = () => setIsMatch(matchQuery.matches);\n matchQuery.addListener(handler);\n return () => matchQuery.removeListener(handler);\n }, [query, matchQuery]);\n\n return isMatch;\n};\n\n// updated for 2 breakpoints\n// export const useMobileMedia = () => useMedia(`(max-width: ${(sizes.tablet - 1) / 16}em)`);\n\nexport const useTabletMedia = () => useMedia(`(max-width: ${(sizes.desktop - 1) / 16}em)`);\nexport const useMobileMedia = () => useMedia(`(max-width: ${(sizes.tablet - 1) / 16}em)`);\nexport const useDesktopMedia = () => useMedia(`(min-width: ${sizes.desktop / 16}em)`);\n","import React, { useContext } from \"react\";\nimport styled from \"styled-components\";\nimport colors from \"../styles/colors\";\nimport BusinessPreview from \"./BusinessPreview\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport {useMobileMedia} from '../util/MediaQuery'\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst Container = styled.div`\n overflow-y: scroll;\n overflow-x: hidden;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 90vh;\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n background: ${colors.bg};\n @media screen and (max-width: 768px) {\n min-height: 100vh;\n }\n`;\n\nconst Header = styled.div`\n position: relative;\n background: red;\n width: 100%;\n height: fit-content;\n background: red;\n box-sizing: border-box;\n`;\n\nconst Image = styled.div`\n background-image: ${(props) =>\n `linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n background-size: cover;\n background-position: center;\n background-origin: unset;\n height: 120px;\n width: 100%;\n`;\n\nconst HeaderText = styled.div`\n font-size: 2.4rem;\n font-weight: bold;\n color: ${colors.grey1};\n line-height: 140%;\n margin-bottom: 15px;\n text-align: center;\n`;\n\nconst BodyText = styled.div`\n font-weight: 500;\n font-size: 1.8rem;\n line-height: 140%;\n color: ${colors.grey2};\n text-align: center;\n\n`;\n\nconst Body = styled.div`\n flex: 1;\n margin: 40px 15px;\n`;\n\nconst BusinessPreviewContainer = styled.div`\n position: absolute;\n bottom: -25px;\n left: 15px;\n width: 100%;\n`;\n\nconst OuterContainer = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nconst TOS = styled.div`\n color: ${colors.grey3};\n margin: 25px 15px 10px 15px;\n text-align: center;\n`;\n\nconst TOSLink = styled.a`\n color: ${colors.seaGreen};\n`;\n\nconst JoinButton = styled.a`\n -webkit-appearance: none;\n cursor: pointer;\n border-radius: 5px;\n background: #27BBAD;\n width: calc(100%-30px) !important;\n padding: 5px 15px;\n margin: 0px 15px 0px 15px;\n display: flex;\n justify-content: center;\n justify-content: #FFFFFE;\n align-items: center;\n width: 60%;\n font-size: 1.4rem;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n height: 40px;\n align-self: center;\n color: white;\n font-weight: 600;\n -webkit-text-decoration: none;\n text-decoration: none;\n`;\n\nconst ButtonContainer = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-around;\n\twidth: 100%;\n\tflex-direction: row;\n\tposition: absolute;\n\tbackground-color: ${colors.white};\n\tbottom: 0px;\n\tmin-height: 7px;\n\tbottom: 32px;\n\talign-items: center;\n\tmax-width: 768px;\n\n\t@media screen and (max-width: 768px) {\n\t\tmin-height: 70px;\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\t@media screen and (max-width: 1024px) {\n\t\tmin-height: 70px;\n\t\tbottom: 0px;\n\t\talign-items: center;\n\t}\n\n\t@media screen and (max-width: 450px) {\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tbottom: 0px;\n\t\tbackground: ${colors.white};\n\t\theight: max-content;\n\t} ;\n`;\n\n/**\n * This function handles invites from both an organization\n * and a referrer\n */\n\nconst JOIN_REFERRAL_KEYWORD = 'SIGNUP';\n\nfunction JoinReferral() {\n const { organization } = useContext(OrganizationContext);\n\n const isMobile = useMobileMedia()\n\n // not 100% sure why organization returns null on 1st render\n if (!organization) {\n return (\n \n \n \n );\n }\n return (\n \n \n
\n \n \n \n \n
\n \n \n Join Referral Program\n \n \n {isMobile ?\"Tap the button below to join our referral program and then tap on send message button from you SMS application.\":`To join our referral program send \"${JOIN_REFERRAL_KEYWORD}\" from your mobile to ${organization.phoneNumber}`}\n \n \n \n By using Check This Out, you agree to the  \n \n Terms of Use and Privacy Policy\n \n \n\n \n
\n {isMobile&&\n \n \n Click here to text us!\n \n \n }\n
\n );\n}\n\nexport default JoinReferral;\n","import React, { useState, /* useEffect */ } from \"react\";\nimport styled from \"styled-components\";\nimport colors from \"../styles/colors\";\nimport * as Price from \"../util/Price\";\nimport moment from \"moment\";\n\nconst TableContainer = styled.div`\n display: flex;\n width: 100%;\n flex-direction: column;\n overflow: auto;\n &::-webkit-scrollbar {\n width: 7px;\n height: 10px;\n }\n &::-webkit-scrollbar-track {\n box-shadow: inset 0 0 5px grey;\n border-radius: 10px;\n }\n &::-webkit-scrollbar-thumb {\n background: grey;\n border-radius: 10px;\n }\n`;\n\nconst Wrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n flex-direction: column;\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);\n\n @media screen and (max-width: 450px) {\n padding: 10px;\n }\n`;\nconst Heading = styled.div`\n display: flex;\n justify-content: ${(props) => props.justify || \"space-between\"};\n align-items: ${(props) => props.a || \"center\"};\n width: 100%;\n font-size: 1.8rem;\n border-right: 1px solid ${colors.grey5};\n @media screen and (max-width: 450px) {\n flex-direction: column;\n justify-content: flex-start;\n }\n`;\n\n/* const TableItem = styled.div`\n display: flex;\n font-size: 1.2rem;\n padding: 15px 20px;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${colors.grey6};\n width: 100%;\n box-sizing: border-box;\n cursor: ${(props) => (props.onClick ? \"pointer\" : null)};\n transition: all 0.2s;\n\n &:hover {\n background: ${(props) =>\n props.onClick ? \"rgba(211, 211, 211, 0.1)\" : null};\n }\n`; */\n\nconst Row = styled.div`\n display: grid;\n grid-template-columns: 0.25fr 1fr 1fr;\n grid-template-rows: repeat(auto-fit, auto);\n background: ${(props) => props.background || colors.white};\n justify-content: center;\n position: relative;\n align-items: center;\n position: ${(props) => (props.sticky === \"1\" ? \"sticky\" : null)};\n top: ${(props) => (props.sticky === \"1\" ? \"0\" : null)};\n z-index: ${(props) => (props.sticky === \"1\" ? \"5\" : null)};\n\n @media (max-width: 450px) {\n grid-template-columns: 0.5fr 1fr 1fr;\n }\n`;\n\nconst HeadText = styled.div`\n color: ${colors.grey1};\n font-size: 1.4rem;\n font-weight: 500;\n @media screen and (max-width: 450px) {\n font-size: 1.2rem;\n }\n`;\n\nconst HeadingText = styled.div`\n display: flex;\n align-items: ${(props) => props.align || \"center\"};\n color: ${colors.grey3};\n font-size: 1.4rem;\n font-weight: 600;\n height: 40px;\n padding: 10px;\n justify-content: ${(props) => props.justify || \"center\"};\n width: 100%;\n @media screen and (max-width: 991px) {\n height: 30px;\n }\n @media screen and (max-width: 450px) {\n height: 30px;\n align-items: center;\n font-size: 1.2rem;\n }\n`;\n\nconst Column = styled.div`\n display: flex;\n width: 100%;\n flex-direction: row;\n height: 40px;\n align-items: ${(props) => props.align || \"center\"};\n justify-content: ${(props) => props.justify || \"center\"};\n border: 1px solid ${colors.grey5};\n`;\n\nconst HeaderText = styled.div`\n font-size: 1.4rem;\n color: ${colors.grey3};\n @media screen and (max-width: 450px) {\n font-size: 1.2rem;\n }\n`;\n\n\nexport default function CouponList({ activeCoupons }) {\n// const [coupons, setCoupons] = useState(activeCoupons || []);\n const [coupons] = useState(activeCoupons || []);\n\n /* useEffect(() => {\n setCoupons(activeCoupons);\n }, []); */\n\n return (\n \n \n \n Available Discount:{\" \"}\n {`$${Price.output(\n coupons.reduce((total, item) => total + parseInt(item.amount), 0),\n true\n )}`}\n \n \n \n \n \n #\n \n \n AMOUNT\n \n \n EXPIRATION DATE\n \n \n\n {coupons.map((coupon, index) => {\n const expirationTime =\n coupon.redemptionExpiration === \"Infinity\"\n ? \"Does Not Expire\"\n : moment(coupon.redemptionExpiration * 1000).format(\"MM-DD-YYYY\");\n return (\n \n \n {index + 1}\n \n \n {`$${Price.output(coupon.amount, true)}`}\n \n \n {expirationTime}\n \n \n );\n })}\n \n \n );\n}\n","import React, { useContext } from \"react\";\nimport styled from \"styled-components\";\nimport { useHistory } from \"react-router-dom\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport ReactTooltip from \"react-tooltip\";\nimport colors from \"../styles/colors\";\nimport BusinessPreview from \"./BusinessPreview\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport Icon from \"./Icon\";\nimport { IconEnum as Icons } from \"./Icons\";\nimport { GET_ACTIVE_COUPONS } from \"../graphql/queries\";\nimport CouponList from \"./CouponsList\";\n\nconst LoaderContainer = styled.div`\n\tmin-height: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n`;\n\nconst Container = styled.div`\n\toverflow-y: auto;\n\toverflow-x: hidden;\n\t-ms-overflow-style: none;\n\tscrollbar-width: none;\n\tmin-height: 100%;\n\twidth: 100%;\n\tbackground: ${colors.bg};\n\tbox-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n\t/* min-height: 75vw; */\n`;\n\nconst Header = styled.div`\n\tposition: relative;\n\tbackground: red;\n\twidth: 100%;\n\theight: fit-content;\n\tbackground: red;\n\tbox-sizing: border-box;\n`;\n\nconst InnerContainer = styled.div`s\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n min-height: 100%;\n width: 100%;\n background: ${colors.bg};\n /* box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05); */\n max-height: 73vh;\n min-height: 73vh;\n @media screen and (max-width: 768px) {\n max-height: 70vh;\n min-height: 70vh;\n }\n`;\n\nconst Image = styled.div`\n\tbackground-image: ${(props) =>\n\t\t`linear-gradient(179.56deg, rgba(0, 0, 0, 0) 58.09%, rgba(0, 0, 0, 0.5) 98.13%), url(${props.src})`};\n\tbackground-size: cover;\n\tbackground-position: center;\n\tbackground-origin: unset;\n\theight: 120px;\n\twidth: 100%;\n`;\n\nconst HeaderText = styled.div`\n\ttext-align: center;\n\tfont-size: ${(props) => props.fontSize || \"1.8rem\"};\n\tcolor: ${colors.grey1};\n\tmargin: ${(props) => props.margin || \"30px 0 0 15px\"};\n`;\n\nconst BodyText = styled.div`\n\tfont-weight: 500;\n\tfont-size: 1.4rem;\n\tcolor: ${colors.grey2};\n`;\n\nconst BusinessPreviewContainer = styled.div`\n\tposition: absolute;\n\tbottom: -25px;\n\tleft: 15px;\n\twidth: 100%;\n`;\n\nconst BalanceContainer = styled.div`\n\tpadding: 10px 20px;\n\ttext-align: center;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tbackground: ${colors.white};\n\tmargin-bottom: 20px;\n\tbox-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);\n\toverflow-y: auto;\n\tmax-height: 72vh;\n`;\n\nconst BackButton = styled.div`\n\tbackground: rgba(0, 0, 0, 0.8);\n\tborder-radius: 10px;\n\tcolor: ${colors.white};\n\tfont-size: 1.4rem;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 5px 15px;\n\tmargin: 5px;\n\tcursor: pointer;\n`;\n\nconst TopButtonContainer = styled.div`\n\tposition: absolute;\n\theight: fit-content;\n\twidth: 100%;\n\ttop: 0px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n`;\n\nconst OuterContainer = styled.div`\n\theight: 100%;\n\twidth: 100%;\n`;\n\nconst ValidCouponContainer = styled.div`\n\tpadding: 25px;\n\ttext-align: center;\n`;\n\n// looks hacky but is a more browser compatible way of copying text\n// as opposed to navigator.clipboard.writeText()\n\nfunction Discounts() {\n\tconst history = useHistory();\n\tconst { organization } = useContext(OrganizationContext);\n\t// TODO: refactor and clean up\n\tconst { data: coupData, loading: coupLoading } = useQuery(\n\t\tGET_ACTIVE_COUPONS,\n\t\t{\n\t\t\tvariables: {\n\t\t\t\torganizationId: organization._id,\n\t\t\t},\n\t\t},\n\t);\n\n\tif (!organization || coupLoading) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t\t\t`/inviteFriends/?orgId=${organization._id}`,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
GO BACK
\n\t\t\t\t\t\t\n\t\t\t\t\t\t{/* \n \n
{userData.getCurrentUser.phoneNumber}
\n
*/}\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tDiscounts\n\n\t\t\t\t\t\n\t\t\t\t\t\t{coupData && coupData.activeCoupons.length > 0 ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tDiscount Not Found\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tAny discount associated with this phone number has\n\t\t\t\t\t\t\t\t\teither expired or does not exist. Start referring\n\t\t\t\t\t\t\t\t\tfriends to earn discounts.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n}\n\nexport default Discounts;\n","import React, { useContext, useEffect, useState } from \"react\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport styled from \"styled-components\";\nimport colors from \"../styles/colors\";\nimport Button from \"./Button\";\nimport { PhoneNumberInput } from \"./Input\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport Loader from \"./Loader\";\nimport { SEND_PHONE_CODE, VERIFY_PHONE_CODE_EMBED } from \"../graphql/queries\";\nimport CodeInputBoxes from \"./CodeInputBoxes\";\nimport { getErrorMessage } from \"../util/ErrorUtil\";\nimport { originalSources } from \"../util/contactConstants\";\n\nconst DefaultColors = Object.freeze({\n backgroundColor: \"#0f233c\",\n buttonTextColor: \"#FFFFFF\",\n buttonColor: colors.seaGreen,\n});\n\nconst LoaderContainer = styled.div`\n min-height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst OuterContainer = styled.div`\n width: 100%;\n font-family: \"Montserrat\", Helvetica;\n background: ${(props) => props.background || DefaultColors.backgroundColor};\n padding: 0px 30px;\n @media only screen and (min-width: 200px) and (max-width: 425px) {\n padding: 0px 20px;\n }\n`;\n\nconst Container = styled.div`\n display: flex;\n justify-content: center;\n flex-direction: column;\n background: ${colors.bg};\n position: relative;\n`;\n\nconst Content = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n flex-direction: column;\n padding: 30px 0px 25px 0px;\n @media only screen and (min-width: 200px) and (max-width: 767px) {\n padding: ${(props) => props.successMsg ? \"30px 0px 30px 0px\" : \"30px 0px 15px 0px\"};\n }\n`;\n\nconst HeaderDiv = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n background-color: ${colors.white};\n border-radius: 5px;\n align-items: center;\n`;\n\nconst FormDiv = styled.form`\n display: flex;\n width: 100%;\n justify-content: space-between;\n border-radius: 5px;\n align-items: center;\n padding: 10px 20px 0px 20px;\n background: ${(props) => props.background || DefaultColors.backgroundColor};\n @media screen and (max-width: 450px) {\n flex-direction: column;\n }\n`;\n\nconst HeadingText = styled.div`\n font-size: clamp(0px, 9vw, 300px);\n font-weight: bold;\n color: ${(props) => props.color || DefaultColors.buttonTextColor};\n margin-bottom: 5px;\n @media screen and (max-width: 450px) {\n padding: 12px 20px 0px 20px;\n }\n @supports (-webkit-touch-callout: none) {\n /* CSS specific to iOS devices */ \n font-size: 40px;\n }\n @supports (-webkit-touch-callout: none) {\n @media screen and (max-width: 768px) {\n font-size: 30px;\n }\n }\n`;\n\nconst SubHeadingText = styled.div`\n font-size: clamp(0px, 10vw, 1.5rem);\n color: ${(props) => props.color || DefaultColors.buttonTextColor};\n text-align: center;\n padding: 0 10px;\n padding-bottom: 10px;\n word-break: break-word;\n`;\n\nconst CodeText = styled.div`\n font-weight: 500;\n font-size: 1.4rem;\n color: ${colors.white};\n padding-bottom: 5px;\n`;\nconst CodeBoxContainer = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nconst CloseContiner = styled.div`\n position: fixed;\n cursor: pointer;\n top: 6px;\n right: 8px;\n display: inline-block;\n box-sizing:border-box;\n width:20px;\n height:20px;\n border-width: 3px;\n border-style: solid;\n border-color: ${(props) => props.background || DefaultColors.buttonColor};\n border-radius: 100%;\n background-color: ${(props) => props.background || DefaultColors.buttonColor};;\n transition: all 0.3s ease;\n text-align: center;\n font-weight: 600;\n z-index: 999999;\n color: ${(props) => props.color || DefaultColors.buttonTextColor};\n`\n\nconst Terms = styled.p`\n text-align: center;\n color: white;\n font-size: 1rem;\n @supports (-webkit-touch-callout: none) {\n @media screen and (max-width: 768px) {\n font-size: 0.8rem;\n }\n }\n`;\n\nconst ErrorContainer = styled.div`\n color: ${colors.red};\n fontSize: 12px;\n`\n\nconst DefaultText = {\n headline: \"Become a VIP\",\n introductoryText: \"Be the first to know about gift card giveaways, specials, exclusive events, and more!\",\n}\n\nconst successMsg = \"Thank you for enjoying your experience at {OrgName} and for joining our VIP list. We'll keep you informed of our latest specials, events, and giveaways, and we promise to keep the texts enjoyable and to-the-point. We look forward to seeing you at {OrgName} again soon!\"\n\nfunction Embed() {\n const { organization } = useContext(OrganizationContext);\n const [phoneNumber, setPhoneNumber] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [codeInputIsVisible, setCodeInputIsVisible] = useState(false);\n const [showSuccessMessage, setShowSuccessMessage] = useState(false);\n\n\n const getWindowsDimensions = () => {\n const width = window.innerWidth || document.documentElement.clientWidth ||\n document.body.clientWidth;\n const height = window.innerHeight || document.documentElement.clientHeight ||\n document.body.clientHeight;\n const contentHeight = document?.getElementById(\"CTO_PORTAL_CONTAINER\").offsetHeight\n const orientation = (window?.screen.orientation || {}).type || window?.screen.mozOrientation || window?.screen.msOrientation;\n return {\n height,\n width,\n contentHeight,\n screenWidth: window?.screen?.width || 200,\n screenHeight: window?.screen?.height || 200,\n availHeight: window?.screen?.availHeight || 200,\n availWidth: window?.screen?.availWidth || 200,\n orientation\n }\n }\n\n const updateFrameDimensions = () => {\n const data = getWindowsDimensions()\n window.parent.postMessage({\n action: \"RESIZE_IFRAME\", args: data\n }, \"*\")\n }\n\n useEffect(() => {\n if (organization) {\n window.parent.postMessage({ action: \"SET_STATUS\", args: { status: \"ACTIVE\" } }, \"*\")\n updateFrameDimensions()\n }\n }, [organization]);\n\n const [sendPhoneCode, { loading }] = useMutation(SEND_PHONE_CODE, {\n variables: {\n organizationId: organization?._id,\n phoneNumber,\n originalSource: originalSources.MODAL,\n },\n onCompleted(data) {\n setCodeInputIsVisible(true);\n updateFrameDimensions()\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n });\n\n const [verifyPhoneCode, { loading: verifyLoading }] = useMutation(\n VERIFY_PHONE_CODE_EMBED,\n {\n async onCompleted(data) {\n setShowSuccessMessage(data?.verifyPhoneCodeEmbed);\n setCodeInputIsVisible(false);\n updateFrameDimensions()\n },\n onError(error) {\n setError(getErrorMessage(error));\n console.log(error);\n },\n }\n );\n\n const close = () => {\n window.parent.postMessage({ action: \"CLOSE_WINDOW\" }, \"*\");\n window.parent.postMessage({ action: \"SET_STATUS\", args: { status: \"CLOSED\" } }, \"*\");\n }\n\n if (!organization || verifyLoading) {\n return (\n \n \n \n );\n }\n\n const bgColor = organization?.integration?.backgroundColor || DefaultColors.backgroundColor\n const btnTextColor = organization?.integration?.buttonTextColor || DefaultColors.buttonTextColor\n const btnColor = organization?.integration?.buttonColor || DefaultColors.buttonColor\n\n return (\n \n x\n \n <>\n \n \n \n {showSuccessMessage ? \"SUCCESS!\" : organization?.integration?.headline || DefaultText.headline}\n \n \n {\n showSuccessMessage\n ? organization?.integration?.successText || successMsg.replaceAll('{OrgName}', organization?.name)\n : organization?.integration?.introductoryText || DefaultText.introductoryText\n }\n \n \n {!showSuccessMessage && (\n <>\n {\n e.preventDefault();\n sendPhoneCode();\n }}\n background={bgColor}\n >\n {!codeInputIsVisible && (\n <>\n setPhoneNumber(e.target.value)}\n required\n />\n \n \n )}\n {codeInputIsVisible && (\n \n \n We just sent a 4-digit code to your mobile phone, please enter it below.\n \n \n {\n verifyPhoneCode({\n variables: {\n phoneNumber,\n phoneCode,\n organizationId: organization._id,\n },\n });\n }}\n />\n \n
\n )}\n \n {error && (\n {error}\n )}\n \n By providing your phone number, you agree to participate in\n the marketing program and to be contacted through this phone\n number as part of the program. This program information is subject\n to Check This Out's \n \n Terms of Use and Privacy Policy\n \n \n \n )}\n \n \n \n \n );\n}\n\nexport default Embed;\n","import React, { useMemo, useState, useEffect } from \"react\";\nimport {\n\tBrowserRouter as Router,\n\tSwitch,\n\tRedirect,\n\tRoute,\n} from \"react-router-dom\";\nimport Layout from \"./Layout\";\nimport EmbedLayout from \"./EmbedLayout\";\nimport HomeLayout from \"./HomeLayout\";\nimport Home from \"./Home\";\nimport Invite from \"./Invite\";\nimport PhoneInput from \"./PhoneInput\";\nimport InviteFriends from \"./InviteFriends\";\nimport AcceptCoupon from \"./AcceptCoupon\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport { AppContext } from \"../context/AppContext\";\nimport OrganizationList from \"./OrganizationList\";\nimport Unsubscribed from \"./Unsubscribed\";\nimport InviteError from \"./InviteError\";\nimport JoinReferral from \"./JoinReferral\";\nimport Discounts from \"./Discounts\";\nimport Embed from \"./Embed\";\n\nexport default function App() {\n\tconst [organization, setOrganization] = useState(null);\n\tconst [app, setApp] = useState(null);\n\tconst appValue = useMemo(() => ({ app, setApp }), [app, setApp]);\n\tconst orgValue = useMemo(\n\t\t() => ({ organization, setOrganization }),\n\t\t[organization, setOrganization],\n\t);\n\tuseEffect(() => {\n\t\t// prevent android keyboard shrinking viewport when\n\t\t// open and affecting percentage based div heights for whole app\n\t\t// https://stackoverflow.com/questions/32963400/android-keyboard-shrinking-the-viewport-and-elements-using-unit-vh-in-css\n\t\t// const viewport = document.querySelector(\"meta[name=viewport]\");\n\t\t// if (viewport) {\n\t\t// viewport.setAttribute(\n\t\t// 'content',\n\t\t// `height=${window.innerHeight}, width=${window.innerWidth}, initial-scale=1.0`,\n\t\t// );\n\t\t// }\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { HttpLink } from 'apollo-link-http';\nimport { onError } from 'apollo-link-error';\nimport { ApolloLink } from 'apollo-link';\n\nconst apiHost = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:4444';\n// const apiHost = 'http://192.168.1.4:4444';\n\n// For local mobile development testing, you will have to change a couple things.\n// set apiHost like the example below\n// const apiHost = 'http://localipaddress:4444'; (ex: const apiHost = 'http://192.168.1.4:4444';)\n// then you will have to allow cors to accept your request origin url in server.js like the example below\n// app.use(cors({\n// origin: ['http://localhost:3000', 'http://localhost:3001', 'http://192.168.1.4:3000'],\n// credentials: true,\n// }));\n// Then, on the same wifi network, connect to http://192.168.1.4:3000 on your mobile device\n\n/**\n * getHeaders for genrate dynamic headers\n * Fix for Incongito where localStorage throwing security error in chrome\n */\nconst getHeaders = () => {\n let authorization\n try {\n authorization = localStorage.getItem('CHECK_THIS_OUT_AUTH_TOKEN')\n } catch (error) {\n console.log(error)\n }\n if (authorization) {\n return { headers: { authorization } }\n }\n return { headers: {} }\n}\nexport const authLink = new ApolloLink((operation, forward) => {\n const context = getHeaders()\n operation.setContext(context);\n return forward(operation);\n});\n\nexport const errorLink = onError(({ graphQLErrors, networkError }) => {\n if (graphQLErrors) {\n graphQLErrors.forEach(({ message, locations, path }) => console.log(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ));\n }\n if (networkError) console.log(`[Network error]: ${networkError}`);\n});\n\nexport const httpLink = new HttpLink({\n uri: `${apiHost}/graphql`,\n credentials: 'same-origin',\n});\n\nexport const omitTypeNameLink = new ApolloLink((operation, forward) => {\n if (operation.variables && operation.operationName !== 'uploadFiles') {\n operation.variables = omitDeep(operation.variables, '__typename');\n }\n return forward(operation).map((data) => {\n return data;\n });\n});\n\n// helper functions\nfunction omitDeep(obj, key) {\n const keys = Object.keys(obj);\n const newObj = {};\n keys.forEach((i) => {\n if (i !== key) {\n const val = obj[i];\n if (Array.isArray(val)) newObj[i] = omitDeepArrayWalk(val, key);\n else if (typeof val === 'object' && val !== null) newObj[i] = omitDeep(val, key);\n else newObj[i] = val;\n }\n });\n return newObj;\n}\n\nfunction omitDeepArrayWalk(arr, key) {\n return arr.map((val) => {\n if (Array.isArray(val)) return omitDeepArrayWalk(val, key);\n if (typeof val === 'object') return omitDeep(val, key);\n return val;\n });\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './styles/index.css';\nimport { ApolloProvider } from '@apollo/react-hooks';\nimport { ApolloClient } from 'apollo-client';\nimport { InMemoryCache } from 'apollo-cache-inmemory';\nimport { from } from 'apollo-link';\nimport App from './components/App';\nimport {\n authLink,\n omitTypeNameLink,\n errorLink,\n httpLink,\n} from './graphql/ApolloLinks';\n\nconst client = new ApolloClient({\n link: from([\n authLink,\n omitTypeNameLink,\n errorLink,\n httpLink,\n ]),\n cache: new InMemoryCache(),\n});\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root'),\n);\n","module.exports = __webpack_public_path__ + \"static/media/cto-full-logo.130e2b98.png\";"],"sourceRoot":""}