[]
1 ? decodeURIComponent( value[1].split(‘;’)[0] ).replace( /+/g, ‘ ‘ ) : null; } var e = uls_cookie( ‘entitlement’ ) || ‘none’, p = uls_cookie( ‘provider_name’ ) || ‘none’; dim[“dimension16”] = e; dim[“dimension23”] = p; if ( p === ‘ip’ ) { dim[“dimension19”] = ‘organization’; dim[“dimension22”] = uls_cookie( ‘org_id’ ) || uls_cookie( ‘user_identifer’ ) || false; dim[“dimension21”] = uls_cookie( ‘username’ ) || false; } else { dim[“dimension19”] = ‘individual’; dim[“dimension20”] = uls_cookie( ‘user_id’ ) || uls_cookie( ‘username’ ) || false; if( p === ‘cds’ ) { dim[“dimension32”] = uls_cookie( ‘spc’ ) || false; dim[“dimension33”] = uls_cookie( ‘product_id’ ) || false; } } if ( dim[“dimension29”] !== ‘staff’ && ( e !== ‘none’ || /reteng/.test( location.search || window.pmc && pmc.tracking._tokens.utm_campaign ) ) ) { dim[“dimension29”] = ‘subscriber’; } var user_data = JSON.parse( decodeURIComponent( pmc.cookie.get( “pmcsc_sub_reporting_data” ) ) ) || {}; var acct_data = user_data.acct || {}; var is_logged_in = false; var user_type = “anonymous”; var is_regd = false; var has_active_subs = false; var brand_name = “variety-vip”; // Determine if the user is logged in or not if ( user_data.ses ) { is_logged_in = Object.keys( user_data.ses ).length > 0; } if ( is_logged_in ) { // Determine if the user is registered for the current site // Determine if the user has any active subscriptions if ( user_data.entitlements ) { for ( var i = 0; i -1 ) { if ( user_data.entitlements[ i ].toLowerCase().indexOf( brand_name ) > -1 ) { is_regd = true; } } else { if ( user_data.entitlements[ i ].toLowerCase().indexOf( brand_name ) > -1 ) { has_active_subs = true; } } } } // Determine the type of the current user. // The following order is important if ( Object.keys( user_data ).length > 0 ) { user_type = ‘known’; } if ( is_regd ) { user_type = ‘registrant’; } if ( has_active_subs ) { user_type = ‘subscriber’; } } dim[“dimension16”] = user_data.entitlements || false; dim[“dimension29”] = user_type; dim[“dimension19”] = acct_data.type || false; dim[“dimension20”] = acct_data.contact_id || false; dim[“dimension22”] = acct_data.acct_id || false; dim[“dimension21”] = acct_data.name || false; dim[“dimension23”] = user_data.auth || false; dim[“dimension32”] = false; dim[“dimension33”] = false; dim[“dimension17”] = “”; dim[“dimension18”] = false; dim[“dimension24”] = is_logged_in ? ‘yes’ : ‘no’; })(pmc_ga_dimensions); var pmc_ga_fields_obj = {“useAmpClientId”:true}; ga(‘create’, “UA-9332405-1″, ‘auto’, pmc_ga_fields_obj); ga(‘set’, ‘forceSSL’, true); if ( window.pmc && pmc.tracking ) { ga(‘set’, ‘hitCallback’, function() { pmc.tracking.do_call_events(); }); var utms = pmc.tracking.get_properties_string(); if ( utms !== ” ) { // the utm params are gone already so add them back ga(‘set’, ‘location’, location.href.split(‘#’)[0] + ( location.search ? ‘&’ : ‘?’ ) + utms); } } ga(‘require’, ‘linkid’, ‘linkid.js’); ga(‘require’, “GTM-N8Z8XVQ” ); ga(‘require’, ‘displayfeatures’); ga(‘set’, pmc_ga_dimensions); window.pmcGaCustomDimensions = pmc_ga_dimensions; ga(‘send’, ‘pageview’); ]]> { e.preventDefault(); }); ]]> 0 ) { // Condition Only to excepts `and` and `or` condition, other values would be treated as `or`. if ( ‘and’ === condition ) { // Return true if every element of `entitlements` is present in `subscriber_data.user.entitlements`. return entitlements.every( function ( value ) { return ( self.subscriber_data.user.entitlements.indexOf( value ) >= 0 ); } ); } else { // Return true if any element of `entitlements` is present in `subscriber_data.user.entitlements`. return entitlements.some( function ( value ) { return (self.subscriber_data.user.entitlements.indexOf( value ) >= 0); } ); } } else { return self.subscriber_data.user.entitlements.length > 0; } } return false; }, /** * Return `true` is a user is concurrency restricted. * * @return {boolean} */ is_restricted: function() { var self = pmc.subscription_v2; if ( self.has_session_data( ‘concurrency_restricted’ ) ) { return self.subscriber_data.session.concurrency_restricted; } return false; }, is_registered_user: function() { var self = pmc.subscription_v2; if ( self.has_user_data() && self.subscriber_data.user.acct.hasOwnProperty( ‘reg’ ) ) { if ( self.subscriber_data.user.acct.reg.hasOwnProperty( self.brands[self.brand_name] ) ) { var reg = self.subscriber_data.user.acct.reg[self.brands[self.brand_name]]; if ( reg.hasOwnProperty( ‘cam’ ) && reg.hasOwnProperty( ‘date’ ) ) { return ( reg.cam > 0 ) && ( reg.date.match(/^d{4}-d{2}-d{2}$/).length > 0 ); } } } return false; }, get_registered_user_data: function() { var self = pmc.subscription_v2; return self.subscriber_data.user.acct.reg[self.brands[self.brand_name]]; }, /** * Show/hide links depending of the current user status * * @return {void} */ render_links: function () { var self = pmc.subscription_v2; // Check if the theme will take care of rendering these links. // If so, exit early so those changes aren’t overwritten. if (self.render_links_from_theme) { return; } var show_or_hide_element = function(selector, show_element) { var element = document.querySelector(selector); if (element) { var display = show_element ? ” : ‘none’; element.style.display = display; } }; var is_logged_in_user = self.has_user() && self.has_session(); // Show logout button if user is already logged in link and hide logout if ( is_logged_in_user && ! self.is_logged_out_action() ) { // Remove class `user-not-logged-in` if user is logged in for subscription links container var subscriptionLinks = document.querySelector(‘.subscription-links’); if ( subscriptionLinks ) { subscriptionLinks.className = subscriptionLinks.className.replace(‘user-not-logged-in’, ”); } // Show user name and set logout session id var givenNameNode = document.querySelector(‘.subscriber-name .replace-username’); var logoutElements = document.querySelectorAll(‘.subscriber-logout-link’); if (givenNameNode) { givenNameNode.innerText = self.subscriber_data.user.given_name; } if (logoutElements) { logoutElements.forEach( function(element) { element.href = element.href + ‘&session-id=’ + self.subscriber_data.session.session_id; }); } // Show and hide links show_or_hide_element(‘.subscriber-name’, true); show_or_hide_element(‘.subscribe-link’, false); document.querySelectorAll(‘.subscriber-login-link’).forEach( function(element){ element.style.display = ‘none’; }); if ( ! self.has_site_license() ) { show_or_hide_element(‘.subscriber-logout-link’, true); show_or_hide_element(‘.subscriber-self-care-link’, true); } } else { // Show “Subscribe” and “Login” links show_or_hide_element(‘.subscribe-link’, true); document.querySelectorAll(‘.subscriber-login-link’).forEach( function(element){ element.style.display = ”; }); // Send log to rollbar when user clicks login link document.querySelectorAll( “[href^='” + self.login_link + “‘]” ).forEach( function ( element ) { element.addEventListener( ‘click’, function ( event ) { var href = this.getAttribute( ‘href’ ); try { event.preventDefault(); Rollbar.debug( ‘User clicked subscriber-login-link’, function () { window.location.href = href; } ); } catch ( e ) { window.location.href = href; } } ); } ); } }, /** * Determine if the subscriber data object is empty. * * @returns {boolean} */ has_subscriber_data: function () { return Object.keys(this.subscriber_data).length > 0; }, /** * Determine if we have logged out action * * @returns {boolean} */ is_logged_in_action: function () { var urlParams = pmc.subscription_v2.get_url_params(); return ‘logged_in’ === urlParams.get(‘sub_action’); }, /** * Determine if we have logged out action * * @returns {boolean} */ is_logged_out_action: function () { var urlParams = pmc.subscription_v2.get_url_params(); return ‘logged_out’ === urlParams.get(‘sub_action’); }, /** * Register a callback that fires when user data is done loading. * * Note: If user data is already loaded when this is called, * the callback is fired immediately. * * @param callback * @param loggedOutCallback – Optional callback that fires immediately when the user is not logged in. */ on_subscriber_data_loaded: function (callback, loggedOutCallback) { loggedOutCallback = loggedOutCallback || function () {}; // Trigger the callback immediately if user data has already been set. if (this.has_user() && this.has_subscriber_data()) { callback(this.subscriber_data); return; } // Trigger the logged out callback immediately if the user isn’t logged in. if (! this.has_session()) { loggedOutCallback(); return; } this.subscriber_data_listeners.push(callback); }, /** * Show concurrency message if the user has some restrictions. */ may_show_concurrency_restricted_modal: function(subscriber_data) { var self = pmc.subscription_v2; if (! self.is_paywall_content || ! self.is_single_post || ! self.has_session()) { return false; } if (subscriber_data && subscriber_data.session.concurrency_restricted) { var concurrencyText = “You are logged in to too many devices. Please log out of a device and reload this page.”; var headerText = “This log in is currently in use”; var concurrencyModalId = ‘pmc-subscription__concurrency-restricted-modal’; var restrictedModalBodyElement = document.querySelector(‘#pmc-subscription__concurrency-restricted-modal-message’); if (restrictedModalBodyElement) { restrictedModalBodyElement.innerText = concurrencyText; } var restrictedModalHeaderElement = document.querySelector(‘#pmc-subscription__concurrency-restricted-modal .modal__header h4’); if (restrictedModalHeaderElement) { restrictedModalHeaderElement.innerText = headerText; } MicroModal.show(concurrencyModalId); } }, /** * Show account login modal when click account link */ may_show_account_login_modal: function(event) { var self = pmc.subscription_v2; var accountTypesForModal = [‘Agents’, ‘Corporate’, ‘Site License’]; var userCurrentAccountType = self.subscriber_data.user.acct.type; if (accountTypesForModal.indexOf(userCurrentAccountType) !== -1 ) { event.preventDefault(); var bodyText = ”; var headerText = ”; switch (userCurrentAccountType) { case ‘Agents’: headerText = ‘Contact customer service’; bodyText = “For questions regarding your Variety VIP+ subscription, please email customerservicevip@variety.com or call 888-222-0276 (US & Canada) or 332-219-2192 (International).”; break; case ‘Corporate’: case ‘Site License’: headerText = ‘Contact your corporate administrator’; bodyText = “Need help contacting your corporate administrator regarding your Variety VIP+ access? Please email customerservicevip@variety.com or call 888-222-0276 (US & Canada) or 332-219-2192 (International).”; break; } var accountLoginModal = ‘pmc-subscription__account-login-modal’; var accountLoginModalBodyElement = document.querySelector(‘#pmc-subscription__account-login-message’); if (accountLoginModalBodyElement) { accountLoginModalBodyElement.innerText = bodyText; } var accountLoginModalHeaderElement = document.querySelector(‘#pmc-subscription__account-login-header’); if (accountLoginModalHeaderElement) { accountLoginModalHeaderElement.innerText = headerText; } MicroModal.show(accountLoginModal); } }, /*** * Show verify Identity Modal */ may_show_verify_identity_modal: function() { var self = pmc.subscription_v2; // Only show the verify modal to non-SL users without a session if ( self.has_session() || self.has_site_license() || self.is_admin_user || self.is_token_user ) { return; } var dismiss_link = document.getElementById( ‘pmc-subscription__verify-identity-dismiss’ ); if ( dismiss_link ) { dismiss_link.addEventListener( ‘click’, self.delete_subscriber_cookie ); } // Only show the verify modal on paid content if ( ! self.is_paywall_content || ! self.is_single_post ) { return; } MicroModal.show( ‘pmc-subscription__verify-identity-modal’ ); }, /** * Fires any listeners once subscriber data is loaded. */ trigger_user_data_listeners: function () { var self = this; if (self.subscriber_data_listeners.length === 0) { return; } if (! self.has_subscriber_data()) { console.error(‘User data listeners triggered, but no user data exists.’); return; } self.subscriber_data_listeners.forEach(function (callback) { callback(self.subscriber_data) }); // Clear listeners self.subscriber_data_listeners = []; }, /** * Allows a theme to override link rendering */ override_rendering_links: function() { var self = this; self.render_links_from_theme = true; }, /** * Call callback function when window is loaded or if already loaded */ window_load_event: function(callback) { if (document.readyState === ‘complete’) { callback(); } else { window.addEventListener(“load”, callback); } }, /** * Show subscriber error modal if we have an issue in the login process */ may_show_subscriber_error_modal: function() { var self = pmc.subscription_v2; var urlParams = self.get_url_params(); var subErrorText = urlParams.get(‘sub_error’); var hasSubActionError = ‘error’ === urlParams.get(‘sub_action’); if (hasSubActionError && (subErrorText && ” !== subErrorText)) { var modalBodyElement = document.querySelector(‘#pmc-subscription__subscriber-error-message’); if (modalBodyElement) { modalBodyElement.innerText = “For assistance, please contact Customer Service at customerservicevip@variety.com, 888-222-0276 (US & Canada) or 332-219-2192 (International).”; } var modalHeaderElement = document.querySelector(‘#pmc-subscription__subscriber-error-modal .modal__header h4’); if (modalHeaderElement) { modalHeaderElement.innerText = subErrorText; } var subscriberErrorModalId = ‘pmc-subscription__subscriber-error-modal’; MicroModal.show(subscriberErrorModalId); } }, /** * Delete subscriber cookie and refresh page */ delete_subscriber_cookie: function( event ){ // delete cookie before make the logout request to our authorization api service // this method is also used by the verify modal to destroy all user cookies if ( ! this.getAttribute( ‘data-logout-action’ ) ) { event.preventDefault(); var currentElement = this; var self = pmc.subscription_v2; var url = self.ajax_url; var params = ‘?action=pmc_delete_subscriber_cookie_ajax_callback’; var xhr = self.get_xhr_get( url, params ); xhr.onload = function () { var response = JSON.parse( this.response ); var session_id = self.get_url_params( currentElement.href ).get( ‘session-id’ ); if ( ‘undefined’ === typeof session_id || ” === session_id ) { Rollbar.warn( ‘Logout URL missing session-id’, { session: self.get_session_data() } ); return; } if ( 200 !== this.status || true !== response.success ) { Rollbar.warn( ‘Logout AJAX failed’, { session: self.get_session_data(), xhrStatus: this.status, xhrStatusText: this.statusText, xhrResponse: response, xhrResponseURL: this.responseURL } ); return; } currentElement.setAttribute( ‘data-logout-action’, true ); try { Rollbar.info( ‘User logged out’, { has_session_data: self.has_session_data(), session_id: session_id }, function () { currentElement.click(); } ); } catch ( e ) { currentElement.click(); } }; return xhr.send(); } }, get_url_params: function( url ) { var queryString = ”; if ( ‘undefined’ === typeof url || ” === url ) { queryString = window.location.search; } else { var splitUrl = url.split( ‘?’ ); if ( splitUrl[1] ) { queryString = splitUrl[1]; } } if ( ‘URLSearchParams’ in window ) { return new URLSearchParams( queryString ); } else { return { ‘get’: function() { return ”; } }; } }, /** * Set body class for different user state. * – Adds subscription user,entitlements and session classes to body element. */ set_body_class: function() { // 1. Setting user class. if ( this.has_user() ) { document.body.classList.add( ‘pmc-subscription-has-user’ ); } // 2. Setting user entitlement class. if ( this.has_entitlements() ) { this.subscriber_data.user.entitlements.forEach( function( entitlement ) { document.body.classList.add( ‘pmc-subscription-user-entitlement-‘ + entitlement.replace(“.”, “_”).toLowerCase() ); } ); } // 3. Setting user session class. if ( this.has_session() ) { document.body.classList.add( ‘pmc-subscription-user-has-session’ ); } }, /** * Sort Entitlement based on entitlement config. */ get_translated_entitlement: function() { var self = this; if ( ! self.brand_name || ! self.has_entitlements() ) { return; } var brand = self.brand_name; // Set brand name var translation_config = self.entitlement_translation_config[ brand ]; // Get brand specific entitlement rules. var translated_entitlement = null; // Defining default translated entitlement. var temp_max = 0; // Default Max element of entitlements. // Loop in through brand specific config entitlements. for ( key in translation_config ) { // Loop all the translated entitlement rules. for( i=0; i < translation_config[ key ].length ; i++ ) { // Return config values if all entitlements are present. if( this.has_entitlements( translation_config[ key ][ i ].sort(), 'and' ) ) { // Match maximum entitlements. if( temp_max 0 ? user.entitlements.join( ',' ) : false; Rollbar.info( 'User authenticated by IP Auth', { sf_account_id: acct.acct_id || false, sf_contact_id_id: acct.contact_id || false, entitlements: entitlements } ); }catch(e){} window.location.href = window.location.href + "?sub_action=logged_in"; } }); } } }; pmc.subscription_v2.init(); ]]> -1; if ( ! scrollSubscriber ) { pmcLoadVenatus(); } })(); ]]>
Rogen: Maarten de Boer; Hwang: John Pinderhughes
optional screen reader
Read More About:
JavaScript is required to load the comments.
Most Popular
Sign Up for Variety Newsletters
ad
{{ result.published_at | date: “%h %d, %Y” }}
{{ result.name }} ]]> To help keep your account secure, please log-in again. You are no longer onsite at your organization. Please log in.
For assistance, contact your corporate administrator. { } ); } } ); } ]]> 0) { __qc.qpixelsent.length = 0; } // First Quantcast Tag _qoptions={ qacct:”” }; quantserve(); } catch(err) {} // Track Comscore try { setTimeout(function(){ var url = “http” + (/^https:/.test(document.location.href) ? “s” : “”) + “://beacon.scorecardresearch.com/scripts/beacon.dll” + “?c1=2&c2=6035310&c3=&c4=&c5=&c6=&c7=” + escape(document.location.href) + “&c8=” + escape(document.title) + “&c9=” + escape(document.referrer) + “&c10=” + escape(screen.width+’x’+screen.height) + “&rn=” + (new Date()).getTime(); var i = new Image(); i.src = url; }, 1); COMSCORE.beacon({c1:2,c2:”6035310″,c3:”6035310″,c4:””,c5:””,c6:””,c15:””}); } catch(err) {} if (‘undefined’ !== typeof window.cxpmc && ‘function’ === typeof window.cxpmc.report_gallery_pv) { window.cxpmc.report_gallery_pv(); } /** * Track pageview end */ } ]]> -1; if ( ! scrollSubscriber ) { var digiohVisitorFromEmail = !! 0; (function(){ window.setTimeout( function() { var tag = document.createElement( ‘script’ ); tag.type = “text/javascript”; tag.src = “https://www.lightboxcdn.com/vendor/54fc2134-b361-4697-a2de-ca735b8070e2/lightbox_inline.js”; tag.async = true; var parent = document.getElementsByTagName( ‘script’ )[0]; parent.parentNode.insertBefore( tag, parent ); }, 500 ); })(); } ]]>
=0&&(n||p.has(t)||”hidden”===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},l=-1,v=function(){return”hidden”===document.visibilityState?0:1/0},w=function(){f((function(e){var t=e.timeStamp;l=t}),!0)},g=function(){return l<0&&(l=v(),w(),d((function(){setTimeout((function(){l=v(),w()}),0)}))),{get timeStamp(){return l}}},y={passive:!0,capture:!0},b=new Date,S=function(e,t){i||(i=t,a=e,r=new Date,T(removeEventListener),h())},h=function(){if(a>=0&&a1e12?new Date:performance.now())-e.timeStamp;”pointerdown”==e.type?function(e,t){var n=function(){S(e,t),a()},i=function(){a()},a=function(){removeEventListener(“pointerup”,n,y),removeEventListener(“pointercancel”,i,y)};addEventListener(“pointerup”,n,y),addEventListener(“pointercancel”,i,y)}(t,e):S(t,e)}},T=function(e){[“mousedown”,”keydown”,”touchstart”,”pointerdown”].map((function(t){return e(t,L,y)}))};const E=()=>{const{sendToGA:e}=window.pmc.webVitals.config;return e&&”function”==typeof ga},O=(e,t)=>Math.round(“CLS”===e?1e4*t:t),P=e=>{const{name:t}=e;window.pmc.webVitals.queue[t]=e},k=({id:e,name:t,delta:n})=>{const{eventCategory:i,tracker:a}=window.pmc.webVitals.config,r={eventCategory:i,eventAction:t,eventValue:O(t,n),eventLabel:e,nonInteraction:!0};E()?ga(a+”.send”,”event”,r):console.info(r)};window.addEventListener(“DOMContentLoaded”,()=>{if(!window.pmc.webVitals.config.blockGA){const{sampleThreshold:e}=window.pmc.webVitals.config,t=()=>{let t=0,n=0;for(;t<3;)n+=Math.random(),t++;return n/=3,n<=1/e};window.pmc.webVitals.config.sendToGA=t()}!function(e,t){var n,i=c("CLS",0),a=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},r=u("layout-shift",a);r&&(n=m(e,i,t),f((function(){r.takeRecords().map(a),n()})),d((function(){i=c("CLS",0),n=m(e,i,t)})))}(P),function(e,t){var n,i=g(),a=c("FCP"),r=u("paint",(function(e){"first-contentful-paint"===e.name&&(r&&r.disconnect(),e.startTime
Source
