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AAG6jB,EAASuB,MAAMxgB,GAAgC,IAAxBkgB,EAAgBlgB,KAAa,CACtD,IAAI0e,KAAY4B,EACZ7B,EAAoBsB,EAAEO,EAAa5B,KACrCD,EAAoBM,EAAEL,GAAY4B,EAAY5B,IAGhD,GAAG6B,EAAS,IAAIxa,EAASwa,EAAQ9B,EAClC,CAEA,IADG4B,GAA4BA,EAA2B7f,GACrDpF,EAAI6jB,EAAS5jB,OAAQD,IACzB+kB,EAAUlB,EAAS7jB,GAChBqjB,EAAoBsB,EAAEG,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO1B,EAAoBO,EAAEjZ,EAAO,EAGjC0a,EAAqBC,KAAsB,gBAAIA,KAAsB,iBAAK,GAC9ED,EAAmBvkB,QAAQkkB,EAAqB9U,KAAK,KAAM,IAC3DmV,EAAmB5kB,KAAOukB,EAAqB9U,KAAK,KAAMmV,EAAmB5kB,KAAKyP,KAAKmV,G,KC7CvF,IAAIE,EAAsBlC,EAAoBO,OAAEtlB,EAAW,CAAC,OAAO,IAAO+kB,EAAoB,QAC9FkC,EAAsBlC,EAAoBO,EAAE2B,E","sources":["webpack://hayppgroup.commerce.web/webpack/runtime/chunk loaded","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.core.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.utils.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.decorators.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.datalayer.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.eventdata.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.stats.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.event.devlogger.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.ga4.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/services/features.service.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.klaviyo.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.eventhandler.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.axios.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/utils.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/form.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/services/form.service.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/pages/forgotpassword.ts","webpack://hayppgroup.commerce.web/webpack/bootstrap","webpack://hayppgroup.commerce.web/webpack/runtime/compat get default export","webpack://hayppgroup.commerce.web/webpack/runtime/define property getters","webpack://hayppgroup.commerce.web/webpack/runtime/hasOwnProperty shorthand","webpack://hayppgroup.commerce.web/webpack/runtime/make namespace object","webpack://hayppgroup.commerce.web/webpack/runtime/runtimeId","webpack://hayppgroup.commerce.web/webpack/runtime/jsonp chunk loading","webpack://hayppgroup.commerce.web/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// exemple\n// element('.about'); //
\n// element('[data-action=\"top-nav\"]'); //
\n//export const element = (query: string) => document.querySelector(query);\nexport const element = (query: string) => document.querySelector(query);\n\nexport const elements = (query: string) => document.querySelectorAll(query);\n\nexport const elementsOf = (element: Element | HTMLElement, query: string) => element.querySelector(query);\n\n// exemple\n// elementContains(document.querySelector('head'), document.querySelector('title')); // true\n// elementContains(document.querySelector('body'), document.querySelector('body')); // false\nexport const elementContains = (parent: Element, child: Element) => parent !== child && parent.contains(child);\n\nexport const on = (action: string | Element, type: string, callback: Function, ref?: object, meta?: object) => {\n docReady(() => {\n type.split(' ').forEach(function (t) {\n (action instanceof Element ? action : element(action)).addEventListener(\n t,\n (e) => {\n try {\n callback.call(e.target, e, ref ?? null, meta ?? null);\n } catch (err) { }\n },\n { once: false, passive: true }\n );\n });\n });\n};\n\nexport const one = (action: string | Element, type: string, callback: Function) => {\n docReady(() => {\n type.split(' ').forEach(function (e) {\n (action instanceof Element ? action : element(action)).addEventListener(e, callback, { once: true });\n });\n });\n};\n\nexport const event = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n docReady(() => {\n element(`[data-event=\"${action}\"]`)?.addEventListener(type, callback, false);\n });\n};\n\nexport const events = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n docReady(() => {\n elements(`[data-event=\"${action}\"]`)?.forEach((item) => {\n item.addEventListener(type, callback, false);\n });\n });\n};\n\nexport const action = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n docReady(() => {\n element(`[data-action=\"${action}\"]`)?.addEventListener(type, callback, false);\n });\n};\n\nexport const actions = (action: string, type: string, callback: EventListener | EventListenerObject | Function) => {\n docReady(() => {\n elements(`[data-action=\"${action}\"]`)?.forEach((el) => el?.addEventListener(type, callback, false));\n });\n};\n\nexport const bind = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n docReady(() => {\n elements(action || '')?.forEach((item) => {\n type.split(' ').forEach(t => {\n item.addEventListener(t, callback, false);\n });\n });\n });\n};\n\nexport const off = (action: string | Element | HTMLElement | Array, type: string, callback: EventListener | EventListenerObject) => {\n if (action instanceof String || action instanceof Element || action instanceof HTMLElement) {\n (action instanceof Element || action instanceof HTMLElement ? action : element(action)).removeEventListener(type, callback, false);\n }\n\n if (action instanceof Array) {\n for (let x of action) {\n let item: any = x;\n (item instanceof Element || item instanceof HTMLElement ? item : element(item)).removeEventListener(type, callback, false);\n }\n }\n};\n\nexport const offAll = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n elements(action).forEach((item) => {\n item.removeEventListener(type, callback, false);\n });\n};\n\nexport interface IEventChain {\n target: string;\n type: string;\n events: Array;\n}\n\nexport interface IEventChainItem {\n action?: string;\n event?: string;\n callback?: Function;\n}\n\nexport const eventChain = (arg: IEventChain) => {\n bind(arg.target, arg.type, (e) => {\n const target: any = e.target;\n let eventTarget = target?.attributes['data-action']?.value ?? target?.attributes['data-event']?.value;\n\n if (!eventTarget) eventTarget = target.parentNode?.attributes['data-action']?.value ?? target.parentNode?.attributes['data-event']?.value;\n\n if (!eventTarget) return;\n\n const item: any = arg.events.find(({ action, event }) => (action ?? event).includes(eventTarget));\n if (item?.callback) item.callback(e);\n });\n};\n\nexport const getBlazorEditMode = () => {\n if (!window.isAdminModeEnabled) {\n return false;\n }\n if (window.isEditModeEnabled !== undefined) {\n // Return value to avoid parsing cookies constantly\n return window.isEditModeEnabled;\n }\n const cookies = document.cookie.split(\";\");\n const editModeCookie = cookies.find(cookie => cookie.trim().startsWith(\"_AdminEditMode\"));\n window.isEditModeEnabled = editModeCookie?.split(\"=\")[1].toLowerCase() === \"true\";\n return window.isEditModeEnabled;\n}\n\n\n// Need to wait for blazor\n\nexport const docReady = (callback?: Function, context?: Object | string | number | boolean) => {\n\n let blazorFinishedLoadingEventRegistered: boolean = true;\n\n // Method to trigger window events\n if (!window.EasyfyMethods) {\n window.EasyfyMethods = {};\n window.EasyfyMethods.triggerWindowEvent = (eventName, eventData) => {\n if (eventName) {\n let event = new CustomEvent(eventName, {\n detail: eventData\n });\n window.dispatchEvent(event);\n }\n }\n }\n\n if (getBlazorEditMode()) {\n blazorFinishedLoadingEventRegistered = false;\n }\n\n // The public function name defaults to window.docReady\n // but you can pass in your own object and own function name and those will be used\n // if you want to put them in a different namespace\n // funcName = funcName || \"docReady\";\n // baseObj = baseObj || window;\n let readyList = [];\n let readyFired = false;\n let readyEventHandlersInstalled = false;\n\n // call this when the document is ready\n // this function protects itself against being called more than once\n const ready = () => {\n const readyBody = () => {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n // allow any closures held by these functions to free\n }\n readyList = [];\n }\n }\n if (getBlazorEditMode() && !window.blazorFinishedLoading) {\n if (!blazorFinishedLoadingEventRegistered) {\n blazorFinishedLoadingEventRegistered = true;\n window.addEventListener('blazorFinishedLoading', () => {\n window.blazorFinishedLoading = true;\n readyBody();\n }, false);\n }\n }\n else {\n readyBody();\n }\n\n };\n\n const readyStateChange = () => {\n if (document.readyState === 'complete') {\n ready();\n }\n };\n\n // This is the one public interface\n // docReady(fn, context);\n // the context argument is optional - if present, it will be passed\n // as an argument to the callback\n\n if (typeof callback !== 'function') {\n throw new TypeError('callback for docReady(fn) must be a function');\n }\n // if ready has already fired, then just schedule the callback\n // to fire asynchronously, but right away\n if (readyFired) {\n setTimeout(function () {\n callback(context);\n }, 1);\n return;\n } else {\n // add the function and context to the list\n readyList.push({ fn: callback, ctx: context });\n }\n // if document already ready to go, schedule the ready function to run\n if (document.readyState === 'complete') {\n setTimeout(ready, 1);\n } else if (!readyEventHandlersInstalled) {\n // otherwise if we don't have event handlers installed, install them\n if (document.addEventListener) {\n // first choice is DOMContentLoaded event\n document.addEventListener('DOMContentLoaded', ready, false);\n // backup is window load event\n window.addEventListener('load', ready, false);\n }\n readyEventHandlersInstalled = true;\n }\n};\n\nexport interface IEvent {\n type: string;\n event?: IEventItem;\n events?: Array;\n}\n\nexport interface IEventItem {\n action?: string;\n event?: string;\n callback?: Function;\n}\n\ninterface IGlobalEventItem {\n type: string;\n action?: string;\n event?: string;\n callback?: Array;\n}\n\n// Global event\nexport let globalEventList: Array = [];\n\nexport const globalEvent = (event: IEvent) => {\n event.type.split(' ').forEach((type) => {\n if (event.event) event.events = [...(event.events ?? []), ...[event.event]];\n\n if (event.events) {\n for (let item of event.events) {\n let foundItem;\n\n if (item?.action) {\n let actionFound: IGlobalEventItem = globalFindAction(type, item?.action);\n if (actionFound) {\n foundItem = actionFound;\n }\n }\n\n if (item?.event) {\n let eventFound: IGlobalEventItem = globalFindEvent(type, item?.event);\n if (eventFound) {\n foundItem = eventFound;\n }\n }\n\n if (!item?.event && !item?.action) {\n // check global state.\n let globalFound: IGlobalEventItem = globalFind(type);\n if (globalFound) {\n foundItem = globalFound;\n }\n }\n\n foundItem ? foundItem.callback.push(item.callback) : globalEventAdd(type, item);\n }\n }\n\n document.body.removeEventListener(type, globalEventHandler);\n document.body.addEventListener(type, globalEventHandler);\n });\n};\n\nexport const debounce = (func, wait) => {\n let timeout;\n\n return function executedFunction(...args) {\n const later = () => {\n clearTimeout(timeout);\n func(...args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n};\n\nconst globalEventHandler = (e) => {\n const target: any = e.target;\n\n // check action\n let eventTarget = globalGetTargetAction(target);\n if (eventTarget) {\n const item: IGlobalEventItem = globalFindAction(e.type, eventTarget);\n if (item?.callback) {\n globalEventInvokeCallback(item?.callback, e);\n }\n return;\n }\n\n // check event\n eventTarget = globalGetTargetEvent(target);\n if (eventTarget) {\n const item: IGlobalEventItem = globalFindEvent(e.type, eventTarget);\n if (item?.callback) {\n globalEventInvokeCallback(item?.callback, e);\n }\n return;\n }\n\n // check event\n const item = globalMatchType(e.type);\n if (item?.callback) {\n globalEventInvokeCallback(item?.callback, e);\n return;\n }\n};\n\nconst globalEventInvokeCallback = (cbs: Array, e: any) => {\n for (let item of cbs) {\n item?.call(null, e);\n }\n};\n\nconst globalEventAdd = (type: string, item: IEventItem): void => {\n globalEventList.push({\n type: type,\n action: item?.action,\n event: item?.event,\n callback: [item?.callback],\n });\n};\n\nconst globalFind = (itemType: string): IGlobalEventItem => {\n return globalEventList.find(({ type, action, event }) => type === itemType && !action && !event);\n};\n\nconst globalFindEvent = (itemType: string, eventType: string): IGlobalEventItem => globalEventList.find(({ type, event }) => type === itemType && (event ?? '') === (eventType ?? ''));\n\nconst globalFindAction = (itemType: string, actionType: string): IGlobalEventItem => globalEventList.find(({ type, action }) => type === itemType && (action ?? '') === (actionType ?? ''));\n\nconst globalMatchType = (itemType: string): IGlobalEventItem => globalEventList.find(({ type, action, event }) => type === itemType && !action && !event);\n\nconst globalGetTargetAction = (target) => globalGetTarget(target, 'data-action');\n\nconst globalGetTargetEvent = (target) => globalGetTarget(target, 'data-event');\n\nconst globalGetTarget = (target, dataTarget: string) => {\n let eventTarget = target?.attributes[dataTarget]?.value;\n if (!eventTarget) eventTarget = target.parentNode?.attributes[dataTarget]?.value;\n return eventTarget;\n};","import { element, elements } from './easyfy.core';\n/*import mobileDetect from 'mobile-detect';*/\n\nexport interface Attribute {\n name: string;\n value: string;\n}\n\n/*export const detector = new mobileDetect(window.navigator.userAgent);*/\n\n// exemple\n// findKey(\n// {\n// barney: { age: 36, active: true },\n// fred: { age: 40, active: false },\n// pebbles: { age: 1, active: true }\n// },\n// o => o['active']\n// ); // 'barney\nexport const findKey = (obj: any, fn: any) => Object.keys(obj).find((key) => fn(obj[key], key, obj));\n\n// exemple\n// findLast([1, 2, 3, 4], n => n % 2 === 1); // 3\nexport const findLast = (arr: Array, fn: any) => arr.filter(fn).pop();\n\n// exemple\n// all([4, 2, 3], x => x > 1); // true\n// all([1, 2, 3]); // true\nexport const all = (arr: Array, fn = Boolean) => arr.every(fn);\n\n// exemple\n// allEqual([1, 2, 3, 4, 5, 6]); // false\n// allEqual([1, 1, 1, 1]); // true\nexport const allEqual = (arr: Array) => arr.every((val) => val === arr[0]);\n\n// exemple\n// arrayToHtmlList('#myListID', 'li' ,['item 1', 'item 2']);\nexport const arrayToHtmlList = (selector: string, elementType: string, arr: Array) => ((el) => ((el = document.querySelector(selector)), (el.innerHTML += arr.map((item) => `<${elementType}>${item}`).join(''))))();\n\n// exemple\n//hasClass(document.querySelector('p.special'), 'special'); // true\nexport const hasClass = (el: HTMLElement, className: string) => el?.classList?.contains(className);\n\n// exemple\n// isBrowserTabFocused(); // true\nexport const isBrowserTabFocused = () => !document.hidden;\n\n// exemple\n// isNil(null); // true\n// isNil(undefined); // true\nexport const isNil = (val: any) => val === undefined || val === null;\n\n// exemple\n// isNull(null); // true\nexport const isNull = (val: any) => val === null;\n\n// exemple\n// isNumber('1'); // false\n// isNumber(1); // true\nfunction isNumber(n: any) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n// exemple\n// isObject([1, 2, 3, 4]); // true\n// isObject([]); // true\n// isObject(['Hello!']); // true\n// isObject({ a: 1 }); // true\n// isObject({}); // true\n// isObject(true); // false\nexport const isObject = (obj: any) => obj === Object(obj);\n\n// exemple\n// isObjectLike({}); // true\n// isObjectLike([1, 2, 3]); // true\n// isObjectLike(x => x); // false\n// isObjectLike(null); // false\nexport const isObjectLike = (val: any) => val !== null && typeof val === 'object';\n\n// exemple\n// isPlainObject({ a: 1 }); // true\n// isPlainObject(new Map()); // false\n// export const isPlainObject = (val: any) =>\n// !!val && typeof val === \"object\" && val.export && constructor === Object;\n\n// exemple\n// isString('10'); // true\nexport const isString = (val: any) => typeof val === 'string';\n\n// exemple\n// isUndefined(undefined); // true\nexport const isUndefined = (val: any) => val === undefined;\n\n// exemple\n// parse string into boolean\nexport const parseToBoolean = (val: string) => isString(val) && val?.toLowerCase() === 'true';\n\n// exemple\n// isValidJSON('{\"name\":\"Adam\",\"age\":20}'); // true\n// isValidJSON('{\"name\":\"Adam\",age:\"20\"}'); // false\n// isValidJSON(null); // true\nexport const isValidJSON = (str: string) => {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n};\n\nexport const replaceHtml = (element: HTMLElement, html: string) => {\n if (element?.outerHTML) {\n element.outerHTML = html;\n }\n else {\n let tmpElement = document.createElement(\"div\");\n tmpElement.innerHTML = html;\n element?.parentNode?.replaceChild(tmpElement, element);\n }\n};\n\n// exemple\n// matches({ age: 25, hair: 'long', beard: true }, { hair: 'long', beard: true }); // true\n// matches({ hair: 'long', beard: true }, { age: 25, hair: 'long', beard: true }); // false\nexport const matches = (obj: any, source: any) => Object.keys(source).every((key) => obj.hasOwnProperty(key) && obj[key] === source[key]);\n\n// exemple\n// randomHexColorCode(); // \"#e34155\"\nexport const randomHexColorCode = () => {\n let n = (Math.random() * 0xfffff * 1000000).toString(16);\n return '#' + n.slice(0, 6);\n};\n\n// exemple\n// redirect('https://google.com');\nexport const redirect = (url, asLink = true) => (asLink ? (window.location.href = url) : window.location.replace(url));\n\n// exemple\n// scrollToTop();\nexport const scrollToTop = () => {\n const c = document.documentElement.scrollTop || document.body.scrollTop;\n if (c > 0) {\n window.requestAnimationFrame(scrollToTop);\n window.scrollTo(0, c - c / 8);\n }\n};\n\n// exemple\n// setStyle('p', 'font-size', '20px');\nexport const setStyle = (selector: string, ruleName: string, val: string) => (element(selector).style[ruleName] = val);\n\n// exemple\n// getStyle('p', 'font-size');\nexport const getStyle = (selector: string, ruleName: string) => element(selector).style[ruleName];\n\n// exemple\n// show(...document.querySelectorAll(\"img\")); // Shows all elements on the page\nexport const showAll = (el: Array, displayType?: string) => [...el].forEach((e) => (e.style.display = displayType || 'block'));\n\n// exemple\n// hide(document.querySelectorAll('img')); // Hides all elements on the page\nexport const hideAll = (el: Array | NodeListOf) => el.forEach((e) => (e.style.display = 'none'));\n\nexport const show = (selector: string | Element, displayType?: string) => showAll([selector instanceof Element ? selector : element(selector)], displayType);\n\nexport const hide = (selector: string | Element) => hideAll([selector instanceof Element ? selector : element(selector)]);\n\nexport const toggleShow = (selector: string, displayType?: string) => {\n const el = element(selector);\n visible(el) ? hideAll([el]) : showAll([el], displayType);\n};\n\nexport const removeCss = (el: HTMLElement | Element | Array | NodeListOf, className: string | Array) => {\n if (Array.isArray(el) || el instanceof NodeList) {\n el.forEach((element) => {\n Array.isArray(className) ? element?.classList?.remove(...className) : element?.classList?.remove(className);\n });\n } else {\n Array.isArray(className) ? (el as HTMLElement | Element)?.classList?.remove(...className) : (el as HTMLElement | Element)?.classList?.remove(className);\n return el;\n }\n};\n\nexport const addCss = (el: HTMLElement | Element, className: string | Array) => {\n if (Array.isArray(className)) {\n el?.classList?.add(...className);\n return el;\n }\n\n el?.classList?.add(className);\n return el;\n};\n\n// exemple\n// async function sleepyWork() {\n// console.log(\"I'm going to sleep for 1 second.\");\n// await sleep(1000);\n// console.log('I woke up after 1 second.');\n// }\nexport const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport const visible = (element: HTMLElement): boolean => {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\n\n// exemple\n// smoothScroll('#fooBar'); // scrolls smoothly to the element with the id fooBar\n// smoothScroll('.fooBar'); // scrolls smoothly to the first element with a class of fooBar\nexport const smoothScroll = (element: any) =>\n document.querySelector(element).scrollIntoView({\n behavior: 'smooth',\n });\n\n// exemple\n// splitLines('This\\nis a\\nmultiline\\nstring.\\n'); // ['This', 'is a', 'multiline', 'string.' , '']\nexport const splitLines = (str: string) => str.split(/\\r?\\n/);\n\n// exemple\n// stripHTMLTags('

