PageSourceSearch

https://www.sqlbi.com/wp-content/plugins/sqlbi-helpers/assets/js/cookiehelper.min.js?ver=1.8.3

js sqlbi.com collected 2026-10-02 02:25:47 UTC 7,148 bytes, 6 lines download raw bytes

1/*!
2 * Cookie Helper 2.2.3
3 * Copyright (c) SQLBI. All rights reserved.
4 * https://www.sqlbi.com/	
5*/
6class CookieHelper{cookieBar;allowOnFile;explicitConsent;prefCookieName;necessaryCookies;dependencies;privacyUrl;geoCookieName;targetEU;get cookiesAllowed(){if(this.allowOnFile&&"file:"==window.location.protocol)return"all";let e=this.getCookie(this.prefCookieName)??0;return this.targetEU&&2==e?"all":-1==e?"necessary":1==e?"all":"notSet"}constructor(e){this.explicitConsent=e.explicitConsent??!0,this.prefCookieName=e.prefCookieName??"_cookie_consent",this.necessaryCookies=e.necessaryCookies??[],this.dependencies=e.dependencies??[],this.privacyUrl=e.privacyUrl??"",this.allowOnFile=e.disableOnFile??!0,this.targetEU=e.targetEU??!0,this.geoCookieName=e.geoCookieName??"_country",this.necessaryCookies.push(this.geoCookieName),"complete"==document.readyState?this.load():window.addEventListener("DOMContentLoaded",(()=>this.load()))}setAllCookiesPref(){this.setCookie(this.prefCookieName,1,365)}setRequiredCookiesPref(){this.setCookie(this.prefCookieName,-1,365)}setExtraEUCookiesPref(){this.setCookie(this.prefCookieName,2,7)}load(){let e=this.cookiesAllowed;"notSet"==e?this.maybeShowCookiebar():"all"==e&&this.loadDependencies(),this.handlePrivacyLinks(),this.toggleCookieFallback()}handlePrivacyLinks(){document.querySelectorAll(".show-cookie-bar").forEach((e=>{e.addEventListener("click",(e=>{"a"==e.currentTarget.tagName&&e.preventDefault(),this.showCookieBar()}))})),document.querySelectorAll(".allow-all-cookies").forEach((e=>{e.addEventListener("click",(e=>{e.currentTarget.classList.contains("inert")&&e.preventDefault(),this.setAllCookiesPref(),this.loadDependencies(),this.hideCookieBar(),document.querySelectorAll(".cookie-pref").forEach((e=>{e.innerHTML="Allow all cookies (Necessary, Functional, Statistics, Marketing)"}))}))})),document.querySelectorAll(".allow-necessary-cookies").forEach((e=>{e.addEventListener("click",(e=>{e.currentTarget.classList.contains("inert")&&e.preventDefault(),this.deleteAllNonNecessaryCookie
6s(),this.setRequiredCookiesPref(),this.hideCookieBar(),document.querySelectorAll(".cookie-pref").forEach((e=>{e.innerHTML="Allow necessary cookies only"}))}))}))}maybeShowCookiebar(){if(Intl.DateTimeFormat().resolvedOptions().timeZone.indexOf("Europe")>=0||!this.targetEU)this.showCookieBar();else{const e=this.getCookie(this.geoCookieName);e&&this.showCookieBarIfEuropean(e)}}showCookieBarIfEuropean(e){["AT","BE","BG","CY","CZ","DE","DK","ES","EE","FI","FR","GB","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SK","SI","SE"].indexOf(e)>=0?this.showCookieBar():this.setExtraEUCookiesPref()}showCookieBar(){this.cookieBar||(this.explicitConsent||document.body.addEventListener("click",(e=>{if(this.cookieBar){let o=!1;e.target.classList.contains(".close")?(e.preventDefault(),o=!0):e.target.closest("#cookie-control")||e.target.closest("#cookie-bar")||(o=!0),o&&(this.setAllCookiesPref(),this.loadDependencies(),this.hideCookieBar())}})),this.addCookieBar())}hideCookieBar(){this.cookieBar&&this.utils.slideDown(this.cookieBar,300,(()=>{this.cookieBar.remove(),this.cookieBar=null})),this.toggleCookieFallback()}toggleCookieFallback(){const e="all"!==this.cookiesAllowed;document.querySelectorAll(".cookie-fallback").forEach((o=>{o.style.display=e?"initial":"none"}))}addCookieBar(){this.cookieBar=document.createElement("div"),this.cookieBar.id="cookie-bar",this.cookieBar.style.display="none",this.cookieBar.style.marginTop=500,this.cookieBar.insertAdjacentHTML("beforeend",`\n\t\t\t<div class="cookies-info">\n\t\t\t\t<h2>This website uses cookies</h2>\n\t\t\t\t<p>\n\t\t\t\t\tWe use cookies to personalize content and ads, to provide social media features and embedded videos, and to analyze our traffic. We also share information about your use of our site with our video and analytics partners who may combine it with other information that you have provided to them or that they have collected from your use of their services. Choose whether to allow all cookies or use necessary cookies only.\n\t\t\t\t</p>\n\t\t\t\t<div class="cookies-ctrl">\n\t\t\t\t\t<a href="${this.privacyUrl}" rel="nofollow">Cookies Policy</a><br>\n\t\t\t\t\t<a href="#" class="allow-necessary-cookies inert">Use necessary cookies only</a>\n\t\t\t\t</div>\n\t\t\t\t<a href="#" class="allow-all-cookies button inert">Allow all cookies</a>\n\t\t\t</div>\n\t\t`),document.body.append(this.cookieBar),this.utils.slideUp(this.cookieBar)}loadDependencies(){this.dependencies.forEach((e=>{try{e()}catch(e){console.error(e)}}))}addDependency(e){if(this.dependencies.push(e),"all"==this.cookiesAllowed)try{e()}catch(e){console.error(e)}}setCookie(e,o,t){let i="";if(t){let e=new Date;e.setTime(e.getTime()+24*t*60*60*1e3),i="; expires="+e.toUTCString()}return document.cookie=`${e}=${o}${i}; path=/; secure`,o}getCookie(e){let o=e+"=",t=document.cookie.split(";");for(let e=0;e<t.length;e++){let i=t[e];for(;" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(o))return i.substring(o.length,i.length)}return null}deleteCookie(e){this.setCookie(e,"",-1)}deleteAllCookies(){let e=document.cookie.split(";");for(let o=0;o<e.length;o++){let t=e[o].split("=")[0];t!=this.prefCookieName&&this.deleteCookie(t)}}
6deleteAllNonNecessaryCookies(){let e=document.cookie.split(";");for(let o=0;o<e.length;o++){let t=e[o].split("=")[0].trim(),i=!0;for(let e=0;e<this.necessaryCookies.length;e++)if(t==this.prefCookieName||t==this.necessaryCookies[e]||"*"==this.necessaryCookies[e].substr(-1,1)&&0==t.indexOf(this.necessaryCookies[e].substr(0,this.necessaryCookies[e].length-1))){i=!1;break}i&&this.deleteCookie(t)}}utils={slideDown:(e,o=300,t)=>{e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=o+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout((()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),t&&t()}),o)},slideUp:(e,o=300,t)=>{e.style.removeProperty("display");let i=window.getComputedStyle(e).display;"none"===i&&(i="block"),e.style.display=i;let s=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=o+"ms",e.style.height=s+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout((()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),t&&t()}),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.