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GAAIA,EAAK,GAAIA,EAAK,IAG5D,IAAIiC,EAAQ,CAAC,MAEb,OADApB,EAAMU,EAAMU,EAAOjC,GACZ,IAAKa,EAAMT,EAAM2B,EAAQE,IAGlC,IAAIC,EAAQF,EAAUxB,UAClB2B,EAAWjB,EAAO9B,EAAS8C,GAASA,EAAQb,GAC5Ce,EAASvB,EAAMkB,EAAQI,EAAUnC,GACrC,OAAOZ,EAASgD,GAAUA,EAASD","sources":["webpack:///./resources/js/buyer-experience/common/environment.ts","webpack:///./resources/js/common/consentHubV2/ConsentClient.ts","webpack:///./resources/js/react/sign-up-layout/WacSignUpLayoutContainer.tsx","webpack:///./node_modules/core-js/internals/function-bind.js","webpack:///./node_modules/core-js/modules/es.reflect.construct.js"],"sourcesContent":["const ENV_DEV = 'dev';\nconst ENV_STAGING = 'staging';\nconst ENV_PRODUCTION = 'production';\n\nexport default class Environment {\n\n static getEnvironment() {\n let env = ENV_PRODUCTION;\n const hostname = window.location.hostname.split('.')[0];\n const forceStaging = window.location.search.includes('forceProdTesting=true');\n \n if (forceStaging) {\n return ENV_PRODUCTION;\n }\n \n switch (hostname) {\n case 'wac':\n case 'qa-wac':\n case 'author':\n case 'proof':\n env = ENV_STAGING;\n break;\n case 'localhost':\n case 'local':\n env = ENV_DEV;\n break;\n case \"truth\":\n case \"www\":\n case \"atlassian\":\n case \"bitbucket\":\n case \"sourcetreeapp\":\n case \"agile\": \n case \"git\":\n case \"software\":\n return ENV_PRODUCTION;\n default:\n /* for omlet instances */\n env = ENV_STAGING;\n }\n return env;\n }\n\n static production() {\n return ENV_PRODUCTION;\n }\n\n static staging() {\n return ENV_STAGING;\n }\n\n static dev() {\n return ENV_DEV;\n }\n}\n","import stgConfig from \"../../../../config\";\nimport axios from \"axios\";\n\nimport Environment from \"../../buyer-experience/common/environment\";\n\nconst DEV_ENV = Environment.dev();\nconst STAGING_ENV = Environment.staging();\nconst PRODUCTION_ENV = Environment.production();\n\nconst BXP_EXPRESS_ENDPOINT: { [key: string]: string } = {};\nBXP_EXPRESS_ENDPOINT[PRODUCTION_ENV] = \"https://www.atlassian.com/endpoint\";\nBXP_EXPRESS_ENDPOINT[STAGING_ENV] = `${window.location.hostname.indexOf(\"qa-wac\") > -1\n ? \"https://qa-wac.internal.atlassian.com\"\n : stgConfig.stgWacInternalUrl\n }/endpoint`;\nBXP_EXPRESS_ENDPOINT[DEV_ENV] = BXP_EXPRESS_ENDPOINT[STAGING_ENV];\n\nexport type Consent = {\n key: string;\n displayedText: string;\n granted: boolean;\n};\n\nexport type SubscriptionKey = string;\n\nexport type Subscription = {\n key: SubscriptionKey;\n subscribed: boolean;\n};\n\ntype SubsciberDetails = { [key: string]: string };\n\n// Should match `UpdatePreferencesPayload` in `bxp-express`\ntype UpdatePreferencesPayload = {\n formId: string;\n site?: string;\n source?: string;\n email: string;\n locale: string;\n formUrl: string;\n subscriberDetails?: SubsciberDetails;\n consentLabelText?: string;\n consentCheckboxValue: boolean;\n privacyPolicyText?: string;\n ndaText?: string;\n};\n\ntype UpdatePreferencesParams = {\n formId: string;\n site?: string;\n source?: string;\n email: string;\n locale?: string;\n paramsLocale?: string;\n formUrl: string;\n consentLabelText?: string;\n consentCheckboxValue: boolean;\n privacyPolicyText?: string;\n ndaText?: string;\n};\n\nconst requiredProps = [\"email\", \"site\", \"locale\", \"formUrl\"];\n\nclass ConsentHubClient {\n config: {\n locale?: string;\n localeRequiresMarketingCommunicationOptIn?: boolean;\n };\n bxpExpressEndpoint: string;\n\n constructor() {\n this.config = {};\n\n this.bxpExpressEndpoint = BXP_EXPRESS_ENDPOINT[Environment.getEnvironment()];\n }\n\n /**\n * Set a user's subscriptions & consents (for a specific mailing list).\n */\n async updatePreferences(params: UpdatePreferencesParams) {\n const paramsLocale = params.paramsLocale ? params.paramsLocale : \"UNKNOWN\";\n const postData: UpdatePreferencesPayload = { locale: (this.config.locale || paramsLocale), ...params };\n\n // eslint-disable-next-line no-prototype-builtins\n if (!requiredProps.every((prop) => postData.hasOwnProperty(prop))) {\n throw `Invalid parameters. Required: {${requiredProps.toString()}}`;\n }\n\n const endpoint = `${this.bxpExpressEndpoint}/preferencesV2/update`;\n const response = await axios.post(endpoint, postData, {\n headers: {\n \"Content-Type\": \"application/json\",\n },\n });\n return response.status;\n }\n\n /**\n * Get \"config\" data from ConsentHub\n */\n async requestConfig() {\n return this.config = (await axios.post(\n `${this.bxpExpressEndpoint}/preferencesV2/consent-config`\n )).data;\n }\n}\n\nexport default ConsentHubClient;\n","import { SignUpLayoutContainer } from \"@atlassiansox/bxpkit-wac-sign-up\";\nimport { AnalyticsListener } from \"@atlaskit/analytics-next\";\nimport React, { useEffect, useState } from \"react\";\nimport { IntlProvider } from \"react-intl\";\nimport { trackEvent, trackOptimizely } from \"../../common/analytics\";\nimport { ConsentHubClient } from \"../../common/ConsentHubV2\";\nimport { OptimizelyType, SegmentType } from \"@atlassiansox/bxpkit-core\";\n\nconst getLocale = async () => {\n const consentHub = new ConsentHubClient();\n return await consentHub.requestConfig();\n};\n\n// Combined Analytics Tracking\nconst analyticsTrack = {\n segment: trackEvent,\n newRelic: {\n action: () => {},\n attribute: () => {},\n trackAjax: () => {},\n },\n optimizely: trackOptimizely,\n};\n\nexport type AnalyticsPayload = {\n readonly schemaVersion: number;\n readonly event: string;\n readonly eventType: string;\n readonly eventComponent: string;\n readonly eventContainer: string;\n readonly eventColumn: string;\n readonly eventName: string;\n readonly label: string;\n readonly parentLabel: string;\n readonly uuid: string;\n readonly layout: string;\n readonly bundle: string;\n readonly product: string;\n readonly edition: string;\n};\n\nexport type SendOptimizelyAnalyticsOptions = {\n readonly payload: AnalyticsPayload;\n};\n\nexport type SendAnalyticsOptions = {\n readonly payload: AnalyticsPayload;\n readonly context: AnalyticsPayload[];\n};\n\nfunction sendOptimizelyAnalytics({ payload }: SendOptimizelyAnalyticsOptions) {\n trackOptimizely(payload.eventName);\n}\n\nfunction sendAnalytics({ payload, context }: SendAnalyticsOptions) {\n const analyticsDataList = [...context, payload];\n const analyticsEvent = analyticsDataList.reduce(\n (mergedAnalyticsEvent, currentAnalyicsEvent) => {\n return { ...mergedAnalyticsEvent, ...currentAnalyicsEvent };\n },\n {}\n ) as AnalyticsPayload;\n trackEvent(analyticsEvent.eventName, analyticsEvent);\n}\n\ntype LayoutType =\n | \"default\"\n | \"standalone\"\n | \"standalone-v2\"\n | \"devops\"\n | \"devops-v2\"\n | \"first-impressions\"\n | \"first-impressions-v2\";\n\nexport type FirstImpressionsAppImageUrlsType = {\n readonly heroImage: string;\n readonly socialProofImage?: string;\n};\n\nexport type FirstImpressionsImageUrlsType = {\n readonly backgroundImage: string;\n readonly jiraSoftware: FirstImpressionsAppImageUrlsType;\n readonly jiraServiceDesk: FirstImpressionsAppImageUrlsType;\n readonly confluence: FirstImpressionsAppImageUrlsType;\n readonly jiraCore: FirstImpressionsAppImageUrlsType;\n readonly teamCentral: FirstImpressionsAppImageUrlsType;\n readonly jiraProductDiscovery: FirstImpressionsAppImageUrlsType;\n readonly compass: FirstImpressionsAppImageUrlsType;\n};\n\nexport type LabelsType = { [key: string]: string };\n\nexport type Product = {\n readonly productKey: string;\n readonly productName: string;\n readonly productLogoUrl?: string;\n readonly productLogoWhiteUrl?: string;\n};\n\ntype LocaleType = {\n readonly locale: string;\n readonly localeRequiresMarketingCommunicationOptIn: boolean;\n};\n\ntype AnalyticsTrackType = {\n readonly optimizely: OptimizelyType;\n readonly segment: SegmentType;\n};\n\nexport type ProductType = {\n readonly productKey: string;\n readonly productName: string;\n readonly productLogoUrl?: string;\n readonly productLogoWhiteUrl?: string;\n readonly atlasKitLogoName?: string;\n};\n\nexport type BundleContent = {\n readonly heroImage: string;\n readonly headline: string;\n readonly socialProofImage?: string;\n readonly featureList: string;\n};\n\nexport type ProductDataType = {\n readonly products: ProductType[];\n readonly bundleProductKeys: string;\n readonly iconSrc?: string;\n readonly iconAlt?: string;\n readonly calloutRichText?: string;\n readonly bundleContent?: {\n readonly default: BundleContent;\n };\n};\n\nexport type DevopsImageUrlsType = {\n readonly sidebarImage: string;\n readonly backgroundImage: string;\n readonly envelopeN2N: string;\n readonly successN2E: string;\n};\n\nexport type FeatureFlags = {\n readonly enableTintinMvp?: boolean;\n readonly enableAisAvailableProducts?: boolean;\n readonly enableDevopsGoogleSignup?: boolean;\n readonly provisionSecondPartyApps?: boolean;\n readonly enableDeferredFullName?: boolean;\n readonly enableDeferredSiteName?: boolean;\n}\n\nexport type GlobalConfiguration = {\n readonly confirmationPageUrl: string;\n readonly checkEmailPageUrl: string;\n readonly socialContinueUrl: string;\n readonly siteRenamePageUrl?: string;\n};\n\nexport type SignUpLayoutContainerProps = {\n readonly allowEnableAutogenSiteName: boolean;\n readonly allowSignupWithGoogle: boolean;\n readonly enableFreeBreachTest: boolean;\n readonly showSocialSignupForm: boolean;\n readonly socialContinueUrl: string;\n readonly loadingImageSrc: string;\n readonly errorImageSrc: string;\n readonly productData: { [key: string]: ProductDataType };\n readonly locale: LocaleType;\n readonly analyticsTrack: AnalyticsTrackType;\n readonly labels: LabelsType;\n readonly layout?: LayoutType;\n readonly productOverride?: string;\n readonly bundleOverride?: string;\n readonly editionOverride?: string;\n readonly performanceStartTime?: number;\n readonly firstImpressionsImageUrls: FirstImpressionsImageUrlsType;\n readonly devopsImageUrls: DevopsImageUrlsType;\n readonly siteRenamePageUrl?: string;\n readonly enableSkipRecaptcha?: boolean;\n readonly featureFlags: FeatureFlags;\n readonly globalConfiguration?: GlobalConfiguration;\n};\n\n/**\n * @param props - same as the props received by this container\n */\nexport default function WacSignUpLayoutContainer(\n props: SignUpLayoutContainerProps\n) {\n const [locale, setLocale] = useState({\n locale: \"UNKNOWN\",\n localeRequiresMarketingCommunicationOptIn: true,\n });\n const [fetchingLocale, setFetchingLocale] = useState(true);\n\n useEffect(() => {\n async function getLocaleData() {\n const localeData = await getLocale();\n if (localeData) {\n setLocale(localeData);\n }\n }\n getLocaleData()\n .then(() => setFetchingLocale(false))\n .catch(() => setFetchingLocale(false));\n }, []);\n\n return fetchingLocale ? (\n
\n ) : (\n