{"version":3,"file":"9950.chunk.75b5bcac4e2d5ccea32e.js","mappings":"2wBAMO,MAAMA,EAST,WAAiBC,CAAKC,GAClB,GAAIC,EAAAA,EAAiBC,eACjB,OAGJ,MAAM,UAAEC,GAAcC,OACtBD,GAAaA,EAAUJ,KAAKC,EAChC,EACHK,EAjBYP,EAAAA,EACKQ,iBAAoBC,IAC9BT,EAAcC,KAAKQ,EAAsBC,WAAW,EAF/CV,EAKKW,UAAY,SAACC,GAAgE,IAA7CC,EAAmCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAChFd,EAAcC,K,+VAAIgB,CAAC,CAAEC,MAAON,GAAcC,GAC9C,C","sources":["webpack://Kristiania.Web/./Features/Partials/GoogleTagManager/GtmEventsBase.ts"],"sourcesContent":["import ExecutionContext from '../../ExecutionContext';\nimport type { GtmPageStatsViewModel } from '../GtmPageStats/GtmPageStatsViewModel.csharp';\nimport type { GoogleTagManagerData, GoogleTagManagerProperties } from './GoogleTagManagerModels';\n\ntype DataLayerModel = GoogleTagManagerData | GoogleTagManagerProperties;\n\nexport class GtmEventsBase {\n public static pushGtmPageStats = (gtmPageStatsViewModel: GtmPageStatsViewModel) => {\n GtmEventsBase.push(gtmPageStatsViewModel.properties);\n };\n\n public static pushEvent = (eventName: string, payLoad: GoogleTagManagerProperties = []) => {\n GtmEventsBase.push({ event: eventName, ...payLoad });\n };\n\n protected static push(data: DataLayerModel) {\n if (ExecutionContext.IsServerSide()) {\n return;\n }\n\n const { dataLayer } = window as any;\n dataLayer && dataLayer.push(data);\n }\n}\n"],"names":["GtmEventsBase","push","data","ExecutionContext","IsServerSide","dataLayer","window","_GtmEventsBase","pushGtmPageStats","gtmPageStatsViewModel","properties","pushEvent","eventName","payLoad","arguments","length","undefined","_objectSpread","event"],"sourceRoot":""}