vendor: 5,209 bytes, lines 1-149
1/* Minification failed. Returning unminified contents. 2(255,46-47): run-time error JS1195: Expected expression: > 3(260,18-19): run-time error JS1195: Expected expression: ) 4(263,13-14): run-time error JS1002: Syntax error: } 5(461,28-29): run-time error JS1195: Expected expression: ) 6(461,31-32): run-time error JS1195: Expected expression: > 7(467,22-23): run-time error JS1195: Expected expression: ) 8(468,44-45): run-time error JS1004: Expected ';': { 9(471,22-23): run-time error JS1195: Expected expression: ) 10(473,62-63): run-time error JS1004: Expected ';': { 11(563,68-69): run-time error JS1195: Expected expression: > 12(569,38-39): run-time error JS1195: Expected expression: ) 13(577,13-14): run-time error JS1002: Syntax error: } 14(579,46-47): run-time error JS1004: Expected ';': { 15(673,54-55): run-time error JS1195: Expected expression: > 16(678,26-27): run-time error JS1195: Expected expression: ) 17(686,21-22): run-time error JS1002: Syntax error: } 18(730,58-59): run-time error JS1195: Expected expression: > 19(732,30-31): run-time error JS1195: Expected expression: ) 20(738,21-22): run-time error JS1002: Syntax error: } 21(742,47-48): run-time error JS1195: Expected expression: ) 22(742,49-50): run-time error JS1004: Expected ';': { 23(761,44-45): run-time error JS1014: Invalid character: ` 24(761,46-47): run-time error JS1100: Expected ',': { 25(761,58-59): run-time error JS1014: Invalid character: ` 26(762,48-49): run-time error JS1004: Expected ';': : 27(762,50-51): run-time error JS1014: Invalid character: ` 28(762,64-65): run-time error JS1014: Invalid character: ` 29(763,26-27): run-time error JS1195: Expected expression: ) 30(763,27-28): run-time error JS1197: Too many errors. The file might not be a JavaScript file: ; 31(630,13-21): run-time error JS1018: 'return' statement outside of function: return { 32(620,17-48): run-time error JS1018: 'return' statement outside of function: return cookieAcceptedCategories 33 */ 34/*! 35 * JavaScript Cookie v2.2.0 36 * https://github.com/js-cookie/js-cookie 37 * 38 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 39 * Released under the MIT license 40 */ 41;(function (factory) { 42 var registeredInModuleLoader; 43 if (typeof define === 'function' && define.amd) { 44 define(factory); 45 registeredInModuleLoader = true; 46 } 47 if (typeof exports === 'object') { 48 module.exports = factory(); 49 registeredInModuleLoader = true; 50 } 51 if (!registeredInModuleLoader) { 52 var OldCookies = window.Cookies; 53 var api = window.Cookies = factory(); 54 api.noConflict = function () { 55 window.Cookies = OldCookies; 56 return api; 57 }; 58 } 59}(function () { 60 function extend () { 61 var i = 0; 62 var result = {}; 63 for (; i < arguments.length; i++) { 64 var attributes = arguments[ i ]; 65 for (var key in attributes) { 66 result[key] = attributes[key]; 67 } 68 } 69 return result; 70 } 71 72 function init (converter) { 73 function api (key, value, attributes) { 74 if (typeof document === 'undefined') { 75 return; 76 } 77 78 // Write 79 80 if (arguments.length > 1) { 81 attributes = extend({ 82 path: '/' 83 }, api.defaults, attributes); 84 85 if (typeof attributes.expires === 'number') { 86 attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 87 } 88 89 // We're using "expires" because "max-age" is not supported by IE 90 attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 91 92 try { 93 var result = JSON.stringify(value); 94 if (/^[\{\[]/.test(result)) { 95 value = result; 96 } 97 } catch (e) {} 98 99 value = converter.write ? 100 converter.write(value, key) : 101 encodeURIComponent(String(value)) 102 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 103 104 key = encodeURIComponent(String(key)) 105 .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 106 .replace(/[\(\)]/g, escape); 107 108 var stringifiedAttributes = ''; 109 for (var attributeName in attributes) { 110 if (!attributes[attributeName]) { 111 continue; 112 } 113 stringifiedAttributes += '; ' + attributeName; 114 if (attributes[attributeName] === true) { 115 continue; 116 } 117 118 // Considers RFC 6265 section 5.2: 119 // ... 120 // 3. If the remaining unparsed-attributes contains a %x3B (";") 121 // character: 122 // Consume the characters of the unparsed-attributes up to, 123 // not including, the first %x3B (";") character. 124 // ... 125 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 126 } 127 128 return (document.cookie = key + '=' + value + stringifiedAttributes); 129 } 130 131 // Read 132 133 var jar = {}; 134 var decode = function (s) { 135 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 136 }; 137 // To prevent the for loop in the first place assign an empty array 138 // in case there are no cookies at all. 139 var cookies = document.cookie ? document.cookie.split('; ') : []; 140 var i = 0; 141 142 for (; i < cookies.length; i++) { 143 var parts = cookies[i].split('='); 144 var cookie = parts.slice(1).join('='); 145 146 if (!this.json && cookie.charAt(0) === '"') { 147 cookie = cookie.slice(1, -1); 148 } 149
150 try { 151 var name = decode(parts[0]); 152 cookie = (converter.read || converter)(cookie, name) || 153 decode(cookie); 154 155 if (this.json) { 156 try { 157 cookie = JSON.parse(cookie); 158 } catch (e) {} 159 } 160 161 jar[name] = cookie; 162 163 if (key === name) { 164 break; 165 } 166 } catch (e) {} 167 } 168 169 return key ? jar[key] : jar; 170 } 171 172 api.set = api; 173 api.get = function (key) { 174 return api.call(api, key); 175 }; 176 api.getJSON = function (key) { 177 return api.call({ 178 json: true 179 }, key); 180 }; 181 api.remove = function (key, attributes) { 182 api(key, '', extend(attributes, { 183 expires: -1 184 })); 185 }; 186 187 api.defaults = {}; 188 189 api.withConverter = init; 190 191 return api; 192 } 193 194 return init(function () {}); 195})); 196; 197// js-cookie api 198var cookies = window.Cookies; 199 200extend(saffire, { 201 cookies: { 202 cookieRegistry: function (opts) { 203 204 var data = { 205 mode: 'none' //options 'none' = all cookies allowed, 'userConsent' = end user can manage 206 , categories: [] 207 , groups: [] 208 } 209 210 function init(opts) { 211 data = $.extend(data, opts); 212 } 213 214 init(opts); 215 216 /** 217 * public API. 218 * @public 219 */ 220 return { 221 a: function () { alert('cookieConsentRegistry'); } 222 , d: function () { } 223 , addGroups: function (groups) { 224 data.groups = $.merge(data.groups, groups); 225 } 226 , getMode: function () { return data.mode; } 227 , getGroupList: function () { 228 return data.groups; 229 } 230 , getCategories: function () { 231 return data.categories; 232 } 233 } 234 235 236 } 237 , cookieConsentManager: function (cookieConsentRegistry) { 238 239 var reg = cookieConsentRegistry; 240 241 // cookie banner 242 var cookieBannerMessage = '\ 243 We use cookies to offer you a better browsing experience, analyze site traffic, personalize content and serve targeted advertisements.\ 244 Read about how we use cookies and how you can control them by clicking \"Manage Cookie Preferences\".\ 245 If you continue to use this site, you consent to our use of cookies.\ 246 '; 247 248 var cookieBannerContent = '\ 249 <div id="cookie-banner-container" role="region" aria-label="Cookie consent">\ 250 <div class="cookie-banner-content">\ 251 <p>'+ cookieBannerMessage + '</p>\ 252 <div class="cookie-banner-buttons">\ 253 <div class="cookie-banner-settings-btn" role="button" tabindex="0">Manage Cookie Preferences</div>\ 254 <div class="cookie-banner-reject-btn" role="button" tabindex="0">Reject All</div>\ 255 <div class="cookie-banner-accept-btn" role="button" tabindex="0">Accept All</div>\ 256 </div>\ 257 </div>\ 258 </div>\ 259 '; 260 261 var removeCookieBanner = function () {
262 $("#cookie-settings-container").remove(); 263 $("#cookie-banner-container").remove(); 264 $('html').css({ 265 paddingBottom: 'initial', 266 scrollPaddingBottom: 'initial' 267 }); 268 }; 269 // end cookie banner 270 271 // cookie settings manager 272 var cookieSettingsMainMessage = '\ 273 The website uses \"cookies\", which are elements of data that a website can send to your browser, which may then be stored on your system.\ 274 This element of data is a piece of text, not a program. The website can only access the information from a cookie sent by the website.\ 275 We cannot access other cookies sent by other websites or the information contained therein.\ 276 Additionally, we cannot learn your e-mail address or any other information about you through the use of a cookie.\ 277 The only way we would learn such information is if you specifically and voluntarily submit that information to us, for example,\ 278 through a registration system, by entering a sweepstakes or promotion, etc.\ 279 '; 280 281 //if GPC is enabled, only run essential categories and persist to cookie 282 if (navigator.globalPrivacyControl) { 283 var cookiesAllowed = []; 284 var cookiesNotAllowed = []; 285 286 var categories = reg.getCategories(); 287 288 categories.forEach(category => { 289 if (category.isEssential === true) 290 cookiesAllowed.push(category.key); 291 else 292 cookiesNotAllowed.push(category.key); 293 }); 294 295 saveCookie(cookiesAllowed, cookiesNotAllowed); 296 } 297 298 var categoryHTML = {}; 299 var cookieCategoriesToShow = ''; 300 301 function createSettingsCategories() { 302 303 var catList = reg.getCategories(); 304 305 function checkExistingCookieSettings(catListItem) { 306 var cookieBannerCookie = Cookies.getJSON('SA_COOKIE_BANNER'); 307 var gpcOverrideCookie = Cookies.getJSON('SA_GPC_COOKIE_CATEGORIES'); 308 309 function setAcceptedStatus(acceptedCookies) { 310 var acceptedStatus = {}; 311 var isAccepted = 1; 312 var isChecked = 'checked'; 313 if (acceptedCookies.indexOf(catListItem.key) === -1) { 314 isAccepted = 0; 315 isChecked = ''; 316 } 317 acceptedStatus.isAccepted = isAccepted; 318 acceptedStatus.isChecked = isChecked; 319 return acceptedStatus; 320 } 321 322 if (cookieBannerCookie !== undefined) { 323 if (navigator.globalPrivacyControl) { 324 if (gpcOverrideCookie !== undefined) { 325 return setAcceptedStatus(gpcOverrideCookie.A); 326 } else { 327 return setAcceptedStatus(['essential']); 328 } 329 } else { 330 return setAcceptedStatus(cookieBannerCookie.A); 331 } 332 } else { 333 var customAcceptedCookies = window.cookieAcceptedCategoriesCustom; 334 if (customAcceptedCookies !== undefined) { 335 return setAcceptedStatus(customAcceptedCookies); 336 } else { 337 var acceptedStatus = {}; 338 acceptedStatus.isAccepted = 1; 339 acceptedStatus.isChecked = 'checked'; 340 return acceptedStatus; 341 } 342 } 343 344 } 345 346 catList.forEach(function (item, i) { 347 var checkSettingsResults = checkExistingCookieSettings(item); 348 var isChecked = checkSettingsResults.isAccepted ? "true" : "false"; 349 var toggleTabIndex = item.key === 'essential' ? '-1' : '0'; 350 var catContentBlock = '\
351 <div class="cookie-settings-category" data-cookie-category-key="'+ item.key + '">\ 352 <div class="cookie-settings-category-top">\ 353 <span id="cookie-setting-cat-heading-'+item.key+'" tabindex="0" role="button" aria-expanded="false" aria-controls="cookie-setting-cat-info-'+item.key+'">'+ item.name + '</span>\ 354 <div class="cookie-settings-category-toggle '+ checkSettingsResults.isChecked + '" data-cookie-category-accepted="' + checkSettingsResults.isAccepted + '" tabindex="'+toggleTabIndex+'" role="switch" aria-checked="' + isChecked + '" aria-label="enable '+item.name+' cookies">\ 355 <div class="cs-slider cs-round"></div>\ 356 </div>\ 357 </div>\ 358 <div id="cookie-setting-cat-info-'+item.key+'" aria-hidden="true" class="cookie-settings-category-info" role="region" aria-labelledby="cookie-setting-cat-heading-'+item.key+'">\ 359 <p>'+ item.description + '</p>\ 360 </div>\ 361 </div>\ 362 '; 363 categoryHTML[item.key] = catContentBlock; 364 }); 365 366 }; 367 368 function buildCategoriesToDisplay() { 369 var cookieGroupList = reg.getGroupList(); 370 var categoryKeys = ['essential']; 371 372 cookieGroupList.forEach(function (item, i) { 373 if (categoryKeys.indexOf(item.categoryKey) === -1) { 374 categoryKeys.push(item.categoryKey); 375 } 376 }); 377 378 categoryKeys.forEach(function (item, i) { 379 var categoryToShow = categoryHTML[item]; 380 if (categoryToShow !== undefined) { 381 cookieCategoriesToShow += categoryToShow; 382 } 383 }); 384 }; 385 386 function getCookieSettingsContent() { 387 cookieCategoriesToShow = ''; 388 categoryHTML = []; 389 cookieCategoriesToShow = ''; 390 createSettingsCategories(); 391 buildCategoriesToDisplay(); 392 393 var cookieSettingsContent = '\ 394 <div id="cookie-settings-container" data-changed="0" role="dialog" aria-modal="true" aria-labelledby="cookie-settings-heading">\ 395 <div class="cookie-settings-content">\ 396 <div class="cookie-settings-content-message">\ 397 <span id="cookie-settings-heading" >Cookie Settings</span>\ 398 <p>'+ cookieSettingsMainMessage + '</p>\ 399 </div><div class="cookie-settings-content-category-wrapper">\ 400 '+ cookieCategoriesToShow + '</div>\ 401 <div class="cookie-settings-content-bottom">\ 402 <div class="cookie-settings-save-btn" role="button" tabindex="0">Save Settings</div>\ 403 </div>\ 404 </div>\ 405 </div>\ 406 '; 407 return cookieSettingsContent; 408 }; 409 410 function toggleCookieCategoryInfo(element) { 411 var closestCategory = element.closest('.cookie-sett
411ings-category'); 412 413 function closeCategoryInfo() { 414 $('.cookie-settings-category').removeClass('view-info'); 415 $('.cookie-settings-category .cookie-settings-category-top > span').attr('aria-expanded', 'false'); 416 $('.cookie-settings-category .cookie-settings-category-info').attr('aria-hidden', 'true'); 417 } 418 419 if (closestCategory.hasClass('view-info')) { 420 closestCategory.removeClass('view-info'); 421 closestCategory.find('.cookie-settings-category-top > span').attr('aria-expanded', 'false'); 422 closestCategory.find('.cookie-settings-category-info').attr('aria-hidden', 'true'); 423 closeCategoryInfo(); 424 } else { 425 closeCategoryInfo() 426 closestCategory.addClass('view-info'); 427 closestCategory.find('.cookie-settings-category-top > span').attr('aria-expanded', 'true');
428 closestCategory.find('.cookie-settings-category-info').attr('aria-hidden', 'false'); 429 } 430 }; 431 432 function toggleCookieSettingsCategory(element) { 433 element.toggleClass('checked'); 434 var $settingsContainer = $('#cookie-settings-container'); 435 var cookieAccepted = element.data('cookie-category-accepted'); 436 if (cookieAccepted === 1) { 437 element.data("cookie-category-accepted", 0); 438 element.attr("data-cookie-category-accepted", 0); 439 element.attr("aria-checked", 'false'); 440 $settingsContainer.data('changed', 1); 441 } else { 442 element.data("cookie-category-accepted", 1); 443 element.attr("data-cookie-category-accepted", 1); 444 element.attr("aria-checked", 'true'); 445 $settingsContainer.data('changed', 0); 446 } 447 }; 448 449 function sendGAEvent(action, label) { 450 451 if (typeof (ga) != "undefined") { 452 ga('send', 'event', 'cookieConsentManager', action, label); 453 ga('aggregate.send', 'event', 'cookieConsentManager', action, label); 454 } 455 456 if (typeof (gtag) != "undefined") { 457 gtag('event', 'cookieConsentManager', { 458 'event_action': action, 'event_label': label }); 459 } 460 }; 461 462 function saveCookie(cookiesAccepted, cookiesDenied) { 463 464 cookies.set('SA_COOKIE_BANNER', 465 { 466 S: new Date(), 467 A: cookiesAccepted, 468 D: cookiesDenied 469 }, 470 { expires: 365 } 471 ); 472 473 }; 474 475 function saveGPCCookie(cookiesAccepted, cookiesDenied) { 476 cookies.set('SA_GPC_COOKIE_CATEGORIES', 477 { 478 S: new Date(), 479 A: cookiesAccepted, 480 D: cookiesDenied 481 }, 482 { expires: 365 } 483 ); 484 }; 485 486 function excecuteAcceptedCookies (cookiesAccepted) { 487 488 var $dataConsentElements = $("[data-consent-category]"); 489 var allCookiesAccepted = cookiesAccepted == "all" ? true : false; 490 491 //External scripts 492 493 Promise.all(getScriptRequests()) 494 .then(() => { 495 const $externalScripts = $(getScriptElements(true, false)); 496 $externalScripts.each(function () { 497 $(this).remove(); 498 }); 499 processNonExternalScriptResources(); 500 }) 501 .catch(function(error) { 502 console.error('Error loading scripts:', error); 503 processNonExternalScriptResources(); 504 }); 505 506 function processNonExternalScriptResources() { 507 508 //Inline scripts 509 510 var $inlineScripts = $(getScriptElements(false, true)); 511 $inlineScripts.each(function () { 512 convertScriptTypeToExecutable($(this)); 513 }); 514 515 //Image pixels 516 517 var $imageElements = $($dataConsentElements.filter("img")); 518 $imageElements.each(function () { 519 convertDataAttributeSrcToElementSrc($(this)); 520 }); 521 522 //Iframe pixels 523 524 var $iframeElements = $($dataConsentElements.filter("iframe")); 525 $iframeElements.each(function () { 526 convertDataAttributeSrcToElementSrc($(this)); 527 }); 528 529 } 530 531 //Support functions 532 function convertDataAttributeSrcToElementSrc($elem) { 533 if (isCookieCategoryAccepted($elem) || allCookiesAccepted) { 534 if ($elem.data('src') !== undefined) { 535 $elem.attr('src', $elem.data('src')); 536 } 537 } 538 } 539 540 function convertScriptTypeToExecutable($elem) { 541 if (isCookieCategoryAccepted($elem) || allCookiesAccepted) { 542 if ($elem.attr("type") == 'text/plain') { 543 544 var srcElem = $elem[0]; 545 var srcElemParent = srcElem.parentNode; 546 var content = $elem.html(); 547 548 var sc = document.createElement('script'); 549 sc.type = "text/javascript"; 550 sc.text = content; 551 552 srcElemParent.insertBefore(sc, srcElem); 553 srcElemParent.removeChild(srcElem); 554 555 } 556 } 557 } 558 559 function isCookieCategoryAccepted($elem) { 560 var elementCategory = $elem.data("consent-category"); 561 return cookiesAccepted.indexOf(elementCategory) > -1; 562 } 563 564 function isExternalScript($elem) { 565 return $elem.prop('tagName').toLowerCase() == 'script' && $elem.attr('src') !== undefined; 566 } 567 568 function getScriptElements(getExternal, getInternal) { 569 var $allScriptElements = $dataConsentElements.filter("script"); 570 var $scriptElements = []; 571 572 for (var x = 0; x < $allScriptElements.length; x++) { 573 var $script = $($allScriptElements[x]); 574 575 var isExternal = isExternalScript($script); 576 577 if (isExternal && getExternal || !isExternal && getInternal) { 578 $scriptElements.push($script); 579 } 580 } 581 582 return $scriptElements; 583 } 584 585 function getScriptRequests() { 586 const $externalScripts = getScriptElements(true, false); 587 const promises = []; 588 589 for (let x = 0; x < $externalScripts.length; x++) { 590 const $script = $($externalScripts[x]); 591 592 if (isCookieCategoryAccepted($script) || allCookiesAccepted) { 593 const scriptSrc = $script.attr("src"); 594 if (scriptSrc !== undefined) { 595 promises.push( 596 new Promise((resolve, reject) => { 597 const sc = document.createElement('script'); 598 sc.src = scriptSrc; 599 sc.onload = resolve; 600 sc.onerror = reject; 601 document.head.appendChild(sc); 602 }) 603 ); 604 } 605 } 606 } 607 return promises; 608 } 609 610 } 611 612 function getAcceptedCategories() { 613 614 var cookieAcceptedCategories = "all"; 615 616 if (reg.getMode() === "userConsent") { 617 618 var cookieBannerCookie = Cookies.getJSON('SA_COOKIE_BANNER'); 619 var gpcOverrideCookie = Cookies.getJSON('SA_GPC_COOKIE_CATEGORIES'); 620 var gpcIsEnabled = navigator.globalPrivacyControl; 621 622 if (gpcIsEnabled) { 623 624 if (gpcOverrideCookie === undefined) { 625 cookieAcceptedCategories = ['essential']; 626 } else { 627 cookieAcceptedCategories = gpcOverrideCookie.A; 628 } 629 } else if (cookieBannerCookie !== undefined) { 630 cookieAcceptedCategories = cookieBannerCookie.A; 631 632 //temp fix to insert a new cookie category if it hasn't been denied previously 633 //this is for backwards compatability with old stored cookies from before adding the category 634 635 if (cookieBannerCookie.A.indexOf('advtrg') == -1) { //if it doesn't already exist as accepted category 636 if (cookieBannerCookie.D.indexOf('advtrg') == -1) { //if it hasn't been explicilty denied 637 cookieBannerCookie.A.push('advtrg') 638 saveCookie(cookieBannerCookie.A, cookieBannerCookie.D); 639 } 640 } 641 642 } 643 644 // If Cookie Banner Cookie does not yet exist 645 if (cookieBannerCookie === undefined) { 646 if (window.cookieAcceptedCategoriesCustom !== undefined) { 647 cookieAcceptedCategories = window.cookieAcceptedCategoriesCustom; 648 } 649 } 650 651 } 652 653 return cookieAcceptedCategories; 654 655 }; 656 657 // end cookie settings manager 658 659 /** 660 * public API. 661 * @public 662 */ 663 return { 664 openCookieManager: function () { 665 var cookieSettingsManager = getCookieSettingsContent(); 666 function isKeyInvalid(e) { 667 return e.type === 'keydown' && e.key !== 'Enter' && e.key !== ' '; 668 }
669 if ($("#cookie-settings-container").length === 0) { 670 $("body").prepend(cookieSettingsManager); 671 } 672 673 $("#cookie-settings-container").addClass("show-cookie-settings"); 674 675 setFocusInModal('#cookie-settings-container'); 676 677 $("#cookie-settings-container .cookie-settings-category-toggle").on('click keydown', function (e) { 678 if (isKeyInvalid(e)) return; 679 toggleCookieSettingsCategory($(this)); 680 }); 681 682 $("#cookie-settings-container .cookie-settings-category-top span").on('click keydown', function (e) { 683 if (isKeyInvalid(e)) return; 684 toggleCookieCategoryInfo($(this)); 685 }); 686 $("#cookie-settings-container .cookie-settings-save-btn").on('click keydown', function (e) { 687 if (isKeyInvalid(e)) return; 688 if (navigator.globalPrivacyControl) { 689 cookieConsentMgr.closeCookieManager(false, true, true); 690 } else { 691 cookieConsentMgr.closeCookieManager(false, true); 692 } 693 }); 694 695 } 696 , closeCookieManager: function (isRejectAll, closedFromCookieManager, gpcEnabled) { 697 698 var cookiesAllowed = []; 699 var cookiesNotAllowed = []; 700 701 // If the user clicked on Reject All 702 if(isRejectAll) 703 { 704 var categories = reg.getCategories(); 705 706 categories.forEach(category => { 707 if(category.isEssential === true) 708 cookiesAllowed.push(category.key); 709 else 710 cookiesNotAllowed.push(category.key); 711 }); 712 713 saveCookie(cookiesAllowed, cookiesNotAllowed); 714 715 if (cookiesAllowed.length > 0) 716 sendGAEvent('accepted', cookiesAllowed.toString()); 717 if (cookiesNotAllowed.length > 0) 718 sendGAEvent('denied', cookiesNotAllowed.toString()); 719 } 720 // If the user clicked on Accept All or Save Settings 721 else 722 { 723 if (closedFromCookieManager) { 724 // user clicked Save Settings from the cookie manager - should accept all user-chosen categories 725
726 $("#cookie-settings-container .cookie-settings-category").each(function () { 727 var categoryKey = $(this).data("cookie-category-key"); 728 var isCategoryAllowed = $(this).find(".cookie-settings-category-toggle").data("cookie-category-accepted"); 729 if (isCategoryAllowed === 1) { 730 cookiesAllowed.push(categoryKey); 731 } else { 732 cookiesNotAllowed.push(categoryKey); 733 } 734 }); 735 736 // console.log('cfcm:') 737 // console.log(cookiesAllowed) 738 saveCookie(cookiesAllowed, cookiesNotAllowed); 739 740 // if GPC is enabled, set the GPC override cookie 741 if (gpcEnabled) { 742 saveGPCCookie(cookiesAllowed, cookiesNotAllowed); 743 } 744 745 var $settingsContainer = $('#cookie-sett
745ings-container'); 746 747 if ($settingsContainer.data('changed') == "1") { 748 749 if (cookiesAllowed.length > 0) { 750 sendGAEvent('accepted', cookiesAllowed.toString()); 751 } 752 if (cookiesNotAllowed.length > 0) { 753 sendGAEvent('denied', cookiesNotAllowed.toString()); 754 } 755 } else { 756 sendGAEvent('settingContainer', 'noChange'); 757 } 758 759 } else { 760 761 // user clicked Accept All from banner - should accept ALL categories 762 var categories = reg.getCategories(); 763 categories.forEach(category => { 764 cookiesAllowed.push(category.key); 765 }); 766 767 saveCookie(cookiesAllowed, cookiesNotAllowed); 768 769 sendGAEvent('accepted', cookiesAllowed.toString()); 770 } 771 } 772 773 removeCookieBanner(); 774 } 775 , showCookieBanner: function () { 776 var cookieSettingsManager = getCookieSettingsContent(); 777 function isKeyInvalid(e) { 778 return e.type === 'keydown' && e.key !== 'Enter' && e.key !== ' '; 779 } 780 781 if (navigator.globalPrivacyControl) 782 { 783 sendGAEvent('rejectAllGPC', ''); 784 cookieConsentMgr.closeCookieManager(true, false); 785 return; 786 } 787 788 $("body").prepend(cookieSettingsManager, cookieBannerContent); 789 790 // set page bottom padding 791 function setPageBottomPadding() { 792 let cbHeight = $('#cookie-banner-container').height(); 793 $('html').css({ 794 paddingBottom: `${cbHeight}px`, 795 scrollPaddingBottom: `${cbHeight}px` 796 }); 797 } 798 setPageBottomPadding(); 799 800 let debounceTimeout; 801 802 window.addEventListener('resize', () => { 803 clearTimeout(debounceTimeout); 804 debounceTimeout = setTimeout(() => { 805 setPageBottomPadding(); 806 }, 100); 807 }); 808 809 // reject btn 810 $("#cookie-banner-container .cookie-banner-reject-btn").on('click keydown', function (e) { 811 if (isKeyInvalid(e)) return; 812 sendGAEvent('rejectAllFromBanner', ''); 813 cookieConsentMgr.closeCookieManager(true, false); 814 }); 815 // accept btn 816 $("#cookie-banner-container .cookie-banner-accept-btn").on('click keydown', function (e) { 817 if (isKeyInvalid(e)) return; 818 sendGAEvent('acceptAllFromBanner', ''); 819 cookieConsentMgr.closeCookieManager(false, false); 820 }); 821 // settings btn 822 $("#cookie-banner-container .cookie-banner-settings-btn").on('click keydown', function (e) { 823 if (isKeyInvalid(e)) return; 824 sendGAEvent('viewSettingsFromBanner', ''); 825 cookieConsentMgr.openCookieManager(); 826 }); 827 828 } 829 , executeAcceptedCategoriesAndShowBanner: function () { 830 831 var gpcIsEnabled = navigator.globalPrivacyControl; 832 var cookieAcceptedCategories = getAcceptedCategories(); 833 var cookieBannerCookie = Cookies.getJSON('SA_COOKIE_BANNER'); 834 835 excecuteAcceptedCookies(cookieAcceptedCategories); 836 837 if (reg.getMode() === "userConsent") { 838 839 // If Cookie Banner Cookie does not yet exist 840 if (cookieBannerCookie === undefined) { 841 842 // show cookie banner only if GPC is not enabled 843 if (!gpcIsEnabled) { 844 cookieConsentMgr.showCookieBanner(); 845 } 846 847 } 848 849 } 850 851 } 852 , isCategoryAccepted(categoryName) { 853 854 var cookieAcceptedCategories = getAcceptedCategories();
855 if (cookieAcceptedCategories !== undefined) { 856 857 if (cookieAcceptedCategories == "all") { 858 return true; 859 } 860 861 var found = cookieAcceptedCategories.find((el) => el == categoryName) 862 return ( found !== undefined ) 863 } 864 865 } 866 } 867 } 868 , privacyTermsCookieInfo: function(cookieConsentRegistry) { 869 var reg = cookieConsentRegistry; 870 var cookieCategories = reg.categories; 871 var cookieGroups = reg.groups; 872 873 function buildCategoryInfo(name, description, key) { 874 var catBlockTop = '\ 875 <p><strong>'+name+' Cookies</strong></p>\ 876 <p>'+description+'</p>\ 877 '; 878 return catBlockTop; 879 } 880 881 function buildCookieGroupInfo(categoryKey) { 882 var groupBlock = ''; 883 884 cookieGroups.forEach(function(item, i) { 885 var groupCatKey = item.categoryKey; 886 887 888 889 if ( groupCatKey === categoryKey ) { 890 var itemCookies = item.cookies; 891 892 if (itemCookies.length !== 0 ) { 893 var groupBlockA = '\ 894 <div class="cookie-group-info">\ 895 <p><strong>'+item.name+'</strong></p>\ 896 <p>'+item.description+'</p>\ 897 <p>Cookies:</p>\ 898 <table>\ 899 <tr>\ 900 <th>NAME</th>\ 901 <th>PURPOSE</th>\ 902 <th>EXPIRES</th>\ 903 </tr>\ 904 '; 905 var groupBlockB = ''; 906 var groupBlockC = '\ 907 </table>\ 908 </div>\ 909 '; 910 911 for ( i = 0; i < itemCookies.length; i ++) { 912 groupBlockB += '\ 913 <tr>\ 914 <td data-th="NAME">'+itemCookies[i].name+'</td>\ 915 <td data-th="PURPOSE">'+itemCookies[i].description+'</td>\ 916 <td data-th="EXPIRES">'+itemCookies[i].expires+'</td>\ 917 </tr>\ 918 '; 919 } 920 921 groupBlock += groupBlockA + groupBlockB + groupBlockC; 922 923 } else { 924 925 if (item.showWithoutCookies) { 926 return; 927 } else { 928 groupBlock = "no cookies"; 929 } 930 931 } 932 } 933 }); 934 935 return groupBlock; 936 } 937 938 var groupBlocksData = []; 939 940 if (cookieCategories) { 941 942 cookieCategories.forEach(function(item, i) { 943 var categBlockTop = buildCategoryInfo(item.name, item.description, item.key); 944 var categBlockInfo = buildCookieGroupInfo(item.key); 945 var categoryBlockEnd = '</div>'; 946 var categBlockCombined = ''; 947 948 if (categBlockInfo !== "no cookies") { 949 categBlockCombined = categBlockTop + categBlockInfo + categoryBlockEnd; 950 } 951 952 groupBlocksData.push(categBlockCombined); 953 954 }); 955 } 956 957 return { 958 generateTables: function () { 959 var cookieTables = ''; 960 groupBlocksData.forEach(function(item, i) { 961 cookieTables += item; 962 }); 963 return cookieTables; 964 } 965 } 966 967 968 } 969 } 970}); 971 972var cookieConsentRegistry = saffire.cookies.cookieRegistry(cookieMetaData); 973var cookiePrivacyInfo = saffire.cookies.privacyTermsCookieInfo(cookieMetaData); 974var cookieConsentMgr = saffire.cookies.cookieConsentManager(cookieConsentRegistry); 975;
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.