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GAAqB,QAANA,EAAoBhG,MAAM8F,KAAKjP,GACxC,cAANmP,GAAqB,2CAA2CE,KAAKF,GAAW,GAAiBnP,EAAGkP,QAAxG,CALc,CAMhB,CHH2D,CAA2BP,IILvE,WACb,MAAM,IAAI/N,UAAU,uIACtB,CJG8F,EAC9F,CHyJMuK,KAQJtC,GADcqF,GftKiB,4BewK/B9C,GAAoBjF,KAAKmJ,IACzBnE,IAAgB,EAKhBzL,OAAO4E,iBAAiBuJ,EAAqBxC,IAG7C3L,OAAO4E,iBnCjLW,gCmCiLkC2G,IAnFpDM,GAAiBf,SAAS,SAAAwD,GAAS,OAAKtO,OAAO4E,iBAAiB0J,EAAWH,EAAqC,IAuFhHN,KAGA7N,OAAO6P,0BAA2B,GQlLvBT,GAAO3M,SAASqN,iBAHc,kCAKnChF,SAAS,SAAAiF,GACTA,EAAKC,QAAQC,0BAGjBF,EAAKnL,iBAAiB,SAAS,WAC7B,IAAQsL,EAAwBH,EAAKC,QAA7BE,oBACR,GAAKA,EAAL,CAGA,IAAAC,EAAuCtB,KAAKC,MAAMoB,I5BFjD,SAAkBE,EAAeC,GACtCrQ,OAAOC,cAAc,IAAIH,YAAY,EAAM,CACzCJ,OAAQ,CACN0Q,wBACoBrH,IAAhBsH,GAA6B,CAC/BA,kBAIR,C4BNMC,CADqBH,EAAbC,cAAeD,EAAAE,YADvB,CAGF,IAEAN,EAAKC,QAAQC,wBAA0B,IACzC","sources":["webpack://orianalyticsproviderapp/../../node_modules/@ori-events/add-basket-offer/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/add-to-basket/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/analytics/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/bambuser-live-shopping/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/banner-click/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/banner-data-loaded/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/basket-updated/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/clear-basket/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/context-data/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/download-file/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/express-checkout-button-click/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/follow-us-item-click/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/handle-partial-view-analytics/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/link-click/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/newsletter-subscribe/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/olapic-popup-product-clicked/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/personal-product-list/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/product-click/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/product-data-loaded/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/remove-basket-item/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/request-shopping-context/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/search-suggestion-click/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/share-item-click/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/shopping-context-loaded/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/social-media-library-analytics/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/toggle-favorite/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/update-basket-item/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/user-action/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/user-registered/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/user-upgrade-requested/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/video-play/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/virtual-page/dist/esm/index.js","webpack://orianalyticsproviderapp/../../src/constants.ts","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://orianalyticsproviderapp/../../node_modules/js-cookie/dist/js.cookie.mjs","webpack://orianalyticsproviderapp/../../../src/internals/domReadyPromise.ts","webpack://orianalyticsproviderapp/../../../src/types/GtmStartEventData.ts","webpack://orianalyticsproviderapp/../../../src/types/mobileCookies.ts","webpack://orianalyticsproviderapp/../../../src/types/RegisterConsultantEventData.ts","webpack://orianalyticsproviderapp/../../../src/types/RegisteredUserEventData.ts","webpack://orianalyticsproviderapp/../../../src/types/LoginEventData.ts","webpack://orianalyticsproviderapp/../../../src/types/UpgradedUserEventData.ts","webpack://orianalyticsproviderapp/../../src/gtmAnalytics.ts","webpack://orianalyticsproviderapp/../../../src/types/ShoppingContextData.ts","webpack://orianalyticsproviderapp/../../src/analyticsInit.ts","webpack://orianalyticsproviderapp/../../node_modules/@ori-events/order-placed/dist/esm/index.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://orianalyticsproviderapp/../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://orianalyticsproviderapp/../../src/userActionEvents.ts"],"sourcesContent":["export const Name = 'add-basket-offer';\nexport const AddBasketOffer = Name;\nexport const isAddBasketOfferPurchaseEvent = event => typeof event.detail === 'object' && Boolean(event.detail.items);\n//# sourceMappingURL=index.js.map","export const Name = 'add-to-basket';\nexport const AddToBasketEvent = Name;\nexport let Method = /*#__PURE__*/function (Method) {\n Method[\"BUY_FOR_MONEY\"] = \"BUY_FOR_MONEY\";\n Method[\"BUY_FOR_POINTS\"] = \"BUY_FOR_POINTS\";\n return Method;\n}({});\n//# sourceMappingURL=index.js.map","export const Name = 'analytics';\nexport const transformToAnalyticsEvent = event => {\n const detail = {\n originalEventType: event.type,\n originalEventDetail: event.detail\n };\n return new CustomEvent(Name, {\n detail\n });\n};\nexport const forwardAnalyticsEvent = event => {\n const forwardedEvent = transformToAnalyticsEvent(event);\n window.dispatchEvent(forwardedEvent);\n};\n//# sourceMappingURL=index.js.map","export var Name = 'bambuser-live-shopping';\nexport var BambuserLiveShopping = Name;\nexport var BambuserEventType;\n\n(function (BambuserEventType) {\n BambuserEventType[\"ShowStarted\"] = \"show-started\";\n BambuserEventType[\"ShowEnded\"] = \"show-ended\";\n BambuserEventType[\"AddToBasket\"] = \"add-to-basket\";\n BambuserEventType[\"ChatMessage\"] = \"chat-message\";\n BambuserEventType[\"LikeButtonClicked\"] = \"like-button-clicked\";\n})(BambuserEventType || (BambuserEventType = {}));","export const Name = 'banner-click';\nexport const ProductClick = Name;\n//# sourceMappingURL=index.js.map","export var Name = 'banner-data-loaded';\nexport var ProductDataLoadedEvent = Name;","export { Results as LastAddedItemMethod } from '@ori-events/loyalty-dialog-result';\nexport { BasketOfferTypes } from './BasketOffer';\nexport { ShoppingNotificationType } from './ShoppingNotification';\nexport const Test = 'TEST';\nexport const Name = 'basket-updated';\nexport const BasketUpdatedEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'clear-basket';\nexport const ClearBasketEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'context-data';\nexport const ContextDataEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'download-file';\nexport const DownloadFile = Name;\n//# sourceMappingURL=index.js.map","export var Name = 'express-checkout-button-click';\nexport var ExpressCheckoutButtonClick = Name;","export var Name = 'follow-us-item-click';\nexport var FollowUsItemClick = Name;","export const Name = 'handle-partial-view-analytics';\nexport const HandlePartialViewAnalytics = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'link-click';\nexport const LinkClick = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'newsletter-subscribe';\nexport const NewsletterSubscribe = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'olapic-popup-product-clicked';\nexport const OlapicPopupProductClicked = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'personal-product-list';\nexport const PersonalProductList = Name;\nexport let PersonalProductListAction = /*#__PURE__*/function (PersonalProductListAction) {\n PersonalProductListAction[\"Create\"] = \"create\";\n PersonalProductListAction[\"Update\"] = \"update\";\n PersonalProductListAction[\"Delete\"] = \"delete\";\n return PersonalProductListAction;\n}({});\nexport let PersonalProductListType = /*#__PURE__*/function (PersonalProductListType) {\n PersonalProductListType[\"Personal\"] = \"personal\";\n PersonalProductListType[\"Private\"] = \"private\";\n return PersonalProductListType;\n}({});\n//# sourceMappingURL=index.js.map","export const Name = 'product-click';\nexport const ProductClick = Name;\n//# sourceMappingURL=index.js.map","export var Name = 'product-data-loaded';\nexport var ProductDataLoadedEvent = Name;","export const Name = 'remove-basket-item';\nexport const RemoveBasketItemEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'request-shopping-context';\nexport const RequestShoppingContextEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'search-suggestion-click';\nexport const ProductClick = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'share-item-click';\nexport const ShareItemClick = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'shopping-context-loaded';\nexport const ShoppingContextLoadedEvent = Name;\n//# sourceMappingURL=index.js.map","export var Name = 'social-media-library';\nexport var SocialMediaLibraryAnalytics = Name;\nexport var SMLAnalyticsEventType;\n\n(function (SMLAnalyticsEventType) {\n SMLAnalyticsEventType[\"ContentFilter\"] = \"contentFilter\";\n SMLAnalyticsEventType[\"ItemClick\"] = \"itemClick\";\n SMLAnalyticsEventType[\"ShareClick\"] = \"shareClick\";\n SMLAnalyticsEventType[\"DownloadClick\"] = \"downloadClick\";\n})(SMLAnalyticsEventType || (SMLAnalyticsEventType = {}));","export const Name = 'toggle-favorite';\nexport const ToggleFavorite = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'update-basket-item';\nexport const UpdateBasketItemEvent = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'user-action';\nexport const UserAction = Name;\n\n/**\n * See Readme for more information.\n * @typedef Data\n * @prop {string[]} metaHierarchy Description of user's action\n * @prop {number} numberValue Metric\n */\n\n/**\n * Utility for dispatching the user-action event.\n * @param {string[]} metaHierarchy Description of user's action.\n * @param {number} numberValue Optional metric data.\n */\nexport function dispatch(metaHierarchy, numberValue) {\n window.dispatchEvent(new CustomEvent(Name, {\n detail: {\n metaHierarchy,\n ...(numberValue !== undefined && {\n numberValue\n })\n }\n }));\n}\n//# sourceMappingURL=index.js.map","export const Name = 'user-registered';\nexport const UserRegistered = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'user-upgrade-requested';\nexport const UseUpgradeRequested = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'video-play';\nexport const UserAction = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'virtual-page';\nexport const VirtualPage = Name;\n//# sourceMappingURL=index.js.map","export const CONFIG_ELEMENT_ID = 'analytics-provider-data';\nexport const PARTIAL_VIEW_CONFIG_ELEMENT_ID = 'analytics-provider-data-partial';\n","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","export const DOM_READY = 'DOMContentLoaded';\n\nexport const domReadyPromise: () => Promise = async () =>\n new Promise((resolve) => {\n // Prevent failure on the server\n if (typeof document === 'undefined') {\n resolve(false);\n }\n\n if (document.readyState === 'loading') {\n const onReady = (): void => {\n document.removeEventListener(DOM_READY, onReady);\n resolve(true);\n };\n document.addEventListener(DOM_READY, onReady);\n } else {\n setTimeout(() => resolve(true));\n }\n });\n\nexport default domReadyPromise;\n","export const GTM_START = 'gtm.start';\nexport const GTM_START_EVENT = 'gtm.js';\n\nexport interface GtmStartEventData {\n event: typeof GTM_START_EVENT;\n [GTM_START]: number;\n}\n","export const cookieNames = ['mobileApp', 'mobileAppMode', 'mobileAppVersion'] as const;\n\ntype PropertyNames = (typeof cookieNames)[number];\n\nexport type MobileCookies = {\n [key in PropertyNames]?: string;\n};\n","export const REGISTERED_CONSULTANT_EVENT = 'registerConsultant';\n\nexport interface RegisterConsultantEventData {\n consultantId: number;\n event: typeof REGISTERED_CONSULTANT_EVENT;\n registeredConsultantId: string;\n registrationType: string;\n sponsorNumber: string;\n}\n","export const REGISTERED_USER_EVENT = 'user-registered';\n\nexport interface RegisteredUserEventData {\n customerTypeId: number | null;\n event: typeof REGISTERED_USER_EVENT;\n registeredUserId: string;\n registrationChannel: string;\n registrationType: string;\n sponsorNumber: string;\n signUpDate: string;\n visitorSegment: number;\n}\n","export const LOGIN_EVENT = 'login';\n\nexport interface LoginEventData {\n consultantId: number;\n event: typeof LOGIN_EVENT;\n loginType: string | null;\n}\n","export const UPGRADED_USER_EVENT = 'userUpgraded';\n\nexport interface UpgradedUserEventData {\n customerOldType: number | null;\n customerNewType: number | null;\n event: typeof UPGRADED_USER_EVENT;\n upgradedUserId: number;\n}\n","import Cookies from 'js-cookie';\n\nimport { domReadyPromise } from './internals';\nimport type {\n ContextEventData,\n ForwardToChannelMethod,\n GtmModel,\n GtmStartEventData,\n LoginEventData,\n MobileCookies,\n RegisterConsultantEventData,\n RegisteredUserEventData,\n UpgradedUserEventData,\n} from './types';\nimport {\n CONTEXT_DATA_EVENT,\n cookieNames,\n GTM_START_EVENT,\n GTM_START,\n LOGIN_EVENT,\n REGISTERED_CONSULTANT_EVENT,\n REGISTERED_USER_EVENT,\n UPGRADED_USER_EVENT,\n} from './types';\n\ndeclare global {\n interface Window {\n dataLayer?: object[];\n gtag?: (...params: object[]) => void;\n }\n}\n\nconst GOOGLE_TAG_MANAGER_PATH = '//www.googletagmanager.com/gtm.js?id=';\n\nlet model: GtmModel;\n\nfunction createDataLayer() {\n if (typeof window.dataLayer === 'undefined') {\n window.dataLayer = [];\n }\n if (typeof window.gtag === 'undefined') {\n window.gtag = (...params) => window.dataLayer?.push(...params);\n }\n}\n\nfunction createGoogleTagManagerScript() {\n const script = document.createElement('script');\n script.async = true;\n script.src = GOOGLE_TAG_MANAGER_PATH + model.GtmId;\n document.head.insertAdjacentElement('afterbegin', script);\n}\n\n/** Standard GTM initialization event. */\nfunction pushGtmStartEvent() {\n const data: GtmStartEventData = {\n event: GTM_START_EVENT,\n [GTM_START]: Date.now(),\n };\n\n window.dataLayer?.push(data);\n}\n\n/**\n * Records basic user and other context data information.\n *\n * This is being called only in Online where the server-side serialized\n * configuration contains the needed data.\n *\n * In ASMS, the context-data custom event will be called instead on client\n * with a slightly different timing, containing the same data.\n */\nfunction pushContextDataEvent() {\n // Exit in ASMS page case where the data is not available from server.\n if (typeof model.CustomerId !== 'number') {\n return;\n }\n // TO-DO: workaround until the serialization on server is updated\n const customerId = model.CustomerId === 0 ? -1 : model.CustomerId;\n const data: ContextEventData = {\n consultantId: model.ConsultantId ?? 0,\n customerId,\n customerTypeId: model.CustomerTypeId ?? 0,\n event: CONTEXT_DATA_EVENT,\n periodId: Number(model.PeriodId),\n };\n\n window.dataLayer?.push(data);\n}\n\n/**\n * Records additional mobile application info based on cookies\n * when the page is being rendered as a part of mobile app page.\n */\nfunction pushMobileCookies() {\n const data: MobileCookies = {};\n\n cookieNames.forEach((cookieName) => {\n const tempCookie = Cookies.get(cookieName);\n\n if (tempCookie) {\n data[cookieName] = tempCookie;\n }\n });\n\n if (Object.keys(data).length) {\n window.dataLayer?.push(data);\n }\n}\n\n/**\n * Records info about a successfully finished consultant registration process.\n * This works in Online based on session object logic in BE code.\n * TO-DO: The Online session object should be avoided & common solution\n * for Online & ASMS pages should be implemented later.\n */\nfunction pushRegisteredConsultantEvent() {\n const data: RegisterConsultantEventData = {\n consultantId: model.ConsultantId ?? 0,\n event: REGISTERED_CONSULTANT_EVENT,\n registeredConsultantId: model.RegisteredConsultantNumber ?? '',\n registrationType: model.RegistrationType ?? '',\n sponsorNumber: model.SponsorNumber ?? '',\n };\n\n window.dataLayer?.push(data);\n}\n\n/**\n * Records info about a successfully finished user registration process.\n * This works in Online based on session object logic in BE code.\n * TO-DO: The Online session object should be avoided & common solution\n * for Online & ASMS pages should be implemented later.\n */\nfunction pushRegisteredUserEvent() {\n const data: RegisteredUserEventData = {\n customerTypeId: model.RegisteredCustomerTypeId ?? 0,\n event: REGISTERED_USER_EVENT,\n registeredUserId: model.RegisteredConsultantNumber ?? '',\n registrationChannel: model.RegistrationChannel ?? '',\n registrationType: model.RegistrationType ?? '',\n sponsorNumber: model.SponsorNumber ?? '',\n signUpDate: model.RegistrationSingUpDate ?? '',\n visitorSegment: model.RegistrationVisitorSegment ?? 0,\n };\n\n window.dataLayer?.push(data);\n}\n\n/**\n * Records info about a successfully finished user login process.\n * This works in Online based on session object logic in BE code.\n * TO-DO: The Online session object should be avoided & common solution\n * for Online & ASMS pages should be implemented later.\n */\nfunction pushLoginEvent() {\n const data: LoginEventData = {\n consultantId: model.ConsultantId ?? 0,\n event: LOGIN_EVENT,\n loginType: model.LoginType ?? null,\n };\n\n window.dataLayer?.push(data);\n}\n\n/**\n * Records info about a successfully finished user upgrade process.\n * This works in Online based on session object logic in BE code.\n * TO-DO: The Online session object should be avoided & common solution\n * for Online & ASMS pages should be implemented later.\n */\nfunction pushCustomerUpgradedEvent() {\n const data: UpgradedUserEventData = {\n customerNewType: model.CustomerTypeIdAfterUpgrade ?? null,\n customerOldType: model.CustomerTypeIdBeforeUpgrade ?? null,\n event: UPGRADED_USER_EVENT,\n upgradedUserId: model.ConsultantId ?? 0,\n };\n\n window.dataLayer?.push(data);\n}\n\n/** Optionally records particular user state changes if the needed data is available. */\nfunction pushUserStateChangedEvents() {\n if (model.IsLoggedInEvent) {\n void domReadyPromise().then(pushLoginEvent, undefined);\n }\n if (model.IsConsultantRegistrationEvent) {\n void domReadyPromise().then(pushRegisteredConsultantEvent, undefined);\n }\n if (model.IsCustomerRegistrationEvent) {\n void domReadyPromise().then(pushRegisteredUserEvent, undefined);\n }\n if (model.IsCustomerUpgradeEvent) {\n void domReadyPromise().then(pushCustomerUpgradedEvent, undefined);\n }\n}\n\n/** Initialization of GTM analytics channel. */\nexport function initGtm(data: GtmModel) {\n model = data;\n createDataLayer();\n createGoogleTagManagerScript();\n pushGtmStartEvent();\n pushContextDataEvent();\n pushMobileCookies();\n pushUserStateChangedEvents();\n}\n\n/** Implementation of event forwarding into GTM. */\nexport const forwardEvent: ForwardToChannelMethod = (event) => {\n const data = {\n event: event.detail.originalEventType,\n ...event.detail.originalEventDetail,\n };\n\n window.dataLayer?.push(data);\n};\n\nexport function handleAnalyticsEventsFromPartialView(data: GtmModel) {\n model = data;\n pushUserStateChangedEvents();\n}\n","/** The name of analytics event with selected shopping context data. */\nexport const ShoppingContextDataEvent = 'shopping-context-data';\n\n/** Partial shopping session context data to be forwarded into analytics. */\nexport interface ShoppingContextData {\n rewardPoints: number | null;\n}\n","import * as AddBasketOfferEvent from '@ori-events/add-basket-offer';\nimport * as AddToBasketEvent from '@ori-events/add-to-basket';\nimport * as AnalyticsEvent from '@ori-events/analytics';\nimport * as BambuserLiveShoppingEvent from '@ori-events/bambuser-live-shopping';\nimport * as BannerClickEvent from '@ori-events/banner-click';\nimport * as BannerDataLoadedEvent from '@ori-events/banner-data-loaded';\nimport * as BasketUpdated from '@ori-events/basket-updated';\nimport * as ClearBasketEvent from '@ori-events/clear-basket';\nimport * as ContextDataEvent from '@ori-events/context-data';\nimport * as DownloadFile from '@ori-events/download-file';\nimport * as ExpressCheckoutButtonClickEvent from '@ori-events/express-checkout-button-click';\nimport * as FollowUsItemClickEvent from '@ori-events/follow-us-item-click';\nimport { HandlePartialViewAnalytics } from '@ori-events/handle-partial-view-analytics';\nimport * as LinkClickEvent from '@ori-events/link-click';\nimport * as NewsletterSubscribeEvent from '@ori-events/newsletter-subscribe';\nimport * as OlapicClickedEvent from '@ori-events/olapic-popup-product-clicked';\nimport * as OrderPlacedEvent from '@ori-events/order-placed';\nimport * as PersonalProductListEvent from '@ori-events/personal-product-list';\nimport * as ProductClickEvent from '@ori-events/product-click';\nimport * as ProductDataLoadedEvent from '@ori-events/product-data-loaded';\nimport * as RemoveBasketItemEvent from '@ori-events/remove-basket-item';\nimport * as RequestShoppingContext from '@ori-events/request-shopping-context';\nimport * as SearchSuggestionClickEvent from '@ori-events/search-suggestion-click';\nimport * as ShareItemClickEvent from '@ori-events/share-item-click';\nimport * as ShoppingContextLoaded from '@ori-events/shopping-context-loaded';\nimport * as SmlAnalyticsEvent from '@ori-events/social-media-library-analytics';\nimport * as ToggleFavoriteEvent from '@ori-events/toggle-favorite';\nimport * as UpdateBasketItemEvent from '@ori-events/update-basket-item';\nimport * as UserActionEvent from '@ori-events/user-action';\nimport * as UserRegisteredEvent from '@ori-events/user-registered';\nimport * as UserUpgradeRequested from '@ori-events/user-upgrade-requested';\nimport * as VideoPlayEvent from '@ori-events/video-play';\nimport * as VirtualPageEvent from '@ori-events/virtual-page';\n\nimport { CONFIG_ELEMENT_ID, PARTIAL_VIEW_CONFIG_ELEMENT_ID } from './constants';\nimport {\n forwardEvent as gtmForwardEvent,\n handleAnalyticsEventsFromPartialView as gtmHandleAnalyticsEventsFromPartialView,\n initGtm,\n} from './gtmAnalytics';\nimport { ShoppingContextDataEvent } from './types';\nimport type { ForwardToChannelMethod, GtmModel, ShoppingContextData } from './types';\n\ndeclare global {\n interface Window {\n /**\n * A flag indicating that analytics provider handlers are connected\n * and other components can start communicating with the provider via events.\n */\n isAnalyticsProviderReady?: boolean;\n }\n}\n\nlet isInitialized = false;\nconst forwardEventMethods: ForwardToChannelMethod[] = [];\nconst forwardEventToChannels = ((event: AnalyticsEvent.Event): void =>\n forwardEventMethods.forEach((method) => method(event))) as EventListener;\n\n// Add needed global analytics event names into this list.\nconst globalEventNames: string[] = [\n AddBasketOfferEvent.Name,\n AddToBasketEvent.Name,\n BambuserLiveShoppingEvent.Name,\n BannerClickEvent.Name,\n BannerDataLoadedEvent.Name,\n ClearBasketEvent.Name,\n ContextDataEvent.Name,\n DownloadFile.Name,\n ExpressCheckoutButtonClickEvent.Name,\n FollowUsItemClickEvent.Name,\n LinkClickEvent.Name,\n NewsletterSubscribeEvent.Name,\n OlapicClickedEvent.Name,\n OrderPlacedEvent.Name,\n PersonalProductListEvent.Name,\n ProductClickEvent.Name,\n ProductDataLoadedEvent.Name,\n RemoveBasketItemEvent.Name,\n SearchSuggestionClickEvent.Name,\n ShareItemClickEvent.Name,\n SmlAnalyticsEvent.Name,\n ToggleFavoriteEvent.Name,\n UpdateBasketItemEvent.Name,\n UserActionEvent.Name,\n UserRegisteredEvent.Name,\n VideoPlayEvent.Name,\n VirtualPageEvent.Name,\n UserUpgradeRequested.Name,\n];\n\n// Adds event listeners for the above mentioned custom events.\n// The handler transforms particular CustomEvent to AnalyticsEvent and re-triggers it in global\n// context, so that the analytics provider can finally catch it in one unified way.\nexport function initGlobalAnalyticEvents() {\n globalEventNames.forEach((eventName) => window.addEventListener(eventName, AnalyticsEvent.forwardAnalyticsEvent));\n}\n\ntype ShoppingContextAnalytics = AnalyticsEvent.Data;\n\n/** Global events needed for monitoring shopping context data. */\nconst shoppingContextEventNames = [BasketUpdated.Name, ShoppingContextLoaded.Name];\n\n/** Indication that shopping context data was already received. */\nlet hasShoppingContextInfo = false;\n\nexport function pushShoppingContextData(event: CustomEvent) {\n // mark the shopping context data as loaded\n hasShoppingContextInfo = true;\n // create analytics event in same format as AnalyticsEvent.forwardAnalyticsEvent would return\n const { availableRewardShopPoints: points } = event.detail.shoppingBag;\n const rewardPoints = typeof points === 'number' ? points : null;\n const detail: ShoppingContextAnalytics = {\n originalEventType: ShoppingContextDataEvent,\n originalEventDetail: { rewardPoints },\n };\n const analyticsEvent = new CustomEvent(AnalyticsEvent.Name, { detail });\n // forward the event to defined analytics channels\n forwardEventToChannels(analyticsEvent);\n}\n\n/**\n * Connects listening to first incomming shopping context data event\n * (shopping-context-loaded or basket-updated). Once received, forwards\n * selected event data to dataLayer & disconnects both events.\n */\nexport function initShoppingContextEvents() {\n const handler = ((event: CustomEvent) => {\n pushShoppingContextData(event);\n // disconnect events after 1st shopping context info was received\n shoppingContextEventNames.forEach((eventName) => window.removeEventListener(eventName, handler));\n }) as EventListener;\n shoppingContextEventNames.forEach((eventName) => window.addEventListener(eventName, handler));\n // Only if the shopping context data wasn't loaded in a half second\n // due to events triggered by other components, trigger the request context event here.\n window.setTimeout(() => {\n if (!hasShoppingContextInfo) {\n window.dispatchEvent(new CustomEvent(RequestShoppingContext.Name));\n }\n }, 500);\n}\n\nfunction getDataFromElement(configElementId: string) {\n const dataElement = document.getElementById(configElementId);\n if (!dataElement?.innerHTML) {\n throw new TypeError(\"Analytics provider configuration wasn't set properly.\");\n }\n const data = dataElement.innerHTML;\n\n return JSON.parse(data) as GtmModel;\n}\n\n// Re-init data from partial view & send basic user identification events.\nfunction handleAnalyticsEventsFromPartialView() {\n const model = getDataFromElement(PARTIAL_VIEW_CONFIG_ELEMENT_ID);\n gtmHandleAnalyticsEventsFromPartialView(model);\n}\n\n// Main initialization.\nexport function init() {\n if (isInitialized) {\n return;\n }\n\n // So far, only GTM forward channel is included here. Later on, we might add\n // Baidu analytics for China, App Insights, etc. This should be rather dynamic,\n // based on configuration data.\n const model = getDataFromElement(CONFIG_ELEMENT_ID);\n initGtm(model);\n forwardEventMethods.push(gtmForwardEvent);\n isInitialized = true;\n\n // Connect analytics events (only) here. We suppose that analytics event proxies\n // will do the transformation from original custom events where needed & send\n // the needed analytics events.\n window.addEventListener(AnalyticsEvent.Name, forwardEventToChannels);\n\n // Re-init data from partial view & send basic user identification events.\n window.addEventListener(HandlePartialViewAnalytics, handleAnalyticsEventsFromPartialView);\n\n // Connect particular event type listeners.\n initGlobalAnalyticEvents();\n initShoppingContextEvents();\n\n // Set ready flag in globals for other components with critical initialization timing.\n window.isAnalyticsProviderReady = true;\n}\n\n// This helper is used just for testing ATM.\nexport function resetInitFlag() {\n isInitialized = false;\n}\n","export const Name = 'order-placed';\n//# sourceMappingURL=index.js.map","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import type { Data } from '@ori-events/user-action';\nimport { dispatch } from '@ori-events/user-action';\n\nexport const DATA_ORI_EVENTS_USER_ACTION = '[data-ori-events-user-action]';\n\nexport function initUserActionEvents(): void {\n const links = [...document.querySelectorAll(DATA_ORI_EVENTS_USER_ACTION)];\n\n links.forEach((link: HTMLElement) => {\n if (link.dataset.isUserActionInitialized) {\n return;\n }\n link.addEventListener('click', () => {\n const { oriEventsUserAction } = link.dataset;\n if (!oriEventsUserAction) {\n return;\n }\n const { metaHierarchy, numberValue } = JSON.parse(oriEventsUserAction) as Data;\n dispatch(metaHierarchy, numberValue);\n });\n // eslint-disable-next-line no-param-reassign -- x\n link.dataset.isUserActionInitialized = '1';\n });\n}\n"],"names":["Name","forwardAnalyticsEvent","event","forwardedEvent","detail","originalEventType","type","originalEventDetail","CustomEvent","transformToAnalyticsEvent","window","dispatchEvent","BambuserEventType","SMLAnalyticsEventType","PARTIAL_VIEW_CONFIG_ELEMENT_ID","_typeof","o","Symbol","iterator","constructor","prototype","toPropertyKey","t","i","r","e","toPrimitive","call","TypeError","String","Number","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","target","arguments","length","source","api","init","converter","defaultAttributes","set","name","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","create","get","cookies","jar","parts","slice","join","found","read","remove","withAttributes","this","withConverter","freeze","path","DOM_READY","domReadyPromise","async","Promise","resolve","readyState","addEventListener","onReady","removeEventListener","setTimeout","GTM_START","GTM_START_EVENT","cookieNames","REGISTERED_CONSULTANT_EVENT","REGISTERED_USER_EVENT","LOGIN_EVENT","UPGRADED_USER_EVENT","model","GOOGLE_TAG_MANAGER_PATH","pushRegisteredConsultantEvent","_model$ConsultantId2","_model$RegisteredCons","_model$RegistrationTy","_model$SponsorNumber","_window$dataLayer5","data","consultantId","ConsultantId","registeredConsultantId","RegisteredConsultantNumber","registrationType","RegistrationType","sponsorNumber","SponsorNumber","dataLayer","push","pushRegisteredUserEvent","_model$RegisteredCust","_model$RegisteredCons2","_model$RegistrationCh","_model$RegistrationTy2","_model$SponsorNumber2","_model$RegistrationSi","_model$RegistrationVi","_window$dataLayer6","customerTypeId","RegisteredCustomerTypeId","registeredUserId","registrationChannel","RegistrationChannel","signUpDate","RegistrationSingUpDate","visitorSegment","RegistrationVisitorSegment","pushLoginEvent","_model$ConsultantId3","_model$LoginType","_window$dataLayer7","loginType","LoginType","pushCustomerUpgradedEvent","_model$CustomerTypeId2","_model$CustomerTypeId3","_model$ConsultantId4","_window$dataLayer8","customerNewType","CustomerTypeIdAfterUpgrade","customerOldType","CustomerTypeIdBeforeUpgrade","upgradedUserId","pushUserStateChangedEvents","IsLoggedInEvent","then","undefined","IsConsultantRegistrationEvent","IsCustomerRegistrationEvent","IsCustomerUpgradeEvent","initGtm","script","gtag","_window$dataLayer","_len","params","Array","_key","apply","createElement","src","GtmId","head","insertAdjacentElement","_window$dataLayer2","pushGtmStartEvent","_model$ConsultantId","_model$CustomerTypeId","_window$dataLayer3","CustomerId","customerId","CustomerTypeId","CONTEXT_DATA_EVENT","periodId","PeriodId","pushContextDataEvent","_window$dataLayer4","forEach","cookieName","tempCookie","Cookies","keys","pushMobileCookies","forwardEvent","_window$dataLayer9","_objectSpread","handleAnalyticsEventsFromPartialView","ShoppingContextDataEvent","isInitialized","forwardEventMethods","forwardEventToChannels","method","globalEventNames","AddBasketOfferEvent","AddToBasketEvent","BambuserLiveShoppingEvent","BannerClickEvent","BannerDataLoadedEvent","ClearBasketEvent","ContextDataEvent","DownloadFile","ExpressCheckoutButtonClickEvent","FollowUsItemClickEvent","LinkClickEvent","NewsletterSubscribeEvent","OlapicClickedEvent","PersonalProductListEvent","ProductClickEvent","ProductDataLoadedEvent","RemoveBasketItemEvent","SearchSuggestionClickEvent","ShareItemClickEvent","SmlAnalyticsEvent","ToggleFavoriteEvent","UpdateBasketItemEvent","UserActionEvent","UserRegisteredEvent","VideoPlayEvent","VirtualPageEvent","UserUpgradeRequested","shoppingContextEventNames","BasketUpdated","ShoppingContextLoaded","hasShoppingContextInfo","initShoppingContextEvents","handler","points","shoppingBag","availableRewardShopPoints","analyticsEvent","AnalyticsEvent","rewardPoints","pushShoppingContextData","eventName","RequestShoppingContext","getDataFromElement","configElementId","dataElement","getElementById","innerHTML","JSON","parse","gtmHandleAnalyticsEventsFromPartialView","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","isArray","iter","from","minLen","n","toString","test","gtmForwardEvent","isAnalyticsProviderReady","querySelectorAll","link","dataset","isUserActionInitialized","oriEventsUserAction","_JSON$parse","metaHierarchy","numberValue","dispatch"],"sourceRoot":""}