lorem ipsum

'); // 'lorem ipsum'\nexport const stripHTMLTags = (str: string) => str.replace(/<[^>]*>/g, '');\n\n// exemple\n// sum(1, 2, 3, 4); // 10\n// sum(...[1, 2, 3, 4]); // 10\nexport const sum = (...arr: any) => [...arr].reduce((acc, val) => acc + val, 0);\n\n// exemple\n// timeTaken(() => Math.pow(2, 10)); // 1024, (logged): timeTaken: 0.02099609375ms\nexport const timeTaken = (callback: any) => {\n console.time(\"timeTaken\");\n const r = callback();\n console.timeEnd(\"timeTaken\");\n return r;\n};\n\n// exemple\n// toCurrency(123456.789, \"EUR\"); // €123,456.79 | currency: Euro | currencyLangFormat: Local\n// toCurrency(123456.789, 'USD', 'en-us'); // $123,456.79 | currency: US Dollar | currencyLangFormat: English (United States)\n// toCurrency(123456.789, 'USD', 'fa'); // ۱۲۳٬۴۵۶٫۷۹ ؜$ | currency: US Dollar | currencyLangFormat: Farsi\n// toCurrency(322342436423.2435, 'JPY'); // ¥322,342,436,423 | currency: Japanese Yen | currencyLangFormat: Local\n// toCurrency(322342436423.2435, 'JPY', 'fi'); // 322 342 436 423 ¥ | currency: Japanese Yen | currencyLangFormat: Finnish\nexport const toCurrency = (n: any, curr: any, languageFormat = undefined) =>\n Intl.NumberFormat(languageFormat, {\n style: 'currency',\n currency: curr,\n }).format(n);\n\n// exemple\n// toDecimalMark(12305030388.9087); // \"12,305,030,388.909\"\n// toDecimalMark(12305030388.9087, \"en-us\"); // \"12,305,030,388.909\"\nexport const toDecimalMark = (num: any, languageFormat = undefined) => num.toLocaleString(languageFormat);\n\n// exemple\n// toggleClass('p.special', 'special'); // The paragraph will not have the 'special' class anymore\nexport const toggleClass = (selector: string | HTMLElement, className: any, force?: boolean) => {\n //if (selector instanceof String) easyfyCore.element(selector as string).classList.toggle(className);\n\n if (selector instanceof HTMLElement) selector.classList.toggle(className, force);\n};\n\nexport const debounce = any>(func: F, waitFor: number) => {\n let timeout;\n\n return (...args: Parameters): Promise> =>\n new Promise((resolve) => {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => resolve(func(...args)), waitFor);\n });\n};\n\nexport const isFunction = (f: Function) => {\n return f && {}.toString.call(f) === '[object Function]';\n};\n\nexport const Id = (len: number) => {\n return '_' + Math.random().toString(36).substr(2, len);\n};\n\nexport const toggleClassBySelector = (selector: string, className: string, toggle: boolean) => {\n let els = elements(selector);\n els.forEach((item) => {\n if (toggle) {\n addCss(item, className);\n } else {\n removeCss(item, className);\n }\n });\n};\n\nexport const setAttributes = (element: HTMLElement, attributes: Array): HTMLElement | Element => {\n attributes.forEach((item) => {\n if (item?.name && item?.value) {\n element.setAttribute(item.name, item.value);\n }\n });\n return element;\n};\n\nexport const offset = (element: HTMLElement): { top: number; left: number } => {\n const rect = element.getBoundingClientRect(),\n scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft };\n};\n\nexport const winHeight = () => window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\nexport const winWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\nexport const isMobile = () => window.innerWidth <= 768 ? true : false;\n\nexport const isBetweenDates = (startDate: Date, endDate: Date, checkDate: Date) => {\n if (checkDate > startDate && checkDate < endDate) {\n return true;\n }\n return false;\n};\n\n//todo: support other short date string formats other then 2020-01-01\nexport const getDate = (date: string) => {\n if (date !== \"\") {\n var d = date.split(\"-\");\n if (d.length == 3) {\n return new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2]));\n }\n }\n return new Date();\n};\nexport const getSelectedValue = (select: HTMLSelectElement) => {\n if (select) {\n const selectedOption = select.options[select.selectedIndex];\n return { text: selectedOption.text, value: selectedOption.value };\n }\n return;\n};\n\nexport const removeHash = () => {\n var scrollV, scrollH, loc = window.location;\n if (\"pushState\" in history) {\n history.pushState(\"\", document.title, loc.pathname + loc.search);\n } else {\n // Prevent scrolling by storing the page's current scroll offset\n scrollV = document.body.scrollTop;\n scrollH = document.body.scrollLeft;\n\n loc.hash = \"\";\n\n // Restore the scroll offset, should be flicker free\n document.body.scrollTop = scrollV;\n document.body.scrollLeft = scrollH;\n }\n};","import { docReady, event as eventHandler, events as eventsHandler, action as actionHandler, actions as actionsHandler, bind as bindHandler } from './easyfy.core';\nimport { Id } from './easyfy.utils';\n\nexport interface Idependencies {\n func: { new(...args: any[]): {} };\n data?: any;\n}\n\ninterface IActionEvent {\n target: string;\n type: string;\n meta?: object;\n}\n\ninterface IInjectorDependencies {\n name: string;\n func: object;\n}\n\ninterface IInjector {\n dependencies: {\n [key: string]: IInjectorDependencies;\n };\n resolveOnload: Array;\n resolve: (depends: Array, ctor: any, cb: Function) => void;\n}\n\nexport const invoke = function (ctor: T): void {\n let newClass: Object;\n\n const readyAfter = () => {\n // call class function onInit\n try {\n ctor?.prototype?.onInit?.apply(newClass);\n } catch (error) {\n console.log('Invoke onInit error', error);\n }\n };\n\n const init = (resolves?: Array) => {\n try {\n newClass = new ctor(...(resolves || []));\n } catch (err) {\n console.log('Error ', err);\n }\n\n if (ctor.prototype.hasOwnProperty('onInit')) {\n // Use the handy event callback\n docReady(readyAfter);\n }\n };\n\n const depends = ctor['depends'];\n depends\n ? injector.resolve(ctor['depends'], ctor, (resolves) => {\n delete ctor['depends'];\n init(resolves);\n })\n : init();\n};\n\n\nconst injector: IInjector = {\n dependencies: {},\n resolveOnload: [],\n resolve: function (depends: Array, ctor: any, cb?: Function): void {\n depends.forEach((item) => {\n const id = Id(10);\n injector.dependencies[id] = { name: id, func: new item.func(item.data || {}) };\n if (injector.dependencies[id].func.hasOwnProperty('loaded')) {\n injector.resolveOnload.push(id);\n }\n });\n\n if (injector.resolveOnload.length > 0) {\n injector.resolveOnload.forEach((item, index) => {\n if (injector.dependencies[item].func.hasOwnProperty('loaded')) {\n const dependencyItem = injector.dependencies[item].func;\n\n let loadedVal = dependencyItem['loaded'];\n Object.defineProperty(dependencyItem, 'loaded', {\n get: () => {\n return loadedVal;\n },\n set: function (val) {\n if (val !== loadedVal) {\n if (val) {\n if (dependencyItem) {\n injector.resolveOnload.splice(index, 1);\n delete dependencyItem['loaded'];\n\n if (injector.resolveOnload.length === 0 && cb) {\n let dependencyFunc: Array = [];\n for (const key in injector.dependencies) {\n if (injector.dependencies.hasOwnProperty(key)) {\n const item = injector.dependencies[key];\n dependencyFunc.push(item.func);\n }\n }\n cb.call(this, dependencyFunc);\n }\n }\n }\n }\n\n loadedVal = val;\n },\n enumerable: true,\n configurable: true,\n });\n }\n });\n } else {\n cb?.call(this);\n }\n },\n};\n\ntype InferValue = Desc extends { get(): any; value: any } ? never : Desc extends { value: infer T } ? Record : Desc extends { get(): infer T } ? Record : never;\n\ntype DefineProperty = Desc extends { writable: any; set(val: any): any }\n ? never\n : Desc extends { writable: any; get(): any }\n ? never\n : Desc extends { writable: false }\n ? Readonly>\n : Desc extends { writable: true }\n ? InferValue\n : Readonly>;\n\nfunction defineProperty(obj: Obj, prop: Key, val: PDesc): asserts obj is Obj & DefineProperty {\n Object.defineProperty(obj, prop, val);\n}\n\ndefineProperty(Object.prototype, 'watch', {\n enumerable: false,\n configurable: true,\n writable: false,\n value(this: any, prop, handler) {\n let oldval: any = this[prop],\n newval: any = oldval,\n getter = function () {\n return newval;\n },\n setter = function (this: any, val) {\n oldval = newval;\n return (newval = handler.call(this, prop, oldval, val));\n };\n\n if (delete this[prop]) {\n // can't watch constants\n Object.defineProperty(this, prop, {\n get: getter,\n set: setter,\n enumerable: true,\n configurable: true,\n });\n }\n },\n});\n\nexport const event = (event: IActionEvent) => {\n return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n eventHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n };\n};\n\nexport const events = (event: IActionEvent) => {\n return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n eventsHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n };\n};\n\nexport const action = (event: IActionEvent) => {\n return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n actionHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n };\n};\n\nexport const actions = (event: IActionEvent) => {\n return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n actionsHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n };\n};\n\nexport const bind = (event: IActionEvent) => {\n return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n bindHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n };\n};\n\nconst actionEventHelper = (descriptor: PropertyDescriptor, meta?: object) => {\n const decorated: Function = descriptor.value;\n descriptor.value = function (event: Event) {\n if (event?.preventDefault) event?.preventDefault();\n\n return decorated.apply(this, [...Array.from(arguments), meta]);\n };\n return descriptor;\n};","\nnamespace Easyfy.Shared.Scripts {\n export interface IGtmEvent {\n event: string;\n ecommerce: object;\n }\n\n export interface IActionField {\n list: string;\n }\n\n export interface ICheckoutActionField {\n step: number;\n option: string;\n }\n export interface IGtmImpressionProduct extends ProductBase {\n position: number;\n list: string;\n }\n\n export interface IGtmClickProduct extends ProductBase {\n position: number;\n dimension6: string; // depict-recommendation\n }\n\n export interface IGtmBasketProduct extends ProductBase {\n quantity: number;\n }\n\n export interface IGtmDetailProduct extends ProductBase { };\n\n interface ProductBase {\n name: string;\n id: string;\n price: number;\n brand: string,\n category: string;\n variant: string;\n dimension3: string; // product-type\n dimension4: string; // ean\n dimension5: string; // all-categories\n dimension7: string; //prescriptive (excluded for facebook)\n }\n\n\n export interface IGtmProductImpressionEvent {\n impressions: IGtmImpressionProduct[];\n currencyCode: string;\n };\n\n export interface IGtmProductClickEvent {\n click: {\n actionField: IActionField;\n products: IGtmClickProduct[];\n currencyCode: string;\n }\n };\n\n export interface IGtmProductDetailEvent {\n detail: {\n actionField: IActionField;\n products: IGtmDetailProduct[];\n currencyCode: string;\n }\n }\n\n export interface IGtmProductRemoveEvent {\n remove: {\n actionField: IActionField;\n products: IGtmBasketProduct[];\n }\n };\n\n export interface IGtmProductAddEvent {\n add: {\n actionField: IActionField;\n products: IGtmBasketProduct[];\n currencyCode: string;\n }\n };\n\n export interface IGtmCheckoutEvent {\n checkout: {\n actionField: ICheckoutActionField;\n products: IGtmBasketProduct[];\n }\n };\n\n export const PushProductImpressionEvent = async (eventProducts: IGtmImpressionProduct[], listName: string, currencyCode: string): Promise => {\n let impressionEvent: IGtmProductImpressionEvent = {\n impressions: eventProducts,\n currencyCode: currencyCode\n };\n let gtmEvent: IGtmEvent = {\n event: \"impressions\",\n ecommerce: impressionEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const PushProductClickEvent = async (eventProducts: IGtmClickProduct[], listName: string, currencyCode: string): Promise => {\n let clickEvent: IGtmProductClickEvent = {\n click: {\n actionField: {\n list: ListNameCleanUp(listName)\n },\n products: eventProducts,\n currencyCode: currencyCode\n }\n };\n let gtmEvent: IGtmEvent = {\n event: \"productClick\",\n ecommerce: clickEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const PushProductDetailEvent = async (eventProducts: IGtmDetailProduct[], listName: string, currencyCode): Promise => {\n let detailEvent: IGtmProductDetailEvent = {\n detail: {\n actionField: {\n list: ListNameCleanUp(listName)\n },\n products: eventProducts,\n currencyCode: currencyCode\n }\n };\n let gtmEvent: IGtmEvent = {\n event: \"productDetail\",\n ecommerce: detailEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const PushProductAddEvent = async (eventProducts: IGtmBasketProduct[], listName: string, currencyCode: string): Promise => {\n let removeEvent: IGtmProductAddEvent = {\n add: {\n actionField: {\n list: ListNameCleanUp(listName)\n },\n products: eventProducts,\n currencyCode: currencyCode\n }\n };\n let gtmEvent: IGtmEvent = {\n event: \"addToCart\",\n ecommerce: removeEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const PushProductRemoveEvent = async (eventProducts: IGtmBasketProduct[], listName: string): Promise => {\n let removeEvent: IGtmProductRemoveEvent = {\n remove: {\n actionField: {\n list: ListNameCleanUp(listName)\n },\n products: eventProducts,\n }\n };\n let gtmEvent: IGtmEvent = {\n event: \"removeFromCart\",\n ecommerce: removeEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const PushCheckoutEvent = async (eventProducts: IGtmBasketProduct[], step: number, option: string): Promise => {\n let checkoutEvent: IGtmCheckoutEvent = {\n checkout: {\n actionField: {\n step: step,\n option: option\n },\n products: eventProducts,\n }\n };\n let gtmEvent: IGtmEvent = {\n event: \"checkout\",\n ecommerce: checkoutEvent\n }\n PushToDataLayer(gtmEvent);\n };\n\n export const HandleDataEvents = async (response: any): Promise => {\n if (response?.data?.dataLayer) {\n BuildAndPushEvents(response.data.dataLayer);\n }\n return response;\n };\n\n export const BuildAndPushEvents = async (dataEvents: any): Promise => {\n if (!dataEvents) return;\n\n dataEvents.forEach(dataEvent => {\n let gtmEvent: IGtmEvent = null;\n if (!dataEvent?.eventName) return;\n\n switch (dataEvent.eventName) {\n case 'addToCart': {\n let products: IGtmBasketProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let product: IGtmBasketProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n quantity: dataProduct.quantity,\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension7: dataProduct.dimension7\n };\n products.push(product);\n });\n PushProductAddEvent(products, dataEvent.listName, dataEvent.currencyCode);\n break;\n }\n case 'removeFromCart': {\n let products: IGtmBasketProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let product: IGtmBasketProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n quantity: dataProduct.quantity,\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension7: dataProduct.dimension7\n };\n products.push(product);\n });\n PushProductRemoveEvent(products, dataEvent.listName)\n break;\n }\n case 'productClick': {\n let clickProducts: IGtmClickProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let clickProduct: IGtmClickProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n position: dataProduct.position,\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension6: \"\",\n dimension7: dataProduct.dimension7\n };\n clickProducts.push(clickProduct);\n });\n PushProductClickEvent(clickProducts, dataEvent.listName, dataEvent.currencyCode)\n break;\n }\n case 'impressions': {\n let impressionProducts: IGtmImpressionProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let impressionProduct: IGtmImpressionProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n position: dataProduct.position,\n list: ListNameCleanUp(dataProduct.list),\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension7: dataProduct.dimension7\n };\n impressionProducts.push(impressionProduct);\n });\n PushProductImpressionEvent(impressionProducts, dataEvent.listName, dataEvent.currencyCode)\n break;\n }\n case 'checkout': {\n let products: IGtmBasketProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let product: IGtmBasketProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n quantity: dataProduct.quantity,\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension7: dataProduct.dimension7\n };\n products.push(product);\n });\n PushCheckoutEvent(products, dataEvent.step, dataEvent.option)\n break;\n }\n case 'productDetail': {\n let detailProducts: IGtmDetailProduct[] = [];\n dataEvent.products.forEach(dataProduct => {\n let detailProduct: IGtmDetailProduct = {\n brand: dataProduct.brand,\n category: dataProduct.category,\n id: dataProduct.id,\n name: dataProduct.name,\n price: dataProduct.price,\n variant: dataProduct.variant,\n dimension3: dataProduct.dimension3,\n dimension4: dataProduct.dimension4,\n dimension5: dataProduct.dimension5,\n dimension7: dataProduct.dimension7\n };\n detailProducts.push(detailProduct);\n });\n PushProductDetailEvent(detailProducts, dataEvent.listName, dataEvent.currencyCode)\n break;\n }\n default: {\n console.warn(\"Faulty data event: propterties name?\")\n console.dir(dataEvent);\n }\n }\n });\n };\n\n async function PushToDataLayer(gtmEvent: any): Promise {\n if (!gtmEvent) return;\n window['dataLayer'] = window['dataLayer'] || [];\n window['dataLayer'].push(gtmEvent);\n\n /* - For debugging the dataLayer - */\n //console.group('%c GA DataLayer ', 'color: #bada55');\n //console.dir(window['dataLayer']);\n //console.groupEnd();\n };\n\n const ListNameCleanUp = (listname: string): string => {\n if (!listname) return null;\n let cleanedListName = listname.replace(/\\s+/g, '').replace('&', '').toLowerCase();\n\n return cleanedListName;\n };\n}\n\nexport default Easyfy.Shared.Scripts;","import { event } from \"../easyfy.core\";\nimport { LocalStorageKeys } from \"./easyfy.eventhandler\";\nimport { parseToBoolean } from '../easyfy.utils';\n\ndeclare global {\n interface Window {\n EasyfyEventLayer: any,\n EasyfyEventLayerInstance: any\n isEditModeEnabled?: boolean;\n isAdminModeEnabled?: boolean;\n blazorFinishedLoading?: boolean;\n EasyfyMethods: any;\n }\n}\n\nexport interface IDataMapper {\n MapEventData(event: IEasyfyEvent): any;\n}\n\nexport interface IEasyfyEventExporter {\n mapper: IDataMapper;\n WithMapper(mapper: IDataMapper): void;\n RegisterEvent(event: IEasyfyEvent): Promise;\n};\n\nexport interface IEasyfyEvent {\n eventName: string;\n data: any;\n}\n\nexport interface IEasyfyEventService {\n name: string;\n includeAllEvents: boolean;\n events: string;\n enabled: boolean;\n}\n\nexport interface IEasyfySiteInfo {\n currencyCode: string;\n checkoutPath: string;\n}\n\nexport interface IEasyfyPageInfo {\n PageType: string;\n ViewName: string;\n}\n\nexport interface IProductData {\n Id: any;\n DomainId: any;\n Ean: any;\n DisplayName: any;\n Brand: any;\n Categories: any[];\n Price: number;\n PriceExVat: number;\n CampaignCode: string;\n AbsoluteProductUrl: string;\n RelativeProductUrl: string;\n ProductImageUrl: string;\n}\n\nexport interface IProductSalesUnitPrice {\n salesUnitsCode: string;\n packSize: number;\n priceExVat: number;\n priceIncVat: number;\n}\n\nexport interface IBasket {\n priceIncVat: number;\n priceExVat: number;\n priceIncVatExShipping: number;\n vat: number;\n rows: IBasketRow[];\n}\n\nexport interface IBasketRow {\n productIdentifier: string;\n qty: number;\n salesUnitCode: string;\n purchaseFlow: string;\n}\n\nexport interface IProductList {\n ListName: string;\n ListId: string;\n ProductIds: string[];\n}\n\nexport interface IBannerData {\n Id: any;\n DisplayName: any;\n PageUrl: any;\n LinkUrl: any;\n}\n\nexport interface ISearchPerformedData {\n searchString: string;\n source: string;\n productIdentifiers: any[];\n productHits: number;\n articleHits: number;\n brandHits: number;\n pageHits: number;\n totalProductResults: number;\n suggestions: any[];\n}\n\nexport interface IPageViewData {\n pageId: string;\n searchPageId: string;\n}\n\nexport interface IEventNotification {\n message: string;\n severity: string;\n}\n\nexport interface IQuantityChangedData {\n productIdentifier: string;\n listName: string;\n salesUnitCode: string;\n oldQuantity: number;\n newQuantity: number;\n}\n\nexport interface ISessionStarted {\n Culture: string;\n Currency: string;\n IsDesktop: boolean;\n IsMobilePhone: boolean;\n IsTablet: boolean;\n RecurringUser: boolean;\n Referrer: string;\n Path: string;\n UserAgent: string;\n SessionId: string;\n ClientId: string;\n UserId: string;\n VisitorId: string;\n}\n\nexport interface IWorkerJob {\n readonly Type: string;\n Data: any;\n Runs: number;\n MaxRuns: number;\n\n RunJob(data: any): Promise;\n AnonymizeWithDbId(db_id: any): any;\n}\n\nexport interface IWorkerMessage {\n Message: string;\n Data: any;\n}\n\nexport interface ITrackableElement {\n Id: any;\n Type: any;\n Properties: Map;\n}\n\nexport interface IClientEventMetaData {\n ClientId: string;\n UserId: string;\n SessionId: string;\n IsDesktop: boolean;\n IsMobilePhone: boolean;\n IsTablet: boolean;\n IPAddress: string;\n}\n\nexport interface IStatsEventData {\n ClientMetaData: IClientEventMetaData;\n EventRequests: any[];\n}\n\nexport module EasyfyEventData {\n export function AddDataToEventLayer(data: any): void {\n if (data) {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n data.events.forEach((event: any) => {\n if (!window.EasyfyEventLayer.events) {\n window.EasyfyEventLayer.events = [];\n }\n window.EasyfyEventLayer.events.push(event);\n });\n\n window.EasyfyEventLayer.products = window.EasyfyEventLayer.products || {};\n\n for (const product in data.products) {\n if (!window.EasyfyEventLayer.products || window.EasyfyEventLayer.products[product]) continue;\n window.EasyfyEventLayer.products[product] = data.products[product];\n }\n\n window.EasyfyEventLayer.productLists = window.EasyfyEventLayer.productLists || {};\n\n for (const productList in data.productLists) {\n //overwrite product list values when updated\n if (!window.EasyfyEventLayer.productLists || !window.EasyfyEventLayer.productLists[productList]) continue;\n window.EasyfyEventLayer.productLists[productList] = data.productLists[productList];\n }\n\n window.EasyfyEventLayer.productPrices = window.EasyfyEventLayer.productPrices || {};\n\n for (const price in data.productPrices) {\n //no need to overwrite price entries already in place\n if (!window.EasyfyEventLayer.productPrices || window.EasyfyEventLayer.productPrices[price]) continue;\n window.EasyfyEventLayer.productPrices[price] = data.productPrices[price];\n }\n\n window.EasyfyEventLayer.basket = window.EasyfyEventLayer.basket || {};\n\n if (data.basket) {\n window.EasyfyEventLayer.basket = data.basket;\n }\n\n for (const notification in data.notifications) {\n if (!window.EasyfyEventLayer.notifications) continue;\n window.EasyfyEventLayer.notifications.push(notification);\n }\n }\n }\n\n export function AddCustomDataToEventLayer(data: Map): void {\n\n if (!data) return;\n\n if (!window.EasyfyEventLayer.customData) {\n window.EasyfyEventLayer.customData = {};\n }\n data.forEach((value: object, key: string) => {\n window.EasyfyEventLayer.customData[key] = value;\n })\n }\n\n export function GlobalIgnoreEvents(): boolean {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: boolean;\n if (window.EasyfyEventLayer.configuration?.addProductImpressionsServerSide != undefined) {\n result = (window.EasyfyEventLayer.configuration.addProductImpressionsServerSide as boolean) == false;\n }\n\n return result;\n }\n\n export function SiteInfo(): IEasyfySiteInfo {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IEasyfySiteInfo;\n if (window.EasyfyEventLayer.site) {\n result = window.EasyfyEventLayer.site as IEasyfySiteInfo;\n }\n\n return result;\n }\n\n export function PageInfo(): IEasyfyPageInfo {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IEasyfyPageInfo;\n if (window.EasyfyEventLayer.pageInfo) {\n result = window.EasyfyEventLayer.pageInfo as IEasyfyPageInfo;\n }\n\n return result;\n }\n\n export function Events(): IEasyfyEvent[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IEasyfyEvent[] = [];\n if (window.EasyfyEventLayer.events) {\n result = window.EasyfyEventLayer.events as IEasyfyEvent[];\n }\n\n return result;\n }\n\n export function ClearEvents(): void {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n if (window.EasyfyEventLayer.events) {\n window.EasyfyEventLayer.events = [];\n }\n }\n\n export function ShouldRegisterProductImpressions(): boolean {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: boolean;\n if (window.EasyfyEventLayer.configuration?.addProductImpressionsServerSide != undefined) {\n result = (window.EasyfyEventLayer.configuration.addProductImpressionsServerSide as boolean) == false;\n }\n\n return result;\n }\n\n export function ShouldRegisterBannerImpressions(): boolean {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: boolean;\n if (window.EasyfyEventLayer.configuration?.addBannerImpressionsServerSide != undefined) {\n result = (window.EasyfyEventLayer.configuration.addBannerImpressionsServerSide as boolean) == false;\n }\n\n return result;\n }\n\n export function GetAllServices(): IEasyfyEventService[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IEasyfyEventService[] = [];\n if (window.EasyfyEventLayer?.configuration?.services) {\n result = window.EasyfyEventLayer.configuration.services as IEasyfyEventService[];\n }\n\n return result;\n }\n\n export function GetService(serviceName: string): IEasyfyEventService {\n var service = EasyfyEventData.GetAllServices().find(serviceInstance => serviceInstance.name.toLowerCase() == serviceName.toLowerCase());\n return service;\n }\n\n export function GetServiceNames(): string[] {\n var result: string[] = [];\n EasyfyEventData.GetAllServices().forEach(service => result.push(service.name));\n return result;\n }\n\n export function ServiceIsActive(serviceName: string): boolean {\n var service = EasyfyEventData.GetAllServices().find(serviceInstance => serviceInstance.name.toLowerCase() == serviceName.toLowerCase());\n return (service && service.enabled);\n }\n\n export function ConsumesEvent(serviceName: string, eventName: string): boolean {\n var service = EasyfyEventData.GetService(serviceName);\n if (!service || !service.enabled) return false;\n if (service.includeAllEvents) {\n return true;\n }\n else {\n var serviceConsumables = service.events?.trim().replace(/\\s/g, '').split(\",\");\n return serviceConsumables.find(event => event.trim().toLowerCase() == eventName.toLowerCase()) != undefined ?? false;\n }\n }\n\n export function Product(id: string): T | undefined {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: T = null;\n if (window.EasyfyEventLayer.products) {\n result = window.EasyfyEventLayer.products[id] as T;\n }\n return result;\n }\n\n export function ProductAt(atIndex: number): T | undefined {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: T = null;\n try {\n if (window.EasyfyEventLayer.products) {\n result = window.EasyfyEventLayer.products[atIndex] as T;\n }\n }\n catch (error) { }\n\n return result;\n }\n\n export function Products(ids: string[]): T[] {\n var productDataSet: T[] = [];\n ids.forEach((id) => {\n productDataSet.push(EasyfyEventData.Product(id));\n });\n return productDataSet;\n }\n\n export function ProductsAt(indexes: number[]): T[] {\n var productDataSet: T[] = [];\n indexes.forEach((index) => {\n productDataSet.push(EasyfyEventData.ProductAt(index));\n });\n return productDataSet;\n }\n\n export function AllProducts(): T[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: T[] = [];\n if (window.EasyfyEventLayer.products) {\n result = window.EasyfyEventLayer.products as T[];\n }\n return result;\n }\n export function AllProductLists(): IProductList[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result = [];\n if (window.EasyfyEventLayer.productLists) {\n result = window.EasyfyEventLayer.productLists;\n }\n return result;\n }\n\n export function ProductIndexInList(listName: string, productId: string): number | null {\n if (!listName || !productId) return null;\n var productsInList = window.EasyfyEventLayer.productLists[listName] as IProductList;\n if (!productsInList || !productsInList?.ProductIds) return null;\n var indexOfProduct = productsInList.ProductIds.indexOf(productId);\n\n return indexOfProduct;\n }\n\n export function ProductSalesUnitPrice(id: string): IProductSalesUnitPrice | undefined {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IProductSalesUnitPrice = null;\n\n if (window.EasyfyEventLayer.productPrices) {\n result = window.EasyfyEventLayer.productPrices[id] as IProductSalesUnitPrice;\n }\n\n return result;\n }\n\n export function ProductSalesUnitPrices(ids: string[]): IProductSalesUnitPrice[] | undefined {\n var prices: IProductSalesUnitPrice[] = [];\n ids.forEach((id) => {\n prices.push(EasyfyEventData.ProductSalesUnitPrice(id));\n });\n return prices;\n }\n\n export function AllProductSalesUnitPrices(): IProductSalesUnitPrice[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IProductSalesUnitPrice[] = [];\n\n if (window.EasyfyEventLayer.productPrices) {\n result = window.EasyfyEventLayer.productPrices as IProductSalesUnitPrice[];\n }\n\n return result;\n }\n\n export function Banner(id: string): IBannerData | undefined {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IBannerData = null;\n if (window.EasyfyEventLayer.banners) {\n result = window.EasyfyEventLayer.banners[id] as IBannerData;\n }\n return result;\n }\n\n export function AllBanners(): IBannerData[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IBannerData[] = [];\n if (window.EasyfyEventLayer.banners) {\n result = window.EasyfyEventLayer.banners as IBannerData[];\n }\n return result;\n }\n\n export function HasNotifications(): boolean {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n return (window.EasyfyEventLayer && window.EasyfyEventLayer.notifications?.length > 0);\n }\n\n export function Notifications(): IEventNotification[] {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n var result: IEventNotification[] = [];\n if (window.EasyfyEventLayer.notifications) {\n result = window.EasyfyEventLayer.notifications as IEventNotification[];\n }\n return result;\n }\n export function ClearNotifications():void {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n if (window.EasyfyEventLayer.notifications) {\n window.EasyfyEventLayer.notifications = [];\n }\n }\n\n export function HasEvents(): boolean {\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n return (window.EasyfyEventLayer && window.EasyfyEventLayer.events?.length > 0);\n };\n\n export function Basket(): IBasket {\n window.EasyfyEventLayer.basket = window.EasyfyEventLayer.basket || {};\n var result: IBasket;\n if (window.EasyfyEventLayer.basket) {\n result = window.EasyfyEventLayer.basket as IBasket;\n }\n return result;\n };\n\n export function GetCurrencyCode(): string {\n var returnValue = null;\n window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n if (window.EasyfyEventLayer && window.EasyfyEventLayer.site) {\n returnValue = window.EasyfyEventLayer.site.currencyCode as string;\n }\n\n return returnValue;\n };\n\n export function GetCustomData(key: string): any {\n if (!window.EasyfyEventLayer.customData) {\n window.EasyfyEventLayer.customData = {};\n }\n return window.EasyfyEventLayer.customData[key];\n }\n\n export function GetClientEventMetaData(): IClientEventMetaData {\n var result: IClientEventMetaData = {\n SessionId: localStorage.getItem(LocalStorageKeys.SessionId),\n UserId: localStorage.getItem(LocalStorageKeys.UserId),\n ClientId: localStorage.getItem(LocalStorageKeys.ClientId),\n IsDesktop: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsDekstop)),\n IsMobilePhone: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsMobilePhone)),\n IsTablet: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsTablet)),\n IPAddress: localStorage.getItem(LocalStorageKeys.IPAddress)\n }\n return result;\n }\n\n export function IsRecurringUser(flagAsRecurringAfterCheck: boolean): boolean {\n var cookieKey = localStorage.getItem(LocalStorageKeys.UserIdCookieKey);\n var userId = EasyfyEventData.GetCookieValue(cookieKey);\n var lastCheckedUserId = localStorage.getItem(LocalStorageKeys.LastCheckedUserId);\n var result = false\n\n if (userId == lastCheckedUserId) {\n result = true;\n }\n\n if (flagAsRecurringAfterCheck) {\n localStorage.setItem(LocalStorageKeys.LastCheckedUserId, userId);\n }\n\n return result;\n }\n\n export function GetCookieValue(cookieName) {\n let cookie = {};\n document.cookie.split(';').forEach(function (el) {\n let [key, value] = el.split('=');\n cookie[key.trim()] = value;\n })\n return cookie[cookieName];\n }\n export function SetStatsApiBlock(block: boolean) {\n if (block) {\n localStorage.setItem(LocalStorageKeys.StatsIsBlocked, \"1\");\n }\n else {\n localStorage.removeItem(LocalStorageKeys.StatsIsBlocked);\n }\n }\n export function StatsApiIsBlocked(): boolean {\n var blockedFlag = localStorage.getItem(LocalStorageKeys.StatsIsBlocked);\n\n if (blockedFlag) {\n return true;\n }\n\n return false;\n }\n}\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter, EasyfyEventData, IStatsEventData } from '@shared/easyfy.events/easyfy.eventdata';\nimport { EventNames, LocalStorageKeys } from '../easyfy.eventhandler';\n\n/* Stats Exporter class */\nexport class StatsEventExporter implements IEasyfyEventExporter {\n private _eventData: IStatsEventData;\n private _blob: Blob;\n private readonly _payloadKbThreshold: number = 50;\n private readonly _eventThreshold: number = 3;\n private _eventThresholdRemoved: boolean = false;\n\n mapper: IDataMapper;\n async WithMapper(mapper: IDataMapper): Promise {\n this.mapper = mapper;\n await this.LoadAndSetTransitionStatus();\n document.addEventListener(\"visibilitychange\", this.CheckVisibility.bind(this));\n }\n\n public RegisterEvent(event: IEasyfyEvent): Promise {\n return new Promise(async (resolve) => {\n if (this.mapper) {\n if (!EasyfyEventData.StatsApiIsBlocked()) {\n const eventData = this.mapper.MapEventData(event);\n if (eventData) {\n if (Array.isArray(eventData)) {\n eventData.forEach(async (event) => {\n await this.AccumulateEvent(event);\n });\n }\n else {\n await this.AccumulateEvent(eventData);\n }\n }\n }\n }\n resolve();\n });\n }\n\n private async LoadAndSetTransitionStatus(): Promise {\n const eventThresholdRemoved = localStorage.getItem(LocalStorageKeys.StatsEventsThresholdRemoved);\n if (eventThresholdRemoved === \"true\") {\n this._eventThresholdRemoved = true;\n return;\n }\n\n const storedDataString = localStorage.getItem(LocalStorageKeys.StatsEventsTransitionObj);\n if (storedDataString) {\n\n try {\n this._eventData = JSON.parse(storedDataString) as IStatsEventData;\n } catch (error) {\n this._eventData = {\n ClientMetaData: null,\n EventRequests: []\n };\n }\n }\n }\n\n private async RecheckAndSetTransitionStatus(): Promise {\n\n let eventsMatch = 0;\n const skipEventNames = [EventNames.BannerImpression, EventNames.ElementImpression, EventNames.ProductImpression];\n\n for (const event of this._eventData?.EventRequests) {\n if (skipEventNames.includes(event?.Event?.type?.toLowerCase()) == false) {\n eventsMatch++;\n }\n }\n\n if (eventsMatch >= this._eventThreshold) {\n localStorage.setItem(LocalStorageKeys.StatsEventsThresholdRemoved, \"true\");\n this._eventThresholdRemoved = true;\n localStorage.removeItem(LocalStorageKeys.StatsEventsTransitionObj);\n }\n else {\n localStorage.setItem(LocalStorageKeys.StatsEventsTransitionObj, JSON.stringify(this._eventData));\n }\n }\n\n private async AccumulateEvent(event: any): Promise {\n return new Promise(async (resolve) => {\n if (!this._eventData || !this._eventData?.ClientMetaData || !this._eventData?.EventRequests) {\n this._eventData = {\n ClientMetaData: EasyfyEventData.GetClientEventMetaData(),\n EventRequests: []\n }\n }\n\n this._eventData.EventRequests.push({ \"Event\": event });\n\n const str = JSON.stringify(this._eventData);\n const bytes = new TextEncoder().encode(str);\n const blob = new Blob([bytes], {\n type: \"application/json;charset=utf-8\"\n });\n\n this._blob = blob;\n\n if (this._eventThresholdRemoved) {\n const payloadSize = await this.GetObjectSizeInKB(this._eventData);\n if (payloadSize > this._payloadKbThreshold) {\n await this.SendEventsToStatsApi();\n }\n }\n else {\n await this.RecheckAndSetTransitionStatus();\n }\n\n resolve();\n });\n }\n\n private async SendEventsToStatsApi(): Promise {\n if (this._eventData?.ClientMetaData && this._eventData?.EventRequests?.length > 0 && this._blob) {\n navigator.sendBeacon(\"/api/stats/events\", this._blob);\n this._eventData = null;\n this._blob = null;\n }\n }\n\n private async CheckVisibility() {\n if (document.visibilityState === \"hidden\" && this._eventThresholdRemoved) {\n await this.SendEventsToStatsApi();\n }\n }\n\n async GetObjectSizeInKB(obj: any): Promise {\n\n const jsonString = JSON.stringify(obj);\n const bytes = new TextEncoder().encode(jsonString).length;\n const kilobytes = bytes / 1024;\n\n return kilobytes;\n }\n}","import { EasyfyEventData, IEventNotification } from '@shared/easyfy.events/easyfy.eventdata';\nimport { IEasyfyEvent } from './easyfy.eventdata';\n\ndeclare var process: {\n env: {\n NODE_ENV: string\n }\n}\n\nexport module EasyfyEventLogger {\n\n const topParagraphStyle: string = \"line-height:6px; border-radius: 5px; width: fit-content;\";\n const paragraphStyle: string = \"line-height:6px; padding:6px; border-radius: 5px; width: fit-content;\";\n\n let _channelName: string = \"event_logger_channel\";\n let _broadcastChannel: BroadcastChannel = new BroadcastChannel(_channelName);\n\n export function ConsoleLog(message: string, prefix?: string, color?: string, bgColor?: string) {\n if (process.env.NODE_ENV === \"development\") {\n if (color == undefined) {\n color = '#ffffff';\n }\n\n var style = `color: ${color};`;\n\n if (bgColor) {\n style += `background: ${bgColor};`;\n }\n\n console.log(`%c ${prefix}${message}`, style);\n }\n }\n\n export function Log(this: any, obj): void {\n if (process.env.NODE_ENV === \"development\") {\n //return;\n\n try {\n var haveInjectedCss = window[\"injectedCss\"];\n if (!haveInjectedCss) {\n window[\"injectedCss\"] = true;\n var injectedCss = window.document.styleSheets[0];\n injectedCss.insertRule(`\n @keyframes messageFlash {\n 0% { background-color: rgba(255, 255, 255, 0);}\n 50% { background-color: rgba(255, 255, 255, 0.5);}\n 100% { background-color: rgba(255, 255, 255, 0);}\n }\n `, injectedCss.cssRules.length);\n\n injectedCss.insertRule(`.flash{\n animation: messageFlash 0.2s 2;\n }`, injectedCss.cssRules.length);\n\n injectedCss.insertRule(`\n @keyframes impressionBorder {\n 0% { border: 0px solid #ff7600; }\n 100% { border: 8px solid #ff7600; }\n }\n `, injectedCss.cssRules.length);\n\n injectedCss.insertRule(`.impressionSeen{\n animation: impressionBorder 0.8s 1;\n border: 8px solid #ff7600;\n }`, injectedCss.cssRules.length);\n\n injectedCss.insertRule(`#debugEventConsumer div{\n font-size: 12px;\n margin: 0px;\n padding: 0px;\n display: flex;\n\n .time{\n color:#8f8f8f;\n }\n\n pre {\n margin: 0 5px;\n\n span{\n color: #1fb5ff;\n }\n }\n }`, injectedCss.cssRules.length);\n\n \n }\n }\n catch (error) {\n console.warn(error);\n }\n\n var devEventLogButton = document.querySelector(\"#devEventLogButton\");\n if (!devEventLogButton) {\n var logButtonElem = document.createElement('div');\n logButtonElem.id = \"devEventLogButton\";\n logButtonElem.style.position = \"fixed\";\n logButtonElem.style.cursor = \"pointer\";\n logButtonElem.style.bottom = \"5px\";\n logButtonElem.style.left = \"5px\";\n logButtonElem.style.width = \"10px\";\n logButtonElem.style.height = \"10px\";\n logButtonElem.style.fontSize = \"10px\";\n logButtonElem.style.zIndex = \"2147483645\";\n\n logButtonElem.onclick = this.EnableLog;\n logButtonElem.innerHTML = \"🖥️\";\n\n document.querySelector('body').appendChild(logButtonElem);\n }\n\n var devEventOutput = document.querySelector(\"#devEventOutput\");\n if (!devEventOutput) {\n var outputDiv = document.createElement('div');\n outputDiv.id = \"devEventOutput\";\n outputDiv.style.position = \"fixed\";\n outputDiv.style.backgroundColor = \"#000000de\";\n outputDiv.style.color = \"#c4c4c4\";\n outputDiv.style.zIndex = \"2147483646\";\n outputDiv.style.width = \"100%\";\n outputDiv.style.height = \"200px\";\n outputDiv.style.bottom = \"0\";\n outputDiv.style.fontSize = \"10px\";\n outputDiv.style.fontFamily = \"Roboto, Helvetica\";\n outputDiv.style.lineHeight = \"4px\";\n outputDiv.style.display = \"grid\";\n outputDiv.style.gridTemplateColumns = \"120px 1fr\";\n outputDiv.style.gridTemplateRows = \"30px 1fr\";\n\n var topElement = document.createElement('div');\n topElement.style.position = \"sticky\";\n topElement.style.top = \"0px\";\n topElement.style.width = \"100%\";\n topElement.style.height = \"30px\";\n topElement.style.padding = \"7px 5px\";\n topElement.style.color = \"#73ff69\";\n topElement.style.display = \"flex\";\n topElement.style.gridGap = \"20px\";\n topElement.style.gridColumn = \"2\";\n topElement.style.gridRow = \"1\";\n\n topElement.innerHTML = '

