PageSourceSearch

https://www.schwarzer-adler.at/fileadmin/sg_cookie_optin/siteroot-1/cookieOptin.js

js schwarzer-adler.at collected 2026-10-06 20:39:40 UTC 55,883 bytes, 1 lines download raw bytes

1const SgCookieOptin={COOKIE_NAME:'cookie_optin',LAST_PREFERENCES_COOKIE_NAME:'cookie_optin_last_preferences',LAST_PREFERENCES_LOCAL_STORAGE_NAME:'SgCookieOptin.lastPreferences',COOKIE_GROUP_EXTERNAL_CONTENT:'iframes',COOKIE_GROUP_ESSENTIAL:'essential',EXTERNAL_CONTENT_ELEMENT_SELECTOR:'iframe, object, video, audio, [data-external-content-protection], .frame-external-content-protection',EXTERNAL_CONTENT_ALLOWED_ELEMENT_SELECTOR:'[data-external-content-no-protection], [data-iframe-allow-always], .frame-external-content-no-protection',externalContentObserver:null,protectedExternalContents:[],lastOpenedExternalContentId:0,jsonData:{},isExternalGroupAccepted:!1,fingerprintIcon:null,run:function(){SgCookieOptin.closestPolyfill();SgCookieOptin.customEventPolyfill();SgCookieOptin.jsonData=JSON.parse(document.getElementById('cookieOptinData').innerHTML);if(SgCookieOptin.jsonData){SgCookieOptin.setCookieNameBasedOnLanguage();document.addEventListener('DOMContentLoaded',function(){SgCookieOptin.initialize()});SgCookieOptin.isExternalGroupAccepted=SgCookieOptin.checkIsExternalGroupAccepted();SgCookieOptin.checkForExternalContents();if(SgCookieOptin.jsonData.settings.iframe_enabled&&SgCookieOptin.isExternalGroupAccepted){document.addEventListener('DOMContentLoaded',function(){SgCookieOptin.checkForDataAttributeExternalContents()})}}},initialize:function(){SgCookieOptin.handleScriptActivations();const optInContentElements=document.querySelectorAll('.sg-cookie-optin-plugin-uninitialized');for(let index=0;index<optInContentElements.length;++index){const optInContentElement=optInContentElements[index];SgCookieOptin.openCookieOptin(optInContentElement,{hideBanner:!0});optInContentElement.classList.remove('sg-cookie-optin-plugin-uninitialized');optInContentElement.classList.add('sg-cookie-optin-plugin-initialized')};const disableOptIn=SgCookieOptin.getParameterByName('disableOptIn')==!0;if(disableOptIn){return};const showOptIn=SgCookieOptin.getParameterByName('showOptIn')==!0;const cookieValue=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME);if(showOptIn||!SgCookieOptin.jsonData.settings.activate_testing_mode&&(SgCookieOptin.shouldShowBannerBasedOnLastPreferences(cookieValue))){SgCookieOptin.openCookieOptin(null,{hideBanner:!1})}else{SgCookieOptin.showFingerprint()}},setCookieNameBasedOnLanguage:function(){if(!SgCookieOptin.jsonData.settings.unified_cookie_name){SgCookieOptin.COOKIE_NAME+='_'+SgCookieOptin.jsonData.settings.identifier+'_'+SgCookieOptin.jsonData.settings.language;SgCookieOptin.LAST_PREFERENCES_COOKIE_NAME+='_'+SgCookieOptin.jsonData.settings.identifier+'_'+SgCookieOptin.jsonData.settings.language}},checkIsExternalGroupAccepted:function(){return SgCookieOptin.checkIsGroupAccepted(SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT)},checkIsGroupAccepted:function(e,t){if(typeof t==='undefined'){t=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME)};if(t){const splitedCookieValue=t.split('|');for(const splitedCookieValueIndex in splitedCookieValue){if(!splitedCookieValue.hasOwnProperty(splitedCookieValueIndex)){continue};const splitedCookieValueEntry=splitedCookieValue[splitedCookieValueIndex];const groupAndStatus=splitedCookieValueEntry.split(':');if(!groupAndStatus.hasOwnProperty(0)||!groupAndStatus.hasOwnProperty(1)){continue};const group=groupAndStatus[0];const status=parseInt(groupAndStatus[1]);if(group===e){if(status===1){return!0};break}}};return!1},readCookieValues:function(e){if(typeof e==='undefined'){e=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME)};const cookieValues=[];if(e){const splitedCookieValue=e.split('|');for(const splitedCookieValueIndex in splitedCookieValue){if(!splitedCookieValue.hasOwnProperty(splitedCookieValueIndex)){continue};const splitedCookieValueEntry=splitedCookieValue[splitedCookieValueIndex];const groupAndStatus=splitedCookieValueEntry.split(':');if(!groupAndStatus.hasOwnProperty(0)||!groupAndStatus.hasOwnProperty(1)){continue};const group=groupAndStatus[0];cookieValues[group]=parseInt(groupAndStatus[1])}};return cookieValues},handleScriptActivations:function(){const cookieValue=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME);if(!cookieValue){return};const splitedCookieValue=cookieValue.split('|');for(const splitedCookieValueIndex in splitedCookieValue){if(!splitedCookieValue.hasOwnProperty(splitedCookieValueIndex)){continue};const splitedCookieValueEntry=splitedCookieValue[splitedCookieValueIndex];const groupAndStatus=splitedCookieValueEntry.split(':');if(!groupAndStatus.hasOwnProperty(0)||!groupAndStatus.hasOwnProperty(1)){continue};const group=groupAndStatus[0];const status=parseInt(groupAndStatus[1]);if(!status){continue};for(const groupIndex in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(groupIndex)||SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName!==group){continue};if(SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingHTML&&SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingHTML!==''){const head=document.getElementsByTagName('head')[0];if(head){const range=document.createRange();range.selectNode(head);head.appendChild(range.createContextualFragment(SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingHTML));const addedLoadingHTMLEvent=new CustomEvent('addedLoadingHTML',{bubbles:!0,detail:{src:SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingHTML}});head.dispatchEvent(addedLoadingHTMLEvent)}};if(SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingJavaScript&&SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingJavaScript!==''){const script=document.createElement('script');script.setAttribute('src',SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingJavaScript);script.setAttribute('type','text/javascript');document.body.appendChild(script);
1const addedLoadingScriptEvent=new CustomEvent('addedLoadingScript',{bubbles:!0,detail:{src:SgCookieOptin.jsonData.cookieGroups[groupIndex].loadingJavaScript}});script.dispatchEvent(addedLoadingScriptEvent)}}}},openCookieOptin:function(e,t){if(!SgCookieOptin.shouldShowOptinBanner()){return};SgCookieOptin.hideFingerprint();const hideBanner=typeof t=='object'&&t.hideBanner===!0;const fromBanner=typeof t=='object'&&t.fromBanner===!0;const wrapper=document.createElement('DIV');wrapper.setAttribute('data-nosnippet','');wrapper.id='SgCookieOptin';let forceBanner;if(SgCookieOptin.jsonData.settings.banner_force_min_width&&parseInt(SgCookieOptin.jsonData.settings.banner_force_min_width)>0){forceBanner=window.matchMedia('(max-width: '+parseInt(SgCookieOptin.jsonData.settings.banner_force_min_width)+'px)').matches}else{forceBanner=!1};if(!fromBanner&&!hideBanner&&((!e&&SgCookieOptin.jsonData.settings.banner_enable&&!hideBanner)||forceBanner)){wrapper.classList.add('sg-cookie-optin-banner-wrapper');wrapper.insertAdjacentHTML('afterbegin',SgCookieOptin.jsonData.mustacheData.banner.markup)}else{wrapper.insertAdjacentHTML('afterbegin',SgCookieOptin.jsonData.mustacheData.template.markup)};SgCookieOptin.insertUserUuid(wrapper);SgCookieOptin.addListeners(wrapper,e);if(!e){document.body.insertAdjacentElement('beforeend',wrapper)}else{e.appendChild(wrapper)};setTimeout(function(){SgCookieOptin.adjustDescriptionHeight(wrapper,e);SgCookieOptin.updateCookieList();const cookieOptinShownEvent=new CustomEvent('cookieOptinShown',{bubbles:!0,detail:{}});document.body.dispatchEvent(cookieOptinShownEvent);if(document.getElementsByClassName('sg-cookie-optin-plugin-initialized').length>0){return};const checkboxes=document.getElementsByClassName('sg-cookie-optin-checkbox');if(checkboxes.length>1){if(checkboxes[1].focus){checkboxes[1].focus()}}},10)},shouldShowOptinBanner:function(){if(typeof SgCookieOptin.jsonData.settings.consider_do_not_track!=='undefined'&&SgCookieOptin.jsonData.settings.consider_do_not_track&&typeof navigator.doNotTrack!=='undefined'&&navigator.doNotTrack==='1'){console.log('Cookie Consent: DoNotTrack detected - Auto-OptOut');return!1};if(document.getElementsByClassName('sg-cookie-optin-plugin-initialized').length>0){return!1};if(typeof SgCookieOptin.jsonData.settings.cookiebanner_whitelist_regex!=='undefined'&&SgCookieOptin.jsonData.settings.cookiebanner_whitelist_regex.trim()!==''){const regularExpressions=SgCookieOptin.jsonData.settings.cookiebanner_whitelist_regex.trim().split(/\r?\n/).map(function(e){return new RegExp(e)});if(typeof regularExpressions==='object'&&regularExpressions.length>0){for(const regExIndex in regularExpressions){if(regularExpressions[regExIndex].test(window.location)){return!1}}}};return!0},adjustDescriptionHeight:function(e,t){let index;let columnsPerRow=4;if(t===null){if(window.innerWidth<=750){return}else if(window.innerWidth<=1050){columnsPerRow=2}else if(window.innerWidth<=1250){columnsPerRow=3}}else{columnsPerRow=2};const maxHeightPerRow=[];let maxHeightPerRowIndex=0;const descriptions=e.querySelectorAll('.sg-cookie-optin-box-new .sg-cookie-optin-checkbox-description');for(index=0;index<descriptions.length;++index){if(!(index%columnsPerRow)){++maxHeightPerRowIndex};const descriptionHeight=descriptions[index].getBoundingClientRect().height;const maxHeight=(maxHeightPerRow[maxHeightPerRowIndex]?maxHeightPerRow[maxHeightPerRowIndex]:0);if(descriptionHeight>maxHeight){maxHeightPerRow[maxHeightPerRowIndex]=descriptionHeight}};maxHeightPerRowIndex=0;for(index=0;index<descriptions.length;++index){if(!(index%columnsPerRow)){++maxHeightPerRowIndex};descriptions[index].style.height=maxHeightPerRow[maxHeightPerRowIndex]+'px'}},adjustReasonHeight:function(e,t){let columnsPerRow=3;if(t===null){if(window.innerWidth<=750){return}else if(window.innerWidth<=1050){columnsPerRow=2}}else{columnsPerRow=2};const listItems=e.querySelectorAll('.sg-cookie-optin-box-new .sg-cookie-optin-box-cookie-list-item');for(let listItemIndex=0;listItemIndex<listItems.length;++listItemIndex){let index;const maxHeightPerRow=[];let maxHeightPerRowIndex=0;const reasons=listItems[listItemIndex].querySelectorAll('.sg-cookie-optin-box-table-reason');for(index=0;index<reasons.length;
1++index){if(!(index%columnsPerRow)){++maxHeightPerRowIndex};let reasonHeight=reasons[index].getBoundingClientRect().height;reasonHeight-=parseInt(window.getComputedStyle(reasons[index],null).getPropertyValue('padding-top'));reasonHeight-=parseInt(window.getComputedStyle(reasons[index],null).getPropertyValue('padding-bottom'));const maxHeight=(maxHeightPerRow[maxHeightPerRowIndex]?maxHeightPerRow[maxHeightPerRowIndex]:0);if(reasonHeight>maxHeight){maxHeightPerRow[maxHeightPerRowIndex]=reasonHeight}};maxHeightPerRowIndex=0;for(index=0;index<reasons.length;++index){if(!(index%columnsPerRow)){++maxHeightPerRowIndex};reasons[index].style.height=maxHeightPerRow[maxHeightPerRowIndex]+'px'}}},shouldShowBannerBasedOnLastPreferences:function(e){if(!e){return!0};const lastPreferences=SgCookieOptin.getLastPreferences();if(typeof lastPreferences.timestamp==='undefined'){return!0};if(lastPreferences.version!==SgCookieOptin.jsonData.settings.version){return!0};for(const groupIndex in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(groupIndex)){continue};if(typeof SgCookieOptin.jsonData.cookieGroups[groupIndex].crdate!=='undefined'&&SgCookieOptin.jsonData.cookieGroups[groupIndex].crdate>lastPreferences.timestamp){return!0};let cookieIndex;for(cookieIndex in SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData){if(!SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData.hasOwnProperty(cookieIndex)){continue};if(typeof SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData[cookieIndex].crdate!=='undefined'&&SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData[cookieIndex].crdate>lastPreferences.timestamp){return!0}};if(!lastPreferences.isAll&&typeof SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName!=='undefined'&&!SgCookieOptin.checkIsGroupAccepted(SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName,lastPreferences.cookieValue)&&(new Date().getTime()/1000)>(lastPreferences.timestamp+24*60*60*SgCookieOptin.jsonData.settings.banner_show_again_interval)){return!0}};return!1},getUserUuid:function(e){const lastPreferences=SgCookieOptin.getLastPreferences();let userUuid=lastPreferences.uuid;if(e&&!userUuid&&!SgCookieOptin.jsonData.settings.disable_usage_statistics){userUuid=SgCookieOptin.generateUUID();lastPreferences.uuid=userUuid;window.localStorage.setItem(SgCookieOptin.LAST_PREFERENCES_LOCAL_STORAGE_NAME,JSON.stringify(lastPreferences))};return userUuid},insertUserUuid:function(e){const hashContainer=e.querySelector('.sg-cookie-optin-box-footer-user-hash');const hashContainerParent=e.querySelector('.sg-cookie-optin-box-footer-user-hash-container');if(!hashContainer||!hashContainerParent){return};if(SgCookieOptin.jsonData.settings.disable_usage_statistics){hashContainerParent.style.display='none';return};const uuid=SgCookieOptin.getUserUuid(!1);if(typeof hashContainer.innerText==='string'){if(uuid){hashContainer.innerText=uuid}else{hashContainerParent.style.display='none'}}},saveLastPreferences:function(e){let isAll=!0;for(let groupIndex in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(groupIndex)){continue};if(!SgCookieOptin.checkIsGroupAccepted(SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName)){isAll=!1}};const lastPreferences=SgCookieOptin.getLastPreferences();lastPreferences.timestamp=Math.floor(new Date().getTime()/1000);lastPreferences.cookieValue=e;lastPreferences.isAll=isAll;lastPreferences.version=SgCookieOptin.jsonData.settings.version;lastPreferences.identifier=SgCookieOptin.jsonData.settings.identifier;if(SgCookieOptin.lastPreferencesFromCookie()){SgCookieOptin.setCookie(SgCookieOptin.LAST_PREFERENCES_COOKIE_NAME,JSON.stringify(lastPreferences),'365')}else{window.localStorage.setItem(SgCookieOptin.LAST_PREFERENCES_LOCAL_STORAGE_NAME,JSON.stringify(lastPreferences))};SgCookieOptin.saveLastPreferencesForStats(lastPreferences)},lastPreferencesFromCookie:function(){return(SgCookieOptin.jsonData.settings.subdomain_support||SgCookieOptin.jsonData.settings.set_cookie_for_domain)},saveLastPreferencesForStats:function(e){if(SgCookieOptin.jsonData.settings.disable_usage_statistics){return};e.uuid=SgCookieOptin.getUserUuid(!0);const request=new XMLHttpRequest();const formData=new FormData();formData.append('lastPreferences',JSON.stringify(e));const url=SgCookieOptin.jsonData.settings.save_history_webhook;if(!url){return};request.open('POST',url);request.send(formData)},generateUUID:function(){let d=new Date().getTime();let d2=(performance&&performance.now&&(performance.now()*1000))||0;return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(e){let r=Math.random()*16;if(d>0){r=(d+r)%16|0;d=Math.floor(d/16)}else{r=(d2+r)%16|0;d2=Math.floor(d2/16)};return(e==='x'?r:(r&0x3|0x8)).toString(16)})},deleteCookiesForUnsetGroups:function(){for(const groupIndex in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(groupIndex)){continue};const documentCookies=document.cookie.split('; ');if(!SgCookieOptin.checkIsGroupAccepted(SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName)){for(const cookieIndex in SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData){if(isNaN(parseInt(cookieIndex))){continue};for(const documentCookieIndex in documentCookies){if(isNaN(parseInt(documentCookieIndex))){continue};const cookieName=documentCookies[documentCookieIndex].split('=')[0];const regExString=SgCookieOptin.jsonData.cookieGroups[groupIndex].cookieData[cookieIndex].Name.trim();if(!regExString){continue};const regEx=new RegExp(regExString);if(regEx.test(cookieName)){SgCookieOptin.deleteGroupCookie(cookieName)}}}}}},deleteGroupCookie:function(e){let cookie=e+'=; path=/; Max-Age=-99999999;';document.cookie=cookie;const currentHost=window.location.hostname;if(SgCookieOptin.jsonData.settings.set_cookie_for_domain&&SgCookieOptin.jsonData.settings.set_cookie_for_domain.length>0){cookie+=';domain='+SgCookieOptin.jsonData.settings.set_cookie_for_domain}else if(SgCookieOptin.jsonData.settings.subdomain_support){const domainParts=currentHost.split('.');if(domainParts.length>2){domainParts.shift();const hostnameToFirstDot='.'+domainParts.join('.');cookie+=';domain='+hostnameToFirstDot}};document.cookie=cookie;const additionalDomains=SgCookieOptin.jsonData.settings.domains_to_delete_cookies_for.trim().split(/\r?\n/).map(function(e){return e.trim()});
1for(const additionalDomainIndex in additionalDomains){if(!additionalDomains.hasOwnProperty(additionalDomainIndex)){continue};document.cookie=e+'=; path=/; domain='+additionalDomains[additionalDomainIndex]+'; Max-Age=-99999999;'}},addListeners:function(e,t){const closeButtons=e.querySelectorAll('.sg-cookie-optin-box-close-button');SgCookieOptin.addEventListenerToList(closeButtons,'click',function(){SgCookieOptin.acceptEssentialCookies();SgCookieOptin.updateCookieList();SgCookieOptin.handleScriptActivations();if(!t){SgCookieOptin.hideCookieOptIn()}});const openMoreLinks=e.querySelectorAll('.sg-cookie-optin-box-open-more-link');SgCookieOptin.addEventListenerToList(openMoreLinks,'click',SgCookieOptin.openCookieDetails);const openSubListLink=e.querySelectorAll('.sg-cookie-optin-box-sublist-open-more-link');SgCookieOptin.addEventListenerToList(openSubListLink,'click',function(e){SgCookieOptin.openSubList(e,t)});const acceptAllButtons=e.querySelectorAll('.sg-cookie-optin-box-button-accept-all, .sg-cookie-optin-banner-button-accept');SgCookieOptin.addEventListenerToList(acceptAllButtons,'click',function(){SgCookieOptin.acceptAllCookies();SgCookieOptin.updateCookieList();SgCookieOptin.handleScriptActivations();if(!t){SgCookieOptin.hideCookieOptIn()}else{SgCookieOptin.showSaveConfirmation(t)}});const acceptSpecificButtons=e.querySelectorAll('.sg-cookie-optin-box-button-accept-specific');SgCookieOptin.addEventListenerToList(acceptSpecificButtons,'click',function(){SgCookieOptin.acceptSpecificCookies(this);SgCookieOptin.updateCookieList(this);SgCookieOptin.handleScriptActivations();if(!t){SgCookieOptin.hideCookieOptIn()}else{SgCookieOptin.showSaveConfirmation(t)}});const acceptEssentialButtons=e.querySelectorAll('.sg-cookie-optin-box-button-accept-essential');SgCookieOptin.addEventListenerToList(acceptEssentialButtons,'click',function(){SgCookieOptin.acceptEssentialCookies();SgCookieOptin.updateCookieList();SgCookieOptin.handleScriptActivations();if(!t){SgCookieOptin.hideCookieOptIn()}else{SgCookieOptin.showSaveConfirmation(t)}});const openSettingsButtons=e.querySelectorAll('.sg-cookie-optin-banner-button-settings');SgCookieOptin.addEventListenerToList(openSettingsButtons,'click',function(){SgCookieOptin.hideCookieOptIn();SgCookieOptin.openCookieOptin(null,{hideBanner:!0,fromBanner:!0})})},addEventListenerToList:function(e,t,n){for(let index=0;index<e.length;++index){e[index].addEventListener(t,n,!1)}},hideCookieOptIn:function(){const optins=document.querySelectorAll('#SgCookieOptin');for(const index in optins){if(!optins.hasOwnProperty(index)){continue};const optin=optins[index];const parentNode=optin.parentNode;if(!parentNode||parentNode.classList.contains('sg-cookie-optin-plugin')){continue};parentNode.removeChild(optin);const cookieOptinHiddenEvent=new CustomEvent('cookieOptinHidden',{bubbles:!0,detail:{}});parentNode.dispatchEvent(cookieOptinHiddenEvent)};SgCookieOptin.showFingerprint()},updateCookieList:function(e){let checkBoxesContainer;const statusMap={};const cookieValue=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME);if(cookieValue){const splitedCookieValue=cookieValue.split('|');for(const valueIndex in splitedCookieValue){if(!splitedCookieValue.hasOwnProperty(valueIndex)){continue};const splitedCookieValueEntry=splitedCookieValue[valueIndex];const groupAndStatus=splitedCookieValueEntry.split(':');if(!groupAndStatus.hasOwnProperty(0)||!groupAndStatus.hasOwnProperty(1)){continue};statusMap[groupAndStatus[0]]=parseInt(groupAndStatus[1])}};for(const groupIndex in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(groupIndex)){continue};const groupName=SgCookieOptin.jsonData.cookieGroups[groupIndex].groupName;if(!groupName){continue};if(!statusMap.hasOwnProperty(groupName)){continue};if(!e){checkBoxesContainer=document}else{checkBoxesContainer=e.closest('.sg-cookie-optin-box')};if(!checkBoxesContainer){checkBoxesContainer=document};const cookieList=checkBoxesContainer.querySelectorAll('.sg-cookie-optin-checkbox[value="'+groupName+'"]');for(let index=0;index<cookieList.length;
1++index){cookieList[index].checked=(statusMap[groupName]===1)}}},openCookieDetails:function(e){e.preventDefault();const openMoreElement=e.target.parentNode;if(!openMoreElement){return};const cookieDetailList=openMoreElement.previousElementSibling;if(!cookieDetailList){return};if(cookieDetailList.classList.contains('sg-cookie-optin-visible')){cookieDetailList.classList.remove('sg-cookie-optin-visible');e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_box_link_text}else{cookieDetailList.classList.add('sg-cookie-optin-visible');e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_box_link_text_close}},openSubList:function(e,t){e.preventDefault();let height=0;const cookieSubList=e.target.previousElementSibling;if(!cookieSubList||!cookieSubList.classList.contains('sg-cookie-optin-box-cookie-detail-sublist')){const cookieOptin=e.target.closest('#SgCookieOptin');const cookieBoxes=cookieOptin.querySelectorAll('.sg-cookie-optin-box-new');for(const index in cookieBoxes){if(!cookieBoxes.hasOwnProperty(index)){continue};let visible=!0;const cookieBox=cookieBoxes[index];if(cookieBox.classList.contains('sg-cookie-optin-visible')){visible=!1;cookieBox.classList.remove('sg-cookie-optin-visible');cookieBox.classList.add('sg-cookie-optin-invisible');e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_table_link_text}else{cookieBox.classList.remove('sg-cookie-optin-invisible');cookieBox.classList.add('sg-cookie-optin-visible');SgCookieOptin.adjustReasonHeight(cookieOptin,t);e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_table_link_text_close};const descriptions=cookieBox.querySelectorAll('.sg-cookie-optin-checkbox-description');for(const descriptionIndex in descriptions){if(!descriptions.hasOwnProperty(descriptionIndex)){continue};const description=descriptions[descriptionIndex];if(visible){description.setAttribute('data-optimal-height',description.style.height);description.style.height='auto'}else{description.style.height=description.getAttribute('data-optimal-height')}}}}else{if(cookieSubList.classList.contains('sg-cookie-optin-visible')){cookieSubList.classList.remove('sg-cookie-optin-visible');cookieSubList.style.height='';e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_table_link_text}else{cookieSubList.classList.add('sg-cookie-optin-visible');cookieSubList.style.height='auto';height=cookieSubList.getBoundingClientRect().height+'px';cookieSubList.style.height='';requestAnimationFrame(function(){setTimeout(function(){cookieSubList.style.height=height},10)});e.target.innerHTML=SgCookieOptin.jsonData.textEntries.extend_table_link_text_close}}},acceptAllCookies:function(){let cookieData='';for(const index in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(index)){continue};const groupName=SgCookieOptin.jsonData.cookieGroups[index].groupName;if(!groupName){continue};if(cookieData.length>0){cookieData+='|'};cookieData+=groupName+':'+1;if(groupName===SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT){SgCookieOptin.acceptAllExternalContents()}};SgCookieOptin.setCookieWrapper(cookieData)},acceptSpecificCookies:function(e){let externalContentGroupFoundAndActive=!1;let cookieData='';let checkBoxesContainer;if(!e){checkBoxesContainer=document}else{checkBoxesContainer=e.closest('.sg-cookie-optin-box')};const checkboxes=checkBoxesContainer.querySelectorAll('.sg-cookie-optin-checkbox:checked');for(const index in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(index)){continue};const groupName=SgCookieOptin.jsonData.cookieGroups[index].groupName;if(!groupName){continue};let status=0;for(let subIndex=0;subIndex<checkboxes.length;++subIndex){if(checkboxes[subIndex].value===groupName){status=1;break}};if(groupName===SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT&&status===1){externalContentGroupFoundAndActive=!0};if(cookieData.length>0){cookieData+='|'};cookieData+=groupName+':'+status};SgCookieOptin.setCookieWrapper(cookieData);if(SgCookieOptin.jsonData.settings.iframe_enabled){if(externalContentGroupFoundAndActive){SgCookieOptin.acceptAllExternalContents()}
1else{SgCookieOptin.checkForExternalContents()}}},acceptEssentialCookies:function(){let cookieData='';for(const index in SgCookieOptin.jsonData.cookieGroups){if(!SgCookieOptin.jsonData.cookieGroups.hasOwnProperty(index)){continue};const groupName=SgCookieOptin.jsonData.cookieGroups[index].groupName;if(!groupName){continue};let status=0;if(SgCookieOptin.jsonData.cookieGroups[index].required){status=1};if(cookieData.length>0){cookieData+='|'};cookieData+=groupName+':'+status};SgCookieOptin.setCookieWrapper(cookieData)},checkForExternalContents:function(){if(!SgCookieOptin.jsonData.settings.iframe_enabled){return};const showOptIn=SgCookieOptin.getParameterByName('showOptIn')==!0;if(SgCookieOptin.jsonData.settings.activate_testing_mode&&!showOptIn){return};if(SgCookieOptin.isExternalGroupAccepted){return};if(!SgCookieOptin.externalContentObserver){const externalContents=document.querySelectorAll(SgCookieOptin.EXTERNAL_CONTENT_ELEMENT_SELECTOR);if(externalContents.length>0){for(const externalContentIndex in externalContents){if(!externalContents.hasOwnProperty(externalContentIndex)){continue};SgCookieOptin.replaceExternalContentWithConsent(externalContents[externalContentIndex])}}};SgCookieOptin.externalContentObserver=new MutationObserver(function(e){for(const index in e){if(!e.hasOwnProperty(index)){continue};const mutation=e[index];if(mutation.type!=='childList'||mutation.addedNodes.length<=0){continue};for(const addedNodeIndex in mutation.addedNodes){if(!mutation.addedNodes.hasOwnProperty(addedNodeIndex)){continue};const addedNode=mutation.addedNodes[addedNodeIndex];if(typeof addedNode.matches==='function'&&addedNode.matches(SgCookieOptin.EXTERNAL_CONTENT_ELEMENT_SELECTOR)){SgCookieOptin.replaceExternalContentWithConsent(addedNode)}else if(addedNode.querySelectorAll&&typeof addedNode.querySelectorAll==='function'){const externalContents=addedNode.querySelectorAll(SgCookieOptin.EXTERNAL_CONTENT_ELEMENT_SELECTOR);if(externalContents.length>0){for(const externalContentIndex in externalContents){if(!externalContents.hasOwnProperty(externalContentIndex)){continue};SgCookieOptin.replaceExternalContentWithConsent(externalContents[externalContentIndex])}}}}}});SgCookieOptin.externalContentObserver.observe(document,{subtree:!0,childList:!0})},isContentWhiteListed:function(e){const regularExpressions=SgCookieOptin.jsonData.mustacheData.iframeWhitelist.markup.trim().split(/\r?\n/).map(function(e){return new RegExp(e)});if(typeof regularExpressions==='object'&&regularExpressions.length<1){return!1};switch(e.tagName){case'IFRAME':return SgCookieOptin.matchRegexElementSource(e,'src',regularExpressions,!0);case'OBJECT':return SgCookieOptin.matchRegexElementSource(e,'data',regularExpressions,!0);case'VIDEO':case'AUDIO':return SgCookieOptin.matchRegexAudioVideo(e,regularExpressions,!0);default:return!1}},matchRegexElementSource:function(e,t,n,o){if(typeof e.getAttribute!=='function'){return!1};if(o&&SgCookieOptin.isUrlLocal(e.dataset.contentReplaceSrc||e.getAttribute(t))){return!0};for(const regExIndex in n){if(typeof e.getAttribute==='function'&&n[regExIndex].test(e.getAttribute(t))){return!0}};return!1},matchRegexAudioVideo:function(e,t,n){if(e.hasAttribute('src')){return SgCookieOptin.matchRegexElementSource(e,'src',t,n)};const sources=e.querySelectorAll('source');let foundMatches=!1;for(const sourceIndex in sources){if(!sources.hasOwnProperty(sourceIndex)){continue};if(!sources[sourceIndex].getAttribute('src')){continue};if(!SgCookieOptin.matchRegexElementSource(sources[sourceIndex],'src',t,n)){foundMatches=!0}};return!foundMatches},isElementInAllowedNode:function(e){const potentialParents=document.querySelectorAll(SgCookieOptin.EXTERNAL_CONTENT_ALLOWED_ELEMENT_SELECTOR);for(let i in potentialParents){if(typeof potentialParents[i].contains==='function'&&potentialParents[i].contains(e)){return!0}};return!1},isUrlLocal:function(e){const tempA=document.createElement('a');tempA.setAttribute('href',e);return window.location.protocol===tempA.protocol&&window.location.host===tempA.host},replaceExternalContentWithConsent:function(e){if(e.matches(SgCookieOptin.EXTERNAL_CONTENT_ALLOWED_ELEMENT_SELECTOR)||SgCookieOptin.isElementInAllowedNode(e)||SgCookieOptin.isContentWhiteListed(e)){return};const parent=e.parentElement;
1if(!parent){return};const src=e.dataset.contentReplaceSrc||e.src;if(e.tagName==='IFRAME'&&(!src||e.src.indexOf('chrome-extension')>=0)){return};let positionIndex=0;let child=e;while((child=child.previousSibling)!=null){positionIndex++};e.setAttribute('data-iframe-position-index',positionIndex.toString());let externalContentId=SgCookieOptin.protectedExternalContents.length+1;if(externalContentId===0){externalContentId=1};SgCookieOptin.protectedExternalContents[externalContentId]=e;const container=document.createElement('DIV');container.setAttribute('data-iframe-id',externalContentId.toString());container.setAttribute('data-content-replace-src',src);container.setAttribute('style','height: '+e.offsetHeight+'px;');container.classList.add('sg-cookie-optin-iframe-consent');SgCookieOptin.insertExternalContentReplacementHTML(e,container);const externalContentConsentAccept=container.querySelectorAll('.sg-cookie-optin-iframe-consent-accept');SgCookieOptin.addEventListenerToList(externalContentConsentAccept,'click',function(){SgCookieOptin.acceptExternalContent(externalContentId)});if(e.getAttribute('data-consent-button-text')){for(let acceptButtonIndex=0;acceptButtonIndex<externalContentConsentAccept.length;++acceptButtonIndex){externalContentConsentAccept[acceptButtonIndex].innerText=e.getAttribute('data-consent-button-text')}};SgCookieOptin.setExternalContentDescriptionText(container,e);const externalContentConsentLink=container.querySelectorAll('.sg-cookie-optin-iframe-consent-link');SgCookieOptin.addEventListenerToList(externalContentConsentLink,'click',SgCookieOptin.openExternalContentConsent);if(parent.childNodes.length>0){parent.insertBefore(container,parent.childNodes[positionIndex])}else{parent.appendChild(container)};e.addEventListener('externalContentAccepted',function(){SgCookieOptin.acceptContainerChildNodes(e);return!0});parent.removeChild(e);const externalContentReplacedEvent=new CustomEvent('externalContentReplaced',{bubbles:!0,detail:{positionIndex:positionIndex,parent:parent,externalContent:e,container:container}});container.dispatchEvent(externalContentReplacedEvent)},insertExternalContentReplacementHTML:function(e,t){let serviceUsed=!1;let service=null;if(typeof e.dataset.sgCookieOptinService!=='undefined'){service=SgCookieOptin.jsonData.mustacheData.services[e.dataset.sgCookieOptinService];if(service){serviceUsed=!0;SgCookieOptin.emitBeforeExternalContentReplacedEvent(parent,e,t,service);t.insertAdjacentHTML('afterbegin',service.rendered)}else{console.log('Sg Cookie Optin: Template '+e.dataset.sgCookieOptinReplacementTemplate+' not found!')}}else{if(typeof SgCookieOptin.jsonData.mustacheData.services!=='undefined'){for(const serviceIndex in SgCookieOptin.jsonData.mustacheData.services){if(!SgCookieOptin.jsonData.mustacheData.services.hasOwnProperty(serviceIndex)){continue};if(SgCookieOptin.jsonData.mustacheData.services[serviceIndex].regex.trim()===''){continue};const regularExpressions=SgCookieOptin.jsonData.mustacheData.services[serviceIndex].regex.trim().split(/\r?\n/).map(function(e){return new RegExp(e)});let serviceMatched=!1;if(typeof regularExpressions==='object'&&regularExpressions.length>0){switch(e.tagName){case'IFRAME':serviceMatched=SgCookieOptin.matchRegexElementSource(e,'src',regularExpressions,!1);break;case'OBJECT':serviceMatched=SgCookieOptin.matchRegexElementSource(e,'data',regularExpressions,!1);break;case'VIDEO':case'AUDIO':serviceMatched=SgCookieOptin.matchRegexAudioVideo(e,regularExpressions,!1);break}};if(serviceMatched){serviceUsed=!0;service=SgCookieOptin.jsonData.mustacheData.services[serviceIndex];SgCookieOptin.emitBeforeExternalContentReplacedEvent(parent,e,t,service);t.insertAdjacentHTML('afterbegin',service.rendered);break}}}};if(!serviceUsed){SgCookieOptin.emitBeforeExternalContentReplacedEvent(parent,e,t,service);t.insertAdjacentHTML('afterbegin',SgCookieOptin.jsonData.mustacheData.iframeReplacement.markup)};let backgroundImage;if(typeof e.dataset.sgCookieOptinBackgroundImage!=='undefined'){backgroundImage=e.dataset.sgCookieOptinBackgroundImage}else if(service&&service.replacement_background_image!==''){backgroundImage=service.replacement_background_image}else if(typeof SgCookieOptin.jsonData.settings.iframe_replacement_background_image!=='undefined'&&SgCookieOptin.jsonData.settings.iframe_replacement_background_image!==''){backgroundImage=SgCookieOptin.jsonData.settings.iframe_replacement_background_image};
1if(backgroundImage){t.style.backgroundImage='url('+backgroundImage+')';t.style.backgroundSize='cover'}},emitBeforeExternalContentReplacedEvent:function(e,t,n,o){const beforeExternalContentReplaced=new CustomEvent('beforeExternalContentReplaced',{bubbles:!0,detail:{parent:e,externalContent:t,container:n,service:o}});document.dispatchEvent(beforeExternalContentReplaced)},setExternalContentDescriptionText:function(e,t){const flashMessageContainer=e.querySelector('.sg-cookie-optin-box-flash-message');if(flashMessageContainer!==null){let flashMessageText=t.getAttribute('data-consent-description');if(!flashMessageText){flashMessageText=SgCookieOptin.jsonData.textEntries.iframe_button_load_one_description};if(flashMessageText){flashMessageContainer.appendChild(document.createTextNode(flashMessageText))}else{flashMessageContainer.remove()}}},openExternalContentConsent:function(){const parent=this.parentElement;if(!parent){return};const externalContentId=parent.getAttribute('data-iframe-id');if(!externalContentId){return};SgCookieOptin.lastOpenedExternalContentId=externalContentId;const externalContent=SgCookieOptin.protectedExternalContents[externalContentId];if(!externalContent){return};const wrapper=document.createElement('DIV');wrapper.id='SgCookieOptin';wrapper.insertAdjacentHTML('afterbegin',SgCookieOptin.jsonData.mustacheData.iframe.markup);SgCookieOptin.setExternalContentDescriptionText(wrapper,externalContent);SgCookieOptin.addExternalContentListeners(wrapper);document.body.insertAdjacentElement('afterbegin',wrapper);const buttons=document.getElementsByClassName('sg-cookie-optin-box-button-accept-all');if(buttons.length>0){if(buttons[0].focus){buttons[0].focus()}};const externalContentConsentDisplayedEvent=new CustomEvent('externalContentConsentDisplayed',{bubbles:!0,detail:{}});wrapper.dispatchEvent(externalContentConsentDisplayedEvent)},addExternalContentListeners:function(e){const closeButtons=e.querySelectorAll('.sg-cookie-optin-box-close-button');SgCookieOptin.addEventListenerToList(closeButtons,'click',SgCookieOptin.hideCookieOptIn);const rejectButtons=e.querySelectorAll('.sg-cookie-optin-box-button-iframe-reject');SgCookieOptin.addEventListenerToList(rejectButtons,'click',SgCookieOptin.hideCookieOptIn);const acceptAllButtons=e.querySelectorAll('.sg-cookie-optin-box-button-accept-all');SgCookieOptin.addEventListenerToList(acceptAllButtons,'click',function(){SgCookieOptin.acceptAllExternalContents();SgCookieOptin.acceptExternalConentGroup();SgCookieOptin.updateCookieList();SgCookieOptin.handleScriptActivations();SgCookieOptin.hideCookieOptIn()});const acceptSpecificButtons=e.querySelectorAll('.sg-cookie-optin-box-button-accept-specific');SgCookieOptin.addEventListenerToList(acceptSpecificButtons,'click',function(){SgCookieOptin.acceptExternalContent(SgCookieOptin.lastOpenedExternalContentId);SgCookieOptin.updateCookieList();SgCookieOptin.handleScriptActivations();SgCookieOptin.hideCookieOptIn()})},acceptAllExternalContents:function(){if(SgCookieOptin.jsonData.settings.iframe_enabled&&SgCookieOptin.externalContentObserver){SgCookieOptin.externalContentObserver.disconnect()};for(let index in SgCookieOptin.protectedExternalContents){index=parseInt(index);if(!document.querySelector('div[data-iframe-id="'+index+'"]')){continue};SgCookieOptin.acceptExternalContent(index)}},acceptExternalConentGroup:function(){const cookieValue=SgCookieOptin.getCookie(SgCookieOptin.COOKIE_NAME);let groupFound=!1;let newCookieValue='';const splitedCookieValue=cookieValue.split('|');for(const splitedCookieValueIndex in splitedCookieValue){if(!splitedCookieValue.hasOwnProperty(splitedCookieValueIndex)){continue};const splitedCookieValueEntry=splitedCookieValue[splitedCookieValueIndex];const groupAndStatus=splitedCookieValueEntry.split(':');if(!groupAndStatus.hasOwnProperty(0)||!groupAndStatus.hasOwnProperty(1)){continue};const group=groupAndStatus[0];let status=parseInt(groupAndStatus[1]);if(group===SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT){groupFound=!0;status=1};if(newCookieValue.length>0){newCookieValue+='|'};newCookieValue+=group+':'+status};if(!groupFound){newCookieValue+='|'+SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT+':'+1};if(cookieValue!==newCookieValue){SgCookieOptin.setCookieWrapper(newCookieValue)}},acceptExternalContent:function(e){if(!e){e=parent.getAttribute('data-iframe-id');if(!e){return}};const container=document.querySelector('div[data-iframe-id="'+e+'"]');const externalContent=SgCookieOptin.protectedExternalContents[e];if(!externalContent||!container){return};externalContent.setAttribute('data-iframe-allow-always',1);const positionIndex=externalContent.getAttribute('data-iframe-position-index');externalContent.removeAttribute('data-iframe-position-index');const parentNode=container.parentNode;parentNode.removeChild(container);if(parentNode.childNodes.length>0){parentNode.insertBefore(externalContent,parentNode.childNodes[positionIndex])}else{parentNode.appendChild(externalContent)};SgCookieOptin.fixExternalContentAttributes(externalContent);SgCookieOptin.emitExternalContentAcceptedEvent(externalContent)},emitExternalContentAcceptedEvent:function(e){const externalContentAcceptedEvent=new CustomEvent('externalContentAccepted',{bubbles:!0,detail:{externalContent:e}});e.dispatchEvent(externalContentAcceptedEvent)},acceptContainerChildNodes:function(e){const replacedChildren=e.querySelectorAll('[data-iframe-id]');if(replacedChildren.length>0){for(const childIndex in replacedChildren){const childElement=replacedChildren[childIndex];if(typeof childElement.getAttribute!=='function'){continue};const externalContentId=childElement.getAttribute('data-iframe-id');if(!externalContentId){continue};SgCookieOptin.acceptExternalContent(externalContentId)}}},getCookie:function(e){const v=document.cookie.match('(^|;) ?'+e+'=([^;]*)(;|$)');return v?v[2]:null},setCookie:function(e,t,n){const d=new Date;d.setTime(d.getTime()+24*60*60*1000*n);let cookie=e+'='+t+';path=/';
1const currentHost=window.location.hostname;const cookieStringEnd=';expires='+d.toUTCString()+'; SameSite=None; Secure';if(SgCookieOptin.jsonData.settings.set_cookie_for_domain&&SgCookieOptin.jsonData.settings.set_cookie_for_domain.length>0){cookie+=';domain='+SgCookieOptin.jsonData.settings.set_cookie_for_domain}else if(SgCookieOptin.jsonData.settings.subdomain_support){const domainParts=currentHost.split('.');if(domainParts.length>2){domainParts.shift();const hostnameToFirstDot='.'+domainParts.join('.');cookie+=';domain='+hostnameToFirstDot}};document.cookie=cookie+cookieStringEnd},setSessionCookie:function(e,t){let cookie=e+'='+t+'; path=/';const currentHost=window.location.hostname;const cookieStringEnd=';SameSite=None; Secure';if(SgCookieOptin.jsonData.settings.set_cookie_for_domain&&SgCookieOptin.jsonData.settings.set_cookie_for_domain.length>0){cookie+=';domain='+SgCookieOptin.jsonData.settings.set_cookie_for_domain}else if(SgCookieOptin.jsonData.settings.subdomain_support){const domainParts=currentHost.split('.');if(domainParts.length>2){domainParts.shift();const hostnameToFirstDot='.'+domainParts.join('.');cookie+=';domain='+hostnameToFirstDot}};document.cookie=cookie+cookieStringEnd},setCookieWrapper:function(e){let setCookieForSessionOnly=!1;if(SgCookieOptin.jsonData.settings.session_only_essential_cookies){let hasNonEssentialGroups=!1;let hasAcceptedNonEssentials=!1;const splitCookieValue=e.split('|');for(const cookieValueIndex in splitCookieValue){if(!splitCookieValue.hasOwnProperty(cookieValueIndex)){continue};const valueEntry=splitCookieValue[cookieValueIndex];if(valueEntry.indexOf(SgCookieOptin.COOKIE_GROUP_ESSENTIAL)===0||valueEntry.indexOf(SgCookieOptin.COOKIE_GROUP_EXTERNAL_CONTENT)===0){continue};hasNonEssentialGroups=!0;if(valueEntry.indexOf(':1')>0){hasAcceptedNonEssentials=!0;break}};setCookieForSessionOnly=hasNonEssentialGroups&&!(hasNonEssentialGroups&&hasAcceptedNonEssentials)};if(setCookieForSessionOnly){SgCookieOptin.setSessionCookie(SgCookieOptin.COOKIE_NAME,e)}else{SgCookieOptin.setCookie(SgCookieOptin.COOKIE_NAME,e,SgCookieOptin.jsonData.settings.cookie_lifetime)};SgCookieOptin.saveLastPreferences(e);SgCookieOptin.deleteCookiesForUnsetGroups();const consentCookieSetEvent=new CustomEvent('consentCookieSet',{bubbles:!0,detail:{cookieValue:e}});document.body.dispatchEvent(consentCookieSetEvent)},showSaveConfirmation:function(e){const oldNotification=e.firstChild;if(!oldNotification.classList.contains('sg-cookie-optin-save-confirmation')){const notification=document.createElement('DIV');notification.classList.add('sg-cookie-optin-save-confirmation');notification.insertAdjacentText('afterbegin',SgCookieOptin.jsonData.textEntries.save_confirmation_text);e.insertBefore(notification,e.firstChild)}},getParameterByName:function(e,t){if(!t){t=window.location.href};e=e.replace(/[\[\]]/g,'\\$&');const regex=new RegExp('[?&]'+e+'(=([^&#]*)|&|#|$)'),results=regex.exec(t);if(!results){return null};if(!results[2]){return''};return decodeURIComponent(results[2].replace(/\+/g,' '))},findProtectedElementsBySelector:function(e){const foundElements=[];for(const elementIndex in SgCookieOptin.protectedExternalContents){if(typeof SgCookieOptin.protectedExternalContents[elementIndex].matches==='function'&&SgCookieOptin.protectedExternalContents[elementIndex].matches(e)){foundElements.push(SgCookieOptin.protectedExternalContents[elementIndex])}};return foundElements},addAcceptHandlerToProtectedElements:function(e,t){if(typeof e!=='function'){throw new Error('Required argument "callback" has not been passed.')};if(!t){t='*'};const elements=SgCookieOptin.findProtectedElementsBySelector(t);if(elements.length>0){SgCookieOptin.addEventListenerToList(elements,'externalContentAccepted',e)}else{if(SgCookieOptin.isExternalGroupAccepted){SgCookieOptin.triggerAcceptedEventListenerToExternalContentElements(e,t)}}},triggerAcceptedEventListenerToExternalContentElements:function(e,t){let index;const elements=[];const externalContentElements=document.querySelectorAll(SgCookieOptin.EXTERNAL_CONTENT_ELEMENT_SELECTOR);for(index=0;index<externalContentElements.length;
1++index){if(typeof externalContentElements[index].matches==='function'&&externalContentElements[index].matches(t)){elements.push(externalContentElements[index])}};if(elements.length>0){SgCookieOptin.addEventListenerToList(elements,'externalContentAccepted',e);for(index=0;index<elements.length;++index){SgCookieOptin.emitExternalContentAcceptedEvent(elements[index])}}},closestPolyfill:function(){const ElementPrototype=window.Element.prototype;if(typeof ElementPrototype.matches!=='function'){ElementPrototype.matches=ElementPrototype.msMatchesSelector||ElementPrototype.mozMatchesSelector||ElementPrototype.webkitMatchesSelector||function(e){const element=this;const elements=(element.document||element.ownerDocument).querySelectorAll(e);let index=0;while(elements[index]&&elements[index]!==element){++index};return Boolean(elements[index])}};if(typeof ElementPrototype.closest!=='function'){ElementPrototype.closest=function(e){let element=this;while(element&&element.nodeType===1){if(element.matches(e)){return element};element=element.parentNode};return null}}},customEventPolyfill:function(){if(typeof window.CustomEvent==='function'){return!1};function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};const evt=document.createEvent('CustomEvent');evt.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);return evt};window.CustomEvent=e},getLastPreferences:function(){let lastPreferences;if(SgCookieOptin.lastPreferencesFromCookie()){lastPreferences=SgCookieOptin.getCookie(SgCookieOptin.LAST_PREFERENCES_COOKIE_NAME)}else{lastPreferences=window.localStorage.getItem(SgCookieOptin.LAST_PREFERENCES_LOCAL_STORAGE_NAME)};if(!lastPreferences){return{}};try{lastPreferences=JSON.parse(lastPreferences);return lastPreferences}catch(e){return{}}},fixExternalContentAttributes:function(e){switch(e.tagName){case'IFRAME':return SgCookieOptin.fixExternalContentAttribute(e,'src');case'OBJECT':return SgCookieOptin.fixExternalContentAttribute(e,'data');default:return}},fixExternalContentAttribute:function(e,t){if(e.dataset.contentReplaceSrc){e.setAttribute(t,e.dataset.contentReplaceSrc)}},checkForDataAttributeExternalContents:function(){if(SgCookieOptin.jsonData.settings.iframe_enabled&&SgCookieOptin.isExternalGroupAccepted){const externalContents=document.querySelectorAll(SgCookieOptin.EXTERNAL_CONTENT_ELEMENT_SELECTOR);if(externalContents.length>0){for(const externalContentToFixIndex in externalContents){if(!externalContents.hasOwnProperty(externalContentToFixIndex)){continue};SgCookieOptin.fixExternalContentAttributes(externalContents[externalContentToFixIndex])}}}},showFingerprint:function(){if(!(SgCookieOptin.jsonData.settings.fingerprint_position>0)||!SgCookieOptin.shouldShowOptinBanner()){return};if(SgCookieOptin.fingerprintIcon===null){SgCookieOptin.fingerprintIcon=SgCookieOptin.createFingeprint()};SgCookieOptin.fingerprintIcon.style.display='block'},hideFingerprint:function(){if(SgCookieOptin.fingerprintIcon===null||!SgCookieOptin.shouldShowOptinBanner()){return};SgCookieOptin.fingerprintIcon.style.display='none'},createFingeprint:function(){const fingerprintContainer=document.createElement('div');let iconPositionClass='';switch(SgCookieOptin.jsonData.settings.fingerprint_position){case 1:iconPositionClass='bottom-left';break;case 2:iconPositionClass='bottom-right';break;case 3:iconPositionClass='top-left';break;case 4:iconPositionClass='top-right';break};fingerprintContainer.classList.add('sg-cookie-optin-fingerprint');fingerprintContainer.classList.add('sg-cookie-optin-fingerprint-'+iconPositionClass);fingerprintContainer.addEventListener('click',function(e){SgCookieOptin.openCookieOptin()});fingerprintContainer.innerHTML='<svg fill="currentColor" class="sg-cookie-optin-fingerprint-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 512 512" xml:space="preserve">\n<g transform="translate(1 1)">\n\t\t\t\t<g>\n\t\t\t\t\t<path style="fill:currentColor;" d="M275.334,511L275.334,511c-5.207,0-8.678-4.339-8.678-8.678\n\t\t\t\t\t\tc6.075-182.237-16.488-256.868-17.356-257.736c-1.736-4.339,0.868-9.546,5.207-11.281c4.339-1.736,9.546,0.868,11.281,5.207\n\t\t\t\t\t\tc0.868,3.471,24.298,77.234,17.356,262.942C284.012,507.529,279.673,511,275.334,511z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M491.415,294.051c-4.339,0-7.81-3.471-8.678-7.81c-6.075-58.142-14.753-104.136-25.166-128.434\n\t\t\t\t\t\tC423.727,77.102,345.625,25.034,257.978,25.034c-28.637,0-57.275,5.207-83.308,16.488c-14.753,6.075-28.637,13.885-41.654,21.695\n\t\t\t\t\t\tc-4.339,2.603-9.546,1.736-12.149-2.603c-2.603-4.339-1.736-9.546,2.603-12.149c13.885-8.678,28.637-16.488,45.125-23.431\n\t\t\t\t\t\tc27.769-11.281,58.142-17.356,89.383-17.356c94.59,0,178.766,56.407,216.081,143.186c13.885,33.844,22.563,91.119,26.034,133.641\n\t\t\t\t\t\tC500.961,289.712,497.489,293.183,491.415,294.051C492.283,294.051,491.415,294.051,491.415,294.051z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M43.632,363.475c-3.471,0-6.942-2.603-8.678-6.075c-43.39-145.79,2.603-231.702,49.464-277.695\n\t\t\t\t\t\tc3.471-3.471,8.678-3.471,12.149,0s3.471,8.678,0,12.149C34.086,152.6,18.466,242.851,51.442,352.193\n\t\t\t\t\t\tc1.736,4.339-0.868,9.546-6.075,10.414C45.367,363.475,44.5,363.475,43.632,363.475z"/>\n\t\t\t\t\t<path style="fill:currentColor;
1" d="M100.906,450.254c-5.207,0-8.678-3.471-8.678-8.678c0-61.614,0-101.532-3.471-122.359\n\t\t\t\t\t\tc-1.736-9.546-4.339-19.092-6.075-27.769C57.517,202.932,102.642,109.21,187.686,73.631\n\t\t\t\t\t\tc24.298-10.414,50.332-14.753,77.234-13.885c69.424,2.603,144.922,60.746,168.353,130.169\n\t\t\t\t\t\tc19.092,56.407,19.092,150.129,17.356,234.305c0,5.207-4.339,8.678-8.678,8.678c-5.207,0-8.678-4.339-8.678-8.678\n\t\t\t\t\t\tc2.603-82.441,1.736-174.427-16.488-228.23c-20.827-62.481-91.119-116.285-152.732-118.888\n\t\t\t\t\t\tc-24.298-0.868-47.729,3.471-69.424,13.017c-77.234,32.108-118.02,117.153-95.458,196.99c2.603,9.546,5.207,19.959,6.942,29.505\n\t\t\t\t\t\tc3.471,22.563,3.471,62.481,3.471,124.963C109.584,446.783,106.113,450.254,100.906,450.254z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M388.147,476.288L388.147,476.288c-5.207,0-8.678-4.339-8.678-8.678\n\t\t\t\t\t\tc5.207-139.715,3.471-219.553-17.356-269.017c-17.356-41.654-58.142-68.556-104.136-68.556c-7.81,0-16.488,0.868-24.298,2.603\n\t\t\t\t\t\tc-4.339,0.868-9.546-1.736-10.414-6.942c-0.868-4.339,1.736-9.546,6.942-10.414c9.546-1.736,18.224-2.603,27.77-2.603\n\t\t\t\t\t\tc52.068,0,99.797,31.241,119.756,79.837c22.563,52.936,24.298,131.905,19.092,276.827\n\t\t\t\t\t\tC396.825,472.817,392.486,476.288,388.147,476.288z M161.652,458.932c-5.207,0-8.678-3.471-8.678-8.678\n\t\t\t\t\t\tc0-99.797-17.356-164.014-18.224-164.881c-15.62-58.142,3.471-118.888,48.597-150.129c4.339-2.603,9.546-1.736,12.149,1.736\n\t\t\t\t\t\tc2.603,4.339,1.736,9.546-1.736,12.149c-39.051,26.902-55.539,79.837-41.654,131.037c0.868,2.603,18.224,66.82,18.224,169.22\n\t\t\t\t\t\tC170.33,455.461,166.859,458.932,161.652,458.932z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M336.079,502.322L336.079,502.322c-5.207,0-8.678-4.339-8.678-8.678c0-11.281,0-27.77,0-42.522\n\t\t\t\t\t\tc0-10.414-0.868-19.959,0-26.902c0-4.339,4.339-8.678,8.678-8.678l0,0c5.207,0,8.678,4.339,8.678,8.678c0,6.075,0,15.62,0,26.034\n\t\t\t\t\t\tc0,14.753,0.868,32.108,0,43.39C344.757,498.851,340.418,502.322,336.079,502.322z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M213.72,502.322c-5.207,0-8.678-3.471-8.678-8.678c0-103.268-5.207-207.403-12.149-227.363\n\t\t\t\t\t\tc-12.149-36.447,4.339-74.631,38.183-88.515c8.678-3.471,17.356-5.207,26.902-5.207c27.77,0,52.936,16.488,64.217,42.522\n\t\t\t\t\t\tc17.356,40.786,22.563,112.814,23.431,165.749c0,5.207-3.471,8.678-8.678,8.678l0,0c-4.339,0-8.678-3.471-8.678-8.678\n\t\t\t\t\t\tc-0.868-51.2-6.075-120.624-22.563-158.807c-7.81-19.959-26.902-32.108-47.729-32.108c-6.942,0-13.885,1.736-19.959,4.339\n\t\t\t\t\t\tc-25.166,10.414-37.315,39.051-28.637,66.82c7.81,24.298,13.017,139.715,13.017,232.569\n\t\t\t\t\t\tC222.398,498.851,218.927,502.322,213.72,502.322z"/>\n\t\t\t\t</g>\n\t\t\t\t<g>\n\t\t\t\t\t<path style="fill:currentColor;" d="M267.523,511L267.523,511c-5.207,0-8.678-4.339-8.678-8.678\n\t\t\t\t\t\tc6.075-183.105-16.488-265.546-17.356-266.414c-1.736-4.339,1.736-9.546,6.075-10.414c4.339-1.736,9.546,1.736,10.414,6.075\n\t\t\t\t\t\tc0.868,3.471,24.298,85.912,17.356,271.62C276.201,507.529,271.862,511,267.523,511z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M483.605,285.373c-4.339,0-7.81-3.471-8.678-7.81c-3.471-33.844-11.281-95.458-25.166-128.434\n\t\t\t\t\t\tC415.917,68.424,337.815,16.356,250.167,16.356c-28.637,0-57.275,5.207-83.308,16.488c-14.753,6.075-28.637,13.885-41.654,21.695\n\t\t\t\t\t\tc-4.339,2.603-9.546,1.736-12.149-2.603c-2.603-4.339-1.736-9.546,2.603-12.149c13.885-8.678,28.637-16.488,45.125-23.431\n\t\t\t\t\t\tC188.554,5.075,218.927-1,250.167-1c94.59,0,178.766,56.407,216.081,143.186c13.885,33.844,22.563,91.119,26.034,133.641\n\t\t\t\t\t\tC492.283,281.034,488.811,284.505,483.605,285.373C484.473,285.373,483.605,285.373,483.605,285.373z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M35.822,354.797c-3.471,0-6.942-2.603-8.678-6.075c-43.39-145.79,2.603-231.702,49.464-277.695\n\t\t\t\t\t\tc3.471-3.471,8.678-3.471,12.149,0c3.471,3.471,3.471,8.678,0,12.149c-62.481,60.746-78.102,150.997-45.125,260.339\n\t\t\t\t\t\tc1.736,4.339-0.868,9.546-6.075,10.414C37.557,354.797,36.689,354.797,35.822,354.797z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M93.096,441.576c-5.207,0-8.678-3.471-8.678-8.678c0-61.614,0-101.532-3.471-122.359\n\t\t\t\t\t\tc-1.736-9.546-3.471-18.224-6.075-27.77C49.706,194.254,94.832,100.532,179.876,64.953c24.298-10.414,50.332-14.753,77.234-13.885\n\t\t\t\t\t\tc69.424,2.603,144.922,60.746,168.353,130.169c19.092,56.407,19.092,150.129,17.356,234.305c0,5.207-4.339,8.678-8.678,8.678\n\t\t\t\t\t\tc-5.207,0-8.678-4.339-8.678-8.678c2.603-82.441,1.736-174.427-16.488-228.23c-20.827-62.481-91.119-116.285-152.732-118.888\n\t\t\t\t\t\tc-24.298-0.868-47.729,3.471-69.424,13.017c-77.234,32.108-118.02,117.153-95.458,196.99c2.603,9.546,5.207,19.959,6.942,29.505\n\t\t\t\t\t\tc3.471,22.563,3.471,62.481,3.471,124.963C101.774,438.105,98.303,441.576,93.096,441.576z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M380.337,467.61L380.337,467.61c-5.207,0-8.678-4.339-8.678-8.678\n\t\t\t\t\t\tc5.207-139.715,3.471-219.553-17.356-269.017c-17.356-41.654-58.142-68.556-104.136-68.556c-7.81,0-16.488,0.868-24.298,2.603\n\t\t\t\t\t\tc-4.339,0.868-9.546-1.736-10.414-6.942c-0.868-4.339,1.736-9.546,6.942-10.414c9.546-1.736,18.224-2.603,27.77-2.603\n\t\t\t\t\t\tc52.068,0,99.797,31.241,119.756,79.837c22.563,52.936,24.298,131.905,19.092,276.827\n\t\t\t\t\t\tC389.015,464.139,384.676,467.61,380.337,467.61z M153.842,450.254c-
15.207,0-8.678-3.471-8.678-8.678\n\t\t\t\t\t\tc0-99.797-17.356-164.014-18.224-164.881c-15.62-58.142,3.471-118.888,48.597-150.129c4.339-2.603,9.546-1.736,12.149,1.736\n\t\t\t\t\t\tc2.603,4.339,1.736,9.546-1.736,12.149c-39.051,26.902-55.539,79.837-41.654,131.037c0.868,3.471,18.224,67.688,18.224,170.088\n\t\t\t\t\t\tC162.52,446.783,159.049,450.254,153.842,450.254z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M328.269,493.644L328.269,493.644c-5.207,0-8.678-4.339-8.678-8.678c0-11.281,0-27.77,0-42.522\n\t\t\t\t\t\tc0-10.414-0.868-19.959,0-26.034c0-4.339,4.339-8.678,8.678-8.678l0,0c5.207,0,8.678,4.339,8.678,8.678c0,6.075,0,15.62,0,26.034\n\t\t\t\t\t\tc0,15.62,0.868,32.108,0,43.39C336.947,490.173,332.608,493.644,328.269,493.644z"/>\n\t\t\t\t\t<path style="fill:currentColor;" d="M205.91,493.644c-5.207,0-8.678-3.471-8.678-8.678c0-103.268-5.207-207.403-12.149-227.363\n\t\t\t\t\t\tc-12.149-36.447,4.339-74.631,38.183-88.515c8.678-3.471,17.356-5.207,26.902-5.207c27.769,0,52.936,16.488,64.217,42.522\n\t\t\t\t\t\tc17.356,40.786,22.563,112.814,23.431,165.749c0,5.207-3.471,8.678-8.678,8.678l0,0c-4.339,0-8.678-3.471-8.678-8.678\n\t\t\t\t\t\tc-0.868-51.2-6.075-120.624-22.563-159.675c-7.81-19.092-26.902-32.108-47.729-32.108c-6.942,0-13.885,1.736-19.959,4.339\n\t\t\t\t\t\tc-25.166,10.414-37.315,39.051-28.637,66.82c7.81,25.166,13.017,140.583,13.017,233.437\n\t\t\t\t\t\tC214.588,490.173,211.117,493.644,205.91,493.644z"/>\n\t\t\t\t</g>\n\t\t\t</g></svg>';document.body.appendChild(fingerprintContainer);const fingerprintCreatedEvent=new CustomEvent('fingerprintCreated',{bubbles:!0,detail:{}});document.dispatchEvent(fingerprintCreatedEvent);return fingerprintContainer}};SgCookieOptin.run()

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.