PageSourceSearch

https://www.derusnapot.hu/build/cookie-consent.70fe3e36.js

js derusnapot.hu collected 2026-10-03 18:45:02 UTC 6,536 bytes, 1 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[48],{49594:function(e,t,i){let n=i(73942);$(document).ready(()=>{n.init()})},73942:function(e,t,i){function n(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i(44114);const a=i(2733);class s{constructor(e={}){if(n(this,"cookieName","cookie-consent"),n(this,"expireDays",60),n(this,"cookieData",null),n(this,"cookieDataReady",!1),n(this,"iFrames",[]),n(this,"iFramesCompleted",[]),n(this,"templateUrl",(window.publicUrl??window.micrositeUrl)+"/cookie-consent"),n(this,"templateName",null),n(this,"events",[{event:"ac_consent_security",variables:{ac_security_enabled:!0},editable:!1},{event:"ac_consent_analytics",variables:{ac_analytics_enabled:!1},editable:!0},{event:"ac_consent_advertising",variables:{ac_advertising_enabled:!1},editable:!0},{event:"ac_consent_functional",variables:{ac_functional_enabled:!1},editable:!1},{event:"ac_consent_personalization",variables:{ac_personalization_enabled:!1},editable:!1},{event:"ac_after_consent_update",variables:{},editable:!1}]),n(this,"elementsSelectors",{container:".cookie-consent",main_modal:"#CookieModal",main_modal_settings_btn:"#CookieSettingsBtn",main_modal_accept_all_btn:"#CookieAcceptAllBtn",settings_modal:"#CookieModalSettings",settings_modal_save_btn:"#CookieSaveSettingsBtn",settings_modal_accept_all_btn:"#CookieAcceptAllBtn2"}),n(this,"valuesSelectors",{ac_security_enabled:"#switchCheck_CookieSzukseges",ac_analytics_enabled:"#switchCheck_CookieTeljesitmeny",ac_advertising_enabled:"#switchCheck_CookieMarketing"}),this.element=document.querySelector(this.elementsSelectors.container),this.element){for(let t in e)this.hasOwnProperty(t)&&(this[t]=e[t]);window.addEventListener("iframes-init",e=>{this.iFrames.push(e.detail)}),this.cookie=a.withConverter({read:(e,t)=>t===this.cookieName&&e?JSON.parse(e):a.converter.read(e,t),write:(e,t)=>t===this.cookieName&&e?JSON.stringify(e):a.converter.write(e,t)}),this.loadTemplate().then(()=>{this.registerEvents(),this.loadAndCheckCookieData()?this.saveSettings(!0):this.startCookieConsent()})}}static init(e={}){return new s(e)}loadTemplate(){return new Promise((e,t)=>{let i=new XMLHttpRequest;i.onreadystatechange=()=>{if(4===i.readyState){let t=JSON.parse(i.response);200===i.status?(t.html&&(this.element.innerHTML=t.html),e(!0)):e(!1)}};let n=this.templateName?"?name="+this.templateName:"";i.open("GET",this.templateUrl+n,!0),i.send()})}loadAndCheckCookieData(){if(this.cookieData=this.cookie.get(this.cookieName),!this.cookieData)return this.cookieData={},!1;let e=!1;return this.events.forEach((t,i)=>{if(this.cookieData[i].event===this.events[i].event){for(let n in t.variables){if(!this.cookieData[i].hasOwnProperty(n)){e=!0;continue}if(!t.editable&&this.cookieData[i][n]!==t.variables[n]){e=!0;continue}let a=this.element.querySelector(this.valuesSelectors[n]);a&&(a.checked=this.cookieData[n])}for(let n in this.cookieData[i])"event"!==n&&(t.variables.hasOwnProperty(n)||(e=!0))}else e=!0}),!e}registerEvents(){this.element.querySelector(this.elementsSelectors.main_modal_accept_all_btn).addEventListener("click",()=>{this.setAllTrue(),this.saveSettings()}),this.element.querySelector(this.elementsSelectors.settings_modal_save_btn).addEventListener("click",()=>{this.saveSettings()}),this.element.querySelector(this.elementsSelectors.settings_modal_accept_all_btn).addEventListener("click",()=>{this.setAllTrue(),this.saveSettings()})}setAllTrue(){for(let e in this.valuesSelectors)this.element.querySelector(this.valuesSelectors[e]).checked=!0}startCookieConsent(){$(this.elementsSelectors.main_modal).modal("show")}buildEvents(){let e=[];return this.events.forEach(t=>{let i={event:t.event};for(let e in t.variables)i[e]=t.editable?this.element.querySelector(this.valuesSelectors[e]).checked:t.variables[e];e.push(i)}),e}saveSettings(e=!1){let t;this.iFramesCompleted=[],this.cookieDataReady=!1,e?t=this.cookie.get(this.cookieName):(t=this.buildEvents(e),this.cookieData=t,this.cookie.set(this.cookieName,t,{expires:this.expireDays,sameSite:"lax",secure:!0})),this.cookieDataReady=!0,window.dataLayer&&this.pushEvents(t)}pushEvents(e){document.addEventListener("dataLayer-push-finished",function t(i){e[i.detail]?window.dataLayer.push(Object.assign({eventCallback:()=>{document.dispatchEvent(new CustomEvent("dataLayer-push-finished",{detail:i.detail+1}))}},e[i.detail])):(document.removeEventListener("dataLayer-push-finished",t),document.dispatchEvent(new CustomEvent("dataLayer-push-finished-all")))}),window.dataLayer.push(Object.assign({eventCallback:()=>{document.dispatchEvent(new CustomEvent("dataLayer-push-finished",{detail:1}))}},e[0]))}}e.exports=s},2733:function(e){e.exports=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function t(i,n){function a(t,a,s){if("undefined"!=typeof document){"number"==typeof(s=e({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decode
1URIComponent).replace(/[()]/g,escape);var o="";for(var r in s)s[r]&&(o+="; "+r,!0!==s[r]&&(o+="="+s[r].split(";")[0]));return document.cookie=t+"="+i.write(a,t)+o}}function s(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},a=0;a<t.length;a++){var s=t[a].split("="),o=s.slice(1).join("=");try{var r=decodeURIComponent(s[0]);if(n[r]=i.read(o,r),e===r)break}catch(e){}}return e?n[e]:n}}return Object.create({set:a,get:s,remove:function(t,i){a(t,"",e({},i,{expires:-1}))},withAttributes:function(i){return t(this.converter,e({},this.attributes,i))},withConverter:function(i){return t(e({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}return t({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()}},function(e){e.O(0,[114],function(){return t=49594,e(e.s=t);var t});e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.