/*! 20220714-6-RELEASE */ !function(e){e.TRC=e.TRC||{},e.TRC.sharedObjects=e.TRC.sharedObjects||{},e.TRC.sharedObjects.loadedScripts=e.TRC.sharedObjects.loadedScripts||{},e.TRC.sharedObjects.loadedPixels=e.TRC.sharedObjects.loadedPixels||{}}(window),function(){var win,doc;((e,t,r)=>{const i="trc_modal_hidden",o="trc_modal_mask",n="trc_modal_dialog",s="trc_close_modal",a=t.createElement("div"),l=t.createElement("div");let c,d="";function h(){p(l,i),p(a,i),r.dom.off(t,"keyup",g),r.dom.off(t,"click",m),r.dom.off(t.getElementById(s),"click",m),r.dom.off(e,"message",b)}function u(){p(l,o),p(l,i),p(a,n),p(a,i),x.appendChild(l),x.appendChild(a),t.body.appendChild(R),y(d),c=!0}const p=function(e,t){if(e.classList)return e.classList.add(t);r.dom.removeClass(e,t),e.className+=` ${t}`},g=e=>{const t=e.which||e.keyCode;27===t&&h()},m=e=>{const t=e.target||e.srcElement;t!==l&&t.id!==s||(r.dom.stopEvent(e),h())},b=e=>{/http(s)?:\/\/www\.taboola\.com/.test(e.origin)&&e.data&&1025==+e.data&&h()},f=function(e,t="no"){const r=[];return r.push(`×\n `),r.join("")},v=function(e,t){for(;e.tagName.toUpperCase()!==t.toUpperCase();)e=e.parentNode;return e},C=function(i){const o=v(i.target||i.srcElement,"A");i&&r.dom.stopEvent(i),c||u();const n=o.getAttribute("tblEnablesScrolling");a.innerHTML=f(o.href,n),r.dom.removeClass(l,"trc_modal_hidden"),r.dom.removeClass(a,"trc_modal_hidden"),r.dom.on(t,"keyup",g),r.dom.on(t,"click",m),r.dom.on(t.getElementById("trc_close_modal"),"click",m),r.dom.on(e,"message",b)},T=function(e){const r=t.createElement("div");return r.id=`tbl-aug-${Math.floor(2147483648*Math.random()).toString(36)}`,d=`#${r.id}`,e&&e.appendChild(r),r},y=function(e){TRC.dom.injectStyle(`${e} .trc_modal_dialog { width: 660px; height: 550px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 12px; border: 2px solid #417cc3; position: fixed; z-index: 9999999; background: #f7f9fc; top: 50%; left: 50%; margin-top: -250px; margin-left: -330px; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -ms-box-sizing: content-box; -o-box-sizing: content-box; box-sizing: content-box; -webkit-box-shadow: black 0 0 18px 0; -moz-box-shadow: black 0 0 18px 0; -ms-box-shadow: black 0 0 18px 0; -o-box-shadow: black 0 0 18px 0; box-shadow: black 0 0 18px 0; -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; }${e} .trc_modal_mask { z-index: 9999998; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; opacity: 0.5; filter: alpha(opacity=50); }${e} .trc_modal_close { font-family: sans-serif !important; width: 30px !important; height: 30px !important; font-size: 30px !important; font-weight: bold !important; line-height: 28px !important; color: #fff !important; text-shadow: 0 1px 0 #000; opacity: 0.9; filter: alpha(opacity=90); background: #417cc3; padding: 0; cursor: pointer; border: 0; -webkit-appearance: none; text-align: center; position: absolute !important; top: -13px; right: -13px; text-decoration: none !important; z-index: 9; -webkit-border-radius: 15px !important; -moz-border-radius: 15px !important; -ms-border-radius: 15px !important; -o-border-radius: 15px !important; border-radius: 15px !important; }${e} .trc_modal_hidden { display: none !important; }${e} .trc_modal_frame { width: 100% !important; height: 550px !important; }`,null)},R=T(),w=T(R),x=T(w);r.aboutUs={open:C,close:h}})(window,document,TRC),win=window,doc=document,TRC.blocker=TRC.blocker||{states:{ABP_DETECTION_DISABLED:-2,ABP_NOT_DETECTED:0,ABP_DETECTED:1},createBlockDetectionDiv:function(e){var t=doc.createElement("div");return t.className=e,t.style.fontSize="12px",t.style.lineHeight="1",t.appendChild(doc.createTextNode(".")),doc.documentElement.appendChild(t),t},isBlockDetectedOnDiv:function(e){return e.offsetHeight?(TRC.pConsole("page","warn","No AdBlockPlus detected on div with class: "+e.className),!1):(TRC.pConsole("page","warn","AdBlockPlus detected on div with class: "+e.className),!0)},isBlockDetectedOnClassNames:function(e){var t,r=e.length,i;for(t=0;t=s&&window.context.requestResize(void 0,o)},e.sendAMPFeedResize=function(){window.context.requestResize(void 0,e.getAMPContainer().offsetHeight+50),TRC.dispatch("ampFeedResize")}}(),function(e,t){TRC.aspect={before:function(e,t,r,i){var o=e[t];e[t]=function(){return i&&(e[t]=o),r.apply(this,arguments),o.apply(this,arguments)}},after:function(e,t,r,i){var o=e[t];e[t]=function(){i&&(e[t]=o);var n=o.apply(this,arguments);return r.apply(this,arguments),n}}}}(window,document),(()=>{const e="tbl-labels-arrow",t="video-title",r="FAST",i="MARGIN",o="uics",n="uicm";class s{constructor(e,t,r){this.trcManager=e.trc,this.container=t,this.blockClicksSource=s.getBlockClicksSource(this.trcManager.global,r),this.isBlockingFastClicks=!0,this.isRecommendationReel=TRC.RecommendationReel.shouldInitRecommendationReel(e),this.blockMarginalClicksValue=this.getBlockMarginalClicksValue(r,n),this.fastClicksTimeoutInMilliseconds=this.getBlockFastClicksTimeoutInMilliseconds(r,o),TRC.dom.on(this.container,"click",this.handleBlockClicks.trcBind(this)),this.observeItem()}getBlockMarginalClicksValue(e,t){const r=this.getClickValueByPriority(e,t);return s.isValidClickValue(r)?r:s.getDefaultMarginValue()}getBlockFastClicksTimeoutInMilliseconds(e,t){const r=this.getClickValueByPriority(e,t);return s.isValidClickValue(r)?1e3*parseFloat(r):s.getDefaultFastClickValue()}static getBlockClicksSource(e,t){return s.checkIsFraudEnabled(e)?s.BLOCK_CLICK_SOURCE.fraud:s.checkIsDemandEnabled(t)?s.BLOCK_CLICK_SOURCE.demand:null}getClickValueByPriority(e,t){switch(this.blockClicksSource){case s.BLOCK_CLICK_SOURCE.fraud:return this.trcManager.global[`unintentional-clicks-fraud-${t}`];case s.BLOCK_CLICK_SOURCE.demand:return e[t];default:return this.trcManager.global[`unintentional-clicks-${t}`]}}static isBlockClicksEnabled(e,t){return!1===s.isBlockClicksDisabled(e)&&(s.checkIsFraudEnabled(e)||s.checkIsDemandEnabled(t))}static isBlockClicksDisabled(e){return TRC.util.isTrue(e["unintentional-clicks-disabled"])}static checkIsFraudEnabled(e){return TRC.util.isTrue(e["unintentional-clicks-fraud-enable"])}static checkIsDemandEnabled(e){return TRC.util.isTrue(e.uic)}sendBlockClickEvent(e){const t={event_type:"clickblocked",event_state:"reported",event_value:{type:s.CLICK_BLOCKED_EVENT[e],source:this.blockClicksSource},event_msg:null};this.trcManager.sendEvent("supply-feature",{d:JSON.stringify(t)},null)}handleBlockClicks(e){if(this.isBlockingFastClicks)return s.preventClickBubbling(e),void this.sendBlockClickEvent(r);this.isMarginalClick(e)&&this.isBlockableClick(e)&&(s.preventClickBubbling(e),this.sendBlockClickEvent(i))}isBlockableClick(r){return!(this.isRecommendationReel&&r.target.parentNode.className.indexOf(e)>-1)&&!(r.target.className.indexOf(t)>-1)}isMarginalClick(e){const t=this.container.offsetWidth,r=this.container.offsetHeight,i=this.transformBlockMarginalClicksConfig(t,r),o=this.container.getBoundingClientRect(),n=e.clientX-o.left,s=e.clientY-o.top;return st-i.right||nr-i.bottom}static preventClickBubbling(e){e.preventDefault(),e.stopPropagation()}transformBlockMarginalClicksConfig(e,t){return{top:s.calculatePercentage(this.blockMarginalClicksValue,t),right:s.calculatePercentage(this.blockMarginalClicksValue,e),bottom:s.calculatePercentage(this.blockMarginalClicksValue,t),left:s.calculatePercentage(this.blockMarginalClicksValue,e)}}static calculatePercentage(e,t){return parseFloat(e)/100*t}observeItem(){TRC.intersections.observe({targetElement:this.container,threshold:0,onExit:()=>this.clearFastClickTimeout(),onEnter:()=>this.setFastClickTimeout()})}setFastClickTimeout(){this.clearFastClickTimeoutId(),this.setIsBlockingFastClicks(!0);const e=TRC.Timeout.set(()=>{this.setIsBlockingFastClicks(!1),this.clearFastClickTimeoutId()},this.fastClicksTimeoutInMilliseconds);this.timeoutId=e}clearFastClickTimeout(){this.setIsBlockingFastClicks(!0),this.timeoutId&&this.clearFastClickTimeoutId()}clearFastClickTimeoutId(){TRC.Timeout.clear(this.timeoutId),this.timeoutId=null}setIsBlockingFastClicks(e){this.isBlockingFastClicks=e}static isValidClickValue(e){return!isNaN(parseFloat(e))}static getDefaultMarginValue(){return"0.5"}static getDefaultFastClickValue(){return"3000"}}s.CLICK_BLOCKED_EVENT={MARGIN:"marginal_click_blocked",FAST:"fast_click_blocked"},s.BLOCK_CLICK_SOURCE={fraud:"fraud",demand:"demand"},TRC.BlockClicksManager=s})(),function(e,t){var r=function(){this.dom=!!t.getElementById&&1,this.dom&&(!t.importNode||(this.dom=2),!t.normalizeDocument||(this.dom=3));var r=this.opera=!!e.opera&&9;if(this.opera&&(!navigator.geolocation||(this.opera=10),!e.opera.version||(this.opera=parseFloat(e.opera.version()))),this.ie=navigator.userAgent.match(/Trident/)&&/rv:11.0/i.test(navigator.userAgent)?11:"object"==typeof t.all&&!r&&("CSS1Compat"!=t.compatMode?6:e.XMLHttpRequest?Object.defineProperty?"object"!=typeof DOMImplementation||"function"!=typeof DOMImplementation.prototype.createDocument?8:e["msMatchMedia"]?10:9:7:6),this.webkit=!!e.openDatabase&&!this.opera,this.chrome=!(!this.webkit||!e.chrome),this.safari=this.webkit&&!this.chrome,this.safari&&(!t.compareDocumentPosition||(this.safari=4),!navigator["registerContentHandler"]||(this.safari=5),!e["matchMedia"]||(this.safari=6)),this.firefox=!!navigator.userAgent.match(/firefox/i),this.firefox){try{"function"==typeof t.createElement("canvas").getContext&&(this.firefox=1.5)}catch(e){}"object"==typeof e["globalStorage"]&&(this.firefox=2),!t.elementFromPoint||(this.firefox=3),!t.querySelector||(this.firefox=3.5),!t.getElementsByTagName("head")[0]["mozMatchesSelector"]||(this.firefox=3.6),!e.Uint8Array||(this.firefox=4),!Function.prototype["isGenerator"]||(this.firefox=5),!e["matchMedia"]||(this.firefox=6),!e.FileReader||!e.FileReader.prototype.readAsArrayBuffer||(this.firefox=7),!t.head||!t.head.insertAdjacentHTML||(this.firefox=8)}for(var i=["firefox","chrome","safari","webkit","khtml","ie","opera"],o=0;o=e)}}(this,i[o]);return this.compatibility={lineClamp:void 0!==t.createElement("div").style["webkitLineClamp"],cssTransforms:function(){for(var e=t.createElement("div"),r=["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i{class e{init(){this.bulkLoggers={availableBulkLogger:new TRC.TRCBulkLogger("bulk"),metricBulkLogger:new TRC.TRCBulkLogger("bulk-metrics")},this.eventToLogger={available:this.bulkLoggers.availableBulkLogger,metrics:this.bulkLoggers.metricBulkLogger},this.initialized=!0}bulkPost(e,t,r,i,o){this.initialized||this.init();const n=this.eventToLogger[t];if(!n)return TRC.TRCLogger.post(e,t,r,i,o),void __trcWarn(`Failed sending bulk event for eventType: ${t}, bulk is not currently supported`);n.bulkPost(e,t,r,i,o)}}TRC.BulkLoggerManager=new e})(),(()=>{class e{constructor(e,t,r){this.localStorage=e,this.cacheName=t,this.cacheTtl=r}isOverTtl(e){const t=(new Date).getTime();return t-e>this.cacheTtl}setCacheClean(e,t){const{localStorage:r,cacheName:i,cacheTtl:o}=this;TRC.Timeout.set(()=>{TRC.tlf&&console.time("in setCacheClean"),t.removeKey(e),r.setValue(i,__trcJSONify(t.getData())),TRC.tlf&&console.timeEnd("in setCacheClean")},o)}static removeKey(e,t){return!!t.getValue(e)&&(t.removeKey(e),!0)}cleanCache(e,t,r){const i=e||TRC.util.keys(t.getData());let o;for(let n=0;n{const e="allowed-categories-map";class t{constructor(t){const{sourceCategory:r,global:i}=t.trc,{publisherId:o,dom:{addClass:n}}=TRC,s=i[e];let a={};if(this.text="",this.isCategoryCard=!0,this.sourceCategory=r,n(t.container,"tbl-category-card-enabled"),!r)return void this.sendEvent("No Source Category");s&&(a=s[o]||s);const l=a[r];l?(this.render=this.validateCategoryLogic(t),this.render&&(n(t.container,"tbl-category-card-rendered"),this.text=l.toUpperCase())):this.sendEvent("No category translation")}sendEvent(e){TRCImpl.sendAbTestEvent("category-card",`Channel: ${this.sourceCategory}, Result: ${e}`)}validateCategoryLogic(e){const{length:t=0}=e.recommendationList;if(!t)return!1;for(let r=0;r{const i=(e=[],t={})=>{h.isInitialized=!0,n(t),o(e),TRC.dom.injectStyle(`a.tbl-ccpa { font-weight: normal; font-size: 11px; Color: #999999; margin: 0 3px 0 0; text-decoration: none; font-family: Arial, Helvetica, sans-serif; float: right; } a.tbl-ccpa.tbl-ccpa-left { float: left; } a.tbl-ccpa.tbl-ccpa-right { float: right; }.logoDiv a.tbl-ccpa span { font-size: 11px; color: #999999; }div.tbl-feed-header.tbl-ccpa-container .tbl-ccpa { margin-top: 3px; }div.tbl-feed-header.tbl-ccpa-container div.tbl-feed-header-logo { display: inline-block; }.trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::before { content: '|'; margin-right: 2px; font-size: 11px; color: #999999; }.tbl-rtl .tb-ccpa-mobile { line-height: 11px; }.tbl-rtl .logoDiv.link-ccpa { display: inline-block; }.tbl-rtl div.tbl-feed-header .tbl-ccpa { margin-top: 0; }.tbl-rtl .trc-widget-footer a.tbl-ccpa { float: none; } .tbl-rtl .trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::before { content: ''; } .tbl-rtl .trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::after { content: '|'; margin-left: 2px; font-size: 11px; color: #999999; }`,null),d()},o=e=>{let t=h.config&&h.config.placement;if(t)return r.ccpa.placement=t,t;for(let r=0;r-1&&i.v.length>0)return h.placement=t,t}h.placement=t},n=({markup:e="CCPA Notice",href:t="https://ccparequest.taboola.com/",enableScrolling:r="yes",classList:i,style:o,inlineStyle:n="",location:s="beforeend",renderOnce:a=!0,placement:l=""})=>{const c=i?[...i,"tbl-ccpa"]:"tbl-ccpa";h.config={markup:e,href:t,enableScrolling:r,classList:c,style:o,inlineStyle:n,location:s,renderOnce:a,placement:l}},s=e=>{const{config:t,placement:r}=h;return t&&!t.renderOnce||r===e},a=(e,t={})=>{let r="tbl-ccpa-container";TRC.dom.isSmartPhone()&&(r+=" tb-ccpa-mobile"),TRC.dom.addClass(e,r);const i=TRC.util.merge({},h.config,t);TRC.PopupLink.create(e,i)},l=(e,t,r)=>{if(h.shouldCreateCcpa(t)){const t={};let i="";"RIGHT"===r?i=" tbl-ccpa-left":"LEFT"===r&&(i=" tbl-ccpa-right"),t.classList=`${h.config.classList}${i}`,h.create(e,t)}},c=e=>{if(e.isFeedCard||!s(e.placement))return;const t=e.getWidgetFooter();let r="";t.children.length>0&&(r=" tbl-cpa-pipe-before");const i={markup:`${h.config.markup}`,classList:`${h.config.classList} tbl-ccpa-on-widget${r}`,location:"afterbegin",wrapper:{type:"div",className:"logoDiv link-ccpa"}};e.hasAdChoicesLogo&&(i.children=' '),h.create(t,i)},d=function(e="taboola",t="Rendered",r=null){if(TRC.dom.isInIframe()){const e="in-iframe";r=r?[r,e].join(", "):e}const i={event_type:"ccpa",event_state:t,event_value:e,event_msg:r};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(i)},null)},h=r.ccpa={placement:"",isInitialized:!1,sendCcpaEvent:d,create:a,init:i,shouldCreateCcpa:s,renderOnWidgetFooter:c,renderOnHeaderFeed:l}})(window,document,TRC),function(){var e=0,t=1,r=2,i=3,o=5,n={taboola_default:"BOOx2jhOOx2mtAKABDENAqAAAAAYSAAA"},s={cmpStatus:i},a="",l={getConsentData:[]},c={getConsentData:1};function d(){s.gdprApplies=!0,s.consentData=n.taboola_default,s.consentPreset="taboola_default"}function h(e,t,r){return c[e]&&l[e].push(r),"tcf"===a?b():"iab"===a?p():void 0}function u(t){t.cmpStatus=e,f(t)}function p(){return!!window.__cmp&&(window.__cmp("getConsentData",null,u),!0)}function g(e,t){if(t&&("tcloaded"===e.eventStatus||"useractioncomplete"===e.eventStatus)){m(e),f(s);try{window.__tcfapi("removeEventListener",2,function(){},e.listenerId)}catch(e){__trcWarn("Error while calling __tcfapi:removeEventListener",e)}}}function m(t){s.cmpStatus=e,s.gdprApplies=t.gdprApplies,s.tcString=t.tcString,s.consentData=null}function b(){try{return window.__tcfapi("addEventListener",2,g),!0}catch(e){__trcWarn("Error while calling __tcfapi:addEventListener",e)}}function f(e){s=TRC.util.merge(s,e),v()}function v(){var e=l["getConsentData"];if(!0!==e.pushOverride){e.push=function(e){"function"==typeof e&&e(s)},e.pushOverride=!0;for(var t=0;t{TRC.CLSReporter={listenStarted:!1,CLSEventsFilters:[],maxSelectors2Send:100,CLSSelectorsEnabled:!1,CLSSelectorsMessage:"",CLSSelectorsFilter:"selectors",generateQuerySelector(e){if(!e)return null;let t=e.tagName;return e.id?t+=`#${e.id}`:e.className&&(t+=`${e.className}`),t},getSelectorEventData(e){let t="";for(let r=0;r{TRC.CLSReporter.CLSEventsFilters.forEach(t=>{t.eventFilter&&!t.eventFilter(e)||(t.clsValue+=e.value)}),TRC.CLSReporter.CLSSelectorsEnabled&&TRC.CLSReporter.maxSelectors2Send>t++&&(TRC.CLSReporter.CLSSelectorsMessage+=TRC.CLSReporter.getSelectorEventData(e))}),e.addEventListener("beforeunload",TRC.CLSReporter.fireCLSBeaconOnUnload.bind(this))}},fireCLSBeaconOnUnload(){TRC.CLSReporter.CLSEventsFilters.forEach(e=>{__trcWarnUsingBeacon(`${e.prefixMessage}:${e.clsValue.toFixed(6)}`)}),TRC.CLSReporter.CLSSelectorsEnabled&&__trcWarnUsingBeacon(TRC.CLSReporter.CLSSelectorsMessage)},init(){TRC.CLSEvents&&TRC.CLSEvents.forEach(e=>{TRC.CLSReporter.push(e)}),TRCImpl.global["cls-max-selectors"]&&(TRC.CLSReporter.maxSelectors2Send=TRCImpl.global["cls-max-selectors"]),TRCImpl.global["enable-cls-selectors"]&&TRC.CLSReporter.push({prefixMessage:"accumulating cls selectors:",eventFilter:TRC.CLSReporter.CLSSelectorsFilter})}}})(window),TRC.CustomModulesManager={registeredModules:{},getPath(e,t){switch(e){case void 0:case"ui-innovation":return`${this.PATH.UI}/${t}`;case"demand-formats":return`${this.PATH.DEMAND}/${t}`;default:return e}},setGlobalPaths(){const e=TRCImpl.global["cdn-taboola-path"]||"cdn.taboola.com";this.setGlobal=!0,this.CDN=TRC.shiftDomain(e),this.PATH={UI:TRCImpl.global["ui-innovation-modules-path"]||"ui-ab-tests",DEMAND:"demand-formats"}},getCustomModulesFromResponse(e){if(!e||!e.trc)return;this.customModuleCga=TRC.Manager.prototype.parseClientGenericAction(e);const t={feedExtension:this.createModuleMap(e.trc.f,!0,"drp"),demandGenericAction:this.createModuleMap(e.trc.dcga,!1),clientGenericActionPageLevel:this.createModuleMap(this.customModuleCga,!1),clientGenericActionPlacementLevel:this.createModuleMap(e.trc.vl,!0,"cga")};this.loadModules(t)},createModuleMap:(e,t,r)=>({root:e,loop:t,key:r}),loadModules(e){!this.setGlobal&&this.setGlobalPaths();const t=Object.keys(e);t.forEach(t=>{const r=e[t];r.root&&(r.loop?this.loadModulesFromChildren(r):this.loadModulesFromRoot(r))})},loadModulesFromChildren(e){Object.keys(e.root).forEach(t=>{const r=e.root[t];r&&r[e.key]&&r[e.key].customModules&&this.loadCustomModules(r[e.key].customModules,t)})},loadModulesFromRoot(e){e.root&&e.root.customModules&&this.loadCustomModules(e.root.customModules)},loadCustomModules(e,t){try{const r=__trcUnJSONify(e);Object.keys(r).forEach(e=>{if("dependencies"!==e){const i=e;this.loadModule(i,r[i],t)}})}catch(t){__trcError(`Error while trying to parse json custom module, error msg: ${t} ,module data: ${e}`)}},loadModule(e,t,r){let i=this.registeredModules[e];const o=i&&-1===i.feedsOriginPlacementNames.indexOf(r);if(o&&i.feedsOriginPlacementNames.push(r),i||!0===t.disable)return;i=this.registeredModules[e]={options:t,moduleName:e,feedsOriginPlacementNames:[r]};const n=this.getPath(t.path,e);if(this.shouldLoadResource(t.js)&&!i.jsRequested){TRC.customHooks||(TRC.customHooks={});const r=t.js||e;this.loadModuleResource(`${n}/${r}`,"js",e,i),i.jsRequested=!0}if(this.shouldLoadResource(t.css)&&!i.cssRequested){const r=t.css||e;this.loadModuleResource(`${n}/${r}`,"css",e,i),i.cssRequested=!0}},shouldLoadResource:e=>void 0===e||!TRC.util.isFalse(e),runHook(e,t,r,...i){this.dispatchHook(e,t,r,i)},dispatchHook(e,t,r,i){Object.keys(this.registeredModules).forEach(o=>{const n=this.registeredModules[o];if(this.isRelevantType(t,n,r))if(n.ready){const t=this.getModuleHook(n,e,r,...i);t&&t()}else this.listenToModuleReady(o,()=>{const t=this.getModuleHook(n,e,r,...i);t&&t()})})},listenToModuleReady(e,t){TRC.listen(`TRC.${e}.ready`,t)},waitForModule(e,t){if(!this.customModuleCga||!this.customModuleCga.customModules||!this.customModuleCga.customModules.dependencies)return t;const{customModules:r}=this.customModuleCga,{dependencies:i}=r,o=i[e],n=this.registeredModules[o];return!n||n&&n.ready?t:()=>{TRC.CustomModulesManager.listenToModuleReady(o,t.trcBind(this))}},isRelevantType(e,t,r){const{uiModes:i,placements:o}=t.options;return!e||(r instanceof TRC.Feed?-1!==t.feedsOriginPlacementNames.indexOf(r.mainContainerPlacement)&&(!o||e&&o&&o.indexOf(e)>-1):r instanceof TRC.implClasses.TRCRBox?!i||e&&i&&i.indexOf(e)>-1:void 0)},getModuleHook(e,t,r,...i){const o=TRC.customHooks[e.moduleName];return o&&o.hooks&&o.hooks[t]&&o.hooks[t].trcBind(r,...i,r)},isEveryModuleNeededLoaded(e){const t=this.shouldLoadResource(e.options.js),r=this.shouldLoadResource(e.options.css);return!(t&&!e.jsReady||r&&!e.cssReady)},loadModuleResource(e,t,r,i,o=0){const n=`${TRC.PROTOCOL}//${this.CDN}/${e}.${t}`,s=TRCImpl.global["module-load-retry"]||2;TRC.net.loadScript(n,t,a=>{"error"===a.type?o>=s?__trcError(`Failed to load custom module resource ${n}`):TRC.CustomModulesManager.loadModuleResource(e,t,r,i,++o):(i[`${t}Ready`]=!0,this.isEveryModuleNeededLoaded(i)&&(i.ready=!0,TRC.dispatch(`TRC.${r}.ready`)))},!0)}},((e,t)=>{TRC.docVisibilityUtil=function(){let e="",r="";if(void 0!==t.hidden?(e="hidden",r="visibilitychange"):void 0!==t.msHidden?(e="msHidden",r="msvisibilitychange"):void 0!==t.webkitHidden&&(e="webkitHidden",r="webkitvisibilitychange"),!e)return{addEventListener:()=>{},isVisible:()=>null};function i(){return!t[e]}function o(e){t.addEventListener(r,()=>{e(i())},!1)}return{addEventListener:o,isVisible:i}}()})(window,document),TRC.lazyLoadingDependencies={"distance-from-article":[{fileName:"article-detection",objectName:"ArticleDetection"}],"tfa-eid":[{fileName:"sha256",objectName:"sha256"}],"bid-detection":[{fileName:"distance-from-article",objectName:"DistanceFromArticle"}],"stories-vertical-ui":[{fileName:"stories-transition-manager",objectName:"StoriesTransitionsManager",isMandatory:!0},{fileName:"stories-video-manager",objectName:"StoriesVideoManager"}]},TRC.ModuleLoader={requestedModules:{},load(e,t,r,i,o){if(r=TRC.CustomModulesManager.waitForModule(e,r),o=void 0===o?window.TRCImpl&&TRCImpl.global&&TRCImpl.global["module-load-retry"]||2:o,t)r();else if(this.requestedModules[e]&&!i)this.requestedModules[e].callbacks.push(r);else{i||(this.requestedModules[e]={callbacks:[this.logSuccessToPerformance.trcBind(this,e),r]},TRC.performance&&TRC.performance.mark(`moduleLazyLoad${e}start`,null,"",e,"moduleLazyLoadTime",TRC.PerfEvenType.START));const n=this.toFingerPrintedName(e),s=TRC.lazyLoadingDependencies[e];if(!s||s.length<=0)TRC.loadTaboolaScript(n,!0,this.requestedModules[e].callbacks,i=>{this.loadErrorCallback(i,o,e,t,r,n)});else{const a=()=>{TRC.loadTaboolaScript(n,!0,t=>{this.invokeCallbackUponFullLoad(++c,s.length,e,t)},i=>{this.loadErrorCallback(i,o,e,t,r,n)})},l=this.createMandatoryTable(s)||{};let c=0;0===Object.keys(l).length&&a(),i||s.forEach(t=>{const{fileName:r}=t;this.load(t.fileName,TRC[t.objectName],t=>{this.invokeCallbackUponFullLoad(++c,s.length,e,t);try{!1===l[r]&&(l[r]=!0,this.isMandatoryModulesLoaded(l)&&a())}catch(e){__trcError(`failed to check mandatory module ${r}. Error is: ${e.message}`,e)}})})}}},createMandatoryTable:e=>Array.isArray(e)?e.reduce((e,t)=>(t.isMandatory&&(e[t.fileName]=!1),e),{}):{},isMandatoryModulesLoaded:e=>Object.keys(e).every(t=>e[t]),invokeCallbackUponFullLoad(e,t,r,i){if(eArray.isArray(e)?t=>{e.forEach(e=>e(t))}:"function"==typeof e?e:()=>{},loadErrorCallback(e,t,r,i,o,n){t>0?TRC.ModuleLoader.load(r,i,o,!0,--t):(this.logError(e,n),this.requestedModules[r]=null,TRC.dispatch("module-loader-failure",{moduleFile:r,moduleObj:i,fingerPrintedFileName:n}))},logError(e,t){__trcError(`failed to load module ${t}. Error is: ${e.message}`,e)}},(e=>{const t=!!e.navigator.sendBeacon;TRC.hasNetworkAsyncSupport=(()=>t),TRC.sendPostAsyncCall=((r,i)=>!!t&&(e.navigator.sendBeacon(r,i),!0))})(window),TRC.RBoxUsage={logUsage(e,{file:t="",method:r="",position:i="",skipCaching:o,extraData:n={}}={}){TRCImpl&&TRCImpl.global&&TRCImpl.global["disable-rbox-usage-logging"]||TRC.modDebug.logMessageToServer(4,e,{file:t,method:r,position:i,extraData:__trcJSONify(n)},o)}},TRC.unifiedPlacementsProductsUtil={containersReset:(e,t)=>{Object.keys(e).forEach(r=>{const i=e[r].mainContainerId,o=document.querySelectorAll(`[${t}=${i}]`);for(let e=0;e0?t.remove():(t.className=t.origClassName,t.innerHTML="",r&&TRC.intersections.unobserveAll(r))}})}},(()=>{class e{constructor(){this.cardIndexOnPage=0,this.globalConfig=[],this.horizontalMarginToFilter=.1,this.ctaChildrenParentGap=10,this.videoLabelBoxWidthRatio=.98,this.ctaButtonTextAmountOfChars=15,this.maxCharsForItemId=40,this.urlParams={},this.ctaButtons={}}static initialize(t,r){if(!TRC.ctaManager){if(!e.shouldCreateCTAManager(t,r))return;TRC.ctaManager=new e,TRC.ctaManager.setupFromConfig(t)}TRC.ctaManager.prepareDataForCTA(t,r)}static shouldCreateCTAManager(e,t){if(!e.trc.global["enable-cta-component"])return!1;const r=TRC.CTAManager.getPubConfigOverrideFromRboxResponse("enable-call-to-action-creative-component",e);return!(!r||"true"!==r)&&!!t.video_data["cta-text"]}static getButtonInnerHeight(){return 24}static getButtonHeight(){return TRC.CTAManager.getButtonInnerHeight()+7}static getPriceRatingHeight(){return 22}static getPubConfigOverrideFromRboxResponse(e,t){const r=t&&t.globalTrcResponseJSON&&t.globalTrcResponseJSON.dcga&&t.globalTrcResponseJSON.dcga.pubConfigOverride;return r&&r[e]}setupFromConfig(t){this.shouldReportAbTestEvent=Math.random()<(t.trc.global["cta-abtest-report-percent"]||.03),this.shouldReportRenderedEvent=Math.random()<(t.trc.global["cta-render-report-percent"]||.05),this.shouldReportUsageAndMetricEvent=Math.random()<(t.trc.global["cta-metric-report-percent"]||.03),this.shouldReportUsageAndMetricEvent=this.shouldReportUsageAndMetricEvent&&TRC.MetricsManager&&TRC.MetricsManager.isMetricsEnabled(TRCImpl,TRC),this.shouldReport=this.shouldReportAbTestEvent||this.shouldReportUsageAndMetricEvent||this.shouldReportRenderedEvent,this.windowLocation=this.shouldReport?(window.location.href||"").slice(0,200):"",this.moduleName=e.getPubConfigOverrideFromRboxResponse("module-name",t),this.options={isInheritTitleColor:this.getPubConfigOverride("inherit-title-color",t,!0),style:{borderColor:this.getPubConfigOverride("border-color",t,!0),color:this.getPubConfigOverride("title-color",t,!0),fontSize:this.getPubConfigOverride("cta-font-size",t,!0),fontWeight:this.getPubConfigOverride("font-weight",t,!0)}}}getPubConfigOverride(t,r,i){const o=e.getPubConfigOverrideFromRboxResponse(t,r);return null!=o&&i&&(this.globalConfig[t]=o),null!=o?o:this.globalConfig[t]}renderCTAItems(e,t){TRC.ModuleLoader.load("cta-component",TRC.CallToActionComponent,()=>{const e=t.boxes,r={shouldAdjustHeight:!1,maxDesiredHeight:0};e.forEach(e=>{try{const i=this.getCtaData(e);if(!i)return;const o=new TRC.CallToActionComponent(e,i);i.callToActionComponent=o,o.renderCTAButton(r,t)}catch(t){throw this.sendEvent(e,{},t.message,TRC.CTAManager.sendEventTypes.error),t}}),r.shouldAdjustHeight&&e.forEach(e=>{const t=this.getCtaData(e);if(this.fixVideoBoxHeight(e,r.maxDesiredHeight,t),!t)return;const{callToActionComponent:i}=t;i&&i.reportBack(e,t)})})}fixVideoBoxHeight(r,i,o){const n=r.querySelector(".video-label-box");if(r.rbox.ctaData.shouldAdjustAllItemsHeight){if(i<=0)return;return n.style.height=`${i}px`,void(t(n)&&this.sendEvent(r,o||{},"fix_all_video_box_height_is_overflowing",TRC.CTAManager.sendEventTypes.report))}const s=n.querySelector(".branding"),a=e.getDesiredVideoBoxHeight(n,s,o,r.rbox);if(a<=0)return;n.style.height=`${a}px`,t(n)&&this.sendEvent(r,o||{},"fix_video_box_height_is_overflowing",TRC.CTAManager.sendEventTypes.report);const l=e.getComputedStyleProp(n,"max-height",0);l>0&&l0||s>0?"padding_on_full_width":null}isBrandingMarginBlocked(t){const r=t.getBoundingClientRect();if(!(r&&r.width>0))return null;const i=parseFloat(e.getComputedStyleProp(t,"margin-left",0))/r.width;if(i>this.horizontalMarginToFilter)return"high_margin_left";const o=parseFloat(e.getComputedStyleProp(t,"margin-right",0))/r.width;return o>this.horizontalMarginToFilter?"high_margin_right":null}static isBrandingInnerPositionBlocked(t){const r=t.querySelector(".branding-inner");return r&&e.isElementPositionAbsolute(r)?"branding_inner_absolute_position":null}static isBrandingLogoPositionBlocked(t){const r=t.querySelector("div.logoDiv");return r&&e.isElementPositionAbsolute(r)?"branding_logo_div_inner_absolute_position":null}static isBrandingPositionBlocked(t){return e.isElementPositionAbsolute(t)?"branding_absolute_position_item_renderer":null}static isElementPositionAbsolute(t){const r=e.getComputedStyleProp(t,"position");return!(!r||"absolute"!==r)}static isBelowMinWidth(e){const t=e.getBoundingClientRect().width;return t>0&&t<170?"below_min_width":null}static isHeroWidget(e){return e.rbox.mode_name&&e.rbox.mode_name.indexOf("hero")>-1?"item_in_hero_widget":null}static isStoryWidget(e){return e.rbox.container.querySelector(".story-widget")?"item_in_reco_reel_story_widget":null}static isNextUpWidget(e){return TRC.dom.containsClass(e,"tbl-next-up-widget-item")?"item_next_up":null}static hasIcon(e){return e.querySelector(".added-icon-svg")?"item_branding_has_icon":null}static getVideoLabelBoxChildrenWithoutButtonHeight(t){let r=0;const i=["border-bottom-width","border-top-width","padding-bottom","padding-top"];if(i.forEach(i=>{r+=e.getComputedStyleProp(t,i)||0}),t.hasChildNodes()){const i=t.childNodes;for(let t=0;t{const e={},t="page view Id str";function r(){return window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])}function i(e,t,r){return window.crypto.subtle.encrypt({name:"AES-GCM",iv:r,tagLength:128},t,e)}function o(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,"0")).join("")}const n=function(){let n=null;return window._trcIsUTactive&&(TRC.cryptoKeysUtils={resetPageViewUniqueIdPromise(){n=null}}),function(){return e.pvuid?Promise.resolve(e.pvuid):n||(n=n||r().then(e=>{const r=new Uint8Array([188,185,57,146,246,194,114,34,12,80,198,77]),o=new TextEncoder,n=o.encode(t);return i(n,e,r)}).then(t=>{const r=o(t);return e.pvuid=r,e.pvuid}))}}();TRC.cryptoKeysManager={getPageViewUniqueID:n},window._trcIsUTactive&&(TRC.cryptoKeysUtils.setPageViewUniqueID=function(t,r){e[t]=r},TRC.cryptoKeysUtils.PVUID_STR_LEN=32+2*t.length)})(),TRC.css=TRC.css||{},TRC.css.utils=(()=>{let e=0,t=0,r="";const i=4040,o=" style_split",n="{class},",s="vidiscovery-note";function a(e,r){const i=e.indexOf("@media")>=0?`${e.split("{")[0]}{`:"",o=(e=i?e.substring(e.indexOf("{")+1):e).split("{"),n=o.length>1?o[0].split("."):e.split("."),a=n.length;if(a<2)return i+e;const l=n[1];return __trcTrim(l)===s?i+e:(r[__trcTrim(l)]?(h(1),n[0]=`#${r[__trcTrim(l)].cssDivsArr.join(" #")} ${n[0]}`):(h(t),n[0]=g(n.join("."))+n[0]),o.length>1?(o[0]=n.join("."),i+o.join("{")):i+n.join("."))}function l(e,t){const r=e.split(","),n=r.length;let s="";if(p()>i&&(s=o,__trcDebug(`Number of augmented css rules before Split : ${p()}`),u(0)),null===t)return c(n<2?e:r,s);if(n<2)return s+a(e,t);for(let i=0;i=0&&i=0&&il(e,t)),r.join("}"))}function h(t){e+=t}function u(t){e=t}function p(){return e}function g(e){return m(!1,!1).replace(new RegExp("{class}","gm"),e)}function m(e,i){let o;if("object"==typeof e){r="",Object.keys(e).forEach(i=>{"string"==typeof i&&""!==i&&(o=`#${e[i].cssDivsArr.join(" #")} `,r=`${r}${o} ${n}`),t++});const s=`#${i.iframe.join(" #")} ${n}`,a=`#${i.topDiv.join(" #")} ${n}`,l=r.slice(0,r.length-n.length);return r=`${s}${a}${l}`}return r}function b(e,t,r){const i=e.trc.vl,{modes:o}=r,n=o[TRC.inflate.COMMON];let s="",a="";return i&&i.forEach((i,l)=>{const c=f(e,i,l,r);c.forEach(e=>{TRC.injectedModes.indexOf(e)<0&&o[e]&&(s+=TRC.inflate.inflateStyle(e,TRC.inflate.inflateObject(n[TRC.inflate.STYLE],o[e][TRC.inflate.STYLE])),t&&o[e].mode_custom&&(a+=o[e].mode_custom),TRC.injectedModes.push(e))})}),{inflatedStyle:s,customCss:a}}function f(e,t,r,i){const{TRCRBox:o}=TRC.implClasses,n=i.preloadRequest[t.fpl||t.uuip||t.uip],s=o.prototype.calcModeName(i.addVariantProperties(null,e,r).trc,n?n.mode:void 0),a=v(s,t,n,i);let l=a?[a]:[];return t.multiWidget&&t.multiWidget.children&&(l=[...l,...C(t.multiWidget.children)]),l}function v(e,t,r,i){return i.modes[e]?e:i.modes[t.m]?t.m:r&&i.modes[r.mode]?r.mode:void 0}function C(e){let t=[];return e.forEach(e=>{e.children?t=[...t,...C(e.children)]:e.name&&t.push(e.name)}),t}return{bakeCss(e,t){const r=t.global["enable-custom-injection"];TRC.injectedModes=TRC.injectedModes||[];let i=TRC.injectedCustomStyle?"":t.defaults.style+t.global.style.rtl;const o=b(e,r,t);i+=o.inflatedStyle,i+=t.global.style.custom&&!TRC.injectedCustomStyle?t.global.style.custom:"",i+=r?o.customCss?o.customCss:"":t.global.style.mode_custom&&!TRC.injectedCustomStyle?t.global.style.mode_custom:"",(i+=TRC.injectedCustomStyle?"":TRC.dom.pullAggregatedStyle())&&(TRC.dom.injectStyle(i,null),TRC.injectedCustomStyle=!0)},setStyleTextIdPrefix(e,t,r){t&&m(t,r);const i=d(e,t);return __trcDebug(`Number of augmented css rules left : ${p()}`),u(0),i},setStyleElements(e){const t=e.split(o),r=t.length;r>1&&TRC.pConsole("page","debug","splitting css",""),t.forEach(e=>TRC.dom.injectStyle(e))},setStyleProperty(e,t,r,i){let{cssText:o}=e.style;o+=`;${t}:${r}${i?"!important":""}`,e.style.cssText=o},generateCssRuleWithVendorPrefixes(e,t){const r=[" -webkit-","-moz-","-ms-","-o-"],i="{property}: {value};",o=i.replace("{property}",e).replace("{value}",t),n=[];return r.forEach(e=>n.push(e+o)),n.push(o),n.join(" ")},escape:(()=>window.CSS&&window.CSS.escape||function(e){const t=function(e){this.message=e};(t.prototype=new Error).name="InvalidCharacterError";const r=String(e),{length:i}=r;let o=-1,n,s="";const a=r.charCodeAt(0);for(;++o=1&&n<=31||127===n||0===o&&n>=48&&n<=57||1===o&&n>=48&&n<=57&&45===a?s+=`\\${n.toString(16)} `:s+=n>=128||45===n||95===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?r.charAt(o):`\\${r.charAt(o)}`}return s})()}})(window),TRC.css.Stack=function(e,t){const{stack:r,idPrefix:i="tab_"}=e,o={},n=document.createDocumentFragment(),s=t?document.head.appendChild(document.createElement("style")):null;r.forEach(e=>o[e.type]=TRC.dom.injectStyle(e.cssText||"",n,i+e.type)),this.injectAllStyles=function(){s?document.head.insertBefore(n,s):document.head.appendChild(n),TRC.styleInjected=!0},this.addStyle=function(e,t,r){const s=o[e],a=r?document:n,l=i+e;t&&(s?s.styleSheet?s.styleSheet.cssText+=t:s.appendChild(document.createTextNode(t)):o[e]=TRC.dom.injectStyle(t,a,l))}},TRC.css.responsive=function(){function e(e,t){return(99.99-e*t)/e}function t(t,r,i,o,n,s){const a=e(t,i),l="rtl"===s?"right":"left",c=`.${r} .videoCube{width: ${a}%; position: relative; float: ${l}; margin: 0 0 ${i}% 0; margin-${l}: ${i}%;}`;o.push(c)}function r(e,t,r,i,o){const n="rtl"===o?"right":"left",s="rtl"===o?"left":"right",a=`.${t} .trc_rbox_div .videoCube {width: ${1==+e.cells?"100":"48"}%;}`,l=`.${t} .trc_header_left_column {width: ${1==+e.cells?"100":"48"}%;}`,c=`.${t} .trc_header_right_column {display: ${1==+e.cells?"none":"inline"};}`,d=`.${t} .trc_rbox_div div.videoCube:nth-of-type(-n+${e.rows}){float:${n};clear:${n};}`,h=`.${t} .trc_rbox_div div.videoCube:nth-of-type(n+${e.rows+1}){float:none;clear:${s};margin-${n}:auto;}`;r.push(h),r.push(d),r.push(a),r.push(l),r.push(c)}function i(e,t,r,i,n,s,a){const l=e.rows*e.cells,c=`.${t} div.videoCube:nth-of-type(-n+${l}){display:block;visibility:visible;}`,d=`.${t} div.videoCube:nth-of-type(n+${l+1}){display:none;visibility:hidden;}`;r.push(c),r.push(d),s&&o(e,t,r,a)}function o(e,t,r,i){const o=e.cells,n=o/i*100;r.push(`.${t} .trc_rbox_div { width: ${n}%; }`),r.push(`.${t} .trc_rbox_outer { overflow-x: scroll; -webkit-overflow-scrolling: touch; }`)}function n(e,t,r,i,o){const n="rtl"===r?"right":"left";return i?`.${t} .trc_rbox_div{margin-${n}:-${e.margin*e.cells/o}%;}`:`.${t} .trc_rbox_outer{margin-${n}:-${e.margin}%;}`}function s(e,r,i,o,s,a,l){const c=1==+e.cells?"video-label-box":"trc-main-label",d=`.${r} .trc_rbox_outer .videoCube .${c} {height:auto;}`,h=`.${r} .trc_rbox_outer .videoCube {margin-bottom:10px;}`,u=n(e,r,s,a,l),p=TRCImpl.global["disable-one-row-widget-auto-height"],g=(a||!p)&&1==+e.rows;(1==+e.cells||g)&&(i.push(d),i.push(h)),i.push(u),i.push(`.${r} .videoCube_aspect{padding-bottom:${e.ratio}%; width: 100%;}`),t(e.cells,r,e.margin,i,o,s)}return{injectedStyles:{},rulesToCssText(e,t,o,n,a,l,c,d){const h=[];let u,p,g;for(u=0;p=t[u];u++)(g=void 0!==p.min||void 0!==p.max)&&h.push("@media screen and "),void 0!==p.min&&(h.push(`(min-width: ${p.min}px) `),p.max&&h.push("and ")),void 0!==p.max&&h.push(`(max-width: ${p.max}px) `),g&&h.push("{"),a?r(p,e,h,n,l):s(p,e,h,n,l,c,d),i(p,e,h,o,n,c,d),g&&h.push("} ");return h.join("")},getRulePercentageWidth:e}}(),(()=>{const e={now:"Now",today:"Today",yesterday:"Yesterday",minutes:"{0} minutes ago",hour:"1 hour ago",hours:"{0} hours ago",days:"{0} days ago"};TRC._translationQueue=TRC._translationQueue||[],TRC._translationQueue.push({"time-ago":e});class t{static setTimeAgoCustomLanguage(){__trcWarn("TRCRbox.dateFormatDays - custom language is depreciated")}static dateFormatTimeAgo(r,i,o){let n;if(!r||0===parseInt(r,10)||isNaN(r))return __trcWarn(`TRCRbox.dateFormatDays - published_date cannot be parsed, it is ${r}`),"";n=new Date(1e3*parseInt(r,10));const s="time-ago",{getLabel:a}=TRC.translationManager,l=a({feature:"time-ago"})||e,c=new Date,d=Date.now()-n.getTime();try{if(d<30*t.minute)return a({feature:s,label:"now"});if(d-1?(h(TRCImpl.trcEventRoute,t,i,d,c,n,a),TRCImpl.enableTrcEventRouteExperiment&&h(l,t,i,d,c,n,a)):h(l,t,i,d,c,n,a)}},getType:s}}(window,document),(()=>{const e="-delta",t=(r,i)=>{if(r.children)r.children.forEach(e=>{t(e,i)});else if(r.name&&!o(r.name)&&r.dlt){const t=r.name+e;i.modes[t]?r.name=t:i.modes[r.name]&&__trcWarn(`Could not resolve Multi-Widget delta mode name ${t}`)}},r=(t,r)=>{const i=t.m+e;o(t.m)||(r.modes[i]?t.m=i:r.modes[t.m]&&__trcWarn(`Could not resolve Feed / Added Widget delta mode name ${i}`))},i=(t,r)=>{const i=r.preloadRequest[t.uip];if(i){if(o(i.mode))return;const t=i.mode+e;r.modes[t]?i.mode=i.mode_name=t:r.modes[i.mode]&&__trcWarn(`Could not resolve Widget delta mode name ${t}`)}else __trcWarn(`Delta mode replace: placement ${t.uip} is missing from preloadRequest`)},o=t=>new RegExp(`${e}$`).test(t);TRC.deltaModeAdapter={switchModeNamesIfInDeltaTest(e,o){o&&o.trc&&o.trc.vl&&o.trc.vl.length&&o.trc.vl.forEach(o=>{TRC.util.isTrue(o.dlt)&&(o.multiWidget?t(o.multiWidget,e):o.m?r(o,e):i(o,e))})}}})(),function(e,t){var r=[],i=null,o=!1,n,s,a;function l(e){try{if(i&&(TRC.Browser["ieUpto"](10)?t.detachEvent("onreadystatechange",i):(t.removeEventListener("DOMContentLoaded",arguments.callee,!1),TRC.Interval.clear(i))),TRC.dom.isReady)return;TRC.dom.isReady=!0,TRC.dom.onReady=function(e){e()};for(var o=0;o-1},detectAnimationEvent:function(e,t){var r="animation"+t,i={animation:"animation"+t,WebkitAnimation:"webkitAnimation"+t.charAt(0).toUpperCase()+t.slice(1),OAnimation:"oanimation"+t,MozAnimation:"animation"+t,MSAnimation:"MSAnimation"+t};return Object.keys(i).some(function(t){if(void 0!==e.style[t])return r=i[t],!0}),r},createHTMLElement:function(e,t){var r;return r=document.createElement(e),t&&Object.keys(t).length&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r},elementMatchesSelector:function(e,t){var r,i;return["matches","msMatchesSelector","oMatchesSelector","mozMatchesSelector","webkitMatchesSelector"].some(function(t){return"function"==typeof e[t]&&(i=t),e[t]}),i?e[i](t):null},closest:function(e,t){if(TRC.util.isNativeFunction(e.closest))return e.closest(t);for(;!this.elementMatchesSelector(e,t);)if(!(e=e.parentElement))return null;return e},getWindowWidth:function(){return window.innerWidth?this.getWindowWidth=function(){return window.innerWidth}:0!=document.documentElement.clientWidth?this.getWindowWidth=function(){return document.documentElement.clientWidth}:this.getWindowWidth=function(){return document.body.clientWidth},this.getWindowWidth()},getWindowHeight:function(){return window.innerHeight?this.getWindowHeight=function(){return window.innerHeight}:0!=document.documentElement.clientHeight?this.getWindowHeight=function(){return document.documentElement.clientHeight}:this.getWindowHeight=function(){return document.body.clientHeight},this.getWindowHeight()},getDocumentWidth:function(){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))},getDocumentHeight:function(){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))},getScreenDensity:function(){var e=window.devicePixelRatio&&window.devicePixelRatio.toFixed(3);return e||(e=-1),e},getPageVerticalScroll:function(){return e.pageYOffset||t.body.scrollTop},getScrollTop:function(t){return t===e?this.getPageVerticalScroll()||document.documentElement.scrollTop:t.scrollTop},getViewportVerticalRange:function(){var e=this.getPageVerticalScroll(),t;return{min:e,max:e+this.getWindowHeight()}},getViewportHorizontalRange:function(){var e=c(),t;return{min:e,max:e+this.getWindowWidth()}},getElementRect:function(e){return e.getBoundingClientRect()},isInIframe:function(t){try{return e.top!==e.self}catch(e){return"boolean"==typeof t&&t}},createAugmentingContainers:function(e,t){for(var r=[],i=null,o,n=0;n1.3,function(){return a}),isSmartPhone:(s=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 320px) and (max-device-width : 480px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent),function(){return s}),isTablet:(n=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 768px) and (max-device-width : 1024px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent),function(){return n}),isDesktop:function(){return!(this.isTablet()||this.isSmartPhone())},getOuterWidth:function(e){var t,r,i;return e.getBoundingClientRect().width+parseFloat(getComputedStyle(e).marginLeft)+parseFloat(getComputedStyle(e).marginRight)},isHtmlContent:function(e){return/(?:%3C|[<>&])/.test(e)},setContentToElement:function(e,t){TRC.dom.isHtmlContent(t)?e.innerHTML=t:e.innerText=t},getPageMetaPropertyValue:function(e){for(var t=document.head.getElementsByTagName("meta"),r=0;r{const e={ID:"id",TITLE:"title",THUMBNAIL:"thumb",FOUND:"found"};class t{constructor(e,t){this.trcManager=e,this.parentContainerSelector=t.parentContainerSelector,this.additionalLogDataBuilder=t.additionalLogDataBuilder,this.isDedupEventSent=!1,this.initReportedItemsMap(),this.trcManager.sendPubsGenericEvent("DEDUP_DEBUG","true"),TRC.modDebug.logMessageToServer(1,"Duplicated items monitoring enabled",{pcs:this.parentContainerSelector,vi:TRC.pageManager.getPageData()})}initReportedItemsMap(){this.reportedItems={},Object.keys(e).forEach(t=>{const r=e[t];this.reportedItems[r]=[]})}checkForDuplicatedItems(){if(this.isDedupEventSent)return;const t=[].slice.call(document.querySelectorAll(`${this.parentContainerSelector} .videoCube`));this.checkAndNotifyMetaDataDuplication(t,e.ID)||(this.checkAndNotifyMetaDataDuplication(t,e.TITLE),this.checkAndNotifyMetaDataDuplication(t,e.THUMBNAIL))}checkAndNotifyMetaDataDuplication(e,r){const i=`data-item-${r}`,o=e.map(e=>e.getAttribute(i)),n=e.filter(e=>t.isItemMetaDataFoundMoreThanOnce(e,o,i));if(n.length)return n.forEach(e=>this.notifyItemMetaDataDuplication(e,i,r)),!0}static isItemMetaDataFoundMoreThanOnce(e,t,r){const i=e.getAttribute(r);return t.indexOf(i)!==t.lastIndexOf(i)}notifyItemMetaDataDuplication(t,r,i){if(-1!==this.reportedItems[i].indexOf(t)||this.isDedupEventSent)return;const o=`DUP_${e.FOUND.toUpperCase()}`,n=t.getAttribute("data-item-id"),s=t.getAttribute(r),a={mdt:i,md:s,ii:n,pcs:this.parentContainerSelector,vi:TRC.pageManager.getPageData()};this.trcManager.sendPubsGenericEvent(o,n),"function"==typeof this.additionalLogDataBuilder&&__trcCopyProps(this.additionalLogDataBuilder(t),a),TRC.modDebug.logMessageToServer(1,"Duplicated item served",a,!0),this.reportedItems[i].push(t),this.isDedupEventSent=!0}}TRC.DuplicatedItemsMonitor=t})(),(()=>{const e=e=>{if(TRC.DynamicModulesHooks){const t=TRC.DynamicModulesHooks.filter(t=>t.type===e);if(t)return t}return[]},t=(e,t)=>{TRC.DynamicModulesHooks&&TRC.DynamicModulesHooks.forEach(r=>{r.type===e&&r.callback&&r.callback(t)})},r=(e,t)=>{try{if(TRCImpl.getSessionData(TRC.session_data))i(e,t);else{const r=i.bind(null,e,t);TRC.eventDelegator.subscribe("user_id_ready",r,void 0)}}catch(e){__trcError(`error in DynamicModulesManager,sendModuleEvent: ${e.message}`)}},i=(e,t)=>{try{const r={moduleName:e,data:t},i={data:JSON.stringify(r),type:"fallback"};TRCImpl.sendEvent("pubs-generic",{d:JSON.stringify(i)},{})}catch(e){__trcError(`error in DynamicModulesManager.sendEvent: ${e.message}`)}};TRC.DynamicModulesManager={getDynamicModules:e,executeDynamicModules:t,sendModuleEvent:r}})(),function(e,t){"use strict";var r={},i=e.TRC,o;function n(e,t){e.innerHTML=r._tokenizeSingle(i.dom.getText(e),t)}function s(e,t){if(e){var r=o(function e(t){return t.className.search("title")>=0},e,"span"),i=o(function e(t){return t.className.search("description")>=0},e,"span");t.call(this,e,r,i)}}function a(e){return function(t){for(var r in t){var i;if(t.hasOwnProperty(r))t[r].boxes.forEach(function t(r){s(r.labelsBox,e),s(r.preLabelsBox,e)})}}}i.Ellipsis=r,r.doEllipsis=function(e){o=o||i.implClasses.TRCRBox.prototype.findElement,i.ellipsisPerf&&console.timeStamp("Taboola new ellipsis"),i.performance&&i.performance.mark("7.2.1",null,"Ellipsis","all","SmartEllipsis",i.PerfEvenType.START),r.measure(e),r.renderEllipsis(e),i.performance&&i.performance.mark("7.2.9",null,"Ellipsis","all","SmartEllipsis",i.PerfEvenType.STOP)},r.tokenize=function(e,t){return t=t in r._tokenizeStrategies?t:"word",a(function(e,i,o){e.trcEllipsisTokenized&&delete e.trcEllipsisTokenized;var s=r._tokenizeStrategies[t];i&&n(i,s),o&&n(o,s),e.trcEllipsisTokenized=!0})(e)},r.verifyTokenized=function(e){var t=!0;return a(function(e){t=t&&e.trcEllipsisTokenized})(e),t},r.measure=a(function(e,t,i){var o=t&&r._measureSingleElementSizes(t),n=i&&r._measureSingleElementSizes(i);e.trcEllipsisPositions={title:o,description:n}}),r.renderEllipsis=a(function(e,t,i){var o=e.trcEllipsisPositions;if(!o||t&&!o.title||i&&!o.description)__trcDebug("Calling renderEllipsis without measuring first. Skipping");else try{t&&r._repaintSingleEllipsis(t,o.title),i&&r._repaintSingleEllipsis(i,o.description)}catch(e){__trcDebug(e.message+". Skipping")}}),r._tokenizeStrategies={word:function(e){return{spaces:!0,tokens:e.split(/\s+/)}},letter:function(e){return{spaces:!1,tokens:e.match(/&[\w#]+;|./g)}}},r._tokenizeSingle=function(e,t){var r=t.call(this,e);return i.util.map(r.tokens,function(e){return" "===e?e:""+e+""}).join(r.spaces?" ":"")},r._measureSingleElementSizes=function(e){if(!e||!e.offsetHeight)return null;if(!e.firstChild||"INS"!=e.firstChild.tagName)return __trcDebug("Attempted to call measure on element before tokenize. Skipping");var t=o(function e(t){return t.className.search("lastLineEllipsis")>=0},e,"ins");if(t){var r=e.getElementsByTagName("ins");if(t.className.replace(/[\t\r\n\f]/g," ").indexOf("tblHideAllButFirst")>=0)for(var n=0;n=c&&(p=r[n]),void 0!==p&&u.push(i.dom.getText(s)),!g&&s.offsetTop>=l&&(g=r[n-1])}return{lastLineStartsAt:p,lastVisibleWord:g,singleLineContent:u,elementWidth:d,firstWordWidth:h}},r._repaintSingleEllipsis=function(e,o){if(o.lastVisibleWord){var n=t.createElement("ins");i.dom.addClass(n,"lastLineEllipsis");var s=e.tokenizeStrategy||"word",a=r._tokenizeStrategies[s]("").spaces;if(n.appendChild(document.createTextNode(o.singleLineContent.join(a?" ":""))),e.insertBefore(n,o.lastLineStartsAt),"word"===s&&o.firstWordWidth>=o.elementWidth)for(var l=e.getElementsByTagName("ins"),c=0;c{const e={collapsedHeight:490,expandButtonCaption:"Show More",collapseButtonCaption:"Show Less",fadeBackgroundColor:"#fff",fadeHeight:60,buttonTop:28,buttonBottom:10,fadeGradient:40};class t{constructor(t,r,i){this.externalCardMaxRetries=t.global["external-card-max-retries"]||5,this.externalCardRetryInterval=t.global["external-card-retry-interval"]||1e3,i=__trcCopyProps(e,{},i),this.init(r,i)}init(e,r,i=0){if(this.boxElement=document.getElementById(e),this.boxElement){if(this.boxElement.getBoundingClientRect().height{e.container!==this.boxElement||this.isExpanded||this.addExpandClasses()})}}TRC.ExpandableBox=t})(),TRC.ExternalContainerAppender={MAX_RETRIES:50,TIMEOUT:100,move(e,t,r=0){if(document.querySelector)if(t){let i,o=!1;try{i=document.querySelector(e)}catch(t){__trcWarn(`Exception while trying to find external container with selector ${e}: ${t}`),o=!0}i?(t.appendChild(i),TRC.dispatch("trcContentReady",{container:t})):r!0,hideFallbackElements(){return this},reportTimeToRender(){}};class i{constructor(e,{enable:t,elements_to_hide:r}={},{should_render:i}={}){this.originalPlacementName=e,this.isApprovedToRender=null,this.triedToHideFallbackElements=!1,this.enable=t,this.elements_to_hide=r,this.should_render=i}setIsApprovedToRender(){if(null===this.isApprovedToRender&&this.enable&&"function"==typeof this.should_render)try{this.should_render()?this.isApprovedToRender=!0:(this.isApprovedToRender=!1,c.report({type:"ERROR",reason:"notAllowedToRender",originalPlacementName:this.originalPlacementName}))}catch(e){this.isApprovedToRender=!1,__trcError("Fallback Error in should_render",e)}}isPlacementApprovedToRender(){return this.setIsApprovedToRender(),this.isApprovedToRender}hideFallbackElements({placement:e}){return this.isApprovedToRender&&!this.triedToHideFallbackElements&&(this.triedToHideFallbackElements=!0,this.hideElements(e)),this}reportTimeToRender({isCache:e,placement:t,recommendationList:r}){c.report({type:"placementData",timeToRendered:performance.now&&performance.now(),originalPlacementName:this.originalPlacementName,placementName:t,items:r?r.length:null,isCache:!!e})}hideElements(e){Array.isArray(this.elements_to_hide)&&this.elements_to_hide.forEach(t=>{const r=document.querySelectorAll(t);if(r.length)for(let e=0;e{try{const r=e.fpl||e.uip,i=t[r];if(i&&i.skip_dom_render)return!1}catch(e){__trcError("Fallback shouldRenderPlacementByRequest Error",e)}return!0},n=(e,t)=>{try{return a(e,t).isPlacementApprovedToRender()}catch(e){__trcError("Fallback shouldRenderPlacement Error",e)}return!0},s=e=>{try{l(e).hideFallbackElements(e).reportTimeToRender(e)}catch(e){__trcError("Fallback Error in finalize",e,.2)}},a=({cga:t,fpl:o,uip:n},s={})=>{const a=o||n,l=e[a];if(l)return l;const c=t&&t.fallback;return c&&!l?(e[a]=new i(a,c,s[a]),e[a]):r},l=({response:t,placement:i})=>{const o=t.feedPlacement||i;return e[o]||r},c={report:e=>{if(TRC.util.isPercentEnabled(TRCImpl.global,"enable-fallback-events")){const t={data:JSON.stringify(e),type:"fallback"};TRCImpl.sendEvent("pubs-generic",{d:JSON.stringify(t)},{})}},runOnError:r=>{const{placement:i}=r,o=e[i],n=t[i];if(n&&"function"==typeof n)try{n()}catch(e){__trcError("Fallback Error in on_error",e)}o&&o.enable&&c.report({type:"ERROR",reason:"failedToRender",placement:i})},setOnError:({placement:e,on_error:r})=>{t[e]=r}};TRC.listen("onRboxFlowError",c.runOnError),TRC.fallbackApi={shouldRenderPlacement:n,shouldRenderPlacementByRequest:o,finalize:s,setOnError:c.setOnError},window._trcIsUTactive&&(TRC.fallbackApi.unitestsHelpers={fallbackUtils:c,getFallbackPlacement:l,build:a,clearFallbackPlacements:()=>{e={}}})}(),function(){let e=!1;function t(){try{!e&&r()&&(TRCImpl.sendAbTestEvent("isFeedViewIframe",window.top.TRC.pageManager.getPageData()),e=!0)}catch(e){__trcError("Error in TRC.FeedViewInIframeReport.report(): ",e)}}function r(){let e=!1,t,r;try{return TRC.dom.isInIframe(!0)&&(t=window.top&&window.top.TRC&&window.top.TRC.FeedView)&&(r=t.getSelectors(),e=window.frames&&window.frames.name===r.IFRAME_ID),e}catch(e){__trcError("Error in TRC.FeedViewInIframeReport.isFeedViewIframe(): ",e)}}TRC.FeedViewInIframeReport={report:t},window._trcIsUTactive&&(TRC.FeedViewInIframeReport.isFeedViewIframe=r)}(),(()=>{class e{constructor(t){e.loadFeedViewModuleWhenNeeded(),t.feedViewConfig=!0,TRC.hasFeedView=!0}static loadFeedViewModuleWhenNeeded(){const e=TRC.util.isRboxEncapsulated(TRC),t=TRC.dom.isInIframe(!0);e||t||TRC.feedViewModuleLoaded||TRC.ModuleLoader.load("feed-view",TRC.FeedView,()=>{TRC.feedViewModuleLoaded=!0})}static isFeedViewWidget(e,t){const r=e.getProperty(null,"feed-view-devices"),i=e.getProperty(null,"feed-view-enable"),o=e=>"all"===r||r===e;return!(TRC.util.isFalse(i)||TRC.util.isTrue(TRC.dom.isSmartPhone())&&TRC.util.isFalse(o("smart_phone"))||TRC.util.isFalse(TRC.dom.isSmartPhone())&&TRC.util.isFalse(o("desktop"))||TRC.util.isFalse(e.getProperty(t.mode_name,"mode-enable-feed-view"))||TRC.util.isTrue(TRC.hasFeedView)||e.global["disable-feed-view-top-referrer"])}}TRC.FeedViewWidgetLoaderManager=e})(),(()=>{class e{constructor(e,t){this.trcManager=e,this.trcCache=e.trcCache,this.firstIframe=t,this.renderedCardsPreviously=!1,this.feedContainerNum=TRC.feedContainerNum,this.shouldBreakForAMPSplitFeed=!1,this.CACHE_KEYS={F:"tbl_f",SYNC_FI:"tbl_syncFi",SYNC_FB:"tbl_syncFb",SYNC_VIEW_ID:"tbl_syncViewID",PUB_CARD_LOCS:"tbl_pubCardLocs",NEXT_IFRAME_TO_LOAD:"tbl_nextIframeToLoad",CURRENT_AMP_FRAME_NUM:"tbl_currentAmpFrameNum"}}cacheOrAssignFeedResponseData(e){!0===this.firstIframe&&!1===this.renderedCardsPreviously?(this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.F,e.trc.f),this.renderedCardsPreviously=!0):!1===this.renderedCardsPreviously&&!1===this.firstIframe&&(e.trc.f=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.F),this.renderedCardsPreviously=!0)}handleFeedIndexOffset(e){return e.fi=this.syncFi+1,e.fi}cacheLeftoverCards(e,t){const r={};__trcCopyProps(e,r);const i=TRC.TrcCache.extractKey(this.reqForCacheKey);this.trcCache.enableCacheViaStorageFlag(),r.trc.vl.splice(0,t+1),this.trcCache.cacheResponse(i,r)}handlePubCardInResponse(e,t){const r=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.PUB_CARD_LOCS),i=parseInt(TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),10);i===parseInt(this.feedContainerNum,10)&&TRC.pageManager.sessionStorageSetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD,i+1);const o=t+1+this.oldSyncFi;-1===r.indexOf(o)&&this.currentAmpFrameNum<=this.feedContainerNum&&r.push(o),this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.PUB_CARD_LOCS,r),this.currentAmpFrameNum=r.length+1,TRC.currentAmpFrameNum=this.currentAmpFrameNum,this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.CURRENT_AMP_FRAME_NUM,this.currentAmpFrameNum),TRC.keyWriting=!0,this.cacheLeftoverCards(e,t),this.shouldBreakForAMPSplitFeed=!0}updateFeedIndexAndBatch(e){let t,r;this.oldSyncFi=this.syncFi,t=Number(this.oldSyncFi)+e.trc.vl.length;const i=Object.keys(e.trc.f),o=i[0];this.syncFb=parseInt(e.trc.f[o].nb,10),!0===e.cached&&(t-=r=e.trc.vl.length),this.syncFi=t,this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_FI,t),this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_FB,this.syncFb)}copyReqToReqForCacheKey(e){this.reqForCacheKey={},__trcCopyProps(e,this.reqForCacheKey)}static getPlacementId(e){return e&&e.placement?e.placement.split("|").pop().trim():""}detectDuplicateCards(t){const r=e.getPlacementId(t);null!==this.ampSplitFeedCache.getCacheData(r)?__trcError("Duplicate Card Index In AMP Split Feed"):this.ampSplitFeedCache.cacheData(r,!0)}detectSkippedCard(t){const r=e.getPlacementId(t),i=r.split(" "),o=i[0],n=i[1];if(isNaN(n))return void __trcError("Card name doesn't contain numeric index In AMP Split Feed");const s=`${o} ${parseInt(n,10)-1}`;n>1&&null===this.ampSplitFeedCache.getCacheData(s)&&__trcError("Card(s) Skipped In AMP Split Feed")}initParametersForSplitFeedFrames(){const e=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_FI),t=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_FB);this.syncFi=null===e?null:parseInt(e,10),this.syncFb=null===t?null:parseInt(t,10);const r=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_VIEW_ID);null===r?this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_VIEW_ID,TRC.pageManager.getPageData()):TRC.syncViewID=r;let i=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.PUB_CARD_LOCS);i||(i=[],this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.PUB_CARD_LOCS,i)),this.currentAmpFrameNum=i.length+1}checkAMPSplitFeedFlagsAndInit(e,t){this.nextIframeToLoad=TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),this.sentIframeLoadFailed=!1,this.attemptCounter=0,this.MAX_ATTEMPTS=20,!this.nextIframeToLoad&&this.firstIframe&&(this.nextIframeToLoad="1",TRC.pageManager.sessionStorageSetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD,this.nextIframeToLoad)),this.nextIframeToLoad!==this.feedContainerNum?this.timeoutID=setTimeout(this.delayInit.trcBind(this,e,t),300):(this.didInit=!0,t(e))}static sendIframeLoadFailed(e){TRC.pConsole("errors","error","AMP split feed iframe",e,"blocked from out of order loading")}delayInit(t,r){try{this.attemptCounter++,!this.sentIframeLoadFailed&&this.attemptCounter>=this.MAX_ATTEMPTS&&(e.sendIframeLoadFailed(TRC.feedContainerNum),this.sentIframeLoadFailed=!0),this.nextIframeToLoad=TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),this.nextIframeToLoad===TRC.feedContainerNum?(this.didInit=!0,clearTimeout(this.timeoutID),r(t)):this.timeoutID=setTimeout(this.delayInit.trcBind(this,t,r),300)}catch(e){__trcError("AMP split feed - error in delaying iframe init",e)}}initAmpSplitFeedIframe(e){this.trcManager.trcCache.reloadCache(),this.ampSplitFeedCache=new TRC.KeyValueCache({cacheName:"trc_amp_split_feed_cache",noTtl:!0}),this.initParametersForSplitFeedFrames(),this.trcManager.dispatchRequestWrapper(e)}}TRC.AmpSplitFeedManager=e})(),(()=>{const e="card-available",t="card-visible",r="card-interaction",i=["click"];class o{constructor(e,t,r,i){const{feedDynamicParameters:o}=t;this.trcManager=e,this.cardPlacementData=r,this.exactVisibleDistanceThresholdFromTop=o&&o.exactVisibleDistanceThresholdFromTop||this.trcManager.global["exact-visible-distance-threshold-from-top"]||200,this.listenToCardInteractionEvents(i)}sendEvent(e,t){TRC.TrcEventsLogger.sendPlacementEvent(this.trcManager,this.cardPlacementData,e,t)}handleRenderedCard(t){t.style.position="relative",this.sendEvent(e),this.observeCardVisibility(t)}listenToCardInteractionEvents(e){i.forEach(t=>{TRC.dom.on(e,t,this.sendCardInteractionEvent.trcBind(this,t)),"click"===t&&e.querySelector("iframe")&&TRC.dom.on(window,"blur",this.checkIfCardIFrameClickedAndLog.trcBind(this,e))})}checkIfCardIFrameClickedAndLog(e){const{activeElement:t}=document;t&&"iframe"===t.tagName.toLowerCase()&&(t===e||e.contains(t))&&this.sendCardInteractionEvent("click")}sendCardInteractionEvent(e){const t={id:Date.now(),type:e},i={d:JSON.stringify(t)};this.sendEvent(r,i)}observeCardVisibility(e){const r={targetElement:e,enableDelayedVisibilityCheck:!0,exactVisibleThresholdFromTop:this.exactVisibleDistanceThresholdFromTop,onTrigger:this.sendEvent.trcBind(this,t,null)};TRC.intersections.isInViewPort(r)}}TRC.CardEventsManager=o})(),(()=>{const e="tbl-feed-container",t="tbl-feed-card",r="tbl-feed-full-width",i="tbl-feed-partial-width",o="tbl-feed-abp",n="data-feed-container-num",s="data-feed-main-container-id",a="data-parent-placement-name",l="data-pub-lang",c={FULL_WIDTH:"FULL_WIDTH",PARTIAL_WIDTH:"PARTIAL_WIDTH"};class d{constructor(e,t,r){const i=__trcCopyProps(r,{});this.trcManager=e,this.container=t.container,this.origContainer=this.container,this.mainContainerId=this.container.id,this.mainContainerPlacement=t.placement,this.numContainers=1,this.testData=e.testData,this.experimentsData=e.experimentsData,this.experimentsHash=e.experimentsHash,this.options=r,this.numPendingPublisherCards=0,this.layout=r.mobileLayout||r.feedUi&&r.feedUi.layout,this.shouldDisableScopeCss=this.trcManager.global["disable-scope-feed-css"],this.firstCardRequestId=t.firstCardRequestId,this.unifiedPlacement=t.unifiedPlacement,this.feedInViewPort=!1,r.wasWidget&&(this.widgetToFeedHelper=new TRC.WidgetToFeedHelper(this,e,r.hasFeedUI)),r.videoSingleManager&&this.loadVideoSingleManager(t,e,r),!1!==r.hasFeedUI&&TRC.dom.injectStyle(this.createCss(r),null),i.afterPlacementContainerCreated=d.addFeedCardAttributes.trcBind(this),i.itemsParentContainerSelector=`[${s}="${this.mainContainerId}"]`,this.infiniteScrollEngine=new TRC.InfiniteScrollEngine(e,t,i),this.publisherCardsManager=new TRC.PublisherCardsManager(this,e,t,r);const o=d.getFeedConfig(r,"footerOverlayConfig","footerOverlay");o&&TRC.ModuleLoader.load("feed-footer-overlay",TRC.FooterOverlay,()=>{this.footerOverlay=new TRC.FooterOverlay(e,o)}),TRC.isAMPSplitFeed&&(this.numContainers=this.trcManager.ampSplitFeedManager.feedContainerNum),this.setMainContainerCssClassesAndAttributes(this.container,r),this.listenToCardContentReady(),this.header=this.createHeader(r.feedUi),TRC.Heatmap.isEnabled(this.trcManager)&&(this.heatmap=new TRC.Heatmap(e),TRC.dom.on(this.container,"click",e=>{this.heatmap.captureAndSendClickData(e)})),this.observeFeed()}handlePlacement(e){const t=e.trcResponse&&e.trcResponse.spl,r=e.trcResponse&&e.trcResponse.pcp,i=e.trcResponse&&e.trcResponse.scac?null:this.infiniteScrollEngine.numPlacements;return t?(this.infiniteScrollEngine.handlePlacement(e),this.publisherCardsManager.registerPublisherCardForHandling(e),void this.publisherCardsManager.handlePendingPublisherCards(0,i,null,t)):(TRC.isAMPSplitFeed&&(this.trcManager.ampSplitFeedManager.detectDuplicateCards(e),this.trcManager.ampSplitFeedManager.detectSkippedCard(e)),r?TRC.isAMPSplitFeed?void this.stopScrolling():(this.publisherCardsManager.registerPublisherCardForHandling(e),this.infiniteScrollEngine.numPlacements++,void this.numPendingPublisherCards++):(this.numPendingPublisherCards>0&&(this.publisherCardsManager.handlePendingPublisherCards(0,i,null,t),this.numPendingPublisherCards=0),this.infiniteScrollEngine.handlePlacement(e),this.trcManager["after-card-created"](e,i,this),void TRC.CustomModulesManager.runHook("after-card-created",this.mainContainerPlacement,this,e,i,this)))}stopScrolling(){this.infiniteScrollEngine.stopScrolling()}setIsAllowedToRequestMoreContent(e){this.infiniteScrollEngine.setIsAllowedToRequestMoreContent(e)}updateNextBatchNumber(e){this.infiniteScrollEngine.updateNextBatchNumber(e)}setMainContainerCssClassesAndAttributes(t,d){const h=[e];switch(this.layout){case c.FULL_WIDTH:h.push(r);break;case c.PARTIAL_WIDTH:h.push(i)}d.feedUi&&d.feedUi.cardFrame&&h.push(`tbl-feed-frame-${d.feedUi.cardFrame}`),TRC.blocker.blockedState>0&&h.push(o),TRC.dom.addClass(this.container,h.join(" ")),this.numContainers>1&&(this.container.id=`${this.mainContainerId}-split-num-${this.numContainers-1}`),t.setAttribute(n,this.numContainers),t.setAttribute(s,this.mainContainerId),t.setAttribute(a,this.mainContainerPlacement),this.trcManager.language&&t.setAttribute(l,this.trcManager.language)}createHeader(e){if(TRC.isAMPSplitFeed&&this.trcManager.ampSplitFeedManager&&1!==Number(this.trcManager.ampSplitFeedManager.feedContainerNum))return;const t=document.createElement("div"),r=document.createElement("div"),i=!(!e||!e.feedHeaderData),o=e&&e.logoPosition&&"NONE"!==e.logoPosition?e.logoPosition:null,n=o?`tbl-logo-${o.toLowerCase()}-position`:"";if(r.className="tbl-feed-header-logo",t.className=` tbl-feed-header ${n}`,t.appendChild(r),TRC.ccpa.renderOnHeaderFeed(t,this.unifiedPlacement,o),i){const r=d.createFeedHeaderTextElement(e.feedHeaderData.headerText);t.className+=" tbl-header-with-text",t.appendChild(r)}return this.container.insertBefore(t,this.container.firstChild),t}static createFeedHeaderTextElement(e){const t=document.createElement("div");return t.className="tbl-feed-header-text",t.innerText=e,t}static addFeedCardAttributes(e,t){e.setAttribute("tbl-feed-card",""),t.isStandaloneVideo&&d.setFeedVideoCardAttribute(e),d.setFeedCardVideoIndication(e,t)}static setFeedCardVideoIndication(e,t){t.trcResponse.nvb&&e.setAttribute("no-vbelow",""),t.trcResponse.nva&&e.setAttribute("no-vabove","")}static setFeedVideoCardAttribute(e){e.setAttribute("tbl-feed-video","")}listenToCardContentReady(){TRC.listen("trcContentReady",this.onTrcContentReady.trcBind(this))}onTrcContentReady(e){const{container:t}=e;if(t&&t.placementData){const{placementData:e}=t;if(!e.isFeedCard)return;this.onCardContentReady(t,e)}}onCardContentReady(e,r){const{style:i,id:o}=e,{trcResponse:n,expandOptions:s}=r;TRC.dom.addClass(e,t),n.cpad&&(i.padding=n.cpad),s&&(e.expandableBox=new TRC.ExpandableBox(this.trcManager,o,s),this.listenToBoxChildIFrameClick())}listenToBoxChildIFrameClick(){this.expandableBoxIFrameClickListener||(this.expandableBoxIFrameClickListener=!0,TRC.dom.on(window,"blur",()=>{const{activeElement:e}=document;e&&TRC.dom.elementMatchesSelector(e,`[${s}="${this.mainContainerId}"] .${t} iframe`)&&TRC.dispatch("expandableBoxChildIFrameClick",{container:TRC.dom.closest(e,` .${t}`)})}))}createCss(e){const t=[];e.feedCss?t.push(e.feedCss.replace(/{FEED_MAIN_CONTAINER_ID_ATT}/g,`[${s}="${this.mainContainerId}"]`)):t.push(d.getDefaultFeedCSS()),this.isFullWidthMobileFeed(e)&&t.push(this.getMobileFullWidthMarginsCss()),e.feedUi&&t.push(d.getFeedUiCss(e.feedUi,this.mainContainerId)),e.publisherFeedCss&&t.push(e.publisherFeedCss),t.push(e.feedCssOverride);let r=t.join("");return this.shouldDisableScopeCss||(r=d.scopeCss(r,this.mainContainerId)),r}static scopeCss(t,r){return t.replace(new RegExp(`.${e}`,"g"),`[${s}="${r}"]`)}getTestData(){return this.testData}getExperimentsData(){return this.experimentsData}getExperimentsHash(){return this.experimentsHash}static getFeedUiCss(e,t){const r=[],i=e.feedBackgroundColor||e.feedBackground,o=`[${s}="${t}"]`;if(r.push(`${o}[${n}] {background-color: ${i}; padding: ${e.feedPadding};}`),"NONE"===e.logoPosition?r.push(`${o} .tbl-feed-header .tbl-feed-header-logo {display:none;}`):r.push(`${o} .tbl-feed-header {padding: 0px 5px 10px 5px; background: transparent; text-align: initial; display: table; width: 100%;}`),e.feedHeaderData){const{headerFontSize:t="20px",headerFontFamily:i="Arial, Helvetica, sans-serif",headerColor:n="#000000",headerFontStyle:s="normal"}=e.feedHeaderData;r.push(`${o} .tbl-feed-header .tbl-feed-header-text {font-size: ${t}; color: ${n}; line-height: ${t}; font-family: ${i}; font-weight: ${s}}`)}return r.join("")}getMobileFullWidthMarginsCss(t){const i=t?this.container.parentNode:this.container,o=i.getBoundingClientRect(),s=-1*o.left,a=-1*(document.documentElement.clientWidth-o.width-Math.abs(s));let l=`#${this.container.id}.${e}.${r}`;return(s||a)&&i.offsetParent?(t&&(l+=`[${n}="${t}"]`),`@media screen and (max-width: 480px) {\n ${l} {\n margin-left: ${s}px;\n margin-right: ${a}px;\n }\n }`):""}static getDefaultFeedCSS(){return`.${e} { position: relative; margin-top: 20px; margin-bottom: 20px; -webkit-text-size-adjust: 100%; clear: both; } .${e} .tbl-feed-header { padding: 5px; background-color: #ffffff; display: inline-block; } .${e} .tbl-feed-header-logo { background: url(//cdn.taboola.com/static/f8/f89e1763-220d-4e09-ba69-9e040548fb7a.svg) no-repeat 0 0; background-size: contain; height: 11px; width: 76px; display: inline-block; } .${e} .tbl-loading-spinner { margin-bottom: 10px; } .${e} .${t} { margin-bottom: 10px; background-color: #ffffff; border: 1px solid #f1f1f1; } .${e} .${o} { max-width: 770px; margin: 20px auto 0; }/** Mobile CSS Rules **/@media screen and (max-width: 480px) { .${e} { padding: 0; background-color: #ffffff; } .${e} .tbl-feed-header { margin-left: 2px; padding: 5px 0; } .${e} .${t} { margin-bottom: 5px; padding-bottom: 5px; border-width: 0; border-bottom: 4px solid #f1f1f1; } .${e} .trc_header_ext, .${e} .trc-widget-footer { padding-right: 3px; } }/** End of Mobile CSS Rules **/`}getVideoManagerRequestData(){return{"session-data":TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),req:this.firstCardRequestId}}loadVideoSingleManager(e,t,r){const i=__trcCopyProps(e,{},null),o=__trcCopyProps(r.videoSingleManager,{});o.parentFeedOptions=r,this.videoManager=new TRC.VideoTagLoader(t,o,i,null,this.getVideoManagerRequestData()),this.videoManager.loadVideo()}switchMainContainer(e){this.container=e,this.infiniteScrollEngine.switchMainContainer(this.container)}isFullWidthMobileFeed(e){const t=e.mobileLayout||this.layout;return t===c.FULL_WIDTH}getIsFirstBatch(){return this.infiniteScrollEngine.getIsFirstBatch()}static getFeedConfig(e,t,r){if(e){const i=this.getFeedDynamicParameter(e.feedDynamicParameters,t);return i||e[r]}return null}static getFeedDynamicParameter(e,t){if(e){const r=e[t];if(r)return JSON.parse(r)}return null}observeFeed(){TRC.intersections.observe({targetElement:this.container,onEnter:this.onFeedEnterViewport.trcBind(this),onExit:this.onFeedExitViewport.trcBind(this),rootMargin:"0px"})}onFeedEnterViewport(){this.feedInViewPort=!0,TRC.dispatch("feed-present-in-viewport",!0)}onFeedExitViewport(){this.feedInViewPort=!1,TRC.dispatch("feed-present-in-viewport",!1)}}TRC.Feed=d})(),(()=>{class e{constructor(e){this.trcManager=e,this.feeds={},this.invalidFeedsMap={},this.configs={}}handleFeedCardPlacement(t,r){r.isFeedCard=!0,e.setScaArray(r,t);const i=this.getOrCreateFeed(t),o=i&&i.options,n=o&&TRC.Feed.getFeedDynamicParameter(o.feedDynamicParameters,"feedViewConfig"),s=o&&o.feedView,a=o&&(n||s),l=n&&TRC.util.isFalse(n.isFeedView)?n.isFeedView:a;i&&(l&&(TRC.hasFeedView||this.trcManager.global["disable-feed-view-top-referrer"]||(TRC.hasFeedView=!0),TRC.FeedViewWidgetLoaderManager.loadFeedViewModuleWhenNeeded(),a&&a.enableAEClicks&&(i.enableAEClicks=!0),r.feedViewConfig=a),r.parentFeed=i,r.parentFeed.handlePlacement(r))}getOrCreateFeed(e){const t=e.fpl,r=this.getFeedConfig(t),i=this.feeds[t]||this.createNewFeed(r,t,e);if(window.__trcInfo(JSON.stringify({name:t,nb:r.nb||"",eof:r.eof||"",fti:r.fti||"",vsm:!!r.vsm})),i instanceof TRC.Feed)return r.eof&&i.stopScrolling(),r.nb&&i.updateNextBatchNumber(r.nb),i}createNewFeed(t,r,i){const{uuip:o,ri:n,sca:s}=i,{fcs:a,rooc:l,exm:c}=t,d=e.parseFeedOptionsFromResponse(t);c&&(TRC.util.sendSupplyFeature("EXPLORE_MORE","ADOPTED"),this.trcManager.enableExploreMore(t,r)),TRC.VirtualPlacementsManager.handleVirtualPlacement(this.trcManager,r);const h=this.trcManager.preloadRequest[r];if(h){if(h.isFeed=!0,!a||(h.container=this.getNewFeedContainer(h.container,r,a,l),h.container))return h.fti=t.fti,h.unifiedPlacement=o,h.firstCardRequestId=n,h.sca=s,this.feeds[r]=new TRC.Feed(this.trcManager,h,d)}else __trcDebug(`'createNewFeed' : placement '${r}' was not in the request - ignore`)}getNewFeedContainer(e,t,r,i){const o="feed",n={container:e,"container-selectors":r,"render-on-orig-container":i},s=this.trcManager.getWidgetContainer(n,o);if(s)return s;this.invalidFeedsMap[t]=!0}getFeedConfig(e){return this.configs&&this.configs[e]?this.configs[e]:{}}hasFeedConflict(e,t){return this.feeds[e]||this.hasFeedTestDataMismatch(t)}hasFeedTestDataMismatch(e){const t=this.feeds[e];if(!t)return!1;if(t.getTestData()!==this.trcManager.testData)return!0;const r=t.getExperimentsHash(),i=this.trcManager.experimentsHash;return r&&!i||!r&&i||r&&i&&r!==i}static setScaArray(e,t){e&&e.globalTrcResponseJSON&&e.globalTrcResponseJSON.sca&&(t.sca=e.globalTrcResponseJSON.sca)}static isExperimentDataEqual(e,t){const r=JSON.stringify(e),i=JSON.stringify(t);return r===i}static parseFeedOptionsFromResponse(e){return{nextBatchDistanceThreshold:e.nbdt,feedCss:e.css,feedCssOverride:e.fcss,publisherFeedCss:e.pfcss,mobileLayout:e.fml,videoSingleManager:e.vsm,feedUi:e.fui,feedNextUp:e.fnu,exploreMore:e.exm,footerOverlay:e.fov,feedDynamicParameters:e.drp,videoDisclosurePosition:e.vdp,uiDesignVersion:e.udv,wasWidget:TRC.util.isTrue(e.ww),firstBatchLazyLoadingEnabled:TRC.util.isTrue(e.fbll),hasFeedUI:void 0===e.hfu||TRC.util.isTrue(e.hfu),hasPreventReachingFooter:TRC.util.isTrue(e.prf),preventReachingFooterData:e.prfd,feedView:TRC.util.isTrue(e.fv)}}static createFeedScriptWidgetData(e,t){return{placement:e,scriptData:t,addWidget:!0}}static createFeedIframe(e,t){return{placement:e,iframeData:t,addWidget:!0,isIframeCard:!0}}static createPublisherCardData(e,t){return{placement:e,addWidget:!0,publisherCardData:t.pcp}}static createExternalWidgetData(e,t){return{placement:e,externalContainerSelector:t.es}}static isExternalContainerWidget(e){return void 0!==e.es&&null!==e.es}static isFeedScriptWidget(e){return e.fpl&&e.js}static isFeedIframe(e){return e.fpl&&e.ifr}static isPublisherCard(e){return e.fpl&&e.pcp}}TRC.FeedsManager=e})(),(()=>{class e{constructor(e,t,r){this.trcManager=e,this.parentPlacementData=t,this.parentPlacementName=t.placement,this.container=t.container,this.origContainer=this.container,this.parentContainerId=this.container.id,this.afterPlacementContainerCreated=r.afterPlacementContainerCreated,this.nextBatchDistanceThreshold=r.nextBatchDistanceThreshold||2e3,this.numPlacements=1,this.scAdjacencyPlacements=0,this.feedDynamicParameters=r.feedDynamicParameters,this.uiBatchNumberCounter=1,this.isPendingNextBatch=!0,this.numOfConsecutiveFailedRequests=0,this.maxNumOfConsecutiveFailedRequests=this.trcManager.global["feed-max-num-of-consecutive-failed-requests"]||10,this.nbLoaderLayerEnabled=this.trcManager.global["enable-cls-loader-optim"],this.firstBatchLazyLoadingEnabled=r.firstBatchLazyLoadingEnabled,this.isFirstBatchRequest=!0,this.isLoadNextBatchAnchorObserveEnter=!1,this.currentBatchSuccessful=!1,this.enableManualLoadNextBatch=this.trcManager.manualVisibilityTrigger&&this.trcManager.global["enable-manual-visible"]||this.feedDynamicParameters&&this.feedDynamicParameters.manualLoadNextBatch,this.numPlaceholderItems=this.feedDynamicParameters&&this.feedDynamicParameters.numPlaceholderItems||3,this.itemsParentContainerSelector=r.itemsParentContainerSelector||`#${this.parentContainerId}`;const i=this.feedDynamicParameters&&this.feedDynamicParameters.rootSelectorScrollElement||this.trcManager.global["feed-load-next-batch-root-selector"];this.observerRootSelector=i||null,this.observerScrollElement=i&&document.querySelector(i)||window,this.feedObserverLoadNextBatch=this.feedDynamicParameters&&this.feedDynamicParameters.feedObserverLoadNextBatch,this.firstBatchDistanceThresholdFromTop=this.feedDynamicParameters&&this.feedDynamicParameters.firstBatchDistanceThresholdFromTop||this.trcManager.global["first-batch-distance-threshold-from-top"];const o=TRC.util.isTrue(this.trcManager.global["feed-observer-load-next-batch"]);(o||this.feedObserverLoadNextBatch&&!this.enableManualLoadNextBatch)&&(this.isLoadNextBatchUsingObserver=!0),this.firstBatchDistanceThresholdFromTop&&!this.enableManualLoadNextBatch&&(this.throttledLoadRestOfBatchScrollHandler=this.loadRestOfBatchScrollHandler.trcBind(this,this.firstBatchDistanceThresholdFromTop).trcThrottle(10),TRC.dom.on(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler)),this.enableManualLoadNextBatch&&(this.lastManualRectsTop=0,this.listenToManualLoadNextBatchEvent()),this.feedDynamicParameters&&this.feedDynamicParameters.enableHistory&&(this.historyManager=new TRC.HistoryManager(e)),this.isLoadNextBatchUsingObserver&&this.createLoadNextBatchObserverAnchorElement();const n=TRC.Feed.getFeedConfig(r,"preventReachingFooterConfig","preventReachingFooterData");this.hasPreventReachingFooter=n&&void 0!==n.enable?TRC.util.isTrue(n.enable):r.hasPreventReachingFooter,n&&this.hasPreventReachingFooter&&TRC.PreventReachingTheFooter.init(this,n),this.listenToTrcResponse(),this.createLoadingIndicator(),this.initMonitoringOfDuplicatedItemsIfNeeded()}loadRestOfBatchScrollHandler(e){const t=this.isNearingStartOfPage(e);this.restOfFirstBatchLoaded||this.isCache?TRC.dom.off(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler):!this.restOfFirstBatchLoaded&&t&&(this.getNextBatch(),TRC.dom.off(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler))}createNewNextBatchAnchorObserver(){TRC.dom.off(this.observerScrollElement,"scroll",this.nextBatchObserverCreator),TRC.intersections.unobserve(this.loadNextBatchAnchorObserverId),this.ampFeedResizeListener&&this.ampFeedResizeListener.remove(),this.nextBatchObserverCreator=null,this.isLoadNextBatchAnchorObserveEnter=!1,this.observeNextBatchAnchor()}observeNextBatchAnchor(){const e=this.getNextBatchDistanceThreshold(),t={rootSelector:this.observerRootSelector,targetElement:this.loadNextBatchAnchorContainer,threshold:[0,.25,.5,.75,1],rootMargin:`0px 0px ${e}px 0px`,onEnter:this.getNextBatch.trcBind(this)};this.loadNextBatchAnchorObserverId=TRC.intersections.observe(t)}createLoadingSpinner(){this.spinnerContainer=document.createElement("div"),this.spinnerContainer.className+="tbl-loading-spinner tbl-hidden",this.container.appendChild(this.spinnerContainer)}createLoadingCardPlaceholder(){this.spinnerContainer=document.createElement("div"),TRC.ModuleLoader.load("feed-card-placeholder",TRC.FeedCardPlaceHolder,()=>{TRC.FeedCardPlaceHolder.createLoadingCardPlaceholder({direction:this.trcManager.direction,container:this.container,cardPlaceholder:this.spinnerContainer,numPlaceholderItems:this.numPlaceholderItems})})}reserveSpaceForLoader(e,t,r){if(this.nbLoaderLayerEnabled)if(t){const e=t.style.getPropertyValue("padding-bottom");t.style.removeProperty("padding-bottom"),r.style.setProperty("padding-bottom",`${e}`,"important")}else{let t;if(e)t=50;else if(TRC.dom.isSmartPhone()){const e=95,r=8;t=this.numPlaceholderItems*e+r}else{const e=173,r=40;t=this.numPlaceholderItems*e+r}r.style.setProperty("padding-bottom",`${t}px`,"important"),this.spinnerContainer.style.setProperty("position","absolute","important")}}createLoadingIndicator(){const e=this.trcManager.global["disable-nb-anim"];if(!e){const e=this.feedDynamicParameters&&"true"===this.feedDynamicParameters.disableLoadingCardsPlaceholder||this.trcManager.global["disable-loading-cards-placeholder"];e?this.createLoadingSpinner():this.createLoadingCardPlaceholder(),this.reserveSpaceForLoader(e,null,this.container)}}createLoadNextBatchObserverAnchorElement(){this.loadNextBatchAnchorContainer=document.createElement("div"),this.loadNextBatchAnchorContainer.className="tbl-batch-anchor",this.container.appendChild(this.loadNextBatchAnchorContainer),this.observeNextBatchAnchor()}stopScrolling(){if(this.preventReachingTheFooter&&this.preventReachingTheFooter.disable(),this.isLoadNextBatchUsingObserver)return this.isAllowedToRequestMoreContent=!1,void TRC.intersections.unobserve(this.loadNextBatchAnchorObserverId);this.enableManualLoadNextBatch?this.isAllowedToRequestMoreContent=!1:TRC.dom.off(this.observerScrollElement,"scroll",this.throttledScrollHandler)}hideLoadingSpinner(){this.spinnerContainer&&-1===this.spinnerContainer.className.indexOf("tbl-hidden")&&TRC.dom.addClass(this.spinnerContainer,"tbl-hidden")}showLoadingSpinner(){this.spinnerContainer&&TRC.dom.removeClass(this.spinnerContainer,"tbl-hidden")}listenToTrcResponse(){let e;e=this.hasPreventReachingFooter?this.onTrcResponsePreventReachingFooterWrapper.trcBind(this):this.onTrcResponse.trcBind(this),TRC.EventsAPI.listen("nocontent",this.onTrcNoContent.trcBind(this)),TRC.listen("trcResponseHandled",e),TRC.listen("resumeFeedRendering",e)}listenToManualLoadNextBatchEvent(){TRC.listen(`visible::${this.parentPlacementName}`,this.manualLoadNextBatchHandler.trcBind(this))}shouldEnableLoadNextBatch(e){const t=e.boundingClientRect.top0)&&(this.currentBatchSuccessful=!0)}switchMainContainer(e){this.nbLoaderLayerEnabled&&this.reserveSpaceForLoader(null,this.container,e),this.container=e,this.isLoadNextBatchUsingObserver&&this.container.appendChild(this.loadNextBatchAnchorContainer),this.container.appendChild(this.spinnerContainer)}onTrcResponsePreventReachingFooterWrapper(e){this.preventReachingTheFooter&&this.preventReachingTheFooter.preparePreventScroll(e)}onTrcNoContent(e){e.detail.placement||(this.currentBatchSuccessful=!1,this.onTrcResponse())}onTrcResponse(){if(this.currentBatchSuccessful)this.numOfConsecutiveFailedRequests=0;else if(this.numOfConsecutiveFailedRequests++,this.numOfConsecutiveFailedRequests>=this.maxNumOfConsecutiveFailedRequests)return this.stopScrolling(),void this.hideLoadingSpinner();this.currentBatchSuccessful=!1,this.isPendingNextBatch=!1,this.preventReachingTheFooter&&!0===this.preventReachingTheFooter.isWaitToHide?this.preventReachingTheFooter.isWaitToHide=!1:this.hideLoadingSpinner(),this.isLoadNextBatchUsingObserver&&!this.nextBatchObserverCreator&&!1!==this.isAllowedToRequestMoreContent&&(this.nextBatchObserverCreator=this.createNewNextBatchAnchorObserver.trcBind(this).trcThrottle(10),TRC.dom.on(this.observerScrollElement,"scroll",this.nextBatchObserverCreator),this.ampFeedResizeListener=TRC.listen("ampFeedResize",this.nextBatchObserverCreator)),this.duplicatedItemsMonitor&&this.duplicatedItemsMonitor.checkForDuplicatedItems(),this.preventReachingTheFooter&&this.preventReachingTheFooter.isEnableLateRender&&(this.preventReachingTheFooter.isEnableLateRender=!1,this.getNextBatch(!0))}setIsAllowedToRequestMoreContent(e){this.isAllowedToRequestMoreContent=e}getIsFirstBatch(){return this.isFirstBatchRequest}initMonitoringOfDuplicatedItemsIfNeeded(){if(this.shouldMonitorForDuplicatedItems()){const e={parentContainerSelector:this.itemsParentContainerSelector,additionalLogDataBuilder:e=>({cardIndex:TRC.dom.closest(e,"[data-card-index]").getAttribute("data-card-index")})};this.duplicatedItemsMonitor=new TRC.DuplicatedItemsMonitor(this.trcManager,e)}}shouldMonitorForDuplicatedItems(){return this.trcManager.global["monitor-dup-items-traffic-pct"]>100*Math.random()||-1!==["yes","true","1"].indexOf(TRC.URL.prototype.getParameter.call(location.href,"taboola_dedup_debug"))}}TRC.InfiniteScrollEngine=e})(),(()=>{class e{constructor(e){this.getConfig(e),this.trackFastScroller()}getConfig(e){this.lateRenderTimeout=parseInt(e.timeout,10)||5e3,this.fastScrollerTime=parseInt(e.fastScrollerTime,10)||1e4,this.maxCards=parseInt(e.maxCards,10)||5,this.detectCardNumber=parseInt(e.detectCardNumber,10)||5,this.trcManager=e.trcManager,this.infiniteScrollEngine=e.infiniteScrollEngine,this.cardOneTime=null,this.detectCardTime=null,this.observerTargets=[],this.onScroll=this.observeScroll.trcBind(this).trcThrottle(50),this.onEndKey=this.endKeyHandler.trcBind(this),this.isFastScroller=!1,this.prevPosition=window.pageYOffset,this.scrollThrottleTime=parseInt(e.scrollThrottleTime,10)||10,this.timeout=null,this.scrollTimeoutLength=parseInt(e.scrollTimeoutLength,10)||5e3,this.timeoutEnabled=!1,this.stopListenToBatch=!0,this.shouldPreventScrolling=!0,this.loadNextBatchAnchorContainer=e.infiniteScrollEngine.loadNextBatchAnchorContainer,this.isPreventScroll=!1}trackFastScroller(){TRC.dom.on(window,"scroll",this.onScroll),TRC.dom.on(document,"keydown",this.onEndKey)}unTrackFastScroller(){TRC.dom.off(window,"scroll",this.onScroll),TRC.dom.off(document,"keydown",this.onEndKey),this.observerTargets.forEach(e=>{TRC.intersections.unobserve(e)})}enableLateRender(){this.isFastScroller=!0,this.lateRenderEnabled=!0}observeScroll(){this.cardOne&&0!==this.cardOne.length||(this.cardOne=this.infiniteScrollEngine.origContainer.querySelector('[data-card-index="1"]'),this.cardOne&&this.observeCard(this.cardOne,this.saveCardVisibilityTime.trcBind(this,"cardOneTime"))),this.detectCard&&0!==this.detectCard.length||(this.detectCard=this.infiniteScrollEngine.origContainer.querySelector(`[data-card-index="${this.detectCardNumber}"]`),this.detectCard&&this.observeCard(this.detectCard,this.saveCardVisibilityTime.trcBind(this,"detectCardTime"))),this.detectCardTime&&this.cardOneTime&&(this.detectCardTime-this.cardOneTime=this.maxCards&&(this.numOfCards=0,this.isPreventScroll=!0,this.isEnableLateRender=!0,this.preventScrollBelowAnchor()),this.stopListenToBatch||this.stopListenToScrollForPrevent()}listenToScrollForPrevent(){this.onScrollForPrevent=this.observeScrollForPrevent.trcBind(this),TRC.dom.on(window,"scroll",this.onScrollForPrevent),this.stopListenToBatch=!1}stopListenToScrollForPrevent(){TRC.dom.off(window,"scroll",this.onScrollForPrevent),TRC.dom.off(document,"keydown",this.onEndKeyOnPreventScroll),this.stopListenToBatch=!0,clearTimeout(this.timeout)}observeScrollForPrevent(){const e=(new Date).getTime();if(e-this.scrollEventTimet,i=this.infiniteScrollEngine.parentContainerId,o=document.getElementById(`${i}-pl${this.infiniteScrollEngine.numPlacements-1}`).scrollHeight,n=window.innerHeight-o/1.5,s=TRC.PreventReachingTheFooter.getOffsetFromTopOfPage(this.loadNextBatchAnchorContainer),a=s{this.shouldPreventScrolling=!1},this.scrollTimeoutLength),this.timeoutEnabled=!0}preventScrollBelowAnchor(){this.shouldPreventScrolling=!0,clearTimeout(this.timeout),this.timeoutEnabled=!1}static getWindowScrollLeft(){return window.scrollX?window.scrollX:document.documentElement.scrollLeft}static getOffsetFromTopOfPage(e){return e.getBoundingClientRect().top+window.pageYOffset}listenToKeysOnPreventScroll(){this.onEndKeyOnPreventScroll=this.endKeyHandlerOnPreventScroll.trcBind(this),TRC.dom.on(document,"keydown",this.onEndKeyOnPreventScroll)}endKeyHandlerOnPreventScroll(e){const t=e||window.event,{keyCode:r,metaKey:i}=t;(35===r||i&&40===r)&&window.scrollTo(0,TRC.PreventReachingTheFooter.getOffsetFromTopOfPage(this.loadNextBatchAnchorContainer)-window.innerHeight)}shouldLateRender(e){return this.isFastScroller&&this.isEnableLateRender&&e{const e=5,t=1e3,r=100;class i{constructor(i,o,n,s){this.parentFeed=i,this.trcManager=o,this.options=s,this.container=i.container,this.origContainer=this.container,this.pendingPublisherCardsList=[],this.feedDynamicParameters=this.options.feedDynamicParameters,this.shouldStopFeedOnMissingPublisherCard=this.feedDynamicParameters&&"STOP"===this.feedDynamicParameters.missingPublisherCardFeedStrategy||"STOP"===this.trcManager.global["missing-publisher-card-feed-strategy"],this.shouldSendCardEvents=!(this.feedDynamicParameters&&this.feedDynamicParameters.disableSendingCardEvents||this.trcManager.global["disable-sending-card-events"]),this.publisherCardMaxRetries=o.global["feed-split-max-retries"]||e,this.publisherCardRetryInterval=o.global["feed-split-retry-interval"]||t,this.feedCardEventsMaxRetries=o.global["feed-card-events-max-retries"]||e,this.feedCardEventsRetryInterval=o.global["feed-card-events-retry-interval"]||t,this.feedCardEventsMinContainerHeight=o.global["feed-card-events-min-container-height"]||r}handlePendingPublisherCards(e=0,t,r,i){const o=(r=r||this.pendingPublisherCardsList[0]).trcResponse,n=i?"spl":"pcp",s=o[n],a=s.tps,l=s.sun||s.pun;let c,d=!1;try{c=document.querySelector(a)}catch(e){__trcWarn(`Exception while trying to find publisher card with selector ${a}: ${e}`),d=!0}if(!c||!c.parentNode)return this.parentFeed.setIsAllowedToRequestMoreContent(!1),void(e0&&TRC.dispatch("resumeFeedRendering")}initCardEventsManager(e,t=0){const r=e.trcResponse.pcp.tps,i=document.querySelector(r);if(!i)return void(t{const e="trc-w2f",t="trc-w2f-no-ui";class r{constructor(e,t,r){this.parentFeed=e,this.trcManager=t,this.hasFeedUI=r,this.setUpFeedContainer(),TRC.listen("trcResponseHandled",this.setContentTypeCssClass.trcBind(this))}setUpFeedContainer(){const r=this.parentFeed.container;r.className+=` ${e}`,!1===this.hasFeedUI&&(r.className+=` ${t}`)}setContentTypeCssClass(){const e=this.parentFeed.container,t=e.querySelectorAll(".videoCube.syndicatedItem").length,r=e.querySelectorAll(".videoCube:not(.syndicatedItem)").length;let i="sponsored";r&&(i=t?"hybrid":"organic"),this.parentFeed.container.className=this.parentFeed.container.className.replace(/\btrc-content-(hybrid|sponsored|organic)\b/g,""),this.parentFeed.container.className+=` trc-content-${i}`}addHeaderToFeed(e){this.parentFeed.header.appendChild(e),this.header=e}addFooterToFeed(e){this.footer=document.createElement("div"),this.footer.className="tbl-feed-footer",this.footer.appendChild(e),this.parentFeed.container.appendChild(this.footer)}getHeader(){return this.header}getFooter(){return this.footer}applyWidgetHeaderAndFooterStylesToFeed(t){if(this.headerAndFooterStylesApplied)return;const r=new RegExp(`(\\.${t})([^{]+\\.(trc_rbox_header|logoDiv|trc-widget-footer))`,"g"),i=new RegExp(`^(?![^}]*.${e}[^{]+).*$`,"gm");TRC.dom.injectedStyles.forEach(t=>{if(!r.test(t.innerText))return;let o=t.innerText.replace(r,`.${e}$2`);o=(o=(o=(o=o.replace(/\n/g,"")).replace(/}/g,"}\n")).replace(i,"")).replace(/\n/g,""),TRC.dom.injectStyle(o,document)}),this.headerAndFooterStylesApplied=!0}}TRC.WidgetToFeedHelper=r})(),(()=>{const e={TABOOLA_REMINDER:{name:"taboola_reminder",responseKey:"taboola-reminder",contentElementId:"tbl-taboola-reminder-inner",moduleFileName:"taboola-reminder",moduleClass:"TaboolaReminder",closeBtn:"tbl-taboola-reminder-closeBtn",closeBtnWrapper:"tbl-taboola-reminder-closeBtn-wrapper"},NEXT_UP:{name:"next_up",responseKey:"next-up-widget",contentElementId:"tbl-next-up-inner",moduleFileName:"next-up-widget",moduleClass:"NextUpWidget",closeBtn:"tbl-next-up-closeBtn",closeBtnWrapper:"tbl-next-up-closeBtn-wrapper"}};class t{constructor(e,r,i){t.isFloatingUnitOn?__trcWarn("Floating Unit: Trying To Add More Than One Floating Unit"):(t.isFloatingUnitOn=!0,this.formattedResponse=e,this.placementData=r,this.trcManager=i,this.videoList=this.formattedResponse.trc["video-list"],this.unit=t.getUnitByResponseKey(this.videoList),this.contentSelector=`#${this.unit.contentElementId}`,this.sendSupplyEvent("RENDERED"),this.initFloatingUnit())}sendSupplyEvent(e,t=null,r=null){const i={event_type:this.unit.name,event_state:e,event_value:t,event_msg:r};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(i)},null)}static getUnitByResponseKey(t){let r;return Object.keys(e).some(i=>{const o=e[i];return!!t[o.responseKey]&&(r=o,!0)}),r}initFloatingUnit(){this.createElementForFloatingUnitContent(),this.setFloatingUnitOptions(),this.definePlacementDataContainerSelector(),this.lazyLoadModules()}definePlacementDataContainerSelector(){this.placementData["container-selectors"]=[{container:this.contentSelector,location:"first",shouldCreateContainer:!0,isFloatingUnit:!0}]}setFloatingUnitOptions(){this.floatingUnitOptions=this.videoList[this.unit.responseKey]||{},this.floatingUnitOptions.unit=this.unit}setNextUpSpecificOptions(){this.floatingUnitOptions.nupOverlayConfig=this.trcManager.global["nup-overlay-config"]?JSON.parse(this.trcManager.global["nup-overlay-config"]):{}}lazyLoadModules(){TRC.ModuleLoader.load("floating-unit",TRC.FloatingUnit,(()=>{this.lazyLoadChildClass()}).trcBind(this))}lazyLoadChildClass(){this.unit.responseKey===e.NEXT_UP.responseKey&&this.setNextUpSpecificOptions(),TRC.ModuleLoader.load(this.unit.moduleFileName,TRC[this.unit.moduleClass],(()=>{const e=TRC[this.unit.moduleClass];new e(this.floatingUnitOptions,this.trcManager,this.contentElement),this.trcManager.initRBoxDrawingIfPlacementEligible(this.placementData)}).trcBind(this))}createElementForFloatingUnitContent(){const e=document.createElement("div");e.id=this.unit.contentElementId,e.className=this.unit.contentElementId,TRC.dom.addClass(e,"tbl-hidden"),this.contentElement=document.body.appendChild(e)}static isFloatingUnit(e){return e&&!!t.getUnitByResponseKey(e)}}t.isFloatingUnitOn=!1,TRC.FloatingUnitGenerator=t})(),function(){var t=1000075,r={},i="",o;function n(e,n,s,a,h){var u;i=l(),o=TRCImpl.additional_data&&TRCImpl.additional_data.sdkd||{};var g=c(),m=a.global["fraud-detection-script-url"]||"https://js.ad-score.com/score.min.js?pid="+t+"#",b=r={tid:d(),l1:e,l4:s,uid:n,pub_domain:g,ref:s};o.appid?b["l3"]=b["pub_app"]=o.appid:b["l3"]=TRC.platform_code,u=TRC.URL.prototype.switchProtocol.call(m,TRC.PROTOCOL)+TRC.util.keys(b).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(b[e])}).join("&"),this.isInitialized=!0,p(u,{impressionUTID:{enabled:!0===a.global["fraud-enable-impression-utid"],publisherId:e,userId:n,viewId:h}})}function s(i,o,n,s,a,l){setTimeout(function(){try{if(TRC.clickFraudDetect.isLoaded){var c={},d=TRC.clickFraudDetect.impressionUTID;TRC.util.keys(r).forEach(function(e){c[e]=r[e]}),c["pid"]=""+t,c["l2"]=i,c["l3"]=c["l3"]||TRC.platform_code,c["l4"]=s,c["l5"]=a,c["l6"]="clicked",c["uid"]=o,c["utid"]=d?d+"_"+n:n,c["isTRCUrl"]=l,adScore("send","adclick",{},c)}else __trcWarn("Fraud script did not render",e)}catch(e){__trcWarn("fraudScriptCallback: Error in fraud detection",e)}},0)}function a(){return TRC.MobileSdk.isEnabled()}function l(){if(!a())return TRC.isAMP&&window.context&&window.context.canonicalUrl||TRC.pageManager.getTopMostWindow().location.href;var e=TRC._taboolaClone&&TRC._taboolaClone.filter(function(e){return!!e.url});return e&&e.url||window.location.href}function c(){var e=document.createElement("a");return e.href=i||l(),e.hostname}function d(){return a()?"_InAPP":"PHON"===TRC.platform_code?"_MW":"_Desktop"}function h(e){TRC.clickFraudDetect.isLoaded=!0,e.impressionUTID.enabled&&u(e.impressionUTID)}function u(e){var r=[e.viewId,e.publisherId,e.userId].join("-");if(e.publisherId&&e.userId&&e.viewId)try{window.adScore("set","utid",{},{pid:t,utid:r}),TRC.clickFraudDetect.impressionUTID=r}catch(e){__trcError("Failed to set fraud UTID on impression",e)}else __trcError("Error in clickFraudDetect.setImpressionUTID: missing parameters")}function p(e,t){if(!TRC.botDetected)try{TRC.net.loadScript(e,"js",h.bind(null,t),null,!0)}catch(e){__trcWarn("loadFraudScript: Error appending fraud script",e)}}TRC.clickFraudDetect={init:n,fraudScriptCallback:s,isInitialized:!1,isLoaded:!1,impressionUTID:null}}(),TRC.util=function(win,doc){var modObject={isType:function(e,t){return t=t.charAt(0).toUpperCase()+t.substr(1),Object.prototype.toString.call(e)=="[object "+t+"]"},hasKeys:function(e){var t;if(this.isType(e,"object"))if(Object.keys&&!Object.propertyIsEnumerable("keys")){if(Object.keys(e).length>0)return!0}else for(t in e)if(e.hasOwnProperty(t))return!0;return!1},getRandomIds:function(e){for(var t=0;t",nbsp:" ",quot:'"'},t=/&(#(?:x[0-9a-f]+|\d+)|[a-z]+);?/gi;function r(t,r){return"#"===r[0]?String.fromCharCode("x"===r[1].toLowerCase()?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):e[r]||t}return function(e){return e.replace(t,r)}}(),function(e){if("string"!=typeof e)return"";if(!TRC.dom.isHtmlContent(e))return e;var t=decodeSpecialCharacters(e);return TRC.dom.isHtmlContent(t)?(element.innerHTML=encodeURI(e),t=element.textContent||element.innerText,decodeURI(t)):t}),isEmptyString:function(e){return!e||/^\s*$/.test(e)},keys:function(){"use strict";if(Object.keys)return function(e){return"object"==typeof e||"function"==typeof e&&null!==e?Object.keys(e):[]};var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=r.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))return[];var n=[],s,a;for(s in o)e.call(o,s)&&n.push(s);if(t)for(a=0;a>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(i=r),o=new Array(a),n=0;n=0},parseTimeout:function(e,t){var r;return t=void 0!==t?t:-1,void 0!==e?parseInt(e,10):t},splitUrlParts:(linkElement=document.createElement("a"),function(e){return e?(linkElement.href=e,{search:linkElement.search}):{}}),hashString:function(e){var t=0;if(0==e.length)return t;for(var r=0;r0)}if(TRC.pConsole("page",TRC.modDebug.getType(t),r,r),"0"==t&&TRC.pConsole("errors",TRC.modDebug.getType(t),r,r),!(window.trc_debug_level{const e="trc_rbox_div",t="videoCube",r="item-thumbnail-href",i="item-label-href";class o{constructor(e){this.trcManager=e,this.itemAppearanceTime={}}static isEnabled(e){return TRC.util.isPercentEnabled(e.global,"enable-rbox-heatmap")}captureItemTime(e){this.itemAppearanceTime[e]=Date.now()}captureAndSendClickData(n){if(!c(n)||a(n))return;const s=o.collectClickHeatmapCardData(n);function a(e){return TRC.dom.closest(e.target,`a.${r}`)||TRC.dom.closest(e.target,`a.${i}`)}function l(e){return TRC.dom.closest(e.target,`.${t}`)}function c(t){return TRC.dom.closest(t.target,`.${e}`)}l(n)&&(s["item-d"]=this.collectClickHeatmapItemData(n)),this.trcManager.sendEvent("heatmap",{d:JSON.stringify(s)},{})}static collectEventTargetData(r,i){const n=i?e:t,s=TRC.dom.containsClass(r.target,n),a=s?r.target:TRC.dom.closest(r.target,`.${n}`),l=a.getClientRects()[0],c=s?{x:0,y:0}:r.target.getClientRects()[0],[d,h]=o.getClickPoints(r,c),u=s?d:Math.abs((c.x||c.left)-(l.x||l.left))+d,p=s?h:Math.abs((c.y||c.top)-(l.y||l.top))+h;return{el:a,x:u,y:p,h:l.height,w:l.width}}static collectClickHeatmapCardData(e){const t=o.collectEventTargetData(e,!0);return{x:t.x,y:t.y,h:t.h,w:t.w,"c-time":Math.floor(e.timeStamp)}}collectClickHeatmapItemData(e){const t=o.collectEventTargetData(e,!1),r=this.itemAppearanceTime[t.el.video_data.id],i={x:t.x,y:t.y,h:t.h,w:t.w,slot:t.el.video_data.itemIndex,"ap-time":r};return i}static getClickPoints(e,t){if(r(e)){const r={x:t.x||t.left,y:t.y||t.top};return[e.touches[0].clientX-r.x,e.touches[0].clientY-r.y]}return[e.offsetX,e.offsetY];function r(e){return e.touches}}}TRC.Heatmap=o})(),(()=>{let e,t,r=.1,i=.3,o=!1;const n=["4","254"],s=function({mybox:t,containerElm:o,boxesList:n}){e=n;const s=!(!t.trcResponse||!t.trcResponse.vtag)&&t.trcResponse.vtag,c=!!s.advancedVideoConfiguration&&s.advancedVideoConfiguration;if(!s||!a(s.unitType,c))return!1;if(c){const e=c["mid-article-hip-rbox-percent-inview-to-report"],t=c["mid-article-hip-min-percent-to-display"];r=e?Number(e):r,i=t?Number(t):r}l(t.id,o),o.classList.add("tbl-invisible"),TRC.listen("noAdjacInFirstWF",e=>{t.trcResponse.scac&&(TRC.trcHipCloseUnit=TRC.trcHipCloseUnit?TRC.trcHipCloseUnit:{},TRC.trcHipCloseUnit[e.data]=!0),TRCImpl.sendAbTestEvent("HipLostNoAdjacInFirstWF","HipLost"),h(e.data)})},a=(e,t)=>(!t||"true"!==t["mid-article-hip-opt-out"])&&-1!==n.indexOf(e.toString()),l=(e,t)=>{c(e,t),d(e,t)},c=(e,i)=>{const o=[];for(let t=10*r;t<=10;t++){const e=t/100;o.push(e)}const n={targetElement:i,threshold:o,onEnter:p.trcBind(this,e)};t=TRC.intersections.observe(n)},d=(e,t)=>{const r={targetElement:t,threshold:[i],onEnter:u.trcBind(this,e),disableDuplicatePrevention:!0},o=TRC.intersections.observe(r);TRC.listen("adjacAdPlaying",g.trcBind(this,o)),TRC.listen("rBoxVisible",g.trcBind(this,o))},h=t=>{const{container:r}=e[t];r.classList.remove("tbl-invisible"),TRC.dispatch("rBoxVisible",t),TRC.trcHipContainersShowing=TRC.trcHipContainersShowing?TRC.trcHipContainersShowing:{},TRC.trcHipContainersShowing[t]=!0},u=(e,t)=>{TRCImpl.sendAbTestEvent("HipLostRboxInViewPort",Math.floor(100*t.intersectionRatio)),h(e)},p=(e,i)=>{i.intersectionRatio>r&&!o?(o=!0,TRCImpl.sendAbTestEvent("rboxViewPortIntersection",Math.floor(100*i.intersectionRatio))):i.intersectionRatio{TRC.intersections.unobserve(e)};TRC.HighImpactPlacement={handleHighImpactPlacement:s},window._trcIsUTactive&&(TRC.HighImpactPlacement.reportRboxInViewPort=p,TRC.HighImpactPlacement.checkIfHIP=a),TRC.listen("beforeBoxRender",s)})(),function(){var e="trc_vp_els",t=5;function r(e){this.trcManager=e,this.sessionStorage=TRC.pageManager.getLocalStorageImplementation("strict-w3c-storage","session"),this.lastViewportElementData=this.getVPElementsHistory()[e.getItemId()],e.trcCache.enableCacheViaStorageFlag()}r.prototype.trackElement=function(e){TRC.dom.on(e,"click",this.storeElementPosition.trcBind(this,e))},r.prototype.scrollToElementIfWasLastInViewPort=function(e){var t,r=this.trcManager;this.lastViewportElementData&&e.id===this.lastViewportElementData.id&&(delete(t=this.getVPElementsHistory())[this.trcManager.getItemId()],this.storeVPElementsHistory(t),"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),setTimeout(function(){e.scrollIntoView(!1);var t={abTestsEventType:"simple",name:"backToFeed_backToCard",type:__trcJSONify({origViewId:e.placementData.cachedViewId,viewId:TRC.pageManager.getPageData(),placement:e.getAttribute("data-placement-name"),cardIndex:e.getAttribute("data-card-index")}),eventTime:(new Date).getTime()};r.sendEvent("abtests",{"unescape-d":encodeURIComponent(__trcJSONify(t))},null,!1,null,null)},0))},r.prototype.storeElementPosition=function(e){var t=this.getVPElementsHistory();t[this.trcManager.getItemId()]={id:e.id,s:(new Date).getTime()};var r={abTestsEventType:"simple",name:"backToFeed_exitFromCard",type:__trcJSONify({viewId:TRC.pageManager.getPageData(),placement:e.getAttribute("data-placement-name"),cardIndex:e.getAttribute("data-card-index")}),eventTime:(new Date).getTime()};this.trcManager.sendEvent("abtests",{"unescape-d":encodeURIComponent(__trcJSONify(r))},null,!1,null,null),this.storeVPElementsHistory(t)},r.prototype.storeVPElementsHistory=function(t){t=this.removeEntriesToLimit(t),this.sessionStorage.setValue(e,__trcJSONify(t))},r.prototype.getVPElementsHistory=function(){var t=this.sessionStorage.getValue(e)||"{}";return TRC.util.jsonParseWithNative(t)},r.prototype.removeEntriesToLimit=function(e){var r={},i;if(TRC.util.keys(e).length<=t)return e;for(var o in e)e.hasOwnProperty(o)&&(r[e[o].s]=o);for((i=TRC.util.keys(r)).sort();i.length>t;)i.shift();for(var n in r)r.hasOwnProperty(n)&&-1===i.indexOf(n)&&delete e[r[n]];return e},TRC.HistoryManager=r}(),(({history:e})=>{function t(){e.back()}function r(){e.forward()}function i(){return e.state}function o(t){e.pushState(t,document.title)}function n(t){e.replaceState(t,document.title)}function s(t){let r=i();null==r&&(r={}),Object.assign(r,t),e.replaceState(r,document.title)}function a(){return"complete"!==window.document.readyState}function l(e,t,r){const o=TRC.Interval.set(()=>{a()||TRC.Interval.clear(o),i()&&t(i())&&(e(),TRC.Interval.clear(o))},r)}function c(e,t){const r=Object.assign({stateCheck:null,stateCheckIntervalTime:200},t||{});TRC.dom.on(window,"popstate",e),a()&&r.stateCheck&&l(e,r.stateCheck,r.stateCheckIntervalTime)}TRC.historyApi={pushState:o,replaceState:n,appendState:s,back:t,forward:r,currentState:i,onPopState:c}})(window),(()=>{const e="https://images.taboola.com/taboola/image/fetch";TRC.imageUtils={getImageUrlBasedOnCloudinaryApi(t,r,i=e){const o=this.cloudinaryEncoding(t);return[i,r,o].join("/")},cloudinaryEncoding(e){if(null===e||void 0===e)return"";let t=void 0,r=void 0,i="",o=0;const n=`${e}`,s=n.length;for(t=r=0;o127&&e<2048?String.fromCharCode(e>>6|192,63&e|128):String.fromCharCode(e>>12|224,e>>6&63|128,63&e|128),null!==s&&(r>t&&(i+=n.slice(t,r)),i+=s,t=r=o+1),o++}return r>t&&(i+=n.slice(t,s)),escape(i)}}})(), /** @license * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(e,t){"use strict";if("IntersectionObserver"in e&&"IntersectionObserverEntry"in e&&"intersectionRatio"in e.IntersectionObserverEntry.prototype)"isIntersecting"in e.IntersectionObserverEntry.prototype||Object.defineProperty(e.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var r=[];o.prototype.THROTTLE_TIMEOUT=1e3,o.prototype.POLL_INTERVAL=null,o.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,r){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==r[t-1]})},o.prototype._parseRootMargin=function(e){var t,r=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return r[1]=r[1]||r[0],r[2]=r[2]||r[0],r[3]=r[3]||r[1],r},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this._checkForIntersections(),this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(a(e,"resize",this._checkForIntersections,!0),a(t,"scroll",this._checkForIntersections,!0),"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,l(e,"resize",this._checkForIntersections,!0),l(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(r){var o=r.element,s=d(o),a=this._rootContainsTarget(o),l=r.entry,c=e&&a&&this._computeTargetAndRootIntersection(o,t),h=r.entry=new i({time:n(),target:o,boundingClientRect:s,rootBounds:t,intersectionRect:c});l?e&&a?this._hasCrossedThreshold(l,h)&&this._queuedEntries.push(h):l&&l.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(r,i){var o=e.getComputedStyle(r);if(o&&"none"!==o.display){for(var n,s=d(r),a=p(r),l=!1;!l;){var h=null,u=1==a.nodeType?e.getComputedStyle(a):{};if(!u||"none"===u.display)return;if(a==this.root||a==t?(l=!0,h=i):a!=t.body&&a!=t.documentElement&&"visible"!=u.overflow&&(h=d(a)),h&&!(s=c(h,s)))break;a=p(a)}return s}},o.prototype._getRootRect=function(){var e;if(this.root)e=d(this.root);else{var r=t.documentElement,i=t.body;e={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,r){return"px"==t.unit?t.value:t.value*(r%2?e.width:e.height)/100}),r={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},o.prototype._hasCrossedThreshold=function(e,t){var r=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(r!==i)for(var o=0;o=0&&a>=0&&{top:r,bottom:i,left:o,right:n,width:s,height:a}}function d(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function u(e,t){for(var r=t;r;){if(r==e)return!0;r=p(r)}return!1}function p(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t}}(window,document),TRC.intersections=function(e,t){var r=0,i={},o={},n="observeId";function s(){}function a(e,t){if(TRC.util.isArray(e.threshold))for(var r=0;r=1&&null!==s&&TRC.intersections.observePolling(e))),r}function c(e,t){return e&&(e===t||t.contains(e)||"getAttribute"in e&&e.getAttribute("data-tbl-friendly-overlay"))}function d(e,t,r,i){return r.height>=i||e<=r.right&&t<=r.bottom&&t>0}function h(e){var t,r;return c(u(e),e)}function u(e){var r,i=p(e.getBoundingClientRect()),o=i.targetElementCenterX,n=i.targetElementCenterY;return t.elementFromPoint(o,n)}function p(e){return g(e,["mm"]).mm}function g(e,t){var r={};return t.forEach(function(t){r[t]=i(e,t)}),r;function i(e,t){switch(t){case"lt":return o(e,0,0);case"mt":return o(e,.5,0);case"rt":return o(e,1,0);case"lm":return o(e,0,.5);case"mm":return o(e,.5,.5);case"rm":return o(e,1,.5);case"lb":return o(e,0,1);case"mb":return o(e,.5,1);case"rb":return o(e,1,1);default:__trcWarn("intersections.getPointInElementByPosition - pos parameter not recognized. pos is: "+t)}}function o(e,t,r){return{targetElementCenterX:e.left+Math.round((e.right-e.left)*t),targetElementCenterY:e.top+Math.round((e.bottom-e.top)*r)}}}function m(e,t){t===TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE&&TRC.intersections.unObservePolling(e)}function b(e,t,r){t.onTrigger(e,t.observer,r,t.lastBoundingClientRect),m(r,t)}function f(e){TRC.Timeout.clear(e.visibleTimeout),delete e.visibleTimeout}function v(e,t,r){t.isEnter&&e.isVisible&&("function"!=typeof t.visibleWidgetPredicate||t.visibleWidgetPredicate())&&(delete e.isVisible,e.visibilityReported=!0,b(e,t,r))}function C(e,t,r){f(e),e.visibilityReported||v(e,t,r)}function T(e,t,r){var i=TRCImpl&&TRCImpl.global["visibility-intersection-api-delay"]||1e3,o=r===TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE&&!e.visibleTimeout||TRC.intersections.forceEnableDelayedVisibilityState();t.enableDelayedVisibilityCheck?o&&(e.isVisible=!0,e.lastVisibleBoundingClientRect=t.lastBoundingClientRect,e.lastVisibleBoundingClientRect.pageXOffset=t.geometryOffsets.pageXOffset,e.lastVisibleBoundingClientRect.pageYOffset=t.geometryOffsets.pageYOffset,e.visibleTimeout=TRC.Timeout.set(C.trcBind(this,e,t,r),i)):b(e,t,r)}function y(e,t,r){var i=t.target,o,n,s,a,c;e.isEnter=t.isIntersecting,e.isExit=!e.isEnter,e.intersection=t.intersectionRatio,e.isEnter?e.onEnter(t,i,e.observer):e.isExit&&(i.visibleTimeout&&f(i),i.isVisible=!1,e.onExit(t,i,e.observer),TRC.intersections.unObservePolling(e));var h=p(o=t.boundingClientRect);return s=h.targetElementCenterX,a=h.targetElementCenterY,n=TRCImpl&&TRCImpl.global["visibility-threshold-override"]||0,c=l(e,c=t.isIntersecting&&t.intersectionRatio>=n&&d(s,a,t.intersectionRect,e.exactVisibleThresholdFromTop)?TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE:t.isIntersecting?TRC.intersections.visibilityState.IN_VIEW_PORT_NOT_VISIBLE:TRC.intersections.visibilityState.NOT_IN_VIEW_PORT,t,s,a),r.disableDuplicatePrevention?T(i,e,c):e.lastEventId&&e.lastEventId===c||(T(i,e,c),e.lastEventId=c),c}var R={getPointsOnElement:g,TARGET_ATTRIB:n,visibilityState:{IN_VIEW_PORT_VISIBLE:1,IN_VIEW_PORT_NOT_VISIBLE:2,NOT_IN_VIEW_PORT:3},observe:function(e){var t,l,c,d=e.disableCheckOverlay?[0,.5]:[0,.25,.5,.75,1];function h(t){for(var r,o=0;o-1&&r.length>1&&(r.splice(o,1),t.setAttribute(n,r.join(" "))),delete i[e];__trcLog("missing target element for unobserve")},unobserveAll:function(e){for(var t=e.split(" "),r=0;r0&&this.startPolling(t)},unObservePolling:function(e){this.observedElementsInPolling[e.targetSelector]&&(delete this.observedElementsInPolling[e.targetSelector],this.observedElementsInPollingCounter--,e.underPolling=!1),0===this.observedElementsInPollingCounter&&this.stopPolling()},stopPolling:function(){clearInterval(this.pollingInterval),this.pollingInterval=null},startPolling:function(e){this.pollingInterval||(this.pollingInterval=setInterval(function(){var e,t=!1,r,i,o=R.observedElementsInPolling;for(var n in o)if(o.hasOwnProperty(n)&&(t=h((e=o[n]).target))){r=e.target.getAttribute(R.TARGET_ATTRIB).split(" "),i=R.getIntersectionState();for(var s=0;s{const e="tbl_creative_preview",t="tbl_should_override_all_slots",r="tbl_should_repeat_override_items",i="additional-properties",o="placement-properties",n={sentUsageLog:!1,overriddenPlacements:{},encodeText:!1},s=!1,a=!0,l={autoTriggerConfig:{hover:"true",viewabilityConfig:{percentage:"5",time:"0"}},repeat:"true",scriptUrlTemplate:"//15.taboola.com/tbp?oid=15&pubid=166277&tagid=948107&pstn=[pstn]&cb=[cb]&callback={CALLBACK_NAME}",unitBootSrc:"//vidstat.taboola.com/vpaid/units/{version}/creatives/creative_js.js"},c="tbl_pvideo_version",d="27_6_17",h=(e,t)=>{if(!n.isEnabled(e.global["enable-item-override"]))return;n.encodeText=n.encodeText||!!e.global["item-override-encode-fields"];const r=n.getNewItemFromUrl();b(r);const[i]=r,o=t&&t.trc&&t.trc.vl||[];r&&i&&o.length&&(x(r,t),n.handleOverrideItems(o,r))};n.handleOverrideItems=((e,r)=>{let i;i=n.getValueFromUrl(t,s)?T(e,r):C(e,r[0].itemType),n.overrideItems(i,r),u(e,r)});const u=(e,r)=>{0!==r.length&&(n.getValueFromUrl(t,s)?e.forEach(e=>{g(r[0],e,o)}):g(r[0],e[0],o))},p=(e,t)=>{const r=e[t];return r?TRC.util.jsonParseSafe(r,t):{}},g=(e,t,r)=>{const i=p(e,r);i&&n.replaceFields(t,i,Object.keys(i))};n.overrideItems=((e,t)=>{e.length>0&&t&&e.forEach((r,i)=>{const o=i%t.length;n.overrideItem(e[i],t[o])})}),n.overrideItem=((e,t)=>{n.replaceFields(e,t,["thumbnail","title","description","branding-text","uploader"]),g(t,e,i),e.url="#"}),n.replaceFields=((e,t,r)=>(r.forEach(r=>{e[r]="object"==typeof t[r]&&null!=t[r]?n.replaceFields({},t[r],Object.keys(t[r])):n.replaceField(t[r],r)}),e)),n.replaceField=((e,t)=>{let r,i;if("thumbnail"===t&&(r={ignoreAmpersand:!0}),m(e)){const t=JSON.parse(e);i=JSON.stringify(n.replaceFields({},t,Object.keys(t)))}else i=n.replaceString(e,r);return i}),n.replaceString=((e,t)=>n.encodeText&&"string"==typeof e?TRC.text.encodeHTML(e,t):e);const m=e=>{try{return"string"==typeof e&&"object"==typeof JSON.parse(e)}catch(e){return!1}},b=e=>{if(!n.sentUsageLog){const t=e?e.map(e=>e&&e.creativeId||null):null;TRC.RBoxUsage.logUsage("TRC.ItemOverride",{extraData:{creativeIds:t,url:window.location.href}}),n.sentUsageLog=!0}};n.isEnabled=(e=>e&&n.isItemOverrideUrlParam()),n.isItemOverrideUrlParam=(()=>location.search.indexOf(e)>=0);const f=(e,t)=>!!e[t]||!(e["is-syndicated"]||e["is-in-network"]||e["is-native"])&&"is-organic"===t,v=(e,t)=>{if(!t)return e[0];for(let r=0;r{const{overriddenPlacements:r={}}=n,i=[];let o,s;return e.forEach(e=>{s=e.uuip||e.uip;const{v:n}=e;n&&s&&!r[s]&&(o=v(n,t))&&(i.push(o),r[s]=!0)}),i},T=(e,t)=>{const i=n.getValueFromUrl(r,a),o=[];return i||y(e,t),e.forEach(e=>{e.v&&e.v.forEach(e=>{o.push(e)})}),o},y=(e,t)=>{let r=t.length;for(let i=0;i=r?R(e,i+1,r):(r-=t.length,i===e.length-1&&r>0&&w(t,r)))}},R=(e,t,r)=>{e.splice(t),e[t-1].v.splice(r)},w=(e,t)=>{for(let r=0;r{try{const r=TRC.URL.prototype.getParameter.call(window.location.search,e,decodeURIComponent);let i=JSON.parse(r);return(void 0===i||null===i&&t)&&(i=t),i}catch(t){return __trcDebug(`invalid data in url param ${e}`),null}}),n.getNewItemFromUrl=(()=>{let t=n.getValueFromUrl(e);return Array.isArray(t)||(t=[t]),t}),TRC.ItemOverride={run:h},window._trcIsUTactive&&(TRC.ItemOverride.privateProps=n);const x=(e,t)=>{const r=n.getValueFromUrl(c,d);l.unitBootSrc=l.unitBootSrc.replace("{version}",r);for(let o=0;o{class e{constructor(e,t=!1){if(this.onlyClean=t,this.pm=TRC.pageManager,this.storageType=e.storageType||"session",this.localStorage=this.pm.getLocalStorageImplementation("strict-w3c-storage",this.storageType),this.keyValueCache=null,this.cacheTtl=e.ttl||1e3*60*20,this.noTtl=e.noTtl||!1,this.cacheName=e.cacheName||"key_value_cache",this.cacheUtils=new TRC.CacheUtils(this.localStorage,this.cacheName,this.cacheTtl),!localStorage)return{isValidCache:!1};this.isValidCache=!0,this.init()}cacheData(e,t){const r=this.setCacheData(e,t);return this.localStorage.setValue(this.cacheName,__trcJSONify(this.keyValueCache.getData())),r}setCacheData(e,t){const r=(new Date).getTime();try{this.keyValueCache.setValue(e,{value:t,s:r}),!1===this.noTtl&&this.setCacheClean(e)}catch(e){return!1}return!0}getCacheData(e){const t=this.keyValueCache.getValue(e);return!0===this.noTtl&&t||t&&!this.isOverTtl(this.keyValueCache.getValue(e).s)?this.keyValueCache.getValue(e).value:null}isOverTtl(e){return this.cacheUtils.isOverTtl(e)}setCacheClean(e){this.cacheUtils.setCacheClean(e,this.keyValueCache)}cleanCache(e){this.cacheUtils.cleanCache(e,this.keyValueCache,this)}removeKey(e){TRC.CacheUtils.removeKey(e,this.keyValueCache)}getKeyValueCache(){return this.cacheUtils.getCache(this.pm)}init(){if(this.onlyClean)return this.localStorage.removeKey(this.cacheName),!1;this.keyValueCache=this.getKeyValueCache();const e=TRC.util.keys(this.keyValueCache.getData());return this.cleanCache(e),!0}}TRC.KeyValueCache=e})(window,document),(()=>{let e=!1,t=[];const r=TRC.LineClamp={fixBoxOverflow(e,t,i,o,n,s,a,l){let c=!1;if(null==e)return;if(a&&(c=r.setupBoxLineClamp(e)))return;if(l&&!c)return __trcDebug("Skipping fixBoxOverflow due to feature flag.");if(TRC.ellipsisPerf&&console.timeStamp("Taboola old ellipsis"),e.clientHeight<=0||e.clientWidth<=0)return;let d=!1;e.parentNode.font=r.getFontSize(e);const h=e.innerHTML;e.innerText="";const u=r.add_span(null,"H",e),p=Math.max(u.offsetHeight,u.clientHeight),g=Math.max(0,e.scrollHeight-e.clientHeight);for(e.removeChild(u),TRC.dom.setContentToElement(e,h),r.addInlineElementsForMeasure(e.inlineDetailsElements,e,!0),e.inlineDetailsElementsHTML=e.innerHTML.replace(h,""),t=t.replace(/^\s+|\s+$/g,"");e.clientHeight+g+p/2{t.forEach(e=>{const t=e&&e.domElm,i=e&&e.numLine;TRC.dom.addClass(t,"trc_ellipsis"),TRC.css.utils.setStyleProperty(t,"-webkit-line-clamp",i,!1),t.parentNode.font=r.getFontSize(t)}),e=!1,t=[]}),e=!0,!0))},getFontSize(e){let t=0,r=!1,i=document.trcGetCurrentStyle(e,"font-size");const o=["px","pt","em","ch"];for(;!r&&t{const r=e.className.search(o)>=0&&e.parentNode===t;return r},t))&&o&&((s=document.createElement("span")).className="trc_inline_detail_spacer",s.innerHTML=" ",t.appendChild(s),t.appendChild(i?o.cloneNode(!0):o))},findElement(e,t,r,i){void 0===t&&(t=document),void 0===r&&(r="*");const o=t.getElementsByTagName(r);for(let n=0;n=0?t.replace(/\s+\S+$/,""):t.substr(0,t.length-1);const o=e.getElementsByTagName("bde");let n;e.inlineDetailsElementsHTML&&o.length&&(n=e.innerHTML.replace(e.inlineDetailsElementsHTML,""),TRC.dom.setContentToElement(e,n)),e.getElementsByTagName("span").length>0&&e.removeChild(e.getElementsByTagName("span")[0]);const s=o.length>0?o[0]:e;return TRC.dom.setContentToElement(s,t),r.add_span(null,r.createEllipsis(),e),t},hideClonedElementsAfterMeasure(e,t){let i,o;for(let n=0;e&&n{const r=e.className.search(i)>=0&&e.parentNode===t;return r},t,"span"))&&(o.style.display="none")},createEllipsis:()=>document.createTextNode("…")}})(),function(e,t){var r={source:"|v|h|c|t|s|p|o|z|video|home|category|text|search|photo|other|content_hub",target:"|v|p|t|m|video|photo|text|mix|"},i="v",o=function(e,t){return e=e.toLowerCase(),-1!==r[t].indexOf("|"+e+"|")?"content_hub"===e?"z":e.substr(0,1):(__trcError('illegal parameter "'+e+'" was passed to trc_ListOriginBuilder method: "set'+t.substr(0,1).toUpperCase()+t.substr(1)+'" \nUsing "video" instead'),"v")},n=TRC.ListOriginBuilder=function(e,t){this.setSource(e||i),this.setTarget(t||"v")};n.prototype.setSource=function(e){i=o(e,"source")},n.prototype.getSource=function(){return i},n.prototype.setTarget=function(e){this.target=o(e,"target")},n.prototype.getTarget=function(){return this.target},n.prototype.toString=function(){return(i+"2"+this.target).replace(/v2v/,"blended")}}(window,document),(()=>{const e={};class t{static metricIncrement(t){e[t]=e[t]||0,e[t]++}static getMetricValue(t){return e[t]||0}static isMetricsEnabled(e,t){return t.util.isPercentEnabled(e.global,"rbox-metrics-enabled")&&e.global["bulk-metrics-events-strategy"]&&e.global["rbox-post-events-as-ajax"]}static sendMetricsEvent(e,r,i,o){try{if(!t.isMetricsEnabled(r,e))return;const n=t.formatMetricsData(e,i);r.sendEvent("metrics",n,null,!1,o,null,!1)}catch(e){__trcError("Failed to send Metrics event",e)}}static formatMetricsData(e,t){return{dimensions:JSON.stringify({publisher:e.publisherId,"integration-type":r(e)}),type:t.type,metricName:t.name,value:t.value};function r(e){return t(e)&&"SDK"||r(e)&&"AMP"||"normal";function t(e){return!(!e.mobile||!e.mobile.reportClick)}function r(e){return e.isAMP}}}}window._trcIsUTactive&&(t.setMetricValue=function(t,r){e[t]=r}),TRC.MetricsManager=t})(),(()=>{const e=[];class t{static loadMixpanelScript(t,r,i){const o=TRC.Mixpanel;try{if(window.mixpanel||o.requested)return void(window.mixpanel&&!e[t]&&o.initMixpanelProject(t));o.requested=!0,o.mixpanelScript(),o.initMixpanelProject(t),o.onMixpanelLoad(r)}catch(e){o.onMixpanelError(e,i)}}static mixpanelScript(){var e,t,r,i,o,n;e=document,(t=window.mixpanel||[]).__SV||(window.mixpanel=t,t._i=[],t.init=function(e,r,i){function s(e,t){var r=t.split(".");2==r.length&&(e=e[r[0]],t=r[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var a=t;for(void 0!==i?a=t[i]=[]:i="mixpanel",a.people=a.people||[],a.toString=function(e){var t="mixpanel";return"mixpanel"!==i&&(t+="."+i),e||(t+=" (stub)"),t},a.people.toString=function(){return a.toString(1)+".people (stub)"},o="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),n=0;n{const a=__trcCopyProps(e,{});if(a.children){if(!a.children.length)return;const e=TRC.multiWidget.createWrapper(a);t.appendChild(e),t=e,TRC.multiWidget.addMargin(t.previousSibling,i),TRC.multiWidget.recursiveBuild.call(this,{widgetsArr:a.children,depth:r+1,parentLayout:a,containerElm:t,widgetOptions:o,initRBox:n,isRTL:s})}else{const e=TRC.multiWidget.createWidget.call(this,{layout:a,widgetOptions:o,initRBox:n,isRTL:s});t.appendChild(e),TRC.multiWidget.addMargin(e.previousSibling,i)}a.flexSize&&(a.container.style.msFlex=a.container.style.flex=a.flexSize,a.container.style.overflow="hidden")})},addMargin(e,{gap:t,orientation:r,isRTL:i}){if(!e||!t)return;const o=i?"Left":"Right",n=`margin${"V"===r?"Bottom":o}`;e.style[n]=t},createWrapper(e){const t=document.createElement("div");return t.className+=" trc_multi_widget_container","V"===e.orientation&&(t.style.msFlexDirection=t.style.flexDirection="column"),e.container=t,t},createWidget({layout:e,widgetOptions:t,initRBox:r}){e.container=document.createElement("div");const{container:i,name:o}=e;return this.ensureValidContainer(i),o&&i.setAttribute("widget-name",o),t.mode_name=t.mode=t.response.trc["video-list"]["base-mode"]=e.name,t.multiWidgetModeLevelData=TRC.multiWidget.formatMultiWidgetPO(e),e.RBox=r.call(this,i,t),i},formatMultiWidgetPO(e){if(e.po){const t=__trcCopyProps(e,{});return t["properties-override"]=TRC.util.jsonParseCustomNative(`{${e.po}}`),t}return e}},TRC.net=function(e,t){var r=[],i;return{loadScript:function(e,r,i,o,n){var s=t.getElementsByTagName("script")[0],a=null;if("js"==r)(a=t.createElement("script")).type="text/javascript",a.src=TRC.shiftDomain(e),a.charset="UTF-8",o?a.setAttribute("defer","defer"):n&&a.setAttribute("async","async");else{if("css"!=r)throw new Error("External reference loaded must be of type 'js' or 'css'!");(a=t.createElement("link")).rel="stylesheet",a.type="text/css",a.href=e}return"function"==typeof i&&(a.addEventListener("load",i,!1),a.addEventListener("error",i,!1)),s.parentNode.insertBefore(a,s),a},fireSimpleHttpRequest:function(e){var t=new Image;t.src=e,r.push(t)},fireBeaconHttpRequest:function(t){e.navigator&&navigator.sendBeacon&&navigator.sendBeacon(t)}}}(window,document),(()=>{const e={timeStamp:"tim=",type:"type=",message:"msg=",debugLevel:"llvl=",id:"id="},t=TRC.PROTOCOL,r=function(e){const t=[];return Object.keys(e).forEach(r=>{t.push(`${encodeURIComponent(r)}=${encodeURIComponent(e[r])}`)}),t.join("&")};let i=0;function o(){return TRC.util.isPercentEnabled(TRCImpl.global,"new-logging-mechanism-on")}function n(e,t){t?TRC.net.fireBeaconHttpRequest(e):TRC.net.fireSimpleHttpRequest(e)}function s(e,r,i,n,s,l,c){if(o()&&window.SubtleCrypto)return TRC.cryptoKeysManager.getPageViewUniqueID().then(o=>{this.logMsgToServer(`${t}//${e}/${s}/log/2/debug?${a(r,i,n,l,o)}`,c)}).catch(()=>{this.logMsgToServer(`${t}//${e}/${s}/log/2/debug?${a(r,i,n,l)}`,c)});this.logMsgToServer(`${t}//${e}/${s}/log/2/debug?${a(r,i,n,l)}`)}function a(t,n,s,a,l){const c=window.TRCImpl&&window.TRCImpl.getSystemFlag("loaderType");return`${e.timeStamp+encodeURIComponent(s)}&${e.type}${encodeURIComponent(TRC.modDebug.getType(t))}&${e.message}${encodeURIComponent(n)}${window.trc_debug_level>1?`&${e.debugLevel}${window.trc_debug_level}`:""}&${e.id}${Math.floor(1e4*Math.random())}${window.TRC.version?`&cv=${window.TRC.version}`:""}${c?`<=${c}`:""}${o()&&window.SubtleCrypto&&l?`&uuid=${l}&dcc=${++i}`:""}${a?`&${r(a)}`:""}`}TRC.newDebugLogger={logMsg:s,logMsgToServer:n},window._trcIsUTactive&&(TRC.newDebugLogger.getLogParams=a,TRC.newDebugLogger.resetCounter=function(){i=0})})(),(()=>{const e="ack";TRC.pageLevelFeaturesManager={features:{"explore-more":{responseKey:"exm",enableInIframe:!0,functionCall:(e,t)=>{TRC.pageLevelFeaturesManager.getFeatureOnFeedLevel(e,t)}},"virtual-placement":{responseKey:"vpl",enableInIframe:!0,functionCall:(e,t)=>{TRC.pageLevelFeaturesManager.getFeatureOnPageLevel(e,t)}}},pageLevelFeatures:{},disableFeatureOnIframe(){const{pageLevelFeatures:e}=TRC.pageLevelFeaturesManager,t=window.self!==window.top;if(t){const t=Object.keys(this.features);for(let r=0;r{const r=this.features[t],i=r.responseKey,o=this.pageLevelFeatures[i];if(!o)try{r.functionCall(e,i)}catch(e){__trcError("Error in functionCall in pageLevelFeaturesManager",e)}})},getFeatureOnFeedLevel(e,t){const r=e.trc.f,i=r&&Object.keys(r);if(i)for(let o=0;o`${e}_${t}`}})(),(()=>{let e=null;class t{static init(e){t.setReferrer(e),e["keep-referrer-in-session"]&&TRC.pageManager.sessionStorageSetValue("tbl-session-referrer",location.href)}static updateReferrer(t){e=t}static getReferrer(){return e}static setReferrer(t){function r(){const e=document.head.getElementsByTagName("link");for(let t=0;t0?1:-1,o=new Date((new Date).getTime()+365*i*864e5);var s=this.getDomain();void 0!==document.cookie&&(document.cookie=e+"="+escape(r.join("|"))+";domain="+s+";path=/;expires="+o.toUTCString())},this.getDomain=function(){return!0===TRCImpl.global["store-first-party-cookie-in-subdomain"]||"true"===TRCImpl.global["store-first-party-cookie-in-subdomain"]?h.getPageSubDomain():""},this.getValue=function(e){return t.hasOwnProperty(e)?t[e]:null},this.setValue=function(e,r){t[e]=r,this.save()},this.removeKey=function(e){delete t[e],this.save()},this.delete=function(){t={},this.save()},this}function a(e){var t=e||{};return this.getValue=function(e){return t[e]?t[e]:null},this.setValue=function(e,r){t[e]=r},this.removeKey=function(e){delete t[e]},this.getData=function(){return t},this.delete=function(){t={}},this}function l(t){return this.getValue=function(r){return e[t+"Storage"].getItem(r)},this.setValue=function(r,i){try{e[t+"Storage"].setItem(r,i)}catch(e){}},this.removeKey=function(r){try{e[t+"Storage"].removeItem(r)}catch(e){}},this}function c(t){var r=e[t+"Storage"],i=(new Date).getTime()+"",o="_taboolaStorageDetection";try{if(r.setItem(o,i),r.getItem(o)==i)return r.removeItem(o),r}catch(e){}return null}function d(t){try{if(e.localStorage instanceof Storage&&TRC.useStorageDetection&&c(t))return new l(t)}catch(e){return null}}var h=function(){return this.publisher_id=null,this.item_id=null,this.page_id=null,this.state={},this.stateStack=[],this.getPageSubDomain=function(){return this.getPageDomainFromHostName(t.location.hostname)},this.getPageDomainFromHostName=function(e){var t="";try{var r=e.split(".").reverse();t="."+r[1]+"."+r[0],r.length>=3&&r[1].match(/^(com|edu|gov|net|mil|org|nom|co|name|info|biz)$/i)&&(t="."+r[2]+"."+r[1]+"."+r[0])}catch(e){}return t},this.getLocalStorageImplementation=function(t,r){if(null!=this.state.privateStorageImpl&&"strict-w3c-storage"!=t)return this.state.privateStorageImpl;var i=e.TRCImpl?e.TRCImpl.global:{};switch(t=t||(i["local-storage-usage"]?i["local-storage-usage"]:"prefer-w3c-storage")){case"strict-w3c-storage":return d("session"===r?"session":"local");case"prefer-w3c-storage":var o=d("local");if(o)return this.state.privateStorageImpl=o;case"prefer-cookies":try{if(this.canWriteCookies())return this.state.privateStorageImpl=new s}catch(e){}default:return this.state.privateStorageImpl=new a}},this.getFirstPartyCookie=function(){if(this.state.firstPartyCookie)return this.state.firstPartyCookie;var e=this.getLocalStorageImplementation();if(e instanceof s||e instanceof a)return this.state.firstPartyCookie=e;try{if(this.canWriteCookies())return this.state.firstPartyCookie=new s}catch(e){}return this.state.firstPartyCookie=new a},this.canWriteCookies=function(){var t,r;return(e.TRCImpl?e.TRCImpl.global:{})["use-trctestcookie"]?(document.cookie=n+"=ok",r=-1!==document.cookie.indexOf(n),document.cookie=n+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;",r):e.navigator.cookieEnabled},this.getDummyStorage=function(e){return new a(e)},this.trcParseParams=function(e){if(e&&!owner.item_id)for(var t=e.split("&"),r=0;r=0){var i=(r=r.split("?")[0]).split("/");owner.page_id=i[0],i.length>2&&(owner.page_id+="/"+i[1]),owner.trcParseParams(e[t].src.split("?")[1])}}},this.getPageData=function(){var e=this.getTopMostWindow();return e.taboola_view_id||(e.taboola_view_id=(new Date).getTime()),TRC.isAMPSplitFeed&&void 0!==TRC.syncViewID&&""!==TRC.syncViewID?TRC.syncViewID:e.taboola_view_id},this.storeValue=function(e,t){this.storePublisherValue(o,e,t)},this.removeKey=function(e){this.removePublisherKey(o,e)},this.getValue=function(e){return this.getPublisherValue(o,e)},this.storePublisherValue=function(e,t,r){var i;this.isNotAllowedToWriteValue(t,r)||(i=this.buildKeyWithPublisher(e,t),this.getLocalStorageImplementation().setValue(i,r),this.addKeyToStoredKeysList(i))},this.isNotAllowedToWriteValue=function(e,t){return null==t||void 0==t||TRC.doNotTrack&&!this.isAllowedKeyWhenDoNotTrack(e)},this.buildKeyWithPublisher=function(e,t){return e+":"+t},this.getPublisherValue=function(e,t){return TRC.doNotTrack&&!this.isAllowedKeyWhenDoNotTrack(t)?null:this.getLocalStorageImplementation().getValue(this.buildKeyWithPublisher(e,t))},this.removePublisherKey=function(e,t){return this.getLocalStorageImplementation().removeKey(this.buildKeyWithPublisher(e,t))},this.removeAllKeys=function(){for(var e=this.getStoredKeysList(),t=[],r,i=0;i-1?TRC.URL.prototype.getParameter.call(e,"ui"):null},this.getTopMostWindow=function(){var t;try{if((t=e.top).TRC=t.TRC||{},t.TRC||(t=e),!TRCImpl||!TRCImpl.global||!TRCImpl.global["disable-strict-top-window-check"])var r=t.location}catch(r){t=e}return t},this.additionalDispatchParams=function(){null==this.state.moreDispatchParams&&(this.state.moreDispatchParams=this.getCurrentURL().filtered);var t=e.TRCImpl&&e.TRCImpl.trcForce?e.TRCImpl.trcForce:void 0,r,i;return 0!==this.state.moreDispatchParams.length||t?"&"+this.mergeDispatchValues(t).join("&"):""},this.mergeDispatchValues=function(e){if(!e)return this.state.moreDispatchParams;var t=TRC.util.merge({},e);return this.state.moreDispatchParams.length>0&&this.state.moreDispatchParams.forEach(function(e){var r=e.split("=");t[r[0]]=r[1]}),Object.keys(t).map(function(e){return e+"="+t[e]})},this.getForceTrcCache=function(){return i},this.getCurrentURL=function(){var t=TRC.isAMP&&e.context&&e.context.canonicalUrl||e.location.href,r=new TRC.URL(t),o=[],n=[],s=function(e){return function(t){t&&(0==t.search("trc_")||"taboola-debug"==t?(i=new Boolean(t.match(/trc_cache/)).valueOf(),n.push(t)):e&&o.push(t))}};e.context&&e.context.location&&e.context.location.search.replace(/^\?/,"").split(/&/).forEach(s(!1)),r.search.replace(/^\?/,"").split(/&/).forEach(s(!0)),r.search=o.length>0?"?"+o.join("&"):"";var a=new String(r.toString());return a.filtered=n,a},this.sessionStorageGetValue=function(e){var t=this.getLocalStorageImplementation("strict-w3c-storage","session");return t&&t.getValue(e)||null},this.sessionStorageSetValue=function(e,t){var r=this.getLocalStorageImplementation("strict-w3c-storage","session");r&&r.setValue(e,t)},this.sessionStorageRemoveKey=function(e){var t=this.getLocalStorageImplementation("strict-w3c-storage","session");t&&t.removeKey(e)},this.initState=function(){void 0===this.state&&(this.state={}),this.state.privateStorageImpl=null,this.state.m_publisherDomains={host:[],path:[],query:[]},this.state.moreDispatchParams=null},this.getReferrer=function(){return TRC.PageReferrer.getReferrer()},this.updateReferrer=function(e){TRC.PageReferrer.updateReferrer(e)},this.initReferrer=function(e){TRC.PageReferrer.init(e)},this.pushState=function(){this.stateStack.push(this.state),delete this.state,this.initState()},this.popState=function(){this.stateStack.length>0&&(this.state=this.stateStack.pop())},this.initState(),this};h.getPageData=function(){return r.getPageData()},h.storeValue=function(e,t){return r.storeValue(e,t)},h.storePublisherValue=function(e,t,i){return r.storePublisherValue(e,t,i)},h.getValue=function(e){return r.getValue(e)},h.getPublisherValue=function(e,t){return r.getPublisherValue(e,t)},h.additionalDispatchParams=function(){return r.additionalDispatchParams()},h.getCurrentURL=function(){return r.getCurrentURL()},h.getPageSubDomain=function(){return r.getPageSubDomain()},h.pushState=function(){return r.pushState()},h.popState=function(){return r.popState()},TRC.pageManager=r=TRC.pageManager||new h,e.PageManager=e.PageManager||h}(window,document),(()=>{class e{constructor(){this.postData={}}setFullItemList(e){"object"==typeof e?this.postData.fil=__trcJSONify(e):"string"==typeof e&&(this.postData.fil=e)}setScreenHeight(e){this.postData.sh=e}setScreenWidth(e){this.postData.sw=e}setScreenDensity(e){this.postData.sde=e}setBrowserWidth(e){this.postData.bw=e}setBrowserHeight(e){this.postData.bh=e}setDocumentWidth(e){this.postData.dw=e}setDocumentHeight(e){this.postData.dh=e}setArticlePos(e){this.postData.bad=e}setContainerPos(e){this.postData.cd=e}setContainerWidth(e){this.postData.mw=e}setFirstVisibleEvent(e){this.postData.fve=e}setNewVisibleSent(){this.postData.nwv=!0}getAll(){return this.postData}getItemPostData(e){try{let{fil:t}=this.postData;"string"==typeof t&&(t=__trcUnJSONify(t)),t=t?t.filter(t=>t&&t.tii===e):t;const r=new TRC.PlacementEventPostData;return r.setFullItemList(t),r.postData}catch(e){return __trcWarn("getItemPostData error ",e),this.postData}}}TRC.PlacementEventPostData=e})(),((e,t,r)=>{const i=(e,t)=>{const{style:r="",location:i="beforeend"}=t;r&&TRC.dom.injectStyle(r),e.insertAdjacentHTML(i,o(t)),n(s(i,e))},o=e=>{const{markup:t="",href:r="#",enableScrolling:i="no",classList:o="",children:n="",inlineStyle:s="",wrapper:a}=e;let l=`${t}${n}`;return a&&(l=`<${a.type} class="${a.className}">${l}${a.type}>`),l},n=e=>{TRC.Device.isTouchDevice||TRC.dom.isInIframe()||TRC.dom.on(e,"click",e=>TRC.aboutUs.open(e)||!1)},s=(e,t)=>{switch(e){case"beforebegin":return t.previousElementSibling;case"afterbegin":return t.firstElementChild;case"beforeend":return t.lastElementChild;case"afterend":return t.nextElementSibling;default:return t.firstElementChild}};r.PopupLink={create:i}})(window,document,TRC),function(e,t){var r=TRC.PostRenderQueue=function(){return this.backend=[],this};r.prototype.pushBack=function(e,t){__trcDebug("postRenderQueue.pushBack("+e+")"),this.backend.push({name:e,func:t})},r.prototype.pushFront=function(e,t){__trcDebug("postRenderQueue.pushFront("+e+")"),this.backend.unshift({name:e,func:t})},r.prototype.popFront=function(){if(0==this.backend.length)return null;var e=this.backend.shift();return"function"==typeof e?{name:"unknown",func:e}:e}}(window,document),((e,t)=>{const r="tbl-forkorts-article",i=` ${r} ${r}-active`,o=`tbl-read-more-box-btn`,n="tbl-read-more-button-arrow",s="Read%20More",a=400;function l(e,t){const r=TRC.translationManager.getLabel({feature:"read-more",label:"DEFAULT_CAPTION"})||s;return{caption:e&&e.caption||t&&t.caption||r&&decodeURIComponent(r),boxSelector:e&&e.boxSelector||t&&t.boxSelector||null,threshold:e&&e.threshold||t&&t.threshold||1100,backgroundColor:e&&e.backgroundColor||t&&t.backgroundColor||"#fff",minimizedSize:e&&e.minimizedSize||t&&t.minimizedSize||800,scrollSize:e&&e.scrollSize||t&&t.scrollSize||800,buttonTop:e&&e.buttonTop||t&&t.buttonTop||48,buttonBottom:e&&e.buttonBottom||t&&t.buttonBottom||28,divTop:e&&e.divTop||t&&t.divTop||75,gradient:e&&e.gradient||t&&t.gradient||40,cutoffType:e&&e.cutoffType||t&&t.cutoffType||"ARTICLE",anchorSelector:e&&e.anchorSelector||t&&t.anchorSelector||null,lengthFromAnchorElementType:e&&e.lengthFromAnchorElementType||t&&t.lengthFromAnchorElementType||"BELOW",lengthFromAnchorElement:e&&e.lengthFromAnchorElement||t&&t.lengthFromAnchorElement||30}}function c(e){return`.${r} { max-height: inherit; } .${r}.tbl-forkorts-article-active { max-height: calc(${e.minimizedSize}px - 35px); overflow: hidden; position: relative; }.tbl-read-more-box { position: absolute; z-index: 4; left: 0; right: 0; /* there's a small line between the start of the feed/widget aand you can see the content there. so i placed the gradient 2px lower. */ bottom: -2px; display: none; text-align: center; padding: ${e.divTop}px 12px calc(50px - 35px); background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 10%, ${e.backgroundColor} 60%, ${e.backgroundColor} 100%); } .tbl-read-more-box .tbl-read-more-btn { background: #F7F7F7; border: 1px solid #bebebe; border-radius: 24px; color: #5C5C5C; width: 130px; margin: -6px 0 40px 0; padding: 8px 20px 8px 25px; height: 30px; line-height: 14px; font-size: 14px; font-weight: 500; text-align: center; } .tbl-read-more-box .tbl-read-more-btn.tbl-rtl-read-more-btn { padding: 8px 25px 8px 20px; } .tbl-read-more-box .tbl-read-more-btn.tbl-rtl-read-more-btn .tbl-read-more-button-arrow { margin: 0 6px 0 0; } .tbl-read-more-box .tbl-read-more-btn .tbl-read-more-button-arrow { width: 8px; height: 8px; margin: 0 0 0 6px; } .tbl-read-more-box .tbl-read-more-btn:hover { cursor: pointer; text-decoration: none; background: #ececec; color: #5C5C5C; }.${r}-active .tbl-read-more-box { display: block; }`}function d(){return e.pageYOffset||t.documentElement.scrollTop||t.body.scrollTop}function h(e){const i=t.querySelector(`.${r}`);e.preventDefault(),e.stopPropagation(),i.classList.remove(`${r}-active`),i.style.maxHeight="",TRC.readMoreVisible=!1,f.call(this,"clicked","true",null),TRC.EventsAPI.readmore("click",this.response&&this.response.trc),TRC.dispatch("readMoreClicked")}function u(e,r){const i=t.createElement("div");return i.className=`tbl-read-more-box`,i.innerHTML=` \n ${e.caption}\n ${p()}\n `,i}function p(){return`\n \n \n \n `}function g(r,i){const o=r.context||i.context;"parent"===o&&(e=e.parent,t=e.parent.document),"top"===o&&(e=e.top,t=e.top.document)}function m(e,r){const i=r||"kortWidgetCssStyle";let o=t.querySelector(`#${i}`);o&&o.parentNode.removeChild(o),(o=t.createElement("div")).id=i,o.innerHTML=``,t.documentElement.appendChild(o)}function b(e,r,i){let o,n;if("PAGE_ELEMENT"===e.cutoffType&&(n=t.querySelector(e.anchorSelector))){const t=n.getBoundingClientRect(),s=r.getBoundingClientRect();"ABOVE"===e.lengthFromAnchorElementType?o=t.top-s.top-e.lengthFromAnchorElement:(o=t.bottom-s.top+e.lengthFromAnchorElement,o+=i.getBoundingClientRect().height)}return o}function f(e,t,r){if(TRC.util.isPercentEnabled(TRCImpl.global,"read-more-events-enabled")){const i={event_type:"read_more",event_state:e,event_value:t,event_msg:r};this.sendEvent("supply-feature",{d:JSON.stringify(i)},null)}}function v(e,t,r){function i(e){for(;-1===e.className.indexOf("trc_related_container")||e.parentNode.className.indexOf("trc_related_container")>-1;)e=e.parentNode;return e}const o=i(e.container),n=d(),s=r.getBoundingClientRect().top+n;if(n=a.scrollSize);if(TRCImpl.global["read-more-scroll-fast-enabled"]&&(C=v(n,a,p))&&a.minimizedSize{s("Visible",!0,null),TRC.intersections.unobserve(w)}},w=TRC.intersections.observe(R);return TRC.tlf&&console.timeEnd("init Read More"),!0}catch(e){return __trcError("Error read more init",e),!1}}s||TRC.EventsAPI.readmore("none",n.response&&n.response.trc)}TRC._translationQueue=TRC._translationQueue||[],TRC._translationQueue.push({"read-more":{DEFAULT_CAPTION:s}}),TRC.setReadMore=C})(window,document);const CLASSES={SLIDER:"tbl-reco-reel-slider",SLIDER_CLOSE:"tbl-reco-reel-slider-close",SLIDER_CLOSE_HOVER:"tbl-close-hover",SLIDER_MOBILE:"tbl-slider-mobile",SLIDER_DESKTOP:"tbl-slider-desktop",SLIDER_OVERLAY:"tbl-slider-overlay",SLIDER_CONTROLLERS:"tbl-slider-controllers",SHOW_SLIDER_OVERLAY:"tbl-slider-show",SLIDER_CONTROL:"tbl-slider-control",SLIDER_PLAY:"tbl-slider-play",SLIDER_NAVIGATION:"tbl-slider-navigation",SLIDER_CLOSE_BUTTON:"tbl-slider-close",PAUSE:"tbl-slider-pause",HIDDEN:"tbl-hidden",TEXT_CONTAINER:"tbl-text-container"},DIRECTIONS={BOTTOM:"bottom",LEFT:"left"},POSITIONS={ABOVE_RECOREEL:"above",BELOW_RECOREEL:"below"},PLATFORMS={DESKTOP:"desktop",MOBILE:"mobile"},SELECTORS={TITLE_BACKGROUND:".tbl-text-under-title-background"},CONTROL_BUTTON_TYPES={BACK:"back",PLAY:"play",PAUSE:"pause",FORWARD:"forward",CLOSE:"close",NAVIGATE:"navigate"},ADD="addClass",REMOVE="removeClass",TICK_CYCLE=150,CONTROLLERS_FADE_DURATION=2e3,CLIENT_PROPERTIES={ENABLE_SLIDER:"recommendationReel-enable-slider",NAVIGATION_TEXT:"recommendationReel-slider-navigation-text",BELOW_ONLY:"recommendationReel-slider-below-only",BELOW_FIRST_ITEM_ONLY:"recommendationReel-slide-below-first-item-only",START_FROM_SLIDER:"recommendationReel-slider-start-from-slider",SLIDER_POSITION:"recommendationReel-slider-position",TEXT_UNDER_SLIDER_IN_ONLY:"recommendationReel-slider-text-under-slide-in-only",DISCLOSURE_LINK_TEXT:"disclosure-link-text-sponsored"},EVENT_TYPES={RECO_REEL_SLIDER:"RECO_REEL_SLIDER",CONFIGURATION:"CONFIGURATION",VISIBLE:"VISIBLE",INTERACTION:"INTERACTION",AVAILABLE:"AVAILABLE",DEFAULT:"default - detach both ways"},EVENT_VALUES={EVENT_VALUES_LIST:["belowOnly","belowOnlyFirstSlider","shouldStartFromSlider"]};class SliderEventManager{static handleSliderEvents(e,t,r){if(!e)return;const{handleSliderConfigEvent:i,sliderSendEvent:o,sliderEventTimer:n}=SliderEventManager;switch(e){case EVENT_TYPES.CONFIGURATION:i(t);break;case EVENT_TYPES.INTERACTION:o(e,t);break;case EVENT_TYPES.AVAILABLE:n(e,r);break;case EVENT_TYPES.VISIBLE:r&&!r.sliderFirstVisible?(n(e,r),r.sliderFirstVisible=!0):o(e)}}static handleSliderConfigEvent(e){if(!e)return;const t=[];EVENT_VALUES.EVENT_VALUES_LIST.forEach(r=>{TRC.util.isTrue(e[r])&&t.push(r)});const r=t.length<1?EVENT_TYPES.DEFAULT:t;SliderEventManager.sliderSendEvent(EVENT_TYPES.CONFIGURATION,r)}static sliderEventTimer(e,t){if(!e)return;const r=performance.now()-t.sliderEventTimer;SliderEventManager.sliderSendEvent(e,r)}static sliderSendEvent(e,t){const r={event_type:EVENT_TYPES.RECO_REEL_SLIDER,event_state:e,event_value:t};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(r)},null)}}var SliderEventManager$1={handleSliderEvents:SliderEventManager.handleSliderEvents};class SliderControllers{constructor(e,t,r,i){this.context=e,this.mainContext=i,this.cardHeight=t,this.options=r,SliderControllers.injectCss(),this.createOverLay(t)}static injectCss(){TRC.dom.injectStyle(`.tbl-slider-overlay { display: none; }.tbl-reco-reel-slider { font-size: 16px; } .tbl-reco-reel-slider .tbl-text-under-controls { display: none; } .tbl-reco-reel-slider .tbl-clickable-area-btn { display: none; } @media (min-width: 1024px) { .tbl-reco-reel-slider { font-size: 25px; } } @media (min-width: 1280px) { .tbl-reco-reel-slider { font-size: 30px; } } .tbl-reco-reel-slider .tbl-slider-overlay { display: block; transition: 0.5s; opacity: 0; position: absolute; height: 100%; width: 100%; top: 0; z-index: 999; background: #000000b3; cursor: pointer; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-mobile { display: block; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-desktop { display: none; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-mobile { display: none; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-desktop { display: block; } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-mobile, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-desktop { display: block; position: absolute; left: 5px; top: 14px; height: 15%; width: 15%; text-align: left; font-size: 0em; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-mobile:hover .tbl-close-hover, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-desktop:hover .tbl-close-hover { stroke-width: 2; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-mobile, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-desktop { left: 10px; top: 19px; height: unset; width: unset; } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-desktop { display: none; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-desktop { display: block; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-close .tbl-slider-mobile { display: none; } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers { position: absolute; width: 100%; height: 100%; transform: translateY(35%); } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers { transform: translateY(37%); } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-mobile, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-desktop { justify-content: space-between; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-mobile { display: flex; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-mobile, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-desktop { display: flex; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-mobile { display: none; } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-controllers .tbl-slider-play { display: none; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-control { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; text-align: center; width: 100%; display: flex; height: 20%; justify-content: center; align-items: flex-end; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-control[name="back"] { justify-content: flex-end; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-control[name="back"] > svg { margin-right: 1em; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-control[name="forward"] { justify-content: flex-start; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-control[name="forward"] > svg { margin-left: 1em; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation { position: absolute; width: 100%; height: 100%; transform: translateY(55%); } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation { transform: translateY(60%); } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-mobile, .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-desktop { width: 100%; display: flex; align-items: center; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-desktop { display: none; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-desktop { display: flex; } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-mobile { display: none; } } .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-navigation-text { line-height: 1; margin-right: 2%; color: #FFFFFF; font-size: 1em; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay .tbl-slider-navigation .tbl-slider-navigation-text:hover { box-shadow: 0px 2px 0px 0px #FFFFFF; } } .tbl-reco-reel-slider .tbl-slider-overlay.tbl-slider-pause { background: unset; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-overlay.tbl-slider-pause { opacity: 1; } } .tbl-reco-reel-slider .tbl-slider-overlay.tbl-slider-pause .tbl-slider-control { display: none; } .tbl-reco-reel-slider .tbl-slider-overlay.tbl-slider-pause .tbl-slider-play { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; width: 30%; text-align: center; margin: 0 auto; display: block; } .tbl-reco-reel-slider .tbl-slider-overlay.tbl-slider-show { opacity: 1; }`)}static extendPlayPauseFunction(e){e.isTextUnderSlideIn&&TRC.aspect.after(e,"toggleMiddleControlButton",t=>{switch(t){case CONTROL_BUTTON_TYPES.PLAY:TRC.dom.removeClass(e.sliderOverlayContainer,CLASSES.PAUSE);break;case CONTROL_BUTTON_TYPES.PAUSE:TRC.dom.addClass(e.sliderOverlayContainer,CLASSES.PAUSE)}})}showOverlay(){const{context:e}=this;e.isControllersVisible?clearTimeout(e.isControllersVisible):this.setOverlay("show"),e.isControllersVisible=setTimeout(()=>this.setOverlay("hide"),CONTROLLERS_FADE_DURATION)}setOverlay(e){const{context:t}=this;switch(e){case"show":TRC.dom.addClass(t.sliderOverlayContainer,CLASSES.SHOW_SLIDER_OVERLAY);break;case"hide":clearTimeout(t.isControllersVisible),TRC.dom.removeClass(t.sliderOverlayContainer,CLASSES.SHOW_SLIDER_OVERLAY),t.isControllersVisible=null}}static createTopLayer(){const e=document.createElement("div");return TRC.dom.addClass(e,CLASSES.SLIDER_CLOSE_BUTTON),Object.keys(PLATFORMS).forEach(t=>{const r=PLATFORMS[t],i=document.createElement("div");TRC.dom.addClass(i,CLASSES.SLIDER_CONTROL),TRC.dom.addClass(i,CLASSES[`SLIDER_${t}`]),i.insertAdjacentHTML("beforeend",SliderControllers.sliderCloseButton(r)),i.setAttribute("name",CONTROL_BUTTON_TYPES.CLOSE),e.appendChild(i)}),e}static createMidLayer({sliderBackButton:e,sliderPauseButton:t,sliderPlayButton:r,sliderForwardButton:i}){const o=document.createElement("div");return TRC.dom.addClass(o,CLASSES.SLIDER_CONTROLLERS),Object.keys(PLATFORMS).forEach(n=>{const s=PLATFORMS[n],a=document.createElement("div");TRC.dom.addClass(a,CLASSES[`SLIDER_${n}`]),[e,t,r,i].forEach(e=>{const t=document.createElement("div");e===r?TRC.dom.addClass(t,CLASSES.SLIDER_PLAY):TRC.dom.addClass(t,CLASSES.SLIDER_CONTROL),t.setAttribute("name",e.name.replace("Button","").replace("slider","").toLowerCase()),t.insertAdjacentHTML("beforeend",e(s)),a.appendChild(t)}),o.appendChild(a)}),o}createBottomLayer(){const e=document.createElement("div");return TRC.dom.addClass(e,CLASSES.SLIDER_NAVIGATION),Object.keys(PLATFORMS).forEach(t=>{const r=PLATFORMS[t],i=document.createElement("div");TRC.dom.addClass(i,CLASSES[`SLIDER_${t}`]),i.insertAdjacentHTML("beforeend",this.sliderSendButton(r)),TRC.dom.addClass(i,CLASSES.SLIDER_CONTROL),e.appendChild(i)}),e}createOverLay(e){const{context:t}=this,{createTopLayer:r,createMidLayer:i}=SliderControllers;t.sliderOverlayContainer=document.createElement("div"),TRC.dom.addClass(t.sliderOverlayContainer,CLASSES.SLIDER_OVERLAY),t.sliderOverlayContainer.appendChild(r()),t.sliderOverlayContainer.appendChild(i(SliderControllers)),t.sliderOverlayContainer.appendChild(this.createBottomLayer()),t.internalc.parentNode.appendChild(t.sliderOverlayContainer),this.createButtonsEvents(e)}createButtonsEvents(e){const{context:t}=this;TRC.dom.on(t.sliderOverlayContainer,"click",r=>{r.stopPropagation();const i=r.target.getAttribute("name");if(t.isControllersVisible&&i)switch(SliderEventManager$1.handleSliderEvents(EVENT_TYPES.INTERACTION,i),i){case CONTROL_BUTTON_TYPES.PLAY:case CONTROL_BUTTON_TYPES.PAUSE:if(t.animationInProgress)return;clearTimeout(t.isControllersVisible),t.freezeControllers=i===CONTROL_BUTTON_TYPES.PAUSE,t.generateControlButtonOnClick(i)();break;case CONTROL_BUTTON_TYPES.CLOSE:t.freezeControllers||(this.mainContext.onSliderEnd(t,e),t.sliderObserver.disconnect());break;case CONTROL_BUTTON_TYPES.NAVIGATE:const{logger_url:r,isSyndicated:o}=t.state.showItem.video_data;window.open(r,o?"_blank":"_self");break;default:if(!t.freezeControllers)return t.generateControlButtonOnClick(i)(),this.setOverlay("hide")}!t.freezeControllers&&this.showOverlay()})}static sliderCloseButton(e){switch(e){case PLATFORMS.DESKTOP:return`\n \n \n `;case PLATFORMS.MOBILE:return`\n \n \n `}}static sliderBackButton(e){switch(e){case PLATFORMS.DESKTOP:return`\n \n \n `;case PLATFORMS.MOBILE:return`\n \n \n `}}static sliderPauseButton(e){switch(e){case PLATFORMS.MOBILE:return`\n \n \n `;case PLATFORMS.DESKTOP:return`\n \n \n `}}static sliderPlayButton(e){switch(e){case PLATFORMS.MOBILE:return`\n \n `;case PLATFORMS.DESKTOP:return`\n \n `}}static sliderForwardButton(e){switch(e){case PLATFORMS.MOBILE:return`\n \n \n `;case PLATFORMS.DESKTOP:return`\n \n \n `}}sliderSendButton(e){const t=`${this.options.navigationText}`;switch(e){case PLATFORMS.MOBILE:return`${t}\n \n `;case PLATFORMS.DESKTOP:return`${t}\n \n `}}}class RecommendationReelSlider{constructor(e){this.rbox=e,this.trcManager=e.trc,this.modeName=e.options.mode_name,this.numberOfInstances=0,this.IntersectionObserver=TRC.IntersectionObserver||window.IntersectionObserver,this.options=this.getOptions(),RecommendationReelSlider.injectStyle(),SliderEventManager$1.handleSliderEvents(EVENT_TYPES.CONFIGURATION,this.options)}static getInstance(e){return SliderControllers.extendPlayPauseFunction(e),RecommendationReelSlider.instance?RecommendationReelSlider.instance:RecommendationReelSlider.instance=new RecommendationReelSlider(e.rbox)}getOptions(){return{onlyNewRecoReel:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.TEXT_UNDER_SLIDER_IN_ONLY,this.rbox.propertiesOverride),belowOnly:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.BELOW_ONLY,this.rbox.propertiesOverride),belowOnlyFirstSlider:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.BELOW_FIRST_ITEM_ONLY,this.rbox.propertiesOverride),shouldStartFromSlider:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.START_FROM_SLIDER,this.rbox.propertiesOverride),position:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.SLIDER_POSITION,this.rbox.propertiesOverride),navigationText:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.NAVIGATION_TEXT,this.rbox.propertiesOverride),text:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.DISCLOSURE_LINK_TEXT,this.rbox.propertiesOverride)}}static injectStyle(){TRC.dom.injectStyle(`.tbl-reco-reel-slider { animation: tbl-slideInRight 0.5s forwards; position: fixed !important; width: 100% !important; max-width: 180px; margin-top: 0px !important; top: 50%; right: 0; } @media (min-width: 1024px) { .tbl-reco-reel-slider { max-width: 320px; } } .tbl-reco-reel-slider.tbl-slider-left { animation: tbl-slideInLeft 0.5s forwards; right: unset; left: 0; } .tbl-reco-reel-slider.tbl-slider-bottom { top: unset; bottom: 0; } .tbl-reco-reel-slider.tbl-reco-reel-slider-close { animation: tbl-slideOutRight 0.5s forwards; } .tbl-reco-reel-slider.tbl-reco-reel-slider-close.tbl-slider-left { animation: tbl-slideOutLeft 0.5s forwards; } .tbl-reco-reel-slider .tbl-text-under-title-background.label-show .tbl-text-container { background: #EBEBEB; color: #9E9E9E; font-size: 12px; font-weight: 600; position: absolute; z-index: 333; right: 0; top: -15px; padding: 0 10px; display: block !important; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-text-under-title-background.label-show .tbl-text-container { font-size: 15px; } } .tbl-reco-reel-slider .video-label-box { top: -35px !important; } .tbl-reco-reel-slider .video-label-box .video-title { overflow: revert; margin: 10px !important; -webkit-line-clamp: 4 !important; font-size: 12px; } @media (min-width: 1024px) { .tbl-reco-reel-slider .video-label-box .video-title { font-size: 15px; } } .tbl-reco-reel-slider .video-label-box .branding { display: none !important; }.tbl-text-under-title-background .tbl-text-container { display: none; }@keyframes tbl-slideInRight { 0% { transform: translateX(100%); } 100% { transform: translateX(0); } }@keyframes tbl-slideOutRight { 0% { transform: translateX(0); } 100% { transform: translateX(100%); } }@keyframes tbl-slideInLeft { 0% { transform: translateX(-100%); } 100% { transform: translateX(0); } }@keyframes tbl-slideOutLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }`)}createSlider(e){try{const{isTextUnderSlideIn:t}=e,{setSliderContainer:r,isInViewport:i}=RecommendationReelSlider;if(this.options.onlyNewRecoReel&&!t)return;this.numberOfInstances++,e.firstSlider=1===this.numberOfInstances,e.sliderEventTimer=performance.now();const o=e.calcCardHeight();r(e),t&&this.createOverlayControllers(e,o),this.supportMultipleSliders(e,o),i(e.sliderContainer)||this.startFromSlider(e,o),this.initRecoreelObserver(e,o),this.handleSponsoredItems(e),SliderEventManager$1.handleSliderEvents(EVENT_TYPES.AVAILABLE,null,e)}catch(e){__trcError(`Failed to create recommendation reel slider - ${e.message}`)}}handleSponsoredItems(e){e.items.forEach(e=>{if(!(e&&e.video_data&&e.video_data["is-syndicated"]))return;const t=e.querySelector(SELECTORS.TITLE_BACKGROUND);this.textContainer=TRC.dom.createHTMLElement("span",{className:CLASSES.TEXT_CONTAINER,innerText:this.options.text}),this.setTextContainerBackground(e,t),t.insertAdjacentElement("afterbegin",this.textContainer)})}setTextContainerBackground(e,t){const r=getComputedStyle(t).backgroundColor;r&&(this.textContainer.style.backgroundColor=r)}static setSliderContainer(e){e.sliderContainer=e.isTextUnderSlideIn?e.internalc.parentNode:e.container}createOverlayControllers(e,t){new SliderControllers(e,t,this.options,RecommendationReelSlider)}supportMultipleSliders(e,t){2===this.numberOfInstances&&this.addMultipleSlidersSupport(),RecommendationReelSlider.listenToSliderStop(e,t)}addMultipleSlidersSupport(){const e=RecommendationReelSlider.onSliderEnd;RecommendationReelSlider.onSliderEnd=((t,r)=>{if(!t.sliderActive)return r.itemHeight=TRC.RecommendationReel.getOuter("height",r.item),void TRC.dispatch("tbl-recommendation-reel-slider-stop");e.call(this,t,r),TRC.dispatch("tbl-recommendation-reel-slider-stop")})}startFromSlider(e,t){if(!this.options.shouldStartFromSlider||1!==this.numberOfInstances)return;if(-1===[].slice.apply(e.mainContainer.classList).indexOf("tbl-invisible"))return this.onSliderStart(e,t);const r=TRC.listen("rBoxVisible",()=>{this.onSliderStart(e,t),r.remove()})}static isInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}static listenToSliderStop(e,t){TRC.listen("tbl-recommendation-reel-slider-stop",()=>{e.sliderActive&&RecommendationReelSlider.onSliderEnd(e,t)})}initRecoreelObserver(e,t){const r=TRC.dom.detectAnimationEvent(e.sliderContainer,"end")||"animationend";TRC.dom.on(e.sliderContainer,r,()=>this.onSliderAnimationEnd(e,t));const{mainContainer:i}=e,o={root:null,rootMargin:"0px",threshold:[.5]};e.sliderObserver=new this.IntersectionObserver(([r])=>{const{ABOVE_RECOREEL:i,BELOW_RECOREEL:o}=POSITIONS,n=r.intersectionRect.y?i:o,s=this.options.belowOnlyFirstSlider&&e.firstSlider||this.options.belowOnly;if(0!==r.intersectionRatio&&(n!==i||!s))return r.isIntersecting?RecommendationReelSlider.onSliderEnd(e,t):void this.onSliderStart(e,t,r)},o),e.sliderObserver.observe(i)}static setContainerStaticHeight(e,t,r){const i=r&&r.boundingClientRect&&r.boundingClientRect.height;e.mainContainer.style.height=`${i||t.itemHeight}px`}static removeContainerStaticHeight(e){e.mainContainer.style.removeProperty("height")}static fastScrollSupport(e){RecommendationReelSlider.preventSliderClose(e),TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),e.sliderActive=!0}static preventSliderClose(e){clearTimeout(e.isCloseAnimationRunning),e.isCloseAnimationRunning=null}onSliderStart(e,t,r){const{fastScrollSupport:i,setContainerStaticHeight:o,reCalculateSliderSize:n}=RecommendationReelSlider;if(e.isCloseAnimationRunning)return i(e);o(e,t,r),this.setSliderFixedPosition(e.sliderContainer,ADD),TRC.dom.addClass(e.sliderContainer,CLASSES.SLIDER),n(e,t),TRC.dispatch("tbl-recommendation-reel-slider-open"),e.sliderActive=!0,SliderEventManager$1.handleSliderEvents(EVENT_TYPES.VISIBLE,null,e)}setSliderFixedPosition(e,t){const{position:r}=this.options;r.split(" ").forEach(r=>{switch(r){case DIRECTIONS.LEFT:case DIRECTIONS.BOTTOM:TRC.dom[t](e,`tbl-slider-${r}`)}})}onSliderAnimationEnd(e,t){if(!e.isCloseAnimationRunning)return;const{reCalculateSliderSize:r,removeContainerStaticHeight:i}=RecommendationReelSlider;TRC.dom.addClass(e.sliderContainer,CLASSES.HIDDEN),setTimeout(()=>{if(null===e.isCloseAnimationRunning)return TRC.dom.removeClass(e.sliderContainer,CLASSES.HIDDEN);TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER),TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),this.setSliderFixedPosition(e.sliderContainer,REMOVE),TRC.dom.removeClass(e.sliderContainer,CLASSES.HIDDEN),r(e,t),i(e),e.isCloseAnimationRunning=null,TRC.dispatch("tbl-recommendation-reel-slider-close")},TICK_CYCLE)}static onSliderEnd(e){e.sliderActive&&(TRC.dom.addClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),e.isCloseAnimationRunning=!0,e.sliderActive=!1)}static reCalculateSliderSize(e,t){e.recalculateWidgetSize(t),e.isTextUnderSlideIn&&e.calcLabelBoxSizes()}}!function(){let e=!1;const t={RECO_REEL:"tbl-reco-reel story-widget",PROGRESS_BAR:"tbl-reco-reel-progressBar tbl-story-progressBar",PROGRESS_BAR_WRAPPER:"tbl-reco-reel-progressBar-wrp tbl-story-progressBar-wrp",PROGRESS_BAR_WRAPPER_TEXT_OVER:"tbl-reco-reel-progressBar-wrp-text-over tbl-story-progressBar-wrp-text-over",PROGRESS_BAR_OVERFLOW_WRAPPER:"tbl-reco-reel-progressBar-overflow-wrp tbl-story-progressBar-overflow-wrp",TOUCH_DEVICE:"tbl-reco-reel-touch-device tbl-story-touch-device",DESKTOP:"tbl-reco-reel-desktop tbl-story-desktop",TEXT_OVER:"tbl-reco-reel-text-over story-widget-text-over",TEXT_UNDER_SLIDE_IN:"tbl-reco-reel-text-under-slide-in story-widget-text-under-slide-in",TEXT_UNDER_RTL:"tbl-reco-reel-text-under-rtl story-widget-text-under-rtl",SHOW_ITEM:"tbl-show-item",NEXT_ITEM:"tbl-next-item",REMOVE_LEFT:"tbl-remove-item",REMOVE_RIGHT:"tbl-remove-item-to-right",IMAGE_HOLDER:"thumbBlock_holder",ZOOM_IN:TRC.Browser.ie?"":"tbl-zoom-in-item",PROGRESS_RUNNER:"tbl-progress-runner",PROGRESS_ANIM:"tbl-progress-anim",PREVENT_CLICK:"tbl-prevent-click-progressBar",ARROW_BUTTON:"tbl-arrow-btn",CLICKABLE_AREA:"tbl-clickable-area-btn",TEXT_UNDER_CONTROLS:"tbl-text-under-controls",HIDDEN:"tbl-hidden",LABEL_SHOW:"label-show",ANIMATION_ZOOM_IN:"tbl-animation-zoom-In"},r={SLIDE_OUT_LEFT:"tbl-animation-slide-out-left",SLIDE_OUT_RIGHT:"tbl-animation-slide-out-right",PROGRESS_BAR_ANIMATION:"tbl-animation-progress-bar"},i={LABELS:".item-label-href",LABELS_BOX:".item-label-href .video-label-box",LABELS_BRANDING:".item-label-href .branding",LABELS_GRADIENT_CONTAINER:"tbl-text-over-container",LABELS_GRADIENT_OVERLAY:"tbl-text-over",LABELS_ALIGN:"tbl-text-over-align",LABELS_ALIGN_LEFT:"tbl-text-over-labels-left",LABELS_ALIGN_RIGHT:"tbl-text-over-labels-right",VIDEO_TITLE:"video-title"},o=[r.SLIDE_OUT_LEFT,r.SLIDE_OUT_RIGHT],n=56,s=.15,a=100,l=300,c=270,d=-38,h=-35,u={BACK:"back",PLAY:"play",PAUSE:"pause",FORWARD:"forward"},p={play:"running",pause:"paused"};class g{constructor(r){this.props=g.GetRecommendationReelProps(r),this.active=!1,this.finishFirstCycle=!1,this.browserWidth=TRC.dom.getWindowWidth(),this.internalc=r.internalContainer,this.mainContainer=r.container,this.rbox=r,this.setNumOfItems(r.responsiveRules),this.items=Array.prototype.slice.call(r.boxes,0,this.amountOfItems),this.intervalLength=this.props.recoReelInterval,this.debugWidget=-1!==window.location.search.indexOf("tbl-debug=true"),this.isTouchDevice=TRC.Device.isTouchDevice,this.deviceType=this.isTouchDevice?t.TOUCH_DEVICE:t.DESKTOP,this.calcImageHeight(),this.thumbnailPosition=r.getThumbnailPosition(),this.isTextOver="under"===this.thumbnailPosition,this.direction=g.getDirection(r),this.isTextUnderSlideIn=g.checkIsTextUnderSlideIn(r)&&!this.isTextOver,this.enableSlider=TRC.util.isTrue(this.rbox.trc.getProperty(r.options.mode_name,CLIENT_PROPERTIES.ENABLE_SLIDER,this.rbox.propertiesOverride)),this.enableSlider&&(this.recommendationReelSlider=RecommendationReelSlider.getInstance(this)),this.state={previousItem:null,showItem:this.items[0],showNextItem:this.items[1],activePB:null,previousPosition:null,currentPosition:0},!e&&g.setDefaultCss();const i=TRC.listen("trcContentReady",e=>{e.container===this.mainContainer&&this.init(i)})}static shouldInitRecommendationReel(e){return TRC.util.isTrue(g.getProperty(e,"recommendationReel","storyWidget"))}static GetRecommendationReelProps(e){return{recoReelInterval:g.getProperty(e,"interval","storyWidget-story-interval")||7}}static checkIsTextUnderSlideIn(e){return TRC.util.isTrue(g.getProperty(e,"enable-text-under-slide-in","storyWidget-recommendation-reel-enable-text-under-slide-in"))}static getProperty(e,t,r){return e.trc.getProperty(e.mode_name,t,e.propertiesOverride)||e.trc.getProperty(e.mode_name,r,e.propertiesOverride)}static setTextOverForRecommendationReel(e,t){const r=document.createElement("span"),o=this.getDirection(e);TRC.dom.addClass(r,i.LABELS_GRADIENT_OVERLAY),t.link.appendChild(r),TRC.dom.addClass(t.link,i.LABELS_GRADIENT_CONTAINER),this.alignLabelsBox(t,o),this.addArrowIcon(t.link,o)}calcImageHeight(){this.imageHeight=g.getOuter("height",this.items[0].querySelector(`.${t.IMAGE_HOLDER}`)),this.imageWidth=g.getOuter("width",this.items[0].querySelector(`.${t.IMAGE_HOLDER}`))}init(e){const r=this.getRecoReelTypeContainerClass();try{e.remove(),setTimeout(()=>{this.container=this.mainContainer.querySelector(".trc_rbox_container"),TRC.dom.addClass(this.container,`${t.RECO_REEL} ${r} ${this.deviceType}`),TRC.dom.addClass(this.internalc,"tbl-recommendation-reel"),this.isTextUnderSlideIn&&(this.addLabelsBoxAnimatedElements(),this.calcLabelBoxSizes()),this.calcImageHeight(),this.buildRecommendationReel(),this.setDynamicCss(),TRC.dispatch("widgetHeightReady"),this.resizeIfAMPFeed(),this.enableSlider&&this.recommendationReelSlider.createSlider(this)},0);const i={onEnter:this.startTheReel.trcBind(this),onExit:this.stopTheReel.trcBind(this),targetElement:this.internalc};TRC.intersections.observe(i)}catch(e){__trcError("error on reco reel initialisation",e)}}resizeIfAMPFeed(){try{TRC&&TRC.isAMP&&TRC.amp&&"function"==typeof TRC.amp.sendAMPFeedResize&&this.rbox&&this.rbox.isFeedCard&&TRC.amp.sendAMPFeedResize()}catch(e){__trcWarn("error in resize amp feed",e)}}buildRecommendationReel(){if(this.rbox.trc.sendAbTestEvent("recommendation-reel","available"),this.listenToAnimationEvents(),this.arrows=[],this.clickedAreas=[],this.progressBar=this.createProgressBar(),this.internalc.parentNode.appendChild(this.progressBar),this.allowRecalculateSize=!0,this.deviceType===t.DESKTOP)this.arrows=[],this.isTextUnderSlideIn||(this.arrows=this.createArrowBtns(),TRC.dom.on(this.internalc,"mouseover",this.playStateAnimation.trcBind(this,"paused")),TRC.dom.on(this.internalc,"mouseleave",this.playStateAnimation.trcBind(this,"running")));else{this.clickedAreas=this.createMobileClickedArea();const e=document.createElement("div");e.className=t.PREVENT_CLICK,this.progressBar.appendChild(e)}const e=this.calcCardHeight();this.isTextUnderSlideIn?(this.createControls(),this.responsiveAlignmentTextUnder(e)):this.responsiveAlignment(e),TRC.dom.on(window,"resize",TRC.util.debounce(()=>{this.recalculateWidgetSize(e),this.isTextUnderSlideIn&&this.calcLabelBoxSizes()},100,!1,this))}recalculateWidgetSize(e){e.item.style.removeProperty("top"),e.itemHeight=g.getOuter("height",e.item),this.isTextUnderSlideIn?this.responsiveAlignmentTextUnder(e):this.responsiveAlignment(e)}static getConsts(){return{CSS_CLASSES:t,CSS_ANIMATION:r,SLIDE_EVENTS:o,ARROW_SIZE:n,PROGRESS_BAR_HEIGHT:a}}setNumOfItems(e){const t=this.rbox.boxes.length;e?e.forEach(e=>{const r=e.minthis.animationStartHandler(e)),TRC.dom.on(this.container,e,e=>this.animationEndHandler(e))}static getOuter(e,t){return t&&t.getBoundingClientRect()[e]}static addASvgArrow(){return`\n \n \n \n \n \n \n'\n \n'\n \n'\n `}static addASvgPlaceHolder(){return`\n \n \n \n \n \n \n `}static addArrowIcon(e,t){let r;r="ltr"===t?`\n \n \n Group 3\n \n \n \n \n \n \n \n \n \n `:`\n \n\n \n Group 3\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n `,e.insertAdjacentHTML("beforeend",r)}createControls(){this.controls=document.createElement("div"),TRC.dom.addClass(this.controls,t.TEXT_UNDER_CONTROLS);const e=Object.keys(u).map(e=>u[e]);e.forEach(e=>this[`${e}Button`]=this.createControlButton(e)),this.internalc.parentNode.insertAdjacentElement("beforeend",this.controls)}createControlButton(e){const r={back:`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,play:`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,pause:`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,forward:`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `},i=document.createElement("span");e===u.PLAY&&TRC.dom.addClass(i,t.HIDDEN),i.innerHTML=r[e];const o=this.generateControlButtonOnClick(e);return TRC.dom.on(i,"click",o),this.controls.insertAdjacentElement("beforeend",i),i}generateControlButtonOnClick(e){switch(e){case u.BACK:case u.FORWARD:return TRC.util.debounce(()=>{this.animationInProgress||(this.toggleMiddleControlButton(u.PLAY),this.slideCard(e===u.BACK?"right":"left",!0))},l,!0,this);case u.PAUSE:case u.PLAY:return this.toggleMiddleControlButton.trcBind(this,e)}}toggleMiddleControlButton(e){if(!this.animationInProgress)switch(this.playStateAnimation(p[e]),e){case u.PLAY:TRC.dom.addClass(this.playButton,t.HIDDEN),TRC.dom.removeClass(this.pauseButton,t.HIDDEN);break;case u.PAUSE:TRC.dom.addClass(this.pauseButton,t.HIDDEN),TRC.dom.removeClass(this.playButton,t.HIDDEN)}}static getDirection(e){const t=e.trc.getProperty(e.mode_name,"direction",e.propertiesOverride);return TRC.direction||t||"ltr"}static alignLabelsBox(e,t){const r="rtl"===t?i.LABELS_ALIGN_RIGHT:i.LABELS_ALIGN_LEFT;TRC.dom.addClass(e.labelsBox,i.LABELS_ALIGN),TRC.dom.addClass(e.labelsBox,r)}listenToSwipeEvents(e){const t={start:{screenX:0,screenY:0},end:{screenX:0,screenY:0}};TRC.dom.on(e,"touchstart",e=>{t.start={screenX:e.changedTouches[0].screenX,screenY:e.changedTouches[0].screenY}}),TRC.dom.on(e,"touchend",r=>{t.end={screenX:r.changedTouches[0].screenX,screenY:r.changedTouches[0].screenY},this.handleGesture(e,t)})}handleGesture(e,t){const{start:r,end:i}=t,o=e.getBoundingClientRect(),{width:n,height:s}=o,a=(i.screenX-r.screenX)/n,l=(i.screenY-r.screenY)/s,c=.25;return a>l&&a>c?this.slideCard("right",!0):a{0===i&&(e.item=r);const o=r.querySelector(".thumbBlock_holder");o&&o.insertAdjacentHTML("afterbegin",`${g.addASvgPlaceHolder()}`);const n=g.getOuter("height",r);r.style.top=0,n>e.itemHeight&&(e={itemHeight:n,item:r}),this.isTouchDevice&&this.listenToSwipeEvents(r.querySelector(`.${t.IMAGE_HOLDER}`))}),e}responsiveAlignment(e){const{progressBar:t,arrows:r,clickedAreas:i}=this;e.item.style.top=0,this.calcImageHeight(),e.itemHeight>0&&(this.internalc.style.height=`${e.itemHeight}px`);const o=this.items[0];let l=0;o&&o.pre_detail_order&&o.pre_detail_order.length>0&&(l+=g.getOuter("height",o.preLabelsBox));const c=`${this.imageHeight-a+l}px`;t.firstChild.style.top=0,t.style.top=this.isTouchDevice?`${l}px`:c,r.forEach(e=>{e.style.top=`${(this.imageHeight+l)/2-n/2}px`}),i.forEach(e=>{e.style.width=`${this.imageWidth*s}px`})}responsiveAlignmentTextUnder(e){const{controls:t,clickedAreas:r}=this;e.item.style.top=0,this.calcImageHeight();let i=0;this.items.forEach(e=>{const t=g.getOuter("height",e.querySelector(".video-label-box"));i0&&(this.internalc.style.height=`${e.itemHeight+i+h}px`);let o=.25;const n=parseInt(this.imageHeight,10);n<=c?(o=.37,!TRC.dom.containsClass(this.container,"tbl-reco-reel-touch-device")&&TRC.dom.addClass(this.container,"tbl-reco-reel-touch-device"),TRC.dom.removeClass(this.container,"tbl-reco-reel-desktop")):(!TRC.dom.containsClass(this.container,"tbl-reco-reel-desktop")&&TRC.dom.addClass(this.container,"tbl-reco-reel-desktop"),TRC.dom.removeClass(this.container,"tbl-reco-reel-touch-device")),t.style.top=`${n-n*o}px`,this.isTouchDevice&&r.forEach(e=>{e.style.width=`${this.imageWidth*s}px`})}static calcLabelsTopByDetailsOrder(e){const t=e.querySelector(i.LABELS_BOX),r=TRC.dom.isDesktop();let o=r?d:h;const n=t.children;for(let s=0;s0?o-=r:e.style.display="none"}return r&&o!==d||!r&&o!==h?o:""}static insertBrandingBackground(e){const t=e.querySelector(i.LABELS_BRANDING);TRC.dom.addClass(t,"tbl-branding-on-top");const r=``;t.insertAdjacentHTML("beforeend",r)}addLabelsBoxAnimatedElements(){this.items.forEach(e=>{const t=e.querySelector(i.LABELS),r=g.calcLabelsTopByDetailsOrder(e);if(r){const t=e.querySelector(i.LABELS_BOX);t.style.top=`${r}px`,g.insertBrandingBackground(e)}const o=`\n \n \n `;t.insertAdjacentHTML("beforeend",o)})}playStateAnimation(e){const{activePB:t,showItem:r}=this.state,i=r.querySelector(".thumbBlock"),o=t.firstChild;o&&(o.style.webkitAnimationPlayState=e,o.style.animationPlayState=e),i&&(i.style.webkitAnimationPlayState=e,i.style.animationPlayState=e)}createProgressBar(){const e=document.createElement("div");e.className=t.PROGRESS_BAR_OVERFLOW_WRAPPER;const r=document.createElement("div");return r.className=t.PROGRESS_BAR_WRAPPER,"under"===this.thumbnailPosition&&TRC.dom.addClass(r,t.PROGRESS_BAR_WRAPPER_TEXT_OVER),r.insertAdjacentHTML("afterbegin",this.createProgressUnits()),this.progressBars=Array.prototype.slice.call(r.childNodes),this.state.activePB=this.progressBars[0],e.appendChild(r),e}createProgressUnits(){let e="";for(let r=0;this.amountOfItems>r;r++)e+=``;return`${e}`}createArrowBtns(){return["left","right"].map(e=>{const r=document.createElement("div");return r.className=`${t.ARROW_BUTTON} tbl-arrow-${e}`,r.insertAdjacentHTML("beforeend",g.addASvgArrow()),TRC.dom.on(r,"click",this.slideCard.trcBind(this)),this.internalc.parentNode.appendChild(r),r})}createMobileClickedArea(){return[u.BACK,u.FORWARD].map(e=>{const r=document.createElement("div");r.style.height=`${this.calcImageHeight()}px`;const i=this.isTextUnderSlideIn?this.generateControlButtonOnClick(e):this.slideCard.trcBind(this);return r.className=`${t.CLICKABLE_AREA} tbl-clickable-area-${e}`,TRC.dom.on(r,"click",i),this.internalc.parentNode.appendChild(r),r})}startTheReel(){if(this.isImageHeightChanged()&&this.allowRecalculateSize){this.allowRecalculateSize=!1;const e=this.calcCardHeight();this.recalculateWidgetSize(e)}this.active=!0,this.restartAnimation()}isImageHeightChanged(){const{imageHeight:e}=this;return this.calcImageHeight(),e!==this.imageHeight}stopTheReel(){this.active=!1}restartAnimation(){setTimeout(()=>{this.isTextUnderSlideIn&&this.calcLabelBoxSizes(),this.updateItem(),this.updateCarouselIteration("left")})}slideCard(e,t){if(this.disableClickEvents)return!1;const r=g.resolveAnimationDirection(e,t),{showItem:i}=this.state;return TRCImpl.sendAbTestEvent("recommendation-reel",`click_${"left"===r?"right":"left"}`),this.isTextUnderSlideIn?this.hideAnimatedLabelBox(i,this.updateIteration.trcBind(this,r)):this.updateIteration(r),!0}static resolveAnimationDirection(e,r){let i;return i=r?e:TRC.dom.containsClass(e.currentTarget,t.ARROW_BUTTON)?TRC.dom.containsClass(e.currentTarget,"tbl-arrow-left")?"right":"left":TRC.dom.containsClass(e.currentTarget,t.CLICKABLE_AREA)&&TRC.dom.containsClass(e.currentTarget,"tbl-clickable-area-back")?"right":"left"}updateIteration(e){e=e||"left",this.debugWidget&&this.debugSlider();let r=1;const{showNextItem:i,currentPosition:o}=this.state;if("right"===e){let e;TRC.dom.removeClass(i,t.NEXT_ITEM),o?(r=-1,e=o-1):e=r=this.amountOfItems-1,TRC.dom.addClass(this.items[e],t.NEXT_ITEM)}const n=+o+r===this.amountOfItems?0:o+r;this.setState({showPosition:n,nextShowPosition:Number(n+1)===this.amountOfItems?0:n+1}),this.updateCarouselIteration(e)}setState({showPosition:e,nextShowPosition:t}){const r=this.items[e],i=this.items[t],o=this.progressBars[e];return this.state={previousItem:this.state.showItem,showItem:r,showNextItem:i,activePB:o,previousPosition:this.state.currentPosition,currentPosition:e}}isFirstIteration(){return null===this.state.previousPosition}updateCarouselIteration(e){if(!this.active)return;const{REMOVE_LEFT:r,REMOVE_RIGHT:i}=t,o="left"===e?r:i,{previousPosition:n}=this.state;!this.isFirstIteration()&&this.slideAnimation(o),this.updateProgressBar(),this.progressBars.length-1===n&&(this.finishFirstCycle=!0)}debugSlider(){const e={},r=["SHOW_ITEM","NEXT_ITEM","REMOVE_LEFT","REMOVE_RIGHT","ZOOM_IN"];this.items.forEach((i,o)=>{e[`item_${o}`]={},Object.keys(t).forEach(i=>{-1!==r.indexOf(i)&&(e[`item_${o}`][i]=TRC.dom.containsClass(t[i])?"X":null)})}),console.log(`%c card ${this.container.dataset.cardIndex}`,`background: #5${10*this.container.dataset.cardIndex}; color: white`),console.table(e)}slideAnimation(e=t.REMOVE_LEFT){const r=this.state.previousPosition,i=this.items[r];TRC.dom.addClass(i,e)}updateProgressBar(){const{activePB:e,currentPosition:r,previousPosition:i}=this.state;this.isFirstIteration()||TRC.dom.removeClass(this.progressBars[i].firstChild,t.PROGRESS_ANIM),TRC.dom.addClass(e.firstChild,t.PROGRESS_ANIM),this.progressBars.forEach((e,t)=>{e.firstChild.style.left=r>t?"0":"-100%"})}updateItem(){const{showItem:e,showNextItem:r,currentPosition:i}=this.state;this.clearThePreviousItem(),document.querySelector(`.${t.SHOW_ITEM}`)&&this.clearAll(),TRC.dom.addClass(e,`${t.SHOW_ITEM} ${t.ZOOM_IN}`),TRC.dom.removeClass(e,t.NEXT_ITEM),TRC.dom.addClass(r,t.NEXT_ITEM),this.finishFirstCycle||TRCImpl.sendAbTestEvent("recommendation-reel",`Visible_${i+1}`)}clearThePreviousItem(){const{previousItem:e}=this.state;return!!e&&(g.clearClassNames(e),!0)}clearAll(){this.items.forEach(e=>(g.clearClassNames(e),!0))}static clearClassNames(e){TRC.dom.removeClass(e,t.SHOW_ITEM),TRC.dom.removeClass(e,t.REMOVE_LEFT),TRC.dom.removeClass(e,t.REMOVE_RIGHT),t.ZOOM_IN&&TRC.dom.removeClass(e,t.ZOOM_IN)}calcLabelBoxSizes(){requestAnimationFrame(()=>{this.items.forEach(e=>{const t=e.querySelector(".item-label-href .video-title"),r=e.querySelector(".item-label-href .tbl-ui-line-wrapper"),i=e.querySelector(".item-label-href .tbl-text-under-title-background-wrapper"),o=getComputedStyle(t);e.titleElemsAndSizes={line:r,background:i,titleHeight:`${parseInt(o.height,10)+20}px`,titleWidth:`${parseInt(o.width,10)+20}px`}}),this.items.forEach(e=>{const{line:t,background:r,titleHeight:i,titleWidth:o}=e.titleElemsAndSizes;t&&(t.style.height=i),r&&(r.style.height=i,r.style.width=o)})})}static getLabelBoxElements(e){return{href:e.querySelector(".item-label-href"),title:e.querySelector(".item-label-href .video-title"),background:e.querySelector(".item-label-href .tbl-text-under-title-background"),branding:e.querySelector(".item-label-href .branding"),description:e.querySelector(".item-label-href .video-description"),line:e.querySelector(".item-label-href .tbl-ui-line")}}showAnimatedLabelBox(e){const r=g.getLabelBoxElements(e);Object.keys(r).forEach(e=>{TRC.dom.removeClass(r[e],t.LABEL_SHOW)}),r.href&&(r.href.style.zIndex="2"),TRC.dom.addClass(r.line,t.LABEL_SHOW),setTimeout(()=>{TRC.dom.addClass(r.background,t.LABEL_SHOW),TRC.dom.addClass(r.branding,t.LABEL_SHOW),TRC.dom.addClass(r.description,t.LABEL_SHOW),setTimeout(()=>{TRC.dom.addClass(r.title,t.LABEL_SHOW),this.animationInProgress=!1},l)},l)}hideAnimatedLabelBox(e,r){if(this.animationInProgress)return;this.animationInProgress=!0;const i=g.getLabelBoxElements(e);TRC.dom.removeClass(i.title,t.LABEL_SHOW),setTimeout(()=>{TRC.dom.removeClass(i.background,t.LABEL_SHOW),TRC.dom.removeClass(i.branding,t.LABEL_SHOW),TRC.dom.removeClass(i.description,t.LABEL_SHOW),setTimeout(()=>{TRC.dom.removeClass(i.line,t.LABEL_SHOW),setTimeout(()=>{i.href&&(i.href.style.zIndex="-1"),r()},l)},l)},l)}animationStartHandler(e){if(this.isTextUnderSlideIn){const{showItem:t}=this.state;e.animationName===r.PROGRESS_BAR_ANIMATION&&this.showAnimatedLabelBox(t)}-1!==o.indexOf(e.animationName)&&(this.disableClickEvents=!0)}animationEndHandler(e){if(e.animationName===r.PROGRESS_BAR_ANIMATION)if(this.disableClickEvents=!1,this.isTextUnderSlideIn){const{showItem:e}=this.state;this.hideAnimatedLabelBox(e,this.updateIteration.trcBind(this))}else this.updateIteration();-1!==o.indexOf(e.animationName)&&(this.disableClickEvents=!1,this.updateItem())}}TRC.RecommendationReel=g}();var recommendationReel_es6=TRC.RecommendationReel;(()=>{const e="Feed - Explore More",t="api::render",r=5,i=1,o="2500px",n={threshold:0,disableCheckOverlay:!0,root:null};class s{constructor(e){this.trcManager=e,this.cardsCounters={},this.lazyBatches={},this.init()}init(){this.isLazyRenderEnabled="boolean"==typeof this.isLazyRenderEnabled?this.isLazyRenderEnabled:this.checkLazyRenderEnabled(),this.isLazyRenderEnabled&&this.setLazyConfig()}checkLazyRenderEnabled(){const{global:e,yieldingEnabled:t,framework:r}=this.trcManager,i=!(!e||!e["lazy-render-enable"]),o=!t,n=!r,s=!TRC.dom.isInIframe(!0);return i&&o&&n&&s}setLazyConfig(){const t=this.trcManager.global["lazy-render"]||{},{excPlc:r,sbKill:i,dispatchPlacements:o,raKill:n}=t;this.lazyConfig={excludePlacements:TRC.util.isArray(r)?r:[e],sbKill:TRC.util.isTrue(i),dispatchPlacements:s.getDispatchPlacements(o),raKill:TRC.util.isTrue(n)},this.lazyConfig.sbKill&&(TRC.pageLevelFeaturesManager.pageLevelFeatures.sb_kill=!0),this.placementsConfigs={},__trcCopyProps(s.proxyPlacementLevelConfigs(t),this.lazyConfig)}getPlacementConfig(e,t){const{unifiedPlacement:r}=t;return this.isFppEnabled(r)&&this.placementsConfigs[r][e]||this.lazyConfig[e]}setPlacementsConfig(e){e&&Object.keys(e).forEach(t=>{this.placementsConfigs[t]=s.proxyPlacementLevelConfigs(e[t])})}static proxyPlacementLevelConfigs(e){const{enable:t,rootMargin:n,minCards:s,maxBatch:a,fullLazyBatch:l,dispatchEnabled:c}=e;return{enable:TRC.util.isTrue(t),minCards:TRC.util.isNumber(s)?parseInt(s,10):r,maxBatch:TRC.util.isNumber(a)?parseInt(a,10):i,rootMargin:"string"==typeof n&&n.indexOf("px")>1?n:o,fullLazyBatch:TRC.util.isTrue(l),dispatchEnabled:TRC.util.isTrue(c)}}static getDispatchPlacements(e){return Array.isArray(e)?e:"string"==typeof e?__trcUnJSONify(e):[]}static hasVideo(e){if(e.trcResponse&&e.trcResponse.vtag)return!0}isLazyBatch(e,t){return!!(this.getPlacementConfig("maxBatch",t)>=e||t.isCache)}addResponse(e){const t=e.trc.vl;this.onePlacementRendered=!1,e.trc.f?this.updateCardsCounters(t):this.onePlacementRendered=!0}updateCardsCounters(e){e.forEach(e=>{if(e.fb){const{uuip:t,fb:r}=e;this.cardsCounters[t]=this.cardsCounters[t]||{},this.cardsCounters[t][r]=this.cardsCounters[t][r]?++this.cardsCounters[t][r]:1}})}placementRender(e){(void 0!==e.container||e.addWidget)&&(this.trcManager.yieldingEnabled?this.yieldRenderer(e):this.isLazyRenderEnabled&&this.isLazyPlacement(e)?this.lazyRenderer(e):this.standardRenderer(e))}getBatchThreshold(e,t){const{uiBatchNumberCounter:r,parentPlacementData:i}=e;if(this.isValidLazyPlacement(i)&&this.isLazyBatch(r,i)){const e=this.getNumberOfCards(i.unifiedPlacement,r),o=this.getPlacementConfig("minCards",i);return e&&e>o?Math.floor(t*o/e):t}return t}getNumberOfCards(e,t){try{return this.cardsCounters[e][t]}catch(r){return __trcError(`failed to get number of cards for lazy rendering :- ${e} | ${t}`),0}}isValidLazyPlacement(e){const{unifiedPlacement:t,placement:r}=e,i=t||r;if(s.hasVideo(e))return!1;if(e.isStories){const t=this.trcManager.storiesManager.stories[e.parentStories.unifiedPlacementName];if(t.isFirstCardRendered)return t.isFirstCardRendered=!0,!1}if(this.isFppEnabled(i))return!0;if(this.isFppDisabled(i)||!this.lazyConfig.enable)return!1;const o=this.lazyConfig.excludePlacements.indexOf(i)>-1,n=!(!e.trcResponse||!e.trcResponse.nup);return!n&&!o}isFppEnabled(e){const t=this.placementsConfigs[e];return!(!t||!TRC.util.isTrue(t.enable))}isFppDisabled(e){const t=this.placementsConfigs[e];return!(!t||!TRC.util.isFalse(t.enable))}yieldRenderer(e){this.trcManager.loadRBoxDrawQueue(e)}standardRenderer(e){this.onePlacementRendered=!1,this.trcManager.internalDrawRBox(e)}static getRootElement(e){return e.parentFeed&&e.parentFeed.infiniteScrollEngine.observerScrollElement.children?e.parentFeed.infiniteScrollEngine.observerScrollElement:null}lazyRenderer(e){const t=this.getPlacementConfig("minCards",e),{unifiedPlacement:r}=e;if(void 0===r||e.modeGroupOrder>t){const t=this.getPlacementConfig("fullLazyBatch",e),{dispatchPlacements:i}=this.lazyConfig,o=this.getPlacementConfig("dispatchEnabled",e)||i.indexOf(r)>-1;o?this.dispatchPlacements(e):r&&t&&this.lazyBatches[r]?this.pushLazyBatchPlacement(e):this.setObserverParams(e),this.trcManager.global["send-eager-available-for-lazy-placements"]&&TRC.availableEventCoordinator.get(this.trcManager).sendAvailableEventsForPlacement(e)}else this.standardRenderer(e)}dispatchPlacements(e){this.pushLazyBatchPlacement(e),this.listener||(this.listener=TRC.listen("render-placement",e=>{this.lazyRenderBatch(e.placement,e.cb)}))}setObserverParams(e){const t=this.getObserverConfig(e),r=TRC.IntersectionObserver?new TRC.IntersectionObserver(t.onEnter,t.observerParams):new IntersectionObserver(t.onEnter,t.observerParams);r.observe(e.container)}isLazyPlacement(e){return!(this.onRenderApiKill()||this.onePlacementRendered||!e.container||!this.isValidLazyPlacement(e))&&(!e.trcResponse.fb||this.isLazyBatch(e.trcResponse.fb,e))}onRenderApiKill(){const e=TRC.getEventsMap()[t];return!!(this.lazyConfig.raKill&&Array.isArray(e)&&e.length>0)}pushLazyBatchPlacement(e){const t=this.lazyBatches[e.unifiedPlacement];t?this.lazyBatches[e.unifiedPlacement].push(e):this.lazyBatches[e.unifiedPlacement]=[e]}lazyRenderBatch(e,t){const r=this.lazyBatches[e];r&&(r.forEach(e=>this.standardRenderer(e)),delete this.lazyBatches[e]),t&&t()}getObserverConfig(e){let t;const r=__trcCopyProps(n,{});return r.root=s.getRootElement(e),r.rootMargin=this.getPlacementConfig("rootMargin",e),this.getPlacementConfig("fullLazyBatch",e)?(this.pushLazyBatchPlacement(e),t=this.lazyRenderBatch.trcBind(this,e.unifiedPlacement)):t=this.trcManager.internalDrawRBox.trcBind(this.trcManager,e),{targetElement:e.container,observerParams:r,onEnter:(r,i)=>{r[0].isIntersecting&&(t(),i.unobserve(e.container))}}}}TRC.RenderControl=s})(),(()=>{const e="tbl_rtus_id",t=1,r=2,i=42,o=91,n="RealTimeUserSyncMain",s="RealTimeUserSyncCallback";class a{constructor(e){this.trc=e,this.localStorage=e.pageManager.getLocalStorageImplementation()}applyRtus(){this.trc.ccpaPs?(this._log("ccpaPushTriggerRtus"),this._validateCcpaConsentAndCallRtusWithCcpaParams(this.trc.ccpaPs)):"function"==typeof window.__uspapi?this._applyRtusWithCcpa():"function"==typeof window.__tcfapi?this._applyRtusWithGdpr():"function"==typeof window.__cmp?this._log("gdprV1"):(this._log("default"),this._triggerRtusCall(""))}_applyRtusWithCcpa(){window.__uspapi("getUSPData",t,(e,t)=>{try{t?(this._log("ccpaApiTriggerRtus"),this._validateCcpaConsentAndCallRtusWithCcpaParams(e.uspString)):this._log("ccpaApiFail")}catch(e){this._log("ccpaApiError")}})}_validateCcpaConsentAndCallRtusWithCcpaParams(e){if("Y"===e.charAt(2))return;const t=`&us_privacy=${e}&gdpr=0&gdpr_consent=&gdpr_pd=`;this._triggerRtusCall(t)}_applyRtusWithGdpr(){window.__tcfapi("getTCData",r,(e,t)=>{try{t?TRC.Rtus.shouldCallRtusWithGdprParams(e)?(this._log("gdprV2triggerRtus"),this._callRtusWithGdprParams(e)):this._log("gdprV2notTriggerRtus"):this._log("gdprV2fail")}catch(e){this._log("gdprV2error")}},[i,o])}static shouldCallRtusWithGdprParams(e){return TRC.Rtus.isGdprNotApplies(e)||TRC.Rtus.hasConsent(e)}static isGdprNotApplies(e){return!e.gdprApplies}static hasConsent(e){const{consents:t}=e.vendor||{};return t[i]&&t[o]}_callRtusWithGdprParams(e){const t=`&us_privacy=&gdpr=${e.gdprApplies?1:0}&gdpr_consent=${e.tcString}&gdpr_pd=0`;this._triggerRtusCall(t)}_triggerRtusCall(t){const r="getRTUS",i=`//gum.criteo.com/sync?c=72&r=2&j=TRC.${r}${t}`;this._setRtusCallback(r),this.trc.performance&&this.trc.performance.mark(`${n}Start`,null,n,0,n,this.trc.PerfEvenType.START),this.trc.performance&&this.trc.performance.mark(`${s}Start`,null,s,0,s,this.trc.PerfEvenType.START);try{this.trc.net.loadScript(i,"js",null,null,!0),this.trc.pConsole("page","info","injected RTUS service")}catch(e){__trcWarn("Error during RTUS loading asset file: ",e)}try{this.trc.rtbRealTimeUserId=this.localStorage.getValue(e)}catch(e){__trcWarn("Error during fetching RTUI from local storage: ",e)}}_setRtusCallback(t){this.trc[t]=(t=>{try{this.trc.performance&&this.trc.performance.mark(`${s}Stop`,null,s,0,s,this.trc.PerfEvenType.STOP);const{status:r,userid:i}=t||{};"OK"===r?(this.trc.rtbRealTimeUserId=i,this.localStorage.setValue(e,i)):(this.trc.rtbRealTimeUserId=null,this.localStorage.removeKey(e))}catch(e){__trcWarn("Error during RTUS callback: ",e)}})}_log(e){this.trc.RBoxUsage.logUsage("rtus",{file:"rtus.js",method:"injectRtus",position:e})}}TRC.Rtus=a})(),TRC.ScriptRenderer={render(e,t){e&&e.js?(e.normalizedTag=TRC.text.htmlUnescape(e.js),this.renderInIframe(this.createIframe(t.container),e)):__trcError("could not find script to render")},createIframe(e){if(!e)return void __trcError("could not find container to create Iframe within");const t=document.createElement("iframe");return t.style.border=t.frameBorder=t.border="0",t.style.display="block",t.scrolling="no",e.appendChild(t),t},renderInIframe(e,t){if(!e)return void __trcError("could not find iframe to render within");let r=e.contentWindow||e.contentDocument;r.document&&(r=r.document),this.setOuterIframeStyle(e,t),this.runTagInIframe(r,t.normalizedTag),this.resetStyleInIframe(r)},setOuterIframeStyle(e,t){e.style.width=t.w||"0px",e.style.height=t.h||"0px"},runTagInIframe(e,t){void 0!==t&&null!==t?(e.open(),e.write(t),e.close()):__trcError("could not find normalizedTag to render")},resetStyleInIframe(e){const t=e.createElement("style"),r="body { margin: 0px }";t.type="text/css",t.styleSheet?t.styleSheet.cssText=r:t.appendChild(e.createTextNode(r)),e.getElementsByTagName("head")[0].appendChild(t)}},(()=>{function e(e){try{const t=e.ks.pl||[];if(!e||!e.ks||!t.length)return!1;const r=TRC.URL.prototype.getParameter.call(location.href,"tbl_force_taboola",!1);return!(parseInt(r,10)||"true"===r)}catch(e){return!1}}function t(e){const t=TRCImpl.global[`organic-personalization-placements-${TRC.publisherId}`]||[];if(!TRC.opDisabled||!t.length)return!1;const i=t.split("#");return r(i,e)}function r(e,t){let r=!1;return-1!==e.indexOf(t)||(e.forEach(e=>{if(TRC.text.isEndWith(e,"$")){const i=new RegExp(e);i.test(t)&&(r=!0)}}),r)}function i(t,i){return!!e(i)&&r(i.ks.pl,t)}function o(e,r){try{const o=e.fpl,n=e.uip,s=n||o;return i(s,r)||t(s)}catch(e){__trcError("SectionFront personalization killSwitchEnabled Error",e)}return!1}TRC.opDisabled=TRC.opDisabled||!1,TRC.personalizationApi={killSwitchEnabled:o}})(),function(e,t){TRC.SpotlightLoader={load:function(e){this.shouldLoad(e)&&(this.loadedScript?TRC.dispatch("trc_afterRboxDraw"):(__trcDebug("Detected Spotlight Administrator("+e.trc["pi"]+")"),TRC.backstageDomainPrefix=e.trc["bdp"],TRC.backstageDomainSuffix=e.trc["bds"],this.loadedScript=TRC.URL.prototype.switchProtocol.call(TRC.getBackstageUrl()+"resources/js/1.1.0/spotlight.js",TRC.PROTOCOL),TRC.Manager.prototype.loadExternal(this.loadedScript,"js")))},shouldLoad:function(e){return!(!t.querySelectorAll||TRC.Device.isTouchDevice||!e||!e.trc||"1"!=e.trc["sl"])},registerOnMainContainer:function(e,t){e&&this.shouldLoad(t)&&e.setAttribute("data-spotlight-publisher-id",t.trc["pi"])}}}(window,document),(()=>{class e{constructor(e,t){this._createInstanceList(e,t)}_createInstanceList(e,t){if(TRC[t]||__trcError(`${t} does not exist under TRC`,null),TRC[t].instances){if(TRC[t].instances[e])throw new Error("instance already exists under this uniqueid");return void(TRC[t].instances[e]=this)}const r=function(e){return TRC[this].instances?TRC[this].instances[e]:null};TRC[t].instances={},TRC[t].getInstance=r.bind(t),TRC[t].instances[e]=this}}TRC.StoriesBase=e})(),TRC.listen("stories-initiation",()=>{const e={CAROUSEL_ANIMATION:"bouncing-animation",CAROUSEL_CONTAINER:"tbl-stories-carousel-container",CAROUSEL_TOPICS_WRAPPER:"tbl-stories-topics-wrapper",CAROUSEL_TOPIC_CONTAINER:"tbl-stories-topics-container",CAROUSEL_TOPIC_IMAGE_WRAPPER:"tbl-stories-topic-image-wrapper",CAROUSEL_TOPIC_TITLE:"tbl-stories-topic-title",CAROUSEL_TOPIC_IMAGE:"tbl-stories-topic-image",CAROUSEL_TOPIC_CLICK_LOADING:"tbl-stories-topic-loading",CAROUSEL_ONBOARDING:"tbl-stories-onboarding",CAROUSEL_ONBOARDING_STATIC:"tbl-stories-onboarding-static",CAROUSEL_READY:"tbl-stories-carousel-ready"},t={CATEGORIES_DISPLAYED:"categoriesDisplayed"},r={cs:"#4472c4",ce:"#00b5d9"},i={TOPIC_CLICKED:"topic-click"},o={LONG_VISIBLE_TIMEOUT:3e3,ON_BOARDING_TEXT:"New! Click to view visual Stories",ON_BOARDING_COLOR:"#2676F7",ON_BOARDING_FIRST_WORDS:1};class n extends TRC.StoriesBase{constructor(e,t){super(e,"StoriesCarousel");try{this.unifiedPlacementName=e,this.eventsManager=TRC.StoriesEventsManager.getInstance(e),this.options=this.getCarouselOptions(),this.injectCarouselStyle(),this.createCarouselLayout(),this.setStickyStories(t),this.eventsManager.observeCarousel(this)}catch(e){this.eventsManager.onError(`StoriesCarousel instance`,e)}}injectCarouselStyle(){const{onBoardingColor:e,extendedStyle:t}=this.options;TRC.dom.injectStyle(`.tbl-stories-carousel-container { box-sizing: initial; float: initial; padding: initial; width: initial; vertical-align: initial; border: initial; }.tbl-stories-carousel-container .tbl-stories-topic-image { top: 0; left: 0; bottom: 0; right: 0; }.bouncing-animation > li { transform: translateY(-100%); -webkit-animation: bouncingDown 1s ease-in-out 1s forwards; -moz-animation: bouncingDown 1s ease-in-out 1s forwards; -ms-animation: bouncingDown 1s ease-in-out 1s forwards; -o-animation: bouncingDown 1s ease-in-out 1s forwards; animation: bouncingDown 1s ease-in-out 1s forwards; }.bouncing-animation > li:nth-child(1) { -webkit-animation: bouncingDown 1s ease-in-out 0.1s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.1s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.1s forwards; -o-animation: bouncingDown 1s ease-in-out 0.1s forwards; animation: bouncingDown 1s ease-in-out 0.1s forwards; }.bouncing-animation > li:nth-child(2) { -webkit-animation: bouncingDown 1s ease-in-out 0.2s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.2s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.2s forwards; -o-animation: bouncingDown 1s ease-in-out 0.2s forwards; animation: bouncingDown 1s ease-in-out 0.2s forwards; }.bouncing-animation > li:nth-child(3) { -webkit-animation: bouncingDown 1s ease-in-out 0.3s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.3s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.3s forwards; -o-animation: bouncingDown 1s ease-in-out 0.3s forwards; animation: bouncingDown 1s ease-in-out 0.3s forwards; }.bouncing-animation > li:nth-child(4) { -webkit-animation: bouncingDown 1s ease-in-out 0.4s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.4s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.4s forwards; -o-animation: bouncingDown 1s ease-in-out 0.4s forwards; animation: bouncingDown 1s ease-in-out 0.4s forwards; }.bouncing-animation > li:nth-child(5) { -webkit-animation: bouncingDown 1s ease-in-out 0.5s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.5s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.5s forwards; -o-animation: bouncingDown 1s ease-in-out 0.5s forwards; animation: bouncingDown 1s ease-in-out 0.5s forwards; }.bouncing-animation > li:nth-child(6) { -webkit-animation: bouncingDown 1s ease-in-out 0.6s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.6s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.6s forwards; -o-animation: bouncingDown 1s ease-in-out 0.6s forwards; animation: bouncingDown 1s ease-in-out 0.6s forwards; }.bouncing-animation > li:nth-child(7) { -webkit-animation: bouncingDown 1s ease-in-out 0.7s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.7s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.7s forwards; -o-animation: bouncingDown 1s ease-in-out 0.7s forwards; animation: bouncingDown 1s ease-in-out 0.7s forwards; }.bouncing-animation > li:nth-child(8) { -webkit-animation: bouncingDown 1s ease-in-out 0.8s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.8s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.8s forwards; -o-animation: bouncingDown 1s ease-in-out 0.8s forwards; animation: bouncingDown 1s ease-in-out 0.8s forwards; }.bouncing-animation > li:nth-child(9) { -webkit-animation: bouncingDown 1s ease-in-out 0.9s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.9s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.9s forwards; -o-animation: bouncingDown 1s ease-in-out 0.9s forwards; animation: bouncingDown 1s ease-in-out 0.9s forwards; }.bouncing-animation > li:nth-child(10) { -webkit-animation: bouncingDown 1s ease-in-out 1s forwards; -moz-animation: bouncingDown 1s ease-in-out 1s forwards; -ms-animation: bouncingDown 1s ease-in-out 1s forwards; -o-animation: bouncingDown 1s ease-in-out 1s forwards; animation: bouncingDown 1s ease-in-out 1s forwards; }.tbl-stories-carousel-container { position: relative; overflow: hidden; } .tbl-stories-carousel-container .tbl-stories-topics-wrapper { overflow-y: hidden; overflow-x: scroll; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; margin: 0; padding: 0 5px; z-index: 0; } .tbl-stories-carousel-container .tbl-stories-topics-wrapper::-webkit-scrollbar { display: none; } .tbl-stories-carousel-container .tbl-stories-topics-container { list-style: none; text-align: center; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; width: 72px; position: relative; } .tbl-stories-carousel-container .tbl-stories-topic-image-wrapper { height: 64px; width: 64px; position: relative; left: 0; top: 0; border-radius: 32px; margin: 0 4px; z-index: 0; } .tbl-stories-carousel-container .tbl-stories-topic-image-wrapper svg { vertical-align: inherit; fill: transparent; } .tbl-stories-carousel-container .tbl-stories-topic-title { position: relative; bottom: 0; left: 0; width: 100%; font-size: 12px; font-weight: normal; font-style: normal; display: block; padding: 4px 0 0; word-break: break-word; word-wrap: break-word; } .tbl-stories-carousel-container .tbl-stories-topic-loading svg { animation: tbl-stories-rotate 2s infinite linear; -webkit-animation: tbl-stories-rotate 2s infinite linear; } .tbl-stories-carousel-container .tbl-stories-topic-loading .tbl-stories-topic-image { filter: grayscale(100%); } .tbl-stories-carousel-container .tbl-stories-onboarding { position: absolute; opacity: 0; background-color: ${e}; color: #fcfcfc; padding: 0 15px; z-index: 1; right: 0; -webkit-transform: translateX(-100vh); -ms-transform: translateX(-100vh); transform: translateX(-100vh); border-radius: 16px 0 0 16px; font-size: 12px; height: 30px; line-height: 30px; top: 0; } .tbl-stories-carousel-container .tbl-stories-onboarding-static { position: relative; font-size: 14px; color: initial; padding: 5px 15px; z-index: 1; line-height: initial; overflow-y: hidden; } .tbl-stories-carousel-container .tbl-stories-topic-image { width: 60px; height: 60px; border: 2px solid #fcfcfc; position: absolute; border-radius: 50%; z-index: 1; opacity: 0; transition: opacity 1s ease-in, filter 1s ease-in; box-sizing: border-box; margin: auto; overflow: auto; } .tbl-stories-carousel-container.tbl-stories-carousel-ready .tbl-stories-topic-image { opacity: 1; } .tbl-stories-carousel-container.tbl-stories-carousel-ready .tbl-stories-onboarding { -webkit-animation: tbl-stories-onboarding-fade 6s linear; animation: tbl-stories-onboarding-fade 6s linear; -webkit-animation-delay: 2s; animation-delay: 2s; }@-webkit-keyframes tbl-stories-rotate { from { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }@keyframes tbl-stories-rotate { from { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }@-webkit-keyframes tbl-stories-onboarding-fade { 0%, 100% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0; } 10%, 90% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0.8; } }@keyframes tbl-stories-onboarding-fade { 0%, 100% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0; } 10%, 90% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0.8; } }@-webkit-keyframes bouncingDown { 0% { -webkit-transform: translateY(-100%); } 50% { -webkit-transform: translateY(10px); } 100% { -webkit-transform: translateY(0); } }@keyframes bouncingDown { 0% { transform: translateY(-100%); } 50% { transform: translateY(10px); } 100% { transform: translateY(0); } }`),t&&TRC.dom.injectStyle(t)}carouselReady(){requestAnimationFrame(()=>{TRC.dom.addClass(this.carouselContainer,e.CAROUSEL_READY),TRC.dom.addClass(this.topicsList,e.CAROUSEL_ANIMATION)})}getCarouselOptions(){const{options:e}=this.eventsManager;let{cc:t}=e.storiesUi;t||(t={});let{ob:i}=t;return i||(i={}),{extendedStyle:t.style||"",topicBorderColor:t.tc||r,onBoardingEnableTooltip:!!i.obet||!1,onBoardingColor:i.obc||o.ON_BOARDING_COLOR,onBoardingText:i.obtxt||o.ON_BOARDING_TEXT,onBoardingFirstWordsNum:i.obfwn?parseInt(i.obfwn,10):o.ON_BOARDING_FIRST_WORDS,useCloudinaryCroppingForThumbs:void 0===t.clcrt||TRC.util.isTrue(t.clcrt),visibleDuration:t.vsd?parseInt(t.vsd,10):o.LONG_VISIBLE_TIMEOUT,stickyStories:t.stcy,randomTopicImage:t.rndTpcImage||""}}createCarouselLayout(){this.carouselContainer=TRC.dom.createHTMLElement("nav",{className:e.CAROUSEL_CONTAINER}),this.topicsList=TRC.dom.createHTMLElement("ul",{className:e.CAROUSEL_TOPICS_WRAPPER}),this.carouselContainer.insertAdjacentHTML("afterbegin",this.getOnBoarding()),this.carouselContainer.appendChild(this.topicsList)}addTopic(e){this.topicsList.insertAdjacentElement("beforeend",this.getTopicElement(e))}getTopicElement({id:t,imageUrl:r,title:i,slotPosition:o}){const n=TRC.dom.createHTMLElement("li",{className:e.CAROUSEL_TOPIC_CONTAINER,topicName:i,topicPosition:o,topicId:t}),s=`\n \n ${this.getBorderTopic()}\n `,a=`${i}`;return n.insertAdjacentHTML("afterbegin",`${s}${a}`),TRC.CustomModulesManager.runHook("stories-topic-rendered",null,this,t,n,i),TRC.dom.on(n,"click",this.carouselTopicClickHandler.trcBind(this,t)),this.eventsManager.observeCarouselTopic(n),n}carouselTopicClickHandler(e,r){const o=TRC.Stories.getInstance(this.unifiedPlacementName),s=o.topics[e],{videoTag:a}=o.options;n.clickOnCarouselTopicLoadingIndication(r.currentTarget),TRC.StoriesVerticalUi?o.renderVerticalUiPlacements(s):TRC.listen("vertical-ui-loaded",o.renderVerticalUiPlacements.trcBind(o,s));const l=s.title,c=s.slotPosition;this.eventsManager.sendEvent(i.TOPIC_CLICKED,{ab:[l,c],mxp:{topicName:l,topicPosition:c}}),a&&TRC.StoriesVideoManager&&TRC.dispatch(t.CATEGORIES_DISPLAYED)}carouselSDKTopicClickHandler(e){const t=TRC.Stories.getInstance(this.unifiedPlacementName),r=t.topics[e];TRC.StoriesVerticalUi?t.renderVerticalUiPlacements(r,!0):TRC.listen("vertical-ui-loaded",t.renderVerticalUiPlacements.trcBind(t,r))}getBorderTopic(){const{topicBorderColor:e}=this.options;return` \n \n \n \n \n \n `}getImageURL(e){const{randomTopicImage:t}=this.options,r=TRC.util.isTrue(t)?Math.floor(Math.random()*e.length):0;return e.length>0?e[r].thumbnail:""}getTopicImage(e,t){const r="g_auto,c_thumb,w_128,h_128,fl_advanced_resize,e_sharpen,q_auto:best,f_auto",{useCloudinaryCroppingForThumbs:i}=this.options;let o=this.getImageURL(t);return e&&(o=e),i?TRC.imageUtils.getImageUrlBasedOnCloudinaryApi(o,r):o}static clickOnCarouselTopicLoadingIndication(t){TRC.dom.addClass(t,e.CAROUSEL_TOPIC_CLICK_LOADING),TRC.Timeout.set(()=>{TRC.dom.removeClass(t,e.CAROUSEL_TOPIC_CLICK_LOADING)},2e3)}getOnBoarding(){const{onBoardingText:t,onBoardingFirstWordsNum:r,onBoardingColor:i,onBoardingEnableTooltip:o}=this.options;if(o)return`${t}`;const[s,a]=n.getOnBoardingSliced(t,r);return`\n ${s} ${a}`}static getOnBoardingSliced(e,t){t=t<0?0:t;const r=e.split(" ");return[r.slice(0,t).join(" "),r.slice(t,r.length).join(" ")]}setStickyStories(e){this.stickyStories=null,this.options.stickyStories&&(this.stickyStories=new TRC.StoriesSticky(e,this.options.stickyStories,this.unifiedPlacementName))}}TRC.StoriesCarousel=n}),TRC.listen("stories-initiation",()=>{const e={VISIBLE:"visible",LONG_VISIBLE:"long-visible",TOPIC_VISIBLE:"topic-visible"};class t extends TRC.StoriesBase{constructor(e,t){super(t,"StoriesEventsManager"),this.options=e,this.unifiedPlacementName=t}sendLifeCycleEvents(e){try{const{responseEnd:t}=window.performance.timing,r=Date.now(),i=r-t;this.sendEvent(e,{ab:[i],mxp:{timeFromLoad:i}})}catch(e){this.onError("sendLifeCycleEvents",e)}}sendDefaultEvent(e,t,r=[]){const{topicName:i,topicPosition:o,itemPosition:n}=t,s={};r.forEach((e,t)=>{s[`extraData_${++t}`]=e}),s.topicName=i,s.topicPosition=o,s.itemPosition=n;const a={ab:[i,o,n,...r],mxp:s};this.sendEvent(e,a)}sendEvent(e,{ab:r,mxp:i}){const o=`stories-${e}`;t.sendAbEvent(o,r.join("_")),this.sendMixpanelEvent(o,i)}sendMixpanelEvent(e,t){this.options.enableMixpanel&&(window.mixpanel?TRC.Mixpanel.sendMixpanelEvent(e,t):TRC.listen("mixpanelScriptSucceeded",()=>{TRC.Mixpanel.sendMixpanelEvent(e,t)}))}static sendAbEvent(e,t){TRCImpl.sendAbTestEvent(e,t)}onError(e,t,r=__trcWarn){let i={};t?i={errorMsg:`${e} - error: ${t.message}`,errorStack:t.stack}:i.errorMsg=e,this.sendMixpanelEvent("stories-error",i),r(`stories ${i.errorMsg}`,t)}observeCarousel({carouselContainer:e,options:t}){const r=TRC.intersections.observe({targetElement:e,onEnter:()=>{this.onCarouselVisible(r,t.visibleDuration)},onExit:()=>{TRC.Timeout.clear(this.visibleTimeoutId)},threshold:.5})}onCarouselVisible(t,r){const{options:i}=TRC.Stories.getInstance(this.unifiedPlacementName);this.sendLifeCycleEvents(e.VISIBLE),this.visibleTimeoutId=TRC.Timeout.set(()=>{TRC.intersections.unobserve(t),TRC.Timeout.clear(this.visibleTimeoutId),this.sendLifeCycleEvents(e.LONG_VISIBLE),TRC.CustomModulesManager.runHook("stories-long-visible",null,this,i.storiesUi)},r)}observeCarouselTopic(t){let r;const i={targetElement:t,onEnter:({target:t})=>{TRC.intersections.unobserve(r);const{topicName:i,topicPosition:o}=t;this.sendEvent(e.TOPIC_VISIBLE,{ab:[i,o],mxp:{topicName:i,topicPosition:o}})},threshold:.5};r=TRC.intersections.observe(i)}}TRC.StoriesEventsManager=t}),TRC.listen("stories-initiation",()=>{class e extends TRC.StoriesBase{constructor(e,t){super(t,"StoriesHistoryController"),this._historyApi=TRC.historyApi,this._inactiveKey=`${e}-open`,this._activeKey=`${e}-close`,this._applyOpen=[],this._applyClose=[],this._currentArgs=[],this._reason="History controller init",this._setupEventListeners()}onOpen(e){this._applyOpen.push(e)}onClose(e){this._applyClose.push(e)}_setupEventListeners(){this._historyApi.onPopState(()=>{this.isInactive()?this._close():this.isActive()&&this._open()},{stateCheck:e=>e[this._inactiveKey]}),this.isActive()&&this.close()}isActive(){const e=this._historyApi.currentState();return e&&e[this._activeKey]}isInactive(){const e=this._historyApi.currentState();return e&&e[this._inactiveKey]}_open(){this._applyOpen.forEach(e=>e(...this._currentArgs))}open(...e){this._currentArgs=e,this._open(),this.isActive()||(this._historyApi.appendState({[this._inactiveKey]:!0}),this._historyApi.pushState({[this._activeKey]:!0}))}_close(){const e=this._reason||"Browser back";delete this._reason,this._applyClose.forEach(t=>t(e))}close(e){this._reason=e,this._historyApi.back()}}TRC.StoriesHistoryController=e}),(()=>{const e={"stories-transition-manager":!0,"stories-vertical-ui":!0},t="017c7c2cd4672abad2a2cf4d9d7fbb13";class r{constructor(e){this.trcManager=e,this.stories={},this.configs={},TRC.Stories||TRC.dispatch("stories-initiation")}static lazyLoadStoriesModules(){TRC.StoriesVerticalUi||TRC.ModuleLoader.load("stories-vertical-ui",TRC.StoriesVerticalUi,()=>{TRC.dispatch("vertical-ui-loaded")})}lazyLoadFailure(t,r){e[t.moduleFile]&&(r.forEach(e=>this.stories[e].collapseContainer()),__trcWarn(`failed to load ${t.moduleFile}, stories collapsed`))}createNewStories({s:e,cga:i},o){try{TRC.listen("module-loader-failure",t=>this.lazyLoadFailure(t,Object.keys(e))),r.lazyLoadStoriesModules(),Object.keys(e).forEach(n=>{if(this.stories[n])return void __trcWarn(`Stories already created for '${n}'`);const s=r.getOptions(e,i,n,o);s.enableMixpanel&&TRC.Mixpanel.loadMixpanelScript(t),TRC.listen("vp-selector-not-found",()=>this.stories.storiesContainerNotCreated=!0),TRC.VirtualPlacementsManager.handleVirtualPlacement(this.trcManager,n),this.stories.storiesContainerNotCreated||(TRC.CustomModulesManager.runHook("stories-init",null,this),this.stories[n]=new TRC.Stories(this.trcManager,n,s))})}catch(e){__trcWarn(`Stories - failed to create Stories Instance`,e.message)}}handleStoryPlacement(e,t){this.stories.storiesContainerNotCreated||(t.isStories=!0,t.parentStories=this.getRelevantStories(e),t.parentStories.handlePlacement(t))}getRelevantStories(e){return this.stories[e.stpl]}static getOptions(e,t,i,o){const n=e[i],s=t&&t.storiesExtendConfig&&t.storiesExtendConfig[i],a=r.parseStoriesOptionsFromResponse(n);return r.overrideOptionsConfiguration("cc",a,s),r.overrideOptionsConfiguration("vui",a,s),a.storiesPlacementsAmount=o,a}static overrideOptionsConfiguration(e,t,r){r&&r[e]&&t.storiesUi&&t.storiesUi[e]&&(t.storiesUi[e]=TRC.util.merge(t.storiesUi[e],r[e]))}static parseStoriesOptionsFromResponse({sti:e,sui:t,fv:r,st:i,vtag:o,dm:n,dir:s}=null){return{storiesProductId:e,storiesUi:t||{},enableFeedView:TRC.util.isTrue(r),injectScStrategy:i||"static",enableMixpanel:TRC.util.isTrue(n)||!0,videoTag:o,direction:s}}}TRC.StoriesManager=r})(),TRC.listen("stories-initiation",()=>{const e={STICKY_ACTIVE:"tbl-stories-sticky-active",STICKY_HIDDEN:"tbl-stories-sticky-hidden",STICKY_SCROLL_UP:"tbl-stories-sticky-scroll-direction-up",STICKY_SCROLL_DOWN:"tbl-stories-sticky-scroll-direction-down",STICKY_STYLE_ID:"tbl-sticky-style"},t={SHOW:"SHOW",HIDE:"HIDE"},r={UP:"UP",DOWN:"DOWN"},i="#fff";class o extends TRC.StoriesBase{constructor(e,t,r){super(r,"StoriesSticky"),this.storiesContainer=e,this.eventsManager=TRC.StoriesEventsManager.getInstance(r),this.feedInViewPort=!1,this.isStickyActive=!1,this.options=this.getStickyOptions(t),this.options.enabled&&(o.injectStickyStyles(this.options),this.setStickyScrollListener(),this.listenForFeedInViewPort(),void 0===this.options.topScrollDownValue&&this.setPublisherHeaderListener())}setStickyScrollListener(){this.lastScrollTop=TRC.dom.getScrollTop(window),this.initialScroll=!0,TRC.dom.on(window,"scroll",this.onScroll.trcBind(this))}setPublisherHeaderListener(){try{const e=new ResizeObserver(e=>{[].slice.call(e).forEach(e=>{const{height:t}=e.contentRect;this.options.topScrollDownValue=this.options.topScrollUpValue=`${t}px`})});e.observe(this.publisherHeaderEl)}catch(e){this.eventsManager.onError(`Error creating resizeObserver for sticky stories`,e)}}listenForFeedInViewPort(){TRC.listen("feed-present-in-viewport",({data:e})=>{this.feedInViewPort=TRC.util.isTrue(e)})}static injectStickyStyles({stickyBackgroundColor:e,zIndex:t,topScrollDownValue:r}){TRC.dom.injectStyle(`.tbl-stories-container { transition: transform 1s, top 0.5s; z-index: ${t}; } .tbl-stories-container.tbl-stories-sticky-active { background: ${e}; top: 0; position: sticky; border-bottom: 1px solid #ccc; } .tbl-stories-container.tbl-stories-sticky-hidden { top: -100%; }`)}getStickyOptions(e){const{e:t,uthrsld:r,scrldwn:o,isc:n,zi:s,bgc:a,off:l}=e,c=e.slctr||"header";this.publisherHeaderEl=document.querySelector(c),this.publisherHeaderEl||this.eventsManager.onError(`Sticky Stories header was not found on the page: ${c}`);const d=parseInt(e.thrsld||this.getHeaderComputedStyle("height"),10);return{enabled:"false"!==t&&!!this.publisherHeaderEl,zIndex:this.getZIndex(s),stickyScrollDownDepth:o?parseInt(o,10):1e3,ignoreScrollChanges:n?parseInt(n,10):30,stickyBackgroundColor:a||i,topScrollDownValue:d,topScrollUpValue:r?parseInt(r,10):d,disableStickyOffset:l}}getZIndex(e){return e?parseInt(e,10):(e=this.getHeaderComputedStyle("zIndex"),TRC.util.isNumber(e)?parseInt(e,10)-1:e)}getHeaderComputedStyle(e){if(this.publisherHeaderEl)return this._getComputedStyle||(this._getComputedStyle=getComputedStyle(this.publisherHeaderEl)),this._getComputedStyle[e]}onScroll(){requestAnimationFrame(()=>{this.toggleStoriesOnScroll()})}toggleStoriesOnScroll(){const e=TRC.dom.getScrollTop(window);if(this.shouldIgnoreScrollChanges(e))return;const t=this.getStickyScrollDirection(e),r=this.getTrigger(e,t),i=this.shouldToggleSticky(r);i&&this.toggleStickyStories(r);const o=this.shouldChangeTopPosition(i,t);o&&this.changeTopPosition(t),this.lastScrollTop=e<=0?0:e,this.direction=t}shouldIgnoreScrollChanges(e){const t=Math.abs(this.lastScrollTop-e);return te?r.UP:r.DOWN}getTrigger(e,i){const{disableStickyOffset:o,topScrollDownValue:n,topScrollUpValue:s,stickyScrollDownDepth:a}=this.options,l=!!o&&o>e;this.storiesCarouselTopPosition=this.storiesContainer.getBoundingClientRect().top;const c=this.storiesCarouselTopPosition>s;if(l||c)return t.HIDE;const d=+n+a,h=e>=d;return i===r.DOWN&&h?t.HIDE:t.SHOW}shouldToggleSticky(e){if(this.initialScroll)return this.initialScroll=!1,!1;const r=e===t.SHOW;return this.isStickyActive?!r:!!r&&!this.feedInViewPort}toggleStickyStories(r){r===t.HIDE&&(TRC.dom.addClass(this.storiesContainer,e.STICKY_HIDDEN),TRC.dom.removeClass(this.storiesContainer,e.STICKY_ACTIVE),this.storiesContainer.style.transform=""),r===t.SHOW&&(TRC.dom.removeClass(this.storiesContainer,e.STICKY_HIDDEN),TRC.dom.addClass(this.storiesContainer,e.STICKY_ACTIVE)),this.isStickyActive=!this.isStickyActive}calcTranslateY(e){const t=/(matrix(?:3d)*\((?:(?:-*\d+(?:\.\d+)*, ){13}|(?:-*\d+(?:\.\d+)*, ){5}))(-*\d+(?:\.\d+)*)((?:, -*\d+(?:\.\d+)*)*\))/,r=getComputedStyle(this.storiesContainer).transform;return t.test(r)?r.replace(t,`$1${e}$3`):`translateY(${e}px)`}shouldChangeTopPosition(e,t){const{topScrollDownValue:r,topScrollUpValue:i}=this.options,o=r!==i,n=this.direction!==t;return!!this.isStickyActive&&(e||o&&n)}changeTopPosition(e){const{topScrollUpValue:t,topScrollDownValue:i}=this.options,o=e===r.UP;this.storiesContainer.style.transform=o?this.calcTranslateY(t):this.calcTranslateY(i)}}TRC.StoriesSticky=o}),TRC.listen("stories-initiation",()=>{const e={STORIES_CONTAINER:"tbl-stories-container",PLACEMENTS_CONTAINER:"tbl-stories-placements-container",CAROUSEL_CONTAINER:"tbl-stories-carousel-container",STORIES_PLACEMENT:"tbl-stories-placement",STORIES_RTL:"tbl-stories-rtl"},t={MAIN_CONTAINER_ID:"data-stories-main-container-id",STORY_INDEX:"data-story-index",STORY_TOPIC_INDEX:"data-story-topic-index",STORY_TOPIC:"data-story-topic"},r={AVAILABLE:"available",COLLAPSED:"collapsed",COLLAPSED_TOPIC:"collapsed-topic",VIDEO_PLAYING:"video-playing",TOPIC_SWIPED:"topic-swiped"};class i extends TRC.StoriesBase{constructor(e,t,o){if(super(t,"Stories"),this.trcManager=e,this.storiesPlacements={},this.topics={},this.isFirstCardRendered=!1,this.options=o,this.unifiedPlacementName=t,this.numPlacements=0,this.numTopics=0,this.placementData=e.preloadRequest[t],this.container=this.placementData.container,this.parentContainerId=this.container.id,new TRC.StoriesHistoryController(`tbl-stories-${this.parentContainerId}`,t),this.topicMinAmount=4,this.storiesHeight=e.global["default-stories-height"],this.enableClsReducer=e.global["enable-cls-reducer"]||!1,this.eventsManager=new TRC.StoriesEventsManager(o,t),this.isRtl=this.options.direction||"rtl"===this.trcManager.direction,this.isVideoInitiated=!1,this.placementData.isStories=!0,!this.isLazyRenderEnabled()){const e=`lazy render disabled: ${this.unifiedPlacementName}`;return this.eventsManager.sendEvent(r.COLLAPSED,{ab:[e],mxp:{errorMsg:e}}),this.collapseContainer(),void __trcWarn(e)}TRC.listen("trcContentReady",e=>this.initVideoTag(e)),i.injectCss(),this.createStoriesContainer(),this.eventsManager.sendLifeCycleEvents(r.AVAILABLE);try{new TRC.StoriesCarousel(t,this.container)}catch(e){this.eventsManager.onError(`failed to create StoriesCarousel`,e),this.collapseContainer()}}isLazyRenderEnabled(){const{isLazyRenderEnabled:e,placementsConfigs:t}=this.trcManager.renderController,r=`Stories - ${this.unifiedPlacementName}`,i=t?t[r]:{};return e&&i&&i.enable}shouldLoadVideo(e){return this.options.videoTag&&!this.isVideoInitiated&&e.isStories&&e.trc["mode-before-video-load"](e)}initVideoTag({trcbox:e}){if(this.shouldLoadVideo(e)){const t={placement:e.placement,container:e.container};this.isVideoInitiated=!0,this.videoTagLoader=new TRC.VideoTagLoader(e.trc,this.options.videoTag,t,e,e.response.trc),this.videoTagLoader.loadVideo()}}static createBlurImageBox(e){const t=document.createElement("div");e.appendChild(t),e.blurImageStoriesBox=t}static injectCss(){TRC.dom.injectStyle(`.tbl-stories-container { width: 100vw; font-family: helvetica, arial, sans-serif; -webkit-overflow-scrolling: auto; padding: 0 0 5px; } .tbl-stories-container.tbl-stories-rtl { direction: rtl; } .tbl-stories-container .tbl-stories-placement { display: none; } .tbl-stories-container svg { /*override publisher css on svg tag*/ vertical-align: inherit; fill: transparent; }.tbl-feed-view-parent-wrapper body.tbl-stories-show { position: initial; overflow: initial; }`)}createStoriesContainer(){TRC.dom.addClass(this.container,e.STORIES_CONTAINER),this.isRtl&&TRC.dom.addClass(this.container,e.STORIES_RTL),this.container.setAttribute(t.MAIN_CONTAINER_ID,this.unifiedPlacementName),this.placementsContainer=TRC.dom.createHTMLElement("section",{className:e.PLACEMENTS_CONTAINER})}handlePlacement(i){try{if(this.storiesColapsed)return;const{placement:o,trcResponse:n}=i;if(this.storiesPlacements[o])return void this.eventsManager.onError(`placement already created for '${o}'`);const s=i.trcResponse.v.length;if(!s)return this.options.storiesPlacementsAmount--,this.eventsManager.sendEvent(r.COLLAPSED_TOPIC,{ab:[o,this.numPlacements+1],mxp:{topicName:o,topicPosition:this.numPlacements+1}}),void this.isStoriesLastPlacement();const a=document.createElement("section");i.container=a,i.modeGroupOrder=++this.numPlacements,a.setAttribute(t.STORY_INDEX,this.numPlacements),a.placementData=i,a.id=`${this.parentContainerId}-pl${this.numPlacements}`,TRC.dom.addClass(a,e.STORIES_PLACEMENT),this.handleTopicRelatedPlacement(a,n,i),this.placementsContainer.appendChild(a),this.isStoriesLastPlacement(),this.storiesPlacements[o]=i}catch(e){this.eventsManager.onError(`failed to handlePlacement`,e),this.collapseContainer()}}collapseContainer(){this.storiesColapsed=!0,TRC.dom.addClass(this.container,"tbl-hidden")}isStoriesLastPlacement(){if(this.options.storiesPlacementsAmount===this.numPlacements){if(this.numTopics{const e=TRC.StoriesCarousel.getInstance(this.unifiedPlacementName),{carouselContainer:t}=e;this.container.appendChild(t),this.container.appendChild(this.placementsContainer),e.carouselReady()}),TRC.EventsAPI.dispatchStoriesLoaded()}}clsReducer(e){const{virtualPlacementsMap:t}=this.trcManager.virtualPlacementsManager;this.enableClsReducer&&t[this.unifiedPlacementName]?(window.scroll({top:this.storiesHeight}),TRC.Timeout.set(e,0)):e()}renderVerticalUiPlacements(e,t){try{let r=TRC.StoriesVerticalUi.getInstance&&TRC.StoriesVerticalUi.getInstance(this.unifiedPlacementName);r||(r=new TRC.StoriesVerticalUi(this.unifiedPlacementName)),t&&r.handleVerticalUiLayout(),r.openVerticalUi(e)}catch(e){this.eventsManager.onError("renderVerticalUiPlacements",e)}}handleTopicRelatedPlacement(e,r,o){const{categoryId:n,categoryTitle:s,categoryImage:a}=i.getPlacementCategoryData(r),l=TRC.StoriesCarousel.getInstance(this.unifiedPlacementName);if(!n)return;this.loadFeedView(o),e.setAttribute(t.STORY_TOPIC,n),e.setAttribute(t.STORY_TOPIC_INDEX,++this.numTopics);const c={id:n,title:s||n,imageUrl:l.getTopicImage(a,r.v),slotPosition:this.numPlacements,placementContainer:e};this.topics[n]=o.topicData=c,l.addTopic(c)}static getPlacementCategoryData(e){const{cid:t,ct:r,ciu:i}=e;return{categoryId:t,categoryTitle:r,categoryImage:i}}loadFeedView(e){if(this.options.enableFeedView){new TRC.FeedViewWidgetLoaderManager(e);const{fvConfig:t}=this.options.storiesUi.vui;t&&(e.feedViewConfig=t)}}}TRC.Stories=i}),function(){var e=TRC.taboolaConnect={},t=!1,r={},i=!!(TRC&&TRC.mobile&&TRC.mobile.reportClick),o="dynamic-content-loader";function n(e,t,r){for(var i in e)e.hasOwnProperty(i)&&(t[i]=s(e[i],r))}function s(e,t){return e.replace(/%%CLICK_URL%%/g,t.clickUrl)}function a(e,t){"available"===t&&TRC.dispatch("available::"+e.placementName,{container:e.container}),"click"===t&&TRC.dispatch("click::"+e.placementName)}function l(e,t,r){var i=t.config["max-height"]&&parseInt(t.config["max-height"]);i&&parseInt(r.height)>i&&(r.height=i),e.height=e.style.height=parseInt(r.height)+"px"}e.createIframe=function(t,o,s,a,l,c,d){if(t){var h=s||{},u=Math.floor(2147483648*Math.random()).toString(36),p=document.createElement("iframe"),g={clickUrl:d};return h.attributes&&n(h.attributes,p,g),p.style.border=p.frameBorder=p.border="0",p.style.display="block",p.style.height=parseInt(s.height)?parseInt(s.height)+"px":"0px",p.style.width="100%",p.scrolling="no",p.sandbox=h.sandbox||"allow-same-origin allow-scripts allow-popups allow-forms",h.fifr?(p.style.maxWidth=TRCImpl.global["html-card-max-width"]||"800px",p.style.margin="0 auto",p.setAttribute("tbcId",u)):(o=addHashParam(o,"tbcId",u),o=addHashParam(o,"lang",c||window.navigator.language),i&&(o=addHashParam(o,"isMobileSDK",""+i)),p.src=o),r[u]={origin:a,placementName:l,frame:p,config:s,container:t},t.innerHTML="",t.appendChild(p),h.fifr&&e.lazyLoadDynamicContentLoader(p),p}__trcError("could not find container to create Iframe within")},e.lazyLoadDynamicContentLoader=function(e){TRC.ModuleLoader.load(o,TRC.dcl,function(){var t=e.contentWindow||e.contentDocument;t&&(t.document.open(),t.document.write(TRC.dcl),t.document.close())}.trcBind(e))},e.receiveMessage=function(e,t){var i=t.data;if(i&&r[i.id]){var o;if((o=void 0!==e.origin?e.origin:"true"===e.fifr?window.location.origin:r[i.id].origin)!==t.origin)return;this[i.action]&&this[i.action](i.payload?i.payload:{sizeObject:i.sizeObject},r[i.id])}},e.openInIframe=function(t,r){var i=r.frame,o=r.container,n=t.iframeArgs,s={isSmallIOS:function(){return TRCImpl["small-ios-device"].indexOf(TRC.Device.deviceType)>=0},getPublisherBrandingName:function(){return n.publisherName},trc:TRCImpl},a={title:n.title,url:n.logger_url,logger_url:n.logger_url};new TRC.FeedView(s,a,o),e.postMessage(i,{action:"openInIframe",message:"openInIframe done",dimension:{height:i.style.height}},"*")},window.addHashParam=function(e,t,r){var i,o=t+"="+r;if(e.indexOf("#")>0){var n=e.slice(-1);return e+(o="&"===n||"#"===n?o:"&"+o)}return e+"#"+o},e.getOrigin=function(e){return e.match(/^(https:|http:)?\/\/[^/]+/i)[0]},e.postMessage=function(e,t,r){e.contentWindow.postMessage(t,r)},e.rendered=function(t,r){var i=r.frame,o=r.container,n;l(i,r,t.sizeObject),o.className+=" tbl-feed-card",a(r,"available");var s={action:"rendered",message:"rendered done",dimension:{height:i.style.height}},c=TRCImpl.global["start-magazine-url"];c&&r.origin===c&&(s.publisherId=TRC.publisherId,s.placementName=r.placementName),e.postMessage(i,s,"*")},e.expand=function(t,r){var i=r.frame,o;l(i,r,t.sizeObject),e.postMessage(i,{action:"expand",message:"expand done",dimension:{height:i.style.height}},"*")},e.click=function(t,r){var i=r.frame,o=t.sizeObject;o&&l(i,r,o),a(r,"click"),e.postMessage(i,{action:"click",message:"click done",dimension:{height:i.style.height}},"*"),TRC.mobile&&TRC.mobile.reportClick&&TRC.mobile.reportClick(t.sizeObject)},e.collapse=function(t,r){var i=r.frame,o;l(i,r,t.sizeObject),e.postMessage(i,{action:"collapse",message:"collapse done",dimension:{height:i.style.height}},"*")},e.maxHeight=function(t,r){var i=r.frame,o=r.config["max-height"]?r.config["max-height"]:"";e.postMessage(i,{action:"maxHeight",message:o,dimension:{height:i.style.height}},"*")},e.createCard=function(e){var r=e.container,i=e.src,o=e.config,n=e.placementName,s=e.language,a=e.clickUrl;if(!o.fifr){var l=this.getOrigin(o.origin||i);if(!l)return void __trcError("non valid origin for third party card")}t||(window.addEventListener("message",this.receiveMessage.bind(this,o),!1),t=!0),this.createIframe(r,i,o,l,n,s,a)},e.error=function(e){__trcWarn("External error report to taboola-connect: "+e)},window._trcIsUTactive&&(TRC.taboolaConnect.addHashParam=addHashParam)}();class TasksExecutorQueue{constructor(){this.tasks=[],this.runningTask=null}add(e){return this.tasks.push(e),1===this.tasks.length&&this.callNext(),this}callNext(){if(this.tasks.length)if("function"==typeof this.tasks[0]){[this.runningTask]=this.tasks;let e=!1;const t=()=>{e||(e=!0,this.tasks.shift(),this.callNext())};this.runningTask.cancel=(()=>{e=!0}),this.runningTask(t)}else this.tasks.shift(),this.callNext()}resetQueue(){this.runningTask.cancel(),this.tasks=[]}}TRC.TasksExecutorQueue=TasksExecutorQueue,window,document,TRC.text={replaceAll(e,t,r,i){let o;return void 0!==t&&void 0!==r&&t!==r?(o=new RegExp(t,"gi"),e.replace(o,"function"==typeof r&&"object"==typeof i?r.trcBind(i):r)):e},lsplit(e,t,r){const i=e.split(t);return i.slice(0,r-1).concat(i.length>=r?i.slice(r-1).join(t):[])},parseCSV(e){const t=e.split(","),r=[];for(;t.length;){let e=t.shift();if('"'===e[0]){do{if('"'===e.slice(1).replace(/""/g,"").slice(-1))break;e+=`,${t.shift()}`}while(t.length);r.push(e.slice(1,e.length-1).replace(/""/g,'"'))}else r.push(e)}return r},toStringList(e){if(!e)return[];if(!(e instanceof Array))return[`${e}`];const t=[];return e.forEach(e=>{e&&t.push(`${e}`)}),t},htmlUnescape:e=>String(e).replace(/"/g,'"').replace(/'/g,"'").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),encodeHTML:(e,t={})=>"string"==typeof e&&(t.ignoreAmpersand||(e=e.replace(/&/g,"&")),e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")),toLowerCamelCase(e){if(-1===e.indexOf("-"))return e;const t=e.toLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.substr(1)).join("");return t.charAt(0).toLowerCase()+t.substr(1)},splitAndJoin(e,t){let r=e.split(".");return r=(r=r.map(e=>t(e))).join(".")},isEndWith(e,t){if(!String.prototype.endsWith){const{length:r}=e;return e.substring(r-t.length,r)===t}return e.endsWith(t)}},(()=>{let e=!1;const t={POSITION:{SPONSORED:"syndicated-static-text-position",ORGANIC:"organic-static-text-position",EMBLEM:"emblem-position"},TEXT:{SPONSORED:"syndicated-static-text",ORGANIC:"organic-static-text"},SHOW_ORGANIC_FIXED_LABEL:"organic-show-static-text",EMBLEM:"emblem"},r={EMBLEM_WRAPPER:"thumbnail-emblem",STATIC_TEXT:"static-text",FIXED_LABEL:"tbl-fixed-label",BIG_LABEL:"tbl-big-label",SMALL_LABEL:"tbl-small-label"};class i{constructor(e,r,o){const{categoryCard:n,recommendationList:s,add_span:a}=o,l=r?"SPONSORED":"ORGANIC";if(this.categoryCard=n,this.getModeClientProperty=o.getModeClientProperty.trcBind(o),this.size=s&&s.length,this.addSpan=a,this.emblemSrc=this.getModeClientProperty(t.EMBLEM),this.fixedLabelPosition=this.getFixedLabelPosition(r,t.POSITION[l]),this.fixedLabelText=this.getModeClientProperty(t.TEXT[l]),this.emblemSrc&&"null"!==this.emblemSrc&&(i.setCss(),this.emblemPosition=this.getModeClientProperty(t.POSITION.EMBLEM)||"top-left",this.addEmblem(e,l)),!this.emblemRenderd||this.isEmblemAndTextNotOnSamePosition()){if(this.categoryCard&&this.categoryCard.isCategoryCard&&!this.categoryCard.render)return;this.addFixedLabel(e,r)}}static setCss(){e||(e=!0,TRC.dom.injectStyle(`.thumbnail-emblem { height: 35px; width: 35px; }.trc_related_container .thumbnail-emblem.bottom-right, .trc_related_container .static-text.bottom-right { bottom: 0; right: 0; background-position: bottom; }.trc_related_container .thumbnail-emblem.top-right, .trc_related_container .static-text.top-right { top: 0; right: 0; background-position: top; }.trc_related_container .thumbnail-emblem.bottom-left, .trc_related_container .static-text.bottom-left { bottom: 0; left: 0; background-position: bottom; }.trc_related_container .thumbnail-emblem.top-left, .trc_related_container .static-text.top-left { top: 0; left: 0; background-position: top; }.trc_related_container .thumbnail-emblem.top, .trc_related_container .static-text.top { width: 100%; top: 0; }.trc_related_container .thumbnail-emblem.bottom, .trc_related_container .static-text.bottom { width: 100%; bottom: 0; padding: 2px 0; }.trc_related_container .videoCube .thumbBlock .static-text { position: absolute; z-index: 1; margin: 0; padding: 5px; display: block; opacity: 0.7; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label { opacity: 1; padding: 0 5px; text-align: center; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label.tbl-small-label { min-width: 107px; min-height: 27px; line-height: 27px; letter-spacing: 0.31px; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label.tbl-big-label { min-width: 140px; min-height: 33px; font-size: 14px; line-height: 33px; letter-spacing: 0.39px; }.trc_related_container .thumbnail-emblem { background-position-x: center; }`))}isEmblemAndTextNotOnSamePosition(){return this.emblemRenderd&&this.fixedLabelPosition!==this.emblemPosition}addEmblem(e){this.emblemRenderd=!0;const t=this.addSpan(r.EMBLEM_WRAPPER,null,e);t.style.backgroundImage=`url('${this.emblemSrc}')`,TRC.dom.addClass(t,this.emblemPosition)}addFixedLabel(e,o){const n=[r.STATIC_TEXT],s=document.createElement("span");if(!o){const e=this.getModeClientProperty(t.SHOW_ORGANIC_FIXED_LABEL);if(!e)return;n.push(r.FIXED_LABEL),n.push(1===this.size?r.BIG_LABEL:r.SMALL_LABEL),this.categoryCard&&this.categoryCard.render&&(this.fixedLabelText=this.categoryCard.text)}i.setCss(),n.push(this.fixedLabelPosition),s.className=n.join(" "),this.fixedLabelText&&s.appendChild(document.createTextNode(this.fixedLabelText)),e.appendChild(s)}getFixedLabelPosition(e,t){const r=e?"top-right":"bottom-left";return this.getModeClientProperty(t)||r}}TRC.ThumbnailOverlayComponents=i})(),(e=>{const t="tn_t_on",r=TRC.pageManager.getLocalStorageImplementation("strict-w3c-storage","session");let i=TRC.taboolaNews&&TRC.taboolaNews.timeOn,o=!1;if(!i&&r)try{i=JSON.parse(r.getValue(t)),o=!0}catch(e){__trcError("Error occurred while trying to read Taboola News data from SessionStorage but object data was corrupted.")}if(!i)return;function n(){const t=(new Date).getTime();if(!TRC.isAMP)return e.performance&&e.performance.timing&&e.performance.timing.navigationStart||t;try{const r=JSON.parse(e.context.ca).attributes._context.initialIntersection.time||t;return new Date(e.context.startTime-r)}catch(e){return t}}!o&&r&&r.setValue(t,JSON.stringify(i));let s=n(),a=-1,l=0;function c(e){e?s=(new Date).getTime():(a=(new Date).getTime(),l+=1,TRCImpl.sendAbTestEvent&&TRCImpl.sendAbTestEvent("taboola_news_timeon",`${l.toString()}::${(a-s).toString()}`,null,!0))}TRC.docVisibilityUtil.addEventListener(c)})(window),function(){function e(e){var t=document.createElement("script");return t.setAttribute("async",""),t.setAttribute("src",e),t}function t(t,i){var o=document.createElement("span"),n="";s(o,"span");for(var a=0;a"+e.html+e.trackableObject+"