(function () { var ddOriginalReferrer = document.referrer; var ddFpHashes = ['C992DCAFEE25FA95C6492C61EB3328']; var popUpAllowedClientKeys = [ 'F45F521D9622089B5E33C18031FB8E', '10D43DA6B79A5089E1A7846864D6BD', '34C213C44735CBC8D9C08B65110F96', 'D428D51E28968797BC27FB9153435D', ]; try { if (!ddOriginalReferrer && dd.rr) { ddOriginalReferrer = decodeURIComponent(dd.rr); } } catch (_) { /* Silent failure if decodeURIComponent throws */ } /** * Saves actual referrer to session storage * @return {void} */ function saveReferrer() { try { window.sessionStorage.setItem('ddOriginalReferrer', ddOriginalReferrer); } catch (error) { // Silently fails } } saveReferrer(); var noScriptMessageElement = document.getElementById('cmsg'); var noScriptMessageText = noScriptMessageElement ? noScriptMessageElement.innerText : ''; var getRefererQueryParamString = function () { try { var prefix = '&referer='; if (window.location !== window.parent.location) { // Nested Iframe return prefix + encodeURIComponent(window.location.href); } return prefix + encodeURIComponent(window.parent.location.href); } catch (e) { return ''; } }; var isSafari = window.navigator ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false; var stretchHeightRule = isSafari ? 'height: -webkit-fill-available;' : ''; var refererQueryParamFull = dd.sfcc ? '&referer=' + encodeURIComponent( dd.requestUrl ? document.location.protocol + '//' + document.location.hostname + dd.requestUrl.replace(new RegExp('-', 'g'), '-') : document.referrer ) : getRefererQueryParamString(); var getDDCookie = function (value) { var r = new RegExp('datadome=([^;]+)'); var v = r.exec(value); if (v != null) { try { return decodeURIComponent(v[1]); } catch (e) { return v[1]; } } return null; }; function getHostname(url) { var scheme = 'https://'; if (typeof url !== 'string' || url.indexOf(scheme) !== 0) { return ''; } return url.replace(scheme, '').split('/')[0]; } // Check if a URL is coming from a DataDome origin. function isDatadomeOrigin(url) { var ddHosts = ['.datado.me', '.captcha-delivery.com']; var hostname = getHostname(url); if (!hostname) { return false; } for (var i = 0; i < ddHosts.length; i++) { var ddHost = ddHosts[i]; if (hostname.indexOf(ddHost, hostname.length - ddHost.length) !== -1) { return true; } } return false; } function shouldCheckFpOrigin(hash) { return ddFpHashes.indexOf(hash) > -1; } function isFpOrigin(url) { var hostname = getHostname(url); var currentHostname = getHostname(window.location.href); if (!hostname || !currentHostname) { return false; } var hostnameParts = hostname.split('.').reverse(); var currentHostnameParts = currentHostname.split('.').reverse(); var matchCount = 0; for (var i = 0; i < currentHostnameParts.length; ++i) { if (hostnameParts[i] === currentHostnameParts[i]) { ++matchCount; } else { break; } } return matchCount >= 2 && hostnameParts[matchCount] === 'ddc'; } function isTrustedOrigin(url) { return isDatadomeOrigin(url) || (shouldCheckFpOrigin(dd.hsh) && isFpOrigin(url)); } function generateIframe(dd, noScriptMessageText, volatile, stretchHeightRule) { var targetOrigin = 'https://' + dd.host.replace(new RegExp('-', 'g'), '-'); if (!isTrustedOrigin(targetOrigin)) { console.error( '%c Invalid Device Check origin: ' + targetOrigin, 'background: red; color: #fff' ); return; } var isIframeLoaded = false; var maxTimeoutMs = 5000; function iframeOnload() { isIframeLoaded = true; var noIframeElem = document.getElementById('noiframe'); if (noIframeElem) { noIframeElem.parentNode.removeChild(noIframeElem); } } if ( typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Firefox') > -1 ) { var initialTime = new Date().getTime(); setTimeout(function () { if (!isIframeLoaded && new Date().getTime() - initialTime > maxTimeoutMs) { document.body.innerHTML = '