(()=>{"use strict";var e={};let t,n,i;!function(e){let t=!1;function i(){const e=(new Error).stack;if(!e)return null;const t=e.split("\n")[3].split(" ");let n=t[t.length-1];return"("!==n[0]&&(n="("+n+")"),n}e.setAllowLogging=function(e){t=!!n.findHighestWindow().location.search.includes("bex_logging=true")||e},e.logInfo=function(...e){if(!t)return;const n=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,n?" ".concat(n):"","",...e)},e.logWarning=function(...e){if(!t)return;const n=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,n?" ".concat(n):"","",...e)},e.logError=function(e,...n){if(!t)return;const o=i(),r=Date.now()-performance.timing.navigationStart;n.length>0&&console.log("%c%s%c%s%s","background: #8B0000; color: White; font-weight: bold;","[CeX Header Bidding]","",r,o?" ".concat(o):"","",...n),console.error(e),console.trace()},e.logProblem=function(...e){if(!t)return;const n=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,n?" ".concat(n):"","",...e),console.trace()}}(t||(t={})),function(e){function n(){const e=window.top;let t=window;for(;t!==e;)try{t.parent.document,t=t.parent}catch(e){break}return t}function i(){return n().document}e.getRandomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e)+e)},e.replaceAll=function(e,t,n){return e.split(t).join(n)},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 t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},e.findHighestWindow=n,e.findHighestDocument=i,e.hbFrameId="__bexHBFrame";const o=e.hbdevFrameId="__bexHBDevFrame";function r(e,t){const n=i();n.body||(n.body=n.createElement("body"));let o=n.querySelector("#".concat(t));return o||(o=n.createElement("iframe"),o.id=t,o.style.display="none",o.onload=function(){const t=o.contentDocument,n=t?.createElement("script");n&&(n.src="https://".concat(e,"/hbscript"),n.async=!0,n.defer=!0,t?.head.appendChild(n))},n.body.appendChild(o),o)}function a(e){if(!e.size)return[[300,250]];let t=[];const i=n().innerWidth;e.size.desktop&&i>480&&(t=t.concat(e.size.desktop)),e.size.mobile&&i<=480&&(t=t.concat(e.size.mobile)),e.size.universal&&t.length<1&&(t=t.concat(e.size.universal)),t=t.map((function(e){return{width:e[0],height:e[1]}}));let o=t.filter((function(e){return e.width<=i}));return o.length<1&&(o=[t.reduce((function(e,t){return Math.abs(i-e.width)>Math.abs(i-t.width)?t:e}),{width:e.size.original[0],height:e.size.original[1]})]),o}e.createHbFrame=r,e.initalizeHb=function(e,n){"www.slovenskenovice.si"===window.location.host&&window.afterIpromPrebid?(t.logInfo("Setting iframe creation through iprom initalizer..."),window.afterIpromPrebid.push((function(){return r(e,n)}))):r(e,n)},e.initForeignPixels=function(){const e=n(),t=e.bextag=e.bextag||{};if(t.foreignPixelDone)return;t.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,t){return!(!e&&void 0===t)&&(e?window.frameElement?.id===o:void 0===t||t.includes("hbdev.contentexchange.me"))},e.sendEventImage=function(e){const t=i(),n=t.createElement("img");n.src=e,n.onload=function(){t.body.removeChild(n)},n.style.display="none",t.body.appendChild(n)},e.crawlToPost=function(e){let t=e;for(;t&&!t.classList.contains("$bexAd_post");){if("BODY"===t.tagName)return null;if(!t.parentElement)return null;t=t.parentElement}return t},e.getCookie=function(e,t){const n="; ".concat(t).split("; ".concat(e,"="));if(2===n.length)return n.pop()?.split(";").shift()},e.filterConfig=function(e){const i=new URL(n().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],t.logInfo("filtered config",e)},e.getAvailableSizes=a,e.makeAuctionRequest=function(e,t,n){if("DISPLAY"==n.adType){const i=a(n);return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:n.size.original[0],height:n.size.original[1]},availableSizes:i,size:null,type:"DISPLAY",mediaType:"banner",hasResponse:!1,hasWon:!1,cpm:0,widget:n.widget}}return{id:t,domain:n.domain,placement:n.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,widget:n.widget}},e.makeAuctionResponse=function(e,t,n){if("DISPLAY"==n.adType){const i=a(n);return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:n.size.original[0],height:n.size.original[1]},availableSizes:i,size:{width:n.size.original[0],height:n.size.original[1]},type:"DISPLAY",mediaType:n.mediaType||"banner",hasResponse:!0,hasWon:!1,cpm:0,widget:n.widget}}return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:0,height:0},availableSizes:[{width:0,height:0}],size:{width:0,height:0},type:"NATIVE",mediaType:n.mediaType||"native",hasResponse:!0,hasWon:!1,cpm:0,widget:n.widget}},e.sendAuctionData=function(e){const t=n();e.window=[t.innerWidth,t.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 t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var n=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(n)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(n)}}return e},e.getID5=function(e){return new Promise((function(t,n){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 t(null);e.onAvailable((function(e){var n=e.getUserId();console.log("ID5",n),t(n)}))},e.head.appendChild(i)}))}}(n||(n={})),function(e){function t(){const e=n.findHighestWindow();let t=e.bextag;return t||(e.bextag=t={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=[]),t}e.getBexTag=t,e.getBexDevTag=function(){const e=t();let n=e._devTag;n||(e._devTag=n={targeting:{},headerbidding:{queue:[]},_internals:{headerbidding:{bexDisplayHB:{},bexNativeHB:{}},loaders:{},bds:{}},sendQueue:[],onBexAdFailed:[],onBexAdSuccess:[]});const i=n;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=[]),n}}(i||(i={}));let o,r,a,s,c,d=n.findHighestWindow(),l=n.findHighestDocument(),u=d.adformtag=d.adformtag||[],f=i.getBexTag();function g(e,t,n){return t=h(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)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(t,n||[],h(e).constructor):t.apply(e,n))}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,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function y(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n ')):"in article"!=d&&v.insertAdjacentHTML("beforebegin",'
')))}if(t){var f=n.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:t.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=n.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(){t.logInfo("Advertisement has been clicked!",i);for(let e of o.clickTrackers)n.sendEventImage(e)})),o.clickFuncs&&i.addEventListener("click",(function(){t.logInfo("Executing click functions for",i);for(let e of o.clickFuncs)try{e()}catch(n){t.logError(n,"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]?t.logWarning("Renderer already registered!",e.name):void(i[e.id]=e):t.logWarning("No renderer provided during registration!")},e.renderSticker=function(e,t){if(e.querySelector(".cex-adform-sticker")){const n=e.querySelector(".cex-adform-sticker");n.style.display="inline-block",n.innerHTML=!n?.classList.contains("cex-sticker-replace")&&n.innerHTML||t||"Ad"}else{const n=o.createElement("div");n.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",n.className="cex-adform-sticker",n.innerHTML=n.innerHTML||t||"Ad",e.appendChild(n)}},e.renderTemplate=r,e.renderElement=a,e.createHTMLTemplate=function(e){const t=o.createElement("template"),i=n.guid();return e=e.replace(/##rnd##/g,i),t.innerHTML=e,t},e.invokeRenderer=async function(e,n,o,r){if(!e||!o)return!1;const a=i[e];if(!a)return t.logWarning("Renderer is not registered!",e),!1;if(!a.isAvailable)return t.logWarning("Renderer is not available!",a.name),!1;try{if(await a.render(n,o,r))return t.logInfo("Successfuly rendered advertisment!",a.name,n),!0}catch(e){t.logError(e,"An error occured while trying to render ad!",a.name,n)}return t.logWarning("Failed to render ad using the renderer system!"),!1}}(c||(c={}));let _,k,A,P,T=[],E=null;function S(){if(E)for(let e of T)"resolve"===E.func?e[0](E.passedData):e[1](E.passedData)}!function(e){function i(){const e=n.findHighestWindow();let t=null,i=null,o=null,r=window;for(;!i;){try{if("function"==typeof r.__tcfapi){"function"==typeof r.__tcfapi&&(o=2,t=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:t,cmpFrame:i,cmpVersion:o}}e.findCMP=i,e.IsCMPAvailable=function(){return null!==i().cmpVersion},e.getTCString=async function(){return new Promise((function(e,t){const n=i();if(!n||!n.cmpFunction)return t("No CMP function found!");n.cmpFunction("getTCData",2,(function(n,i){return i?e(n.tcString):t("Failed to get TCData.tcstring!")}))}))},e.checkPermissions=async function(e){return new Promise((function(t,n){const o=i();if(!o||!o.cmpFunction)return t(!0);o.cmpFunction("getTCData",2,(function(n,i){if(!i)return t(!0);if(!n||!n.gdprApplies)return t(!0);var o=!0;for(var r of e)o=o&&n.purpose.consents[r];t(o)}))}))},e.WaitForConsent=function(){return new Promise((function(e,n){if(E)return t.logInfo("Already passed consent system! Continuing..."),"resolve"===E.func?e(E.passedData):n(E.passedData);if(T.push([e,n]),1===T.length){const{cmpFunction:e,cmpVersion:n}=i();if(!e)return E={func:"reject"},S();if(2!==n)return E={func:"resolve"},S();let o=!1;setTimeout((function(){o||(o=!0,E={func:"reject",passedData:"Timeout reached"},S())}),500);const r=function(n,i){if(!o){if(!i)return t.logProblem("Failed to set event listener for consent!"),o=!0,E={func:"resolve"},S();if("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus){if(t.logInfo("Successfully gotten tcloaded/useractioncomplete event!"),e("removeEventListener",2,(function(e){if(e)return t.logInfo("Successfully removed event listener for consent!")}),r),o)return;return o=!0,E={func:"resolve"},S()}}};e("addEventListener",2,r)}}))},e.RunTest=function(){const{cmpFunction:e,cmpVersion:n}=i();e&&2===n&&e("addEventListener",2,(function(e,n){n?t.logInfo("Caught tcdata",e):t.logProblem("Failed to set event listener for consent!")}))}}(_||(_={})),function(e){const o=n.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 t.logProblem("No adId specified!");const n=p[e];if(!n)return t.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(n)),t.logInfo("Sending click data",n)}function b(e){if(!e)return t.logProblem("No adId specified!");const n=p[e];if(!n)return t.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(n)),t.logInfo("Sending viewable impression data",n)}e.setWinningBid=function(e,n){if(!e)return t.logWarning("Bid was not specified!");const i=p[e.adId];if(!i)return t.logWarning("Failed to find registered response",e.adId);i.hasWon=!0,i.widget=n},e.mapAdUnitBidder=function(e,t,n){e&&t&&n&&((f[e]=f[e]||{})[t]=n)},e.registerBidResponse=function(e,t){p[e]=t},e.sendAuctionData=function(e,i){var o=arguments;const r=Object.assign({},i.requests[0])||n.makeAuctionRequest("error","N/A",{});r.source=e?"no auctData":"no auctID";const a=function(){i.requests.push(r),t.logWarning(...o)};if(!e)return a();if(!d[e])return a();if(!s[e])return a();const c=[];for(let t of d[e])p[t]&&c.push(p[t]);const l=s[e];i.requests=i.requests.concat(l),i.responses=i.responses.concat(c);const u=s[e][0].placement;t.logInfo("Adding auction data ("+u+") "+e,{responses:c,requests:s[e]})},e.sendGoogleData=function(e,n,i,o){if(!e||!n)return t.logProblem("No id or slot specified!")},e.sendImpression=function(e){if(!e)return t.logProblem("No adId specified!");const n=p[e];if(!n)return t.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(n)),t.logInfo("Sending impression data",n)},e.sendClick=m,e.sendViewableImpression=b,e.trackAdViewability=function(e,n){if(!e||!n)return t.logWarning("No adId or targetElement specified!");const i=new IntersectionObserver((function(t){for(let o of t)if(o.isIntersecting){b(e),i.unobserve(n);break}}),{root:null,rootMargin:"0px",threshold:.5});i.observe(n)},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 t=e.getAttribute("data-adId");t&&(o.focus(),m(t))}),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||[],t.logInfo("Auction initialized",e)})),h.onEvent("bidRequested",(function(e){l[e.auctionId]||t.logProblem("Failed to find registered auction",e.auctionId);let i=n.findHighestDocument(),o=n.findHighestWindow(),r=(i.referrer||"").split("/")[2]||"direct",a=o!=top?n.fixDomain(r):n.fixDomain(o.location.host);e.bids.forEach((function(t){let n,o=t.adUnitCode,r=i.getElementById(o),d=r&&r.getAttribute("domain")||a,l=o.split("-"),u=l[l.length-2],g="native"in t.mediaTypes?"NATIVE":"DISPLAY";if("DISPLAY"===g&&"sizes"in t){const e=t.sizes[0];n={width:e[0],height:e[1]}}else n={width:0,height:0};let p=[];if("DISPLAY"===g&&"sizes"in t)for(let e of t.sizes)p.push({width:e[0],height:e[1]});else p.push({width:0,height:0});const h=t.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:n,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 t.logProblem("Failed to find registered auction",e.auctionId);const n=c[e.auctionId][e.bidderCode+"_"+e.mediaType];if(!n)return t.logProblem("Failed to find registered request",e.bidderCode,e.mediaType,c[e.auctionId]);const i=Object.assign({},n);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 t=function(e){return e.Request="request",e.Response="response",e.Fallback="fallback",e.FallbackRequest="fallback_request",e}({});n.isDevelMode();const i=(n.findHighestWindow(),r.getPrebid()),o={},a={};e.sendAuctionData=function(e,n){t.Request,o[n],t.Response,a[n]},e.sendFallbackData=function(e,n){t.Fallback},e.sendFallbackRequestData=function(e){t.FallbackRequest},e.initPrebid=function(){return new Promise((function(e,t){i.que.push((function(){if(!i.onEvent)return t("Failed to find onEvent function!");i.onEvent("bidRequested",(function(e){o[e.auctionId]=o[e.auctionId]||[];const t=JSON.parse(JSON.stringify(e));t.gdprConsent&&delete t.gdprConsent,o[e.auctionId].push(t)})),i.onEvent("bidResponse",(function(e){a[e.auctionId]=a[e.auctionId]||[],a[e.auctionId].push(e)})),e()}))}))}}(A||(A={})),function(e){const n=[],i=r.getPrebid();function o(e){return new Promise((function(e,t){return e}))}e.sendAdUnit=function(e,r=[],a,s){let{floorPrice:c,ssp_id:d,strict_check:l,market:u,domain:f,duplicate_blocked:g,duplicate_count:p}=a;return c=c||0,new Promise((function(a,l){t.logInfo("Sending pbjs bid request",e),i.que.push((function(){if(!i.requestBids)return a({id:e[0].code,winner:null,auctionId:null,responses:[]});if(d){const e={validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:"ssp.adnetwork.agency",sid:d,hp:1}]}};i.setConfig&&i.setConfig({schain:e})}i.setConfig&&i.setConfig({gvlMapping:{contentexchange:864}}),i.setConfig&&i.setConfig({userSync:{filterSettings:{iframe:{bidders:["connectad"],filter:"include"}}},cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"}}),i.setConfig&&i.setConfig({floors:{}}),i.bidderSettings={standard:{storageAllowed:!0}};var l=e[0];i.requestBids({adUnits:e,labels:r,bidsBackHandler:async function(e,r,d){if(t.logInfo("Got prebid responses",e,"for auction",d,"for adUnit",l.code),!e)return a({id:l.code,winner:null,auctionId:d,responses:[]});const u=e[l.code];let f=[];if(!u)return a({id:l.code,winner:null,auctionId:d,responses:[]});u.bids.length&&(f=function(e,t){let n=[];if(!e.length)return n;for(let i of e)"contentexchange"===i.bidderCode&&(i.cpm=i.cpm/(.95*.65)),i.cpmp)continue}if(e.native&&n.includes(e.bidderCode))try{if(!await new Promise((function(e,t){return e})))continue}catch(e){t.logError(e,"Failed to scan bid!")}h=e}}h||t.logWarning("No bid has been allowed to be displayed! Ignoring...")}return h&&i.setWinningBid&&(i.setWinningBid(h.adId),"video"==h.mediaType&&o()),a({id:l.code,winner:h,auctionId:d,responses:u.bids})}})}))}))},e.init=function(){return new Promise((function(e,n){const o=document.createElement("script");o.src="https://hb.contentexchange.me/prebid",o.async=!0,o.onerror=function(){return n("Error loading prebid script!")},document.head.appendChild(o),i.que.push((async function(){const n={currency:{adServerCurrency:"EUR",conversionsRateFile:"https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=$$TODAY$$",bidderCurrencyDefault:{contentexchange:"USD"}}};_.IsCMPAvailable()&&(n.consentManagement={gdpr:{cmpApi:"iab",timeout:5e3,allowAuctionWithoutConsent:!0,defaultGdprScope:!1}},t.logInfo("Found CMP, using consent manager...")),n.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},n.enableTIDs=!0,i.setConfig&&i.setConfig(n),await k.init(),await A.initPrebid(),e()}))}))}}(P||(P={}));const D=window,F=i.getBexTag();F._internals,D.bex=D.bex||{},D.bex.loaders=D.bex.loaders||{},D.bex.loaders.loadDisplayPlacement=function(e){const r=n.findHighestWindow(),a=n.findHighestDocument();if(n.initForeignPixels(),!_.checkPermissions([1,2,3,4,7,9]))return t.logInfo("Not permitted");F.id5=F.id5||n.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():F,l=F.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={},b=e.placement.widget||e.placement.adFormat||"display";t.setAllowLogging(e.develMode);const y="div-ppas-mid-"+e.id+"-"+Math.floor(1e4*Math.random());t.logInfo("Called load for display placement with id",y,"should bypass adform",s);const x=y,v="adx.adform.net/adx/?mid=".concat(e.id,"&rnd=").concat(n.getRandomInt(1,1e5)),w={},I=[];if(s)w[v]={loaded:!1,auctionData:p};else{const i=n.makeAuctionRequest("adform-direct",y,e.placement);p.requests.push(i),I.push(v),d.placementHandlers=d.placementHandlers||{},w[v]=new Promise((function(i){d.placementHandlers[v]=function(o){if(t.logInfo("ON_ LOADED","DISPLAY",e.id,o.isEmpty?"fallback":"hit"),o&&!o.isEmpty){t.logInfo("direct-display resposnse",o);const r=n.makeAuctionResponse("adform-direct",y,e.placement);r.hasWon=!0,r.cpm=e.direct_cpm,p.responses.push(r),k.registerBidResponse(x,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(n){if(t.logInfo("ON_ RENDER","DISPLAY",e.id),!n||!n.ad||!n.ad.parentElement)return;const i=n.ad.parentElement;if(!i)return t.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(n.ad.parentElement)}catch(e){t.logError(e,"Failed to execute success event!",e)}}))}))}"www.slovenskenovice.si"===window.location.host&&(t.logInfo("Detected SlovenskeNovice, using iprom bypass..."),window.afterIpromPrebid=window.afterIpromPrebid||[]),e.develMode?n.findHighestDocument().querySelector("#".concat(n.hbdevFrameId))||n.initalizeHb(e.source,n.hbdevFrameId):n.findHighestDocument().querySelector("#".concat(n.hbFrameId))||n.initalizeHb(e.source,n.hbFrameId),I.length&&(t.logInfo("ADFORM PRELOAD DISPLAY",I),g.push({preload:I}));let A=document.currentScript;A&&(A=A.parentElement,function(n,i){if(e.placement.noLazy){try{i()}catch(e){t.logError(e,"Failed to execute code after intersect!")}return}const o=new IntersectionObserver((function(e){for(let r of e)if(r.isIntersecting){t.logInfo("Caught display intersection handle!",n),o.unobserve(n);try{i()}catch(e){t.logError(e,"Failed to execute code after intersect!")}break}}),{root:null,rootMargin:"350px 0px 350px 0px",threshold:0});o.observe(n)}(A,(async function(){let i=document.createElement("div");i.id=y,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"}),A.appendChild(i);const{loaded:o,auctionData:a}=await w[v];if(o){n.sendAuctionData(a),t.logInfo("Sending native data for adform-direct",o?"hit":"fallback",a);let s=document.createElement("script");s.setAttribute("data-adfscript",v),s.onerror=function(){var e;(e=i)&&e.parentElement&&e.parentElement.removeChild(e)},i.setAttribute("data-meta",JSON.stringify({domain:r.location.host,widget:b,position:1,cpm:e.direct_cpm,placement:e.id,translation:e.translation})),i.appendChild(s)}else!function(e,t,i,o){c||(n.filterConfig(e),u.queue.push((function(){f.executeAd(e.placement,t,i,o,m)})))}(e,i,a,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+":"+b,auctionMode:h}),delete D.bex.loaders.loadDisplayPlacement)};var H=self;for(var C in e)H[C]=e[C];e.__esModule&&Object.defineProperty(H,"__esModule",{value:!0})})();window.bex.loaders.loadDisplayPlacement({"id":"919546","unique_id":"7dfd1a2331d9cba0b231fef283c589e7","placement":{"id":"919546","type":"No Google","noLazy":true,"adFormat":"display","widget":"floater","strict_check":false,"market":"hr","domain":"ughr.contentexchange.me","adType":"DISPLAY","translation":"Reklama","cpm":0.04759399649,"size":{"universal":[[1,2]],"original":[1,2]},"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-919546","floors":{"default":4.7077},"bids":[{"bidder":"smilewanted","mediaType":"banner","params":{"zoneId":"contentexchange.me_hb_display"}},{"bidder":"smartadserver","mediaType":"banner","params":{"domain":"https://prg.smartadserver.com","siteId":363495,"pageId":1293495,"formatId":94897}}],"type":"DISPLAY","adFormat":"display","strict_check":false,"market":"hr","domain":"ughr.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"size":{"universal":[[1,2]],"original":[1,2]}}}},"source":"hb.contentexchange.me","allowKeywords":false,"size":"1x2","develMode":false,"direct_cpm":0.04759399649,"translation":"Reklama","test":["7dfd1a2331d9cba0b231fef283c589e7"],"generated":"2025-02-13T08:07:21.857Z"});