{"version":3,"sources":["webpack:///./src/feature/personalization/personalization.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.set-prototype-of.js"],"names":["COOKIE_CATEGORIES","consentGiven","category","CookieInformation","getConsentGivenFor","Personalization","element","initDomCache","items","dom","block","button","renew","addEventListener","window","checkCookieAccept","this","CookieConsent","every","loaditems","unloaditems","style","display","BaseBehavior","$","fails","toObject","nativeGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","target","stat","forced","sham","getPrototypeOf","it","setPrototypeOf"],"mappings":"68BAKA,IAAMA,EAAoB,CACzB,wBACA,wBAGKC,EAAe,SAAAC,GAAQ,OAAIC,kBAAkBC,mBAAmBF,IAEhEG,E,YACL,WAAYC,GAAS,a,4FAAA,UACpB,wBAAMA,KAEDA,QAAUA,EACf,EAAKC,eAEL,EAAKC,MAAQ,EAAKC,IAAID,MACtB,EAAKE,MAAQ,EAAKD,IAAIC,MACtB,EAAKC,OAAS,EAAKF,IAAIG,MAEvB,EAAKC,mBAVe,E,0SAaF,WACdV,mBACHW,OAAOD,iBAAiB,iCAAiC,WACxD,EAAKE,uBAIPC,KAAKD,oBACLC,KAAKL,OAAOE,iBAAiB,SAAS,WACjCI,eACHA,cAAcL,a,0CAMIZ,EAAkBkB,MAAMjB,GAG3Ce,KAAKG,YAELH,KAAKI,gB,kCAKNJ,KAAKN,MAAMW,MAAMC,QAAU,S,oCAI3BN,KAAKN,MAAMW,MAAMC,QAAU,e,8BA5CCC,KAgDflB,a,oBC5Df,IAAImB,EAAI,EAAQ,GACZC,EAAQ,EAAQ,GAChBC,EAAW,EAAQ,GACnBC,EAAuB,EAAQ,IAC/BC,EAA2B,EAAQ,IAMvCJ,EAAE,CAAEK,OAAQ,SAAUC,MAAM,EAAMC,OAJRN,GAAM,WAAcE,EAAqB,MAIJK,MAAOJ,GAA4B,CAChGK,eAAgB,SAAwBC,GACtC,OAAOP,EAAqBD,EAASQ,Q,oBCZjC,EAAQ,EAKhBV,CAAE,CAAEK,OAAQ,SAAUC,MAAM,GAAQ,CAClCK,eALmB,EAAQ","file":"15-9746a312.pkg.js","sourcesContent":["import BaseBehavior from '../../foundation/base/base';\r\n\r\n/* global CookieInformation */\r\n/* global CookieConsent */\r\n\r\nconst COOKIE_CATEGORIES = [\r\n\t'cookie_cat_functional',\r\n\t'cookie_cat_statistic'\r\n];\r\n\r\nconst consentGiven = category => CookieInformation.getConsentGivenFor(category);\r\n\r\nclass Personalization extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\r\n\t\tthis.element = element;\r\n\t\tthis.initDomCache();\r\n\r\n\t\tthis.items = this.dom.items;\r\n\t\tthis.block = this.dom.block;\r\n\t\tthis.button = this.dom.renew;\r\n\r\n\t\tthis.addEventListener();\r\n\t}\r\n\r\n\taddEventListener() {\r\n\t\tif (CookieInformation) {\r\n\t\t\twindow.addEventListener('CookieInformationConsentGiven', () => {\r\n\t\t\t\tthis.checkCookieAccept();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.checkCookieAccept();\r\n\t\tthis.button.addEventListener('click', () => {\r\n\t\t\tif (CookieConsent) {\r\n\t\t\t\tCookieConsent.renew();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tcheckCookieAccept() {\r\n\t\tconst allAccepted = COOKIE_CATEGORIES.every(consentGiven);\r\n\r\n\t\tif (allAccepted) {\r\n\t\t\tthis.loaditems();\r\n\t\t} else {\r\n\t\t\tthis.unloaditems();\r\n\t\t}\r\n\t}\r\n\r\n\tloaditems() {\r\n\t\tthis.block.style.display = 'none';\r\n\t}\r\n\r\n\tunloaditems() {\r\n\t\tthis.block.style.display = 'inherit';\r\n\t}\r\n}\r\n\r\nexport default Personalization;\r\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n"],"sourceRoot":""}