1window.ml___params = window.ml___params || {}; 2window.ml___params._opt_out = getInitialMetaLocatorOptOutState(); 3 4function getInitialMetaLocatorOptOutState() { 5 let optOut = 1; 6 7 const match = document.cookie.match(/(^|;) ?OptanonConsent=([^;]*)(;|$)/); 8 9 if (!match) 10 return optOut; 11 12 const consentData = decodeURIComponent(match[2]); 13 const groupsMatch = consentData.match(/groups=([^&]+)/); 14 15 if (!groupsMatch) 16 return optOut; 17 18 const groups = groupsMatch[1]; 19 const hasNecessary = groups.includes("C0001:1"); 20 const hasAnalytics = groups.includes("C0002:1"); 21 const hasFunctional = groups.includes("C0003:1"); 22 const hasTargeting = groups.includes("C0004:1"); 23 24 if ((hasNecessary && hasFunctional) && (hasAnalytics || hasTargeting)) { 25 optOut = 0; 26 } 27 28 return optOut; 29} 30 31function applyMetaLocatorConsent(activeGroupsArray) { 32 const hasNecessaryConsent = activeGroupsArray.includes("C0001"); 33 const hasAnalyticsConsent = activeGroupsArray.includes("C0002"); 34 const hasFunctionalConsent = activeGroupsArray.includes("C0003"); 35 const hasTargetingConsent = activeGroupsArray.includes("C0004"); 36 37 let optOut = 1; 38 39 if ((hasNecessaryConsent && hasFunctionalConsent) && (hasAnalyticsConsent || hasTargetingConsent)) { 40 optOut = 0; 41 } 42 43 window.ml___params._opt_out = optOut; 44 45 if (typeof ml___setOptOutState === 'function') { 46 ml___setOptOutState(optOut); 47 } 48} 49 50function OptanonWrapper() { 51 if (typeof OneTrust !== 'undefined') { 52 OneTrust.OnConsentChanged(function (e) { 53 applyMetaLocatorConsent(e.detail); 54 }); 55 } 56}
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.