${a.dataDescription}
\n \n \n \n \n `;const c=this.shadowRoot.getElementById(`note-${this.getAttribute("id")}`),u=this.shadowRoot.getElementById(`close-${this.getAttribute("id")}`),l=this.shadowRoot.getElementById(`missclick-${this.getAttribute("id")}`);if(this.hasAttribute("data-imp-link")){let t=this.getAttribute("data-imp-link");window[ne]&&(t+=`&utsid=${window[ne]}`),t+=`&cbpage=${encodeURIComponent(P())}`,t+=`&cbref=${encodeURIComponent(U())}`;const e=document.createElement("img");e.src=t.toString(),e.setAttribute("class","impression"),c.appendChild(e)}O(c,"click",this.click),O(u,"click",this.close),O(l,"click",this.missclick)}}var ie=re;const se=1e3;var oe=class{#e={};#n;#s;#m="";#kt;#b=!1;#x="48.1";#St=[];#At=null;#Ct=!0;#Et;#S=!1;constructor(t){this.#n=new y(`ippg_new_${t.zoneId}`),this.#n.debug("init ippg with config:",t),this.#e=t,this.#s=window[t.adcashGlobalName],this.#Et=this.#e.refreshRate,customElements.get("in-page-message")||customElements.define("in-page-message",ie),this.#s.getClientHints(!1).then((t=>{this.#m=t,this.#ut()}))}#E(){let t=`${window.location.protocol}//${this.#e.adserverDomain}/script/push.php`;if(this.#e.adblockSettings&&this.#s.isAdbMode()){const{adserverDomain:e}=this.#e.adblockSettings,n=`/${et("abcdefgh0123456789")}`;t=`${window.location.protocol}//${e}${n}`}return t+=`?r=${this.#e.zoneId}&ipp=1`,this.#kt=X?this.#e.renderPosMobile:this.#e.renderPosDesktop,t+=`&mads=${this.#e.maxAds}&position=${this.#kt}`,this.#e.isAutoTag&&(t+=`&czid=${this.#e.collectiveZoneId}&atag=1`),this.#e.aggressivity&&(t+=`&aggr=${this.#e.aggressivity}`),this.#e.adblockSettings&&(t+="&abtg=1"),this.#b&&(t+="&rbd=1"),this.#e.recordPageView&&(t+="&ppv=1"),this.#e.abTest&&(t+=`&ab_test=${this.#e.abTest}`),this.#e.sub1&&(t+=`&sub1=${encodeURIComponent(this.#e.sub1)}`),this.#e.adblockSettings&&this.#e.adblockSettings.adbVersion&&(t+=`&adbv=${this.#e.adblockSettings.adbVersion}`),t=t+`&srs=${this.#s.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#e.uniqueFingerprint)}`+`&cbpage=${encodeURIComponent(P())}`+`&atv=${this.#x}`+`&cbref=${encodeURIComponent(U())}`,this.#m&&(t+=this.#m),this.#At&&(t+="&ipptr=1"),this.#e.adblockSettings&&this.#s.isAdbMode()?(t+="&sadbl=2",t+="&fmt=ippg",this.#n.debug(`bid url: ${t}`),nt(t)):(this.#n.debug(`bid url: ${t}`),t)}async#ut(){var t;if(this.#It()>=this.#e.maxAds||!this.#Ct||document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)return void(this.#e.refreshRate>0&&(this.#b=!0,p()(v()(t=this.#ut).call(t,this),this.#Et*se)));let e;try{e=await fetch(this.#E())}catch(t){if(this.#n.error(t),this.#e.adblockSettings&&!this.#S)return this.#n.debug("fetch call failed. Switch to adblck domain and path"),this.#S=!0,this.#s.enableAdbMode(),void this.#ut()}var n,r;if(204===e.status)return this.#n.debug("unsold invertory!"),void(this.#e.refreshRate>0&&(this.#n.debug(`refresh rate present. try bidding again after ${this.#Et} sec`),this.#b=!0,p()(v()(n=this.#ut).call(n,this),this.#Et*se),2*this.#Et<1200&&(this.#Et*=2)));if(200!==e.status&&202!==e.status||(this.#b=!0,e=await e.json(),this.#n.debug("response:",e)),e.fallback&&e.hp)return void this.#wt(e.fallback);if(e.fallback)return void this.#wt(e.fallback);if(e.hp,e.capped_ttl)return this.#n.debug(`capped! try bidding again after ${e.capped_ttl} sec`),void p()(v()(r=this.#ut).call(r,this),e.capped_ttl*se);this.#m&&(e.impression_url&&(e.impression_url+=this.#m),e.click_url&&(e.click_url+=this.#m));const i={type:e.type||1,script:e.script||"",title:e.title||"",description:e.description||"",icon:e.icon||e.image,link:e.click_url,impressionLink:e.impression_url||null,capped_ttl:S()(e.capped_ttl,10)||0};var s;this.#Et=this.#e.refreshRate,2!==i.type||this.#At?(this.#St.push(i),this.#Ct=!1,this.#Ot(),p()((()=>{this.#Ct=!0}),this.#Et*se)):(this.#At=i,this.#Ct=!1,await this.#Tt(),p()((()=>{this.#Ct=!0}),this.#Et*se)),this.#e.refreshRate>0&&(this.#b=!0,p()(v()(s=this.#ut).call(s,this),this.#Et*se))}#It(){return this.#At?this.#St.length+1:this.#St.length}#wt(t){this.#n.debug("fallback script str decoded:",t);const e=(new DOMParser).parseFromString(t,"text/html").querySelector("script");if(!e)return this.#n.error("invalid fallback script. move on"),null;this.#n.debug("fallback script:",e);const n=document.createElement("script");for(const t of e.attributes)n.setAttribute(t.name,t.value);n.src||(n.textContent=e.textContent),document.body.appendChild(n)}async#Tt(){const t=(new DOMParser).parseFromString(this.#At.script,"text/html").querySelector("script"),e=document.createElement("script");t.src?e.setAttribute("src",t.src):e.innerText=t.innerText;const n=()=>{var t;this.#n.debug("CT-CLICK"),fetch(this.#At.link,{mode:"no-cors"}),document.removeEventListener("ct-click",n),p()(v()(t=this.#ut).call(t,this),1e3)},r=()=>{this.#n.debug("CT-CLOSE"),document.removeEventListener("ct-click",n),document.removeEventListener("ct-close",r),this.#At=null,document.body.removeChild(e)};O(document,"ct-click",n),O(document,"ct-close",r);let i=this.#At.impressionLink;window[ne]&&(i+=`&utsid=${window[ne]}`),i+=`&cbpage=${encodeURIComponent(P())}`,i+=`&cbref=${encodeURIComponent(U())}`,e.onload=async()=>{try{await fetch(i.toString(),{mode:"no-cors"})}catch(t){return this.#n.debug(t),void(this.#e.adblockSettings&&!this.#s.isAdbMode()&&(this.#n.debug("imp failed: try alt domain and path"),this.#s.enableAdbMode()))}document.dispatchEvent(new CustomEvent("impression-event"))},e.onerror=()=>{this.#n.debug("custom html script failed to load"),this.#At=null},document.body.appendChild(e)}#Ot(){var t;this.#n.debug("drawing..");const e=document.querySelectorAll("in-page-message");if(e.length>0)for(let t=0;t{const n=document.createElement("in-page-message");n.setAttribute("doskip","1"),n.setAttribute("id",e.toString()),n.setAttribute("data-icon",t.icon),n.setAttribute("data-title",t.title),n.setAttribute("data-description",t.description),n.setAttribute("data-offset-top",this.#e.offsetTop),n.setAttribute("data-render-pos-desktop",this.#e.renderPosDesktop),n.setAttribute("data-render-pos-mobile",this.#e.renderPosMobile),t.impressionLink&&(n.setAttribute("data-imp-link",t.impressionLink),t.impressionLink=null,document.dispatchEvent(new CustomEvent("impression-event"))),n.addEventListener("inpageclick",(()=>{var r;if(X||this.#e.adblockSettings&&this.#s.isAdbMode()){const e=document.createElement("a");e.href=t.link,e.rel="noopener, noreferrer",e.target="_blank",e.click()}else try{window.open(t.link,"_blank","noopener,noreferrer")}catch{}n.remove(),d()(r=this.#St).call(r,e,1),this.#Ot()})),n.addEventListener("inpageclose",(()=>{var t;n.remove(),d()(t=this.#St).call(t,e,1),this.#Ot()})),document.body.appendChild(n)}))}};const ae="x4G9Tq2Kw6R7v1Dy3P0B5N8Lc9M2zF",ce="adblock-settings",ue=(()=>{let t=document.currentScript;return t||(t=document.getElementById("aclib")),t||(t=document.getElementById("adcash-lib")),t})();let le=null;var he=class{#Pt;#$t={pop:!1,autoTag:!1,inPagePush:!1,interstitial:!1};#Rt;#m;#Lt=new(e());#zt=new(e());#n;#jt=!1;#Ut;#Ft={mousedown:[],click:[],touchstart:[]};#Mt={mousedown:[],scroll:[],click:[],touchstart:[]};#v="youradexchange.com";#o=null;#Nt;#_t;#Bt=!1;isShowingPop=!1;#C;constructor(){if(le)return le;le=this,this.#n=new y("adcash"),window.addEventListener("mousedown",(t=>{var e;this.#n.debug("win mousedown with capture: in"),i()(e=this.#Ft.mousedown).call(e,(e=>{this.#n.debug("win mousedown with capture: calling observer"),e.callback(t)}))}),!0),window.addEventListener("mousedown",(t=>{var e;this.#n.debug("win mousedown: in"),i()(e=this.#Mt.mousedown).call(e,(e=>{this.#n.debug("win mousedown: calling observer"),e.callback(t)}))}),!1),window.addEventListener("click",(t=>{var e;this.#n.debug("win click with capture: in"),i()(e=this.#Ft.click).call(e,(e=>{this.#n.debug("win click with capture: calling observer"),e.callback(t)}))}),!0),window.addEventListener("click",(t=>{var e;this.#n.debug("win click: in"),i()(e=this.#Mt.click).call(e,(e=>{this.#n.debug("win click: calling observer"),e.callback(t)}))}),!1),document.addEventListener("mousedown",(t=>{var e;this.#n.debug("doc mousedown: in"),i()(e=this.#Mt.mousedown).call(e,(e=>{this.#n.debug("doc mousedown: calling observer"),e.callback(t)}))})),document.addEventListener("mousedown",(t=>{var e;this.#n.debug("doc mousedown with capture: in"),i()(e=this.#Ft.mousedown).call(e,(e=>{this.#n.debug("doc mousedown with capture: calling observer"),e.callback(t)}))}),!0),window.addEventListener("scroll",(t=>{var e;i()(e=this.#Mt.scroll).call(e,(e=>{e.callback(t)}))})),document.addEventListener("click",(t=>{var e;this.#n.debug("doc click: in"),i()(e=this.#Mt.click).call(e,(e=>{this.#n.debug("doc click: calling observer"),e.callback(t)}))})),document.addEventListener("click",(t=>{var e;this.#n.debug("doc click with capture: in"),i()(e=this.#Ft.click).call(e,(e=>{this.#n.debug("doc click with capture: calling observer"),e.callback(t)}))}),!0),this.getClientHints(),this.#_t=(()=>{if(void 0===window.rgxngibqxq||""===window.rgxngibqxq){let t=[],e="0123456789abcdefghijklmnopqrstuvwxyz";for(let n=0;n<32;n++)t[n]=e.substr(Math.floor(16*Math.random()),1);t[14]="4",t[19]=e.substr(3&t[19]|8,1),window.rgxngibqxq=t.join("")}return window.rgxngibqxq})(),this.#Nt=(()=>{const t=Math.floor(11*Math.random())+5;let e="";for(let n=0;n1&&void 0!==arguments[1]&&arguments[1];return"undefined"!=typeof navigator&&"userAgentData"in navigator?navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((t=>{const n={};if(t.hasOwnProperty("brands")&&t.brands.length>0){const e=[];for(let n=0;n(t.error("error getting client hints:",e),""))):e?{}:""}(this.#n,!0);let t="";for(let e in this.#Rt)t+=`&${e}=${this.#Rt[e]}`;this.#m=t}return t?this.#Rt:this.#m}getCdnDomain(){return this.#Pt}getSesionRandomString(){return this.#_t}enableAdbMode(){this.#n.debug("enable adb mode"),this.#Bt=!0}isAdbMode(){return this.#Bt}#qt(){this.#Wt();var t=this;const e=this.#Nt;window[e]=t,this.#Ut=l()((()=>{window[e]&&window[e]===t||(window[e]=t)}),500)}#Wt(){this.#Ut&&(clearInterval(this.#Ut),this.#Ut=null)}subscribe(t,e,n){if(!this.#Ft[t]||!this.#Mt[t])throw new Error(`${t} is not observable!`);n?this.#Ft[t].push(e):this.#Mt[t].push(e)}unsubscribe(t,e,n){if(!this.#Ft[t]||!this.#Mt[t])throw new Error(`${t} is not observable!`);if(n)for(let n=0;n{const e=document.createElement("link");e.rel="dns-prefetch",e.href=`//${t}`,document.head.appendChild(e)}))}p()(v()(t=this.#Dt).call(t,this),100)}getZoneIds(){return b()(this.#Lt)}runPop(t){this.#qt();const{zoneId:e,refreshRate:n,delay:r,targetElementsCssSelector:i,triggerOnTargetElementsClick:s,targetCountries:o,triggerOnTargetCountries:a,sub1:c,sub2:u,publisherUrl:l,storeUrl:h,c1:d,c2:f,c3:p,pubHash:g,pubClickId:v,pubValue:m,fallbackOn:b,isAutoTag:y,collectiveZoneId:w,aggressivity:x,recordPageView:k,linkedZoneId:S,abTest:A,tagVersionSuffix:C}=t;if(!e)throw new Error("mandatory zoneId is not provided!");if(!ht(e))throw new Error("zoneId is not a string!");if(void 0!==n&&(!lt(n)||n<0))throw new Error("refreshRate is not an integer or is less than zero");if(void 0!==r&&(!lt(r)||r<0))throw new Error("delay is not an integer or is less than zero");if(void 0!==i){if(!ht(i))throw new Error("targetElementsCssSelector is not a string");if(!(t=>{try{document.createDocumentFragment().querySelector(t)}catch{return!1}return!0})(i))throw new Error("targetElementsCssSelector is not a valid css selector");if(!ut(s))throw new Error("triggerOnTargetElementsClick is not a boolean")}if(void 0!==o){if(!(t=>{if(!ot()(t))return!1;if(0===t.length)return!1;for(let e=0;e0&&p<10&&(p<5?p*=60:p=30),new oe({zoneId:e,refreshRate:p??60,delay:n??0,maxAds:r??1,renderPosDesktop:i??"top",renderPosMobile:s??"top",offsetTop:o??0,sub1:a,isAutoTag:c,collectiveZoneId:u,aggressivity:l,recordPageView:h,abTest:d,tagVersionSuffix:f,adserverDomain:this.#v,adblockSettings:this.#o,adcashGlobalName:this.#Nt,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#C})}runBanner(t){this.#qt();const{zoneId:e,width:n,height:r,renderIn:i,sub1:s}=t;if(!e)throw new Error("mandatory zoneId is not provided!");if(!ht(e))throw new Error("zoneId is not a string!");if(void 0!==n&&!lt(n))throw new Error("Banner width is not an integer");if(void 0!==r&&!lt(r))throw new Error("Banner height is not an integer");if(this.#n.debug("loading banner on page",e),!i)var o=document.currentScript.parentElement;const a={adcashGlobalName:this.#Nt,zoneId:e,width:n,height:r,renderIn:i,currentElement:o,sub1:s,uniqueFingerprint:this.#C};if(this.#$t.banner||this.#jt){if(window.Banner)return this.#Lt.add(a.zoneId),void new Banner(a);const t=l()((()=>{window.Banner&&(this.#Lt.add(a.zoneId),new Banner(a),clearInterval(t))}),100)}else{this.#jt=!0;var c=document.createElement("script");c.type="text/javascript",c.src=`${location.protocol}//${this.#Pt}/script/banner.js`,c.onload=()=>{this.#$t.banner=!0,this.#jt=!1,this.#Lt.add(a.zoneId),new Banner(a)},c.onerror=()=>{this.#$t.banner=!1,this.#jt=!1,this.#n.error(`failed loading ${c.src}`)},c.setAttribute("data-adel","ban"),c.setAttribute("a-lib","1"),document.head.appendChild(c)}}runInterstitial(t){if(this.#$t.interstitial)return void this.#n.error("interstitial zone already loaded on page");this.#$t.interstitial=!0,this.#qt();const{zoneId:e,sub1:n,isAutoTag:r,collectiveZoneId:i,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c}=t;if(!e)throw new Error("mandatory zoneId is not provided!");if(!ht(e))throw new Error("zoneId is not a string!");this.#n.debug("loading interstitial on page");const u={zoneId:e,sub1:n,isAutoTag:r,collectiveZoneId:i,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c,adcashGlobalName:this.#Nt,adserverDomain:this.#v,adblockSettings:this.#o,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#C};this.#Lt.add(e),new te(u)}async#Gt(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.#n.debug("fetch collective zone config");let n=`${window.location.protocol}//${this.#v}/ad/czcf.php`;if(this.isAdbMode()){const t=`/${et("abcdefgh0123456789")}`;n=`${window.location.protocol}//${this.#o.adserverDomain}${t}`}n+=`?cz=${t}`;const r=await this.getClientHints();let i;r&&(n+=r),this.isAdbMode()&&(n+="&sadbl=2",n+="&fmt=atg",n=nt(n)),this.#n.debug("collective zone config url: ",n);try{i=await fetch(n)}catch(n){return this.#n.error(n),this.#o&&e?(this.#n.debug("collective zone config fetch failed: try alt domain and path"),this.enableAdbMode(),this.#Gt(t,!1)):null}return 200!==i.status?null:i.json()}async runAutoTag(t){if(this.#$t.autoTag)return void this.#n.error("autotag zone already loaded on page");this.#$t.autoTag=!0,this.#qt();const e=t.zoneId;if(!e)throw new Error("mandatory zoneId is not provided!");if(!ht(e))throw new Error("zoneId is not a string!");const n=await this.#Gt(e);if(n)if(this.#n.debug("collective zone config:",n),n.rotationList)this.#n.debug("running in ROTATION MODE (rotation present)"),this.#Lt.add(e),new Wt({adcashGlobalName:this.#Nt,collectiveZoneConfig:n,adserverDomain:this.#v,adblockSettings:this.#o,clientHintsQueryStr:this.#m,tagVersionSuffix:t.tagVersionSuffix,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#C});else{this.#n.debug("running in NORMAL MODE (no rotation)");const r=n.indexedFormats;let i=!0;for(const s in r){switch(s){case"suv4":case"pop":this.runPop({zoneId:r[s].zoneId.toString(),targetElementsCssSelector:r[s]["element-list"],triggerOnTargetElementsClick:"allow"===r[s]["element-action"],targetCountries:r[s]["country-list"],triggerOnTargetCountries:"allow"===r[s]["country-action"],isAutoTag:!0,collectiveZoneId:e,aggressivity:n.aggressivity,abTest:n.ab_test,recordPageView:i,tagVersionSuffix:t.tagVersionSuffix});break;case"interstitial":this.runInterstitial({zoneId:r[s].zoneId.toString(),isAutoTag:!0,collectiveZoneId:e,aggressivity:n.aggressivity,abTest:n.ab_test,recordPageView:i,tagVersionSuffix:t.tagVersionSuffix});break;case"ippg":this.runInPagePush({zoneId:r[s].zoneId.toString(),refreshRate:r[s].rr,delay:r[s].d,maxAds:r[s].mads,renderPosDesktop:r[s]["render-pos-desktop"],renderPosMobile:r[s]["render-pos-mobile"],offsetTop:r[s]["offset-top"],isAutoTag:!0,collectiveZoneId:e,aggressivity:n.aggressivity,abTest:n.ab_test,recordPageView:i,tagVersionSuffix:t.tagVersionSuffix});break;default:this.#n.error(`ad format type not recognised from collective zone config. adformat.type: ${s}; czid: ${e}`)}i=!1}}else this.#n.error(`failed to fetch collective zone config! czid: ${e}`)}};const de=new y("aclib_adblock_index");window.Adcash?de.debug("lib already on page. exit"):(de.debug("load lib on page"),window.Adcash=he,window.AtcshAltNm=he,window.aclib=new he)}()}(),window.aclib?aclib.runPop({zoneId:"6106694"}):console.log("err loading adbtg")