/*global document, window */ var checkoutExternalUrls = [ '/checkout-external', '/tickets-external', '/signin/checkout', ]; window.EB = window.EB || {}; window.EB.TranscendConsent = (function () { return { shouldDisableTranscend: function () { if(this.isEmbeddableContent()){ return true; } try { return this.isCheckoutOrIframe(); } catch (e) { return true; } }, isEmbeddableContent: function () { return this.isEmbeddableStructuredContent(); }, isEmbeddableStructuredContent: function () { var structuredContenEmbeddableUrls = [ '/structured_content/widgets', ]; if(structuredContenEmbeddableUrls.find(function(url){ return window.location.pathname.indexOf(url) !== -1; })){ return true; } return false; }, isCheckoutOrIframe: function () { return ( checkoutExternalUrls.indexOf(window.location.pathname) >= 0 || this.isInsideIframe() ); }, isInsideIframe: function () { try { return window.self !== window.top; } catch (e) { return true; } }, isNonTld: function () { try { return !['evbdev', 'evbqa', 'eventbrite'].find( (env) => window.parent.location.hostname.indexOf(env) >= 0, ); } catch (e) { return true; } }, isInsideNonTldIframe: function () { return this.isInsideIframe() && this.isNonTld(); }, }; })();