var OneSignal=window.OneSignal||[];OneSignal.push(function(){var a,b=!1,c="",d=!0,e=!0;"undefined"!=typeof GN_OneSignalSettings&&(b=GN_OneSignalSettings.isCurator,c=GN_OneSignalSettings.appId),OneSignal.init({appId:c}),OneSignal.on("popoverShown",function(){var b=document.querySelector("#onesignal-slidedown-dialog");if(b){const c="We'd like to send you alerts for the latest news, features, and updates from Global News, as well as exclusive offers, sales, and trending products from The Curator.";var f=document.querySelector("#onesignal-slidedown-cancel-button"),g=document.querySelector("#onesignal-slidedown-allow-button"),h=document.createElement("div"),i=document.createTextNode(c);a=document.activeElement||document.body,h.appendChild(i),h.classList.add("sr-only"),h.classList.add("one-signal-hidden-button"),h.setAttribute("id","one-signal-description-id"),b.appendChild(h),b.setAttribute("aria-describedby","one-signal-description-id"),b.setAttribute("tabindex",0),b.setAttribute("aria-modal",!0),b.setAttribute("role","alertdialog"),b.setAttribute("aria-label","Onesignal notifications alert"),g.focus();var j=document.querySelector("#onesignal-slidedown-dialog .slidedown-body-icon img"),k=j.cloneNode(!0);j.classList.add("news-icon"),k.classList.add("curator-icon"),k.src="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20id%3D%22NEGATIVE_VERTICAL_copy%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewBox%3D%220%200%2045%2045%22%3E%3C!--%20Generator%3A%20Adobe%20Illustrator%2029.5.0%2C%20SVG%20Export%20Plug-In%20.%20SVG%20Version%3A%202.1.0%20Build%20137)%20%20--%3E%3Cdefs%3E%3Cstyle%3E%20%20%20%20%20%20.st0%20%7B%20%20%20%20%20%20%20%20fill%3A%20%23eceded%3B%20%20%20%20%20%20%7D%20%20%20%20%20%20.st1%20%7B%20%20%20%20%20%20%20%20fill%3A%20%23c46a6b%3B%20%20%20%20%20%20%7D%20%20%20%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Crect%20class%3D%22st1%22%20width%3D%2245%22%20height%3D%2245%22%2F%3E%3Cg%20id%3D%22LOGO_THIN%22%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M12.3%2C16.87h-1.47v4.08h-.6v-4.08h-1.47v-.49h3.53v.49Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M16.45%2C20.95h-.61v-2.11h-2.3v2.11h-.6v-4.57h.6v1.96h2.3v-1.96h.61v4.57Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M20.07%2C18.84h-1.98v1.62h2.3v.49h-2.9v-4.57h2.87v.49h-2.27v1.47h1.98v.49Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M12.5%2C25.33c-.06.48-.23.86-.54%2C1.12s-.7.39-1.2.39c-.54%2C0-.97-.19-1.3-.58-.33-.39-.49-.9-.49-1.55v-.44c0-.42.08-.8.23-1.12s.37-.57.65-.74c.28-.17.6-.26.97-.26.49%2C0%2C.87.14%2C1.17.41.29.27.46.65.51%2C1.13h-.61c-.05-.37-.17-.63-.34-.79-.17-.16-.42-.25-.73-.25-.39%2C0-.69.14-.91.43-.22.28-.33.69-.33%2C1.22v.44c0%2C.5.1.89.31%2C1.18.21.29.5.44.87.44.33%2C0%2C.59-.08.77-.23.18-.15.3-.42.36-.79h.61Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M16.51%2C22.21v3.11c0%2C.43-.14.78-.41%2C1.06-.27.27-.63.43-1.09.46h-.16c-.5%2C0-.9-.13-1.2-.4s-.45-.64-.45-1.11v-3.11h.6v3.09c0%2C.33.09.59.27.77.18.18.44.27.78.27s.6-.09.78-.27c.18-.18.27-.44.27-.77v-3.1h.61Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M19.1%2C24.93h-1.07v1.85h-.61v-4.57h1.51c.51%2C0%2C.91.12%2C1.19.35.28.23.42.58.42%2C1.02%2C0%2C.28-.08.53-.23.74-.15.21-.37.37-.64.47l1.07%2C1.94v.04h-.65l-.99-1.85ZM18.03%2C24.44h.93c.3%2C0%2C.54-.08.71-.23.18-.16.27-.36.27-.62%2C0-.28-.08-.5-.25-.65s-.41-.23-.73-.23h-.92v1.74Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M23.99%2C25.59h-1.91l-.43%2C1.2h-.62l1.74-4.57h.53l1.75%2C4.57h-.62l-.44-1.2ZM22.26%2C25.09h1.55l-.78-2.14-.78%2C2.14Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M28.09%2C22.7h-1.47v4.08h-.6v-4.08h-1.47v-.49h3.53v.49Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M32.11%2C24.64c0%2C.45-.08.84-.23%2C1.17s-.36.59-.64.76-.6.26-.97.26-.68-.09-.96-.27c-.28-.18-.49-.43-.65-.76-.15-.33-.23-.71-.24-1.14v-.33c0-.44.08-.83.23-1.16.15-.34.37-.59.65-.77.28-.18.6-.27.96-.27s.69.09.97.27c.28.18.49.43.65.77.15.34.23.73.23%2C1.17v.29ZM31.51%2C24.35c0-.54-.11-.96-.33-1.25-.22-.29-.52-.43-.91-.43s-.68.14-.9.43c-.22.29-.33.69-.34%2C1.21v.34c0%2C.53.11.94.33%2C1.24.22.3.52.45.91.45s.69-.14.9-.43c.21-.28.32-.69.33-1.22v-.34Z%22%2F%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M34.62%2C24.93h-1.07v1.85h-.61v-4.57h1.51c.51%2C0%2C.91.12%2C1.19.35.28.23.42.58.42%2C1.02%2C0%2C.28-.08.53-.23.74-.15.21-.37.37-.64.47l1.07%2C1.94v.04h-.65l-.99-1.85ZM33.54%2C24.44h.93c.3%2C0%2C.54-.08.71-.23.18-.16.27-.36.27-.62%2C0-.28-.08-.5-.25-.65s-.41-.23-.73-.23h-.92v1.74Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",j.after(k);const l=document.querySelector("#onesignal-slidedown-dialog .slidedown-body-icon");l.style.width="120px",j.style.position="absolute",j.style.left="1em",j.style.width="45px",j.style.height="45px",k.style.position="absolute",k.style.right="0",k.style.width="45px",k.style.height="45px";const m=document.querySelector("#onesignal-slidedown-dialog .slidedown-body-message");m.style.width="calc( 100% - 120px )",m.textContent=c,f.addEventListener("keydown",function(a){a.shiftKey||9!==a.keyCode||(a.preventDefault(),g.focus())}),g.addEventListener("keydown",function(a){a.shiftKey&&9===a.keyCode&&(a.preventDefault(),f.focus())});var n=document.querySelector('#onesignal-slidedown-dialog input[value="news"]');n.addEventListener("change",function(){d=this.checked});var o=document.querySelector('#onesignal-slidedown-dialog input[value="the-curator"]');o.addEventListener("change",function(){e=this.checked}),"undefined"!=typeof gn_analytics&&gn_analytics.Analytics&&gn_analytics.Analytics.track("adobe",{action:"push notification prompt"})}}),OneSignal.on("popoverClosed",function(){a.focus()}),OneSignal.on("popoverAllowClick",function(){"undefined"!=typeof gn_analytics&&gn_analytics.Analytics&&gn_analytics.Analytics.track("adobe",{action:"push notification subscription"})}),OneSignal.setCookie=function(a,b,c){var d=new Date;d.setTime(d.getTime()+24*c*60*60*1e3);var e="expires="+d.toUTCString();document.cookie=a+"="+b+";"+e+";path=/"},OneSignal.getCookie=function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d 1 ) { keypress.push( keydowns[ e.key ][1] ); } keypresses.push( keypress ); } } delete keydowns[ e.key ]; lastKeyup = keyupTime; }, supportsPassive ? { passive: true } : false ); form.addEventListener( "focusin", function ( e ) { lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); form.addEventListener( "focusout", function ( e ) { lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); } document.addEventListener( 'mousedown', function ( e ) { lastMousedown = ( new Date() ).getTime(); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'mouseup', function ( e ) { if ( ! lastMousedown ) { // If the mousedown happened before this script was loaded, but the mouseup happened after... return; } var now = ( new Date() ).getTime(); var mouseclick = []; mouseclick.push( now - lastMousedown ); if ( lastMouseup ) { mouseclick.push( lastMousedown - lastMouseup ); } mouseclicks.push( mouseclick ); lastMouseup = now; // If the mouse has been clicked, don't record this time as an interval between keypresses. lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'mousemove', function ( e ) { if ( mousemoveTimer ) { clearTimeout( mousemoveTimer ); mousemoveTimer = null; } else { mousemoveStart = ( new Date() ).getTime(); lastMousemoveX = e.offsetX; lastMousemoveY = e.offsetY; } mousemoveTimer = setTimeout( function ( theEvent, originalMousemoveStart ) { var now = ( new Date() ).getTime() - 500; // To account for the timer delay. var mousemove = []; mousemove.push( now - originalMousemoveStart ); mousemove.push( Math.round( Math.sqrt( Math.pow( theEvent.offsetX - lastMousemoveX, 2 ) + Math.pow( theEvent.offsetY - lastMousemoveY, 2 ) ) ) ); if ( mousemove[1] > 0 ) { // If there was no measurable distance, then it wasn't really a move. mousemoves.push( mousemove ); } mousemoveStart = null; mousemoveTimer = null; }, 500, e, mousemoveStart ); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchmove', function ( e ) { if ( touchmoveCountTimer ) { clearTimeout( touchmoveCountTimer ); } touchmoveCountTimer = setTimeout( function () { touchmoveCount++; }, 500 ); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchstart', function ( e ) { lastTouchStart = ( new Date() ).getTime(); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchend', function ( e ) { if ( ! lastTouchStart ) { // If the touchstart happened before this script was loaded, but the touchend happened after... return; } var now = ( new Date() ).getTime(); var touchEvent = []; touchEvent.push( now - lastTouchStart ); if ( lastTouchEnd ) { touchEvent.push( lastTouchStart - lastTouchEnd ); } touchEvents.push( touchEvent ); lastTouchEnd = now; // Don't record this time as an interval between keypresses. lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'scroll', function ( e ) { if ( scrollCountTimer ) { clearTimeout( scrollCountTimer ); } scrollCountTimer = setTimeout( function () { scrollCount++; }, 500 ); }, supportsPassive ? { passive: true } : false ); } /** * For the timestamp data that is collected, don't send more than `limit` data points in the request. * Choose a random slice and send those. */ function prepare_timestamp_array_for_request( a, limit ) { if ( ! limit ) { limit = 100; } var rv = ''; if ( a.length > 0 ) { var random_starting_point = Math.max( 0, Math.floor( Math.random() * a.length - limit ) ); for ( var i = 0; i < limit && i < a.length; i++ ) { rv += a[ random_starting_point + i ][0]; if ( a[ random_starting_point + i ].length >= 2 ) { rv += "," + a[ random_starting_point + i ][1]; } rv += ";"; } } return rv; } if ( document.readyState !== 'loading' ) { init(); } else { document.addEventListener( 'DOMContentLoaded', init ); } })();;