Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
130 lines
5.6 KiB
TypeScript
130 lines
5.6 KiB
TypeScript
// Module ID: 13548
|
|
// Function ID: 13549
|
|
// Name: referralBannerContent
|
|
// Dependencies: [13537, 1074, 13538, 13539, 7563, 1115, 2025, 2]
|
|
// Exports: getAllReferralsSent, getReferralBannerBodyText, getReferralBannerHeadingText, getReferralStatus, getShouldShowSpendOrbsCta
|
|
|
|
// Module 13548 (referralBannerContent)
|
|
import Constants2 from "Constants" /* 1074 */;
|
|
import util from "util" /* 1115 */;
|
|
import HelpdeskUtilsDefault from "HelpdeskUtils" /* 2025 */;
|
|
import ReferralTrialActionCreators from "ReferralTrialActionCreators" /* 7563 */;
|
|
import useReferralProgramBannerDetails from "useReferralProgramBannerDetails" /* 13538 */;
|
|
import PremiumReferralIncentivesExperiment from "PremiumReferralIncentivesExperiment" /* 13539 */;
|
|
import Constants from "Constants" /* 13537 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
({ REFERRAL_INCENTIVE_DISCOUNT_PERCENTAGE: c3, REFERRAL_INCENTIVE_ORBS_PER_CONVERSION: closure_4 } = Constants);
|
|
const HelpdeskArticles = Constants2.HelpdeskArticles;
|
|
const result = size.fileFinishedImporting("modules/premium/referral_program/referralBannerContent.tsx");
|
|
|
|
export const getAllReferralsSent = function getAllReferralsSent(size) {
|
|
return size.size === useReferralProgramBannerDetails.MAX_REFERRALS_SENT;
|
|
};
|
|
export const getShouldShowSpendOrbsCta = function getShouldShowSpendOrbsCta(numSent, referralRewardType) {
|
|
let tmp3 = referralRewardType === PremiumReferralIncentivesExperiment.ReferralRewardType.ORBS;
|
|
if (tmp3) {
|
|
tmp3 = numSent.numSent === useReferralProgramBannerDetails.MAX_REFERRALS_SENT;
|
|
}
|
|
if (tmp3) {
|
|
tmp3 = numSent.numConverted >= 1;
|
|
}
|
|
return tmp3;
|
|
};
|
|
export const getReferralStatus = function getReferralStatus(numSent) {
|
|
_require = 0;
|
|
importDefault = 0;
|
|
dependencyMap = 0;
|
|
const item = numSent.forEach((item) => {
|
|
if (item === ReferralTrialActionCreators.ReferralOfferStatus.REFERRER_REWARD_GRANTED) {
|
|
closure_0 = closure_0 + 1;
|
|
closure_1 = closure_1 + 1;
|
|
closure_2 = closure_2 + 1;
|
|
} else if (item === tmp(7563).ReferralOfferStatus.CONVERTED) {
|
|
closure_1 = closure_1 + 1;
|
|
closure_2 = closure_2 + 1;
|
|
} else if (item === tmp(7563).ReferralOfferStatus.REDEEMED) {
|
|
closure_2 = closure_2 + 1;
|
|
}
|
|
});
|
|
return { numRewardGranted: _require, numConverted: importDefault, numRedeemed: dependencyMap, numSent: numSent.size };
|
|
};
|
|
export const getReferralBannerHeadingText = function getReferralBannerHeadingText(arg0) {
|
|
if (arg0 === PremiumReferralIncentivesExperiment.ReferralRewardType.ORBS) {
|
|
const intl3 = tmp(1115).intl;
|
|
let stringResult = intl3.string(tmp(1115).t.tAlkl4);
|
|
} else if (arg0 === tmp(13539).ReferralRewardType.DISCOUNT) {
|
|
const intl2 = tmp(1115).intl;
|
|
const obj = { discountPercent };
|
|
stringResult = intl2.formatToPlainString(tmp(1115).t["/JJ9I5"], obj);
|
|
} else {
|
|
const intl = tmp(1115).intl;
|
|
stringResult = intl.string(tmp(1115).t.USo4s7);
|
|
}
|
|
return stringResult;
|
|
};
|
|
export const getReferralBannerBodyText = function getReferralBannerBodyText(arg0, numRewardGranted, arg2) {
|
|
let obj = dependencyMap;
|
|
const articleURL = HelpdeskUtilsDefault.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM);
|
|
if (null != arg2) {
|
|
let OluhLp = require;
|
|
if (numRewardGranted.numRewardGranted !== useReferralProgramBannerDetails.MAX_REFERRALS_SENT) {
|
|
if (numRewardGranted.numSent === OluhLp(13538).MAX_REFERRALS_SENT) {
|
|
if (arg2 === OluhLp(13539).ReferralRewardType.ORBS) {
|
|
const intl9 = OluhLp(1115).intl;
|
|
const obj3 = { helpdeskArticle: articleURL };
|
|
let formatResult = intl9.format(OluhLp(1115).t["1aV1j9"], obj3);
|
|
} else {
|
|
const intl8 = OluhLp(1115).intl;
|
|
const obj4 = { helpdeskArticle: articleURL };
|
|
formatResult = intl8.format(OluhLp(1115).t.QNrPuS, obj4);
|
|
}
|
|
} else if (arg0) {
|
|
if (arg2 === OluhLp(13539).ReferralRewardType.ORBS) {
|
|
const intl7 = OluhLp(1115).intl;
|
|
const obj5 = { numOrbs, helpdeskArticle: articleURL };
|
|
let formatResult1 = intl7.format(OluhLp(1115).t.cfE0uG, obj5);
|
|
} else {
|
|
const intl6 = OluhLp(1115).intl;
|
|
const obj6 = { helpdeskArticle: articleURL };
|
|
formatResult1 = intl6.format(OluhLp(1115).t["+fcvlI"], obj6);
|
|
}
|
|
} else {
|
|
const intl5 = OluhLp(1115).intl;
|
|
const obj7 = { helpdeskArticle: articleURL };
|
|
intl5.format(OluhLp(1115).t["a0+Jwv"], obj7);
|
|
}
|
|
}
|
|
if (arg2 === OluhLp(13539).ReferralRewardType.ORBS) {
|
|
const intl11 = OluhLp(1115).intl;
|
|
OluhLp = OluhLp(1115).t.OluhLp;
|
|
obj = { helpdeskArticle: articleURL };
|
|
let formatResult3 = intl11.format(OluhLp, obj);
|
|
} else {
|
|
const intl10 = OluhLp(1115).intl;
|
|
const obj8 = { helpdeskArticle: articleURL };
|
|
formatResult3 = intl10.format(OluhLp(1115).t["8BYihN"], obj8);
|
|
}
|
|
} else if (arg0) {
|
|
let v1aEjsH = require;
|
|
if (numRewardGranted.numSent !== useReferralProgramBannerDetails.MAX_REFERRALS_SENT) {
|
|
const intl2 = v1aEjsH(1115).intl;
|
|
const obj9 = { helpdeskArticle: articleURL };
|
|
intl2.format(v1aEjsH(1115).t["omMr+V"], obj9);
|
|
}
|
|
if (numRewardGranted.numRedeemed === v1aEjsH(13538).MAX_REFERRALS_SENT) {
|
|
const intl4 = v1aEjsH(1115).intl;
|
|
v1aEjsH = v1aEjsH(1115).t["1aEjsH"];
|
|
const obj10 = { helpdeskArticle: articleURL };
|
|
let formatResult5 = intl4.format(v1aEjsH, obj10);
|
|
} else {
|
|
const intl3 = v1aEjsH(1115).intl;
|
|
const obj11 = { helpdeskArticle: articleURL };
|
|
formatResult5 = intl3.format(v1aEjsH(1115).t["+u3AOO"], obj11);
|
|
}
|
|
} else {
|
|
const intl = util.intl;
|
|
const obj12 = { helpdeskArticle: articleURL };
|
|
return intl.format(util.t["zWhX/Q"], obj12);
|
|
}
|
|
};
|