EventLayer.Services: No registered

' +\n '

EventLayer.Products: 0

' +\n '

EventLayer.ProductLists: 0

' +\n '

EventLayer.ProductPrices: 0

' +\n '

EventLayer.Banners: 0

' +\n '

Product impressions: 0

' +\n '

' +\n '

';\n\n var leftElement = document.createElement('div');\n leftElement.style.width = \"120px;\"\n leftElement.style.height = \"30px\";\n leftElement.style.gridColumn = \"1\";\n leftElement.style.gridRow = \"1\";\n leftElement.style.display = \"flex\";\n\n var iconParagraph1 = document.createElement('p');\n iconParagraph1.style.cursor = \"pointer\";\n iconParagraph1.style.width = \"30px\";\n iconParagraph1.style.height = \"30px\";\n iconParagraph1.style.padding = \"0px 6px\";\n iconParagraph1.style.lineHeight = \"30px\";\n iconParagraph1.onclick = EasyfyEventLogger.DisableLog;\n iconParagraph1.innerHTML = \"🖥️\";\n\n leftElement.appendChild(iconParagraph1);\n\n var iconParagraph2 = document.createElement('p');\n iconParagraph2.style.cursor = \"pointer\";\n iconParagraph2.style.width = \"30px\";\n iconParagraph2.style.height = \"30px\";\n iconParagraph2.style.padding = \"0px 6px\";\n iconParagraph2.style.lineHeight = \"30px\";\n iconParagraph2.onclick = EasyfyEventLogger.PrintEventLayer;\n iconParagraph2.innerHTML = \"📄\";\n\n leftElement.appendChild(iconParagraph2);\n\n var iconParagraph3 = document.createElement('p');\n iconParagraph3.style.cursor = \"pointer\";\n iconParagraph3.style.width = \"30px\";\n iconParagraph3.style.height = \"30px\";\n iconParagraph3.style.padding = \"0px 8px\";\n iconParagraph3.style.lineHeight = \"30px\";\n iconParagraph3.style.transform = \"scale(1.6)\";\n\n if (ImpressionVisualizerIsOn()) {\n iconParagraph3.style.color = \"#ff7600\";\n } else {\n iconParagraph3.style.color = \"#c4c4c4\";\n }\n\n iconParagraph3.id = \"toggleImpressionBtn\"\n iconParagraph3.onclick = EasyfyEventLogger.ToggleImpressionVisualizer;\n iconParagraph3.innerHTML = \"👁\";\n\n leftElement.appendChild(iconParagraph3);\n\n var iconParagraph4 = document.createElement('p');\n iconParagraph4.style.cursor = \"pointer\";\n iconParagraph4.style.width = \"30px\";\n iconParagraph4.style.height = \"30px\";\n iconParagraph4.style.padding = \"0px 8px\";\n iconParagraph4.style.lineHeight = \"30px\";\n iconParagraph4.style.transform = \"scale(1.6)\";\n iconParagraph4.onclick = EasyfyEventLogger.RunEventConsumer;\n iconParagraph4.innerHTML = \"📡\";\n\n leftElement.appendChild(iconParagraph4);\n\n\n var textElement = document.createElement('div');\n textElement.id = \"outputText\";\n textElement.style.padding = \"5px\";\n textElement.style.overflowY = \"scroll\";\n textElement.style.height = \"170px\";\n textElement.style.gridColumn = \"2\";\n textElement.style.gridRow = \"2\";\n textElement.style.borderRadius = \"5px\";\n\n outputDiv.appendChild(topElement);\n outputDiv.appendChild(leftElement);\n outputDiv.appendChild(textElement);\n document.querySelector('body').appendChild(outputDiv);\n\n this.CheckLogStatus();\n }\n\n devEventOutput = document.querySelector(\"#devEventOutput\");\n if (!devEventOutput) return;\n\n if (obj.type == \"productimpression\") {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.innerHTML += \"

