{"version":3,"sources":["webpack:///./guest-payment-components/DonateGiftAidHowItWorksOverlay.js","webpack:///./guest-payment-components/DonateGiftAid.js","webpack:///./components/amount/amountValidationError.js","webpack:///./components/amount/calculator.js","webpack:///./components/amount/PresetAmountRow.js","webpack:///./components/amountWrapper.js","webpack:///./react-card-security-code/index.js","webpack:///./components/threeDS/ThreeDSSpinner.js","webpack:///./components/threeDS/ThreeDSDeviceDataCollection.js","webpack:///./components/threeDS/ThreeDSIframe.js","webpack:///./components/threeDS/ThreeDSContainer.js","webpack:///./components/guest/WithDonate.js","webpack:///./utility/card-utils.js","webpack:///./components/NoteFieldError.js","webpack:///./components/note.js","webpack:///./components/anonymousDonation/anonymousCheckbox.js","webpack:///./utility/bootstrap.js","webpack:///./components/nextButton.js","webpack:////home/jenkins/agent/workspace/donate-gro-release/lib/geoUtils.js","webpack:///./components/landing/OneTouchNextButton.js","webpack:///./components/guestButton.js","webpack:///./components/recurring-checkbox/RecurringInfo.js","webpack:///./components/recurring-checkbox/recurring-checkbox.js","webpack:///./components/programs/Programs.js","webpack:///./components/recurring-checkbox/RecurringOverlay.js","webpack:///./components/NotTaxDeductibleLegalText.js","webpack:///./components/coverFee/coverFeeCheckbox.js","webpack:///./pages/landing/landing.js","webpack:///./components/WhosDonatedBanner.js","webpack:///./components/Flyout.js","webpack:///./components/hooks/useInterval.js","webpack:///./utility/donorWall.js","webpack:///./pages/landing/campaignLanding.js","webpack:///./setup/clientConstants.js","webpack:///./containers/cvv-component.js","webpack:///./pages/guest/guestReviewComponents/PaymentInformation.js","webpack:///./components/currencyConversion/CurrencyConversionModal.js","webpack:///./utility/accessibilityUtils.js","webpack:///./pages/guest/guestReviewComponents/CrossBorder.js","webpack:///./pages/guest/guestReviewComponents/FeePricing.js","webpack:///./pages/guest/GuestReview.js","webpack:///./pages/guest/confirmation.js","webpack:///./pages/error/FullPageError.js","webpack:///./pages/error/paymentError.js","webpack:///./pages/error/UnilateralError.js","webpack:///./pages/error/threeDSError.js","webpack:///./components/CaptureOrder.js","webpack:///./components/CancelAndRedirectOrder.js","webpack:///./routes/router.js","webpack:///./utility/lazyLoader.js"],"names":["styles","StyleSheet","create","modalContent","maxWidth","margin","okButton","marginTop","msgMargin","DonateGiftAidHowItWorksOverlay","props","orgName","className","overpanel","title","isOpen","onClose","closeOverlay","hideLogo","closeOnBackgroundClick","id","css","src","appendCdnHostName","size","onClick","propTypes","PropTypes","string","bool","func","DonateGiftAid","isAlreadyEnrolled","isChecked","handleGiftAidOption","addressData","showAddress","giftaidInfo","useState","showHelp","setShowHelp","checked","setChecked","isHowItWorksOverlayOpen","setIsHowItWorksOverlayOpen","donateGiftPercentage","donationCode","amount","useEffect","giftaidAmount","openHowItWorksOverlay","alt","currency","formatAmount","value","normalizeNumber","extraAmount","type","tertiary","label","name","onChange","env","checkedValue","target","strong","fullName","address1","address2","city","state","zip","openOverlay","any","object","isMember","STYLES","error","color","PAYPAL_THEME","sysColorUnselectedContrast","fontSize","criticalIcon","position","marginRight","AmountValidationError","this","errorSourceField","errorString","errorCode","trackErrorIM","errorMessage","fieldName","style","role","data-testid","Component","donationAmount","messages","localsMessages","container","padding","zIndex","calcRow","display","width","verticalAlign","calcRowLeft","calcRowRight","calcLabel","inputCol","input","outlineOffset","paddingLeft","inputLeft","paddingRight","inputRight","fromCode","right","top","height","borderTop","borderRight","borderBottom","toCode","lineHeight","conversion","textAlign","paddingTop","disabled","opacity","inputCurrencyLeft","marginLeft","hasError","Calculator","symbol","currencySymbols","setState","fromSymbol","length","document","getElementById","ev","callback","val","match","validateAmount","handleFromChange","handleToChange","handleFromCurrencyChange","setFromSymbol","event","handleAmountFocus","replace","decimalPoint","youDonate","charityGet","youDonateLabel","charityGetLabel","conversionLabel","placeholder","getLocalizedAmount","fromAmount","toAmount","conversionRate","calcLabelStyle","toError","fromDisabled","bind","onFocus","availableCurrencies","map","c","key","toDisabled","charityAmountSymbol","toErrorMessage","React","array","isRequired","PresetAmountRow","worldready","useContext","WorldReadyContext","presetOther","MessageFormat","format","placeholderOtherAmount","templateData","presetAmounts","setPresetAmounts","AppStore","getDonationAmountType","getDonationAmount","selectedOption","setSelectedOption","showOtherAmount","setShowOtherAmount","charityAmount","amountFieldValue","setAmountFieldValue","handlePresetAmountClick","handleAmountChange","hideValidationError","AppActions","trackLinkClick","LINK_NAME","PRESET_AMOUNT","additionalData","FPTI_TAGS","SELECTED_PRESET_BUTTON_ID","amountBeforeFee","getAmountBeforeFee","isOptInCoverFee","shouldSelectPresetAmount","values","charityAmountCode","result","presetOptions","isRightSymbol","formatAmountFromServerDNW","noDecimals","secondaryLabel","showValidationError","validationErrorMessage","isPreview","isAmountEditable","validationErrorCode","AmountWrapper","dispatcherCharityAmount","AppDispatcher","register","payload","action","actionType","item","addFeature","FEATURES","DONATION_AMOUNT_EDITABLE","unregister","window","location","pathname","includes","undefined","getParameterByName","isNaN","exchangeRate","base_currency_code","userAmountCode","quote_amount","toFixed","params","getConversionRequest","_debounce","st","par","fn","queryParams","fromCountry","userCountry","fromCurrency","toCurrency","normalizeAmount","conversionStatus","Promise","resolve","fetcher","method","body","JSON","stringify","then","response","json","catch","source","exchange_rate","isCalculator","setAppAmount","isAtLandingPage","setFeeAmountInStore","updateFeeAmount","optOutCoverFee","snapshot","userAmount","charityDisabled","getConversion","getConversionRate","currencyCode","userDisabled","presetAmountsCondition","TemplateData","enablePresetAmounts","isGuestReviewPage","PRESET","validateDonationAmount","worldReady","getWorldReady","selectedRecurringFrequency","parse","innerHTML","currencyLists","currencies","symbols","html","getElementsByTagName","directionality","getAttribute","donorIpCountry","US","getDonationCode","isEditable","donationAmountEditable","getDonationSymbol","donationDecimalPoint","nextProps","shouldShowPresetAmounts","renderPresetAmounts","handleUserAmountChange","handleUserCurrencyChange","handleCharityAmountChange","currencySymbol","handleAmount","clientMetadata","__getInitialData","handleTrackError","getDonationRecurring","getRecurringLabel","CardSecurityCode","showIsRequiredError","securityCode","handleCheckForValue","handleChangeSecurityCode","cardSpec","fields","csc","required","handleFocus","handleBlur","cscSpecs","maxLength","maxlength","pattern","onBlur","errorText","dir","helperText","cardSpecPropType","LOADING_GIF_SOURCE","spinnerAlign","cardImg","ThreeDSSpinner","fundingOptions","getFundingOptions","_get","network","getPaymentCardNetwork","myData","getAllData","_isEmpty","cardType","toLowerCase","hideSpinnerOverlay","setNetworkDetails","context","contextType","withTheme","ThreeDSDeviceDataCollection","data","exception","messageType","onDDCComplete","trackThreeDsDdcFailure","STATUS","console","log","onThreeDSDDCComplete","contingencies","_find","addEventListener","handleDDCEvent","threeDS2ReferenceId","getThreeDSParams","three_ds_reference_id","refs","submit","e","removeEventListener","deviceDataCollectionUrl","device_data_collection_url","jwt","ref","withRouter","ThreeDSIframe","handleIframeMessage","confirmationStatus","CHALLENGE_STATUS","trackThreeDSIframeIM","threeDSRespDuration","CHALLENGE_END_TIME","Date","getTime","onStepUpAuthComplete","hideModal","element","formRef","setTimeout","requestTextMsgFmt","threeDS2Contingency","getThreeDSContingency","redirectLink","md","redirectMethod","requestText","frameBorder","setFormRef","submitForm","CHALLENGE_START_TIME","hideTitle","getModalBody","icon","ThreeDSContainer","showThreeDSDeviceDataCollection","threeDSDCCEndTime","fptiData","THREE_DS_DCC_START_TIME","threeDSDCCStartTime","THREE_DS_DCC_END_TIME","THREE_DS_SPINNER_START_TIME","THREE_DS_SPINNER_END_TIME","trackThreeDsDdcComplete","resolveThreeDSContingency","trackThreeDsLookupStart","THREE_DS_LOOKUP_START_TIME","token","onboardingEnabled","hideThreeDSSpinner","threeDSContingency","resolved","trackThreeDsLookupComplete","timestamp","THREE_DS_LOOKUP_END_TIME","CONTINGENCY_RESOLVED","URL","ACTION","onThreeDSStepUpAuthNotRequired","showThreeDSIframe","hideThreeDSIframe","onThreeDSFailure","onThreeDSStepUpAuthSuccess","onThreeDSStepUpAuthFailure","showThreeDSSpinner","onRef","startTime","trackThreeDsDdcStart","handleThreeDSDDCComplete","handleThreeDSStepUpAuthComplete","toggleSpinner","initialData","getInitialData","ERROR_ELEMENT_SELECTOR","join","withDonate","WrappedComponent","country","DonateAppActions","CHANGE_COUNTRY","COUNTRY","signUp","url","handleGuestCountryChange","isSpinner","showSpinnerOverlay","scrollElementIntoView","language","note","getDonationNote","fundingOptionId","email","getEmail","billingAddress","getBillingAddress","giftAidItFlag","getGiftaidItFlagStatus","card","getSelectedRecurringFrequency","code","history","push","status","href","clientState","encodeURIComponent","confirmationData","startCustomCPLTrackingForConfirmationPage","objectOrArrayToQueryString","confirmation","isOfacPending","isEmpty","cartUrl","orderToken","donateToken","payerID","selectedCountry","getFormData","formData","getParametersFromUrl","showErrorOnLoad","errorMsgs","serverErrors","handleCountryChange","handleScrollToError","getDonateGuestUrl","getInitialFormData","saveFormData","doFulfilment","captureOrder","createOrder","defaultCardSpec","ccNumber","expirationDate","minlength","getSpecificCardSpec","cardNumber","cardTypes","RegExp","autodetect","test","PAYMENT_CARDS","NoteFieldError","NoteComponent","lengthLimit","campaignsLabel","providedLabel","isCampaigns","charityNoteEnabled","charityNoteLabel","donationNote","setDonationNote","initialNoteLabel","showLabel","setShowLabel","showError","setShowError","noteLabel","setNoteLabel","textAreaEl","useRef","isNoteTextPresent","current","focus","isNotePreview","contextLocalityDir","isExternalFlow","htmlFor","NOTE_PAD","eventName","EVENT_NAME","DW_GIVING_DONATE_SETUP_COMMENT_PRESSED","svgIconComponent","buttonType","aria-hidden","maxRows","minRows","showCharacterCounter","maxCharacters","addClass","removeClass","trim","AnonymousCheckbox","content","optInStatus","handleAnonymousDonationChange","ANONYMOUS","tooltip","checkboxStatus","anonymousStatus","labelIcon","description","onOpen","ANONYMOUS_TOOLTIP","DW_GIVING_DONATE_SETUP_TOOLTIP_PRESSED","setAttribute","NextButtonComponent","branded","handleNext","getCdnHostName","OneTouchNextButton","GuestButton","GUEST","secondary","handleGuest","RecurringInfo","orgname","donationName","isLTR","isLeftToRight","isContinue","wrapper","centered","justifyContent","toolWrapper","paddingBottom","animationWrapper","animationContainer","transform","recurringButton","borderRadius","marginBottom","borderOnly","background","divider","dividerContent","backgroundColor","verticalCentered","alignItems","RecurringCheckBox","dispatcherToken","updateAmount","RECURRING","continue","formatedAmount","showhelp","chkBxStatus","loadAnimation","recurring","RECURRING_CHECKBOX","CHECKBOX","handleChange","__html","loadBodyMovin","isAnimating","animationData","heartsAnimationData","bodymovinLibrary","bodymovin","renderer","loop","autoplay","destroy","sanitizeOrgName","defaultProps","Programs","programNames","isDisabled","selectedProgram","handleSelect","programLabelMsgFmt","Array","isArray","getProgramOptions","options","forEach","programName","primaryText","programOption","findIndex","program","appStore","getSelectedProgram","PROGRAM_SELECTED","CAMPAIGN","RecurringOverlay","closeRecurringOverlay","onMakeOneTimeDonation","onContinue","secondDialogLabel","dialogp2","center","isInContext","BackButton","handleClose","noCloseButton","containerClassName","noThanks_closeModal","disclaimerWrapper","disclaimer","disclaimerCaptionText","NotTaxDeductibleLegalText","dispatcherMessages","isPPCC","setIsPPCC","AppConstants","CoverFeeCheckbox","handleCoverFeeChange","formatedFeeAmount","CTF","checkbox_content","coverFee","LandingPageComponent","onload","cpl","CPL_PAGE_SPEC","LANDING_PAGE","currentPage","paymentStatus","recurringStatus","coverFeeOptInStatus","restoreDonationAmount","trackLandingPageIM","noteFieldDisplayed","shouldShowNote","recurringEnabled","waitForOnload","isLoggedInUser","registerAppDispatcherMessages","amountUtils","trackDonateWithCardClick","is_recurring","fee_type","coverFeeEnabled","addShake","preventDefault","recurringModalStatus","memberMandatory","openRecurringOverlay","validateAmountAndNavigateToGuestPage","PAYPAL","analytics","startCPLTracking","page","uicomp","uitype","trackDonateWithPayPalClick","handleLogIn","trackNextClickForCheckout","orderParams","prepareOrderParams","feeAmount","getFeeAmount","computeAmountAfterFee","updateDonationAmount","validationResult","donateDisabled","rpContinue","anonymousOptInStatus","trackAnonymousCheckboxClick","trackCoverFeeCheckboxClick","getFormatedFeeAmount","isRecurringOverlayOpen","isOldButtonFactory","supportedRecurringFrequencies","selectedTabIdx","rpContentHelper","totalAmount","Number","formattedTotalAmount","subHeaderLabel","isCheckoutRail","handleNextForCheckout","isAuthenticated","showNoteCondition","CHARITY_NOTE","personalizedMessages","getPersonalizedMessages","GN_CONTENT_TOUCHPOINT","amountRaised","campaignTotalAmountRaised","campaignStatus","campaignTargetAmount","campaignEndTime","tabIdx","handleRecurringChange","trackRecurringFrequencySelectionClick","getCoverFeeOptInStatus","anonymousStatusInStore","getAnonymousStatus","indexOf","hasLogo","charityName","donationId","guestRedirectUrl","recurringHelpText","recurringLabel","isAuthenticatedUser","donateContext","program_names","isVoucherFlow","offerProgram","feePayer","anonymousEnabled","hasDisclaimer","hasPersonalizedMessages","classNames","gn_donate_wrapper","bannerUrl","donate_wrapper","context_gn_wrapper","shouldShowUserBanner","mobile_view","isMobileOrInContext","showUserBanner","showSupportText","shouldShowSupportText","showNoDonationText","shouldShowNoDonationText","freq","receiverCountryEligible","landingClass","UserDetailsBanner","userDetails","CloseButton","inverse","DonateHeader","isLanding","campaigns","tabs","option","panelId","selectFrequencyTab","tabId","updateConversionSataus","renderProgramsDropdown","getPersonalizedAnonymousContent","getPersonalizedNoteToPayeeLabel","showNote","selectedTab","success","renderDisclaimer","renderDonateButtons","hasPartnerSource","handleRecurringOverlayContinue","handleRecurringOverlayMakeOneTimeDonation","Disclaimer","getPersonalizedContent","organizationName","returnUrl","charityReturnUrl","LandingPage","withWorldReady","Landing","displayLanding","currentState","business","hostedButtonId","campaignId","search","handleTokenReuse","addTokenToUrlIfMissing","WhosDonatedBanner","numberOfContributors","contributionsList","isLoading","donorName","donor_name","donatedAmount","donor","donorOneName","donorTwoName","formatNumber","slice","showAnonymousAvatar","shareDonorInfo","photo","photos","isAnonymousAvatar","number","Flyout","delay","intervalRef","savedCallback","startShowing","setStartShowing","showFlyouts","setShowFlyouts","randomContribution","setRandomContribution","getRandomContribution","max","Math","floor","random","flyoutTimer","clearTimeout","setInterval","clearInterval","hideInterval","currency_code","formatFeatured","contributions","totalContributions","formattedList","first","find","badge","toUpperCase","selfItem","LandingDonorWall","reactLazy","LandingRichTextDisplay","OrganizerUpdates","isPaymentCardOpen","setIsPaymentCardOpen","targetAmount","campaignTotalNumberOfTxn","amountRaisedWithCurrencySymbol","roundUpAndFormatCurrency","featured","list","setContributionsList","contributionsError","setContributionsError","setCurrentPage","setIsLoading","retry","setRetry","enableReadMore","setEnableReadMore","descriptionHeight","setDescriptionHeight","originalDescriptionHeight","setOriginalDescriptionHeight","stickToTop","isMobile","setIsMobile","checkDeviceType","innerWidth","throttledFn","throttle","fetchData","productId","handleShowMore","goalAmtWithCurrencySymbol","campaignGoalTitle","goalAmount","getCampaignMessage","formatObj","advancedEndDateBadgeContent","minute","minutes","hour","hours","day","days","month","months","year","years","endsInContent","duration","unit","endedContent","date","renderEndDateBadge","endTime","currentTime","formatDate","parseDateOnly","renderTitle","campaignTitle","renderGoalProgressMeter","round","toString","steps","headerClasses","sticky","renderDonorWall","endDate","totalNumberOfTransactions","setHours","renderContributionsError","stickyHeader","social_title","getSocialMessage","incrementDescription","incrementedHeight","Content","maxHeight","descriptionContainer","clientHeight","fallback","campaignDescription","ConfirmationSocialShare","social","emailSubject","emailBody","mobileText","facebookMessage","twitterMessage","whatsappMessage","copyLinkHeader","copyLinkSubheaderBefore","copyLinkSubheader","copiedText","copyText","subheader","shareGeneric","donationEmail","lg","trackDonateLandingButtonClick","mobileFixedHeight","wrapperClassName","skipFormFocus","CVVComponent","getCardSpec","errorMessageCSC","handleSecurityCodeChange","fieldRequired","fieldInvalid","newErrorState","validateInputValue","cscLen","cscMax","cscLabel","handleFieldFocus","handleFieldBlur","PaymentInformation","paymentDigits","paymentType","issuer","isPaypalCurrencyConversion","funds","paymentLogo","setPaymentLogo","transformText","str","charAt","payment_card","thumbnail_logo_url","CDN_HOST_NAME","split","CurrencyConversionOption","isSelected","aria-checked","tabIndex","handleOptionSelection","onKeyDown","doFunction","which","KEY_DOWN","SPACE","ENTER","checkKeyPressed","PaypalAppIcon","CreditCardIcon","rate","as","CurrencyConversionModal","withPaypaltitle","withPaypalRate","withPaypalmessage","withCardtitle","withCardmessage","CURRENCY_CONVERSION_OPTIONS","isPayPalSelected","setPaypalSelected","ISSUER","CrossBorder","fundingSources","lastFundingSource","tags","currencyConversionOption","getLocalizedCurrency","stateCurrency","hasFees","inCurrency","outCurrency","currencyConversionOpen","setCurrencyConversionOpen","CURRENCY_CONVERSION","pageSpec","PAGE_SPEC","CROSS_BORDER_PAGE","sources","_includes","getUserCountry","finally","handleCurrencyConversionClick","FeePricing","feeAmounts","openHelperSheet","setOpenHelperSheet","paymentAmount","payment_amount","totalFee","total_fee","totalAmountPaid","total_amount_paid","getGiftAidItExtraAmount","GuestReview","spinnerOverlay","endCPLTracking","observeUntilEventObserved","attributes","observer","disconnect","totalDecimals","parseFloat","maximumFractionDigits","newAmount","formatCurrencyAsString","showCurrencyConversionModal","isCurrencyConversionModalOpen","showCVVField","cvv","childCVVInfo","getElementsByClassName","processDonation","threeDSContainer","initializeThreeDS","trackGuestReviewPageDonateClick","isCvvSend","giftAidState","track3DSProceedToPayment","isRecurring","stateConversionWithPayPal","getStateForConversionWithPayPal","amountDecimalPoint","endCustomCPLTracking","paymentNetwork","last_4","currency_conversion","fundsIn","funds_in","fundsOut","funds_out","fee_amount","paymentCard","issuerName","inAmount","inSymbol","outAmount","outSymbol","currencyConversion","fundingCode","getStateForConversionWithIssuer","currencyConversionType","paymentCardId","preferences","payment_card_id","validity","consentShareAddress","getShareAddress","hasCvvContingency","isCvvContingencyResolved","updateFundingOptionsState","giftaidFlag","isGiftaiditEnabled","form","isPPUnlistedCampaign","handleDonateClick","handleThreeDSStepUpAuthSuccess","handleThreeDSFailure","GuestConfirmationPending","withPageTrack","withPostTransactionRequest","PendingView","GuestConfirmationSuccess","SuccessView","body2","linkLabel","handleLinkClick","buttonLabel","handleButtonClick","showCloseButton","centerBody","PaymentError","ERROR_CODE","getPaymentError","trackErrorPageIM","GUEST_FAILURE_PAGE","WENT_WRONG","TEMP_GLITCH","tryagain","getErrorMessage","customerServiceLink","handleTryAgain","UnilateralError","UNILATERAL_ERROR_PAGE","noAccountErrorMessage","align","Illustration","ConfirmationBody","message","ThreeDSError","ConfirmationTitle","CaptureOrder","orderStatus","getOrderStatus","isMemberFlow","isOneTouchUser","handlePaymentSuccess","handleConfirmation","flow","trackCaptureOrderPageIM","accessToken","isSubmitted","backBtnVisible","responseData","wTransactionEntry","requestError","timerCount","CancelAndReturnOrder","waitForXProps","xprops","close","charityCancelUrl","locality","setShouldRTL","currentUserState","isUnilateralAccount","GuestPage","reactLazyPreload","FallbackSpinner","userCookied","isOneTouch","isGNC","isPPCampaign","preload","parseUrlQuery","signup","getPageToRender","CampaignLandingPage","RouterWithWorldReady","exact","path","component","CancelAndRedirectOrder","Review","MemberConfirmationSuccess","MemberConfirmationPending","ReactDOM","render","all","loadScript","loadSlickProgressiveOnboarding","scriptPath","reject","nonce","script","createElement","appendChild","onerror","readyState","importStatement","lazyComponent"],"mappings":";;;;;;;;;;;;;;;;;mXAQMA,EAASC,aAAWC,OAAO,CAC/BC,aAAc,CACZC,SAAU,IACVC,OAAQ,UAEVC,SAAU,CACRC,UAAW,IAEbC,UAAW,CACTD,UAAW,UAIA,SAASE,EAA+BC,GACrD,IAAQC,EAAYD,EAAZC,QAER,OACE,uBACEC,UAAU,+BACVC,WAAS,EACTC,MAAM,GACNC,OAAQL,EAAMK,OACdC,QAASN,EAAMO,aACfC,UAAQ,EACRC,wBAAwB,GAExB,yBAAKP,UAAU,aAAaQ,GAAG,kBAC7B,yBAAKR,UAAU,IACb,yBAAKA,UAAS,UAAKS,cAAIrB,EAAOG,cAAhB,mBACZ,2BACE,uBAAKS,UAAU,qBACb,yBACEA,UAAU,gBACVU,IAAKC,YACH,8CAKR,2BACE,uBAAKX,UAAU,eACb,uBAAaY,KAAK,MAChB,kBAAC,IAAD,CAASJ,GAAG,6CAIlB,2BACE,2BACE,uBAAUR,UAAWS,cAAIrB,EAAOQ,YAC9B,kBAAC,IAAD,CACEY,GAAG,qCACHT,QAASA,OAKjB,2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b,SAAQ,SAACC,GACU,aAAxB9H,SAASskC,WACXx8B,IAEA1B,OAAO4I,iBAAiB,QAAQ,WAC9BlH,UASD,SAASy6B,EAAiBgC,GAC/B,IAAMC,EAAgB3V,eAAU0V,GAEhC,OADAC,EAAc3B,QAAU0B,EACjBC,K","file":"donate.8ef51a8ff34eff7b0c4f.bundle.js","sourcesContent":["import React from 'react';\nimport { Sheet, BodyText, Button, HeadingText } from '@paypalcorp/pp-react';\nimport { StyleSheet, css } from 'aphrodite';\nimport PropTypes from 'prop-types';\nimport { Row, Col } from '@paypalcorp/pp-react';\nimport { appendCdnHostName } from '../utility/geoUtils';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst styles = StyleSheet.create({\n modalContent: {\n maxWidth: 600,\n margin: '0 auto',\n },\n okButton: {\n marginTop: 36,\n },\n msgMargin: {\n marginTop: '24px',\n },\n});\n\nexport default function DonateGiftAidHowItWorksOverlay(props) {\n const { orgName } = props;\n\n return (\n \n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
\n \n
\n \n
\n
\n
\n
\n \n );\n}\n\nDonateGiftAidHowItWorksOverlay.propTypes = {\n orgName: PropTypes.string,\n isOpen: PropTypes.bool,\n closeOverlay: PropTypes.func,\n};\n","import PropTypes from 'prop-types';\nimport React, { useState, useEffect } from 'react';\nimport { Checkbox, CaptionText, Button } from '@paypalcorp/pp-react';\nimport DonateGiftAidHowItWorksOverlay from './DonateGiftAidHowItWorksOverlay';\nimport { appendCdnHostName } from '../utility/geoUtils';\nimport { BodyText } from '@paypalcorp/pp-react-text';\nimport { Message } from '@paypalcorp/worldready-react';\nimport { normalizeNumber, formatAmount } from '../utility/formator';\n\nconst DonateGiftAid = ({\n isAlreadyEnrolled,\n isChecked,\n handleGiftAidOption,\n addressData,\n showAddress,\n giftaidInfo,\n}) => {\n const [showHelp, setShowHelp] = useState(isChecked);\n const [checked, setChecked] = useState(isChecked);\n const [isHowItWorksOverlayOpen, setIsHowItWorksOverlayOpen] = useState(false);\n const { donateGiftPercentage, donationCode, amount, orgName } = giftaidInfo;\n\n useEffect(() => {\n if (isAlreadyEnrolled) {\n setShowHelp(false);\n }\n }, [isAlreadyEnrolled]);\n\n const handleCheckbox = (env) => {\n let checkedValue = env.target.checked;\n setChecked(checkedValue);\n setShowHelp(checkedValue);\n handleGiftAidOption(checkedValue);\n };\n\n const openHowItWorksOverlay = () => {\n setIsHowItWorksOverlayOpen(true);\n };\n\n const closeHowItWorksOverlay = () => {\n setIsHowItWorksOverlayOpen(false);\n };\n\n const getGiftAidExtraAmount = () => {\n const giftaidAmount = donateGiftPercentage * normalizeNumber(amount);\n return formatAmount({ value: giftaidAmount, currency: donationCode });\n };\n\n const getPaymentAmount = () =>\n formatAmount({ value: normalizeNumber(amount), currency: donationCode });\n\n return (\n
\n
\n \n \n {getPaymentAmount()}}\n extraAmount={{getGiftAidExtraAmount()}}\n />\n \n \n \n \n\n {isAlreadyEnrolled && (\n
\n \n \n \n \n
\n )}\n {!isAlreadyEnrolled && (\n }\n name=\"giftaidCheckbox\"\n id=\"giftaidCheckbox\"\n className=\"inline-block\"\n onChange={handleCheckbox}\n checked={checked}\n />\n )}\n\n {showHelp && (\n
\n
\n \n \n \n
\n {showAddress && (\n
\n \n \n \n
    \n
  • {addressData.fullName}
  • \n
  • {addressData.address1}
  • \n
  • {addressData.address2}
  • \n
  • {addressData.city}
  • \n
  • \n {addressData.state}, {addressData.zip}\n
  • \n
\n
\n )}\n
\n \n \n \n
\n
\n )}\n\n \n
\n
\n );\n};\n\nDonateGiftAid.propTypes = {\n isAlreadyEnrolled: PropTypes.bool,\n showAddress: PropTypes.bool,\n addressData: PropTypes.any,\n isChecked: PropTypes.bool,\n handleGiftAidOption: PropTypes.func,\n giftaidInfo: PropTypes.object,\n isMember: PropTypes.bool,\n};\n\nexport default DonateGiftAid;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { CriticalIcon } from '@paypalcorp/pp-react-icons';\nimport { PAYPAL_THEME } from '@paypalcorp/pp-react-theme';\nimport { trackErrorIM } from '../../fpti/fpti';\n\nconst { sysColorUnselectedContrast } = PAYPAL_THEME;\n\nconst STYLES = {\n error: {\n color: sysColorUnselectedContrast,\n fontSize: '13px',\n },\n criticalIcon: {\n color: '#D20000',\n position: 'relative',\n fontSize: 'unset',\n marginRight: '5px',\n },\n};\n\n/**\n * Component for displaying amount validation error message\n */\nclass AmountValidationError extends Component {\n componentDidMount() {\n const { errorSourceField, errorString, errorCode } = this.props;\n\n trackErrorIM({\n errorCode: errorCode || 'DONATION_AMOUNT_VALIDATION_ERROR',\n errorMessage: errorString,\n fieldName: errorSourceField,\n });\n }\n render() {\n const { errorString } = this.props;\n\n if (!errorString) {\n return null;\n }\n\n return (\n \n \n \n {errorString}\n \n \n );\n }\n}\n\nAmountValidationError.propTypes = {\n errorString: PropTypes.string,\n errorSourceField: PropTypes.string,\n errorCode: PropTypes.string,\n donationAmount: PropTypes.string,\n};\n\nexport default AmountValidationError;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { localsMessages } from '../../utility/getTemplateData';\nimport AmountValidationError from './amountValidationError.js';\n\nconst messages = localsMessages('guest/crossBorder');\n\nconst STYLES = {\n container: {\n padding: '30px 0 30px 0',\n zIndex: 1,\n },\n calcRow: {\n display: 'inline-block',\n width: '40%',\n verticalAlign: 'top',\n },\n calcRowLeft: {\n margin: '0 1% 0 9%',\n },\n calcRowRight: {\n margin: '0 9% 0 1%',\n },\n calcLabel: {\n padding: '0 0 8px 5px',\n },\n inputCol: {\n position: 'relative',\n },\n input: {\n outlineOffset: '-1px',\n fontSize: 14,\n paddingLeft: 20,\n },\n inputLeft: {\n paddingRight: '100px',\n },\n inputRight: {\n paddingRight: '60px',\n },\n fromCode: {\n position: 'absolute',\n right: '1px',\n top: '1px',\n height: '40px',\n width: '90px',\n borderTop: 0,\n borderRight: 0,\n borderBottom: 0,\n },\n toCode: {\n position: 'absolute',\n right: '15px',\n top: 0,\n lineHeight: '42px',\n },\n conversion: {\n textAlign: 'center',\n paddingTop: '30px',\n },\n disabled: {\n opacity: '0.5',\n },\n inputCurrencyLeft: {\n position: 'absolute',\n marginTop: 12,\n marginLeft: 10,\n fontSize: 14,\n },\n hasError: {\n color: 'red',\n },\n};\n\nclass Calculator extends React.Component {\n constructor() {\n super();\n const { label: { youDonate, charityGet, conversion } = {} } =\n messages || {};\n this.state = {\n youDonateLabel: youDonate,\n charityGetLabel: charityGet,\n conversionLabel: conversion,\n };\n }\n\n componentDidMount() {\n this.setFromSymbol(this.props.toCode);\n }\n\n setFromSymbol = (toCode) => {\n const symbol =\n (this.props.currencySymbols && this.props.currencySymbols[toCode]) || '';\n this.setState({\n fromSymbol: symbol,\n });\n\n let padding = symbol.length * 10 + 10;\n document.getElementById('fromAmount').style.paddingLeft = `${padding}px`;\n };\n\n validateAmount = (ev, callback) => {\n let val = ev.target.value;\n let rgx = /^[0-9]*[.|,]?[0-9]?[0-9]?$/;\n\n if (val === '.' || val === ',' || !val.match(rgx)) {\n return;\n }\n callback(val);\n };\n\n handleFromChange = (ev) => {\n this.validateAmount(ev, this.props.handleFromChange);\n };\n\n handleToChange = (ev) => {\n this.validateAmount(ev, this.props.handleToChange);\n };\n\n handleFromCurrencyChange = (ev) => {\n let val = ev.target.value;\n this.props.handleFromCurrencyChange(val);\n this.setFromSymbol(val);\n };\n\n handleAmountFocus = (event) => {\n this.props.handleAmountFocus(event);\n };\n\n getLocalizedAmount = (amount) => {\n return `${amount}`.replace(/[.|,]/i, this.props.decimalPoint);\n };\n\n render() {\n const placeholder = this.getLocalizedAmount('0.00');\n const fromAmount = this.getLocalizedAmount(this.props.fromAmount);\n const toAmount = this.getLocalizedAmount(this.props.toAmount);\n const conversionRate = `${this.getLocalizedAmount('1.00')} ${\n this.props.fromCode\n } = ${this.getLocalizedAmount(this.props.conversionRate)} ${\n this.props.toCode\n }`;\n\n const calcLabelStyle = {\n ...STYLES.calcLabel,\n ...(this.props.toError ? STYLES.hasError : {}),\n };\n\n return (\n \n
\n \n
{this.state.youDonateLabel}
\n
\n
\n \n {this.state.fromSymbol}\n \n \n
\n \n {this.props.availableCurrencies.map((c) => (\n \n ))}\n \n
\n
\n \n
{this.state.charityGetLabel}
\n
\n
\n \n {this.props.charityAmountSymbol}\n \n \n
\n {this.props.toCode}\n
\n {this.props.toError && (\n \n )}\n \n \n\n {this.props.conversionRate && (\n \n {this.state.conversionLabel} {conversionRate}\n \n )}\n \n );\n }\n}\n\nCalculator.propTypes = {\n availableCurrencies: PropTypes.array.isRequired,\n currencySymbols: PropTypes.object.isRequired,\n decimalPoint: PropTypes.string.isRequired,\n conversionRate: PropTypes.string.isRequired,\n fromAmount: PropTypes.string.isRequired,\n fromCode: PropTypes.string.isRequired,\n fromDisabled: PropTypes.bool.isRequired,\n toAmount: PropTypes.string.isRequired,\n toCode: PropTypes.string.isRequired,\n toDisabled: PropTypes.bool.isRequired,\n handleFromChange: PropTypes.func.isRequired,\n handleFromCurrencyChange: PropTypes.func.isRequired,\n handleToChange: PropTypes.func.isRequired,\n charityAmountSymbol: PropTypes.string,\n handleAmountFocus: PropTypes.func,\n toError: PropTypes.bool,\n toErrorMessage: PropTypes.string,\n};\n\nexport default Calculator;\n","import React, { useState, useEffect, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { PresetAmounts } from '@paypalcorp/donate-react';\nimport templateData from '../../utility/getTemplateData';\nimport * as AppActions from '../../actions/AppActions';\nimport AppStore from '../../stores/AppStore';\nimport {\n isOptInCoverFee,\n shouldSelectPresetAmount,\n} from '../coverFee/feeUtils';\nimport { formatAmountFromServerDNW, isRightSymbol } from './amountUtils';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\n\nfunction PresetAmountRow(props) {\n const worldready = useContext(WorldReadyContext);\n let presetOther = new MessageFormat(worldready, {\n id: 'common.amount.amount.presetOther',\n }).format();\n let placeholderOtherAmount = new MessageFormat(worldready, {\n id: 'common.amount.amount.placeholderOtherAmount',\n }).format();\n\n const getSelectedOption = () => {\n if (AppStore.getDonationAmountType() === 'preset') {\n return AppStore.getDonationAmount();\n } else if (AppStore.getDonationAmountType() === 'userinput') {\n return 'Other';\n }\n return '';\n };\n\n const [presetAmounts, setPresetAmounts] = useState(\n templateData.presetAmounts\n ),\n [selectedOption, setSelectedOption] = useState(getSelectedOption()),\n [showOtherAmount, setShowOtherAmount] = useState(\n AppStore.getDonationAmountType() === 'userinput' ? true : false\n ),\n [amountFieldValue, setAmountFieldValue] = useState(props.charityAmount);\n\n const handlePresetAmountClick = (value) => {\n setSelectedOption(value);\n if (value !== 'Other') {\n // To be consistent with the hero currency component\n // we need to update donationAmount in store with only\n // normalized number\n props.handleAmountChange(value);\n // Highlight the selected button\n setShowOtherAmount(false);\n setPresetAmounts(templateData.presetAmounts);\n // Clear the errors from amount field\n props.hideValidationError();\n\n AppActions.updateDonationAmountType('preset');\n } else {\n props.handleAmountChange('');\n AppActions.updateSelectedPresetButtonId('other');\n AppActions.updateDonationAmountType('userinput');\n trackLinkClick(LINK_NAME.PRESET_AMOUNT, {\n additionalData: {\n [FPTI_TAGS.SELECTED_PRESET_BUTTON_ID]: 'other',\n },\n });\n setShowOtherAmount(true);\n }\n };\n\n useEffect(() => {\n // In case user opts in for cover fee and goes back to\n // landing page from guest page, we need to restore back\n // user's original entered amount\n const amountBeforeFee = AppStore.getAmountBeforeFee();\n if (amountBeforeFee && isOptInCoverFee()) {\n if (shouldSelectPresetAmount(amountBeforeFee)) {\n setAmountFieldValue('');\n handlePresetAmountClick(amountBeforeFee);\n } else {\n setAmountFieldValue(amountBeforeFee);\n }\n }\n }, []);\n\n const handleAmountChange = (amount) => {\n if (amount > 0) {\n props.handleAmountChange(amount);\n }\n };\n\n const getPresetOptions = (values, symbol, charityAmountCode) => {\n const result = values.map((value) => {\n let amountDisplayValue;\n\n if (isRightSymbol()) {\n amountDisplayValue = symbol\n ? `${formatAmountFromServerDNW(value, {\n noDecimals: true,\n })} ${symbol}`\n : `${formatAmountFromServerDNW(value, {\n noDecimals: true,\n })}`;\n } else {\n amountDisplayValue = symbol\n ? `${symbol} ${formatAmountFromServerDNW(value, {\n noDecimals: true,\n })}`\n : `${formatAmountFromServerDNW(value, {\n noDecimals: true,\n })}`;\n }\n\n return {\n label: amountDisplayValue,\n secondaryLabel: charityAmountCode,\n value,\n };\n });\n return [...result, { label: presetOther, value: 'Other' }];\n };\n\n const presetOptions = getPresetOptions(\n presetAmounts,\n props.charityAmountSymbol,\n props.charityAmountCode\n );\n\n return (\n <>\n \n \n );\n}\n\nPresetAmountRow.propTypes = {\n hideValidationError: PropTypes.func,\n handleAmountChange: PropTypes.func,\n handleAmountFocus: PropTypes.func,\n charityAmount: PropTypes.string,\n showValidationError: PropTypes.bool,\n charityAmountSymbol: PropTypes.string,\n charityAmountCode: PropTypes.string,\n decimalPoint: PropTypes.string,\n isAmountEditable: PropTypes.bool,\n validationErrorMessage: PropTypes.string,\n validationErrorCode: PropTypes.string,\n};\nexport default PresetAmountRow;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport _debounce from 'lodash/debounce';\nimport AppStore from '../stores/AppStore';\nimport * as AppActions from '../actions/AppActions';\nimport TemplateData from '../utility/getTemplateData';\nimport { fetcher } from '../utility/domUtils';\nimport { SingleAmount } from '@paypalcorp/donate-react';\nimport { BodyText } from '@paypalcorp/pp-react';\nimport Calculator from '../components/amount/calculator';\nimport PresetAmountRow from './amount/PresetAmountRow';\nimport {\n setFeeAmountInStore,\n optOutCoverFee,\n isAtLandingPage,\n isOptInCoverFee,\n} from './coverFee/feeUtils';\nimport AppDispatcher from '../dispatcher/AppDispatcher';\nimport { getParameterByName } from '../utility/queryStringHelper';\nimport { __getInitialData } from '../utility/formator';\nimport { trackErrorIM } from '../fpti/fpti';\nimport { addFeature } from '../fpti/helper';\nimport { FEATURES } from '../fpti/fptiConstants';\nimport { getWorldReady } from '../utility/worldReadyUtils';\nimport { MessageFormat } from '@paypalcorp/worldready';\n\nclass AmountWrapper extends React.Component {\n constructor(props) {\n super(props);\n const currencyObj = JSON.parse(\n document.getElementById('currencyLists').innerHTML || {}\n );\n const { currencies: currencyLists, symbols: currencySymbols } =\n currencyObj || {};\n const html = document.getElementsByTagName('html')[0];\n this.directionality = html.getAttribute('dir');\n\n let userCountry = TemplateData.donorIpCountry;\n let availableCurrencies = currencyLists[userCountry] || currencyLists.US;\n let userAmountCode = availableCurrencies[0];\n let charityAmountCode = AppStore.getDonationCode();\n let isEditable = !!TemplateData.donationAmountEditable;\n // let showCBCalculator = TemplateData.pxp && TemplateData.pxp.calculator && TemplateData.pxp.calculator.experiment || false;\n\n let isCalculator = false;\n // Disabled Calculator\n // let isCalculator =\n // \tisEditable &&\n // \tuserAmountCode !== charityAmountCode &&\n // \t(showCBCalculator || TemplateData.isCorpIp);\n\n this.state = {\n charityAmountCode,\n charityAmount: AppStore.getDonationAmount() || '',\n charityAmountSymbol: AppStore.getDonationSymbol(),\n charityDisabled: false,\n\n userCountry,\n userAmountCode,\n userAmount: '',\n userDisabled: false,\n\n availableCurrencies,\n currencySymbols,\n isCalculator,\n decimalPoint: TemplateData.donationDecimalPoint || '.',\n conversionRate: '',\n isAmountEditable: isEditable,\n\n showValidationError: props.showValidationError || false,\n validationErrorMessage: props.validationErrorMessage || '',\n validationErrorCode: props.validationErrorCode || '',\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.showValidationError !== nextProps.showValidationError) {\n this.setState({\n showValidationError: nextProps.showValidationError,\n validationErrorMessage: nextProps.validationErrorMessage,\n validationErrorCode: nextProps.validationErrorCode,\n });\n }\n }\n\n componentDidMount = () => {\n // Watch for amount change for the case that donor opts in to cover fee\n // and clicks back button to go back to landing page\n // as we need to restore donor's original entered amount\n this.dispatcherCharityAmount = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_AMOUNT') {\n const { action: { item: { amount = 0 } = {} } = {} } = payload;\n this.setState({\n charityAmount: amount,\n });\n }\n });\n\n if (this.state.isAmountEditable) {\n addFeature(FEATURES.DONATION_AMOUNT_EDITABLE);\n }\n };\n\n componentWillUnmount = () => {\n AppDispatcher.unregister(this.dispatcherCharityAmount);\n };\n\n isGuestReviewPage = () => {\n return (\n window.location.pathname.includes('guest') ||\n ![undefined, null].includes(getParameterByName('signup'))\n );\n };\n\n normalizeAmount = (amount) => {\n return isNaN(amount) ? 0 : amount;\n };\n\n setAppAmount = (amount) => {\n AppActions.changeAmount({\n amount,\n });\n };\n\n getConversionRate = (state, exchangeRate) => {\n let rate =\n exchangeRate.base_currency_code === state.userAmountCode\n ? exchangeRate.quote_amount\n : 1 / exchangeRate.quote_amount;\n return rate.toFixed(2);\n };\n\n getConversionRequest = (state, params, callback) => {\n this.getConversionRequest = _debounce((st, par, fn) => {\n const queryParams = {\n fromCountry: st.userCountry,\n fromCurrency: st.userAmountCode,\n toCurrency: st.charityAmountCode,\n ...par,\n };\n\n if (queryParams.fromAmount) {\n queryParams.fromAmount = this.normalizeAmount(queryParams.fromAmount);\n } else {\n queryParams.toAmount = this.normalizeAmount(queryParams.toAmount);\n }\n const url = '/donate/calculate-foreign-exchange';\n this.props.conversionStatus(true);\n Promise.resolve(\n fetcher(url, {\n method: 'POST',\n body: JSON.stringify(queryParams),\n })\n )\n .then((response) => response.json())\n .then(({ result }) => {\n this.props.conversionStatus(false);\n fn(result);\n })\n .catch(() => {\n this.props.conversionStatus(false);\n let amount = queryParams.fromAmount || queryParams.toAmount || '';\n amount += '';\n fn({\n target: { value: amount },\n source: { value: amount },\n exchange_rate: {\n base_currency_code: queryParams.userAmountCode,\n quote_amount: 1,\n },\n });\n });\n }, 500);\n\n this.getConversionRequest(state, params, callback);\n };\n\n /*\n * getConversion\n * Getting conversion rate for calculator\n */\n getConversion = (state, params, fn) => {\n // Conversion is only required for calculator\n if (state.isCalculator) {\n this.getConversionRequest(state, params, fn);\n } else {\n const amount = params.fromAmount || params.toAmount || '';\n fn({\n target: { value: amount },\n source: { value: amount },\n exchange_rate: {\n base_currency_code: state.userAmountCode,\n quote_amount: 1,\n },\n });\n }\n };\n\n handleAmountChange = (amount) => {\n this.setState({ charityAmount: amount });\n this.setAppAmount(amount);\n\n // let recurringStatus = AppStore.getDonationRecurring() === 'checked';\n // if (recurringStatus) {\n // if (isAmountGreaterThanZero(amount)) {\n // $('#donateNowAmt').html(this.state.charityAmountSymbol + amount);\n // } else {\n // $('#donateNowAmt').html(' ');\n // }\n // }\n\n if (isAtLandingPage()) {\n // Compute fee amount and update store\n setFeeAmountInStore();\n // Let landing page know that fee amount displayed needs to be updated\n this.props.updateFeeAmount();\n } else {\n // Since user updates the amount in the guest page\n // we should opt user out for cover the fee in case\n // they go back to landing page\n if (isOptInCoverFee()) {\n optOutCoverFee();\n }\n\n // In case user selects a preset button but update the amount\n // in review page, the donation amount type should now be\n // \"userinput\"\n if (AppStore.getDonationAmountType() === 'preset') {\n AppActions.updateDonationAmountType('userinput');\n }\n }\n };\n\n handleAmountFocus() {\n this.props.onFocus();\n }\n\n handleUserAmountChange = (amount) => {\n let snapshot = {\n userAmount: amount,\n charityDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n fromAmount: state.userAmount,\n },\n ({ target, exchange_rate }) => {\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n charityAmount: target.value,\n charityDisabled: false,\n });\n this.setAppAmount(target.value);\n }\n );\n };\n\n handleUserCurrencyChange = (currencyCode) => {\n let snapshot = {\n userAmountCode: currencyCode,\n charityDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n fromAmount: state.userAmount,\n },\n ({ target, exchange_rate }) => {\n state.charityAmount = target.value;\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n charityAmount: state.charityAmount,\n charityDisabled: false,\n });\n this.setAppAmount(target.value);\n }\n );\n };\n\n handleCharityAmountChange = (amount) => {\n let snapshot = {\n charityAmount: amount,\n userDisabled: true,\n };\n let state = { ...this.state, ...snapshot };\n this.setState(snapshot);\n\n this.getConversion(\n state,\n {\n toAmount: state.charityAmount,\n },\n ({ source, exchange_rate }) => {\n this.setState({\n conversionRate: this.getConversionRate(state, exchange_rate),\n userAmount: source.value,\n userDisabled: false,\n });\n this.setAppAmount(state.charityAmount);\n }\n );\n };\n\n handleTrackError = (errorCode, errorString, errorSourceField) => {\n trackErrorIM({\n errorCode: errorCode || 'DONATION_AMOUNT_VALIDATION_ERROR',\n errorMessage: errorString,\n fieldName: errorSourceField,\n });\n };\n\n shouldShowPresetAmounts = () => {\n // Should only show preset amount options in landing\n // page not review page to make the experience consistent\n // with member flow. It works better for cover the fees as well\n\n const presetAmountsCondition =\n TemplateData.enablePresetAmounts &&\n !this.state.isCalculator &&\n !this.isGuestReviewPage();\n\n if (presetAmountsCondition) {\n addFeature(FEATURES.PRESET);\n }\n\n return presetAmountsCondition;\n };\n\n renderPresetAmounts = () => {\n return (\n \n );\n };\n\n getRecurringLabel = () => {\n const worldReady = getWorldReady();\n switch (this.props.selectedRecurringFrequency) {\n case 'Week':\n return new MessageFormat(worldReady, {\n id: 'guest.guestForm.label.perWeek',\n }).format();\n case 'Month':\n return new MessageFormat(worldReady, {\n id: 'guest.guestForm.label.perMonth',\n }).format();\n case 'Year':\n return new MessageFormat(worldReady, {\n id: 'guest.guestForm.label.perYear',\n }).format();\n default:\n return null;\n }\n };\n\n render() {\n if (this.shouldShowPresetAmounts()) {\n return (\n
\n {this.renderPresetAmounts()}\n
\n );\n }\n\n return (\n
\n {this.state.isCalculator ? (\n \n ) : (\n <>\n \n \n {AppStore.getDonationRecurring() === 'checked' && (\n {this.getRecurringLabel()}\n )}\n
\n \n )}\n \n );\n }\n}\n\nAmountWrapper.propTypes = {\n conversionStatus: PropTypes.func,\n showValidationError: PropTypes.bool,\n hideValidationError: PropTypes.func,\n validationErrorMessage: PropTypes.string,\n validationErrorCode: PropTypes.string,\n validateDonationAmount: PropTypes.func,\n onFocus: PropTypes.func,\n updateFeeAmount: PropTypes.func,\n selectedRecurringFrequency: PropTypes.string,\n};\n\nexport default AmountWrapper;\n","/**\n * Card security code input used for adding a card\n */\nimport React from 'react';\nimport { TextInput } from '@paypalcorp/pp-react';\nimport PropTypes from 'prop-types';\n\nimport { cardSpecPropType } from 'prop-validators';\n\nclass CardSecurityCode extends React.Component {\n static propTypes = {\n cardSpec: cardSpecPropType,\n label: PropTypes.string.isRequired,\n errorMessage: PropTypes.string,\n handleChangeSecurityCode: PropTypes.func.isRequired,\n handleFocus: PropTypes.func,\n handleBlur: PropTypes.func,\n dir: PropTypes.string,\n helperText: PropTypes.string,\n };\n\n static defaultProps = {\n handleFocus: () => {},\n handleBlur: () => {},\n };\n\n state = { value: '', showIsRequiredError: false };\n\n /**\n * Handle changing the csc\n * @param {String} securityCode - the csc\n * @return {String} securityCode - numbers only\n */\n handleChangeSecurityCode = ({ target: { value: securityCode } }) => {\n securityCode = securityCode.replace(/\\D+/g, '');\n this.setState({ value: securityCode });\n this.handleCheckForValue(securityCode);\n this.props.handleChangeSecurityCode(securityCode);\n return securityCode;\n };\n\n /**\n * Check for a security code value\n * If the field is required, we should show that this field needs a value\n * @param {String} securityCode - the csc\n */\n handleCheckForValue = (securityCode) => {\n const cscSpecs = this.props.cardSpec.fields.csc;\n const isRequired = cscSpecs.required;\n this.setState({ showIsRequiredError: isRequired && !securityCode });\n };\n\n /**\n * Call parent's handleFocus\n * @param {String} securityCode - the csc\n */\n handleFocus = (securityCode) => {\n this.props.handleFocus(securityCode);\n };\n\n /**\n * Check for a security code value and call parent's handleBlur\n * @param {String} securityCode - the csc\n */\n handleBlur = ({ target: { value: securityCode } }) => {\n this.handleCheckForValue(securityCode);\n this.props.handleBlur(securityCode);\n };\n\n render() {\n const cscSpecs = this.props.cardSpec.fields.csc;\n // let helpText = '●'.repeat(cscSpecs.maxlength)\n let { errorMessage } = this.props;\n\n return (\n
\n \n
\n );\n }\n}\n\nexport default CardSecurityCode;\n","import React, { Component } from 'react';\nimport AppStore from '../../stores/AppStore';\nimport _get from 'lodash/get';\nimport { getPaymentCardNetwork } from '../../utility/card-utils';\nimport { StyleSheet, css } from 'aphrodite';\nimport _isEmpty from 'lodash/isEmpty';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { appendCdnHostName } from '../../utility/geoUtils';\nimport withTheme from '../../components/withTheme';\nimport { BodyText, HeadingText } from '@paypalcorp/pp-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\n\nconst LOADING_GIF_SOURCE = appendCdnHostName(\n '/ui-web/money-icons/partnerships/mbLoader_256_sm.gif'\n);\n\nconst STYLES = StyleSheet.create({\n spinnerAlign: {\n margin: '30px auto 30px',\n },\n cardImg: {\n marginTop: '24px',\n },\n});\n\nclass ThreeDSSpinner extends Component {\n constructor(props) {\n super(props);\n this.state = {\n cardImg: null,\n network: null,\n };\n }\n\n setNetworkDetails = () => {\n const fundingOptions = AppStore.getFundingOptions();\n let cardImg = _get(\n fundingOptions,\n 'sources[0].payment_card.issuer.thumbnail_logo_url'\n );\n let network = getPaymentCardNetwork(\n _get(fundingOptions, 'sources[0].payment_card')\n );\n let myData = AppStore.getAllData() || {};\n if (\n cardImg === null ||\n _isEmpty(cardImg) ||\n typeof cardImg === 'undefined'\n ) {\n const cardType = _get(myData, 'cardSpec.cardSpec.type', '')\n .replace(/[.,_]|\\s\\(.*\\)/g, '')\n .replace(/[\\s_]/g, '-')\n .toLowerCase();\n cardImg = appendCdnHostName(\n `/digitalassets/c/consumer/p2p/funding-sources/${cardType}.png`\n );\n }\n if (\n network === null ||\n _isEmpty(network) ||\n typeof network === 'undefined'\n ) {\n network = myData.cardSpec.cardSpec.type.replace(/[_]/g, ' ');\n }\n this.setState({ cardImg, network });\n };\n\n componentDidMount() {\n // Hide the donate spinner in the background\n // to prevent double spinners\n hideSpinnerOverlay();\n this.setNetworkDetails();\n }\n\n render() {\n const worldReady = this.context;\n return (\n
\n
\n
\n {/*
*/}\n
\n \n
\n \n {new MessageFormat(worldReady, {\n id: 'common.threeDSecure.confirmingWith',\n }).format({\n network: this.state.network,\n })}\n \n
\n {this.state.cardImg ? (\n \"Card\n ) : (\n ''\n )}\n
\n
\n \n {new MessageFormat(worldReady, {\n id: 'common.threeDSecure.wontTakeLong',\n }).format()}\n \n \n {new MessageFormat(worldReady, {\n id: 'common.threeDSecure.DoNotCloseOrRefresh',\n }).format()}\n \n
\n
\n
\n
\n );\n }\n}\n\nThreeDSSpinner.contextType = WorldReadyContext;\n\nexport default withTheme(ThreeDSSpinner);\n","import React, { Component } from 'react';\nimport AppStore from '../../stores/AppStore';\nimport { withRouter } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport _get from 'lodash/get';\nimport _find from 'lodash/find';\nimport { trackThreeDsDdcFailure } from '../../fpti/fpti';\nimport { FPTI_TAGS } from '../../fpti/fptiConstants';\n\nclass ThreeDSDeviceDataCollection extends Component {\n static propTypes = {\n onThreeDSDDCComplete: PropTypes.func,\n };\n\n getThreeDSParams() {\n const fundingOptions = AppStore.getFundingOptions();\n const contingencies = _get(fundingOptions, 'contingencies') || [];\n const threeDSContingency =\n _find(contingencies, { action: '3D_SECURE_DATA_COLLECTION_REQUIRED' }) ||\n {};\n\n return threeDSContingency;\n }\n\n componentDidMount() {\n // 'message' is passed after 3DS Submit is completed\n window.addEventListener('message', this.handleDDCEvent);\n\n const { three_ds_reference_id: threeDS2ReferenceId } =\n this.getThreeDSParams();\n\n if (this.refs[threeDS2ReferenceId]) {\n try {\n this.refs[threeDS2ReferenceId].submit();\n } catch (e) {\n console.log('e ', e);\n }\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('message', this.handleDDCEvent);\n }\n\n handleDDCEvent = (event) => {\n const eventOrigin = _get(event, 'origin', '');\n if (eventOrigin.includes('cardinalcommerce.com')) {\n let data = null;\n try {\n data = JSON.parse(event.data);\n } catch (exception) {\n // Error handler incase parsing goes wrong\n data = {};\n }\n\n const messageType = _get(data, 'MessageType', '');\n if (messageType === 'profile.completed') {\n this.onDDCComplete(event);\n } else {\n trackThreeDsDdcFailure({\n [FPTI_TAGS.STATUS]: messageType,\n });\n console.log('DDC not completed with message type: ', messageType);\n }\n }\n };\n\n onDDCComplete = (event) => {\n this.props.onThreeDSDDCComplete(event);\n };\n\n render() {\n const {\n device_data_collection_url: deviceDataCollectionUrl,\n jwt,\n three_ds_reference_id: threeDS2ReferenceId,\n } = this.getThreeDSParams();\n\n if (!deviceDataCollectionUrl) {\n return null;\n }\n\n return (\n
\n \n
\n \n );\n };\n\n render() {\n return (\n \n {this.getModalBody()}\n \n );\n }\n}\n\nThreeDSIframe.contextType = WorldReadyContext;\n\nThreeDSIframe.propTypes = {\n onStepUpAuthComplete: PropTypes.func,\n icon: PropTypes.string,\n hideModal: PropTypes.func,\n isOpen: PropTypes.bool,\n onClose: PropTypes.func,\n};\nexport default withTheme(ThreeDSIframe);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Portal } from 'react-portal';\nimport ThreeDSSpinner from './ThreeDSSpinner';\nimport ThreeDSDeviceDataCollection from './ThreeDSDeviceDataCollection';\nimport ThreeDSIframe from './ThreeDSIframe';\nimport * as AppActions from '../../actions/AppActions';\nimport _get from 'lodash/get';\nimport { fetcher } from '../../utility/domUtils';\nimport { FPTI_TAGS } from '../../fpti/fptiConstants';\nimport templateData from '../../utility/getTemplateData';\nimport {\n trackThreeDsDdcComplete,\n trackThreeDsDdcStart,\n trackThreeDsLookupComplete,\n trackThreeDsLookupStart,\n} from '../../fpti/fpti';\n\nclass ThreeDSContainer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n showThreeDSIframe: false,\n showThreeDSSpinner: false,\n showThreeDSDeviceDataCollection: false,\n threeDSDCCStartTime: null,\n };\n }\n\n componentDidMount() {\n this.props.onRef(this);\n }\n\n componentWillUnmount() {\n this.props.onRef(undefined);\n }\n\n initializeThreeDS() {\n let startTime = new Date().getTime();\n this.setState({\n showThreeDSDeviceDataCollection: true,\n showThreeDSSpinner: true,\n threeDSDCCStartTime: startTime,\n });\n\n const fptiData = {\n [FPTI_TAGS.THREE_DS_DCC_START_TIME]: startTime,\n [FPTI_TAGS.THREE_DS_SPINNER_START_TIME]: startTime,\n };\n trackThreeDsDdcStart(fptiData);\n }\n\n handleThreeDSDDCComplete = () => {\n this.setState({\n showThreeDSDeviceDataCollection: false,\n });\n\n const threeDSDCCEndTime = new Date().getTime();\n const fptiData = {\n [FPTI_TAGS.THREE_DS_DCC_START_TIME]: this.state.threeDSDCCStartTime,\n [FPTI_TAGS.THREE_DS_DCC_END_TIME]: threeDSDCCEndTime,\n [FPTI_TAGS.THREE_DS_SPINNER_START_TIME]: this.state.threeDSDCCStartTime,\n [FPTI_TAGS.THREE_DS_SPINNER_END_TIME]: threeDSDCCEndTime,\n };\n trackThreeDsDdcComplete(fptiData);\n this.resolveThreeDSContingency();\n };\n\n resolveThreeDSContingency = () => {\n trackThreeDsLookupStart({\n [FPTI_TAGS.THREE_DS_LOOKUP_START_TIME]: new Date().getTime(),\n });\n\n fetcher('/donate/guest/resolve-threeds-contingency', {\n method: 'POST',\n body: JSON.stringify({\n token: templateData.token,\n onboardingEnabled: templateData.onboardingEnabled,\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n this.hideThreeDSSpinner();\n\n const threeDSContingency = _get(result, 'data.threeDSContingency');\n const resolved = _get(threeDSContingency, 'threeDSContingencyResolved');\n\n trackThreeDsLookupComplete({\n timestamp: {\n [FPTI_TAGS.THREE_DS_LOOKUP_END_TIME]: new Date().getTime(),\n },\n [FPTI_TAGS.CONTINGENCY_RESOLVED]: resolved,\n [FPTI_TAGS.URL]: _get(\n threeDSContingency,\n 'threeDS2Contingency.3d_secure_redirect_link'\n ),\n [FPTI_TAGS.ACTION]: _get(\n threeDSContingency,\n 'threeDS2Contingency.action'\n ),\n });\n\n if (resolved) {\n // 3DS Contingency resolved without StepUp Auth\n this.props.onThreeDSStepUpAuthNotRequired();\n\n return;\n }\n // Save threeDS data and show 3DS iframe\n AppActions.updateThreeDSData(threeDSContingency);\n this.showThreeDSIframe();\n })\n .catch((e) => {\n // Clear 3DS data\n AppActions.updateThreeDSData({});\n this.hideThreeDSIframe();\n this.props.onThreeDSFailure();\n });\n };\n\n handleThreeDSStepUpAuthComplete = ({ confirmationStatus = false, error }) => {\n if (confirmationStatus && confirmationStatus === 'threeDS-success') {\n this.props.onThreeDSStepUpAuthSuccess();\n } else {\n this.props.onThreeDSStepUpAuthFailure();\n return;\n }\n };\n\n showThreeDSIframe = () => {\n this.setState({\n showThreeDSIframe: true,\n });\n };\n\n hideThreeDSIframe = () => {\n this.setState({\n showThreeDSIframe: false,\n });\n };\n\n showThreeDSSpinner = () => {\n this.setState({\n showThreeDSSpinner: true,\n });\n };\n hideThreeDSSpinner = () => {\n this.setState({\n showThreeDSSpinner: false,\n });\n };\n\n render() {\n return (\n
\n {this.state.showThreeDSSpinner && (\n \n \n \n )}\n\n {this.state.showThreeDSDeviceDataCollection && (\n \n )}\n\n {this.state.showThreeDSIframe && (\n \n )}\n
\n );\n }\n}\n\nThreeDSContainer.propTypes = {\n onThreeDSStepUpAuthNotRequired: PropTypes.func,\n onThreeDSStepUpAuthSuccess: PropTypes.func,\n onThreeDSStepUpAuthFailure: PropTypes.func,\n onThreeDSFailure: PropTypes.func,\n onRef: PropTypes.func,\n toggleSpinner: PropTypes.func,\n};\n\nexport default ThreeDSContainer;\n","import React, { Component } from 'react';\nimport templateData from '../../utility/getTemplateData';\nimport {\n handleGuestCountryChange,\n hideSpinnerOverlay,\n showSpinnerOverlay,\n} from '../../utility/helper';\nimport * as DonateAppActions from '../../actions/AppActions';\nimport { getInitialData } from '../../utility/formator';\nimport AppStore from '../../stores/AppStore';\nimport { getParametersFromUrl } from '../../utility/queryStringHelper';\nimport PropTypes from 'prop-types';\nimport { startCustomCPLTrackingForConfirmationPage } from '../../utility/cpl';\nimport {\n fetcher,\n scrollElementIntoView,\n objectOrArrayToQueryString,\n} from '../../utility/domUtils';\nimport isEmpty from 'lodash/isEmpty';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { getWorldReady } from '../../utility/worldReadyUtils';\n\nconst initialData = getInitialData();\n\nconst ERROR_ELEMENT_SELECTOR = [\n '.vx_has-error-with-message',\n '.service_error_holder',\n].join();\n\nfunction withDonate(WrappedComponent) {\n const worldReady = getWorldReady();\n\n return class extends Component {\n static propTypes = {\n history: PropTypes.object,\n };\n\n constructor(props) {\n super(props);\n this.country = initialData.selectedCountry;\n }\n\n handleCountryChange = (country) => {\n if (country !== this.country) {\n this.toggleSpinner(true);\n DonateAppActions.changeCountry({\n country: country,\n });\n this.country = country;\n\n // Beacons for country change\n trackLinkClick(LINK_NAME.CHANGE_COUNTRY, {\n additionalData: {\n [FPTI_TAGS.COUNTRY]: country,\n },\n });\n\n let { token, signUp = false } = templateData;\n let url = signUp\n ? `/donate?token=${token}&signup=true&country.x=${country}&locale.x=${country}`\n : `/donate?token=${token}&country.x=${country}&locale.x=${country}&countryChange=true&clientState=/donate/guest?token=${token}`;\n\n handleGuestCountryChange(url);\n }\n };\n\n /*\n * showing and hiding spinner\n */\n toggleSpinner = (isSpinner = false) => {\n if (isSpinner) {\n showSpinnerOverlay();\n } else {\n hideSpinnerOverlay();\n }\n };\n\n // handles scrolling screen to the error\n handleScrollToError = () => {\n scrollElementIntoView(ERROR_ELEMENT_SELECTOR);\n return;\n };\n\n getDonateGuestUrl = () => {\n const { token, country, language } = templateData;\n\n let url = `/donate/guest?token=${token}`;\n if (country) {\n url = url + `&country.x=${country}`;\n }\n\n if (country && language) {\n url = url + `&locale.x=${country}_${language}`;\n }\n\n return url;\n };\n\n getFormData() {\n return AppStore.getFormData();\n }\n\n saveFormData(formData) {\n DonateAppActions.saveFormData(formData);\n }\n\n showErrorOnLoad() {\n const url = window.location.href;\n let params = getParametersFromUrl(url);\n\n if (params.showErrorOnLoad) {\n if (params.showErrorOnLoad === 'fulfillment') {\n // TODO: update error code to the actual fullfilment error code\n let errorCode = 'WSM_TRANSACTION_FAILED_DUE_TO_INVALID_CARD_DATA';\n let errorMsgs = [\n {\n key: 0,\n value: new MessageFormat(worldReady, {\n id: `errors.service.${errorCode}`,\n }).format(),\n },\n ];\n\n // adding delay to wait for the dispatcher to get registered in ServerErrors\n setTimeout(\n () =>\n DonateAppActions.updateServerErrors({ serverErrors: errorMsgs }),\n 250\n );\n }\n // delete params.showErrorOnLoad;\n\n // const query = $.param(params);\n // const cleanedUrl = `/donate/guest/?${query}`;\n // window.history.replaceState({}, document.title, cleanedUrl);\n }\n }\n\n doFulfilment = (params = {}) => {\n const { securityCode } = params;\n this.toggleSpinner(true);\n\n fetcher('/donate/guest/fullfilment', {\n method: 'POST',\n body: JSON.stringify({\n token: templateData.token,\n note: AppStore.getDonationNote(),\n fundingOptionId: AppStore.getFundingOptions().id,\n email: AppStore.getEmail(),\n billingAddress: AppStore.getBillingAddress(),\n giftAidItFlag: AppStore.getGiftaidItFlagStatus() || false,\n card: { securityCode },\n onboardingEnabled: templateData.onboardingEnabled,\n selectedRecurringFrequency: AppStore.getSelectedRecurringFrequency(),\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n if (result.code === 'WSM_PAYMENT_DENIED') {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n return;\n } else if (result.status === 'redirect') {\n this.toggleSpinner(false);\n window.location.href = result.url;\n return;\n } else if (\n result.code === 'WSM_TRANSACTION_FAILED_DUE_TO_INVALID_CARD_DATA'\n ) {\n // fulfillment error\n const { token, country } = templateData;\n\n let clientState = encodeURIComponent(\n `/donate/guest?token=${token}&showErrorOnLoad=fulfillment`\n );\n window.location.href = `/donate?token=${token}&country.x=${country}&locale.x=${country}&clientState=${clientState}`;\n return;\n } else if (result.data && result.data.confirmationData) {\n startCustomCPLTrackingForConfirmationPage();\n this.toggleSpinner(false);\n const { token } = templateData;\n let confirmationData = result.data.confirmationData || {};\n const { selectedRecurringFrequency } = confirmationData;\n const queryParams = objectOrArrayToQueryString({\n token,\n selectedRecurringFrequency,\n });\n\n DonateAppActions.updateConfirmation({\n confirmation: confirmationData,\n });\n if (confirmationData.isOfacPending) {\n this.props.history.push(`/donate/guest/pending?${queryParams}`);\n } else {\n this.props.history.push(\n `/donate/guest/confirmation?${queryParams}`\n );\n }\n } else {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n }\n })\n .catch(() => {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n });\n };\n\n createOrder = (params) => {\n const token = templateData.token;\n\n fetcher(`/donate/orders?dtoken=${token}`, {\n method: 'POST',\n body: JSON.stringify(params),\n })\n .then((response) => response.json())\n .then((result) => {\n console.log('result ', result);\n\n if (!isEmpty(result.cartUrl)) {\n window.location.href = result.cartUrl;\n } else {\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n }\n })\n .catch(() => {\n this.toggleSpinner(false);\n this.props.history.push(\n `/donate/error/payment?token=${templateData.token}`\n );\n });\n };\n\n captureOrder = (orderToken, donateToken, payerID) => {\n return fetcher(\n `/donate/orders/${orderToken}/capture?dtoken=${donateToken}&PayerID=${payerID}`,\n {\n method: 'POST',\n }\n );\n };\n\n render() {\n return (\n \n );\n }\n };\n}\n\nexport default withDonate;\n","/**\n * Card Utilities\n * For use with linking a card\n *\n * - get card type [visa, mastercard, amex, discover, maestro, unionpay] based on the card number\n */\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { getWorldReady } from './worldReadyUtils';\n\nexport const defaultCardSpec = {\n type: 'card',\n fields: {\n ccNumber: {\n required: true,\n pattern: '4[0-9]{12}(?:[0-9]{3})?',\n maxlength: 19,\n },\n expirationDate: {\n required: true,\n pattern: '(0[1-9]|1[012])[/]((20)[0-9]{2}|[0-9]{2})',\n maxlength: 7,\n },\n csc: {\n required: true,\n pattern: '[0-9]*',\n maxlength: 3,\n minlength: 3,\n },\n },\n};\n\n/**\n * Get the card type based on the card number\n * @param {Object} cardSpecs - the card specifications based on user's locale\n * @param {String} cardNumber - the valid card number (numbers only)\n * @return {Object} cardType - the card type specs for a specific card\n */\nexport function getSpecificCardSpec({ cardTypes }, cardNumber) {\n cardNumber = cardNumber.replace(/\\D+/g, '');\n\n for (let card in cardTypes) {\n let cardSpec = cardTypes[card];\n if (\n new RegExp(`^${cardSpec.fields.ccNumber.autodetect}$`).test(cardNumber)\n ) {\n return cardSpec;\n }\n }\n return defaultCardSpec;\n}\n\nconst PAYMENT_CARDS = {\n VISA: 'VISA',\n MASTERCARD: 'MASTERCARD',\n MASTER_CARD: 'MASTER_CARD',\n MAESTRO: 'MAESTRO',\n AMEX: 'AMEX',\n DISCOVER: 'DISCOVER',\n JCB: 'JCB',\n CHINA_UNION_PAY: 'CHINA_UNION_PAY',\n};\n\nexport function getPaymentCardNetwork(source) {\n const worldReady = getWorldReady();\n switch (source.network) {\n case PAYMENT_CARDS.VISA:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.visa',\n }).format();\n case PAYMENT_CARDS.MASTERCARD:\n case PAYMENT_CARDS.MASTER_CARD:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.mastercard',\n }).format();\n case PAYMENT_CARDS.MAESTRO:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.maestro',\n }).format();\n case PAYMENT_CARDS.AMEX:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.amex',\n }).format();\n case PAYMENT_CARDS.DISCOVER:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.discover',\n }).format();\n case PAYMENT_CARDS.CHINA_UNION_PAY:\n return new MessageFormat(worldReady, {\n id: 'common.fundingTypes.fundingType.china_union_pay',\n }).format();\n default:\n return source.network;\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { CriticalIcon } from '@paypalcorp/pp-react-icons';\n\nexport default function NoteFieldError(props) {\n const errorText = props.errorText;\n\n if (!errorText) {\n return null;\n }\n return (\n
\n \n \n \n {errorText}\n \n \n
\n );\n}\n\nNoteFieldError.propTypes = {\n errorText: PropTypes.string,\n};\n","import React, { useState, useEffect, useRef, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport templateData from '../utility/getTemplateData';\nimport * as AppActions from '../actions/AppActions';\nimport AppStore from '../stores/AppStore';\nimport { addClass, removeClass } from '../utility/domUtils';\nimport {\n isExternalFlow,\n isCampaigns,\n} from '../utility/productIntegrationUtils';\nimport isEmpty from 'lodash/isEmpty';\nimport { EVENT_NAME } from '../utility/constants';\nimport { IconButton, TextArea, BodyText, AddIcon } from '@paypalcorp/pp-react';\nimport NoteFieldError from './NoteFieldError';\nimport { trackLinkClick } from '../fpti/fpti';\nimport { LINK_NAME } from '../fpti/fptiConstants';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\n\nconst MAX_CHAR_LIMIT = 250;\n\nfunction NoteComponent(props) {\n const worldReady = useContext(WorldReadyContext);\n\n let label = new MessageFormat(worldReady, {\n id: 'common.note.note.label',\n }).format();\n let lengthLimit = new MessageFormat(worldReady, {\n id: 'common.note.note.error.lengthLimit',\n }).format();\n let campaignsLabel = new MessageFormat(worldReady, {\n id: 'common.note.note.campaigns.label',\n }).format();\n\n let providedLabel = isCampaigns() ? campaignsLabel : label;\n\n if (templateData.charityNoteEnabled && templateData.charityNoteLabel) {\n providedLabel = templateData.charityNoteLabel;\n }\n\n if (props.label) {\n providedLabel = props.label;\n }\n\n const [donationNote, setDonationNote] = useState(\n AppStore.getDonationNote() || templateData.donationNote || ''\n );\n const initialNoteLabel = isEmpty(donationNote) ? providedLabel : donationNote;\n\n const [showLabel, setShowLabel] = useState(true);\n const [showError, setShowError] = useState(false);\n const [noteLabel, setNoteLabel] = useState(initialNoteLabel);\n const textAreaEl = useRef(null);\n\n const isNoteTextPresent = donationNote.length > 0 ? true : false;\n\n useEffect(() => {\n if (!showLabel && !isEmpty(textAreaEl)) {\n textAreaEl.current.focus();\n }\n }, [showLabel]);\n useEffect(() => {\n if (isNoteTextPresent) {\n setShowLabel(false);\n }\n }, []);\n useEffect(() => {\n if (props.isNotePreview) {\n setNoteLabel(initialNoteLabel);\n }\n }, [initialNoteLabel]);\n\n const directionality = templateData.contextLocalityDir;\n\n const handleClick = () => {\n trackLinkClick(LINK_NAME.NOTE_PAD, {\n eventName: isExternalFlow()\n ? EVENT_NAME.DW_GIVING_DONATE_SETUP_COMMENT_PRESSED\n : '',\n });\n setShowLabel(false);\n };\n\n const handleBlur = (event) => {\n const note = event.target.value;\n\n // Remove all whitespaces\n if (!isEmpty(note) && !isEmpty(note.trim())) {\n AppActions.changeNote({ note });\n setNoteLabel(note);\n } else {\n AppActions.changeNote({ note: '' });\n setNoteLabel(providedLabel);\n setShowLabel(true);\n }\n };\n\n const showNoteFieldError = () => {\n setShowError(true);\n };\n\n const hideNoteFieldError = () => {\n setShowError(false);\n };\n\n const handleOnChange = (event) => {\n const value = event.target.value;\n setDonationNote(value);\n\n if (value && value.length >= MAX_CHAR_LIMIT) {\n addClass('.note_wrap', ['animated', 'shake']);\n setTimeout(() => {\n removeClass('.note_wrap', ['animated', 'shake']);\n }, 1000);\n showNoteFieldError();\n } else {\n hideNoteFieldError();\n }\n };\n\n return (\n
\n \n {showLabel ? (\n \n ) : (\n
\n \n
\n )}\n\n {showError && showLabel && }\n
\n \n );\n}\n\nNoteComponent.propTypes = {\n label: PropTypes.string,\n isNotePreview: PropTypes.bool,\n};\n\nexport default NoteComponent;\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport * as AppActions from '../../actions/AppActions';\nimport { Checkbox, Tooltip } from '@paypalcorp/pp-react';\nimport { EVENT_NAME } from '../../utility/constants';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FEATURES, LINK_NAME } from '../../fpti/fptiConstants';\nimport { addFeature } from '../../fpti/helper';\n\nconst AnonymousCheckbox = ({\n content,\n optInStatus,\n handleAnonymousDonationChange,\n}) => {\n useEffect(() => {\n addFeature(FEATURES.ANONYMOUS);\n }, []);\n\n const handleChange = (event) => {\n const isChecked = event.target.checked,\n checkboxStatus = isChecked ? 'checked' : 'unchecked';\n\n AppActions.changeAnonymousStatus({\n anonymousStatus: checkboxStatus,\n });\n\n handleAnonymousDonationChange(isChecked);\n };\n\n const trackTooltipOpen = () => {\n trackLinkClick(LINK_NAME.ANONYMOUS_TOOLTIP, {\n eventName: EVENT_NAME.DW_GIVING_DONATE_SETUP_TOOLTIP_PRESSED,\n });\n };\n\n return (\n \n \n )\n }\n />\n \n );\n};\n\nAnonymousCheckbox.propTypes = {\n content: PropTypes.object,\n optInStatus: PropTypes.bool,\n handleAnonymousDonationChange: PropTypes.func,\n};\n\nexport default AnonymousCheckbox;\n","function setDonateLoaded() {\n document.getElementsByTagName('body')[0].setAttribute('donate-loaded', true);\n}\n\nsetDonateLoaded();\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from '@paypalcorp/pp-react';\nimport { appendCdnHostName } from '../../../lib/geoUtils';\nimport { Message } from '@paypalcorp/worldready-react';\n\nclass NextButtonComponent extends React.Component {\n render() {\n return (\n \n \n \n \n );\n }\n}\n\nNextButtonComponent.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleNext: PropTypes.func,\n};\n\nexport default NextButtonComponent;\n","import location from '@paypalcorp/instance-location';\n\nexport const appendCdnHostName = (url) => {\n return `https://${location.getCdnHostName()}${url}`;\n};\n\nexport const getCdnHostName = () => {\n return `https://${location.getCdnHostName()}`;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from '@paypalcorp/pp-react';\nimport { Message } from '@paypalcorp/worldready-react';\n\nclass OneTouchNextButton extends React.Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nOneTouchNextButton.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleNext: PropTypes.func,\n};\n\nexport default OneTouchNextButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from '@paypalcorp/pp-react';\nimport { addFeature } from '../fpti/helper';\nimport { FEATURES } from '../fpti/fptiConstants';\nimport { Message } from '@paypalcorp/worldready-react';\n\nclass GuestButton extends React.Component {\n componentDidMount() {\n addFeature(FEATURES.GUEST);\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nGuestButton.propTypes = {\n label: PropTypes.string,\n disabled: PropTypes.bool,\n handleGuest: PropTypes.func,\n};\n\nexport default GuestButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { BodyText, Alert } from '@paypalcorp/pp-react';\nimport { Message } from '@paypalcorp/worldready-react';\nexport default function RecurringInfo({ orgName, amount }) {\n return (\n \n \n {orgName}}\n />\n \n \n );\n}\n\nRecurringInfo.propTypes = {\n orgName: PropTypes.string,\n amount: PropTypes.string,\n};\n","/* eslint-disable */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { StyleSheet, css } from '../../utility/paypalAphrodite';\nimport * as AppActions from '../../actions/AppActions';\nimport AppStore from '../../stores/AppStore';\nimport AppDispatcher from '../../dispatcher/AppDispatcher';\nimport TemplateData from '../../utility/getTemplateData';\nimport { isLTR as isLeftToRight } from '../../utility/helper';\nimport { loadBodyMovin } from '../../utility/lazyLoader';\nimport { formatAmount } from '../../utility/formator';\nimport { sanitizeOrgName } from '../../utility/domUtils';\nimport RecurringInfo from './RecurringInfo';\nimport { Checkbox, Tooltip, Modal } from '@paypalcorp/pp-react';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FEATURES, FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\nimport { Row, Col } from '@paypalcorp/pp-react';\nimport { addFeature } from '../../fpti/helper';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\n\nconst orgname = TemplateData.donationName ? TemplateData.donationName : '';\nconst isLTR = isLeftToRight();\nlet isContinue = false;\n\nconst styles = StyleSheet.create({\n wrapper: {},\n centered: {\n display: 'flex',\n justifyContent: 'center',\n },\n toolWrapper: {\n display: 'inline-block',\n position: 'relative',\n margin: '0',\n paddingBottom: '10px',\n },\n animationWrapper: {\n width: '100%',\n position: 'absolute',\n height: 125,\n marginTop: -125,\n },\n animationContainer: {\n transform: isLTR ? 'scaleX(1)' : 'scaleX(-1)',\n height: 250,\n width: 250,\n marginLeft: -35,\n },\n recurringButton: {\n width: '100%',\n padding: 20,\n borderRadius: '3rem',\n fontSize: 15,\n marginBottom: 0,\n },\n borderOnly: {\n background: 'transparent',\n color: '#0070ba',\n },\n divider: {\n position: 'relative',\n borderBottom: '1px solid #ccc',\n textAlign: 'center',\n margin: '0 0 20px',\n },\n dividerContent: {\n position: 'relative',\n textAlign: 'center',\n backgroundColor: '#fff',\n display: 'inline-block',\n margin: 0,\n top: 9,\n padding: '0 10px',\n fontSize: 18,\n },\n verticalCentered: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nclass RecurringCheckBox extends React.Component {\n constructor(props) {\n super(props);\n const amount = AppStore.getDonationAmount() || '';\n const currency = AppStore.getDonationCode() || '';\n this.state = {\n showhelp: this.props.status,\n formatedAmount: formatAmount({ currency: currency, value: amount }),\n };\n }\n\n componentDidMount = () => {\n this.dispatcherToken = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_AMOUNT') {\n const { action: { item: { amount = 0 } = {} } = {} } = payload;\n this.updateAmount(amount);\n }\n });\n\n addFeature(FEATURES.RECURRING);\n };\n\n componentWillUnmount = () => {\n isContinue = this.props.continue;\n AppDispatcher.unregister(this.dispatcherToken);\n };\n\n loadAnimation(display) {\n if (!display) {\n return;\n }\n loadBodyMovin().then(() => {\n // Animation is displayed after bodymovin files are downloaded\n // On slow connections, user may click the checkbox a few times before\n // the JS files are downloaded\n if (this.state.isAnimating) {\n return;\n }\n const animationData = window.heartsAnimationData;\n const bodymovinLibrary = window.bodymovin;\n if (!bodymovinLibrary || !animationData) {\n return;\n }\n this.setState({\n isAnimating: true,\n });\n\n bodymovinLibrary.loadAnimation({\n // eslint-disable-line\n container: document.getElementById('animationContainer'),\n renderer: 'svg',\n loop: 1,\n autoplay: true,\n animationData,\n });\n // Destroying with timeout\n setTimeout(() => {\n bodymovinLibrary.destroy(); // eslint-disable-line\n this.setState({\n isAnimating: false,\n });\n }, 1000);\n });\n }\n\n updateAmount = (value) => {\n const currency = AppStore.getDonationCode() || '';\n this.setState({ formatedAmount: formatAmount({ currency, value }) });\n };\n\n handleChange = (ev) => {\n let { showhelp } = this.state;\n let isChecked = ev.target.checked;\n let chkBxStatus = isChecked ? 'checked' : 'unchecked';\n\n this.loadAnimation(isChecked);\n\n AppActions.changeRecurring({\n recurring: chkBxStatus,\n });\n\n trackLinkClick(LINK_NAME.RECURRING_CHECKBOX, {\n additionalData: {\n [FPTI_TAGS.CHECKBOX]: chkBxStatus,\n },\n });\n\n this.props.handleChange(isChecked);\n\n this.setState({ showhelp: (showhelp = !showhelp) });\n };\n\n createMarkup = (content) => {\n return { __html: content };\n };\n\n render() {\n const checked = { checked: false };\n if (this.props.status) {\n checked.checked = true;\n }\n const worldReady = this.context;\n return (\n \n \n \n
\n {isContinue ? (\n
\n \n {new MessageFormat(worldReady, {\n id: 'common.recurring-checkbox.rp.perMonth',\n }).format()}\n \n
\n ) : (\n
\n
\n \n
\n
\n
\n \n
\n
\n \n )}\n \n \n {this.props.status && !isContinue && (\n \n \n \n )}\n \n
\n );\n }\n}\nRecurringCheckBox.contextType = WorldReadyContext;\n\nRecurringCheckBox.propTypes = {\n handleChange: PropTypes.func,\n status: PropTypes.bool,\n continue: PropTypes.bool,\n};\n\nRecurringCheckBox.defaultProps = {\n handleChange: () => {},\n};\n\nexport default RecurringCheckBox;\n","import React, { useState, useEffect, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { DropdownMenu } from '@paypalcorp/pp-react-dropdown-menu';\nimport * as AppActions from '../../actions/AppActions';\nimport appStore from '../../stores/AppStore';\nimport { trackLinkClick } from '../../fpti/fpti';\nimport { FPTI_TAGS, LINK_NAME } from '../../fpti/fptiConstants';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\n\nconst Programs = ({ programNames, isDisabled }) => {\n const worldReady = useContext(WorldReadyContext);\n const [selectedProgram, handleSelect] = useState('');\n const programLabelMsgFmt = new MessageFormat(worldReady, {\n id: 'common.programs.programs.optional',\n });\n // programNames is coming as a string sometimes\n // Convert it to an array\n if (programNames && !Array.isArray(programNames)) {\n programNames = [programNames];\n }\n\n const getProgramOptions = () => {\n const options = [];\n programNames.forEach((programName) => {\n options.push({\n primaryText: programName,\n value: programName,\n });\n });\n\n return options;\n };\n\n const updateProgramId = (event) => {\n const {\n target: { value },\n } = event;\n handleSelect(value);\n AppActions.updateSelectedProgram(value);\n trackLinkClick(LINK_NAME.PROGRAM_SELECTED, {\n additionalData: {\n [FPTI_TAGS.CAMPAIGN]: value,\n },\n });\n };\n\n useEffect(() => {\n if (isDisabled) {\n handleSelect(programNames[0]);\n }\n }, [JSON.stringify(programNames)]);\n\n useEffect(() => {\n if (isDisabled) {\n return;\n }\n\n let programOption = getProgramOptions().findIndex(\n (program) => program.primaryText === appStore.getSelectedProgram()\n );\n programOption = programOption === -1 ? 0 : programOption;\n handleSelect(programNames[programOption]);\n AppActions.updateSelectedProgram(programNames[programOption]);\n }, []);\n\n return (\n \n );\n};\n\nPrograms.propTypes = {\n programNames: PropTypes.array,\n isDisabled: PropTypes.bool,\n};\n\nexport default Programs;\n","import React, { Component } from 'react';\nimport { Button, Sheet, HeadingText, BodyText } from '@paypalcorp/pp-react';\nimport TemplateData from '../../utility/getTemplateData';\nimport PropTypes from 'prop-types';\nimport { appendCdnHostName } from '../../utility/geoUtils';\nimport { sanitizeOrgName } from '../../utility/domUtils';\nimport BackButton from '../../components/BackButton';\nimport { isInContext } from '../../utility/inContextDonation';\nimport { Row, Col } from '@paypalcorp/pp-react';\nimport {\n Message,\n Context as WorldReadyContext,\n} from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\n\nconst orgname = TemplateData.donationName ? TemplateData.donationName : '';\nexport class RecurringOverlay extends Component {\n handleClose = () => {\n this.props.closeRecurringOverlay();\n };\n\n noThanks_closeModal = (event) => {\n this.props.onMakeOneTimeDonation();\n };\n\n onContinue = (event) => {\n this.props.onContinue();\n };\n\n render() {\n let secondDialogLabel = 'dialogp2';\n\n switch (this.props.selectedRecurringFrequency) {\n case 'WEEK':\n secondDialogLabel = 'dialogp2Week';\n break;\n case 'YEAR':\n secondDialogLabel = 'dialogp2Year';\n break;\n default:\n secondDialogLabel = 'dialogp2';\n break;\n }\n\n const dialogp2MsgFmt = new MessageFormat(this.context, {\n id: `common.recurring-checkbox.rp.${secondDialogLabel}`,\n });\n const dialogp2 = dialogp2MsgFmt.format({\n orgName: sanitizeOrgName(orgname),\n });\n\n return (\n : null\n }\n noCloseButton={isInContext()}\n isOpen={this.props.isOpen}\n onClose={this.handleClose}\n closeOnBackgroundClick={false}\n className=\"recurring-signup-overpanel\"\n containerClassName={`${\n isInContext() ? 'incontext-guest-recurring' : ''\n }`}\n >\n
\n
\n \n \n
\n \n
\n \n
\n \n \n \n \n \n \n \n\n \n \n
\n
\n
\n \n \n \n
\n
\n
\n {dialogp2}\n
\n
\n
\n \n \n \n
\n
\n \n
\n\n
\n \n \n \n \n \n\n \n \n \n \n \n \n \n
\n
\n
\n \n );\n }\n}\nRecurringOverlay.contextType = WorldReadyContext;\nRecurringOverlay.propTypes = {\n closeRecurringOverlay: PropTypes.func,\n onMakeOneTimeDonation: PropTypes.func,\n onContinue: PropTypes.func,\n isOpen: PropTypes.bool,\n selectedRecurringFrequency: PropTypes.string,\n};\n\nexport default RecurringOverlay;\n","import React, { useEffect, useState } from 'react';\nimport { CaptionText } from '@paypalcorp/pp-react';\nimport { StyleSheet, css } from 'aphrodite';\nimport AppDispatcher from '../dispatcher/AppDispatcher';\nimport * as AppConstants from '../utility/constants';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst styles = StyleSheet.create({\n disclaimerWrapper: {\n maxWidth: 350,\n margin: 'auto',\n },\n disclaimer: {\n margin: 'auto',\n },\n disclaimerCaptionText: {\n marginTop: 12,\n color: '#687173',\n textAlign: 'center',\n },\n});\n\nexport default function NotTaxDeductibleLegalText() {\n const [isPPCC, setIsPPCC] = useState(undefined);\n let dispatcherMessages;\n const registerAppDispatcherMessages = () => {\n dispatcherMessages = AppDispatcher.register((payload) => {\n if (\n payload.action &&\n payload.action.actionType === AppConstants.UPDATE_PPCC_STATUS\n ) {\n setIsPPCC(payload.action.item);\n }\n });\n };\n\n useEffect(() => {\n registerAppDispatcherMessages();\n return function cleanup() {\n AppDispatcher.unregister(dispatcherMessages);\n };\n }, []);\n if (isPPCC || isPPCC === undefined) return null;\n return (\n
\n \n \n \n
\n );\n}\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport * as AppActions from '../../actions/AppActions';\nimport { DonateCheckbox } from '@paypalcorp/donate-react';\nimport { addFeature } from '../../fpti/helper';\nimport { FEATURES } from '../../fpti/fptiConstants';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst CoverFeeCheckbox = ({\n handleCoverFeeChange,\n optInStatus,\n formatedFeeAmount,\n isDisabled,\n}) => {\n const handleChange = (event) => {\n const isChecked = event.target.checked,\n checkboxStatus = isChecked ? 'checked' : 'unchecked';\n\n AppActions.changeCoverFee({\n coverFee: checkboxStatus,\n });\n\n handleCoverFeeChange(isChecked);\n };\n\n useEffect(() => {\n addFeature(FEATURES.CTF);\n }, []);\n\n return (\n {formatedFeeAmount}}\n />\n }\n value={optInStatus}\n onChange={handleChange}\n checked={optInStatus}\n disabled={isDisabled || false}\n />\n );\n};\n\nCoverFeeCheckbox.propTypes = {\n handleCoverFeeChange: PropTypes.func,\n optInStatus: PropTypes.bool,\n formatedFeeAmount: PropTypes.string,\n isDisabled: PropTypes.bool,\n};\n\nexport default CoverFeeCheckbox;\n","import React from 'react';\nimport '../../utility/csrf';\nimport AmountWrapper from '../../components/amountWrapper';\nimport NextButton from '../../components/nextButton';\nimport OneTouchNextButton from '../../components/landing/OneTouchNextButton';\nimport CancelAndReturn from '../../components/cancelAndReturn';\nimport GuestButton from '../../components/guestButton';\nimport RecurringCheckBox from '../../components/recurring-checkbox/recurring-checkbox';\nimport UserDetailsBanner from '../../components/onetouch/UserDetailsBanner';\nimport OfferDetail from '../../components/offerDetail';\nimport Disclaimer from '../../components/Disclaimer';\nimport VoucherFlowDisclaimer from '../../components/voucherFlowDisclaimer';\nimport CloseButton from '../../components/CloseButton';\nimport ReceiverEligibilityErrorTile from '../error/receiverEligibilityError';\nimport { formatAmount, normalizeNumber } from '../../utility/formator';\nimport {\n isInContext,\n isMobileOrInContext,\n} from '../../utility/inContextDonation';\nimport DonateHeader from '../../components/common/DonateHeader';\n\nimport templateData from '../../utility/getTemplateData';\nimport {\n hasPersonalizedMessages,\n getPersonalizedMessages,\n} from '../../utility/personalizedMessages';\n\nimport AppStore from '../../stores/AppStore';\nimport * as AppActions from '../../actions/AppActions';\nimport AppDispatcher from '../../dispatcher/AppDispatcher';\nimport * as cpl from '../../utility/cpl';\nimport { GN_CONTENT_TOUCHPOINT } from '../../utility/constants';\nimport PropTypes from 'prop-types';\nimport {\n handleLogIn,\n addShake,\n handleTokenReuse,\n hideSpinnerOverlay,\n showSpinnerOverlay,\n} from '../../utility/helper';\nimport {\n isAuthenticatedUser,\n shouldShowUserBanner,\n isLoggedInUser,\n} from '../../utility/authUtils';\nimport * as amountUtils from '../../components/amount/amountUtils';\n\nimport { withRouter } from 'react-router-dom';\nimport {\n isOldButtonFactory,\n hasPartnerSource,\n} from '../../utility/getTemplateData';\nimport { isCampaigns } from '../../utility/productIntegrationUtils';\nimport { loadBodyMovin, waitForOnload } from '../../utility/lazyLoader';\nimport _isEmpty from 'lodash/isEmpty';\nimport Programs from '../../components/programs/Programs';\nimport RecurringOverlay from '../../components/recurring-checkbox/RecurringOverlay';\nimport _get from 'lodash/get';\nimport NotTaxDeductibleLegalText from '../../components/NotTaxDeductibleLegalText';\nimport { getParameterByName } from '../../utility/queryStringHelper';\nimport CoverFeeCheckbox from '../../components/coverFee/coverFeeCheckbox';\nimport {\n computeAmountAfterFee,\n isOptInCoverFee,\n restoreDonationAmount,\n updateDonationAmount,\n setFeeAmountInStore,\n} from '../../components/coverFee/feeUtils';\nimport withDonate from '../../components/guest/WithDonate';\nimport withTheme from '../../components/withTheme';\nimport AnonymousCheckbox from '../../components/anonymousDonation/anonymousCheckbox';\nimport {\n getPersonalizedAnonymousContent,\n getPersonalizedNoteToPayeeLabel,\n isCheckoutRail,\n isExternalFlow,\n prepareOrderParams,\n} from '../../utility/productIntegrationUtils';\nimport NoteComponent from '../../components/note';\nimport isEmpty from 'lodash/isEmpty';\nimport {\n trackAnonymousCheckboxClick,\n trackCoverFeeCheckboxClick,\n trackDonateWithCardClick,\n trackDonateWithPayPalClick,\n trackLandingPageIM,\n trackNextClickForCheckout,\n trackRecurringFrequencySelectionClick,\n} from '../../fpti/fpti';\nimport { CPL_PAGE_SPEC, FEATURES } from '../../fpti/fptiConstants';\nimport classNames from 'classnames';\nimport {\n BodyText,\n HeadingText,\n CaptionText,\n SegmentedController,\n SegmentedControllerPanel,\n} from '@paypalcorp/pp-react';\nimport { addFeature } from '../../fpti/helper';\nimport withWorldReady from '../../components/withWorldReady';\nimport {\n Message,\n Context as WorldReadyContext,\n} from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { getWorldReady } from '../../utility/worldReadyUtils';\nimport MessageWithHTML from '../../components/MessageWithHtml';\n\nclass LandingPageComponent extends React.Component {\n constructor(props) {\n super(props);\n const optInStatus = AppStore.getCoverFeeOptInStatus();\n const anonymousStatusInStore = AppStore.getAnonymousStatus();\n const anonymousOptInStatus = !isEmpty(anonymousStatusInStore)\n ? anonymousStatusInStore === 'checked'\n : templateData.anonymousStatus || false;\n\n let selectedTabIdx = '';\n if (templateData.supportedRecurringFrequencies) {\n switch (AppStore.getSelectedRecurringFrequency()) {\n case 'Week':\n selectedTabIdx =\n templateData.supportedRecurringFrequencies.indexOf('WEEK');\n break;\n case 'Month':\n selectedTabIdx =\n templateData.supportedRecurringFrequencies.indexOf('MONTH');\n break;\n case 'Year':\n selectedTabIdx =\n templateData.supportedRecurringFrequencies.indexOf('YEAR');\n break;\n default:\n selectedTabIdx =\n templateData.supportedRecurringFrequencies.indexOf('ONE_TIME');\n break;\n }\n }\n\n this.state = {\n hasLogo: templateData.hasLogo,\n subHeaderLabel: templateData.donationName,\n orgName: templateData.charityName,\n donationId: templateData.donationId,\n guestRedirectUrl: templateData.guestRedirectUrl,\n donateDisabled: false,\n recurringEnabled: templateData.recurringEnabled,\n recurringStatus: templateData.recurringStatus === 'checked',\n supportedRecurringFrequencies: templateData.supportedRecurringFrequencies,\n recurringHelpText: '',\n recurringLabel: 'Make this a monthly donation',\n rpContinue: false,\n isAuthenticated: isAuthenticatedUser(),\n memberMandatory: templateData.memberMandatory,\n programNames:\n templateData.donateContext?.program_names || templateData.programNames,\n isRecurringOverlayOpen: false,\n isVoucherFlow: templateData.isVoucherFlow,\n offerProgram: templateData.offerProgram,\n coverFeeEnabled: templateData.coverFeeEnabled,\n coverFeeOptInStatus:\n optInStatus !== undefined\n ? optInStatus === 'checked'\n : templateData.feePayer === 'consumer',\n feeAmount: '',\n formatedFeeAmount: '',\n anonymousEnabled: templateData.anonymousEnabled,\n anonymousOptInStatus,\n hasDisclaimer: hasPersonalizedMessages(GN_CONTENT_TOUCHPOINT),\n selectedTabIdx: selectedTabIdx,\n };\n }\n\n componentDidMount = () => {\n window.onload = function () {\n setTimeout(function () {\n cpl.logPerformance(CPL_PAGE_SPEC.LANDING_PAGE);\n }, 0);\n };\n\n AppActions.updateCurrentPage({ currentPage: 'landing' });\n\n // Do not hide spinner if coming to page with already completed payment token\n if (templateData.paymentStatus !== 'complete') {\n hideSpinnerOverlay();\n }\n\n // Checking for recurring status if coming from guest page\n if (AppStore.getDonationRecurring() === 'checked') {\n this.setState({ recurringStatus: true });\n }\n\n // Checking for cover fee preference if coming from guest page\n if (isOptInCoverFee()) {\n this.setState({ coverFeeOptInStatus: true });\n restoreDonationAmount();\n }\n\n setFeeAmountInStore();\n this.updateFeeAmount();\n\n trackLandingPageIM({ noteFieldDisplayed: this.shouldShowNote() });\n\n // Pre-load bodyMovin\n if (templateData.recurringEnabled) {\n waitForOnload().then(() => {\n loadBodyMovin();\n });\n }\n\n if (!isLoggedInUser()) {\n AppActions.showLanguageSelector(true);\n }\n\n // Register for App Dispatcher Messages\n this.registerAppDispatcherMessages();\n };\n\n componentWillUnmount() {\n AppDispatcher.unregister(this.dispatcherMessages);\n }\n\n registerAppDispatcherMessages = () => {\n this.dispatcherMessages = AppDispatcher.register((payload) => {\n if (payload.action && payload.action.actionType === 'CHANGE_RECURRING') {\n const checked = _get(payload.action, 'item', 'unchecked');\n this.setState({\n recurringStatus: checked === 'checked',\n });\n }\n });\n };\n\n getFPTDATA = () => {\n return {\n amount: AppStore.getDonationAmount(),\n code: AppStore.getDonationCode(),\n symbol: AppStore.getDonationSymbol(),\n };\n };\n\n validateAmountAndNavigateToGuestPage = () => {\n let donationAmount = AppStore.getDonationAmount();\n\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n trackDonateWithCardClick({\n noteFieldDisplayed: this.shouldShowNote(),\n fptiData: {\n is_recurring: this.state.recurringStatus ? 'on' : 'off',\n fee_type: this.state.coverFeeEnabled ? 'offset' : 'none',\n },\n });\n this.props.history.push(`/donate/guest?token=${templateData.token}`);\n } else {\n addShake();\n }\n };\n\n handleGuest = (event) => {\n event.preventDefault();\n AppActions.changeRecurringModalStatus({\n recurringModalStatus: 'notclosed',\n });\n let donationAmount = this.getDonationAmount();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n const isRecurringChecked = this.state.recurringStatus;\n\n if (isRecurringChecked && !this.state.memberMandatory) {\n this.openRecurringOverlay();\n } else {\n this.validateAmountAndNavigateToGuestPage();\n }\n\n // Start CPL tracking to get measurements to load guest form\n window.PAYPAL.analytics.startCPLTracking({\n page: 'main:donate:wps:guest:guestform:guestFormComponent:web::',\n action: 'guest_form_loaded',\n uicomp: 'guestForm',\n uitype: 'component',\n });\n }\n };\n\n handleNext = (event) => {\n event.preventDefault();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n let donationAmount = this.getDonationAmount();\n if (amountUtils.isAmountGreaterThanZero(donationAmount)) {\n trackDonateWithPayPalClick({\n noteFieldDisplayed: this.shouldShowNote(),\n fptiData: {\n is_recurring: this.state.recurringStatus ? 'on' : 'off',\n fee_type: this.state.coverFeeEnabled ? 'offset' : 'none',\n },\n });\n handleLogIn();\n }\n };\n\n handleNextForCheckout = (event) => {\n event.preventDefault();\n if (!this.validateDonationAmount()) {\n return;\n }\n\n trackNextClickForCheckout({ noteFieldDisplayed: this.shouldShowNote() });\n showSpinnerOverlay();\n const orderParams = prepareOrderParams();\n this.props.createOrder(orderParams);\n };\n\n getDonationAmount = () => {\n let donationAmount = AppStore.getDonationAmount();\n\n if (isOptInCoverFee()) {\n const feeAmount = AppStore.getFeeAmount();\n // backup user's original entered amount in store\n AppActions.changeAmountBeforeFee({ amountBeforeFee: donationAmount });\n\n if (feeAmount) {\n donationAmount = computeAmountAfterFee(donationAmount, feeAmount);\n updateDonationAmount(donationAmount);\n }\n }\n\n return donationAmount;\n };\n\n hideValidationError = () => {\n this.setState({\n showValidationError: false,\n });\n };\n\n validateDonationAmount = () => {\n let validationResult =\n amountUtils.validateMinimumDonationAmount('common.amount');\n if (validationResult?.showValidationError) {\n this.setState(validationResult);\n addShake();\n return false;\n }\n\n validationResult = amountUtils.validateMaximumDonationAmount();\n if (validationResult?.showValidationError) {\n this.setState(validationResult);\n addShake();\n return false;\n }\n\n this.setState(validationResult);\n return true;\n };\n\n handleAmountFocus = () => {\n if (this.state.showValidationError) {\n this.hideValidationError();\n }\n };\n\n updateConversionSataus = (status = false) => {\n this.setState({ donateDisabled: status });\n };\n\n handleRecurringChange = (status = false) => {\n this.setState({ recurringStatus: status });\n };\n\n handleRecurringOverlayContinue = () => {\n this.setState({ rpContinue: true });\n this.validateAmountAndNavigateToGuestPage();\n };\n\n handleRecurringOverlayMakeOneTimeDonation = () => {\n AppActions.changeRecurring({\n recurring: 'unchecked',\n });\n this.validateAmountAndNavigateToGuestPage();\n };\n\n handleAnonymousDonationChange = (status = false) => {\n this.setState({ anonymousOptInStatus: status });\n trackAnonymousCheckboxClick(status);\n };\n\n handleCoverFeeChange = (status = false) => {\n this.setState({ coverFeeOptInStatus: status });\n trackCoverFeeCheckboxClick(status);\n };\n\n updateFeeAmount = () => {\n this.setState({\n feeAmount: AppStore.getFeeAmount(),\n formatedFeeAmount: AppStore.getFormatedFeeAmount(),\n });\n };\n\n openRecurringOverlay = () => {\n this.setState({\n isRecurringOverlayOpen: true,\n });\n };\n\n closeRecurringOverlay = () => {\n this.setState({\n isRecurringOverlayOpen: false,\n });\n };\n\n renderProgramsDropdown = () => {\n if (isOldButtonFactory() || _isEmpty(this.state.programNames)) {\n return null;\n }\n\n return ;\n };\n\n renderDisclaimer = () => {\n if (\n this.state.supportedRecurringFrequencies &&\n this.state.supportedRecurringFrequencies[this.state.selectedTabIdx] ===\n 'ONE_TIME'\n ) {\n return null;\n }\n let rpContentHelper = null;\n switch (\n this.state.supportedRecurringFrequencies &&\n this.state.supportedRecurringFrequencies[this.state.selectedTabIdx]\n ) {\n case 'WEEK':\n rpContentHelper = 'helpText1Week';\n break;\n case 'MONTH':\n rpContentHelper = 'helpText1Month';\n break;\n case 'YEAR':\n rpContentHelper = 'helpText1Year';\n break;\n default:\n rpContentHelper = null;\n break;\n }\n\n if (rpContentHelper) {\n let totalAmount = 0;\n if (this.state.coverFeeOptInStatus) {\n totalAmount =\n +Number(AppStore.getDonationAmount()) +\n +normalizeNumber(AppStore.getFeeAmount());\n } else {\n totalAmount = +Number(AppStore.getDonationAmount());\n }\n\n const formattedTotalAmount = formatAmount({\n currency: templateData.donationCode,\n value: totalAmount,\n });\n\n return (\n \n \n \n );\n }\n return null;\n };\n\n renderDonateButtons = () => {\n if (isCheckoutRail()) {\n return (\n \n );\n }\n\n if (this.state.isAuthenticated) {\n return (\n \n );\n }\n\n return (\n
\n
\n \n
\n \n
\n );\n };\n\n /**\n * Should show note on landing page when charityNote is enabled\n * and recurring is disabled for client flows\n * @return {Boolean} true to show note field\n */\n shouldShowNote = () => {\n const showNoteCondition =\n templateData.charityNoteEnabled &&\n !this.state.recurringStatus &&\n isExternalFlow();\n\n if (showNoteCondition) {\n addFeature(FEATURES.CHARITY_NOTE);\n }\n\n return showNoteCondition;\n };\n\n getPersonalizedContent = () => {\n if (isExternalFlow()) {\n const personalizedMessages = getPersonalizedMessages(\n GN_CONTENT_TOUCHPOINT\n );\n return personalizedMessages?.disclaimer;\n }\n };\n\n landingClass() {\n return classNames({\n gn_donate_wrapper: templateData.bannerUrl,\n donate_wrapper: !templateData.bannerUrl,\n context_gn_wrapper: isInContext(),\n 'user-banner': shouldShowUserBanner(),\n mobile_view: isMobileOrInContext(),\n });\n }\n\n shouldShowSupportText = () => {\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n return (\n campaignStatus === 'INACTIVE' &&\n +amountRaised >= +templateData.campaignTargetAmount\n );\n };\n\n shouldShowNoDonationText = () => {\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n return (\n campaignStatus === 'INACTIVE' &&\n ((!templateData.campaignEndTime && amountRaised === '0') ||\n templateData.campaignEndTime !== '')\n );\n };\n\n selectFrequencyTab = (e, tabIdx) => {\n let selectedRecurringFrequency = '';\n switch (this.state.supportedRecurringFrequencies[tabIdx]) {\n case 'ONE_TIME':\n selectedRecurringFrequency = null;\n break;\n case 'WEEK':\n selectedRecurringFrequency = 'Week';\n break;\n case 'MONTH':\n selectedRecurringFrequency = 'Month';\n break;\n case 'YEAR':\n selectedRecurringFrequency = 'Year';\n break;\n }\n AppActions.changeSelectedRecurringFrequency({ selectedRecurringFrequency });\n if (this.state.supportedRecurringFrequencies[tabIdx] === 'ONE_TIME') {\n AppActions.changeRecurring({\n recurring: 'unchecked',\n });\n } else {\n AppActions.changeRecurring({\n recurring: 'checked',\n });\n this.handleRecurringChange(true);\n }\n this.setState({ selectedTabIdx: tabIdx });\n trackRecurringFrequencySelectionClick();\n };\n\n render() {\n const showUserBanner = shouldShowUserBanner();\n const showSupportText = this.shouldShowSupportText();\n const showNoDonationText = this.shouldShowNoDonationText();\n const worldReady = getWorldReady();\n const supportedRecurringFrequencies =\n this.state.supportedRecurringFrequencies?.map((freq) => {\n switch (freq) {\n case 'ONE_TIME':\n return new MessageFormat(worldReady, {\n id: 'common.recurring-checkbox.rp.frequency.oneTime',\n }).format();\n case 'WEEK':\n return new MessageFormat(worldReady, {\n id: 'common.recurring-checkbox.rp.frequency.weekly',\n }).format();\n case 'YEAR':\n return new MessageFormat(worldReady, {\n id: 'common.recurring-checkbox.rp.frequency.yearly',\n }).format();\n default:\n return new MessageFormat(worldReady, {\n id: 'common.recurring-checkbox.rp.frequency.monthly',\n }).format();\n }\n }) || [];\n\n if (!templateData.receiverCountryEligible) {\n return (\n \n \n \n );\n }\n\n return (\n
\n
\n {showUserBanner && !showNoDonationText && !showSupportText ? (\n \n ) : null}\n {isExternalFlow() && }\n \n {(() => {\n switch (true) {\n case showSupportText:\n return (\n \n \n \n );\n case showNoDonationText:\n return (\n \n \n \n );\n default:\n return (\n \n {supportedRecurringFrequencies &&\n supportedRecurringFrequencies.length > 1 && (\n ({\n label: option,\n id: `${option}-id`,\n panelId: `${option}-panelid`,\n }))}\n onClick={this.selectFrequencyTab}\n className=\"frequency-options\"\n >\n {supportedRecurringFrequencies.map((option) => (\n \n ))}\n \n )}\n\n \n {this.renderProgramsDropdown()}\n {!isCampaigns() && this.state.anonymousEnabled && (\n \n )}\n {this.shouldShowNote() && (\n \n )}\n {this.state.coverFeeEnabled && (\n \n )}\n {this.state.recurringEnabled &&\n supportedRecurringFrequencies.length === 0 && (\n \n )}\n {this.state.isVoucherFlow && (\n \n )}\n {this.renderDisclaimer()}\n {this.renderDonateButtons()}\n {this.state.isVoucherFlow && }\n {hasPartnerSource() && !this.state.isVoucherFlow && (\n \n )}\n \n {this.state.hasDisclaimer && (\n \n )}\n
\n );\n }\n })()}\n
\n \n \n );\n }\n}\n\nLandingPageComponent.propTypes = {\n history: PropTypes.object,\n};\n\nLandingPageComponent.contextType = WorldReadyContext;\n\nconst LandingPage = withRouter(\n withWorldReady(withDonate(withTheme(LandingPageComponent)))\n);\n\nclass Landing extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n displayLanding: !templateData.currentState,\n };\n }\n\n /**\n * For DIRECT(nonWebscr) and POST integrations, there will not be a token in the URL\n * This will break page refresh.\n * Hence adding token here\n */\n addTokenToUrlIfMissing() {\n const token = getParameterByName('token');\n const business = getParameterByName('business');\n const hostedButtonId = getParameterByName('hosted_button_id');\n const campaignId = getParameterByName('campaign_id');\n\n if (!token && !business && !hostedButtonId && !campaignId) {\n this.props.history.replace({\n pathname: '/donate',\n search: `?token=${templateData.token}`,\n });\n }\n }\n\n componentDidMount() {\n if (!this.state.displayLanding) {\n this.props.history.push(templateData.currentState);\n } else {\n handleTokenReuse();\n }\n this.addTokenToUrlIfMissing();\n }\n\n render() {\n return
{this.state.displayLanding ? : null}
;\n }\n}\n\nLanding.propTypes = {\n history: PropTypes.object,\n};\n\nexport default withRouter(Landing);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { AvatarStack } from '@paypalcorp/pp-react';\nimport { DonorAvatar } from '@paypalcorp/donate-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { formatNumber, getWorldReady } from '../utility/worldReadyUtils';\nimport _isEmpty from 'lodash/isEmpty';\n\nconst WhosDonatedBanner = ({\n numberOfContributors,\n contributionsList,\n isLoading,\n}) => {\n let label;\n const worldReady = getWorldReady();\n\n if (numberOfContributors === 1) {\n const donorName = contributionsList?.[0]?.donor_name;\n const donatedAmount = contributionsList?.[0]?.amount;\n // checking for anonymous contributor\n label = _isEmpty(donorName)\n ? new MessageFormat(worldReady, {\n id: `landing.campaigns.oneAnonymousDonorMessage`,\n }).format()\n : new MessageFormat(worldReady, {\n id: `landing.campaigns.oneDonorMessage`,\n }).format({\n donor: donorName,\n amount: donatedAmount,\n });\n } else if (numberOfContributors === 2) {\n const donorOneName = contributionsList?.[0]?.donor_name;\n const donorTwoName = contributionsList?.[1]?.donor_name;\n // checking if any one of contributors is an anonymous contributor\n label =\n _isEmpty(donorOneName) || _isEmpty(donorTwoName)\n ? new MessageFormat(worldReady, {\n id: `landing.campaigns.donorMessage`,\n }).format({\n numberOfContributors: formatNumber(numberOfContributors),\n })\n : new MessageFormat(worldReady, {\n id: `landing.campaigns.twoDonorsMessage`,\n }).format({\n donorOneName: donorOneName,\n donorTwoName: donorTwoName,\n });\n } else {\n label = new MessageFormat(worldReady, {\n id: `landing.campaigns.donorMessage`,\n }).format({\n numberOfContributors: formatNumber(numberOfContributors),\n });\n contributionsList = contributionsList.slice(0, 3);\n }\n return (\n <>\n {!isLoading && contributionsList?.length > 0 && (\n \n {contributionsList.map((data, index) => {\n const showAnonymousAvatar = !data.shareDonorInfo;\n return (\n \n );\n })}\n \n )}\n \n );\n};\n\nWhosDonatedBanner.propTypes = {\n numberOfContributors: PropTypes.number,\n contributionsList: PropTypes.array,\n isLoading: PropTypes.bool,\n};\n\nexport default WhosDonatedBanner;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport isEmpty from 'lodash/isEmpty';\nimport useInterval from './hooks/useInterval';\nimport { formatAmount, normalizeNumber } from '../utility/formator';\nimport { BodyText } from '@paypalcorp/pp-react';\nimport { DonorAvatar } from '@paypalcorp/donate-react';\nimport { Message } from '@paypalcorp/worldready-react';\n\nfunction getRandomInt(max) {\n return Math.floor(Math.random() * max);\n}\n\nfunction Flyout({ contributionsList }) {\n const [startShowing, setStartShowing] = useState(false);\n const [showFlyouts, setShowFlyouts] = useState(false);\n const [randomContribution, setRandomContribution] = useState({});\n\n function getRandomContribution() {\n return contributionsList[getRandomInt(contributionsList.length)];\n }\n\n // Start showing flyouts after 10s\n useEffect(() => {\n const flyoutTimer = setTimeout(() => {\n setStartShowing(true);\n setShowFlyouts(true);\n setRandomContribution(getRandomContribution());\n }, 10000);\n return () => clearTimeout(flyoutTimer);\n }, []);\n\n // Get a new contribution and show flyout every 90s\n // Needs useInterval so that the contributionsList gets updated when more are loaded\n useInterval(\n () => {\n setShowFlyouts(true);\n setRandomContribution(getRandomContribution());\n },\n startShowing ? 90000 : null\n );\n\n // Hide flyout every 10s after setting showFlyouts to true\n useEffect(() => {\n if (showFlyouts) {\n const hideInterval = setTimeout(() => {\n setShowFlyouts(false);\n }, 10000);\n return () => clearTimeout(hideInterval);\n }\n }, [showFlyouts]);\n\n function getFlyoutText() {\n if (randomContribution.donor_name) {\n return (\n \n {formatAmount({\n value: normalizeNumber(randomContribution.amount),\n currency: randomContribution.currency_code,\n })}\n \n }\n />\n );\n } else if (randomContribution.shareDonorInfo === false) {\n return (\n \n {formatAmount({\n value: normalizeNumber(randomContribution.amount),\n currency: randomContribution.currency_code,\n })}\n \n }\n />\n );\n }\n }\n\n if (!startShowing || isEmpty(randomContribution)) {\n return null;\n }\n\n return (\n
\n
\n \n
\n {getFlyoutText()}\n
\n );\n}\n\nFlyout.propTypes = {\n contributionsList: PropTypes.array,\n};\n\nexport default Flyout;\n","import React, { useRef, useEffect } from 'react';\n\nexport default function useInterval(callback, delay) {\n const intervalRef = useRef(null);\n const savedCallback = useRef(callback);\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n const tick = () => savedCallback.current();\n if (typeof delay === 'number') {\n intervalRef.current = window.setInterval(tick, delay);\n return () => window.clearInterval(intervalRef.current);\n }\n }, [delay]);\n return intervalRef;\n}\n","/*\n Regular order is: SELF > TOP > FIRST.\n For donations > 10, TOP should be shown, if is the same person as SELF or FIRST then display TOP only\n For donations <= 10, if SELF is the same person as FIRST then FIRST should displayed only\n*/\nexport function formatFeatured(contributions, totalContributions) {\n let formattedList = [];\n\n if (contributions.length === 0) {\n return formattedList;\n }\n\n const first = contributions.find((c) => c.badge.toUpperCase() === 'FIRST');\n const top = contributions.find((c) => c.badge.toUpperCase() === 'TOP');\n const selfItem = contributions.find((c) => c.badge.toUpperCase() === 'SELF');\n\n if (selfItem) {\n if (selfItem?.id !== top?.id && selfItem?.id !== first?.id) {\n formattedList.push(selfItem);\n }\n }\n if (top && totalContributions > 10) {\n formattedList.push(top);\n }\n if (first) {\n if (first?.id !== top?.id) {\n formattedList.push(first);\n }\n }\n\n return formattedList;\n}\n","import React, { Suspense, useEffect, useState, useContext } from 'react';\nimport templateData from '../../utility/getTemplateData';\nimport PPCC from '../../components/ppcc/ppcc';\nimport {\n Card,\n Col,\n Button,\n Sheet,\n LoadingSpinner,\n BodyText,\n HeadingText,\n} from '@paypalcorp/pp-react';\nimport classNames from 'classnames';\n\nimport {\n GoalProgressMeter,\n useHasScrolledToPosition,\n CampaignImage,\n Title,\n AdvancedEndDateBadge,\n} from '@paypalcorp/donate-react';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport Landing from './landing';\nimport withTheme from '../../components/withTheme';\nimport {\n roundUpAndFormatCurrency,\n parseDateOnly,\n} from '../../utility/formator';\nimport { lazy as reactLazy } from 'react';\nimport { addClass } from '../../utility/domUtils';\nimport WhosDonatedBanner from '../../components/WhosDonatedBanner';\nimport Flyout from '../../components/Flyout';\nimport { fetcher } from '../../utility/domUtils';\nimport { formatFeatured } from '../../utility/donorWall';\nimport ConfirmationSocialShare from '../../confirmation/ConfirmationSocialShare';\nimport { MAX_MOBILE_WIDTH } from '../../setup/clientConstants';\nimport throttle from 'lodash/throttle';\nimport {\n trackDonateLandingButtonClick,\n trackUpdatesReadMorePressed,\n} from '../../fpti/fpti';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst LandingDonorWall = reactLazy(() =>\n import(\n /* webpackChunkName: \"LandingDonorWall\" */ '../../components/LandingDonorWall'\n )\n);\n\nconst LandingRichTextDisplay = reactLazy(() =>\n import(\n /* webpackChunkName: \"LandingRichTextDisplay\" */ '../../components/LandingRichTextDisplay'\n )\n);\n\nconst OrganizerUpdates = reactLazy(() =>\n import(\n /* webpackChunkName: \"LandingOrgUpdates\" */ '../../components/organizerUpdates/OrganizerUpdates'\n )\n);\n\nconst MAX_HEIGHT_BANNER = 380;\nconst MAX_HEIGHT_DESCRIPTION = 800;\n\nfunction isCampaignEnded(endDate) {\n return (\n endDate && new Date().setHours(0, 0, 0, 0) > endDate?.setHours(0, 0, 0, 0)\n );\n}\n\nconst CampaignLanding = () => {\n const worldReady = useContext(WorldReadyContext);\n const [isPaymentCardOpen, setIsPaymentCardOpen] = useState(false);\n const amountRaised = templateData.campaignTotalAmountRaised || '0';\n const campaignStatus = templateData.campaignStatus;\n const targetAmount = templateData.campaignTargetAmount;\n const campaignEndTime = templateData.campaignEndTime;\n const campaignTotalNumberOfTxn = templateData.campaignTotalNumberOfTxn;\n const amountRaisedWithCurrencySymbol = roundUpAndFormatCurrency(\n amountRaised,\n templateData.donationCode\n );\n const donationName = templateData.donationName ?? '';\n const [contributionsList, setContributionsList] = useState({\n featured: [],\n list: [],\n });\n const [contributionsError, setContributionsError] = useState(false);\n const [currentPage, setCurrentPage] = useState(1);\n const [isLoading, setIsLoading] = useState(true);\n const [retry, setRetry] = useState(0);\n const [enableReadMore, setEnableReadMore] = useState(true);\n const [enableReadMoreUpdate, setEnableReadMoreUpdate] = useState(true);\n const [descriptionHeight, setDescriptionHeight] = useState(\n MAX_HEIGHT_DESCRIPTION\n );\n const [updateHeight, setUpdateHeight] = useState(MAX_HEIGHT_DESCRIPTION);\n const [originalDescriptionHeight, setOriginalDescriptionHeight] = useState(0);\n const [newUpdateHeight, setNewUpdateHeight] = useState(0);\n\n const stickToTop = useHasScrolledToPosition(650);\n\n const [isMobile, setIsMobile] = useState(false);\n\n const checkDeviceType = () => {\n setIsMobile(window.innerWidth < MAX_MOBILE_WIDTH, 200);\n };\n\n useEffect(() => {\n const throttledFn = throttle(checkDeviceType, 200);\n window.addEventListener('resize', throttledFn);\n return () => {\n window.removeEventListener('resize', throttledFn);\n };\n }, []);\n\n useEffect(() => {\n const fetchData = async () => {\n const result = await fetcher(\n `/donate/api/donorwall/${templateData.productId}/${currentPage}/10`\n ).then((response) => response.json());\n if (result.contributions) {\n setContributionsList({\n featured:\n contributionsList.featured.length !== 0\n ? contributionsList.featured\n : formatFeatured(\n result?.contributions?.contributions?.featured,\n campaignTotalNumberOfTxn\n ),\n list: [\n ...contributionsList.list,\n ...(result?.contributions?.contributions?.list ?? []),\n ],\n });\n } else {\n setContributionsError(true);\n }\n setIsLoading(false);\n };\n\n setIsLoading(true);\n setContributionsError(false);\n fetchData();\n }, [currentPage, retry]);\n\n const handleShowMore = () => {\n setCurrentPage(currentPage + 1);\n };\n\n useEffect(() => {\n addClass('#mainWrapper header.donate_global_nav', ['hide-header']);\n addClass('#donateWrapper', ['is-landing']);\n hideSpinnerOverlay();\n }, []);\n\n const goalAmtWithCurrencySymbol = roundUpAndFormatCurrency(\n targetAmount,\n templateData.donationCode\n );\n\n let campaignGoalTitle = new MessageFormat(worldReady, {\n id: 'common.campaigns.campaignGoal.title',\n }).format({\n goalAmount: goalAmtWithCurrencySymbol,\n });\n\n const getCampaignMessage = (id, formatObj = undefined) =>\n new MessageFormat(worldReady, {\n id: `landing.campaigns.${id}`,\n }).format(formatObj);\n\n const advancedEndDateBadgeContent = {\n minute: getCampaignMessage('minute'),\n minutes: getCampaignMessage('minutes'),\n hour: getCampaignMessage('hour'),\n hours: getCampaignMessage('hours'),\n day: getCampaignMessage('day'),\n days: getCampaignMessage('days'),\n month: getCampaignMessage('month'),\n months: getCampaignMessage('months'),\n year: getCampaignMessage('year'),\n years: getCampaignMessage('years'),\n endsInContent: getCampaignMessage('endsInContent', {\n duration: '{duration}',\n unit: '{unit}',\n }),\n endedContent: getCampaignMessage('endedContent', { date: '{date}' }),\n };\n\n const renderEndDateBadge = () => (\n
\n \n
\n );\n\n const renderTitle = (size) => (\n
\n \n </div>\n );\n\n const renderGoalProgressMeter = () => (\n <div className=\"wrapper-progress-meter\">\n <GoalProgressMeter\n max={targetAmount}\n value={Math.round(amountRaised).toString()}\n steps={amountRaisedWithCurrencySymbol}\n title={campaignGoalTitle}\n className=\"goal-progress-meter\"\n />\n </div>\n );\n\n const renderAvatarStack = () => (\n <div className=\"wrapper-avatar-stack\">\n <WhosDonatedBanner\n numberOfContributors={campaignTotalNumberOfTxn}\n contributionsList={contributionsList.list}\n isLoading={isLoading}\n />\n </div>\n );\n\n const renderDonationName = () => (\n <div className=\"wrapper-donation-name\">\n <BodyText>\n {donationName}\n <PPCC />\n </BodyText>\n </div>\n );\n\n const headerClasses = classNames({\n 'preview-header': true,\n sticky: stickToTop,\n });\n\n const renderHeader = () => (\n <div className=\"wrapper-header\">\n {renderEndDateBadge()}\n {renderTitle('lg')}\n {renderAvatarStack()}\n {renderDonationName()}\n {renderGoalProgressMeter()}\n </div>\n );\n\n const renderDonorWall = () => {\n return (\n <>\n <LandingDonorWall\n contributionsList={contributionsList}\n isLoading={isLoading}\n currentPage={currentPage}\n handleShowMore={handleShowMore}\n totalNumberOfTransactions={campaignTotalNumberOfTxn}\n />\n {campaignStatus === 'ACTIVE' &&\n !isCampaignEnded(new Date(campaignEndTime)) &&\n contributionsList?.list?.length >= 10 ? (\n <Flyout contributionsList={contributionsList.list} />\n ) : null}\n </>\n );\n };\n\n const renderContributionsError = () => {\n return (\n <div style={{ textAlign: 'center' }}>\n <BodyText>\n <Message id=\"landing.campaigns.contributions.error.title\" />\n </BodyText>\n <BodyText style={{ color: '#515354' }}>\n <Message id=\"landing.campaigns.contributions.error.body\" />\n </BodyText>\n <Button\n tertiary\n onClick={() => {\n setRetry(retry + 1);\n }}\n >\n <Message id=\"landing.campaigns.contributions.error.cta\" />\n </Button>\n </div>\n );\n };\n\n const renderContributions = () => {\n if (!contributionsError) {\n return renderDonorWall();\n } else if (currentPage === 1) {\n return renderContributionsError();\n }\n\n return (\n <>\n {renderDonorWall()}\n {renderContributionsError()}\n </>\n );\n };\n\n const stickyHeader = stickToTop && (\n <div className={headerClasses}>\n <div className=\"wrapper-header\">\n {renderEndDateBadge()}\n {renderTitle('sm')}\n {renderGoalProgressMeter()}\n </div>\n </div>\n );\n\n const personalizedMessages = {\n social_title: new MessageFormat(worldReady, {\n id: 'landing.social.subheader',\n }).format(),\n };\n\n const getSocialMessage = (id, params) => {\n return new MessageFormat(worldReady, {\n id: `landing.social.${id}`,\n }).format(params);\n };\n\n function buildSocialMessages() {\n return {\n social: {\n emailSubject: getSocialMessage('emailSubject', {\n donationName: '{donationName}',\n }),\n emailBody: getSocialMessage('emailBody', {\n donationName: '{donationName}',\n url: '{url}',\n }),\n mobileText: getSocialMessage('mobileText', {\n donationName: '{donationName}',\n }),\n facebookMessage: getSocialMessage('facebookMessage', {\n donationName: '{donationName}',\n url: '{url}',\n }),\n twitterMessage: getSocialMessage('twitterMessage', {\n donationName: '{donationName}',\n }),\n whatsappMessage: getSocialMessage('whatsappMessage', {\n donationName: '{donationName}',\n }),\n copyLinkHeader: getSocialMessage('copyLinkHeader'),\n copyLinkSubheaderBefore: getSocialMessage('copyLinkSubheaderBefore'),\n copyLinkSubheader: getSocialMessage('copyLinkSubheader'),\n copiedText: getSocialMessage('copiedText'),\n copyText: getSocialMessage('copyText'),\n subheader: getSocialMessage('subheader'),\n shareGeneric: getSocialMessage('shareGeneric'),\n },\n };\n }\n\n const socialContent = () => {\n return (\n <div className=\"social-share-wrapper\">\n <HeadingText\n size=\"sm\"\n style={{ textAlign: `${!isMobile ? 'left' : 'center'}` }}\n >\n <Message id=\"landing.social.shareGeneric\" />\n </HeadingText>\n <ConfirmationSocialShare\n campaignId={templateData.productId}\n messages={buildSocialMessages()}\n personalizedMessages={personalizedMessages}\n email={templateData.donationEmail}\n orgName={templateData.charityName}\n isLanding={true}\n />\n </div>\n );\n };\n\n const incrementDescription = (event) => {\n event.preventDefault();\n setDescriptionHeight((height) => {\n const incrementedHeight = height + MAX_HEIGHT_DESCRIPTION;\n if (incrementedHeight >= originalDescriptionHeight)\n setEnableReadMore(false);\n return incrementedHeight;\n });\n };\n\n const incrementUpdate = (event) => {\n trackUpdatesReadMorePressed();\n event.preventDefault();\n setUpdateHeight((height) => {\n const incrementedHeight = height + MAX_HEIGHT_DESCRIPTION;\n if (incrementedHeight >= newUpdateHeight) setEnableReadMoreUpdate(false);\n return incrementedHeight;\n });\n };\n\n const renderReadMore = () =>\n originalDescriptionHeight >= MAX_HEIGHT_DESCRIPTION &&\n enableReadMore && (\n <div className=\"campaign-read-more\">\n <Button tertiary onClick={incrementDescription}>\n <Message id=\"landing.campaigns.readMore\" />\n </Button>\n </div>\n );\n\n const renderReadMoreUpdate = () => {\n if (newUpdateHeight >= MAX_HEIGHT_DESCRIPTION && enableReadMoreUpdate) {\n return (\n <div className=\"campaign-read-more\">\n <Button tertiary onClick={incrementUpdate}>\n <Message id=\"landing.campaigns.readMore\" />\n </Button>\n </div>\n );\n }\n };\n\n return (\n <div className=\"campaign-landing-container\">\n <CampaignImage\n className=\"campaign-landing-banner\"\n src={templateData.bannerUrl}\n />\n {!isMobile && stickyHeader}\n <div className=\"content-container\">\n <div className=\"campaignDetails\" data-testid=\"campaignDetails\">\n <Card.Content>\n <div className=\"campaign-title\">{renderHeader()}</div>\n <div\n className=\"campaign-description\"\n style={{\n maxHeight:\n originalDescriptionHeight >= MAX_HEIGHT_DESCRIPTION\n ? descriptionHeight + 'px'\n : 'unset',\n }}\n >\n <div\n ref={(descriptionContainer) =>\n descriptionContainer &&\n setOriginalDescriptionHeight(\n descriptionContainer.clientHeight\n )\n }\n >\n <Suspense\n fallback={\n <LoadingSpinner size=\"md\" style={{ margin: '0 auto' }} />\n }\n >\n <LandingRichTextDisplay\n campaignDescription={templateData.campaignDescription}\n />\n </Suspense>\n </div>\n {renderReadMore()}\n </div>\n <Suspense\n fallback={\n <LoadingSpinner size=\"md\" style={{ margin: '120px auto' }} />\n }\n >\n <OrganizerUpdates />\n </Suspense>\n <Suspense\n fallback={\n <LoadingSpinner size=\"md\" style={{ margin: '120px auto' }} />\n }\n >\n {renderContributions()}\n </Suspense>\n {campaignTotalNumberOfTxn > 0 && socialContent()}\n </Card.Content>\n </div>\n {!isMobile ? (\n <div className=\"paymentCard\">\n <Landing />\n </div>\n ) : (\n <>\n <Col lg=\"12\" className=\"mobileDonate\">\n <Button\n onClick={() => {\n setIsPaymentCardOpen(!isPaymentCardOpen);\n trackDonateLandingButtonClick({ noteFieldDisplayed: null });\n }}\n >\n <Message id=\"landing.campaigns.donateButton\" />\n </Button>\n </Col>\n <Sheet\n isOpen={isPaymentCardOpen}\n onClose={() => {}}\n title={new MessageFormat(worldReady, {\n id: 'landing.campaigns.donateButton',\n }).format()}\n mobileFixedHeight=\"90\"\n className=\"mobilePreview darkBackground\"\n wrapperClassName=\"mobilePreview-wrapper\"\n skipFormFocus\n >\n <Landing />\n </Sheet>\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport default withTheme(CampaignLanding);\n","export const BTN_FACTORY_FORM = 'buttonFactory';\nexport const BTN_FACTORY_V3_FORM = 'buttonFactoryV3';\nexport const CAMPAIGNS_FORM = 'campaigns';\nexport const AUTH_STATE_ANONYMOUS = 'ANONYMOUS';\nexport const AUTH_STATE_LOGGEDIN = 'LOGGEDIN';\nexport const BTN_FACTORY_MAX_PROGRAMS = 10;\nexport const BTN_FACTORY_MAX_LENGTH_PROGRAMS = 127;\nexport const MAX_MOBILE_WIDTH = 1024;\nexport const MAX_CHARACTERS_RTE = 2500;\nexport const MAX_CHARACTERS_RTE_UPDATE_FORM = 1000;\n\nexport const CAMPAIGN_STATUS = {\n ACTIVE: 'ACTIVE',\n INACTIVE: 'INACTIVE',\n};\n\nexport const COUNTRIES_AND_PERMIT_CURRENCY = {\n BR: 'BRL',\n};\n\nexport const ERRORS = {\n COUNTRY_NOT_SUPPORTED: 'COUNTRY_NOT_SUPPORTED',\n COMPLIANCE: 'COMPLIANCE',\n GENERIC: 'GENERIC',\n OFAC_HIT: 'OFAC_CAMPAIGN_SCAN_HIT',\n RESTRICTED_ACCOUNT: 'RESTRICTED_ACCOUNT',\n RESTRICTED_IMAGE: 'RESTRICTED_IMAGE',\n};\n","import React from 'react';\nimport CardSecurityCode from '../react-card-security-code';\nimport AppStore from '../stores/AppStore';\nimport * as AppActions from '../actions/AppActions';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\n\nclass CVVComponent extends React.Component {\n constructor() {\n super();\n this.state = {\n securityCode: '',\n cardSpec: AppStore.getCardSpec().cardSpec,\n errorMessageCSC: '',\n };\n }\n\n componentDidMount() {\n this.props.onRef(this);\n }\n\n componentWillUnmount() {\n this.props.onRef(undefined);\n }\n\n handleChangeSecurityCode(securityCode) {\n this.setState({ securityCode: securityCode });\n this.props.handleSecurityCodeChange(securityCode);\n }\n\n handleFieldFocus(fieldName) {\n this.setState({ [fieldName]: '' });\n }\n\n /*\n * Handle error message for selected field\n */\n handleFieldBlur(value, fieldName, fieldRequired, fieldInvalid, worldReady) {\n let newErrorState = {};\n\n if (value) {\n newErrorState = {\n [fieldName]: this.validateInputValue(\n value,\n fieldName,\n fieldInvalid,\n worldReady\n ),\n };\n } else {\n newErrorState = {\n [fieldName]: new MessageFormat(worldReady, {\n id: `errors.service.${fieldRequired}`,\n }).format(),\n };\n }\n\n this.setState(newErrorState);\n }\n\n /*\n * Validate input\n */\n validateInputValue(value, fieldName, fieldInvalid, worldReady) {\n let {\n cardSpec: {\n fields: { csc = {} },\n },\n } = this.state;\n\n if (fieldName === 'errorMessageCSC') {\n let cscLen = value && value.length;\n let cscMax = csc.maxlength;\n let cscMin = csc.minlength || cscMax;\n\n if (!(cscLen >= cscMin && cscLen <= cscMax)) {\n return new MessageFormat(worldReady, {\n id: `errors.service.${fieldInvalid}`,\n }).format();\n }\n }\n\n return '';\n }\n\n render() {\n const cscLabel = new MessageFormat(this.context, {\n id: 'guest.guestForm.label.csc',\n }).format();\n\n return (\n <div className=\"cvv_component\" id=\"cvv_component\">\n <div className=\"cvv_field\">\n <CardSecurityCode\n showIsRequiredError={true}\n label={cscLabel}\n placeholder={new MessageFormat(this.context, {\n id: 'guest.guestForm.label.cscplaceholder',\n }).format()}\n errorMessage={this.state.errorMessageCSC}\n handleChangeSecurityCode={(value) =>\n this.handleChangeSecurityCode(value)\n }\n handleFocus={(value) => this.handleFieldFocus('errorMessageCSC')}\n handleBlur={(value) =>\n this.handleFieldBlur(\n value,\n 'errorMessageCSC',\n 'REQUIRED_SECURITY_CODE',\n 'INVALID_SECURITY_CODE',\n this.context\n )\n }\n cardSpec={this.state.cardSpec}\n helperText={new MessageFormat(this.context, {\n id: 'guest.guestForm.label.cscnote',\n }).format({\n csc: cscLabel.toLowerCase(),\n })}\n />\n </div>\n </div>\n );\n }\n}\n\nCVVComponent.contextType = WorldReadyContext;\n\nexport default CVVComponent;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { CDN_HOST_NAME } from '../../../utility/constants';\nimport { BodyText, CaptionText } from '@paypalcorp/pp-react-text';\nimport { CreditCardIcon } from '@paypalcorp/pp-react-icons';\nimport _isEmpty from 'lodash/isEmpty';\nimport { Badge } from '@paypalcorp/pp-react-badge';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst PaymentInformation = ({\n source,\n paymentDigits,\n paymentType,\n issuer,\n isPaypalCurrencyConversion,\n funds,\n cardType,\n}) => {\n const [paymentLogo, setPaymentLogo] = useState('');\n\n const transformText = (str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n\n const getIssuer = () => {\n return issuer?.toLowerCase().split(' ').map(transformText).join(' ');\n };\n\n useEffect(() => {\n let cardImg = source?.payment_card?.issuer?.thumbnail_logo_url ?? null;\n if (\n cardImg === null ||\n _isEmpty(cardImg) ||\n typeof cardImg === 'undefined'\n ) {\n cardImg = `${CDN_HOST_NAME}/digitalassets/c/consumer/p2p/funding-sources/${cardType}.png`;\n }\n setPaymentLogo(cardImg);\n }, []);\n\n return (\n <div className=\"cb-payment-information ppvx_justify-content-between\">\n <div className=\"payment-info\">\n {!_isEmpty(paymentLogo) ? (\n <img src={paymentLogo} className=\"payment-logo\" aria-hidden=\"true\" />\n ) : (\n <CreditCardIcon size=\"xl2\" />\n )}\n <div className=\"pay-info\">\n {issuer && <BodyText>{getIssuer()}</BodyText>}\n <CaptionText className=\"funding-info\">\n <Message\n id=\"guest.crossBorder.label.paymentInformation\"\n type={paymentType}\n number={paymentDigits}\n />\n </CaptionText>\n {!isPaypalCurrencyConversion && (\n <Badge type=\"success\">\n <Message id=\"guest.crossBorder.label.preferred\" />\n </Badge>\n )}\n </div>\n </div>\n <BodyText>{funds}</BodyText>\n </div>\n );\n};\n\nPaymentInformation.propTypes = {\n fundingOptions: PropTypes.object,\n paymentDigits: PropTypes.string,\n paymentType: PropTypes.string,\n issuer: PropTypes.string,\n funds: PropTypes.string,\n isPaypalCurrencyConversion: PropTypes.bool,\n source: PropTypes.object,\n cardType: PropTypes.string,\n};\n\nexport default PaymentInformation;\n","import React, { useState, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { CURRENCY_CONVERSION_OPTIONS } from '../../pages/guest/GuestReview';\nimport { Card } from '@paypalcorp/pp-react-card';\nimport { Sheet } from '@paypalcorp/pp-react-modal';\nimport { IconButton } from '@paypalcorp/pp-react';\nimport { BodyText, CaptionText, HeadingText } from '@paypalcorp/pp-react-text';\nimport { PaypalAppIcon, CreditCardIcon } from '@paypalcorp/pp-react-icons';\nimport { CheckmarkBackgroundIcon } from '@paypalcorp/pp-react-icons';\nimport { Button } from '@paypalcorp/pp-react-buttons';\nimport { checkKeyPressed } from '../../utility/accessibilityUtils';\nimport { Message } from '@paypalcorp/worldready-react';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nconst CurrencyConversionOption = (props) => {\n const getOptionIcon = (type) => {\n if (type === 'paypal-app') {\n return (\n <IconButton\n buttonType=\"secondary\"\n size=\"xl\"\n name={type}\n svgIconComponent={PaypalAppIcon}\n />\n );\n } else if (type === 'credit-cards') {\n return (\n <IconButton\n buttonType=\"secondary\"\n size=\"xl\"\n name={type}\n svgIconComponent={CreditCardIcon}\n />\n );\n }\n };\n\n return (\n <Card\n className={`${props.className} ${\n props.isSelected ? 'show-highlight' : 'border-default'\n }`}\n role=\"checkbox\"\n aria-checked={props.isSelected}\n tabIndex=\"0\"\n onClick={props.handleOptionSelection}\n onKeyDown={(e) =>\n checkKeyPressed(e, () => {\n props.handleOptionSelection();\n })\n }\n >\n <Card.Content>\n <div className=\"conversion-tile\">\n {getOptionIcon(props.type)}\n <div className=\"content\">\n <BodyText className=\"title\" strong>\n {props.title}\n </BodyText>\n {props.rate && <CaptionText strong>{props.rate}</CaptionText>}\n <CaptionText as=\"span\">{props.description}</CaptionText>\n </div>\n <CheckmarkBackgroundIcon\n className={`icon-check ${!props.isSelected && 'hide-icon'}`}\n size=\"sm\"\n />\n </div>\n </Card.Content>\n </Card>\n );\n};\n\nCurrencyConversionOption.propTypes = {\n isSelected: PropTypes.bool,\n title: PropTypes.string,\n rate: PropTypes.string,\n description: PropTypes.string,\n className: PropTypes.string,\n handleOptionSelection: PropTypes.func,\n type: PropTypes.string,\n};\n\nconst CurrencyConversionModal = (props) => {\n const worldready = useContext(WorldReadyContext);\n const { selectedOption, exchangeRate } = props;\n let withPaypaltitle = new MessageFormat(worldready, {\n id: 'guest.crossBorder.label.withPaypal.title',\n }).format();\n let withPaypalRate = new MessageFormat(worldready, {\n id: 'guest.crossBorder.label.withPayPal.rate',\n }).format({\n amount: exchangeRate,\n });\n let withPaypalmessage = new MessageFormat(worldready, {\n id: 'guest.crossBorder.label.withPayPal.message',\n }).format();\n let withCardtitle = new MessageFormat(worldready, {\n id: 'guest.crossBorder.label.withCard.title',\n }).format();\n let withCardmessage = new MessageFormat(worldready, {\n id: 'guest.crossBorder.label.withCard.message',\n }).format();\n const [isPayPalSelected, setPaypalSelected] = useState(\n selectedOption === CURRENCY_CONVERSION_OPTIONS.PAYPAL\n );\n\n const handleClose = () => {\n props.hideModal();\n };\n\n const handleNextButton = () => {\n props.handleOptionSelection(\n isPayPalSelected\n ? CURRENCY_CONVERSION_OPTIONS.PAYPAL\n : CURRENCY_CONVERSION_OPTIONS.ISSUER\n );\n };\n\n return (\n <Sheet\n className=\"currency-conversion-modal\"\n title=\"\"\n hideTitle={true}\n isOpen={props.isOpen}\n onClose={handleClose}\n >\n <HeadingText size=\"lg\" className=\"text-center title\">\n <Message id=\"guest.crossBorder.label.modalTitle\" />\n </HeadingText>\n <BodyText className=\"text-center subTitle\">\n <Message id=\"guest.crossBorder.label.modalSubTitle\" />\n </BodyText>\n\n <CurrencyConversionOption\n isSelected={isPayPalSelected}\n title={withPaypaltitle}\n rate={withPaypalRate}\n description={withPaypalmessage}\n handleOptionSelection={() => setPaypalSelected(true)}\n className=\"option-paypal\"\n type=\"paypal-app\"\n />\n <CurrencyConversionOption\n isSelected={!isPayPalSelected}\n title={withCardtitle}\n description={withCardmessage}\n handleOptionSelection={() => setPaypalSelected(false)}\n className=\"option-card\"\n type=\"credit-cards\"\n />\n <div className=\"text-center\">\n <Button className=\"btn-sheet-wide\" onClick={handleNextButton}>\n <Message id=\"guest.crossBorder.label.modalButton\" />\n </Button>\n </div>\n </Sheet>\n );\n};\n\nCurrencyConversionModal.propTypes = {\n handleOptionSelection: PropTypes.func.isRequired,\n hideModal: PropTypes.func,\n selectedOption: PropTypes.string,\n exchangeRate: PropTypes.string,\n isOpen: PropTypes.bool,\n};\n\nexport default CurrencyConversionModal;\n","import { KEY_DOWN } from './constants';\n\nexport function checkKeyPressed(event, doFunction) {\n if (event.which === KEY_DOWN.SPACE || event.which === KEY_DOWN.ENTER) {\n return doFunction();\n }\n}\n","import React, { useState } from 'react';\nimport AppStore from '../../../stores/AppStore';\nimport PropTypes from 'prop-types';\nimport { BodyText, CaptionText, Button } from '@paypalcorp/pp-react';\nimport {\n showSpinnerOverlay,\n hideSpinnerOverlay,\n} from '../../../utility/helper';\nimport { trackLinkClick } from '../../../fpti/fpti';\nimport { LINK_NAME, PAGE_SPEC } from '../../../fpti/fptiConstants';\nimport CurrencyConversionModal from '../../../components/currencyConversion/CurrencyConversionModal';\nimport _get from 'lodash/get';\nimport _includes from 'lodash/includes';\nimport { Message } from '@paypalcorp/worldready-react';\n\nconst CrossBorder = ({\n isPaypalCurrencyConversion,\n funds,\n getFundingOptions,\n currencyConversionOption,\n getLocalizedCurrency,\n stateCurrency,\n hasFees,\n}) => {\n const fundingOptions = AppStore.getFundingOptions();\n const DYNAMIC_CURRENCY_CONVERSION_TAG = 'DYNAMIC_CURRENCY_CONVERSION';\n\n const rate = `${getLocalizedCurrency(\n '1.00',\n stateCurrency.inCurrency\n )}= ${getLocalizedCurrency(\n stateCurrency.exchangeRate,\n stateCurrency.outCurrency,\n 4\n )}`;\n\n const [currencyConversionOpen, setCurrencyConversionOpen] = useState(false);\n\n const handleOptionSelection = (option) => {\n if (currencyConversionOption !== option) {\n setCurrencyConversionOpen(false);\n showSpinnerOverlay();\n getFundingOptions(option).finally(() => {\n hideSpinnerOverlay();\n });\n } else {\n setTimeout(() => {\n setCurrencyConversionOpen(false);\n }, 300);\n }\n };\n\n /**\n * Returns true if currency conversion options should be displayed\n * @param {Array} fundingSources Funding Sources\n * @return {Boolean} True if currency conversion options should be displayed\n */\n const shouldShowCurrencyConversionOptions = () => {\n const fundingSources = fundingOptions.sources || [];\n const lastFundingSource = fundingSources[fundingSources.length - 1];\n const tags = _get(lastFundingSource, 'tags');\n return _includes(tags, DYNAMIC_CURRENCY_CONVERSION_TAG);\n };\n\n return (\n <>\n {!hasFees && (\n <div className=\"total-donation\">\n <BodyText strong>\n <Message id=\"guest.crossBorder.label.youllDonate\" />\n </BodyText>\n <BodyText strong>{funds}</BodyText>\n </div>\n )}\n\n <div className=\"change-conversion\">\n <BodyText>\n {isPaypalCurrencyConversion ? (\n <Message id=\"guest.crossBorder.label.withPaypal.title\" />\n ) : (\n <Message id=\"guest.crossBorder.label.withCard.title\" />\n )}\n </BodyText>\n <Button\n tertiary\n onClick={() => {\n trackLinkClick(LINK_NAME.CURRENCY_CONVERSION, {\n pageSpec: PAGE_SPEC.CROSS_BORDER_PAGE,\n });\n setCurrencyConversionOpen(true);\n }}\n >\n <Message id=\"guest.crossBorder.label.changeCurrencyButton\" />\n </Button>\n </div>\n {isPaypalCurrencyConversion && (\n <CaptionText>\n <Message id=\"guest.crossBorder.label.conversion\" amount={rate} />\n </CaptionText>\n )}\n\n {shouldShowCurrencyConversionOptions() && (\n <div className=\"conversion-message\">\n {isPaypalCurrencyConversion ? (\n <CaptionText>\n {AppStore.getUserCountry() === 'US' ? (\n <Message id=\"guest.crossBorder.label.spread\" />\n ) : (\n <Message id=\"guest.crossBorder.label.fee\" />\n )}\n </CaptionText>\n ) : null}\n </div>\n )}\n\n <CurrencyConversionModal\n isOpen={currencyConversionOpen}\n exchangeRate={rate}\n handleOptionSelection={handleOptionSelection}\n hideModal={() => setCurrencyConversionOpen(false)}\n selectedOption={currencyConversionOption}\n />\n </>\n );\n};\n\nCrossBorder.propTypes = {\n isPaypalCurrencyConversion: PropTypes.bool,\n funds: PropTypes.string,\n handleCurrencyConversionClick: PropTypes.func,\n exchangeRate: PropTypes.string,\n hasFees: PropTypes.bool,\n};\n\nexport default CrossBorder;\n","import React, { useContext, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n BodyText,\n IconButton,\n QuestionSmIcon,\n Sheet,\n Button,\n} from '@paypalcorp/pp-react';\nimport {\n Message,\n Context as WorldReadyContext,\n} from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\n\nconst FeePricing = ({ feeAmounts, getLocalizedCurrency }) => {\n const worldReady = useContext(WorldReadyContext);\n const [openHelperSheet, setOpenHelperSheet] = useState(false);\n\n let paymentAmount = getLocalizedCurrency(\n feeAmounts?.payment_amount?.value || '0.00',\n feeAmounts?.payment_amount?.currency || 'USD'\n );\n\n let totalFee = getLocalizedCurrency(\n feeAmounts?.total_fee?.value || '0.00',\n feeAmounts?.total_fee?.currency || 'USD'\n );\n\n let totalAmountPaid = getLocalizedCurrency(\n feeAmounts?.total_amount_paid?.value || '0.00',\n feeAmounts?.total_amount_paid?.currency || 'USD'\n );\n\n return (\n <>\n <div className=\"fee-donation\">\n <BodyText>\n <Message id=\"guest.reviewFees.donation\" />\n </BodyText>\n <BodyText>{paymentAmount}</BodyText>\n </div>\n <div className=\"fee-donation\">\n <BodyText className=\"pricing-fee\">\n <Message id=\"guest.reviewFees.fee\" />\n <IconButton\n className=\"tooltip-icon-button\"\n buttonType=\"tertiary\"\n svgIconComponent={QuestionSmIcon}\n size=\"sm\"\n onClick={() => setOpenHelperSheet(true)}\n >\n <Message id=\"guest.reviewFees.helperTitle\" />\n </IconButton>\n </BodyText>\n <BodyText>{totalFee}</BodyText>\n </div>\n <div className=\"fee-donation\">\n <BodyText strong>\n <Message id=\"guest.reviewFees.total\" />\n </BodyText>\n <BodyText strong>{totalAmountPaid}</BodyText>\n </div>\n\n <Sheet\n className=\"pricing-helper-sheet\"\n id=\"pricing-helper-sheet\"\n title={new MessageFormat(worldReady, {\n id: 'guest.reviewFees.helperTitle',\n }).format()}\n hideTitle={false}\n isOpen={openHelperSheet}\n onClose={() => setOpenHelperSheet(false)}\n >\n <BodyText className=\"helper-text-description\">\n <Message id=\"guest.reviewFees.helperDescription\" />\n </BodyText>\n <div className=\"button-link\">\n <Button\n as=\"a\"\n target=\"_blank\"\n href=\"/webapps/mpp/paypal-fees\"\n role=\"button\"\n secondary\n >\n <Message id=\"guest.reviewFees.helperButton\" />\n </Button>\n </div>\n </Sheet>\n </>\n );\n};\n\nFeePricing.propTypes = {\n feeAmounts: PropTypes.object,\n getLocalizedCurrency: PropTypes.func,\n};\n\nexport default FeePricing;\n","import React from 'react';\nimport AppStore from '../../stores/AppStore';\nimport * as AppActions from '../../actions/AppActions';\nimport TemplateData from '../../utility/getTemplateData';\nimport PropTypes from 'prop-types';\nimport { showSpinnerOverlay, hideSpinnerOverlay } from '../../utility/helper';\nimport CancelAndReturn from '../../components/cancelAndReturn';\nimport _get from 'lodash/get';\nimport _isEmpty from 'lodash/isEmpty';\nimport _find from 'lodash/find';\nimport DonateGiftAid from '../../guest-payment-components/DonateGiftAid';\nimport { formatCurrencyAsString } from '../../utility/formator';\nimport { withRouter } from 'react-router-dom';\nimport { observeUntilEventObserved } from '../../utility/helper';\nimport { fetcher } from '../../utility/domUtils';\nimport CVVComponent from '../../containers/cvv-component';\nimport withDonate from '../../components/guest/WithDonate';\nimport withTheme from '../../components/withTheme';\nimport ThreeDSContainer from '../../components/threeDS/ThreeDSContainer';\nimport {\n Alert,\n Button,\n BodyText,\n CaptionText,\n Row,\n Col,\n} from '@paypalcorp/pp-react';\nimport CloseButton from '../../components/CloseButton';\nimport BackButton from '../../components/BackButton';\nimport DonateHeader from '../../components/common/DonateHeader';\nimport PaymentInformation from './guestReviewComponents/PaymentInformation';\nimport CrossBorder from './guestReviewComponents/CrossBorder';\nimport FeePricing from './guestReviewComponents/FeePricing';\nimport {\n isExternalFlow,\n isPPUnlistedCampaign,\n} from '../../utility/productIntegrationUtils';\nimport { isInContext } from '../../utility/inContextDonation';\nimport {\n track3DSProceedToPayment,\n trackErrorIM,\n trackGuestReviewPageDonateClick,\n trackLinkClick,\n} from '../../fpti/fpti';\nimport { LINK_NAME, PAGE_SPEC } from '../../fpti/fptiConstants';\nimport withWorldReady from '../../components/withWorldReady';\nimport {\n Message,\n Context as WorldReadyContext,\n} from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport MessageWithHTML from '../../components/MessageWithHtml';\n\nconst donateGiftPercentage = AppStore.getGiftAidItExtraAmount();\n\nexport const CURRENCY_CONVERSION_OPTIONS = {\n PAYPAL: 'PAYPAL',\n ISSUER: 'ISSUER',\n};\n\nclass GuestReview extends React.Component {\n constructor(props) {\n super(props);\n\n let isRecurring = AppStore.getDonationRecurring() === 'checked';\n const stateConversionWithPayPal = this.getStateForConversionWithPayPal();\n\n this.state = {\n subHeaderLabel: TemplateData.donationName,\n donationId: AppStore.getSelectedProgram() || TemplateData.donationId,\n orgName: TemplateData.charityName,\n amountDecimalPoint: TemplateData.donationDecimalPoint || '.',\n decimalPoint: TemplateData.donationDecimalPoint || '.',\n isRecurring,\n ...stateConversionWithPayPal,\n showCVVField: false,\n securityCode: '',\n isCurrencyConversionModalOpen: false,\n selectedRecurringFrequency: AppStore.getSelectedRecurringFrequency(),\n };\n this.getFundingOptions = this.getFundingOptions.bind(this);\n }\n\n endCustomCPLTracking = () => {\n const spinnerOverlay = document.getElementById('spinnerOverlay');\n\n if (spinnerOverlay.style.display === 'none') {\n // From tesla flow we don't have the spinner\n window.PAYPAL.analytics.endCPLTracking({\n page: 'main:donate:wps:guest:crossBorder:web::',\n action: 'crossborder_page_loaded',\n uicomp: 'crossBorder',\n uitype: 'page',\n });\n } else {\n // From guest form we need to wait for the spinner to disappear\n observeUntilEventObserved(\n spinnerOverlay,\n { attributes: true },\n (observer) => {\n if (spinnerOverlay.style.display === 'none') {\n window.PAYPAL.analytics.endCPLTracking({\n page: 'main:donate:wps:guest:crossBorder:web::',\n action: 'crossborder_page_loaded',\n uicomp: 'crossBorder',\n uitype: 'page',\n });\n\n observer.disconnect();\n return;\n }\n }\n );\n }\n };\n\n componentDidMount() {\n this.endCustomCPLTracking();\n }\n\n getStateForConversionWithPayPal() {\n let fundingOptions = AppStore.getFundingOptions();\n let myData = AppStore.getAllData() || {};\n const cardType = _get(myData, 'cardSpec.cardSpec.type', '')\n .replace(/[.,_]|\\s\\(.*\\)/g, '')\n .replace(/[\\s_]/g, '-')\n .toLowerCase();\n let [fundingSources] = fundingOptions ? fundingOptions.sources : [];\n let paymentNetwork = fundingSources.payment_card.network.toLowerCase();\n paymentNetwork =\n paymentNetwork.charAt(0).toUpperCase() + paymentNetwork.slice(1);\n let paymentDigits = fundingSources.payment_card.last_4;\n let paymentType = (fundingSources?.payment_card?.type ?? '').toLowerCase();\n paymentType =\n paymentType && paymentType.charAt(0).toUpperCase() + paymentType.slice(1);\n let issuer = fundingSources.payment_card.issuer.name;\n let exchangeRate = parseFloat(\n fundingOptions.currency_conversion?.exchange_rate || '0.00'\n ).toString();\n let fundsIn = fundingOptions.currency_conversion?.funds_in || '0.00';\n let fundsOut = fundingOptions.currency_conversion?.funds_out || '0.00';\n let feeAmounts = fundingOptions.fee_amount || null;\n let amount = this.getLocalizedCurrency(\n fundingSources.payment_card.amount.value,\n fundingSources.payment_card.amount.currency\n );\n\n return {\n exchangeRate,\n paymentCard: `${paymentNetwork} x-${paymentDigits}`,\n paymentDigits,\n paymentType,\n source: fundingSources,\n issuerName: issuer,\n inAmount: fundsIn.value,\n inCurrency: fundsIn.currency,\n inSymbol: fundsIn.symbol,\n outAmount: fundsOut.value,\n outCurrency: fundsOut.currency,\n outSymbol: fundsOut.symbol,\n currencyConversionOption: CURRENCY_CONVERSION_OPTIONS.PAYPAL,\n cardType,\n feeAmounts,\n currencyConversion: fundingOptions.currency_conversion,\n fundingCode: !_isEmpty(fundingOptions.currency_conversion)\n ? 'CROSS_BORDER'\n : 'PAYER_FEE',\n currencyCode: fundingOptions.currencyCode,\n amount,\n };\n }\n\n getStateForConversionWithIssuer() {\n let fundingOptions = AppStore.getFundingOptions();\n let [fundingSources] = fundingOptions ? fundingOptions.sources : [];\n let amount = this.getLocalizedCurrency(\n fundingSources.payment_card.amount.value,\n fundingSources.payment_card.amount.currency\n );\n let symbol = AppStore.getDonationSymbol();\n let currency = AppStore.getDonationCode();\n let feeAmounts = fundingOptions.fee_amount || null;\n\n // No currency_conversion. fundsIn and fundsOut will not be available.\n return {\n amount,\n symbol,\n currency,\n currencyConversionOption: CURRENCY_CONVERSION_OPTIONS.ISSUER,\n currencyConversion: fundingOptions.currency_conversion,\n feeAmounts,\n };\n }\n\n updateFundingOptionsState() {\n let fundingOptions = AppStore.getFundingOptions();\n if (!fundingOptions.currency_conversion) {\n this.setState(this.getStateForConversionWithIssuer());\n } else {\n this.setState(this.getStateForConversionWithPayPal());\n }\n }\n\n getLocalizedCurrency = (amount, currency, totalDecimals = 2) => {\n let formatedAmount = {\n value: parseFloat(amount).toFixed(totalDecimals),\n currency: currency,\n maximumFractionDigits: totalDecimals,\n };\n let newAmount = formatCurrencyAsString(formatedAmount);\n return newAmount;\n };\n\n handleCurrencyConversionClick = () => {\n trackLinkClick(LINK_NAME.CURRENCY_CONVERSION, {\n pageSpec: PAGE_SPEC.CROSS_BORDER_PAGE,\n });\n this.showCurrencyConversionModal();\n };\n\n showCurrencyConversionModal = () => {\n this.setState({\n isCurrencyConversionModalOpen: true,\n });\n };\n\n hideCurrencyConversionModal = () => {\n this.setState({\n isCurrencyConversionModalOpen: false,\n });\n };\n\n handleDonateClick = () => {\n if (this.state.showCVVField) {\n const cvv = document.getElementById('securityCode').value;\n this.childCVVInfo.handleFieldBlur(\n cvv,\n 'errorMessageCSC',\n 'REQUIRED_SECURITY_CODE',\n 'INVALID_SECURITY_CODE'\n );\n\n let hasError =\n document.getElementsByClassName('vx_has-error-with-message').length > 0;\n if (!cvv || hasError) {\n return;\n }\n }\n const fundingOptions = AppStore.getFundingOptions();\n const contingencies = _get(fundingOptions, 'contingencies') || [];\n const threeDSContingency =\n _find(contingencies, { action: '3D_SECURE_DATA_COLLECTION_REQUIRED' }) ||\n {};\n\n if (!_isEmpty(threeDSContingency)) {\n this.threeDSContainer.initializeThreeDS();\n return;\n }\n\n // All contingencies resolved\n this.processDonation();\n };\n\n processDonation = () => {\n showSpinnerOverlay();\n\n trackGuestReviewPageDonateClick({\n isCvvSend: this.state.securityCode?.length > 0,\n });\n\n return this.props.doFulfilment({\n securityCode: this.state.securityCode,\n });\n };\n\n handleGiftAidOption = (giftAidState) => {\n AppActions.updateGiftaidItFlag({ giftAidItFlag: giftAidState });\n };\n\n getFundingOptions(currencyConversionType) {\n let fundingOptions = AppStore.getFundingOptions();\n const fundingSources = fundingOptions.sources || [];\n const lastFundingSource = fundingSources[fundingSources.length - 1];\n const paymentCardId = _get(lastFundingSource, 'payment_card.id');\n\n return fetcher('/donate/guest/fundingOptions', {\n method: 'POST',\n body: JSON.stringify({\n amount: AppStore.getDonationAmount(),\n code: AppStore.getDonationCode(),\n fundingOptionId: AppStore.getFundingOptions().id,\n preferences: {\n currency_conversion: [\n {\n payment_card_id: paymentCardId,\n type: currencyConversionType,\n validity: 'TRANSACTION',\n },\n ],\n },\n consentShareAddress: AppStore.getShareAddress(),\n token: TemplateData.token,\n onboardingEnabled: TemplateData.onboardingEnabled,\n }),\n })\n .then((response) => response.json())\n .then((result) => {\n console.log('getFundingOptions result :: ', result);\n\n // The funding options data format returned by the server is\n // different for ISSUER and PAYPAL. Handle it appropriately.\n\n // For conversion with 'ISSUER'\n if (currencyConversionType === CURRENCY_CONVERSION_OPTIONS.ISSUER) {\n fundingOptions = _get(result, 'data.fundingOpt[0]');\n } else {\n // For conversion with 'PAYPAL'\n fundingOptions = _get(result, 'fundingOpts[0]');\n }\n\n // Handle error case where fundingOptions call succeeds\n // but no data is returned\n if (_isEmpty(fundingOptions)) {\n trackErrorIM({\n errorCode: currencyConversionType,\n errorMessage: 'FUNDING_OPTIONS_EMPTY_CROSSBORDER',\n });\n this.props.history.push(\n `/donate/error/payment?token=${TemplateData.token}`\n );\n return;\n }\n\n // If CVV contingencies are present and has not been resolved,\n // then display cvv component\n const contingencies = _get(fundingOptions, 'contingencies');\n const hasCvvContingency = _find(contingencies, {\n action: 'CVV_REQUIRED',\n });\n const isCvvContingencyResolved = _get(\n result,\n 'data.contingencyResolutionStatus.cvvContingencyResolved',\n false\n );\n\n this.setState({\n showCVVField: hasCvvContingency && !isCvvContingencyResolved,\n });\n\n // Updating store with funding options\n AppActions.updateFundingOptions({ fundingOptions });\n\n this.updateFundingOptionsState();\n\n console.log(result);\n })\n .catch(() => {\n console.log('FAILED');\n this.props.history.push(\n `/donate/error/payment?token=${TemplateData.token}`\n );\n })\n .finally(() => {\n hideSpinnerOverlay();\n });\n }\n\n handleSecurityCodeChange = (securityCode) => {\n this.setState({\n securityCode: securityCode,\n });\n };\n\n handleThreeDSStepUpAuthSuccess = () => {\n this.props.toggleSpinner(true);\n\n track3DSProceedToPayment({\n isCvvSend: this.state.securityCode?.length > 0,\n });\n\n this.props.doFulfilment({\n securityCode: this.state.securityCode,\n });\n };\n\n handleThreeDSStepUpAuthFailure = () => {\n // Unrecoverable error !!\n this.props.history.push('/donate/error/payment');\n };\n\n handleThreeDSFailure = () => {\n // Unrecoverable error !!\n this.props.history.push('/donate/error/threeDS');\n };\n\n render() {\n const worldReady = this.context;\n const inAmount = this.getLocalizedCurrency(\n this.state.inAmount,\n this.state.inCurrency\n );\n const outAmount = this.getLocalizedCurrency(\n this.state.outAmount,\n this.state.outCurrency\n );\n\n let giftaidFlag = AppStore.getGiftaidItFlagStatus();\n\n const getRecurringLabel = () => {\n switch (this.state.selectedRecurringFrequency) {\n case 'Week':\n return 'donateNowRec.weekly';\n case 'Month':\n return 'donateNowRec.monthly';\n case 'Year':\n return 'donateNowRec.yearly';\n default:\n return 'donateNowRec.monthly';\n }\n };\n\n const { showCVVField } = this.state;\n\n return (\n <div\n className={`${\n TemplateData.bannerUrl ? 'gn_donate_wrapper' : 'donate_wrapper'\n } ${isInContext() ? 'context_gn_wrapper' : ''}`}\n >\n <DonateHeader />\n {showCVVField && (\n <Row className=\"alert-container mb-8\">\n <Alert type=\"warning\">\n <Message\n id=\"guest.guestForm.label.cscwarning\"\n csc={new MessageFormat(worldReady, {\n id: 'guest.guestForm.label.csc',\n })\n .format()\n .toLowerCase()}\n />\n </Alert>\n </Row>\n )}\n {isExternalFlow() && (\n <>\n <BackButton inverse />\n <CloseButton inverse />\n </>\n )}\n\n <div id=\"crossBorderContainer\" className=\"cross-border\">\n {TemplateData.isGiftaiditEnabled && (\n <DonateGiftAid\n isAlreadyEnrolled={giftaidFlag}\n showAddress={false}\n addressData=\"\"\n isChecked={giftaidFlag}\n handleGiftAidOption={this.handleGiftAidOption}\n giftaidInfo={{\n currency: this.state.outSymbol,\n amount: this.state.outAmount,\n orgName: this.state.subHeaderLabel,\n donateGiftPercentage: donateGiftPercentage,\n donationCode: AppStore.getDonationCode(),\n }}\n />\n )}\n <Row>\n <Col form=\"full\">\n <BodyText style={{ margin: '28px 0' }}>\n <Message id=\"guest.crossBorder.label.donatingFrom\" />\n </BodyText>\n </Col>\n </Row>\n <PaymentInformation\n fundingOptions={AppStore.getFundingOptions()}\n paymentDigits={this.state.paymentDigits}\n paymentType={this.state.paymentType}\n source={this.state.source}\n issuer={this.state.issuerName}\n isPaypalCurrencyConversion={\n this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n }\n funds={this.state.amount}\n cardType={this.state.cardType}\n />\n\n {showCVVField && (\n <CVVComponent\n onRef={(ref) => (this.childCVVInfo = ref)}\n handleSecurityCodeChange={this.handleSecurityCodeChange}\n />\n )}\n\n {isPPUnlistedCampaign() && !_isEmpty(this.state.feeAmounts) && (\n <FeePricing\n feeAmounts={this.state.feeAmounts}\n getLocalizedCurrency={this.getLocalizedCurrency}\n />\n )}\n\n {this.state.fundingCode === 'CROSS_BORDER' && (\n <CrossBorder\n hasFees={!_isEmpty(this.state.feeAmounts)}\n isPaypalCurrencyConversion={\n this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n }\n funds={\n this.state.currencyConversionOption ===\n CURRENCY_CONVERSION_OPTIONS.PAYPAL\n ? inAmount\n : this.state.amount\n }\n getFundingOptions={this.getFundingOptions}\n currencyConversionOption={this.state.currencyConversionOption}\n getLocalizedCurrency={this.getLocalizedCurrency}\n setSelectedOption={(currencyConversionType) =>\n this.setState({\n currencyConversionOption: currencyConversionType,\n })\n }\n stateCurrency={{\n inCurrency: this.state.inCurrency,\n exchangeRate: this.state.exchangeRate,\n amountDecimalPoint: this.state.amountDecimalPoint,\n inSymbol: this.state.inSymbol,\n outCurrency: this.state.outCurrency,\n }}\n />\n )}\n\n <div className=\"legal-text text-center\">\n <CaptionText>\n <MessageWithHTML\n id=\"guest.crossBorder.label.policies\"\n country={TemplateData.country}\n />\n </CaptionText>\n </div>\n\n <div className=\"text-center\">\n <Button\n className=\"btn-wide\"\n id=\"donate-button\"\n disabled={this.props.disabled}\n onClick={this.handleDonateClick}\n >\n {this.state.isRecurring ? (\n <Message\n id={`guest.guestForm.label.${getRecurringLabel()}`}\n amount={outAmount}\n />\n ) : (\n <Message id=\"guest.guestForm.label.donatenow\" />\n )}\n </Button>\n </div>\n <div className=\"cross-border-cancel-return\">\n <CancelAndReturn />\n </div>\n\n <ThreeDSContainer\n onThreeDSStepUpAuthNotRequired={this.handleThreeDSStepUpAuthSuccess}\n onThreeDSStepUpAuthSuccess={this.handleThreeDSStepUpAuthSuccess}\n onThreeDSStepUpAuthFailure={this.handleThreeDSFailure}\n onThreeDSFailure={this.handleThreeDSFailure}\n onRef={(ref) => (this.threeDSContainer = ref)}\n />\n </div>\n </div>\n );\n }\n}\n\nGuestReview.propTypes = {\n doFulfilment: PropTypes.func,\n history: PropTypes.object,\n toggleSpinner: PropTypes.func,\n disabled: PropTypes.bool,\n};\n\nGuestReview.contextType = WorldReadyContext;\n\nexport default withRouter(withWorldReady(withDonate(withTheme(GuestReview))));\n","import withPageTrack from '../../confirmation/withPageTrack';\nimport withPostTransactionRequest from '../../confirmation/withPostTransactionRequest';\nimport PendingView from '../../confirmation/PendingView';\nimport SuccessView from '../../confirmation/SuccessView';\n\nconst FLOW = 'guest';\nconst POST_TRANSACTION_URL = '/donate/guest/postTransaction';\n\nexport const GuestConfirmationPending = withPageTrack(\n withPostTransactionRequest(PendingView, POST_TRANSACTION_URL),\n FLOW,\n 'pending'\n);\n\nexport const GuestConfirmationSuccess = withPageTrack(\n withPostTransactionRequest(SuccessView, POST_TRANSACTION_URL),\n FLOW,\n 'success'\n);\n","import React, { useEffect } from 'react';\nimport { HeadingText, BodyText, Link, Button } from '@paypalcorp/pp-react';\nimport CloseButton from '../../components/CloseButton';\nimport {\n isInContext,\n isMobileOrInContext,\n} from '../../utility/inContextDonation';\nimport withTheme from '../../components/withTheme';\nimport { isExternalFlow } from '../../utility/productIntegrationUtils';\nimport { addClass } from '../../utility/domUtils';\n\nfunction FullPageError({\n title,\n body,\n body2,\n linkLabel,\n handleLinkClick,\n buttonLabel,\n handleButtonClick,\n showCloseButton = false,\n centerBody = false,\n}) {\n useEffect(() => {\n if (isInContext()) {\n addClass('#mainWrapper header.donate_global_nav', ['hide-header']);\n }\n }, []);\n return (\n <div\n className={`donate_wrapper ${\n isMobileOrInContext() ? 'mobile_view' : ''\n } ${isInContext() ? 'gn_donate_wrapper' : ''} fullPageError`}\n >\n {isExternalFlow() && showCloseButton && <CloseButton />}\n <HeadingText size=\"sm\" className=\"title\">\n {title}\n </HeadingText>\n {body ? (\n <BodyText className={`body ${centerBody ? 'text-center' : ''}`}>\n {body}\n </BodyText>\n ) : null}\n {body2 ? (\n <BodyText className={`body ${centerBody ? 'text-center' : ''}`}>\n {body2}\n </BodyText>\n ) : null}\n\n {buttonLabel ? (\n <Button secondary onClick={handleButtonClick} className=\"cta\">\n {buttonLabel}\n </Button>\n ) : null}\n\n {linkLabel ? (\n <Link className=\"cta\" onClick={handleLinkClick}>\n {linkLabel}\n </Link>\n ) : null}\n </div>\n );\n}\n\nexport default withTheme(FullPageError);\n","import React from 'react';\nimport AppStore from '../../stores/AppStore';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport templateData from '../../utility/getTemplateData';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { trackErrorPageIM } from '../../fpti/fpti';\nimport { PAGE_SPEC } from '../../fpti/fptiConstants';\nimport { addClass, removeClass } from '../../utility/domUtils';\nimport FullPageError from './FullPageError';\nimport MessageWithHTML from '../../components/MessageWithHtml';\nimport { Message } from '@paypalcorp/worldready-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\n\nclass PaymentError extends React.Component {\n static contextType = WorldReadyContext;\n\n constructor() {\n super();\n this.state = {};\n }\n\n getErrorMessage = (id, params) => {\n return new MessageFormat(this.context, {\n id: `errors.paymentError.error.${id}`,\n }).format(params);\n };\n\n componentDidMount = () => {\n addClass('#mainWrapper', ['full-page-error']);\n hideSpinnerOverlay();\n const ERROR_CODE = AppStore.getPaymentError() || '';\n trackErrorPageIM({\n pageSpec: PAGE_SPEC.GUEST_FAILURE_PAGE,\n errorCode: ERROR_CODE,\n });\n };\n\n componentWillUnmount() {\n removeClass('#mainWrapper', ['full-page-error']);\n }\n\n handleTryAgain = () => {\n this.props.history.push(`/donate?token=${templateData.token}`);\n };\n\n render() {\n const ERROR_CODE = AppStore.getPaymentError() || '';\n\n let WENT_WRONG = '',\n TEMP_GLITCH = '',\n tryagain = '';\n\n const hideButton = ERROR_CODE === 'WSM_PAYER_LIMIT_EXCEEDED';\n\n switch (ERROR_CODE) {\n case 'WSM_PAYMENT_DENIED':\n WENT_WRONG = <Message id=\"errors.paymentError.error.DID_NOT_WORK\" />;\n TEMP_GLITCH = (\n <Message id=\"errors.paymentError.error.DIFF_CREDIT_DEBIT\" />\n );\n tryagain = <Message id=\"errors.paymentError.label.trydiffcard\" />;\n break;\n case 'WSM_CANNOT_PAY_SELF':\n WENT_WRONG = (\n <Message id=\"errors.paymentError.error.WSM_CANNOT_PAY_SELF_H\" />\n );\n TEMP_GLITCH = this.getErrorMessage('WSM_CANNOT_PAY_SELF', {\n ['data.htmlTagsProps.name']: templateData.donationName,\n }).replace('{data.htmlTagsProps.name}', templateData.donationName);\n break;\n case 'WSM_PAYER_LIMIT_EXCEEDED':\n WENT_WRONG = (\n <Message id=\"errors.paymentError.error.AmountLimitBreachError\" />\n );\n TEMP_GLITCH = (\n <MessageWithHTML\n id=\"errors.paymentError.error.CustomerCareMessage\"\n customerServiceLink={'/selfhelp/home'}\n />\n );\n break;\n default:\n break;\n }\n\n return (\n <div>\n <FullPageError\n title={\n WENT_WRONG ||\n 'We’re sorry that we are experiencing temporary difficulties.'\n }\n body={\n TEMP_GLITCH ||\n 'Please try again later. We apologize for the inconvenience.'\n }\n buttonLabel={hideButton ? null : tryagain || 'Return to PayPal'}\n handleButtonClick={this.handleTryAgain}\n showCloseButton={true}\n />\n </div>\n );\n }\n}\n\nexport default withRouter(withTheme(PaymentError));\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport Illustration from '../../components/illustrations/Illustration';\nimport ConfirmationBody from '../../confirmation/ConfirmationBody';\nimport { isMobileOrInContext } from '../../utility/inContextDonation';\nimport { trackErrorPageIM } from '../../fpti/fpti';\nimport { PAGE_SPEC } from '../../fpti/fptiConstants';\nimport { Row, Col } from '@paypalcorp/pp-react';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport { Context as WorldReadyContext } from '@paypalcorp/worldready-react';\nclass UnilateralError extends React.Component {\n constructor() {\n super();\n this.state = {};\n }\n\n componentDidMount = () => {\n hideSpinnerOverlay();\n\n trackErrorPageIM({\n pageSpec: PAGE_SPEC.UNILATERAL_ERROR_PAGE,\n errorCode: 'UNILATERAL_ERROR',\n });\n };\n\n render() {\n const noAccountErrorMessage = new MessageFormat(this.context, {\n id: 'errors.paymentError.noAccountError',\n }).format();\n return (\n <div\n className={`donate_wrapper confirmation ${\n isMobileOrInContext() ? 'mobile_view' : ''\n }`}\n >\n <Row align=\"center\">\n <Illustration type=\"warning\" />\n </Row>\n <Row>\n <Col className=\"text-center\">\n <ConfirmationBody\n message={\n noAccountErrorMessage === 'errors.paymentError.noAccountError'\n ? \"We can't complete this donation. The receiver doesn't have a valid PayPal account.\"\n : noAccountErrorMessage\n }\n />\n </Col>\n </Row>\n </div>\n );\n }\n}\nUnilateralError.contextType = WorldReadyContext;\nexport default withRouter(withTheme(UnilateralError));\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport withTheme from '../../components/withTheme';\nimport templateData from '../../utility/getTemplateData';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport { Button } from '@paypalcorp/pp-react';\nimport Illustration from '../../components/illustrations/Illustration';\nimport ConfirmationTitle from '../../confirmation/ConfirmationTitle';\nimport ConfirmationBody from '../../confirmation/ConfirmationBody';\nimport { isMobileOrInContext } from '../../utility/inContextDonation';\nimport { isExternalFlow } from '../../utility/productIntegrationUtils';\nimport CloseButton from '../../components/CloseButton';\nimport { Row, Col } from '@paypalcorp/pp-react';\nimport { Message } from '@paypalcorp/worldready-react';\nimport withWorldReady from '../../components/withWorldReady';\nclass ThreeDSError extends React.Component {\n componentDidMount = () => {\n hideSpinnerOverlay();\n };\n\n handleTryAgain = () => {\n this.props.history.push(`/donate?token=${templateData.token}`);\n };\n\n render() {\n return (\n <div>\n <div\n className={`donate_wrapper confirmation ${\n isMobileOrInContext() ? 'mobile_view' : ''\n }`}\n >\n {isExternalFlow() && <CloseButton />}\n <Row>\n <Col align=\"center\">\n <Illustration type=\"warning\" />\n </Col>\n </Row>\n <Row>\n <Col className=\"text-center\">\n <ConfirmationTitle\n message={<Message id=\"errors.threeDSError.errorMessage\" />}\n />\n </Col>\n </Row>\n <Row>\n <Col className=\"text-center\">\n <ConfirmationBody\n message={<Message id=\"errors.threeDSError.tryAgain\" />}\n />\n </Col>\n </Row>\n\n <Row>\n <Col className=\"text-center\">\n <Button\n className=\"btn-wide\"\n id=\"tryAgain\"\n onClick={this.handleTryAgain}\n >\n <Message id=\"errors.threeDSError.tryCard\" />\n </Button>\n </Col>\n </Row>\n </div>\n </div>\n );\n }\n}\n\nexport default withWorldReady(withRouter(withTheme(ThreeDSError)));\n","import { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { getParameterByName } from '../utility/queryStringHelper';\nimport withDonate from './guest/WithDonate';\nimport * as AppActions from '../actions/AppActions';\nimport AppStore from '../stores/AppStore';\nimport _get from 'lodash/get';\nimport templateData from '../utility/getTemplateData';\nimport { isLoggedInUser, isOneTouchUser } from '../utility/authUtils';\nimport { trackCaptureOrderPageIM } from '../fpti/fpti';\nimport withWorldReady from './withWorldReady';\n\nclass CaptureOrder extends Component {\n constructor(props) {\n super(props);\n this.state = {\n token: '',\n accessToken: '',\n isSubmitted: false,\n backBtnVisible: false,\n responseData: '',\n wTransactionEntry: '',\n requestError: '',\n };\n }\n\n componentDidMount() {\n this.props.toggleSpinner(true);\n const donateToken = getParameterByName('dtoken');\n const orderToken = getParameterByName('token');\n const payerID = getParameterByName('PayerID');\n\n this.captureOrder(orderToken, donateToken, payerID);\n }\n\n captureOrder = (orderToken, donateToken, payerID) => {\n const { orderStatus } = AppStore.getOrderStatus() || {};\n const { token } = templateData;\n\n if (orderStatus === 'COMPLETED') {\n window.location.href = `/donate/paymentComplete?token=${token}`;\n return;\n }\n\n this.props\n .captureOrder(orderToken, donateToken, payerID)\n .then((response) => response.json())\n .then((result) => {\n const confirmationNumber =\n _get(result, 'data.confirmationData.confirmationNumber') ||\n _get(result, 'data.confirmationData.postBackData.txn_id');\n if (!confirmationNumber) {\n this.props.history.push(`/donate/error/payment?token=${token}`);\n return;\n }\n\n AppActions.updateOrderStatus({ orderStatus: 'COMPLETED' });\n\n const isMemberFlow = isLoggedInUser() || isOneTouchUser();\n const confirmationData = _get(result, 'data.confirmationData', {});\n this.handlePaymentSuccess(confirmationData, isMemberFlow);\n })\n .catch(() => {\n this.props.history.push(`/donate/error/payment?token=${token}`);\n });\n };\n\n handlePaymentSuccess = (response, isMemberFlow) => {\n AppActions.updateConfirmation({ confirmation: response });\n this.handleConfirmation(response, isMemberFlow);\n };\n\n handleConfirmation = (response, isMemberFlow) => {\n const { token } = templateData;\n const flow = isMemberFlow ? 'member' : 'guest';\n const page = response.isOfacPending ? 'pending' : 'confirmation';\n const url = token\n ? `/donate/${flow}/${page}/?token=${token}`\n : `/donate/${flow}/${page}`;\n\n trackCaptureOrderPageIM({\n flow,\n confirmationData: response,\n });\n\n this.props.history.push(url);\n };\n\n render() {\n return null;\n }\n}\n\nCaptureOrder.propTypes = {\n toggleSpinner: PropTypes.func,\n captureOrder: PropTypes.func,\n history: PropTypes.object,\n};\n\nexport default withWorldReady(withDonate(CaptureOrder));\n","import { useEffect } from 'react';\nimport templateData from '../utility/getTemplateData';\n\nlet timerCount = 0;\nexport default function CancelAndReturnOrder() {\n const redirectToCancelUrl = () => {\n const { charityCancelUrl } = templateData;\n if (charityCancelUrl) {\n window.location.href = charityCancelUrl;\n }\n };\n\n useEffect(() => {\n // xprops takes a few miliseconds to be populated\n // because it has to set up the communication with host window\n // Wait a maximum of 2 seconds for the value\n waitForXProps(() => {\n // No xprops for 2 seconds\n // Maybe we are not inContext?\n // Redirect to cancel url\n redirectToCancelUrl();\n });\n }, []);\n\n function waitForXProps(callback) {\n timerCount++;\n if (timerCount > 10) {\n callback();\n return;\n }\n if (!window.xprops) {\n setTimeout(() => {\n waitForXProps(callback);\n }, 200);\n } else {\n window.xprops.close();\n }\n }\n\n return null;\n}\n","import './publicPath';\n\nimport 'consumerweb-shim';\nimport 'core-js/stable';\nimport 'regenerator-runtime/runtime';\nimport '../utility/bootstrap';\nimport React, { Component, Suspense, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Route, Switch, Router } from 'react-router-dom';\nimport history from './configureHistory';\nimport CookiedUserPage from './../pages/landing/landing';\nimport CampaignLanding from '../pages/landing/campaignLanding';\nimport Review from './../pages/guest/GuestReview';\nimport {\n GuestConfirmationPending,\n GuestConfirmationSuccess,\n} from '../pages/guest/confirmation';\nimport PaymentError from './../pages/error/paymentError';\nimport UnilateralError from '../pages/error/UnilateralError';\nimport templateData from './../utility/getTemplateData';\nimport { isOneTouchUser, isAuthenticatedUser } from 'utility/authUtils';\nimport { parseUrlQuery } from '../utility/urlUtils';\nimport { setShouldRTL } from '../utility/paypalAphrodite';\nimport { showSpinnerOverlay, hideSpinnerOverlay } from '../utility/helper';\nimport ThreeDSError from '../pages/error/threeDSError';\nimport { reactLazyPreload } from '../utility/lazyLoader';\nimport CaptureOrder from '../components/CaptureOrder';\nimport CancelAndRedirectOrder from '../components/CancelAndRedirectOrder';\nimport {\n MemberConfirmationPending,\n MemberConfirmationSuccess,\n} from '../pages/member/confirmation';\nimport Footer from '../components/footer/footer';\n\nimport '../../css/ppvx.less';\nimport '../../css/ppvx-app.less';\nimport '../../css/portable-onboarding.less';\nimport { addClass, removeClass } from '../utility/domUtils';\nimport {\n isGNC,\n isPPCampaign,\n isCampaigns,\n} from '../utility/productIntegrationUtils';\nimport withWorldReady from '../components/withWorldReady';\n\n// set the direction for styles (whether to convert them to RTL)\nconst { locality: { directionality = 'ltr' } = {} } = templateData;\nsetShouldRTL(directionality !== 'rtl');\n\nconst { currentUserState, isUnilateralAccount, paymentStatus } = templateData;\n\nconst GuestPage = reactLazyPreload(() =>\n import(/* webpackChunkName: \"GuestPage\" */ './../pages/guest/guest')\n);\n\nfunction FallbackSpinner() {\n useEffect(() => {\n showSpinnerOverlay();\n }, []);\n\n return <></>;\n}\n\nclass LandingPage extends Component {\n constructor(props) {\n super(props);\n this.state = {\n userCookied: currentUserState === 'cookied',\n isOneTouch: isOneTouchUser(),\n };\n }\n\n componentDidMount() {\n if (!(isGNC() || isPPCampaign())) {\n addClass('#mainWrapper', ['landing-page']);\n }\n\n if (isUnilateralAccount) {\n history.push('/donate/error/noaccount');\n return;\n }\n // Only hiding spinner for cookied user and if payment token status is not complete\n if (this.state.userCookied && paymentStatus !== 'complete') {\n // In case of onboarding, guest.js will hide the spinner\n if (!templateData.onboardingEnabled) {\n hideSpinnerOverlay();\n }\n }\n\n if (!isAuthenticatedUser()) {\n GuestPage.preload();\n }\n }\n componentWillUnmount() {\n if (!(isGNC() || isPPCampaign())) {\n removeClass('#mainWrapper', ['landing-page']);\n }\n }\n\n getPageToRender() {\n // If `signup` param is present, render GuestPage\n const isSignupRoute = !!parseUrlQuery().signup;\n if (isSignupRoute) {\n return <GuestPage />;\n }\n return <CookiedUserPage />;\n }\n\n render() {\n return <div>{this.getPageToRender()}</div>;\n }\n}\n\nfunction CampaignLandingPage() {\n const getPageToRender = () => {\n // If `signup` param is present, render GuestPage\n const isSignupRoute = !!parseUrlQuery().signup;\n if (isSignupRoute) {\n return <GuestPage />;\n }\n return <CampaignLanding />;\n };\n\n return <>{getPageToRender()}</>;\n}\n\nconst MainRouter = () => (\n <Router history={history}>\n <Suspense fallback={<FallbackSpinner />}>\n <Switch>\n <Route\n exact\n path=\"/donate\"\n component={isCampaigns() ? CampaignLandingPage : LandingPage}\n />\n <Route exact path=\"/donate/capture\" component={CaptureOrder} />\n <Route\n exact\n path=\"/donate/orders/cancel\"\n component={CancelAndRedirectOrder}\n />\n <Route exact path=\"/donate/guest\" component={GuestPage} />\n <Route exact path=\"/donate/guest/crossborder\" component={Review} />\n <Route\n exact\n path=\"/donate/guest/confirmation\"\n component={GuestConfirmationSuccess}\n />\n <Route\n exact\n path=\"/donate/guest/pending\"\n component={GuestConfirmationPending}\n />\n <Route\n exact\n path=\"/donate/member/confirmation\"\n component={MemberConfirmationSuccess}\n />\n <Route\n exact\n path=\"/donate/member/pending\"\n component={MemberConfirmationPending}\n />\n <Route exact path=\"/donate/error/payment\" component={PaymentError} />\n <Route\n exact\n path=\"/donate/error/noaccount\"\n component={UnilateralError}\n />\n <Route exact path=\"/donate/error/threeDS\" component={ThreeDSError} />\n </Switch>\n </Suspense>\n <Footer />\n </Router>\n);\n\nconst RouterWithWorldReady = withWorldReady(MainRouter);\n\nReactDOM.render(\n <RouterWithWorldReady />,\n document.getElementById('donateWrapper')\n);\n","import TemplateData from './getTemplateData';\nimport { lazy as reactLazy } from 'react';\nimport { trackErrorIM } from '../fpti/fpti';\n\n/**\n * Loads bodymovin and hearts animation json\n */\nexport function loadBodyMovin() {\n if (\n typeof window.bodymovin !== 'undefined' &&\n typeof window.heartsAnimationData !== 'undefined'\n ) {\n return Promise.resolve([window.bodymovin, window.heartsAnimationData]);\n }\n return Promise.all([\n loadScript(\n 'https://www.paypalobjects.com/donate/bodymovin/bodymovin.min.js'\n ),\n loadScript('https://www.paypalobjects.com/donate/bodymovin/hearts.js'),\n ]).catch((error) => {\n trackErrorIM({\n errorCode: 'LAZY_LOAD_FAILED',\n errorMessage: error,\n fieldName: 'bodymovin',\n });\n });\n}\n\n/**\n * Load Progressive Onboarding component (Slick Version)\n */\nexport function loadSlickProgressiveOnboarding() {\n return Promise.all([\n import(\n /* webpackChunkName: 'ProgressiveonboardingSlick' */ 'portableonboarding'\n ),\n ]).catch((error) => {\n trackErrorIM({\n errorCode: 'LAZY_LOAD_FAILED',\n errorMessage: error,\n fieldName: 'progressive_slick',\n });\n });\n}\n\n// eslint-disable-next-line\nfunction loadScript(scriptPath) {\n return new Promise((resolve, reject) => {\n const nonce = TemplateData.nonce;\n var script = document.createElement('script');\n document.getElementsByTagName('head')[0].appendChild(script);\n script.onload = function (params) {\n resolve(params);\n };\n script.onerror = function (params) {\n reject(params);\n };\n script.nonce = nonce;\n script.src = scriptPath;\n });\n}\n\nexport function waitForOnload() {\n return new Promise((resolve) => {\n if (document.readyState === 'complete') {\n resolve();\n } else {\n window.addEventListener('load', () => {\n resolve();\n });\n }\n });\n}\n\n/**\n * Lazy load a React component and add preload option\n */\nexport function reactLazyPreload(importStatement) {\n const lazyComponent = reactLazy(importStatement);\n lazyComponent.preload = importStatement;\n return lazyComponent;\n}\n"],"sourceRoot":""}