(function() { var preEngineFunc={ preEngineJS: function (loaderParams) {var pageBody=getElementAttributeValueBySelector("body","class"),bodyNoAds=!1;pageBody&&pageBody.includes("noad")&&(loaderParams.e.am=!0,bodyNoAds=!0);function addPageCSS(a){var b=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style"),d=document.createTextNode(a);c.type="text/css",c.styleSheet?c.styleSheet.cssText=d.nodeValue:c.appendChild(d),b.appendChild(c)}function getFilteredCompatibleSizesfromBrowsiSpot(a,b){if(a){var c=JSON.parse(a);return b.filter(function(a){return c.find(function(b){return b.w===a.w&&b.h===a.h})})}return b}function getElementAttributeValue(a,b){var c=a.getAttribute(b);return c?c.toLowerCase():null}function getElementAttributeValueBySelector(a,b){var c=document.querySelector(a);return c?getElementAttributeValue(c,b):null}function getFilteredCompatibleSizes(a,b){var c=a.map(function(a){return a&&2===a.length?{w:a[0],h:a[1]}:""}),d=[];return d=c.length?b.filter(function(a){return c.find(function(b){return b.w===a.w&&b.h===a.h})}):b,c.find(function(a){return 300===a.w&&600===a.h})&&d.push({adSizeType:"narrow",h:600,minSizeForWrapping:1,optionalEmbeddings:["break"],selectedEmbedding:"break",w:300}),d}function sortByDomLocation(a){return a.sort(function(c,a){return c===a?0:c.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_PRECEDING?1:-1})}function buildYieldFunction(a,b){return function(){var c=b;return function(){return a+c++}}()}var positionsStack={RIGHT:buildYieldFunction("RIGHT",11),PREMIUM:buildYieldFunction("RIGHT",21),LEADER_BOARD:buildYieldFunction("LEADER_BOARD",1),AUTO_INCREASE:buildYieldFunction("AUTO_INCREASE",1)};function replaceAscendingKeys(a){a=sortByDomLocation(a);for(var b=0;b div[class*=\"scGrid\"]")),b=a.filter(function(b,c){return 0===c?!hasFixedChilds(b):0 aside > div.sticky",pos:"RIGHT"}])}function getPageTargetings(){var a=[],b=getElementAttributeValueBySelector("meta[property=\"article:tag\"]","content");b&&(b=b.replace(/[^\w\s\,]/gi,"").split(","));var c=getElementAttributeValueBySelector("meta[name=\"coid\"]","value"),d=getElementAttributeValueBySelector("meta[name=\"type\"]","value");return b&&a.push({k:"tags",v:b}),c&&a.push({k:"coid",v:c}),d&&a.push({k:"type",v:d}),a.push({k:"view",v:window.matchMedia("(max-width: 1200)").matches?"desktop":["desktop","wide"]}),a}loaderParams.externalFlowHandler={engineInitiator:function(a,b){function c(){"complete"===document.readyState&&(document.removeEventListener("readystatechange",c),clearTimeout(d),!bodyNoAds&&findFixedSpots(),b())}document.addEventListener("readystatechange",c),c();var d=setTimeout(function(){document.removeEventListener("readystatechange",c),bodyNoAds||findFixedSpots(),b()},2e4)},preDemand:function(a){a.filter(function(a){return"dynamic"===a.type}).forEach(function(a){return a.ref.setAttribute("data-generated-key","AUTO_INCREASE")});var b=a.map(function(a){return a.ref});replaceAscendingKeys(b)},preFetch:function(a,b,c){if("header_bidding"===b.providerName||"dfp"===b.providerName){c.kv=(c.kv||[]).concat(getPageTargetings()),c.kv.push({k:"pos",v:a.ref.getAttribute("data-generated-key")});var d="header_bidding"===a.providerName?c.c.d:c.c;if(!("fixed"===a.type))d.au=getAdUnit();else if("BROWSISPOT"===a.ref.tagName)if(a.ref.parentElement.hasAttribute("data-gmgAd")){var e=JSON.parse(a.ref.parentElement.getAttribute("data-gmgad"));d.au=e.unitname.replace(/\s+/g,"_"),a.compatibleSizes=getFilteredCompatibleSizes(e.desktop_size,a.compatibleSizes),0===a.compatibleSizes.length&&console.log("[browsi]: sizes do not match placement",a.ref.parentElement)}else{if(-1!==a.ref.getAttribute("style").indexOf("grid-column")){var f=getElementAttributeValue(a.ref.nextElementSibling,"class"),g=f&&-1!==f.indexOf("full-width")?" {grid-column: 1 / 7;}":" {grid-column: 1 / 5;}";addPageCSS("div[id^=\"browsi_adWrapper_ai_"+a.adIndex+"_\"]"+g)}a.ref.hasAttribute("data-generated-key")&&(d.au=getAdUnit(),a.compatibleSizes=getFilteredCompatibleSizesfromBrowsiSpot(a.ref.getAttribute("sizes"),a.compatibleSizes))}}}};}}; window["__browsiLoadFunc"](window["__browsiLoadObject"], preEngineFunc); })();