\" + obj.message + \"

\";\n var productImpressions = Number.parseInt(devEventOutput.querySelector('#devProductImpressions').innerHTML);\n devEventOutput.querySelector('#devProductImpressions').innerHTML = (productImpressions + 1).toString();\n\n textOutput.scrollTop = textOutput.scrollHeight;\n\n if (obj.target && ImpressionVisualizerIsOn()) {\n (obj.target as HTMLElement).classList.add(\"impressionSeen\")\n }\n\n BroadcastToLogger(obj.message);\n }\n else if (obj.type == \"servicesregistered\") {\n devEventOutput.querySelector('#devEventServices').innerHTML = obj.message;\n\n BroadcastToLogger(obj.message);\n }\n else if (obj.type == \"updateeventlayerstatus\") {\n var lists = EasyfyEventData.AllProductLists();\n var products = EasyfyEventData.AllProducts();\n var banners = EasyfyEventData.AllBanners();\n var prices = EasyfyEventData.AllProductSalesUnitPrices();\n\n var eventLayerProductsCount = Object.keys(products).length;\n var eventLayerProductListsCount = Object.keys(lists).length;\n var eventLayerBannersCount = Object.keys(banners).length;\n var eventLayerPricesCount = Object.keys(prices).length;\n\n devEventOutput.querySelector('#devLayerLists').innerHTML = eventLayerProductListsCount.toString();\n devEventOutput.querySelector('#devLayerProducts').innerHTML = eventLayerProductsCount.toString();\n devEventOutput.querySelector('#devEventServices').innerHTML = EasyfyEventData.GetServiceNames().join(\", \");\n devEventOutput.querySelector('#devLayerBanners').innerHTML = eventLayerBannersCount.toString();\n devEventOutput.querySelector('#devLayerPrices').innerHTML = eventLayerPricesCount.toString();\n\n var notifications = EasyfyEventData.Notifications();\n\n var textOutput = devEventOutput.querySelector('#outputText');\n notifications.forEach((notification: IEventNotification) => {\n\n var color = \"#ffffff\";\n var message = notification.severity + \": \" + notification.message;\n switch (notification?.severity) {\n case \"Warning\":\n color = \"#ffd76a\";\n console.warn(message);\n let warn = devEventOutput.querySelector('#devlogger-warning-sign') as HTMLElement;\n warn.style.display = \"block\";\n break;\n case \"Error\":\n color = \"#ff6a6a\";\n console.error(message);\n let err = devEventOutput.querySelector('#devlogger-warning-sign') as HTMLElement;\n err.style.display = \"block\";\n break;\n }\n textOutput.innerHTML += \"

