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YAAYa,OAAO,CAAC,SAAU,eAAgB,cAG9C,IAAI,CAAC3J,OAAO,CAACE,OAAO,CAAC,CAAEwJ,cAAAA,CAAc,GAGrClB,EAAgBD,GAClB,EAEJ,GAEO,IAAI,CAACvI,OAAO,CAQrB4J,YAAYV,CAAQ,CAAE,KAEhBW,EAAA,QAAAA,CAAAA,EAAA,IAAI,CAAC7J,OAAO,GAAZ6J,KAAA,IAAAA,EAAA,OAAAA,EAAczJ,MAAM,IAAK,aAC3B8I,IAGF,IAAI,CAACF,SAAS,CAACc,GAAG,CAACZ,EACrB,CAOAa,eAAeb,CAAQ,CAAE,CACvB,IAAI,CAACF,SAAS,CAACgB,MAAM,CAACd,EACxB,CAhFAe,aAAc,CACZ,IAAI,CAACjK,OAAO,CAAG3B,KAAAA,EACf,IAAI,CAAC2K,SAAS,CAAG,IAAIkB,IACrB,IAAI,CAACxB,UAAU,EACjB,CA6EF,CAIA,IAAAyB,EAFkB,IAAI1B","sources":["webpack://_N_E/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://_N_E/./node_modules/prop-types/index.js","webpack://_N_E/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://_N_E/webpack/bootstrap","webpack://_N_E/webpack/runtime/compat get default export","webpack://_N_E/webpack/runtime/define property getters","webpack://_N_E/webpack/runtime/hasOwnProperty shorthand","webpack://_N_E/webpack/runtime/make namespace object","webpack://_N_E/./utils/deferred-promise.js","webpack://_N_E/./constants/custom-event-keys.js","webpack://_N_E/./utils/dispatch-pzn-send-preamp-done-event.js","webpack://_N_E/./utils/environments.js","webpack://_N_E/./utils/logging.js","webpack://_N_E/./components/core/CohesionSnippet/constants.js","webpack://_N_E/./constants/cookie-keys.js","webpack://_N_E/./utils/get-cookie-value.js","webpack://_N_E/./utils/get-url-parameter.js","webpack://_N_E/./constants/global.js","webpack://_N_E/./utils/monarch/get-async-monarch-ruleset.js","webpack://_N_E/./utils/pzn-preamp-pre/initialize-session-store.js","webpack://_N_E/./utils/pzn-preamp-pre/get-session-store.js","webpack://_N_E/./utils/pzn-preamp-pre/get-offer-store.js","webpack://_N_E/./constants/session-storage-keys.js","webpack://_N_E/./utils/is-card-member-page.js","webpack://_N_E/./utils/pzn-preamp-pre/get-offer-store-key.js","webpack://_N_E/./utils/pzn-preamp-pre/get-offer-store-value.js","webpack://_N_E/./utils/monarch/fire-global-monarch.js","webpack://_N_E/./utils/pzn-preamp-pre/get-custom-before-run-config.js","webpack://_N_E/./scripts/rv-exp.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Deferred promise.\n * Use this to share JS variables across different sources.\n * @see https://lea.verou.me/2016/12/resolve-promises-externally-with-this-one-weird-trick/\n * @return {Promise}\n */\nconst deferredPromise = () => {\n let res;\n let rej;\n\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n\n promise.resolve = res;\n promise.reject = rej;\n promise.status = \"pending\";\n promise.then(\n () => (promise.status = \"fulfilled\"),\n () => (promise.status = \"rejected\")\n );\n\n return promise;\n};\n\nexport default deferredPromise;\n","export const CUSTOM_EVENT_KEYS = {\n PZN_SEND_PREAMP_DONE_EVENT: \"pzn:sendPreampDone\",\n};\n","import { CUSTOM_EVENT_KEYS } from \"@constants/custom-event-keys\";\n\n/**\n * Dispatches a custom event for when pzn is done to continue preamp decisions\n * @param {Object} data - The data you want to send through the custom event\n */\nconst dispatchPznSendPreampDoneEvent = (data = {}) => {\n document.dispatchEvent(\n new CustomEvent(CUSTOM_EVENT_KEYS.PZN_SEND_PREAMP_DONE_EVENT, {\n detail: data,\n })\n );\n};\n\nexport default dispatchPznSendPreampDoneEvent;\n","export const isProd = process.env.NEXT_PUBLIC_AMEX_NODE_ENV === \"production\";\nexport const isDev =\n process.env.NEXT_PUBLIC_AMEX_NODE_ENV === \"development\" ||\n process.env.NODE_ENV === \"development\";\nexport const isTest =\n process.env.NEXT_PUBLIC_AMEX_NODE_ENV === \"test\" ||\n process.env.NODE_ENV === \"test\";\n\nexport default {\n isProd,\n isDev,\n isTest,\n};\n","import { isProd } from \"@utils/environments\";\n\nexport const clientSide = typeof window !== \"undefined\";\n\n/**\n * @function setCustomAttribute\n * @description set custom attribute for PageView\n * https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/set-custom-attribute\n */\nexport const setCustomAttribute = (attributeName, attributeValue) => {\n const { newrelic } = window;\n if (typeof newrelic === \"object\") {\n newrelic.setCustomAttribute(attributeName, attributeValue);\n }\n};\n\nexport const logCustomAttributes = (attributes) => {\n if (clientSide && window.newrelic) {\n attributes.forEach(({ name, value }) => {\n window.newrelic.setCustomAttribute(name, value);\n });\n }\n};\n\nexport const logError = (error, customAttributes) => {\n if (!isProd) {\n console.error(\"[logError]\", error);\n }\n\n if (clientSide && window.newrelic) {\n window.newrelic.noticeError(error, customAttributes);\n }\n};\n\n/**\n * @function addPageAction\n * @description fire page action\n * https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/add-page-action\n */\nexport const addPageAction = (eventName, eventData = {}) => {\n const { newrelic } = window;\n if (typeof newrelic === \"object\") {\n newrelic.addPageAction(eventName, eventData);\n }\n};\n","import { CUSTOM_EVENT_KEYS } from \"@constants/custom-event-keys\";\nimport { isProd } from \"@utils/environments\";\n\nconst TAGULAR_API_KEY =\n \"08b9e791-59e6-45cb-9b5a-0f36db81313a.99f699a5-a066-4883-b240-e01d04c5a220\";\nexport const TAGULAR_WRITE_KEY = {\n prod: \"wk_1NT28kZbS21PSBXbaDWsluHnMBt\",\n dev: \"wk_2cRvcSny92YH8lg1HkLH0q2hqmh\",\n};\nconst TAGULAR_SOURCE_KEY = {\n prod: \"src_1NT28jnozfvl2wDqXLFjdLL0jsj\",\n dev: \"src_2cRvcQaxuaZWYZxQIae3pjaQlAl\",\n};\n\nconst PREAMP_SITE_KEY = \"6CfJd6duo9Fv76ZUZo0jHZ\";\n\nconst MONARCH_SOURCE_ID = \"89dd81e9-4b1f-4805-ba3f-5d2e249fff1d\";\nconst MONARCH_TOKEN = \"927bb86d-6778-49d4-8b0b-029e762ff01e\";\n\nexport const MONARCH_GLOBAL_RULESET = \"amexGlobalRuleset\";\nexport const MONARCH_TEST_GLOBAL_RULESET = \"amexTestGlobalRuleset\";\nexport const MONARCH_TEST_PARAM_KEY = \"monarchId\";\nexport const MONARCH_RULESET_URL_PARAM_KEY = \"monarchRulesetId\";\n\nexport const COHESION_PROXY_COHESION = \"/prx/c/c.js\";\nexport const COHESION_PROXY_PREAMP = \"/prx/p\";\nexport const COHESION_PROXY_TAGULAR = \"/prx/t/v2/t\";\nexport const COHESION_PROXY_TAGGY = \"/prx/tgy\";\nexport const COHESION_PROXY_MONARCH = \"/prx/m\";\n\nconst beamHook = !isProd\n ? `beamHook(event) {\n const params = new URLSearchParams(window.location.search);\n if (params.get('tagdebug') === '1') console.log('[tagularEvent] ' + event['@type'], event)\n }`\n : \"\";\n\nexport const COHESION_CONFIG = `{\n tagular: {\n apiKey: \"${TAGULAR_API_KEY}\",\n writeKey: \"${\n isProd ? TAGULAR_WRITE_KEY[\"prod\"] : TAGULAR_WRITE_KEY[\"dev\"]\n }\",\n sourceKey: \"${\n isProd ? TAGULAR_SOURCE_KEY[\"prod\"] : TAGULAR_SOURCE_KEY[\"dev\"]\n }\",\n cookieDomain: \"americanexpress.com\",\n apiVersion: \"v2/t\",\n taggy: { enabled: true },\n apiHost: \"${COHESION_PROXY_TAGULAR}\",\n ${beamHook}\n },\n preamp: {\n siteId: \"${PREAMP_SITE_KEY}\",\n endpoint: \"${COHESION_PROXY_PREAMP}\",\n cookies: [\n \"blueboxpublic\",\n \"PznPA\",\n \"segments\",\n \"userType\",\n \"Seg_test\",\n \"dcfScore\",\n \"pznid\",\n \"gambitIndicator\",\n \"97fd9170a4daa40ab0f51d76b48de48f\"\n ],\n hooks: {\n beforeRun: function (config, done) {\n document.addEventListener(\"${\n CUSTOM_EVENT_KEYS.PZN_SEND_PREAMP_DONE_EVENT\n }\", (event) => {\n if (event && event.detail && Object.keys(event.detail).length > 0) config.custom = event.detail;\n done();\n });\n },\n },\n },\n monarch: {\n sourceId:\"${MONARCH_SOURCE_ID}\",\n token:\"${MONARCH_TOKEN}\",\n endpoint: \"${COHESION_PROXY_MONARCH}\",\n simulatedEvents: {\n enabled: true\n },\n autoRequest: {\n enabled: true,\n suppressPlacements: true,\n timeout: 15000,\n hooks: {\n beforeRun: function (config, done) {\n document.addEventListener(\"${\n CUSTOM_EVENT_KEYS.PZN_SEND_PREAMP_DONE_EVENT\n }\", (event) => {\n if (event && event.detail && Object.keys(event.detail).length > 0) config.autoRequest.data = event.detail;\n done();\n });\n },\n },\n params: {\n writeKey: \"${isProd ? TAGULAR_WRITE_KEY.prod : TAGULAR_WRITE_KEY.dev}\",\n },\n },\n cookies: [\n \"blueboxpublic\",\n \"PznPA\",\n \"pznid\",\n ],\n },\n consent: {\n required: false,\n },\n}`;\n","export const COOKIE_KEYS = {\n AAM_RV: \"aam_rv\",\n AAM_CS: \"aam_cs\",\n ADOBE_AMCV: \"AMCV_5C36123F5245AF470A490D45%40AdobeOrg\",\n BLUEBOX: \"blueboxpublic\",\n PZN_ID: \"pznid\",\n PZN_PA: \"PznPA\",\n SEGMENTS: \"segments\",\n TGLR_ANON_ID: \"tglr_anon_id\",\n VOLTSPLIT: \"97fd9170a4daa40ab0f51d76b48de48f\",\n};\n","import PropTypes from \"prop-types\";\n\n// PropTypes\nconst getCookieValuePropTypes = {\n name: PropTypes.string,\n};\n\n/**\n * Utility: getCookieValue\n *\n * @param {string} name - The name of the cookie to search for\n * @returns {?string} The cookie value or undefined\n */\nconst getCookieValue = (name) => {\n const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]+)`));\n\n if (match) {\n return match[2];\n }\n};\n\ngetCookieValue.propTypes = getCookieValuePropTypes;\n\nexport default getCookieValue;\n","/**\n * Utility: getUrlParamters\n *\n * @param {string} pathPlusQuery - the path plus query string\n * @param {*} name - the key you want to get the value from\n * @returns {(string) => string} - the value of the key or empty string\n */\nexport const getUrlParameterFn = (pathPlusQuery) => {\n const base = \"https://giphy.com/gifs/warnerbrosde-R6gvnAxj2ISzJdbA63\";\n const sep = pathPlusQuery.startsWith(\"/\") ? \"\" : \"/\";\n const url = new URL(`${base}${sep}${pathPlusQuery}`);\n\n return (name) => url.searchParams.get(name) || \"\";\n};\n\n/**\n * Utility: getUrlParamter\n *\n * @param {string} pathPlusQuery - the path plus query string\n * @param {*} name - the key you want to get the value from\n * @returns {string} - the value of the key or empty string\n */\nexport const getUrlParameter = (pathPlusQuery, name) => {\n const base = \"https://giphy.com/gifs/warnerbrosde-R6gvnAxj2ISzJdbA63\";\n const sep = pathPlusQuery.startsWith(\"/\") ? \"\" : \"/\";\n const url = new URL(`${base}${sep}${pathPlusQuery}`);\n return url.searchParams.get(name) || \"\";\n};\n\nexport default getUrlParameter;\n","import globalJSON from \"@content/constants/global\";\nimport contentfulGlobalConfig from \"@content/prod-contentful/global-config.json\";\n\nexport const GLOBAL = globalJSON;\n\nexport const PAGE_META = {\n TITLE: contentfulGlobalConfig.fields.siteTitle,\n DESCRIPTION: contentfulGlobalConfig.fields.siteDescription,\n};\n\nexport const URL_ROUTES = {\n ALL_CARDS: globalJSON.urls.mobile[\"all-cards\"],\n AMEX: globalJSON.urls.amex,\n APPLY_URL_SUPPLEMENTARY: globalJSON.urls.applyUrlSupplementary,\n APPLY: globalJSON.urls.apply,\n CAE_STAGING_URL: globalJSON.urls.cae.staging,\n CAE_URL: globalJSON.urls.cae.url,\n CCAE_DESKTOP: globalJSON.urls.ccae.desktop,\n CCAE_MOBILE: globalJSON.urls.ccae.mobile,\n CCAE_URL: globalJSON.urls.ccae.url,\n COMPARE_CARDS: globalJSON.urls.mobile[\"compare-cards\"],\n CM_COMPARE_CARDS: globalJSON.urls.mobile[\"cm-compare-cards\"],\n GOTO: globalJSON.urls.goto,\n HOME: {\n DESKTOP: globalJSON.urls.home.desktop,\n MOBILE: globalJSON.urls.home.mobile,\n },\n HOME_DESKTOP: globalJSON.urls.home.desktop,\n HOME_MOBILE: globalJSON.urls.home.mobile,\n LOGIN: globalJSON.urls.login,\n SUPP_LOGIN: {\n DESKTOP: globalJSON.urls.suppLogin.desktop,\n MOBILE: globalJSON.urls.suppLogin.mobile,\n },\n PAIR_MY_CARD_LOGIN: {\n DESKTOP: globalJSON.urls.pairMyCardLogin.desktop,\n MOBILE: globalJSON.urls.pairMyCardLogin.mobile,\n },\n PQO: globalJSON.urls.pqo,\n};\n\n/*\n * APR_MODAL_IS_ENABLED enables the to render based on\n * the value provided.\n */\nexport const APR_MODAL_IS_ENABLED =\n contentfulGlobalConfig.fields.aprModalIsEnabled;\n\nexport const PZN_IS_ENABLED = contentfulGlobalConfig.fields.pznIsEnabled;\n\nexport const MONARCH_IS_ENABLED =\n contentfulGlobalConfig.fields.monarchIsEnabled;\n","import { MONARCH_GLOBAL_RULESET } from \"@components/core/CohesionSnippet/constants\";\nimport { MONARCH_IS_ENABLED } from \"@constants/global\";\nimport { logError } from \"@utils/logging\";\nimport PropTypes from \"prop-types\";\n\n// PropTypes\nconst getAsyncMonarchRulesetPropTypes = {\n rulesetId: PropTypes.string.isRequired, // defaults to MONARCH_GLOBAL_RULESET\n payload: PropTypes.object,\n params: PropTypes.object,\n};\n\n/**\n * Utility: getAsyncMonarchRuleset\n * @param {string} rulesetId - the id of the ruleset to call\n * @param {Object} payload - the payload to send to help with decisions\n * @param {Object} params - the monarch specific config params\n * @returns {Promise}\n */\nconst getAsyncMonarchRuleset = ({\n rulesetId = MONARCH_GLOBAL_RULESET,\n payload = {}, // items to help make monarch decision\n params = {},\n}) =>\n new Promise((resolve) => {\n if (!MONARCH_IS_ENABLED) {\n resolve({});\n return;\n }\n\n window.cohesion(\"monarch:ready\", () => {\n window.monarch(\"ruleset\", rulesetId, payload, params, (err, result) => {\n if (err) {\n resolve({});\n logError(\n new Error(`Monarch Error: ${err.error}`, { traceId: err.traceId })\n );\n }\n\n resolve(result);\n });\n });\n\n // NOTE: Not logging error here because `cohesion('error')`\n // is already logged in `_app.page.jsx`.\n window.cohesion(\"error\", () => {\n resolve({});\n });\n });\n\ngetAsyncMonarchRuleset.propTypes = getAsyncMonarchRulesetPropTypes;\n\nexport default getAsyncMonarchRuleset;\n","/* ------------------------------------------------------------------------\nsessionStore function\n@author Jordan Harwood\n@since 5/1/2019\n\nPurpose: Uses window object if storage is not available on the client\nAdditionally, this Will automatically parse and stringify js objects\n\n// Store item tests:\nsessionStore.setItem('testObject', {});\nsessionStore.setItem('testStringifiedObject', \"{}\");\nsessionStore.setItem('testBasicString', 'test');\n\n// Setup isEquivalent function for object comparison\nfunction isEquivalent(e,r){var t=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(r);if(t.length!=n.length)return!1;for(var a=0;a true)\n((isEquivalent(sessionStore.getItem('testObject'), {})) &&\n(isEquivalent(sessionStore.getItem('testStringifiedObject'), {})) &&\n(sessionStore.getItem('testBasicString') === 'test'))\n------------------------------------------------------------------------ */\nfunction initializeSessionStore(windowMemoryKey = \"_inMemoryStore\") {\n window[windowMemoryKey] = {};\n\n function isStorageSupported() {\n try {\n const testKey = \"__storage-test__\";\n sessionStorage.setItem(testKey, testKey);\n sessionStorage.removeItem(testKey);\n return true;\n } catch (e) {\n return false;\n }\n }\n const sessionStore = {};\n\n if (isStorageSupported()) {\n sessionStore.clear = function () {\n sessionStorage.clear();\n };\n\n sessionStore.getItem = function (name) {\n try {\n // if the item is parsable, return after parsing\n return JSON.parse(sessionStorage.getItem(name));\n } catch (error) {\n // return basic string which can't be parsed\n return sessionStorage.getItem(name);\n }\n };\n\n sessionStore.key = function (index) {\n return sessionStorage.key(index);\n };\n\n sessionStore.removeItem = function (name) {\n sessionStorage.removeItem(name);\n };\n\n sessionStore.setItem = function (name, value) {\n try {\n if (typeof value === \"object\") {\n sessionStorage.setItem(name, JSON.stringify(value));\n } else {\n sessionStorage.setItem(name, value);\n }\n } catch (error) {\n sessionStorage.setItem(name, value);\n }\n };\n } else {\n // isStorageSupported() returns false\n sessionStore.clear = function () {\n window[windowMemoryKey] = {};\n };\n\n sessionStore.getItem = function (name) {\n return window?.[windowMemoryKey]?.[name] ?? null;\n };\n\n sessionStore.key = function (index) {\n return Object.keys(window[windowMemoryKey])[index] || null;\n };\n\n sessionStore.removeItem = function (name) {\n delete window[windowMemoryKey][name];\n };\n\n sessionStore.setItem = function (name, value) {\n try {\n // unstringify object\n window[windowMemoryKey][name] = JSON.parse(value);\n } catch (error) {\n window[windowMemoryKey][name] = value;\n }\n };\n }\n\n window.sessionStore = sessionStore;\n\n return sessionStore;\n}\n\nexport default initializeSessionStore;\n","import initializeSessionStore from \"@utils/pzn-preamp-pre/initialize-session-store\";\n\nconst getSessionStore = () => {\n if (!window.sessionStore) initializeSessionStore();\n\n return window.sessionStore;\n};\n\nexport default getSessionStore;\n","import getSessionStore from \"@utils/pzn-preamp-pre/get-session-store\";\n\nconst getOfferStore = (offerStoreKey) => {\n const store = getSessionStore();\n\n try {\n return store.getItem(offerStoreKey);\n } catch (e) {\n /* do nothing */\n }\n};\n\nexport default getOfferStore;\n","export const SESSION_STORAGE_KEYS = {\n OFFER_STORE: \"offerStore\",\n OFFER_STORE_CM: \"offerStoreCm\",\n};\n","import PropTypes from \"prop-types\";\n\nconst isCardMemberPagePropTypes = {\n url: PropTypes.string,\n};\n\nconst isCardMemberPage = (url) => /\\/cm\\//i.test(url);\n\nisCardMemberPage.propTypes = isCardMemberPagePropTypes;\n\nexport default isCardMemberPage;\n","import { SESSION_STORAGE_KEYS } from \"@constants/session-storage-keys\";\nimport isCardMemberPage from \"@utils/is-card-member-page\";\n\n/**\n * Utility: getOfferStoreKey\n * Gets the appropriate key for the offer store based on the given url\n * @param {string} url - The url to determine which key to use\n * @returns {string} The key\n */\nconst getOfferStoreKey = (url) =>\n isCardMemberPage(url)\n ? SESSION_STORAGE_KEYS.OFFER_STORE_CM\n : SESSION_STORAGE_KEYS.OFFER_STORE;\n\nexport default getOfferStoreKey;\n","const getOfferStoreValue = (needle, offerStore) => offerStore?.[needle] || null;\n\nexport default getOfferStoreValue;\n","import {\n MONARCH_GLOBAL_RULESET,\n MONARCH_RULESET_URL_PARAM_KEY,\n MONARCH_TEST_PARAM_KEY,\n TAGULAR_WRITE_KEY,\n} from \"@components/core/CohesionSnippet/constants\";\nimport { COOKIE_KEYS } from \"@constants/cookie-keys\";\nimport { isProd } from \"@utils/environments\";\nimport getCookieValue from \"@utils/get-cookie-value\";\nimport getUrlParameter from \"@utils/get-url-parameter\";\nimport getAsyncMonarchRuleset from \"@utils/monarch/get-async-monarch-ruleset\";\nimport getOfferStore from \"@utils/pzn-preamp-pre/get-offer-store\";\nimport getOfferStoreKey from \"@utils/pzn-preamp-pre/get-offer-store-key\";\nimport getOfferStoreValue from \"@utils/pzn-preamp-pre/get-offer-store-value\";\n\nconst stripAlphaChars = (str) => {\n if (!str) return undefined;\n\n return Number(str.replace(/[^0-9]/g, \"\"));\n};\n\nconst fireGlobalMonarch = async () => {\n try {\n // get offer store to grab info for monarch\n const offerStoreKey = getOfferStoreKey(window.location.pathname);\n const offerStore = getOfferStore(offerStoreKey);\n\n // pull dcf score from offer store\n const dcfScore = getOfferStoreValue(\"dcfScore\", offerStore);\n\n const offersObj = offerStore.offers.reduce((acc, offer) => {\n if (\n !offer ||\n !offer?.idName ||\n !offer?.neededSpend ||\n !offer?.offerDuration ||\n !offer?.offerAmount ||\n !offer?.offerUnit\n ) {\n return acc;\n }\n\n acc[offer.idName] = {\n requiredSpend: stripAlphaChars(offer.neededSpend),\n duration: stripAlphaChars(offer.offerDuration),\n amount: stripAlphaChars(offer.offerAmount),\n unit: offer.offerUnit,\n };\n return acc;\n }, {});\n\n // fire monarch\n const monarchResult = await getAsyncMonarchRuleset({\n rulesetId:\n getUrlParameter(window.location.href, MONARCH_RULESET_URL_PARAM_KEY) ||\n MONARCH_GLOBAL_RULESET,\n payload: {\n [MONARCH_TEST_PARAM_KEY]: getUrlParameter(\n window.location.href,\n MONARCH_TEST_PARAM_KEY\n ),\n [COOKIE_KEYS.PZN_PA]: getCookieValue(COOKIE_KEYS.PZN_PA),\n [COOKIE_KEYS.BLUEBOX]: getCookieValue(COOKIE_KEYS.BLUEBOX),\n [COOKIE_KEYS.PZNID]: getCookieValue(COOKIE_KEYS.PZNID),\n DCF: dcfScore,\n offers: offersObj,\n },\n params: {\n writeKey: isProd ? TAGULAR_WRITE_KEY.prod : TAGULAR_WRITE_KEY.dev,\n },\n });\n\n return monarchResult;\n } catch (error) {\n return null;\n }\n};\n\nexport default fireGlobalMonarch;\n","import getOfferStore from \"@utils/pzn-preamp-pre/get-offer-store\";\nimport getOfferStoreKey from \"@utils/pzn-preamp-pre/get-offer-store-key\";\nimport getOfferStoreValue from \"@utils/pzn-preamp-pre/get-offer-store-value\";\n\n// Set the DCF score as Preamp custom field called `dcfScore` if we receive an integer\nconst getCustomBeforeRunConfig = () => {\n try {\n const customConfig = {};\n const offerStoreKey = getOfferStoreKey(window.location.pathname);\n const dcfScore = getOfferStoreValue(\n \"dcfScore\",\n getOfferStore(offerStoreKey)\n );\n\n if (!Number.isNaN(dcfScore) && Number.isInteger(dcfScore)) {\n customConfig.dcfScore = dcfScore;\n }\n\n return customConfig;\n } catch (_) {\n return {};\n }\n};\n\nexport default getCustomBeforeRunConfig;\n","/* eslint-disable class-methods-use-this */\nimport deferredPromise from \"@utils/deferred-promise\";\nimport dispatchPznSendPreampDoneEvent from \"@utils/dispatch-pzn-send-preamp-done-event\";\nimport { logError } from \"@utils/logging\";\nimport fireGlobalMonarch from \"@utils/monarch/fire-global-monarch\";\nimport getCustomBeforeRunConfig from \"@utils/pzn-preamp-pre/get-custom-before-run-config\";\n\nconst tagularPromise = deferredPromise();\nif (typeof window !== \"undefined\") {\n window.cohesion(\"tagular:contextCreated\", () => tagularPromise.resolve());\n window.cohesion(\"error\", () => tagularPromise.resolve());\n}\n\nlet preampPromise = deferredPromise();\nif (typeof window !== \"undefined\") {\n window.cohesion(\"preamp:decisionsReceived\", () => preampPromise.resolve());\n window.cohesion(\"error\", () => preampPromise.resolve());\n window.cohesion(\"preamp:error\", () => preampPromise.resolve());\n}\n\n/**\n * window.RV_EXP.default\n */\nclass RV_EXP {\n constructor() {\n this.promise = undefined;\n this.callbacks = new Set();\n this.initialize();\n }\n\n /**\n * Initialize Experiences.\n * @param {Object} options\n * @param {boolean} options.force - Force re-initialization, even if a request for experiences is already in-flight.\n * @return {Promise}\n */\n initialize({ force = false } = {}) {\n // If we're not forcing a new request, return the existing promise.\n if (!force && this.promise) {\n return this.promise;\n }\n\n performance.mark(\"RV_EXP:start\");\n\n // Otherwise, cancel the old promise and create a new one.\n if (this.promise) this.promise.reject();\n this.promise = deferredPromise();\n this.promise.then(() => this.callbacks.forEach((callback) => callback()));\n this.promise.catch(() => logError(new Error(\"exp cancelled early\")));\n\n // Wait for PZN.\n const pznPromise = deferredPromise();\n\n window.RV_PZN.default\n .initialize({ force })\n .then(() => pznPromise.resolve());\n\n pznPromise.then(() => {\n // Get details for Preamp decision.\n const customConfig = getCustomBeforeRunConfig();\n const detail = Object.keys(customConfig).length > 0 ? customConfig : {};\n\n // Make Preamp and Monarch decisions in parallel.\n // IMPORTANT: Wait until Tagular has loaded before firing Preamp,\n // otherwise we'll dispatch before the event listener is ready.\n tagularPromise.then(() => dispatchPznSendPreampDoneEvent(detail));\n Promise.all([fireGlobalMonarch(), preampPromise]).then(\n ([monarchResult]) => {\n performance.mark(\"RV_EXP:end\");\n performance.measure(\"RV_EXP\", \"RV_EXP:start\", \"RV_EXP:end\");\n\n // Resolve promise once we have both Preamp and Monarch decisions.\n this.promise.resolve({ monarchResult });\n\n // Reset Preamp promise for next route change.\n preampPromise = deferredPromise();\n }\n );\n });\n\n return this.promise;\n }\n\n /**\n * Add a callback to be called whenever experiences are ready.\n * @param {Function} callback\n * @return {void}\n */\n addCallback(callback) {\n // If the current promise has already resolved, fire immediately.\n if (this.promise?.status === \"fulfilled\") {\n callback();\n }\n // Add callback so it's called whenever future promises resolve.\n this.callbacks.add(callback);\n }\n\n /**\n * Remove a callback when it's no longer needed.\n * @param {Function} callback\n * @return {void}\n */\n removeCallback(callback) {\n this.callbacks.delete(callback);\n }\n}\n\nconst singleton = new RV_EXP();\n\nexport default singleton;\n"],"names":["ReactPropTypesSecret","__webpack_require__","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","props","propName","componentName","location","propFullName","secret","err","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","__webpack_module_cache__","moduleId","cachedModule","undefined","threw","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","deferred_promise","res","rej","promise","Promise","resolve","reject","status","then","dispatch_pzn_send_preamp_done_event","data","document","dispatchEvent","CustomEvent","detail","logError","error","customAttributes","window","newrelic","noticeError","TAGULAR_WRITE_KEY","prod","MONARCH_GLOBAL_RULESET","MONARCH_TEST_PARAM_KEY","isProd","COHESION_PROXY_TAGULAR","beamHook","PREAMP_SITE_KEY","COHESION_PROXY_PREAMP","CUSTOM_EVENT_KEYS","MONARCH_SOURCE_ID","MONARCH_TOKEN","COHESION_PROXY_MONARCH","concat","COOKIE_KEYS","AAM_RV","AAM_CS","ADOBE_AMCV","BLUEBOX","PZN_ID","PZN_PA","SEGMENTS","TGLR_ANON_ID","VOLTSPLIT","getCookieValuePropTypes","getCookieValue","match","cookie","RegExp","propTypes","get_url_parameter","pathPlusQuery","sep","startsWith","url","URL","searchParams","contentfulGlobalConfig","globalJSON","MONARCH_IS_ENABLED","getAsyncMonarchRulesetPropTypes","rulesetId","payload","params","getAsyncMonarchRuleset","param","cohesion","monarch","result","traceId","initialize_session_store","windowMemoryKey","sessionStore","isStorageSupported","testKey","sessionStorage","setItem","removeItem","e","clear","getItem","JSON","parse","index","stringify","keys","get_session_store","initializeSessionStore","get_offer_store","store","getSessionStore","offerStoreKey","SESSION_STORAGE_KEYS","OFFER_STORE","OFFER_STORE_CM","isCardMemberPagePropTypes","isCardMemberPage","test","get_offer_store_key","get_offer_store_value","needle","offerStore","stripAlphaChars","str","Number","replace","fireGlobalMonarch","getOfferStoreKey","pathname","getOfferStore","dcfScore","getOfferStoreValue","offersObj","offers","reduce","acc","offer","idName","neededSpend","offerDuration","offerAmount","offerUnit","requiredSpend","duration","amount","unit","getUrlParameter","href","PZNID","DCF","writeKey","get_custom_before_run_config","customConfig","isNaN","isInteger","_","tagularPromise","deferredPromise","preampPromise","RV_EXP","initialize","force","arguments","length","performance","mark","callbacks","forEach","callback","catch","pznPromise","RV_PZN","default","getCustomBeforeRunConfig","dispatchPznSendPreampDoneEvent","all","monarchResult","measure","addCallback","_this_promise","add","removeCallback","delete","constructor","Set","rv_exp"],"sourceRoot":""}