${a.dataDescription}
\n \n \n \n\n`;const c=this.shadowRoot.getElementById(`note-${this.getAttribute("id")}`),l=this.shadowRoot.getElementById(`close-${this.getAttribute("id")}`),d=this.shadowRoot.getElementById(`missclick-${this.getAttribute("id")}`);if(this.hasAttribute("data-imp-link")){let e=this.getAttribute("data-imp-link");window[at]&&(e+=`&utsid=${window[at]}`),e+=`&cbpage=${encodeURIComponent(P())}`,e+=`&cbref=${encodeURIComponent(B())}`;const t=document.createElement("img");t.src=e.toString(),t.setAttribute("class","impression"),c.appendChild(t)}I(c,"click",this.click),I(l,"click",this.close),I(d,"click",this.missclick)}}var lt=ct,dt=class{#t={};#i;#s;#b="";#Te;#m=!1;#Ce=!1;#x="53.0";#Oe=[];#Ie=null;#de=10;#A=!1;constructor(e){this.#i=new y(`ipp_new_${e.zoneId}`),this.#i.debug("init ipp with config:",e),this.#t=e,this.#s=window[e.adcashGlobalName],customElements.get("in-page-message")||customElements.define("in-page-message",lt),e.tagVersionSuffix&&(this.#x+=e.tagVersionSuffix),this.#s.getClientHints(!1).then((e=>{this.#b=e,this.#he()}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/push.php`;if(this.#t.adblockSettings&&this.#s.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,i=`/${ne("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#t.zoneId}&ipp=1`,this.#Te=te?this.#t.renderPosMobile:this.#t.renderPosDesktop,e+=`&mads=${this.#t.maxAds}&position=${this.#Te}`,this.#t.isAutoTag&&(e+=`&czid=${this.#t.collectiveZoneId}&atag=1`),this.#t.aggressivity&&(e+=`&aggr=${this.#t.aggressivity}`),this.#t.adblockSettings&&(e+="&abtg=1"),this.#m&&(e+="&rbd=1"),this.#t.recordPageView&&(e+="&ppv=1"),this.#t.abTest&&(e+=`&ab_test=${this.#t.abTest}`),this.#t.sub1&&(e+=`&sub1=${encodeURIComponent(this.#t.sub1)}`),this.#t.adblockSettings&&this.#t.adblockSettings.adbVersion&&(e+=`&adbv=${this.#t.adblockSettings.adbVersion}`),e=e+`&srs=${this.#s.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`+`&cbpage=${encodeURIComponent(P())}`+`&atv=${this.#x}`+`&cbref=${encodeURIComponent(B())}`,this.#b&&(e+=this.#b),this.#Ie&&(e+="&ipptr=1"),this.#t.adblockSettings&&this.#s.isAdbMode()?(e+="&sadbl=2",e+="&fmt=ippg",this.#i.debug(`bid url: ${e}`),re(e)):(this.#i.debug(`bid url: ${e}`),e)}#Ee(e){var t;this.#i.debug(`rebid after ${e} sec`),f()(v()(t=this.#he).call(t,this),1e3*e)}#pe(){this.#de<1200&&(this.#de*=2)}#ve(){this.#de=10}#Re(){this.#Ee(this.#de),this.#pe()}async#he(){if(this.#Pe()>=this.#t.maxAds||document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)return this.#i.debug("max ads reached or fullscreen."),void(this.#t.refreshRate>0&&this.#Ee(this.#t.refreshRate));let e,t;try{if(e=await fetch(this.#C()),!e.ok)throw new Error(`HTTP error! Status: ${e.status}`)}catch(e){return this.#i.error(e),this.#t.adblockSettings&&!this.#A?(this.#i.debug("fetch failed. adb present - switch to adb mode"),this.#A=!0,this.#s.enableAdbMode(),void this.#he()):this.#s.isAdbMode()?void this.#i.debug("fetch failed with adb mode on. exit"):void this.#Re()}return 204===e.status?(this.#i.debug("unsold inventory!"),this.#m=!0,void this.#Re()):200!==e.status&&202!==e.status?(this.#i.error(`response status ${e.status} not recognised!`),void this.#Re()):(this.#m=!0,t=await e.json(),this.#i.debug("response data:",t),202===e.status?t.capped_ttl?(this.#i.debug("capped!"),void this.#Ee(t.capped_ttl)):(t.hp&&this.#$e(t.hp),void this.#Re()):(t.hp&&this.#$e(t.hp),t.fallback?this.#Ae(t.fallback)?void this.#i.debug("fallback rendered. exit!"):void this.#Re():(this.#ve(),this.#b&&(t.impression_url&&(t.impression_url+=this.#b),t.click_url&&(t.click_url+=this.#b)),2===t.type?this.#Ie?this.#i.debug("custom ipp html already present"):this.#Le({script:t.script||"",link:t.click_url,impressionLink:t.impression_url||null}):(this.#Oe.push({title:t.title||"",description:t.description||"",icon:t.icon||t.image,link:t.click_url,impressionLink:t.impression_url||null}),this.#ze()),void(this.#t.refreshRate>0&&this.#Ee(this.#t.refreshRate)))))}#Pe(){return this.#Ie?this.#Oe.length+1:this.#Oe.length}#Ae(e){this.#i.debug("fallback script str decoded:",e);const t=(new DOMParser).parseFromString(e,"text/html").querySelector("script");if(!t)return this.#i.error("invalid fallback script. move on"),!1;this.#i.debug("fallback script:",t);const i=document.createElement("script");for(const e of t.attributes)i.setAttribute(e.name,e.value);return i.src||(i.textContent=t.textContent),document.body.appendChild(i),!0}#$e(e){if(this.#Ce)return void this.#i.debug("hp already attached");if(this.#t.isAutoTag)return void this.#i.debug("hp not allowed when autotag");this.#Ce=!0;const t=JSON.parse(atob(e));this.#i.debug("attach hp. hp data:",t);const i={zoneId:t.pop_zone_id.toString(),linkedZoneId:t.source_zone_id.toString(),isHPop:!0};var n;t.attributes&&(t.attributes["element-list"]&&(i.targetElementsCssSelector=t.attributes["element-list"],i.triggerOnTargetElementsClick="allow"===t.attributes["element-action"]),t.attributes["country-list"]&&(i.targetCountries=tt()(n=t.attributes["country-list"]).call(n).split(","),i.triggerOnTargetCountries="allow"===t.attributes["country-action"])),this.#s.runPop(i)}#Le(e){this.#Ie=e;const t=(new DOMParser).parseFromString(this.#Ie.script,"text/html").querySelector("script"),i=document.createElement("script");t.src?i.setAttribute("src",t.src):i.innerText=t.innerText;const n=()=>{this.#i.debug("CT-CLICK"),fetch(this.#Ie.link,{mode:"no-cors"}),document.removeEventListener("ct-click",n)},r=()=>{this.#i.debug("CT-CLOSE"),document.removeEventListener("ct-click",n),document.removeEventListener("ct-close",r),this.#Ie=null,document.body.removeChild(i)};I(document,"ct-click",n),I(document,"ct-close",r);let s=this.#Ie.impressionLink;window[at]&&(s+=`&utsid=${window[at]}`),s+=`&cbpage=${encodeURIComponent(P())}`,s+=`&cbref=${encodeURIComponent(B())}`,i.onload=async()=>{try{await fetch(s.toString())}catch(e){return this.#i.debug(e),void(this.#t.adblockSettings&&!this.#s.isAdbMode()&&(this.#i.debug("imp failed: try alt domain and path"),this.#s.enableAdbMode()))}document.dispatchEvent(new CustomEvent("impression-event"))},i.onerror=()=>{this.#i.debug("custom html script failed to load"),this.#Ie=null},document.body.appendChild(i)}#ze(){var e;this.#i.debug("drawing..");const t=document.querySelectorAll("in-page-message");if(t.length>0)for(let e=0;e{const i=document.createElement("in-page-message");i.setAttribute("doskip","1"),i.setAttribute("id",t.toString()),i.setAttribute("data-icon",e.icon),i.setAttribute("data-title",e.title),i.setAttribute("data-description",e.description),i.setAttribute("data-offset-top",this.#t.offsetTop),i.setAttribute("data-render-pos-desktop",this.#t.renderPosDesktop),i.setAttribute("data-render-pos-mobile",this.#t.renderPosMobile),e.impressionLink&&(i.setAttribute("data-imp-link",e.impressionLink),e.impressionLink=null,document.dispatchEvent(new CustomEvent("impression-event"))),i.addEventListener(st,(()=>{var n;if(te||this.#t.adblockSettings&&this.#s.isAdbMode()){const t=document.createElement("a");t.href=e.link,t.rel="noopener, noreferrer",t.target="_blank",t.click()}else try{window.open(e.link,"_blank","noopener,noreferrer")}catch{}i.remove(),h()(n=this.#Oe).call(n,t,1),this.#ze()})),i.addEventListener(ot,(()=>{var e;i.remove(),h()(e=this.#Oe).call(e,t,1),this.#ze()})),document.body.appendChild(i)}))}},ut=i(111),ht=i.n(ut),gt=i(8607),ft=i.n(gt),pt=class{#s;#t={};#i;#Fe="";#Ue;#l=null;#Ne=null;#Be=null;#je=null;#He;#Me;#v="youradexchange.com";#De="velocecdn.com";#_e;#o;#A=!1;#x="53.0";constructor(e){this.#i=new y(`banner_${e.zoneId}`),this.#s=window[e.adcashGlobalName],this.#i.debug("init banner with config:",e),this.#t=e,this.#l=this.#t.zoneId,this.#Ne=this.#t.width,this.#Be=this.#t.height,this.#je=this.#t.renderIn,this.#o=this.#t.adblockSettings,this.#t.currentScript&&(this.#_e=this.#t.currentScript),this.#He=this.#Me=document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth,e.tagVersionSuffix&&(this.#x+=e.tagVersionSuffix),this.#i.debug("tag version:",this.#x),this.#Ve()}#We(){const e=this.#Ue.impression_url;(new Image).src=e}async#Ve(){this.#i.debug("get initial ad and config"),this.#Fe=await R(this.#i);const e=await this.#qe();let t;this.#i.debug("URL to fetch",e);try{t=await fetch(e)}catch(e){return this.#i.error(e),this.#o&&!this.#A?(this.#i.debug("fetch failed: try alt domain and path"),this.#A=!0,this.#s.enableAdbMode(),void this.#Ve()):this.#s.isAdbMode()?void this.#i.debug("fetch failed: alt domain and path blocked. exit"):void this.#i.debug("fetch failed. exit")}200===t.status||202===t.status?(this.#i.debug("initial fetch received 200 or 202"),this.#Ue=await t.json(),this.#Ge()):204===t.status&&this.#i.debug("initial fetch received 204. No inventory")}async#qe(){let e=`${window.location.protocol}//${this.#v}/script/banner.php`;if(this.#o&&this.#s.isAdbMode()){const{adserverDomain:t}=this.#o,i=`/${ne("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#l}`,e+=`&cbpage=${encodeURIComponent(P())}`,e+=`&cbref=${encodeURIComponent(B())}`,e+=`&cbdescription=${encodeURIComponent(j("description"))}`,e+=`&cbkeywords=${encodeURIComponent(j("keywords"))}`,e+=`&cbtitle=${encodeURIComponent(N())}`,e+=`&srs=${z()}`,e+=`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`,e+=`&atv=${this.#x}`,this.#t.sub1&&(e+=`&sub1=${encodeURIComponent(this.#t.sub1)}`),this.#o&&this.#s.isAdbMode()?(e+="&sadbl=2",e+="&fmt=bnr",re(e)):e}#Ge(){if(!this.#Ue||"undefined"===this.#Ue)return;if(this.#Ue.hp&&(this.#Ze(this.#Ue.hp),1===ht()(this.#Ue).length))return;let e;e=this.#je?document.querySelector(this.#je):this.#t.currentElement?this.#t.currentElement:this.#_e.parentElement,this.#Qe(e);const t=this.#Ke();e.appendChild(t)}#Ke(){let e;return this.#Ue.fallback?(this.#i.debug("Banner type - fallback"),e=this.#Je()):1===this.#Ue.render_image?(this.#i.debug("Banner type - image"),e=this.#Ye()):(this.#i.debug("Banner type - html"),e=this.#Xe()),this.#Ue.fallback||this.#We(),this.#s||this.#et(),e}#Ye(){const e=document.createElement("a");e.href=this.#Ue.click_url,e.target="_blank",e.rel="noopener, noreferrer",e.style.display="block",e.style.width=`${this.#Ne?this.#Ne:this.#Ue.width}px`,e.style.height=`${this.#Be?this.#Be:this.#Ue.height}px`,e.style.position="relative",e.style.top=0,e.style.left=0,e.style.right=0,e.style.bottom=0,e.setAttribute("doskip","1"),e.setAttribute(Be,"1");const t=document.createElement("img");if(t.src=this.#Ue.image_url,t.target="_blank",t.width=this.#Ne?this.#Ne:this.#Ue.width,t.height=this.#Be?this.#Be:this.#Ue.height,this.#Ue.width>this.#He&&this.#Ue.force_resize){const i=(this.#Ne?this.#Ne:this.#Ue.width)/this.#Me;e.style.width=`${this.#Me}px`,e.style.height=`${Math.round((this.#Be?this.#Be:this.#Ue.height)/i)}px`,t.style="max-width: 100%;",t.width=this.#Me,t.height=Math.round((this.#Be?this.#Be:this.#Ue.height)/i)}return e.appendChild(t),e}#Xe(){const e=`banner_${this.#l}`,t=document.createElement("div");t.id=e,t.style.display="block",t.style.width=`${this.#Ne?this.#Ne:this.#Ue.width}px`,t.style.height=`${this.#Be?this.#Be:this.#Ue.height}px`,t.style.position="relative",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.width=this.#Ne?this.#Ne:this.#Ue.width,t.height=this.#Be?this.#Be:this.#Ue.height,t.setAttribute("doskip","1"),t.setAttribute(Be,"1"),this.#tt(t,this.#Ue.html);const i=()=>{this.#i.debug("click recorded:",this.#Ue.click_url),(new Image).src=this.#Ue.click_url,r()},n=()=>{this.#i.debug("click on divNode"),i()},r=()=>{t.removeEventListener("click",n),clearInterval(s)};t.addEventListener("click",n);const s=d()((()=>{document.activeElement&&"IFRAME"===document.activeElement.tagName&&((e,t)=>{let i=e.parentElement;for(;i;){if(i.id===t)return i;i=i.parentElement}return null})(document.activeElement,e)&&(this.#i.debug("click on iframe"),i())}),200);return t}#tt(e,t){var i;e.innerHTML=t,r()(i=m()(e.querySelectorAll("script"))).call(i,(e=>{var t;const i=document.createElement("script");r()(t=m()(e.attributes)).call(t,(e=>{i.setAttribute(e.name,e.value)}));const n=document.createTextNode(e.innerHTML);i.appendChild(n),e.parentNode.replaceChild(i,e)}))}#Je(){const e=`banner_${this.#l}`,t=document.createElement("iframe");return t.id=e,t.style.border="medium none",t.style.padding="0",t.style.margin="0",t.style.width=`${this.#Ne?this.#Ne:this.#Ue.width}px`,t.style.height=`${this.#Be?this.#Be:this.#Ue.height}px`,t.width=this.#Ne?this.#Ne:this.#Ue.width,t.height=this.#Be?this.#Be:this.#Ue.height,t.scrolling="no",t.vspace="0",t.hspace="0",t.allowtransparency="true",t.allowfullscreen="true",t.srcdoc=this.#Ue.fallback,t}#Ze=e=>{const t=JSON.parse(atob(e));if(this.#s){const e={zoneId:t.pop_zone_id.toString(),linkedZoneId:t.source_zone_id.toString()};var i;return t.attributes&&(t.attributes["element-list"]&&(e.targetElementsCssSelector=t.attributes["element-list"],e.triggerOnTargetElementsClick="allow"===t.attributes["element-action"]),t.attributes["country-list"]&&(e.targetCountries=tt()(i=t.attributes["country-list"]).call(i).split(","),e.triggerOnTargetCountries="allow"===t.attributes["country-action"])),void this.#s.runPop(e)}const n=document.createElement("script");if(n.type="text/javascript",n.src=`//${this.#De}/script/suv4.js`,n.setAttribute("zid",t.pop_zone_id),n.setAttribute("lpzi",t.source_zone_id),n.setAttribute("data-adel","lwsu"),n.setAttribute("adlm","ipvipplm"),t.attributes)for(const e in t.attributes)n.setAttribute(e,t.attributes[e]);document.body.appendChild(n)};#Qe(e){if(this.#i.debug("Initial viewport:",this.#He),this.#Ue.width>this.#He&&this.#Ue.force_resize){var t=window.getComputedStyle(e),i=ft()(t.paddingLeft),n=ft()(t.marginLeft);this.#Me=e.clientWidth-i-n,this.#i.debug("Parent element width:",this.#Me)}}#et(){const e=document.createElement("a");e.style.display="none",e.style.visibility="hidden",e.style.position="relative",e.style.left="-1000px",e.style.top="-1000px",e.href=this.#Ue.bot_link,document.body.appendChild(e)}};const vt="x4G9Tq2Kw6R7v1Dy3P0B5N8Lc9M2zF",bt="adblock-settings",mt=(()=>{let e=document.currentScript;return e||(e=document.getElementById("aclib")),e||(e=document.getElementById("adcash-lib")),e})();let yt=null;var wt=class{#De;#it={pop:!1,autoTag:!1,inPagePush:!1,interstitial:!1};#nt;#b;#rt=new(t());#i;#st;#ot={mousedown:[],click:[],touchstart:[]};#at={mousedown:[],scroll:[],click:[],touchstart:[]};#v="youradexchange.com";#o=null;#ct;#lt;#dt=!1;isShowingPop=!1;#T;constructor(){if(yt)return yt;yt=this,this.#i=new y("aclib_adbl"),window.addEventListener("mousedown",(e=>{var t;this.#i.debug("win mousedown with capture: in"),r()(t=this.#ot.mousedown).call(t,(t=>{this.#i.debug("win mousedown with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("mousedown",(e=>{var t;this.#i.debug("win mousedown: in"),r()(t=this.#at.mousedown).call(t,(t=>{this.#i.debug("win mousedown: calling observer"),t.callback(e)}))}),!1),window.addEventListener("click",(e=>{var t;this.#i.debug("win click with capture: in"),r()(t=this.#ot.click).call(t,(t=>{this.#i.debug("win click with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("click",(e=>{var t;this.#i.debug("win click: in"),r()(t=this.#at.click).call(t,(t=>{this.#i.debug("win click: calling observer"),t.callback(e)}))}),!1),document.addEventListener("mousedown",(e=>{var t;this.#i.debug("doc mousedown: in"),r()(t=this.#at.mousedown).call(t,(t=>{this.#i.debug("doc mousedown: calling observer"),t.callback(e)}))})),document.addEventListener("mousedown",(e=>{var t;this.#i.debug("doc mousedown with capture: in"),r()(t=this.#ot.mousedown).call(t,(t=>{this.#i.debug("doc mousedown with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("scroll",(e=>{var t;r()(t=this.#at.scroll).call(t,(t=>{t.callback(e)}))})),document.addEventListener("click",(e=>{var t;this.#i.debug("doc click: in"),r()(t=this.#at.click).call(t,(t=>{this.#i.debug("doc click: calling observer"),t.callback(e)}))})),document.addEventListener("click",(e=>{var t;this.#i.debug("doc click with capture: in"),r()(t=this.#ot.click).call(t,(t=>{this.#i.debug("doc click with capture: calling observer"),t.callback(e)}))}),!0),this.getClientHints(),this.#lt=z(),this.#ct=(()=>{const e=Math.floor(11*Math.random())+5;let t="";for(let i=0;i{window[t]&&window[t]===e||(window[t]=e)}),500)}#pt(){this.#st&&(clearInterval(this.#st),this.#st=null)}subscribe(e,t,i){if(!this.#ot[e]||!this.#at[e])throw new Error(`${e} is not observable!`);i?this.#ot[e].push(t):this.#at[e].push(t)}unsubscribe(e,t,i){if(!this.#ot[e]||!this.#at[e])throw new Error(`${e} is not observable!`);if(i)for(let i=0;i{const t=document.createElement("link");t.rel="dns-prefetch",t.href=`//${e}`,document.head.appendChild(t)}))}f()(v()(e=this.#ut).call(e,this),100)}getZoneIds(){return m()(this.#rt)}runPop(e){this.#ft();const{zoneId:t,refreshRate:i,delay:n,targetElementsCssSelector:r,triggerOnTargetElementsClick:s,targetCountries:o,triggerOnTargetCountries:a,sub1:c,sub2:l,publisherUrl:d,storeUrl:u,c1:h,c2:g,c3:f,pubHash:p,pubClickId:v,pubValue:b,fallbackOn:m,isAutoTag:y,collectiveZoneId:w,aggressivity:x,recordPageView:k,linkedZoneId:A,abTest:S,tagVersionSuffix:T}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!fe(t))throw new Error("zoneId is not a string!");if(void 0!==i&&(!ge(i)||i<0))throw new Error("refreshRate is not an integer or is less than zero");if(void 0!==n&&(!ge(n)||n<0))throw new Error("delay is not an integer or is less than zero");if(void 0!==r){if(!fe(r))throw new Error("targetElementsCssSelector is not a string");if(!(e=>{try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0})(r))throw new Error("targetElementsCssSelector is not a valid css selector");if(!he(s))throw new Error("triggerOnTargetElementsClick is not a boolean")}if(void 0!==o){if(!(e=>{if(!le()(e))return!1;if(0===e.length)return!1;for(let t=0;t0&&f<10&&(f<5?f*=60:f=30),new dt({zoneId:t,refreshRate:f??60,delay:i??0,maxAds:n??1,renderPosDesktop:r??"top",renderPosMobile:s??"top",offsetTop:o??0,sub1:a,isAutoTag:c,collectiveZoneId:l,aggressivity:d,recordPageView:u,abTest:h,tagVersionSuffix:g,adserverDomain:this.#v,adblockSettings:this.#o,adcashGlobalName:this.#ct,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T})}runBanner(e){this.#ft();const{zoneId:t,width:i,height:n,renderIn:r,sub1:s,currentScript:o}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!fe(t))throw new Error("zoneId is not a string!");if(void 0!==i&&!ge(i))throw new Error("Banner width is not an integer");if(void 0!==n&&!ge(n))throw new Error("Banner height is not an integer");if(this.#rt.has(t))return void this.#i.error(`zone ${t} already loaded`);let a;this.#rt.add(t),this.#i.debug("loading banner on page",t),r||(document.currentScript&&document.currentScript.parentElement&&(a=document.currentScript.parentElement),o&&(a=o.parentElement)),new pt({zoneId:t,width:i,height:n,renderIn:r,currentElement:a,sub1:s,adcashGlobalName:this.#ct,uniqueFingerprint:this.#T,adblockSettings:this.#o})}runInterstitial(e){if(this.#it.interstitial)return void this.#i.error("interstitial zone already loaded on page");this.#it.interstitial=!0,this.#ft();const{zoneId:t,sub1:i,isAutoTag:n,collectiveZoneId:r,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!fe(t))throw new Error("zoneId is not a string!");this.#i.debug("loading interstitial on page");const l={zoneId:t,sub1:i,isAutoTag:n,collectiveZoneId:r,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c,adcashGlobalName:this.#ct,adserverDomain:this.#v,adblockSettings:this.#o,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T};this.#rt.add(t),new nt(l)}async#vt(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.#i.debug("fetch collective zone config");let i=`${window.location.protocol}//${this.#v}/ad/czcf.php`;if(this.isAdbMode()){const e=`/${ne("abcdefgh0123456789")}`;i=`${window.location.protocol}//${this.#o.adserverDomain}${e}`}i+=`?cz=${e}`;const n=await this.getClientHints();let r;n&&(i+=n),this.isAdbMode()&&(i+="&sadbl=2",i+="&fmt=atg",i=re(i)),this.#i.debug("collective zone config url: ",i);try{r=await fetch(i)}catch(i){return this.#i.error(i),this.#o&&t?(this.#i.debug("collective zone config fetch failed: try alt domain and path"),this.enableAdbMode(),this.#vt(e,!1)):null}return 200!==r.status?null:r.json()}async runAutoTag(e){if(this.#it.autoTag)return void this.#i.error("autotag zone already loaded on page");this.#it.autoTag=!0,this.#ft();const t=e.zoneId;if(!t)throw new Error("mandatory zoneId is not provided!");if(!fe(t))throw new Error("zoneId is not a string!");const i=await this.#vt(t);if(i)if(this.#i.debug("collective zone config:",i),i.rotationList)this.#i.debug("running in ROTATION MODE"),this.#rt.add(t),new Ge({adcashGlobalName:this.#ct,collectiveZoneConfig:i,adserverDomain:this.#v,adblockSettings:this.#o,clientHintsQueryStr:this.#b,tagVersionSuffix:e.tagVersionSuffix,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T});else{this.#i.debug("running in NORMAL MODE");const n=i.indexedFormats;let r=!0;for(const s in n){switch(s){case"suv4":case"pop":this.runPop({zoneId:n[s].zoneId.toString(),targetElementsCssSelector:n[s]["element-list"],triggerOnTargetElementsClick:"allow"===n[s]["element-action"],targetCountries:n[s]["country-list"],triggerOnTargetCountries:"allow"===n[s]["country-action"],isAutoTag:!0,collectiveZoneId:t,aggressivity:i.aggressivity,abTest:i.ab_test,recordPageView:r,tagVersionSuffix:e.tagVersionSuffix});break;case"interstitial":this.runInterstitial({zoneId:n[s].zoneId.toString(),isAutoTag:!0,collectiveZoneId:t,aggressivity:i.aggressivity,abTest:i.ab_test,recordPageView:r,tagVersionSuffix:e.tagVersionSuffix});break;case"ippg":this.runInPagePush({zoneId:n[s].zoneId.toString(),refreshRate:n[s].rr,delay:n[s].d,maxAds:n[s].mads,renderPosDesktop:n[s]["render-pos-desktop"],renderPosMobile:n[s]["render-pos-mobile"],offsetTop:n[s]["offset-top"],isAutoTag:!0,collectiveZoneId:t,aggressivity:i.aggressivity,abTest:i.ab_test,recordPageView:r,tagVersionSuffix:e.tagVersionSuffix});break;default:this.#i.error(`ad format type not recognised from collective zone config. adformat.type: ${s}; czid: ${t}`)}r=!1}}else this.#i.error(`failed to fetch collective zone config! czid: ${t}`)}};const xt=new y("aclib_adblock_index");window.Adcash?xt.debug("lib already on page. exit"):(xt.debug("load lib on page"),window.Adcash=wt,window.AtcshAltNm=wt,window.aclib=new wt)}()}();aclib.runPop({zoneId: "2370731"});