\" + notification.message + \"

\";\n\n BroadcastToLogger(notification);\n });\n textOutput.scrollTop = textOutput.scrollHeight;\n EasyfyEventData.ClearNotifications();\n }\n else if (obj.type == \"event\") {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.className = \"\";\n textOutput.innerHTML += \"

\" + obj.message + \"

\";\n textOutput.scrollTop = textOutput.scrollHeight;\n setTimeout(() => {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.className = \"flash\";\n }, 20);\n }\n else if (obj.type == \"warning\") {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.innerHTML += \"

\" + obj.message + \"

\";\n textOutput.scrollTop = textOutput.scrollHeight;\n BroadcastToLogger(obj.message);\n }\n else if (obj.type == \"error\") {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.innerHTML += \"

\" + obj.message + \"

\";\n textOutput.scrollTop = textOutput.scrollHeight;\n BroadcastToLogger(obj.message);\n\n }\n else {\n var textOutput = devEventOutput.querySelector('#outputText');\n textOutput.innerHTML += \"

\" + obj.message + \"

\";\n textOutput.scrollTop = textOutput.scrollHeight;\n BroadcastToLogger(obj.message);\n\n }\n }\n };\n\n export function CheckLogStatus(this: any): void {\n if (process.env.NODE_ENV === \"development\") {\n var useEventLog = localStorage.getItem(\"easyfyDevEventLog\") == \"true\";\n\n useEventLog ? this.EnableLog() : this.DisableLog();\n }\n };\n\n export function EnableLog(): void {\n if (process.env.NODE_ENV === \"development\") {\n localStorage.setItem(\"easyfyDevEventLog\", \"true\");\n var devEventOutput = document.querySelector(\"#devEventOutput\") as HTMLElement;\n if (devEventOutput) {\n devEventOutput.style.display = \"grid\";\n }\n }\n };\n\n export function DisableLog(): void {\n if (process.env.NODE_ENV === \"development\") {\n localStorage.setItem(\"easyfyDevEventLog\", \"false\");\n var devEventOutput = document.querySelector(\"#devEventOutput\") as HTMLElement;\n if (devEventOutput) {\n devEventOutput.style.display = \"none\";\n }\n }\n };\n\n export function ToggleImpressionVisualizer(): void {\n if (process.env.NODE_ENV === \"development\") {\n var date = new Date();\n date.setDate(date.getDate() + 30);\n var visualizerValue = localStorage.getItem(\"easyfyDevImpVisualizer\");\n var btn = document.querySelector(\"#toggleImpressionBtn\") as HTMLElement;\n\n if (visualizerValue == \"true\") {\n localStorage.setItem(\"easyfyDevImpVisualizer\", \"false\");\n btn.style.color = \"#c4c4c4\";\n\n document.querySelectorAll('.impressionSeen').forEach((elem) => {\n elem.classList.remove('impressionSeen');\n });\n }\n else {\n localStorage.setItem(\"easyfyDevImpVisualizer\", \"true\");\n btn.style.color = \"#ff7600\";\n document.querySelectorAll('[data-track-product][data-track-impression=\"True\"]').forEach((elem) => {\n elem.classList.add('impressionSeen');\n });\n }\n }\n };\n\n function ImpressionVisualizerIsOn(): boolean {\n var visualizerValue = localStorage.getItem(\"easyfyDevImpVisualizer\");\n if (visualizerValue == \"true\") {\n return true;\n }\n else {\n return false;\n }\n }\n\n export function PrintEventLayer(): void {\n if (process.env.NODE_ENV === \"development\") {\n\n var devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n if (!devEventLayerOutput) {\n var outputDiv = document.createElement('div');\n outputDiv.id = \"devEventLayerOutput\";\n outputDiv.style.position = \"fixed\";\n outputDiv.style.height = \"66%\";\n outputDiv.style.width = \"70%\";\n outputDiv.style.top = \"100px\";\n outputDiv.style.left = \"15%\";\n outputDiv.style.backgroundColor = \"#000000de\";\n outputDiv.style.color = \"#c4c4c4\";\n outputDiv.style.zIndex = \"2147483646\";\n outputDiv.style.borderRadius = \"5px\";\n outputDiv.style.boxShadow = \"1px 0px 14px 1px rgba(0,0,0,0.3)\";\n outputDiv.style.fontSize = \"11px\";\n outputDiv.style.overflow = \"auto\";\n\n var iconParagraph = document.createElement('p');\n iconParagraph.style.cursor = \"pointer\";\n iconParagraph.style.width = \"30px\";\n iconParagraph.style.height = \"30px\";\n iconParagraph.style.padding = \"0px 8px\";\n iconParagraph.style.lineHeight = \"30px\";\n iconParagraph.style.position = \"fixed\";\n iconParagraph.onclick = EasyfyEventLogger.HidePrintedEventLayer;\n iconParagraph.innerHTML = \"✖\";\n\n var textElement = document.createElement('div');\n textElement.id = \"devEventLayerOutputText\";\n textElement.style.padding = \"30px\";\n textElement.style.fontFamily = \"monospace\";\n textElement.style.whiteSpace = \"pre\";\n\n outputDiv.appendChild(iconParagraph);\n outputDiv.appendChild(textElement);\n\n\n document.querySelector('body').appendChild(outputDiv);\n devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n\n }\n\n devEventLayerOutput.style.display = \"block\";\n const brace = {\n brace: 0\n };\n\n var jsonstring = JSON.stringify(window.EasyfyEventLayer, null, 2);\n var outputElement = document.querySelector(\"#devEventLayerOutputText\") as HTMLDivElement;\n outputElement.innerHTML = \"

Event layer:

