(()=>{"use strict";var e={};let n,t,i;!function(e){let n=!1;function i(){const e=(new Error).stack;if(!e)return null;const n=e.split("\n")[3].split(" ");let t=n[n.length-1];return"("!==t[0]&&(t="("+t+")"),t}e.setAllowLogging=function(e){n=!!t.findHighestWindow().location.search.includes("bex_logging=true")||e},e.logInfo=function(...e){if(!n)return;const t=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #00008B; color: White; font-weight: bold;","[CeX Header Bidding]","",o,t?" ".concat(t):"","",...e)},e.logWarning=function(...e){if(!n)return;const t=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #FF8C00; color: White; font-weight: bold;","[CeX Header Bidding]","",o,t?" ".concat(t):"","",...e)},e.logError=function(e,...t){if(!n)return;const o=i(),r=Date.now()-performance.timing.navigationStart;t.length>0&&console.log("%c%s%c%s%s","background: #8B0000; color: White; font-weight: bold;","[CeX Header Bidding]","",r,o?" ".concat(o):"","",...t),console.error(e),console.trace()},e.logProblem=function(...e){if(!n)return;const t=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #8B0000; color: White; font-weight: bold;","[CeX Header Bidding]","",o,t?" ".concat(t):"","",...e),console.trace()}}(n||(n={})),function(e){function t(){const e=window.top;let n=window;for(;n!==e;)try{n.parent.document,n=n.parent}catch(e){break}return n}function i(){return t().document}e.getRandomInt=function(e,n){return e=Math.ceil(e),n=Math.floor(n),Math.floor(Math.random()*(n-e)+e)},e.replaceAll=function(e,n,t){return e.split(n).join(t)},e.fixDomain=function(e){return(e=(e=e.toLowerCase()).replace(/^http(s?):\/\//i,"")).startsWith("www.")&&(e=e.slice(4)),e.endsWith("/")&&(e=e.slice(0,-1)),e},e.guid=function(e=4){return e>11&&(e=11),Math.random().toString(36).substr(2,e)},e.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(16)}))},e.findHighestWindow=t,e.findHighestDocument=i,e.hbFrameId="__bexHBFrame";const o=e.hbdevFrameId="__bexHBDevFrame";function r(e,n){const t=i();t.body||(t.body=t.createElement("body"));let o=t.querySelector("#".concat(n));return o||(o=t.createElement("iframe"),o.id=n,o.style.display="none",o.onload=function(){const n=o.contentDocument,t=n?.createElement("script");t&&(t.src="https://".concat(e,"/hbscript"),t.async=!0,t.defer=!0,n?.head.appendChild(t))},t.body.appendChild(o),o)}function a(e){if(!e.size)return[[300,250]];let n=[];const i=t().innerWidth;e.size.desktop&&i>480&&(n=n.concat(e.size.desktop)),e.size.mobile&&i<=480&&(n=n.concat(e.size.mobile)),e.size.universal&&n.length<1&&(n=n.concat(e.size.universal)),n=n.map((function(e){return{width:e[0],height:e[1]}}));let o=n.filter((function(e){return e.width<=i}));return o.length<1&&(o=[n.reduce((function(e,n){return Math.abs(i-e.width)>Math.abs(i-n.width)?n:e}),{width:e.size.original[0],height:e.size.original[1]})]),o}e.createHbFrame=r,e.initalizeHb=function(e,t){"www.slovenskenovice.si"===window.location.host&&window.afterIpromPrebid?(n.logInfo("Setting iframe creation through iprom initalizer..."),window.afterIpromPrebid.push((function(){return r(e,t)}))):r(e,t)},e.initForeignPixels=function(){const e=t(),n=e.bextag=e.bextag||{};if(n.foreignPixelDone)return;n.foreignPixelDone=!0;const i=document.createElement("iframe");i.style="display:none",i.async="true",i.src="https://ads.betweendigital.com/sspmatch-iframe?country=US&p=44228",document.body.appendChild(i)},e.isDevelMode=function(e=!1,n){return!(!e&&void 0===n)&&(e?window.frameElement?.id===o:void 0===n||n.includes("hbdev.contentexchange.me"))},e.sendEventImage=function(e){const n=i(),t=n.createElement("img");t.src=e,t.onload=function(){n.body.removeChild(t)},t.style.display="none",n.body.appendChild(t)},e.crawlToPost=function(e){let n=e;for(;n&&!n.classList.contains("$bexAd_post");){if("BODY"===n.tagName)return null;if(!n.parentElement)return null;n=n.parentElement}return n},e.getCookie=function(e,n){const t="; ".concat(n).split("; ".concat(e,"="));if(2===t.length)return t.pop()?.split(";").shift()},e.filterConfig=function(e){const i=new URL(t().location.href).searchParams.get("bex_keeponly");if(!i||"direct"==i)return;const o=i.split("-"),r=o[0],a=o[1];let s=e.placement.execList;const c=[];for(;s;){const e=s.next;e&&delete s.next,s.type==r&&("headerbidding"==r&&(s.config.bids=s.config.bids.filter((function(e){return e.bidder==a}))),c.push(s)),s=e}e.placement.execList=c[0],n.logInfo("filtered config",e)},e.getAvailableSizes=a,e.makeAuctionRequest=function(e,n,t){if("DISPLAY"==t.adType){const i=a(t);return{id:n,domain:t.domain,placement:t.id,source:e,placement_size:{width:t.size.original[0],height:t.size.original[1]},availableSizes:i,size:null,type:"DISPLAY",mediaType:"banner",hasResponse:!1,hasWon:!1,cpm:0}}return{id:n,domain:t.domain,placement:t.id,source:e,placement_size:{width:0,height:0},availableSizes:[{width:0,height:0}],size:null,type:"NATIVE",mediaType:"native",hasResponse:!1,hasWon:!1,cpm:0}},e.makeAuctionResponse=function(e,n,t){if("DISPLAY"==t.adType){const i=a(t);return{id:n,domain:t.domain,placement:t.id,source:e,placement_size:{width:t.size.original[0],height:t.size.original[1]},availableSizes:i,size:{width:t.size.original[0],height:t.size.original[1]},type:"DISPLAY",mediaType:t.mediaType||"banner",hasResponse:!0,hasWon:!1,cpm:0}}return{id:n,domain:t.domain,placement:t.id,source:e,placement_size:{width:0,height:0},availableSizes:[{width:0,height:0}],size:{width:0,height:0},type:"NATIVE",mediaType:t.mediaType||"native",hasResponse:!0,hasWon:!1,cpm:0}},e.sendAuctionData=function(e){const n=t();e.window=[n.innerWidth,n.innerHeight];const i=new XMLHttpRequest;i.open("POST","".concat("https://hbstat.contentexchange.me","/auctionData")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(e))},e.isMobile=function(){let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var n=window.matchMedia&&matchMedia("(pointer:coarse)");if(n&&"(pointer:coarse)"===n.media)e=!!n.matches;else if("orientation"in window)e=!0;else{var t=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e},e.getID5=function(e){return new Promise((function(n,t){const i=e.createElement("script");i.src="https://cdn.id5-sync.com/api/1.0/id5-api.js",i.onload=function(){let e=!1;try{e=ID5&&ID5.init({partnerId:1513})||!1}catch(e){console.log("ID5 error",e)}if(!e)return n(null);e.onAvailable((function(e){var t=e.getUserId();console.log("ID5",t),n(t)}))},e.head.appendChild(i)}))}}(t||(t={})),function(e){function n(){const e=t.findHighestWindow();let n=e.bextag;return n||(e.bextag=n={targeting:{},headerbidding:{queue:[]},_internals:{headerbidding:{bexDisplayHB:{},bexNativeHB:{}},loaders:{},bds:{}},sendQueue:[],onBexAdFailed:[],onBexAdSuccess:[]}),"sendQueue"in e.bextag||(e.bextag.sendQueue=[]),"targeting"in e.bextag||(e.bextag.targeting={}),"headerbidding"in e.bextag||(e.bextag.headerbidding={}),"queue"in e.bextag.headerbidding||(e.bextag.headerbidding.queue=[]),"_internals"in e.bextag||(e.bextag._internals={}),"headerbidding"in e.bextag._internals||(e.bextag._internals.headerbidding={}),"bexDisplayHB"in e.bextag._internals.headerbidding||(e.bextag._internals.headerbidding.bexDisplayHB={}),"bexNativeHB"in e.bextag._internals.headerbidding||(e.bextag._internals.headerbidding.bexNativeHB={}),"loaders"in e.bextag._internals||(e.bextag._internals.loaders={}),"bds"in e.bextag._internals||(e.bextag._internals.bds={}),"onBexAdFailed"in e.bextag||(e.bextag.onBexAdFailed=[]),"onBexAdSuccess"in e.bextag||(e.bextag.onBexAdSuccess=[]),n}e.getBexTag=n,e.getBexDevTag=function(){const e=n();let t=e._devTag;t||(e._devTag=t={targeting:{},headerbidding:{queue:[]},_internals:{headerbidding:{bexDisplayHB:{},bexNativeHB:{}},loaders:{},bds:{}},sendQueue:[],onBexAdFailed:[],onBexAdSuccess:[]});const i=t;return"sendQueue"in i||(i.sendQueue=[]),"targeting"in i||(i.targeting={}),"headerbidding"in i||(i.headerbidding={}),"queue"in i.headerbidding||(i.headerbidding.queue=[]),"_internals"in i||(i._internals={}),"headerbidding"in i._internals||(i._internals.headerbidding={}),"bexDisplayHB"in i._internals.headerbidding||(i._internals.headerbidding.bexDisplayHB={}),"bexNativeHB"in i._internals.headerbidding||(i._internals.headerbidding.bexNativeHB={}),"loaders"in i._internals||(i._internals.loaders={}),"bds"in i._internals||(i._internals.bds={}),"onBexAdFailed"in i||(i.onBexAdFailed=[]),"onBexAdSuccess"in i||(i.onBexAdSuccess=[]),t}}(i||(i={}));let o,r,a,s,c,d=t.findHighestWindow(),l=t.findHighestDocument(),u=d.adformtag=d.adformtag||[],f=i.getBexTag();function g(e,n,t){return n=h(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(n,t||[],h(e).constructor):n.apply(e,t))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&b(e,n)}function b(e,n){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},b(e,n)}function y(e,n,t){return(n=w(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e,n){for(var t=0;t ')):"in article"!=d&&v.insertAdjacentHTML("beforebegin",'
')))}if(n){var f=t.guid();r.outerHTML=''),u="push"==d?"position:absolute;left:185px;bottom:5px;":"float:right;margin:0 0 4px 8px;clear:right;";var g="push"==d?"afterend":"beforebegin";v?.insertAdjacentHTML(g,' ")),c?.classList.add("bexvideo")}else r.setAttribute("src",y),r.setAttribute("alt",o.title),r.style["background-image"]="url("+(o[s[1]]||"")+")",a.useImageContain?r.style["background-size"]="contain":r.style["background-size"]="cover",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center"}else if("$type"===s[2]&&3===s.length)switch(s[1]){case"image":d.push("bexImage");break;case"title":d.push("bexTitle");break;case"post":d.push("bexPost");break;default:n.logWarning("Invalid template element type",s[1],i)}else if("$replace"===s[2]&&5===s.length){let e=i.getAttribute(s[3]);if(!e)continue;e=t.replaceAll(e,s[4],o[s[1]]),i.setAttribute(s[3],e)}else"$style"===s[2]&&4===s.length?c[s[1]]=s[3]:("clickUrl"===s[1]&&(o.clickTrackers&&i.addEventListener("click",(function(){n.logInfo("Advertisement has been clicked!",i);for(let e of o.clickTrackers)t.sendEventImage(e)})),o.clickFuncs&&i.addEventListener("click",(function(){n.logInfo("Executing click functions for",i);for(let e of o.clickFuncs)try{e()}catch(t){n.logError(t,"Failed to execute click function",e)}}))),i.setAttribute(s[2],o[s[1]]||""))}for(let e in c)i.style[e]=c[e];for(let e of d)i.classList.add(e);return r(e,i,o,a),i}e.registerRenderer=function(e){return e?i[e.id]?n.logWarning("Renderer already registered!",e.name):void(i[e.id]=e):n.logWarning("No renderer provided during registration!")},e.renderSticker=function(e,n){if(e.querySelector(".cex-adform-sticker")){const t=e.querySelector(".cex-adform-sticker");t.style.display="inline-block",t.innerHTML=!t?.classList.contains("cex-sticker-replace")&&t.innerHTML||n||"Ad"}else{const t=o.createElement("div");t.style="\n line-height: 1.5;\n position: absolute;\n padding:0px 5px;\n top:3px;\n left:3px;\n border-radius: 3px;\n box-shadow: 1px 1px 1px 0 rgba(50, 50, 50, 0.2);\n background-color: rgba(255, 255, 255, 0.7);\n color: #2f2f2f;\n font-size: 12px;\n border: 1px solid #b3b3b3;\n z-index:10;\n display:block",t.className="cex-adform-sticker",t.innerHTML=t.innerHTML||n||"Ad",e.appendChild(t)}},e.renderTemplate=r,e.renderElement=a,e.createHTMLTemplate=function(e){const n=o.createElement("template"),i=t.guid();return e=e.replace(/##rnd##/g,i),n.innerHTML=e,n},e.invokeRenderer=async function(e,t,o,r){if(!e||!o)return!1;const a=i[e];if(!a)return n.logWarning("Renderer is not registered!",e),!1;if(!a.isAvailable)return n.logWarning("Renderer is not available!",a.name),!1;try{if(await a.render(t,o,r))return n.logInfo("Successfuly rendered advertisment!",a.name,t),!0}catch(e){n.logError(e,"An error occured while trying to render ad!",a.name,t)}return n.logWarning("Failed to render ad using the renderer system!"),!1}}(c||(c={}));let _,k,A,T,E=[],P=null;function S(){if(P)for(let e of E)"resolve"===P.func?e[0](P.passedData):e[1](P.passedData)}!function(e){function i(){const e=t.findHighestWindow();let n=null,i=null,o=null,r=window;for(;!i;){try{if("function"==typeof r.__tcfapi){"function"==typeof r.__tcfapi&&(o=2,n=r.__tcfapi),i=r;break}}catch(e){}try{r.frames.__tcfapiLocator&&(o=2,i=r)}catch(e){}if(r===e)break;r=r.parent}return{cmpFunction:n,cmpFrame:i,cmpVersion:o}}e.findCMP=i,e.IsCMPAvailable=function(){return null!==i().cmpVersion},e.getTCString=async function(){return new Promise((function(e,n){const t=i();if(!t||!t.cmpFunction)return n("No CMP function found!");t.cmpFunction("getTCData",2,(function(t,i){return i?e(t.tcString):n("Failed to get TCData.tcstring!")}))}))},e.checkPermissions=async function(e){return new Promise((function(n,t){const o=i();if(!o||!o.cmpFunction)return n(!0);o.cmpFunction("getTCData",2,(function(t,i){if(!i)return n(!0);if(!t||!t.gdprApplies)return n(!0);var o=!0;for(var r of e)o=o&&t.purpose.consents[r];n(o)}))}))},e.WaitForConsent=function(){return new Promise((function(e,t){if(P)return n.logInfo("Already passed consent system! Continuing..."),"resolve"===P.func?e(P.passedData):t(P.passedData);if(E.push([e,t]),1===E.length){const{cmpFunction:e,cmpVersion:t}=i();if(!e)return P={func:"reject"},S();if(2!==t)return P={func:"resolve"},S();let o=!1;setTimeout((function(){o||(o=!0,P={func:"reject",passedData:"Timeout reached"},S())}),500);const r=function(t,i){if(!o){if(!i)return n.logProblem("Failed to set event listener for consent!"),o=!0,P={func:"resolve"},S();if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){if(n.logInfo("Successfully gotten tcloaded/useractioncomplete event!"),e("removeEventListener",2,(function(e){if(e)return n.logInfo("Successfully removed event listener for consent!")}),r),o)return;return o=!0,P={func:"resolve"},S()}}};e("addEventListener",2,r)}}))},e.RunTest=function(){const{cmpFunction:e,cmpVersion:t}=i();e&&2===t&&e("addEventListener",2,(function(e,t){t?n.logInfo("Caught tcdata",e):n.logProblem("Failed to set event listener for consent!")}))}}(_||(_={})),function(e){const o=t.findHighestWindow(),a="https://hbstat.contentexchange.me",s={},c={},d={},l={},u={},f={},g=i.getBexTag();g.adIdToResponses=g.adIdToResponses||{};const p=g.adIdToResponses,h=r.getPrebid();function m(e){if(!e)return n.logProblem("No adId specified!");const t=p[e];if(!t)return n.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/click")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(t)),n.logInfo("Sending click data",t)}function b(e){if(!e)return n.logProblem("No adId specified!");const t=p[e];if(!t)return n.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/viewImpression")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(t)),n.logInfo("Sending viewable impression data",t)}e.setWinningBid=function(e){if(!e)return n.logWarning("Bid was not specified!");const t=p[e.adId];if(!t)return n.logWarning("Failed to find registered response",e.adId);t.hasWon=!0},e.mapAdUnitBidder=function(e,n,t){e&&n&&t&&((f[e]=f[e]||{})[n]=t)},e.registerBidResponse=function(e,n){p[e]=n},e.sendAuctionData=function(e,i){var o=arguments;const r=Object.assign({},i.requests[0])||t.makeAuctionRequest("error","N/A",{});r.source=e?"no auctData":"no auctID";const a=function(){i.requests.push(r),n.logWarning(...o)};if(!e)return a();if(!d[e])return a();if(!s[e])return a();const c=[];for(let n of d[e])p[n]&&c.push(p[n]);const l=s[e];i.requests=i.requests.concat(l),i.responses=i.responses.concat(c);const u=s[e][0].placement;n.logInfo("Adding auction data ("+u+") "+e,{responses:c,requests:s[e]})},e.sendGoogleData=function(e,t,i,o){if(!e||!t)return n.logProblem("No id or slot specified!")},e.sendImpression=function(e){if(!e)return n.logProblem("No adId specified!");const t=p[e];if(!t)return n.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/impression")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(t)),n.logInfo("Sending impression data",t)},e.sendClick=m,e.sendViewableImpression=b,e.trackAdViewability=function(e,t){if(!e||!t)return n.logWarning("No adId or targetElement specified!");const i=new IntersectionObserver((function(n){for(let o of n)if(o.isIntersecting){b(e),i.unobserve(t);break}}),{root:null,rootMargin:"0px",threshold:.5});i.observe(t)},e.init=function(){return new Promise((function(e,i){o.focus(),o.addEventListener("blur",(function(){setTimeout((function(){const e=o.document.activeElement;if(!e)return;if("IFRAME"!==e.tagName)return;const n=e.getAttribute("data-adId");n&&(o.focus(),m(n))}),0)})),h.que.push((function(){if(!h.onEvent)return i("Failed to find onEvent function!");h.onEvent("auctionInit",(function(e){l[e.auctionId]=e,c[e.auctionId]={},d[e.auctionId]=[],u[e.auctionId]=e.labels||[],n.logInfo("Auction initialized",e)})),h.onEvent("bidRequested",(function(e){l[e.auctionId]||n.logProblem("Failed to find registered auction",e.auctionId);let i=t.findHighestDocument(),o=t.findHighestWindow(),r=(i.referrer||"").split("/")[2]||"direct",a=o!=top?t.fixDomain(r):t.fixDomain(o.location.host);e.bids.forEach((function(n){let t,o=n.adUnitCode,r=i.getElementById(o),d=r&&r.getAttribute("domain")||a,l=o.split("-"),u=l[l.length-2],g="native"in n.mediaTypes?"NATIVE":"DISPLAY";if("DISPLAY"===g&&"sizes"in n){const e=n.sizes[0];t={width:e[0],height:e[1]}}else t={width:0,height:0};let p=[];if("DISPLAY"===g&&"sizes"in n)for(let e of n.sizes)p.push({width:e[0],height:e[1]});else p.push({width:0,height:0});const h=n.mediaType,m=c[e.auctionId][e.bidderCode+"_"+h]={id:f["div-ppas-mid-"+u][e.bidderCode+"_"+h],domain:d,placement:u,source:e.bidderCode,placement_size:t,availableSizes:p,size:null,type:g,mediaType:h,hasResponse:!1,hasWon:!1,cpm:0};(s[e.auctionId]=s[e.auctionId]||[]).push(m)}))})),h.onEvent("bidResponse",(function(e){if(!l[e.auctionId])return n.logProblem("Failed to find registered auction",e.auctionId);const t=c[e.auctionId][e.bidderCode+"_"+e.mediaType];if(!t)return n.logProblem("Failed to find registered request",e.bidderCode,e.mediaType,c[e.auctionId]);const i=Object.assign({},t);i.hasResponse=!0,i.cpm=e.cpm,"NATIVE"===i.type?i.size={width:0,height:0}:i.size={width:e.width,height:e.height},"contentexchange"===e.bidderCode&&(i.cpm=i.cpm/(.95*.65)),d[e.auctionId].push(e.adId),p[e.adId]=i})),e()}))}))}}(k||(k={})),function(e){let n=function(e){return e.Request="request",e.Response="response",e.Fallback="fallback",e.FallbackRequest="fallback_request",e}({});t.isDevelMode();const i=(t.findHighestWindow(),r.getPrebid()),o={},a={};e.sendAuctionData=function(e,t){n.Request,o[t],n.Response,a[t]},e.sendFallbackData=function(e,t){n.Fallback},e.sendFallbackRequestData=function(e){n.FallbackRequest},e.initPrebid=function(){return new Promise((function(e,n){i.que.push((function(){if(!i.onEvent)return n("Failed to find onEvent function!");i.onEvent("bidRequested",(function(e){o[e.auctionId]=o[e.auctionId]||[];const n=JSON.parse(JSON.stringify(e));n.gdprConsent&&delete n.gdprConsent,o[e.auctionId].push(n)})),i.onEvent("bidResponse",(function(e){a[e.auctionId]=a[e.auctionId]||[],a[e.auctionId].push(e)})),e()}))}))}}(A||(A={})),function(e){const t="###GRUMI_KEY###",i="###GRUMI_KEY_STRICT###",o=[],a=r.getPrebid();function s(e){return new Promise((function(e,n){return e}))}e.sendAdUnit=function(e,r=[],c,d){let{floorPrice:l,ssp_id:u,strict_check:f,market:g,domain:p,duplicate_blocked:h,duplicate_count:m}=c;return l=l||0,new Promise((function(g,p){n.logInfo("Sending pbjs bid request",e),a.que.push((function(){if(!a.requestBids)return g({id:e[0].code,winner:null,auctionId:null,responses:[]});if(u){const e={validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:"ssp.adnetwork.agency",sid:u,hp:1}]}};a.setConfig&&a.setConfig({schain:e})}if(a.setConfig&&a.setConfig({gvlMapping:{contentexchange:864}}),t&&i){console.log(f?"STRICT CHECK":"LOOSE CHECK",c);const e={dataProviders:[{name:"geoedge",params:{key:f?i:t}}]};a.setConfig&&a.setConfig({realTimeData:e})}a.setConfig&&a.setConfig({userSync:{filterSettings:{iframe:{bidders:["connectad"],filter:"include"}}},cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"}}),a.setConfig&&a.setConfig({floors:{}}),a.bidderSettings={standard:{storageAllowed:!0}};var p=e[0];a.requestBids({adUnits:e,labels:r,bidsBackHandler:async function(e,t,i){if(n.logInfo("Got prebid responses",e,"for auction",i,"for adUnit",p.code),!e)return g({id:p.code,winner:null,auctionId:i,responses:[]});const r=e[p.code];let c=[];if(!r)return g({id:p.code,winner:null,auctionId:i,responses:[]});r.bids.length&&(c=function(e,n){let t=[];if(!e.length)return t;for(let i of e)"contentexchange"===i.bidderCode&&(i.cpm=i.cpm/(.95*.65)),i.cpmm)continue}if(e.native&&o.includes(e.bidderCode))try{if(!await new Promise((function(e,n){return e})))continue}catch(e){n.logError(e,"Failed to scan bid!")}u=e}}u||n.logWarning("No bid has been allowed to be displayed! Ignoring...")}return u&&a.setWinningBid&&(a.setWinningBid(u.adId),"video"==u.mediaType&&s()),g({id:p.code,winner:u,auctionId:i,responses:r.bids})}})}))}))},e.init=function(){return new Promise((function(e,t){const i=document.createElement("script");i.src="https://hb.contentexchange.me/prebid",i.async=!0,i.onerror=function(){return t("Error loading prebid script!")},document.head.appendChild(i),a.que.push((async function(){const t={currency:{adServerCurrency:"EUR",conversionsRateFile:"https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=$$TODAY$$",bidderCurrencyDefault:{contentexchange:"USD"}}};_.IsCMPAvailable()&&(t.consentManagement={gdpr:{cmpApi:"iab",timeout:5e3,allowAuctionWithoutConsent:!0,defaultGdprScope:!1}},n.logInfo("Found CMP, using consent manager...")),t.userSync={aliasSyncEnabled:!0,userIds:[{name:"firstpartyid",bidders:["adformOpenRTB"],storage:{type:"cookie",name:"cx_id",expires:720}},{name:"id5Id",params:{partner:1513,externalModuleUrl:"https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js",abTesting:{enabled:!1,controlGroupPct:.1}},storage:{type:"html5",name:"id5id",expires:90,refreshInSeconds:28800}}],syncDelay:1e3},t.enableTIDs=!0,a.setConfig&&a.setConfig(t),await k.init(),await A.initPrebid(),e()}))}))}}(T||(T={}));const D=window,C=i.getBexTag();C._internals,D.bex=D.bex||{},D.bex.loaders=D.bex.loaders||{},D.bex.loaders.loadDisplayPlacement=function(e){const r=t.findHighestWindow(),a=t.findHighestDocument();if(t.initForeignPixels(),!_.checkPermissions([1,2,3,4,7,9]))return n.logInfo("Not permitted");C.id5=C.id5||t.getID5(a);const s=r.location.search.includes("bex_noadform=true")||r.location.search.includes("bex_keeponly")&&!r.location.search.includes("bex_keeponly=direct")||"Fallback"==e.placement.type,c=r.location.search.includes("bex_keeponly=direct"),d=e.develMode?i.getBexDevTag():C,l=C.onBexAdSuccess,u=d.headerbidding,f=d._internals.headerbidding.bexDisplayHB,g=o.getAdformTag(),p={requests:[],responses:[]},h=r.location.search.includes("auctionMode=0")?0:r.location.search.includes("auctionMode=1")?1:Math.round(Math.random()),m={};n.setAllowLogging(e.develMode);const b="div-ppas-mid-"+e.id+"-"+Math.floor(1e4*Math.random());n.logInfo("Called load for display placement with id",b,"should bypass adform",s);const y=b,x="adx.adform.net/adx/?mid=".concat(e.id,"&rnd=").concat(t.getRandomInt(1,1e5)),v={},w=[];if(s)v[x]={loaded:!1,auctionData:p};else{const i=t.makeAuctionRequest("adform-direct",b,e.placement);p.requests.push(i),w.push(x),d.placementHandlers=d.placementHandlers||{},v[x]=new Promise((function(i){d.placementHandlers[x]=function(o){if(n.logInfo("ON_ LOADED","DISPLAY",e.id,o.isEmpty?"fallback":"hit"),o&&!o.isEmpty){n.logInfo("direct-display resposnse",o);const r=t.makeAuctionResponse("adform-direct",b,e.placement);r.hasWon=!0,p.responses.push(r),k.registerBidResponse(y,r),i({loaded:!0,auctionData:p})}else i({loaded:!1,auctionData:p})}})),g.push((function(){g.onLoaded(Number(e.id),(function(e){d.placementHandlers[e.data](e)})),g.onRendered(Number(e.id),(function(t){if(n.logInfo("ON_ RENDER","DISPLAY",e.id),!t||!t.ad||!t.ad.parentElement)return;const i=t.ad.parentElement;if(!i)return n.logInfo("NO ELEMENT FOR display",e.id);const o=i.getAttribute("id")||"";k.sendImpression(o),k.trackAdViewability(o,i);for(let e of l)try{e(t.ad.parentElement)}catch(e){n.logError(e,"Failed to execute success event!",e)}}))}))}"www.slovenskenovice.si"===window.location.host&&(n.logInfo("Detected SlovenskeNovice, using iprom bypass..."),window.afterIpromPrebid=window.afterIpromPrebid||[]),e.develMode?t.findHighestDocument().querySelector("#".concat(t.hbdevFrameId))||t.initalizeHb(e.source,t.hbdevFrameId):t.findHighestDocument().querySelector("#".concat(t.hbFrameId))||t.initalizeHb(e.source,t.hbFrameId),w.length&&(n.logInfo("ADFORM PRELOAD DISPLAY",w),g.push({preload:w}));let I=document.currentScript;I&&(I=I.parentElement,function(t,i){if(e.placement.noLazy){try{i()}catch(e){n.logError(e,"Failed to execute code after intersect!")}return}const o=new IntersectionObserver((function(e){for(let r of e)if(r.isIntersecting){n.logInfo("Caught display intersection handle!",t),o.unobserve(t);try{i()}catch(e){n.logError(e,"Failed to execute code after intersect!")}break}}),{root:null,rootMargin:"350px 0px 350px 0px",threshold:0});o.observe(t)}(I,(async function(){let i=document.createElement("div");i.id=b,i.className="bexAd","1x2"!==e.size?(i.style.width="100%",i.style.height="100%",i.style.maxWidth="100%",i.style.maxHeight="100%",i.style.textAlign="center"):(i.style.maxWidth="1px",i.style.maxHeight="1px",i.style.display="none"),Object.assign(i.style,{display:"flex",justifyContent:"center",alignItems:"center"}),I.appendChild(i);const{loaded:o,auctionData:r}=await v[x];if(o){t.sendAuctionData(r),n.logInfo("Sending native data for adform-direct",o?"hit":"fallback",r);let e=document.createElement("script");e.setAttribute("data-adfscript",x),e.onerror=function(){var e;(e=i)&&e.parentElement&&e.parentElement.removeChild(e)},i.appendChild(e)}else!function(e,n,i,o){c||(t.filterConfig(e),u.queue.push((function(){f.executeAd(e.placement,n,i,o,m)})))}(e,i,r,h)})),s||function(){const e=document.createElement("script");e.src="https://s1.adform.net/banners/scripts/adx.js",e.async=!0,e.defer=!0,document.body.appendChild(e)}(),d.sendQueue.push({type:"display",id:e.unique_id,auctionMode:h}),delete D.bex.loaders.loadDisplayPlacement)};var F=self;for(var H in e)F[H]=e[H];e.__esModule&&Object.defineProperty(F,"__esModule",{value:!0})})();window.bex.loaders.loadDisplayPlacement({"id":"1743392","unique_id":"a2ef92d1d96db90653cb180aa76cbdc0","placement":{"id":"1743392","type":"Direct","noLazy":true,"adFormat":"display","strict_check":false,"market":"cz","domain":"www.czechfreepress.cz","adType":"DISPLAY","size":{"universal":[[1,2]],"original":[1,2]},"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1743392","floors":{"default":0.2329},"bids":[],"type":"DISPLAY","adFormat":"display","strict_check":false,"market":"cz","domain":"www.czechfreepress.cz","duplicate_blocked":false,"duplicate_count":1,"size":{"universal":[[1,2]],"original":[1,2]}}}},"source":"hb.contentexchange.me","allowKeywords":false,"size":"1x2","develMode":false,"generated":"2024-09-23T14:18:02.394Z"});