\" + jsonstring;\n //console.log(JSON.stringify(window.EasyfyEventLayer, null, 2));\n }\n };\n\n export function HidePrintedEventLayer(): void {\n if (process.env.NODE_ENV === \"development\") {\n var devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n if (devEventLayerOutput) {\n devEventLayerOutput.style.display = \"none\";\n }\n }\n };\n\n export function RunEventConsumer(): void {\n if (process.env.NODE_ENV === \"development\") {\n\n var debugDiv = document.createElement('div');\n debugDiv.id = \"debugEventConsumer\";\n debugDiv.style.padding = \"10px\";\n debugDiv.style.backgroundColor = \"#101010\";\n debugDiv.style.overflowY = \"auto\";\n debugDiv.style.height = \"100%\";\n debugDiv.style.width = \"100%\";\n debugDiv.style.position = \"fixed\";\n debugDiv.style.top = \"0\";\n debugDiv.style.left = \"0\";\n debugDiv.style.zIndex = \"2147483647\";\n debugDiv.style.color = \"#c5c5c5\";\n\n document.body.appendChild(debugDiv);\n\n document.body.style.overflowY = \"hidden\";\n\n _broadcastChannel.addEventListener(\"message\", (event) => {\n DisplayEventMessage(event.data);\n });\n }\n };\n\n export function DisplayEventMessage(data: object): void {\n if (process.env.NODE_ENV === \"development\") {\n let outputElement = document.querySelector('#debugEventConsumer');\n if (outputElement) {\n\n let jsonString = JSON.stringify(data);\n let highlightedJsonString = HighlightEventNameValue(jsonString);\n\n outputElement.innerHTML += '
' + GetCurrentTime() + ':
' + highlightedJsonString + '
';\n outputElement.scrollTop = outputElement.scrollHeight;\n }\n }\n }\n\n export function BroadcastToLogger(data: any): void {\n if (process.env.NODE_ENV === \"development\") {\n if (_broadcastChannel) {\n _broadcastChannel.postMessage(data);\n }\n }\n }\n function HighlightEventNameValue(jsonString: string): string {\n // Regular expression to find `\"eventName\":\"value\"`\n const regex = /\"eventName\":\"([^\"]+)\"/g;\n\n // Replace matched `\"eventName\":\"value\"` with `\"eventName\":\"value\"`\n const highlightedJsonString = jsonString.replace(regex, '\"eventName\":\"$1\"');\n\n return highlightedJsonString;\n }\n\n export function GetCurrentTime(): string {\n const now = new Date();\n\n const hours = (now.getHours() < 10 ? '0' : '') + now.getHours();\n const minutes = (now.getMinutes() < 10 ? '0' : '') + now.getMinutes();\n const seconds = (now.getSeconds() < 10 ? '0' : '') + now.getSeconds();\n const milliseconds = (now.getMilliseconds() < 10 ? '00' : (now.getMilliseconds() < 100 ? '0' : '')) + now.getMilliseconds();\n\n return `${hours}:${minutes}:${seconds}.${milliseconds}`;\n }\n}\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter } from '@shared/easyfy.events/easyfy.eventdata';\n\n/* Ga4 Exporter class */\nexport class Ga4EventExporter implements IEasyfyEventExporter {\n mapper: IDataMapper;\n WithMapper(mapper: IDataMapper): void {\n this.mapper = mapper;\n }\n\n RegisterEvent(event: IEasyfyEvent): Promise {\n return new Promise(async (resolve) => {\n if (!this.mapper) return;\n var eventData = this.mapper.MapEventData(event);\n await this.PushToDataLayer(eventData);\n resolve();\n })\n }\n\n async PushToDataLayer(ga4Event: any): Promise {\n return new Promise(async (resolve) => {\n if (ga4Event) {\n window['dataLayer'] = window['dataLayer'] || [];\n window['dataLayer'].push({ ecommerce: null });\n if (Array.isArray(ga4Event)) {\n window['dataLayer'].push(...ga4Event);\n } else {\n window['dataLayer'].push(ga4Event);\n }\n }\n resolve();\n })\n\n //console.group('%c GA DataLayer ', 'color: #bada55');\n //console.dir(window['dataLayer']);\n //console.groupEnd();\n }\n}","\nexport class FeatureNames {\n static EventTracking: string = \"eventtracking\";\n}\n\nexport class Features {\n static FeatureIsActive = (featureName: string): boolean => {\n var featureIsActiveForClient = document.querySelector('html').hasAttribute(featureName);\n return featureIsActiveForClient;\n }\n}\n\n\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter } from '@shared/easyfy.events/easyfy.eventdata';\n\n/* Klaviyo Exporter class */\nexport class KlaviyoEventExporter implements IEasyfyEventExporter {\n mapper: IDataMapper;\n WithMapper(mapper: IDataMapper): void {\n this.mapper = mapper;\n }\n\n RegisterEvent(event: IEasyfyEvent): Promise {\n return new Promise(async (resolve) => {\n if (this.mapper) {\n var eventData = this.mapper.MapEventData(event);\n\n if (eventData?.event && eventData?.data) {\n await this.PushToKlaviyo(eventData);\n }\n\n if (eventData?.identify) {\n await this.IdentifyUser(eventData.identify);\n }\n }\n resolve();\n });\n }\n\n async PushToKlaviyo(klaviyoEvent: any): Promise {\n return new Promise(async (resolve) => {\n if (klaviyoEvent) {\n window['klaviyo'] = window?.['klaviyo'] || [];\n window['klaviyo'].push([\"track\", klaviyoEvent.event, klaviyoEvent.data])\n\n //console.group('%c Klaviyo ', 'color: #bada55');\n //console.dir(window['klaviyo']);\n //console.groupEnd();\n resolve(true)\n }\n else {\n resolve(false);\n }\n });\n }\n async IdentifyUser(emailToRegister: any): Promise {\n return new Promise(async (resolve) => {\n if (emailToRegister) {\n window['klaviyo'] = window?.['klaviyo'] || [];\n window['klaviyo'].identify({\n 'email': emailToRegister\n });\n\n resolve(true)\n }\n else {\n resolve(false);\n }\n });\n }\n}","import { element } from '@shared/easyfy.core';\nimport { StatsEventExporter } from '@shared/easyfy.events/exporters/eventExporter.stats';\nimport { Ga4EventExporter } from '@shared/easyfy.events/exporters/eventExporter.ga4';\nimport { EasyfyEventData, IDataMapper, IEasyfyEvent, IEasyfyEventExporter, IWorkerJob, ITrackableElement, ISessionStarted, IClientEventMetaData, IWorkerMessage } from '@shared/easyfy.events/easyfy.eventdata';\nimport { EasyfyEventLogger } from '@shared/easyfy.events/easyfy.event.devlogger';\nimport { FeatureNames, Features } from '@webServices/features.service';\nimport { KlaviyoEventExporter } from './exporters/eventExporter.klaviyo';\n\nexport class ServiceNames {\n static Stats: string = \"stats\";\n static Ga4: string = \"ga4\";\n static Klaviyo: string = \"klaviyo\";\n}\nexport class EventNames {\n static PageView: string = \"pageview\";\n static ProductImpression: string = \"productimpression\";\n static ProductClick: string = \"productclick\";\n static ProductPageView: string = \"productpageview\";\n static BannerImpression = \"bannerimpression\";\n static BannerClick = \"bannerclick\";\n static ElementImpression = \"elementimpression\";\n static ElementClick = \"elementclick\";\n static AddToCart: string = \"addtocart\";\n static RemoveFromCart: string = \"removefromcart\";\n static QuantityChanged: string = \"quantitychanged\";\n static StartedCheckout: string = \"startedcheckout\";\n static CompletedCheckout: string = \"completedcheckout\";\n static SearchPerformed: string = \"searchperformed\";\n static ContinueToPayment: string = \"continuetopayment\";\n static SessionStarted: string = \"sessionstarted\";\n static LoggedIn: string = \"loggedin\";\n static LoggedOut: string = \"loggedout\";\n}\n\nexport class Message {\n static FetchClientMetaData = \"cmd_fetch_client_meta_data\";\n static BlockStatsApi = \"cmd_block_stats_api\";\n}\n\nexport class LocalStorageKeys {\n static SessionTimer = \"e_sessionTimer\";\n static SessionId = \"e_sessionId\";\n static ClientId = \"e_clientId\";\n static UserId = \"e_userId\";\n static LastCheckedUserId = \"e_lastCheckedUserId\";\n static IsTablet = \"e_tablet\";\n static IsMobilePhone = \"e_mobilephone\";\n static IsDekstop = \"e_desktop\";\n static UserIdCookieKey = \"e_userIdCookieKey\";\n static IPAddress = \"e_ipAddress\";\n static StatsIsBlocked = \"e_statsServiceBlocked\";\n static StatsEventsThresholdRemoved = \"e_StatsEventsTresholdRemoved\"\n static StatsEventsTransitionObj = \"e_statsEventsTransitionObj\"\n}\n\nnamespace Easyfy.Modules {\n\n export class EasyfyEventHandler {\n private eventExporters: Map = new Map();\n private observedElements: string[] = [];\n private intersectionObserver: IntersectionObserver;\n private bannerIntersectionObserver: IntersectionObserver;\n private mutationObserver: MutationObserver;\n public static instance: EasyfyEventHandler;\n private featureFlag: boolean;\n private initiated: boolean = false;\n\n constructor(eventMappers: Map) {\n EasyfyEventHandler.instance = this;\n EasyfyEventHandler.instance.featureFlag = Features.FeatureIsActive(FeatureNames.EventTracking);\n window.EasyfyEventLayerInstance = this;\n\n if (!EasyfyEventHandler.instance.featureFlag) return;\n\n EasyfyEventData.GetAllServices().forEach(service => {\n var eventExporter: IEasyfyEventExporter;\n switch (service.name.toLowerCase()) {\n case ServiceNames.Stats: {\n eventExporter = new StatsEventExporter();\n break;\n }\n case ServiceNames.Klaviyo: {\n eventExporter = new KlaviyoEventExporter();\n break;\n }\n case ServiceNames.Ga4: {\n eventExporter = new Ga4EventExporter();\n break;\n }\n }\n if (eventExporter) {\n eventExporter.WithMapper(eventMappers.get(service.name));\n this.eventExporters.set(service.name, eventExporter);\n }\n })\n\n EasyfyEventLogger.Log({\n type: \"updateeventlayerstatus\",\n });\n\n EasyfyEventHandler.CheckSessionStart().then(() => {\n EasyfyEventHandler.RunEvents().then(() => {\n if (EasyfyEventData.ShouldRegisterProductImpressions()) {\n EasyfyEventHandler.InitProductIntersectionObserver();\n EasyfyEventHandler.InitMutationObserver();\n }\n if (EasyfyEventData.ShouldRegisterBannerImpressions()) {\n EasyfyEventHandler.InitBannerIntersectionObserver();\n }\n EasyfyEventHandler.InitElementIntersectionObserver();\n window.addEventListener('click', EasyfyEventHandler.ClickEventChecker);\n EasyfyEventHandler.instance.initiated = true;\n });\n });\n };\n\n static async RunEvents(): Promise {\n return new Promise(async (resolve) => {\n var inlineScript = element('[data-container=\"easyfy-preload-tracking-events\"]');\n if (inlineScript) {\n inlineScript.remove();\n }\n\n if (!EasyfyEventData.HasEvents()) {\n resolve();\n return;\n }\n for await (const event of EasyfyEventData.Events()) {\n await EasyfyEventHandler.RunEvent(event);\n };\n\n EasyfyEventData.ClearEvents();\n resolve();\n });\n };\n\n static async CheckSessionStart(): Promise {\n return new Promise(async (resolve) => {\n if (EasyfyEventData.ServiceIsActive(ServiceNames.Stats) !== true) {\n resolve();\n return;\n }\n var sessionTimer = localStorage.getItem(LocalStorageKeys.SessionTimer);\n if (!sessionTimer) {\n localStorage.setItem(LocalStorageKeys.SessionTimer, new Date(Date.now()).toUTCString());\n sessionTimer = localStorage.getItem(LocalStorageKeys.SessionTimer);\n await EasyfyEventHandler.FetchClientMetaData();\n await EasyfyEventHandler.SendStartSessionEvent();\n resolve();\n }\n\n var checkTime = new Date(sessionTimer);\n var now = new Date(Date.now());\n\n var diff = (checkTime.getTime() - now.getTime()) / 1000;\n diff /= 60;\n var minutesBetween = Math.abs(Math.round(diff));\n\n if (minutesBetween >= 20) {\n var oldSessionId = localStorage.getItem(LocalStorageKeys.SessionId);\n await EasyfyEventHandler.FetchClientMetaData();\n var newSessionId = localStorage.getItem(LocalStorageKeys.SessionId);\n if (oldSessionId != newSessionId) {\n await EasyfyEventHandler.SendStartSessionEvent();\n }\n }\n\n localStorage.setItem(LocalStorageKeys.SessionTimer, new Date(Date.now()).toUTCString());\n\n resolve();\n });\n }\n\n static async FetchClientMetaData(): Promise {\n return new Promise(async (resolve) => {\n\n EasyfyEventData.SetStatsApiBlock(false);\n\n const response = await fetch(\"/api/stats/clientmetadata/\");\n\n if (!response.ok) {\n if (response.status == 428 || response.status == 404) {\n EasyfyEventData.SetStatsApiBlock(true);\n }\n\n localStorage.setItem(LocalStorageKeys.SessionId, null);\n localStorage.setItem(LocalStorageKeys.ClientId, null);\n localStorage.setItem(LocalStorageKeys.UserId, null);\n localStorage.setItem(LocalStorageKeys.IsDekstop, null);\n localStorage.setItem(LocalStorageKeys.IsMobilePhone, null);\n localStorage.setItem(LocalStorageKeys.IsTablet, null);\n localStorage.setItem(LocalStorageKeys.UserIdCookieKey, null);\n localStorage.setItem(LocalStorageKeys.IPAddress, null);\n\n resolve(false);\n return;\n }\n\n var clientMetaData = await response.json()\n\n localStorage.setItem(LocalStorageKeys.SessionId, clientMetaData.sessionId);\n localStorage.setItem(LocalStorageKeys.ClientId, clientMetaData.clientId);\n localStorage.setItem(LocalStorageKeys.UserId, clientMetaData.userId);\n localStorage.setItem(LocalStorageKeys.IsDekstop, clientMetaData.isDesktop);\n localStorage.setItem(LocalStorageKeys.IsMobilePhone, clientMetaData.isMobilePhone);\n localStorage.setItem(LocalStorageKeys.IsTablet, clientMetaData.isTablet);\n localStorage.setItem(LocalStorageKeys.UserIdCookieKey, clientMetaData.userIdCookieKey);\n localStorage.setItem(LocalStorageKeys.IPAddress, clientMetaData.ipAddress);\n\n\n var data: IClientEventMetaData = {\n ClientId: clientMetaData.clientId,\n SessionId: clientMetaData.sessionId,\n UserId: clientMetaData.userId,\n IsDesktop: clientMetaData.isDesktop,\n IsMobilePhone: clientMetaData.isMobilePhone,\n IsTablet: clientMetaData.isTablet,\n IPAddress: clientMetaData.ipAddress\n }\n resolve(true);\n });\n }\n\n static BlockStatsApi(): void {\n EasyfyEventData.SetStatsApiBlock(true);\n }\n\n static HandleWorkerMessage(message) {\n var typedMessage = message.data as IWorkerMessage\n switch (typedMessage.Message) {\n case Message.FetchClientMetaData: {\n EasyfyEventHandler.FetchClientMetaData()\n break;\n }\n case Message.BlockStatsApi: {\n EasyfyEventHandler.BlockStatsApi()\n break;\n }\n }\n }\n\n static SendStartSessionEvent(): Promise {\n return new Promise(async (resolve) => {\n var clientMetaData: IClientEventMetaData = EasyfyEventData.GetClientEventMetaData();\n var clientData: ISessionStarted = {\n Culture: \"not-set-yet\", //todo -> ? \n Currency: EasyfyEventData.SiteInfo().currencyCode,\n IsDesktop: clientMetaData.IsDesktop,\n IsMobilePhone: clientMetaData.IsMobilePhone,\n IsTablet: clientMetaData.IsTablet,\n RecurringUser: EasyfyEventData.IsRecurringUser(true),\n Referrer: document.referrer,\n Path: window.location.pathname,\n UserAgent: window.navigator.userAgent,\n ClientId: clientMetaData.ClientId,\n SessionId: clientMetaData.SessionId,\n UserId: clientMetaData.UserId,\n VisitorId: clientMetaData.UserId\n };\n\n var sessionStartedEvent: IEasyfyEvent = {\n eventName: EventNames.SessionStarted,\n data: clientData\n };\n\n await EasyfyEventHandler.RunEvent(sessionStartedEvent);\n resolve();\n });\n }\n\n static InitMutationObserver(): void {\n let options = {\n childList: true,\n subtree: true,\n attributes: false,\n characterData: false\n };\n\n let targets = document.querySelectorAll('[data-track-list], [data-container=\"search-result\"]');\n EasyfyEventHandler.instance.mutationObserver = new MutationObserver(this.ElementMutated);\n targets.forEach(target => EasyfyEventHandler.instance.mutationObserver.observe(target, options));\n }\n\n static ElementMutated(mutations: MutationRecord[]) {\n mutations.forEach(mutation => {\n EasyfyEventHandler.RebindObserveProducts();\n });\n }\n\n static BannerElementMutated(mutations: MutationRecord[]) {\n mutations.forEach(mutation => {\n EasyfyEventHandler.RebindObserveBanners();\n });\n }\n\n static InitProductIntersectionObserver(): void {\n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1\n };\n EasyfyEventHandler.instance.intersectionObserver = new IntersectionObserver(this.ProductCardObserved, options);\n let targets = document.querySelectorAll('[data-track-product]');\n targets.forEach(target => EasyfyEventHandler.instance.intersectionObserver.observe(target));\n }\n\n static InitBannerIntersectionObserver(): void {\n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1\n };\n EasyfyEventHandler.instance.bannerIntersectionObserver = new IntersectionObserver(this.BannerElementObserved, options);\n let bannerTargets = document.querySelectorAll('[data-track-banner]');\n bannerTargets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n }\n\n static InitElementIntersectionObserver(): void {\n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1\n };\n EasyfyEventHandler.instance.bannerIntersectionObserver = new IntersectionObserver(this.TrackableElementObserved, options);\n let bannerTargets = document.querySelectorAll('[data-track-element]');\n bannerTargets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n }\n\n static RebindObserveProducts() {\n EasyfyEventHandler.instance.intersectionObserver.disconnect();\n let targets = document.querySelectorAll('[data-track-product]');\n targets.forEach(target => EasyfyEventHandler.instance.intersectionObserver.observe(target));\n }\n\n static RebindObserveBanners() {\n EasyfyEventHandler.instance.bannerIntersectionObserver.disconnect();\n let targets = document.querySelectorAll('[data-track-banner]');\n targets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n }\n\n static ProductCardObserved(entries: IntersectionObserverEntry[], observer: any) {\n var eventProductIds: string[] = [];\n var eventProductSalesUnitCodes: string[] = [];\n var listIds: string[] = [];\n var promotedProducts: boolean[] = [];\n\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n EasyfyEventHandler.instance.intersectionObserver.unobserve(entry.target);\n var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\").toLowerCase() === 'true';\n if (!elementIsRegisteredForImpression) return;\n\n // points to a product but could appear multiple times on a page\n var productIdentifier = entry.target.getAttribute(\"data-product-event-id\");\n // id of product card element, always unique\n var elementIdentifier = entry.target.getAttribute(\"data-element-event-id\");\n var defaultSalesUnitCode = entry.target.getAttribute(\"data-default-sales-unit-code\");\n var isPromotedProduct = entry.target.getAttribute(\"data-event-property-is-promotion\")?.toLowerCase() === 'true';\n\n if (productIdentifier && elementIdentifier) {\n if (!EasyfyEventHandler.instance.observedElements.includes(elementIdentifier)) {\n EasyfyEventHandler.instance.observedElements.push(elementIdentifier);\n EasyfyEventLogger.Log({\n type: \"productimpression\",\n message: (`Product '${productIdentifier}' with SalesCodeUnit '${defaultSalesUnitCode}' seen`),\n target: entry.target\n });\n eventProductIds.push(productIdentifier);\n eventProductSalesUnitCodes.push(defaultSalesUnitCode);\n promotedProducts.push(isPromotedProduct);\n var node = entry.target;\n while (true) {\n node = node.parentElement;\n if (node.hasAttribute(\"data-track-list\")) {\n let listId = node.getAttribute(\"data-list-name\");\n if (listId) {\n listIds.push(listId);\n break;\n }\n }\n else if (node.nodeName == 'BODY') {\n listIds.push(null);\n break;\n }\n }\n }\n }\n else {\n EasyfyEventLogger.Log({\n type: \"error\",\n message: \"Product impression failed: missing event product ID\"\n });\n }\n }\n });\n\n if (eventProductIds.length > 0) {\n let event: IEasyfyEvent = {\n eventName: EventNames.ProductImpression,\n data: {\n productIdentifiers: eventProductIds,\n salesUnitCodes: eventProductSalesUnitCodes,\n listIds: listIds,\n promotedProducts\n }\n }\n EasyfyEventHandler.RunEvent(event);\n }\n }\n\n static BannerElementObserved(entries: IntersectionObserverEntry[], observer: any) {\n var bannerIds: string[] = [];\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n EasyfyEventHandler.instance.bannerIntersectionObserver.unobserve(entry.target);\n var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\").toLowerCase() === 'true';\n if (!elementIsRegisteredForImpression) return;\n var bannerIdentifier = entry.target.getAttribute(\"data-banner-event-id\");\n if (bannerIdentifier) {\n if (!EasyfyEventHandler.instance.observedElements.includes(bannerIdentifier)) {\n EasyfyEventHandler.instance.observedElements.push(bannerIdentifier);\n EasyfyEventLogger.Log({\n type: \"bannerimpression\",\n message: (\"Banner '\" + bannerIdentifier + \"' seen\")\n });\n bannerIds.push(bannerIdentifier);\n }\n }\n else {\n EasyfyEventLogger.Log({\n type: \"error\",\n message: \"Banner impression failed: missing event banner ID\"\n });\n }\n }\n });\n\n if (bannerIds.length > 0) {\n bannerIds.forEach(id => {\n let event: IEasyfyEvent = {\n eventName: EventNames.BannerImpression,\n data: { bannerIdentifier: id }\n }\n EasyfyEventHandler.RunEvent(event);\n });\n }\n }\n\n static TrackableElementObserved(entries: IntersectionObserverEntry[], observer: any) {\n var elements: ITrackableElement[] = [];\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\")?.toLowerCase() === 'true';\n if (!elementIsRegisteredForImpression) return;\n\n var elementIdentifier = entry.target.getAttribute(\"data-event-id\");\n if (elementIdentifier) {\n var multiObserve = entry.target.getAttribute(\"data-multi-observe\").toLowerCase() === 'true';\n if (multiObserve == false) {\n EasyfyEventHandler.instance.bannerIntersectionObserver.unobserve(entry.target);\n if (!EasyfyEventHandler.instance.observedElements.includes(elementIdentifier)) {\n EasyfyEventHandler.instance.observedElements.push(elementIdentifier);\n }\n }\n\n var trackType = entry.target.getAttribute(\"data-track-type\");\n var properties = new Map();\n\n for (const attribute of entry.target.getAttributeNames()) {\n if (attribute.startsWith(\"data-event-property-\")) {\n const value = entry.target.getAttribute(attribute);\n var key = attribute.replace(\"data-event-property-\", \"\");\n properties.set(key, value);\n }\n }\n\n elements.push({\n Id: elementIdentifier,\n Type: trackType,\n Properties: properties\n });\n\n EasyfyEventLogger.Log({\n type: \"elementimpression\",\n message: (\"Element '\" + elementIdentifier + \"' seen\")\n });\n\n }\n else {\n EasyfyEventLogger.Log({\n type: \"error\",\n message: \"Element impression failed: missing event ID on element\"\n });\n }\n }\n });\n\n if (elements.length > 0) {\n elements.forEach(element => {\n let event: IEasyfyEvent = {\n eventName: EventNames.ElementImpression,\n data: element\n }\n EasyfyEventHandler.RunEvent(event);\n });\n }\n }\n\n static ClickEventChecker(event: any) {\n if (event.target.closest('A') != null) {\n var node = event.target.closest('A');\n var targetUrl = node.href;\n if (node.closest('[data-track-product]') != null) {\n EasyfyEventHandler.ClickEventProduct(event, node, targetUrl);\n return;\n }\n else if (node.closest('[data-track-banner]') != null) {\n EasyfyEventHandler.ClickEventBanner(event, node, targetUrl);\n return;\n }\n else if (node.closest('[data-track-element]') != null) {\n EasyfyEventHandler.ClickEventElement(event, node, targetUrl);\n return;\n }\n }\n else {\n var node = event.target;\n if (node.closest('[data-track-element]') != null) {\n EasyfyEventHandler.ClickEventElement(event, node);\n return;\n }\n }\n }\n\n static ClickEventProduct(event: any, node: any, targetUrl: any) {\n node = node.closest('[data-track-product]');\n var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\").toLowerCase() === 'true';\n if (elementIsRegisteredForClick) {\n event.stopPropagation();\n event.preventDefault();\n\n var defaultSalesUnitCode = node.getAttribute(\"data-default-sales-unit-code\");\n var productId = node.getAttribute('data-product-event-id');\n var isPromotedProduct = node.getAttribute(\"data-event-property-is-promotion\")?.toLowerCase() === 'true';\n\n if (productId) {\n var listName\n while (true) {\n node = node.parentElement;\n if (!node) {\n break;\n }\n if (node.hasAttribute(\"data-track-list\")) {\n listName = node.getAttribute(\"data-list-name\");\n break;\n }\n else if (node.nodeName == 'body') {\n listName = null;\n break;\n }\n }\n\n let event: IEasyfyEvent = {\n eventName: EventNames.ProductClick,\n data: {\n productIdentifier: productId,\n salesUnitCode: defaultSalesUnitCode,\n listName: listName,\n isPromotedProduct: isPromotedProduct\n }\n }\n EasyfyEventHandler.RunEvent(event);\n window.location = targetUrl;\n }\n else {\n //Don't block links\n window.location = targetUrl;\n }\n }\n }\n\n static ClickEventBanner(event: any, node: any, targetUrl: any) {\n node = node.closest('[data-track-banner]');\n var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\").toLowerCase() === 'true';\n if (elementIsRegisteredForClick) {\n event.stopPropagation();\n event.preventDefault();\n\n var bannerId = node.getAttribute('data-banner-event-id');\n if (bannerId) {\n let event: IEasyfyEvent = {\n eventName: EventNames.BannerClick,\n data: {\n bannerIdentifier: bannerId,\n }\n }\n EasyfyEventHandler.RunEvent(event);\n window.location = targetUrl;\n }\n else {\n //Don't block links\n window.location = targetUrl;\n }\n }\n }\n\n static ClickEventElement(event: any, node: any, targetUrl?: any) {\n node = node.closest('[data-track-element]');\n var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\")?.toLowerCase() === 'true' ?? false;\n if (elementIsRegisteredForClick) {\n\n if (targetUrl) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n var elementId = node.getAttribute('data-event-id');\n\n if (elementId) {\n var trackType = node.getAttribute('data-track-type');\n var properties = new Map();\n\n for (const attribute of node.getAttributeNames()) {\n if (attribute.startsWith(\"data-event-property-\")) {\n const value = node.getAttribute(attribute);\n var key = attribute.replace(\"data-event-property-\", \"\");\n properties.set(key, value);\n }\n }\n\n var data: ITrackableElement = {\n Id: elementId,\n Type: trackType,\n Properties: properties\n }\n\n let event: IEasyfyEvent = {\n eventName: EventNames.ElementClick,\n data\n }\n\n EasyfyEventHandler.RunEvent(event);\n\n const singleClick = node.dataset['singleClick'];\n if (singleClick) node.removeAttribute('data-track-element');\n\n if (targetUrl) {\n window.location = targetUrl;\n }\n }\n else if (targetUrl) {\n //Don't block links\n window.location = targetUrl;\n }\n }\n }\n\n static GetCurrentInstance(): EasyfyEventHandler {\n var instance: EasyfyEventHandler;\n if (EasyfyEventHandler.instance) {\n instance = EasyfyEventHandler.instance\n }\n else if (window.EasyfyEventLayerInstance) {\n instance = window.EasyfyEventLayerInstance as EasyfyEventHandler;\n }\n\n return instance;\n }\n\n static RunEvent(event: IEasyfyEvent): Promise {\n return new Promise(async (resolve) => {\n var dispatchedToServices = [];\n var errors = new Map();\n for await (const service of EasyfyEventData.GetAllServices()) {\n if (EasyfyEventData.ConsumesEvent(service.name, event.eventName)) {\n try {\n var instance = EasyfyEventHandler.GetCurrentInstance();\n\n await instance.eventExporters.get(service.name)?.RegisterEvent(event);\n dispatchedToServices.push(service.name);\n\n }\n catch (error) {\n errors.set(service.name, event.eventName);\n console.warn(error);\n }\n }\n };\n\n EasyfyEventLogger.BroadcastToLogger(event);\n\n if (dispatchedToServices.length > 0) {\n EasyfyEventLogger.Log({ type: \"event\", message: `Event '${event.eventName}' dispatched to: ${dispatchedToServices.join(', ')}` });\n } else {\n EasyfyEventLogger.Log({ type: \"event\", message: `Event '${event.eventName}' fired but not dispatched to any services` });\n }\n errors.forEach((value, key) => {\n EasyfyEventLogger.Log({ type: \"error\", message: `Error when trying to dispatch event '${value}' to: ${key}` });\n });\n\n resolve();\n });\n }\n\n static async RegisterResponseData(responseData: any): Promise {\n return new Promise(async (resolve) => {\n var instance = EasyfyEventHandler.GetCurrentInstance();\n if (instance?.initiated) {\n await EasyfyEventHandler.CheckSessionStart();\n if (responseData?.data?.eventLayer) {\n EasyfyEventLogger.Log({\n message: \"Event layer data added from response\",\n });\n\n EasyfyEventData.AddDataToEventLayer(responseData.data.eventLayer);\n\n EasyfyEventLogger.Log({\n type: \"updateeventlayerstatus\",\n });\n await EasyfyEventHandler.RunEvents();\n }\n }\n resolve();\n });\n }\n\n static GetCookie(cookieName) {\n let cookie = {};\n document.cookie.split(';').forEach(function (el) {\n let [key, value] = el.split('=');\n cookie[key.trim()] = value;\n })\n return cookie[cookieName];\n }\n\n }\n}\n\nexport default Easyfy.Modules;\n","import axios, { AxiosRequestConfig } from 'axios';\nimport EasyfyDataLayer from '@shared/easyfy.datalayer';\nimport Event from './easyfy.events/easyfy.eventhandler';\n\nnamespace Easyfy.Shared.Scripts {\n export interface IExtraHeaders {\n key: string;\n value: string;\n }\n\n export const get = async (url: string, config?: AxiosRequestConfig): Promise => {\n axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n url = generateFullPathWithPrefix(url);\n\n var response = await axios.get(url, config);\n Event.EasyfyEventHandler.RegisterResponseData(response);\n return await EasyfyDataLayer.HandleDataEvents(response);\n };\n\n export const post = async (url: string, data: any, token?: string, config?: AxiosRequestConfig) => {\n if (token) {\n axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n }\n axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n url = generateFullPathWithPrefix(url);\n\n var response = await axios.post(url, data, config);\n Event.EasyfyEventHandler.RegisterResponseData(response);\n return await EasyfyDataLayer.HandleDataEvents(response);\n };\n\n export const patch = async (url: string, data: any, token?: string, config?: AxiosRequestConfig) => {\n if (token) {\n axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n }\n axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n url = generateFullPathWithPrefix(url);\n\n var response = await axios.patch(url, data, config);\n Event.EasyfyEventHandler.RegisterResponseData(response);\n return await EasyfyDataLayer.HandleDataEvents(response)\n };\n\n export const axiosDelete = async (url: string, token?: string, config?: AxiosRequestConfig) => {\n if (token) {\n axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n }\n axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n url = generateFullPathWithPrefix(url);\n\n var response = await axios.delete(url, config);\n Event.EasyfyEventHandler.RegisterResponseData(response);\n return await EasyfyDataLayer.HandleDataEvents(response)\n };\n\n function generateFullPathWithPrefix(url: string): string {\n var prefixPath = document.documentElement?.getAttribute(\"data-prefix-path\");\n if (url && !url.startsWith(\"/\"))\n url = \"/\" + url;\n if (prefixPath) {\n prefixPath = prefixPath.endsWith(\"/\") ? prefixPath.slice(0, -1) : prefixPath;\n if (prefixPath.length > 1 && !prefixPath.startsWith(\"/\"))\n prefixPath = \"/\" + prefixPath;\n if (url)\n return prefixPath + url;\n else\n return prefixPath;\n }\n else\n return url;\n }\n}\n\nexport default Easyfy.Shared.Scripts;","import { addCss } from '@shared/easyfy.utils';\n\nexport const isMobile = () => (window.innerWidth <= 768 ? true : false);\n\nexport const isDesktop = () => (window.innerWidth >= 1100 ? true : false);\n\nexport const toggleProp = (el: HTMLElement): void => {\n !('open' in el.dataset) ? (el.dataset.open = '') : delete el.dataset.open;\n};\n\nexport const animationEnded = (el: Element | HTMLElement, func: EventListenerOrEventListenerObject) =>\n el.addEventListener('animationend', func, { once: true });\n\nexport const deleteCookie = (name: string) => {\n const expirationTime = Date.now() - 30 * 60 * 1000;\n document.cookie = `${name}= ; expires=${new Date(expirationTime).toUTCString()}; path=/; domain=${window.location.hostname}`;\n};\n\nexport const setCookie = (contentCookie: string, cookieName: string, expirationDate?: Date) => {\n deleteCookie(cookieName);\n\n const expiration = expirationDate || new Date();\n\n if (!expirationDate) {\n expiration.setTime(expiration.getTime() + 30 * 60 * 1000); // default to 30 minutes\n }\n\n document.cookie = `${cookieName}=${contentCookie}; expires=\"${expiration.toUTCString()}\"; path=/; domain=${window.location.hostname}`;\n};\n\nexport const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport const clearContent = (container) => {\n container.innerHTML = '';\n};\n\nexport const replaceContent = (container, data: string, type: string = 'append', clearData: boolean = true) => {\n if (clearData) container.innerHTML = '';\n\n const content = document.createRange().createContextualFragment(data).firstElementChild;\n\n switch (type) {\n case 'after':\n container.after(content);\n break;\n case 'replaceInnerHtml':\n container.innerHTML = content.innerHTML;\n break;\n case 'append':\n default:\n container.appendChild(content);\n break;\n }\n};\n\nexport const createElementWithClasses = (tag: string, classes: string | string[], innerText?: string | undefined): HTMLElement => {\n const element = document.createElement(tag);\n addCss(element, classes);\n\n if (innerText) element.innerText = innerText;\n return element;\n};\n\nexport const createLink = (href: string | undefined, text: string, classes: string | string[]): HTMLAnchorElement => {\n const link = document.createElement('a');\n link.href = href || '#';\n link.innerText = text;\n addCss(link, classes);\n return link;\n};\n\nexport const createEventButton = (text: string, event: string, classes: string | string[]): HTMLButtonElement => {\n const button = document.createElement('button');\n button.innerText = text;\n button.dataset.event = event;\n addCss(button, classes);\n return button;\n};\n\nexport interface UrlHistoryContent {\n appendType: string;\n data: string;\n}\n","import { invoke } from '@shared/easyfy.decorators';\nimport { globalEvent } from '@shared/easyfy.core';\nimport { addCss, removeCss } from '@shared/easyfy.utils';\nimport { PostForm } from '@clientWebServices/form.service';\nimport { replaceContent } from './utils';\n\n@invoke\nexport default class Form {\n static Instance: Form;\n\n constructor() {\n Form.Instance = this;\n globalEvent({\n type: 'submit',\n events: [\n {\n action: 'haypp-ajax-form',\n callback: this.onPostHayppForm,\n },\n ],\n });\n globalEvent({\n type: 'click',\n events: [\n {\n event: 'toggle-password',\n callback: this.onTogglePassword,\n },\n ],\n });\n globalEvent({\n type: 'input',\n events: [\n {\n event: 'input-password',\n callback: this.onPasswordInput,\n },\n {\n event: 'confirm-password',\n callback: this.onConfirmPasswordInput,\n },\n ],\n });\n }\n\n onPostHayppForm(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n\n const element: HTMLFormElement = e.target as HTMLFormElement;\n const data: FormData = new FormData(element);\n const tokenEl: HTMLElement = element.closest('[data-token]') as HTMLElement;\n const token: string =\n tokenEl && tokenEl.dataset?.token\n ? tokenEl.dataset?.token\n : (document.querySelector('[name=\"__RequestVerificationToken\"]') as HTMLInputElement)?.value ?? '';\n\n PostForm(element.attributes['action']?.value, data, token).then((response) => {\n if (response.data.success) {\n if (Form.Instance.getReturnUrl()) return (window.location.href = Form.Instance.getReturnUrl());\n\n if (response.data.partials) {\n for (const [key, value] of Object.entries(response.data.partials)) {\n const container = document.querySelector(`[data-container=\"${key}\"]`);\n if (container) replaceContent(container, value as string, 'replaceInnerHtml');\n }\n } else if (response.data.reload) {\n setTimeout(function () {\n location.reload();\n }, 700);\n } else if (response.data.clearForm) {\n element.reset();\n if (response.data.partial) {\n Form.Instance.processPartial(response.data.partial);\n }\n } else {\n if (response.data.partial) {\n Form.Instance.processPartial(response.data.partial);\n }\n }\n } else {\n const errorMessages = response?.data?.errorMessages;\n if (element && response.data.generalErrorMessage) Form.Instance.setValidationSummary(element, response.data.generalErrorMessage?.value);\n if (element) Form.Instance.resetErrorMessages(element);\n if (errorMessages) Form.Instance.setErrorMessages(element, errorMessages);\n }\n });\n\n return false;\n }\n\n private getReturnUrl = (): string => {\n const url = new URL(window.location.href);\n const params = new URLSearchParams(url.search);\n return params?.get('ReturnUrl');\n };\n\n onTogglePassword = (e: Event) => {\n const el = e.target as HTMLInputElement;\n const pwdEl = el.closest('.form-group') as HTMLElement;\n const pwdInput = pwdEl?.querySelector('input') as HTMLInputElement;\n const showIcon = pwdEl?.querySelector('i') as HTMLElement;\n if (!pwdInput) return;\n if (pwdInput.type == 'password') {\n pwdInput.type = 'text';\n showIcon?.classList.remove('icon-show-true');\n showIcon?.classList.add('icon-show-false');\n } else {\n pwdInput.type = 'password';\n showIcon?.classList.remove('icon-show-false');\n showIcon?.classList.add('icon-show-true');\n }\n };\n\n onPasswordInput = (e: Event) => {\n const inputEl = e?.target as HTMLInputElement;\n const value = inputEl.value;\n\n this.updateRequirement('length', value.length >= 8);\n this.updateRequirement('lowercase', /[a-z]/.test(value));\n this.updateRequirement('uppercase', /[A-Z]/.test(value));\n this.updateRequirement('number', /\\d/.test(value));\n this.updateRequirement('characters', /[!@#$%^&*_+=,.?-]/.test(value));\n\n this.handleFormValidation(inputEl.closest('form') as HTMLFormElement);\n };\n\n onConfirmPasswordInput = (e: Event) => {\n const confirmPassword = e?.target as HTMLInputElement;\n const form = confirmPassword.closest('form') as HTMLFormElement;\n const password = form.querySelector('input[name=\"newpassword\"]') as HTMLInputElement;\n\n if (confirmPassword && password) {\n this.updateRequirement('match', confirmPassword.value == password.value);\n this.handleFormValidation(form);\n return true;\n }\n this.handleFormValidation(form);\n return false;\n };\n\n processPartial = (dataPartial: any) => {\n for (const [key, value] of Object.entries(dataPartial)) {\n const container = document.querySelector(`[data-container=\"${key}\"]`);\n if (container) replaceContent(container, value as string, 'append', false);\n }\n };\n\n resetErrorMessages = (element: HTMLElement) => {\n element.querySelectorAll('.error')?.forEach((el) => {\n removeCss(el, 'error');\n if (el.querySelector('[data-container=\"error-message\"')) el.querySelector('[data-container=\"error-message\"').innerHTML = '';\n });\n };\n\n setErrorMessages = (element: HTMLElement, errorMessages) => {\n errorMessages?.forEach((error) => {\n const propertyName = error?.propertyName?.toLowerCase();\n const inputContainer = element.querySelector(`[data-container=\"form-${propertyName}\"]`) as HTMLElement;\n const messageContainer = inputContainer.querySelector('[data-container=\"error-message\"');\n const errorMessage = error?.errorMessage;\n if (messageContainer && errorMessage) {\n messageContainer.innerHTML = errorMessage;\n addCss(inputContainer, 'error');\n }\n });\n };\n\n setValidationSummary = (element: HTMLElement, message: string) => {\n const validationSummaryContainer = element.querySelector('[data-container=\"validation-summary\"');\n if (validationSummaryContainer) validationSummaryContainer.innerHTML = message;\n };\n\n handleFormValidation = (form: HTMLFormElement) => {\n if (!form) return false;\n\n const validationErrors = form.querySelector('.password-validation-errors');\n const password = form.querySelector('input[name=\"newpassword\"]') as HTMLInputElement;\n const confirmPassword = form.querySelector('input[name=\"confirmpassword\"]') as HTMLInputElement;\n const submit = form.querySelector('button[type=\"submit\"]') as HTMLButtonElement;\n const isFormValid = validationErrors?.querySelectorAll('.requirement:not(.hidden)').length === 0;\n\n if (password.value && confirmPassword.value && isFormValid) {\n submit.removeAttribute('disabled');\n return true;\n }\n\n submit.setAttribute('disabled', 'disabled');\n return false;\n };\n\n updateRequirement = (id: string, valid: boolean) => {\n const requirement = document.getElementById(id);\n if (requirement) {\n if (valid) {\n requirement.classList.add('hidden');\n } else {\n requirement.classList.remove('hidden');\n }\n }\n };\n}\n","import easyfyAxios from '@shared/easyfy.axios';\n\nexport const PostForm = (url: string, data: any, token: any) => {\n return easyfyAxios.post(url, data, token);\n};\n","import { invoke } from '@shared/easyfy.decorators';\nimport '@clientShared/form';\n\n@invoke\nexport default class ForgotPassword {\n constructor() {}\n\n onInit() {}\n}\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\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","__webpack_require__.j = 912;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t912: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackJsonpWeb\"] = self[\"webpackJsonpWeb\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [6017], () => (__webpack_require__(4388)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","query","document","querySelector","getBlazorEditMode","window","isAdminModeEnabled","undefined","isEditModeEnabled","editModeCookie","cookie","split","find","trim","startsWith","toLowerCase","docReady","callback","context","blazorFinishedLoadingEventRegistered","EasyfyMethods","triggerWindowEvent","eventName","eventData","event","CustomEvent","detail","dispatchEvent","readyList","readyFired","readyEventHandlersInstalled","ready","readyBody","i","length","fn","call","ctx","blazorFinishedLoading","addEventListener","TypeError","setTimeout","push","readyState","globalEventList","globalEvent","type","forEach","events","item","foundItem","action","actionFound","globalFindAction","eventFound","globalFindEvent","globalFound","globalFind","globalEventAdd","body","removeEventListener","globalEventHandler","e","target","eventTarget","globalGetTargetAction","globalEventInvokeCallback","globalGetTargetEvent","globalMatchType","cbs","itemType","eventType","actionType","globalGetTarget","dataTarget","attributes","value","parentNode","parseToBoolean","val","isString","removeCss","el","className","Array","isArray","NodeList","classList","remove","element","add","invoke","ctor","newClass","readyAfter","prototype","onInit","apply","error","init","resolves","err","hasOwnProperty","injector","resolve","dependencies","resolveOnload","depends","cb","id","len","Math","random","toString","substr","name","func","data","index","dependencyItem","loadedVal","Object","defineProperty","get","set","splice","dependencyFunc","key","this","enumerable","configurable","obj","prop","writable","handler","oldval","newval","getter","setter","Easyfy","Shared","Scripts","PushToDataLayer","gtmEvent","PushProductImpressionEvent","eventProducts","listName","currencyCode","ecommerce","impressions","PushProductClickEvent","click","actionField","list","ListNameCleanUp","products","PushProductDetailEvent","PushProductAddEvent","PushProductRemoveEvent","PushCheckoutEvent","step","option","checkout","HandleDataEvents","response","dataLayer","BuildAndPushEvents","dataEvents","dataEvent","dataProduct","product","brand","category","price","variant","quantity","dimension3","dimension4","dimension5","dimension7","clickProducts","clickProduct","position","dimension6","impressionProducts","impressionProduct","detailProducts","detailProduct","console","dir","listname","replace","EasyfyEventData","AddDataToEventLayer","EasyfyEventLayer","productLists","productList","productPrices","basket","notification","notifications","AddCustomDataToEventLayer","customData","GlobalIgnoreEvents","result","configuration","addProductImpressionsServerSide","SiteInfo","site","PageInfo","pageInfo","Events","ClearEvents","ShouldRegisterProductImpressions","ShouldRegisterBannerImpressions","addBannerImpressionsServerSide","GetAllServices","services","GetService","serviceName","serviceInstance","GetServiceNames","service","ServiceIsActive","enabled","ConsumesEvent","includeAllEvents","Product","ProductAt","atIndex","Products","ids","productDataSet","ProductsAt","indexes","AllProducts","AllProductLists","ProductIndexInList","productId","productsInList","ProductIds","indexOf","ProductSalesUnitPrice","ProductSalesUnitPrices","prices","AllProductSalesUnitPrices","Banner","banners","AllBanners","HasNotifications","Notifications","ClearNotifications","HasEvents","Basket","GetCurrencyCode","returnValue","GetCustomData","GetClientEventMetaData","SessionId","localStorage","getItem","LocalStorageKeys","UserId","ClientId","IsDesktop","IsDekstop","IsMobilePhone","IsTablet","IPAddress","IsRecurringUser","flagAsRecurringAfterCheck","cookieKey","UserIdCookieKey","userId","GetCookieValue","LastCheckedUserId","setItem","cookieName","SetStatsApiBlock","block","StatsIsBlocked","removeItem","StatsApiIsBlocked","StatsEventExporter","_payloadKbThreshold","_eventThreshold","_eventThresholdRemoved","WithMapper","mapper","LoadAndSetTransitionStatus","CheckVisibility","bind","RegisterEvent","Promise","MapEventData","AccumulateEvent","StatsEventsThresholdRemoved","storedDataString","StatsEventsTransitionObj","_eventData","JSON","parse","ClientMetaData","EventRequests","RecheckAndSetTransitionStatus","eventsMatch","skipEventNames","EventNames","BannerImpression","ElementImpression","ProductImpression","includes","Event","stringify","str","bytes","TextEncoder","encode","blob","Blob","_blob","GetObjectSizeInKB","SendEventsToStatsApi","navigator","sendBeacon","visibilityState","jsonString","EasyfyEventLogger","Ga4EventExporter","ga4Event","BroadcastChannel","ConsoleLog","message","prefix","color","bgColor","Log","CheckLogStatus","EnableLog","DisableLog","ToggleImpressionVisualizer","PrintEventLayer","HidePrintedEventLayer","RunEventConsumer","DisplayEventMessage","BroadcastToLogger","GetCurrentTime","now","Date","getHours","getMinutes","getSeconds","getMilliseconds","FeatureNames","EventTracking","Features","FeatureIsActive","featureName","hasAttribute","KlaviyoEventExporter","PushToKlaviyo","identify","IdentifyUser","klaviyoEvent","emailToRegister","ServiceNames","Stats","Ga4","Klaviyo","PageView","ProductClick","ProductPageView","BannerClick","ElementClick","AddToCart","RemoveFromCart","QuantityChanged","StartedCheckout","CompletedCheckout","SearchPerformed","ContinueToPayment","SessionStarted","LoggedIn","LoggedOut","Message","FetchClientMetaData","BlockStatsApi","SessionTimer","Modules","EasyfyEventHandler","constructor","eventMappers","eventExporters","Map","observedElements","initiated","instance","featureFlag","EasyfyEventLayerInstance","eventExporter","CheckSessionStart","then","RunEvents","InitProductIntersectionObserver","InitMutationObserver","InitBannerIntersectionObserver","InitElementIntersectionObserver","ClickEventChecker","inlineScript","RunEvent","sessionTimer","toUTCString","SendStartSessionEvent","checkTime","diff","getTime","abs","round","oldSessionId","fetch","ok","status","clientMetaData","json","sessionId","clientId","isDesktop","isMobilePhone","isTablet","userIdCookieKey","ipAddress","HandleWorkerMessage","clientData","Culture","Currency","RecurringUser","Referrer","referrer","Path","location","pathname","UserAgent","userAgent","VisitorId","sessionStartedEvent","options","childList","subtree","characterData","targets","querySelectorAll","mutationObserver","MutationObserver","ElementMutated","observe","mutations","mutation","RebindObserveProducts","BannerElementMutated","RebindObserveBanners","intersectionObserver","IntersectionObserver","ProductCardObserved","root","rootMargin","threshold","bannerIntersectionObserver","BannerElementObserved","TrackableElementObserved","disconnect","entries","observer","eventProductIds","eventProductSalesUnitCodes","listIds","promotedProducts","entry","isIntersecting","unobserve","getAttribute","productIdentifier","elementIdentifier","defaultSalesUnitCode","isPromotedProduct","node","parentElement","listId","nodeName","productIdentifiers","salesUnitCodes","bannerIds","bannerIdentifier","elements","trackType","properties","attribute","getAttributeNames","Id","Type","Properties","closest","targetUrl","href","ClickEventProduct","ClickEventBanner","ClickEventElement","stopPropagation","preventDefault","salesUnitCode","bannerId","elementId","dataset","removeAttribute","GetCurrentInstance","dispatchedToServices","errors","join","RegisterResponseData","responseData","eventLayer","GetCookie","generateFullPathWithPrefix","url","prefixPath","documentElement","endsWith","slice","config","axios","defaults","headers","common","post","token","patch","axiosDelete","delete","replaceContent","container","clearData","innerHTML","content","createRange","createContextualFragment","firstElementChild","after","appendChild","Form","getReturnUrl","URL","params","URLSearchParams","search","onTogglePassword","pwdEl","pwdInput","showIcon","onPasswordInput","inputEl","updateRequirement","test","handleFormValidation","onConfirmPasswordInput","confirmPassword","form","password","processPartial","dataPartial","resetErrorMessages","setErrorMessages","errorMessages","propertyName","inputContainer","messageContainer","errorMessage","setValidationSummary","validationSummaryContainer","validationErrors","submit","isFormValid","setAttribute","valid","requirement","getElementById","Instance","onPostHayppForm","FormData","tokenEl","PostForm","success","partials","reload","clearForm","reset","partial","generalErrorMessage","ForgotPassword","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","keys","every","r","n","__esModule","d","a","definition","o","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}