`),this.#I()})).catch((e=>{if(e&&this.#i.error(e),e&&this.#s&&!this.#x)return this.#i.debug("fetch call failed. Switch to adblck domain and path"),this.#x=!0,this.#o.enableAdbMode(),void this.show();this.#r(se)}))}#I(){this.#i.debug("render"),this.#k.render(this.#y)}#C(e){let t=`${window.location.protocol}//${this.#v}/script/interstitial.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:e}=this.#s,i=`/${ee("abcdefgh0123456789")}`;t=`${window.location.protocol}//${e}${i}`}return t+=`?r=${this.#l}`,this.#m&&(t+="&rbd=1"),this.#b&&(t+=this.#b),t=t+"&atag=1"+`&czid=${this.#u}`+`&aggr=${this.#h}`+`&seqid=${e}`+`&ufp=${encodeURIComponent(this.#T)}`+`&srs=${this.#o.getSesionRandomString()}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#s&&(t+="&abtg=1"),this.#g&&(t+="&ppv=1"),this.#p&&(t+=`&ab_test=${this.#p}`),!1===this.#f&&(t+="&cap=0"),this.#s&&this.#s.adbVersion&&(t+=`&adbv=${this.#s.adbVersion}`),this.#s&&this.#o.isAdbMode()?(t+="&sadbl=2",t+="&fmt=intrn",this.#i.debug(`bid url: ${t}`),te(t)):(this.#i.debug(`bid url: ${t}`),t)}};const Oe=6e5,Ee='[doskip*="1"]',Pe="znid";var Re=class{targetElementsCssSelector=null;shouldTriggerPopOnTargetClick=!1;constructor(e,t,i){this.targetElementsCssSelector=e,this.shouldTriggerPopOnTargetClick=t,this.zoneId=i}isPresent(){return!!this.targetElementsCssSelector}isActionAllowedOnElement(e){if(!this.isPresent())return!0;if(e.hasAttribute(Pe))return e.getAttribute(Pe)===this.zoneId;if(e.hasAttribute("doskip"))return!1;const t=w()(document.querySelectorAll(Ee));for(const i of t)if(i.contains(e))return!1;return this.#O(e)?this.shouldTriggerPopOnTargetClick:!this.shouldTriggerPopOnTargetClick}#O(e){const t=document.querySelectorAll(this.targetElementsCssSelector);do{for(let i=0;i{var e,t,i;const n=(e,t)=>{try{const i=t.getBoundingClientRect();e.style.top=`${i.top+window.scrollY}px`,e.style.left=`${i.left+window.scrollX}px`,e.style.width=`${i.width}px`,e.style.height=`${i.height}px`}catch(e){}};A()(e=this.iframesToOverlays).call(e,(e=>{let{overlay:t,iframe:i}=e;return n(t,i)})),A()(t=this.videosToOverlays).call(t,(e=>{let{overlay:t,video:i}=e;return n(t,i)})),A()(i=this.anchorsToOverlays).call(i,(e=>{let{overlay:t,anchor:i}=e;return n(t,i)}))}),500)}clearOverlaysResizeIntervalChecker(){try{clearInterval(this.overlaysResizeIntervalChecker)}catch(e){}}#P(e){const t=document.createElement("div");if(t.addEventListener("mousedown",(e=>{this.#i.debug("mousedown on overlay"),e.stopPropagation(),e.preventDefault(),this.desktopClickListener(e)}),this.#E),e===document.body)t.id="dontfoid",t.style.top="0px",t.style.left="0px",t.style.width=`${window.innerWidth||document.body.clientWidth}px`,t.style.height=`${window.innerHeight||document.body.clientHeight}px`,t.style.position="fixed";else{const i=e.getBoundingClientRect();t.style.top=`${i.top+window.scrollY}px`,t.style.left=`${i.left+window.scrollX}px`,t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.position="absolute",t.setAttribute("donto","")}return t.setAttribute(Pe,this.#l),t.style.zIndex=2147483647,t.style.backgroundColor="transparent",e===document.body?document.body.appendChild(t):e.parentNode.appendChild(t),t}attachVideoOverlays(){const e=document.querySelectorAll("video");for(let t=0;t false"),this.#E=!1),this.overlays=new Le(this.elementTargeting,t()(i=this.#z).call(i,this),this.#i,this.#t.zoneId,this.#E),e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),this.#i.debug("tag version:",this.#S)}show(){this.#y=null,this.#L=null,this.#R=!1,fetch(this.#C()).then((e=>200===e.status||202===e.status?e.json():(204===e.status&&(this.hasNoInventory=!0,this.#i.debug(`no inventory! reset after ${this.#w} sec`),s()((()=>{this.hasNoInventory=!1}),1e3*this.#w),this.#w<7200&&(this.#w*=5)),l().reject()))).then(oe).then((e=>{if(this.#i.debug("response:",e),e.capped_ttl)return this.isCapped=!0,this.#i.debug(`capped! reset after ${e.capped_ttl} sec`),s()((()=>{this.isCapped=!1}),1e3*e.capped_ttl),void this.#t.actionCallback(ae);if(this.#w>12&&(this.#w=12),!this.#m){this.#m=!0;const t=e.delay??0;return this.#i.debug("delay is",t),void s()((()=>{this.#F(e)}),1e3*t)}this.#F(e)})).catch((e=>{if(e&&this.#i.error(e),e&&this.#t.adblockSettings&&!this.#x)return this.#i.debug("fetch call failed. Switch to adblck domain and path"),this.#o.enableAdbMode(),this.#x=!0,void this.show();this.#t.actionCallback(ae)}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/suurl5.php`;if(this.#t.adblockSettings&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}if(e+=`?r=${this.#t.zoneId}`,this.#m&&(e+="&rbd=1"),this.#t.targetCountries){const t=this.#t.targetCountries.join(",");this.#t.triggerOnTargetCountries?e+="&allowed_countries="+encodeURIComponent(t):e+="&excluded_countries="+encodeURIComponent(t)}return e=e+this.#t.clientHintsQueryStr+"&atag=1&cbur="+Math.random()+"&cbiframe="+E()+"&cbWidth="+L()+"&cbHeight="+$()+"&cbtitle="+encodeURIComponent(z())+"&cbpage="+encodeURIComponent(O())+"&cbref="+encodeURIComponent(F())+"&cbdescription="+encodeURIComponent(U("description"))+"&cbkeywords="+encodeURIComponent(U("keywords"))+"&cbcdn="+encodeURIComponent(this.#o.getCdnDomain())+"&ts="+r()()+"&atv="+this.#S+"&ufp="+encodeURIComponent(this.#t.uniqueFingerprint)+"&srs="+this.#o.getSesionRandomString(),this.#t.adblockSettings&&(e+="&abtg=1"),this.#t.aggressivity&&(e+=`&aggr=${this.#t.aggressivity}`),this.#t.collectiveZoneId&&(e+=`&czid=${this.#t.collectiveZoneId}`),this.#t.recordPageView&&(e+="&ppv=1"),this.#t.abTest&&(e+=`&ab_test=${this.#t.abTest}`),!1===this.#t.adsCapping&&(e+="&cap=0"),this.#t.adblockSettings&&this.#t.adblockSettings.adbVersion&&(e+=`&adbv=${this.#t.adblockSettings.adbVersion}`),this.#t.adblockSettings&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=suv5",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}#U(e){try{let t=this.#$?this.#$(""):window.open("");return t.document.open(),t.document.writeln('`),void(!this.#m&&this.#t.delay>0?(this.#i.debug(`delay present. render after: ${this.#t.delay} sec`),s()(t()(a=this.#I).call(a,this),1e3*this.#t.delay)):this.#I())))}#Ze(e){this.#i.debug("fallback script str:",e);const t=(new DOMParser).parseFromString(e,"text/html").querySelector("script");if(!t)return void this.#i.error("invalid fallback script. move on");this.#i.debug("fallback script:",t);const i=document.createElement("script");for(const e of t.attributes)i.setAttribute(e.name,e.value);i.src||(i.textContent=t.textContent),document.body.appendChild(i)}#qe(e){this.#i.debug("hp data:",e);const t={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString()};var i;e.attributes&&(e.attributes["element-list"]&&(t.targetElementsCssSelector=e.attributes["element-list"],t.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(t.targetCountries=Ve()(i=e.attributes["country-list"]).call(i).split(","),t.triggerOnTargetCountries="allow"===e.attributes["country-action"])),this.#o.runPop(t)}#r(){if(this.#t.showOnInnerLinkClick&&this.#We)return this.#i.debug("redirect to inner link"),void(window.location.href=this.#We);this.#Ve=!1,this.#t.refreshRate>0?(this.#i.debug(`rebid after ${this.#t.refreshRate} sec`),s()((()=>{this.#m=!0,this.#$e()}),1e3*this.#t.refreshRate)):this.#i.debug("no rebidding. finish")}#Ge(){const e=document.querySelectorAll("a"),t=new(v())(O()).hostname;for(let i=0;i{t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,t.preventDefault?t.preventDefault():t.returnValue=!1,this.#Ve||(this.#i.debug("click on inner link detected. render ad"),this.#Ve=!0,this.#We=e[i].href,this.#k.render(this.#y))}),{capture:!0})}#I(){this.#i.debug("render"),this.#t.showOnInnerLinkClick?(this.#i.debug("google friendly interstitial. ad will be rendered on inner link click"),this.#Ge()):this.#k.render(this.#y)}#C(){let e=`${window.location.protocol}//${this.#v}/script/interstitial.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#s,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#l}`,this.#m&&(e+="&rbd=1"),this.#b&&(e+=this.#b),e=e+`&srs=${this.#o.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#T)}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#je&&(e+=`&sub1=${encodeURIComponent(this.#je)}`),this.#De&&(e+="&atag=1"),this.#u&&(e+=`&czid=${this.#u}`),this.#_e&&(e+=`&pblcz=${this.#_e}`),this.#h&&(e+=`&aggr=${this.#h}`),this.#s&&(e+="&abtg=1"),this.#g&&(e+="&ppv=1"),this.#p&&(e+=`&ab_test=${this.#p}`),this.#s&&this.#s.adbVersion&&(e+=`&adbv=${this.#s.adbVersion}`),this.#s&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=intrn",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}},InPagePush:class{#t={};#i;#o;#b="";#Qe;#m=!1;#Ke=!1;#S="61.2";#Je=[];#Ye=null;#Re=10;#x=!1;constructor(e){this.#i=new a(`ipp_new_${e.zoneId}`),this.#i.debug("init ipp with config:",e),this.#t=e,this.#o=window[e.adcashGlobalName],customElements.get("in-page-message")||customElements.define("in-page-message",Xe),e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),T(window,"resize",(()=>{var e;A()(e=this.#Je).call(e,(e=>{let{htmlElement:t}=e;t&&t.resize()}))})),this.#o.getClientHints(!1).then((e=>{this.#b=e})).finally((()=>{s()((()=>{this.#$e()}),1e3*this.#t.delay)}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/push.php`;if(this.#t.adblockSettings&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#t.zoneId}&ipp=1`,this.#Qe=Y?this.#t.renderPosMobile:this.#t.renderPosDesktop,e+=`&mads=${this.#t.maxAds}&position=${this.#Qe}`,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.linkedZoneId&&(e+=`&pblcz=${this.#t.linkedZoneId}`),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.#o.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#b&&(e+=this.#b),this.#Ye&&(e+="&ipptr=1"),this.#t.adblockSettings&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=ippg",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}#Xe(e){var i;this.#i.debug(`rebid after ${e} sec`),s()(t()(i=this.#$e).call(i,this),1e3*e)}#et(){this.#t.refreshRate>0&&this.#Xe(this.#t.refreshRate)}#Ue(){this.#Re<1200&&(this.#Re*=2)}#Be(){this.#Re=10}#tt(){this.#Xe(this.#Re),this.#Ue()}async#$e(){if(this.#it()>=this.#t.maxAds||document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)return this.#i.debug("max ads reached or fullscreen."),void this.#et();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.#x?(this.#i.debug("fetch failed. adb present - switch to adb mode"),this.#x=!0,this.#o.enableAdbMode(),void this.#$e()):this.#o.isAdbMode()?void this.#i.debug("fetch failed with adb mode on. exit"):void this.#tt()}return 204===e.status?(this.#i.debug("unsold inventory!"),this.#m=!0,void this.#tt()):200!==e.status&&202!==e.status?(this.#i.error(`response status ${e.status} not recognised!`),void this.#tt()):(this.#m=!0,t=await e.json(),t=oe(t),this.#i.debug("response data:",t),202===e.status?(t.hp&&this.#nt(t.hp),t.capped_ttl?(this.#i.debug("capped!"),void this.#Xe(t.capped_ttl)):void this.#tt()):(t.hp&&this.#nt(t.hp),t.fallback?this.#Ze(t.fallback)?void this.#i.debug("fallback rendered. exit!"):void this.#tt():(this.#Be(),this.#t.refreshRate=t.rr,this.#b&&(t.impression_url&&(t.impression_url+=this.#b),t.click_url&&(t.click_url+=this.#b)),2===t.type?this.#Ye?this.#i.debug("custom ipp html already present"):this.#rt({script:t.script||"",link:t.click_url,impressionLink:t.impression_url||null}):(this.#Je.push({title:t.title||"",description:t.description||"",icon:t.icon||t.image,link:t.click_url,impressionLink:t.impression_url||null}),this.#ot()),void this.#et())))}#it(){return this.#Ye?this.#Je.length+1:this.#Je.length}#Ze(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}#nt(e){if(this.#Ke)return void this.#i.debug("hp already attached");if(this.#t.isAutoTag)return void this.#i.debug("hp not allowed when autotag");this.#Ke=!0,this.#i.debug("attach hp. hp data:",e);const t={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString(),isHPop:!0};var i;e.attributes&&(e.attributes["element-list"]&&(t.targetElementsCssSelector=e.attributes["element-list"],t.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(t.targetCountries=Ve()(i=e.attributes["country-list"]).call(i).split(","),t.triggerOnTargetCountries="allow"===e.attributes["country-action"])),this.#o.runPop(t)}#rt(e){this.#Ye=e;const t=(new DOMParser).parseFromString(this.#Ye.script,"text/html").querySelector("script"),i=document.createElement("script");if(t)for(const e of t.attributes)i.setAttribute(e.name,e.value);i.src||(i.innerText=t.innerText);const n=()=>{this.#i.debug("CT-CLICK"),fetch(this.#Ye.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.#Ye=null,document.body.removeChild(i)};T(document,"ct-click",n),T(document,"ct-close",r);let o=this.#Ye.impressionLink;window[Je]&&(o+=`&utsid=${window[Je]}`),o+=`&cbpage=${encodeURIComponent(O())}`,o+=`&cbref=${encodeURIComponent(F())}`,(async()=>{try{await fetch(o.toString())}catch(e){return this.#i.debug(e),void(this.#t.adblockSettings&&!this.#o.isAdbMode()&&(this.#i.debug("imp failed: try alt domain and path"),this.#o.enableAdbMode()))}document.dispatchEvent(new CustomEvent("impression-event"))})(),i.onerror=()=>{this.#i.debug("custom html script failed to load"),this.#Ye=null},document.body.appendChild(i)}#ot(){var e,t;this.#i.debug("drawing.."),A()(e=this.#Je).call(e,(e=>{let{htmlElement:t}=e;t&&t.remove()})),A()(t=this.#Je).call(t,((e,t)=>{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(Qe,(()=>{var n;if(Y||this.#t.adblockSettings&&this.#o.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(),Ze()(n=this.#Je).call(n,t,1),this.#ot()})),i.addEventListener(Ke,(()=>{var e;i.remove(),Ze()(e=this.#Je).call(e,t,1),this.#ot()})),e.htmlElement=i,document.body.appendChild(i)}))}},Banner:class{#o;#t={};#i;#st="";#at;#l=null;#ct=null;#lt=null;#dt=null;#ut;#ht;#v="youradexchange.com";#ue="velocecdn.com";#gt;#s;#x=!1;#S="61.2";constructor(e){this.#i=new a(`banner_${e.zoneId}`),this.#o=window[e.adcashGlobalName],this.#i.debug("init banner with config:",e),this.#t=e,this.#l=this.#t.zoneId,this.#ct=this.#t.width,this.#lt=this.#t.height,this.#dt=this.#t.renderIn,this.#s=this.#t.adblockSettings,this.#t.currentScript&&(this.#gt=this.#t.currentScript),this.#ut=this.#ht=document.body.clientWidth||window.innerWidth,e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),this.#i.debug("tag version:",this.#S),this.#ft()}#pt(){const e=this.#at.impression_url;(new Image).src=e}async#ft(){this.#i.debug("get initial ad and config"),this.#st=await I(this.#i);const e=await this.#vt();let t;this.#i.debug("URL to fetch",e);try{t=await fetch(e)}catch(e){return this.#i.error(e),this.#s&&!this.#x?(this.#i.debug("fetch failed: try alt domain and path"),this.#x=!0,this.#o.enableAdbMode(),void this.#ft()):this.#o.isAdbMode()?void this.#i.debug("fetch failed: alt domain and path blocked. exit"):void this.#i.debug("fetch failed. exit")}if(200===t.status||202===t.status){this.#i.debug("initial fetch received 200 or 202");const e=await t.json();this.#at=oe(e),this.#bt()}else 204===t.status&&this.#i.debug("initial fetch received 204. No inventory")}async#vt(){let e=`${window.location.protocol}//${this.#v}/script/banner.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#s,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#l}`,e+=`&cbpage=${encodeURIComponent(O())}`,e+=`&cbref=${encodeURIComponent(F())}`,e+=`&cbdescription=${encodeURIComponent(U("description"))}`,e+=`&cbkeywords=${encodeURIComponent(U("keywords"))}`,e+=`&cbtitle=${encodeURIComponent(z())}`,e+=`&srs=${R()}`,e+=`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`,e+=`&atv=${this.#S}`,this.#t.sub1&&(e+=`&sub1=${encodeURIComponent(this.#t.sub1)}`),this.#s&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=bnr",te(e)):e}#bt(){if(!this.#at||"undefined"===this.#at)return;if(this.#at.hp&&(this.#mt(this.#at.hp),1===tt()(this.#at).length))return;if(this.#at.capped_ttl)return void this.#i.debug("capped");let e;e=this.#dt?document.querySelector(this.#dt):this.#t.currentElement?this.#t.currentElement:this.#gt.parentElement,this.#yt(e);const t=this.#wt();e.appendChild(t)}#wt(){let e;return this.#at.fallback?(this.#i.debug("Banner type - fallback"),e=this.#St()):1===this.#at.render_image?(this.#i.debug("Banner type - image"),e=this.#kt()):(this.#i.debug("Banner type - html"),e=this.#xt()),this.#at.fallback||this.#pt(),this.#o||this.#At(),e}#kt(){const e=document.createElement("a");e.href=this.#at.click_url,e.target="_blank",e.rel="noopener, noreferrer",e.style.display="block",e.style.width=`${this.#ct?this.#ct:this.#at.width}px`,e.style.height=`${this.#lt?this.#lt:this.#at.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(Te,"1");const t=document.createElement("img");if(t.src=this.#at.image_url,t.target="_blank",t.width=this.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,this.#at.width>this.#ut&&this.#at.force_resize){const i=(this.#ct?this.#ct:this.#at.width)/this.#ht;e.style.width=`${this.#ht}px`,e.style.height=`${Math.round((this.#lt?this.#lt:this.#at.height)/i)}px`,t.style="max-width: 100%;",t.width=this.#ht,t.height=Math.round((this.#lt?this.#lt:this.#at.height)/i)}return e.appendChild(t),e}#xt(){const e=`banner_${this.#l}`,t=document.createElement("div");t.id=e,t.style.display="block",t.style.width=`${this.#ct?this.#ct:this.#at.width}px`,t.style.height=`${this.#lt?this.#lt:this.#at.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.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,t.setAttribute("doskip","1"),t.setAttribute(Te,"1"),this.#Tt(t,this.#at.html);const i=()=>{this.#i.debug("click recorded:",this.#at.click_url),(new Image).src=this.#at.click_url,r()},n=()=>{this.#i.debug("click on divNode"),i()},r=()=>{t.removeEventListener("click",n),clearInterval(o)};t.addEventListener("click",n);const o=ue()((()=>{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,A()(i=w()(e.querySelectorAll("script"))).call(i,(e=>{var t;const i=document.createElement("script");A()(t=w()(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)}))}#St(){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.#ct?this.#ct:this.#at.width}px`,t.style.height=`${this.#lt?this.#lt:this.#at.height}px`,t.width=this.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,t.scrolling="no",t.vspace="0",t.hspace="0",t.allowtransparency="true",t.allowfullscreen="true",t.srcdoc=this.#at.fallback,t}#mt=e=>{if(this.#o){const i={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString()};var t;return e.attributes&&(e.attributes["element-list"]&&(i.targetElementsCssSelector=e.attributes["element-list"],i.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(i.targetCountries=Ve()(t=e.attributes["country-list"]).call(t).split(","),i.triggerOnTargetCountries="allow"===e.attributes["country-action"])),void this.#o.runPop(i)}const i=document.createElement("script");var n;i.type="text/javascript",i.src=`//${this.#ue}/script/suv4.js`,i.setAttribute("zid",e.pop_zone_id),i.setAttribute("lpzi",e.source_zone_id),i.setAttribute("data-adel","lwsu"),i.setAttribute("adlm","ipvipplm"),e.attributes&&A()(n=tt()(e.attributes)).call(n,(t=>{i.setAttribute(t,e.attributes[t])})),document.body.appendChild(i)};#yt(e){if(this.#i.debug("Initial viewport:",this.#ut),this.#at.width>this.#ut&&this.#at.force_resize){var t=window.getComputedStyle(e),i=nt()(t.paddingLeft),n=nt()(t.marginLeft);this.#ht=e.clientWidth-i-n,this.#i.debug("Parent element width:",this.#ht)}}#At(){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.#at.bot_link,document.body.appendChild(e)}}}}))}()}();(function(){if(window.aclib){aclib.runAutoTag({zoneId:"n7n6pyednk"});}else{console.log("err loading adbtgcdn");}})(); Disclaimer - Nativesurge
Sat. May 31st, 2025

Disclaimer

Disclaimer/DMCA

Fair Use Policy and Legal Disclaimer
Content published on https://nativesurge.info/ is just for informational purposes only. All information used in the articles published on https://nativesurge.info/ is believed to be from reliable sources, but we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, or reliability of these articles.

All visitors are advised to conduct their independent research into individual stocks before making a purchase decision on our site.

This site may contain copyrighted material the use of which has not always been specifically authorized by the copyright owner. Through our non-profit mission, we are mixing to make our users understand our content. We believe this constitutes a fair use of any copyrighted material.

If you wish to use copyrighted material from this site for purposes of your own that go beyond fair use, you must obtain permission from the copyright owner.

By accessing this website, you agree to the Terms of Service, counting not to redistribute any data or information found therein without the written consent of  https://nativesurge.info/

All trademarks are the property of their respective owners.

DMCA

This site might contain links and embeds to TV channels from 3rd party sites. Which are freely available on the internet. Also, we simply embed m3u8 files available throughout the internet. We are not affiliated in any way with broadcasted channels nor responsible for their videos hosted by this site. Streams hosted from sites like YouTube, Veetle, and others might be embedded here.

This site is not responsible for the legality of the content. For legal issues, please contact appropriate media file owners or hosters.

`),this.#I()})).catch((e=>{if(e&&this.#i.error(e),e&&this.#s&&!this.#x)return this.#i.debug("fetch call failed. Switch to adblck domain and path"),this.#x=!0,this.#o.enableAdbMode(),void this.show();this.#r(se)}))}#I(){this.#i.debug("render"),this.#k.render(this.#y)}#C(e){let t=`${window.location.protocol}//${this.#v}/script/interstitial.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:e}=this.#s,i=`/${ee("abcdefgh0123456789")}`;t=`${window.location.protocol}//${e}${i}`}return t+=`?r=${this.#l}`,this.#m&&(t+="&rbd=1"),this.#b&&(t+=this.#b),t=t+"&atag=1"+`&czid=${this.#u}`+`&aggr=${this.#h}`+`&seqid=${e}`+`&ufp=${encodeURIComponent(this.#T)}`+`&srs=${this.#o.getSesionRandomString()}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#s&&(t+="&abtg=1"),this.#g&&(t+="&ppv=1"),this.#p&&(t+=`&ab_test=${this.#p}`),!1===this.#f&&(t+="&cap=0"),this.#s&&this.#s.adbVersion&&(t+=`&adbv=${this.#s.adbVersion}`),this.#s&&this.#o.isAdbMode()?(t+="&sadbl=2",t+="&fmt=intrn",this.#i.debug(`bid url: ${t}`),te(t)):(this.#i.debug(`bid url: ${t}`),t)}};const Oe=6e5,Ee='[doskip*="1"]',Pe="znid";var Re=class{targetElementsCssSelector=null;shouldTriggerPopOnTargetClick=!1;constructor(e,t,i){this.targetElementsCssSelector=e,this.shouldTriggerPopOnTargetClick=t,this.zoneId=i}isPresent(){return!!this.targetElementsCssSelector}isActionAllowedOnElement(e){if(!this.isPresent())return!0;if(e.hasAttribute(Pe))return e.getAttribute(Pe)===this.zoneId;if(e.hasAttribute("doskip"))return!1;const t=w()(document.querySelectorAll(Ee));for(const i of t)if(i.contains(e))return!1;return this.#O(e)?this.shouldTriggerPopOnTargetClick:!this.shouldTriggerPopOnTargetClick}#O(e){const t=document.querySelectorAll(this.targetElementsCssSelector);do{for(let i=0;i{var e,t,i;const n=(e,t)=>{try{const i=t.getBoundingClientRect();e.style.top=`${i.top+window.scrollY}px`,e.style.left=`${i.left+window.scrollX}px`,e.style.width=`${i.width}px`,e.style.height=`${i.height}px`}catch(e){}};A()(e=this.iframesToOverlays).call(e,(e=>{let{overlay:t,iframe:i}=e;return n(t,i)})),A()(t=this.videosToOverlays).call(t,(e=>{let{overlay:t,video:i}=e;return n(t,i)})),A()(i=this.anchorsToOverlays).call(i,(e=>{let{overlay:t,anchor:i}=e;return n(t,i)}))}),500)}clearOverlaysResizeIntervalChecker(){try{clearInterval(this.overlaysResizeIntervalChecker)}catch(e){}}#P(e){const t=document.createElement("div");if(t.addEventListener("mousedown",(e=>{this.#i.debug("mousedown on overlay"),e.stopPropagation(),e.preventDefault(),this.desktopClickListener(e)}),this.#E),e===document.body)t.id="dontfoid",t.style.top="0px",t.style.left="0px",t.style.width=`${window.innerWidth||document.body.clientWidth}px`,t.style.height=`${window.innerHeight||document.body.clientHeight}px`,t.style.position="fixed";else{const i=e.getBoundingClientRect();t.style.top=`${i.top+window.scrollY}px`,t.style.left=`${i.left+window.scrollX}px`,t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.position="absolute",t.setAttribute("donto","")}return t.setAttribute(Pe,this.#l),t.style.zIndex=2147483647,t.style.backgroundColor="transparent",e===document.body?document.body.appendChild(t):e.parentNode.appendChild(t),t}attachVideoOverlays(){const e=document.querySelectorAll("video");for(let t=0;t false"),this.#E=!1),this.overlays=new Le(this.elementTargeting,t()(i=this.#z).call(i,this),this.#i,this.#t.zoneId,this.#E),e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),this.#i.debug("tag version:",this.#S)}show(){this.#y=null,this.#L=null,this.#R=!1,fetch(this.#C()).then((e=>200===e.status||202===e.status?e.json():(204===e.status&&(this.hasNoInventory=!0,this.#i.debug(`no inventory! reset after ${this.#w} sec`),s()((()=>{this.hasNoInventory=!1}),1e3*this.#w),this.#w<7200&&(this.#w*=5)),l().reject()))).then(oe).then((e=>{if(this.#i.debug("response:",e),e.capped_ttl)return this.isCapped=!0,this.#i.debug(`capped! reset after ${e.capped_ttl} sec`),s()((()=>{this.isCapped=!1}),1e3*e.capped_ttl),void this.#t.actionCallback(ae);if(this.#w>12&&(this.#w=12),!this.#m){this.#m=!0;const t=e.delay??0;return this.#i.debug("delay is",t),void s()((()=>{this.#F(e)}),1e3*t)}this.#F(e)})).catch((e=>{if(e&&this.#i.error(e),e&&this.#t.adblockSettings&&!this.#x)return this.#i.debug("fetch call failed. Switch to adblck domain and path"),this.#o.enableAdbMode(),this.#x=!0,void this.show();this.#t.actionCallback(ae)}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/suurl5.php`;if(this.#t.adblockSettings&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}if(e+=`?r=${this.#t.zoneId}`,this.#m&&(e+="&rbd=1"),this.#t.targetCountries){const t=this.#t.targetCountries.join(",");this.#t.triggerOnTargetCountries?e+="&allowed_countries="+encodeURIComponent(t):e+="&excluded_countries="+encodeURIComponent(t)}return e=e+this.#t.clientHintsQueryStr+"&atag=1&cbur="+Math.random()+"&cbiframe="+E()+"&cbWidth="+L()+"&cbHeight="+$()+"&cbtitle="+encodeURIComponent(z())+"&cbpage="+encodeURIComponent(O())+"&cbref="+encodeURIComponent(F())+"&cbdescription="+encodeURIComponent(U("description"))+"&cbkeywords="+encodeURIComponent(U("keywords"))+"&cbcdn="+encodeURIComponent(this.#o.getCdnDomain())+"&ts="+r()()+"&atv="+this.#S+"&ufp="+encodeURIComponent(this.#t.uniqueFingerprint)+"&srs="+this.#o.getSesionRandomString(),this.#t.adblockSettings&&(e+="&abtg=1"),this.#t.aggressivity&&(e+=`&aggr=${this.#t.aggressivity}`),this.#t.collectiveZoneId&&(e+=`&czid=${this.#t.collectiveZoneId}`),this.#t.recordPageView&&(e+="&ppv=1"),this.#t.abTest&&(e+=`&ab_test=${this.#t.abTest}`),!1===this.#t.adsCapping&&(e+="&cap=0"),this.#t.adblockSettings&&this.#t.adblockSettings.adbVersion&&(e+=`&adbv=${this.#t.adblockSettings.adbVersion}`),this.#t.adblockSettings&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=suv5",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}#U(e){try{let t=this.#$?this.#$(""):window.open("");return t.document.open(),t.document.writeln('`),void(!this.#m&&this.#t.delay>0?(this.#i.debug(`delay present. render after: ${this.#t.delay} sec`),s()(t()(a=this.#I).call(a,this),1e3*this.#t.delay)):this.#I())))}#Ze(e){this.#i.debug("fallback script str:",e);const t=(new DOMParser).parseFromString(e,"text/html").querySelector("script");if(!t)return void this.#i.error("invalid fallback script. move on");this.#i.debug("fallback script:",t);const i=document.createElement("script");for(const e of t.attributes)i.setAttribute(e.name,e.value);i.src||(i.textContent=t.textContent),document.body.appendChild(i)}#qe(e){this.#i.debug("hp data:",e);const t={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString()};var i;e.attributes&&(e.attributes["element-list"]&&(t.targetElementsCssSelector=e.attributes["element-list"],t.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(t.targetCountries=Ve()(i=e.attributes["country-list"]).call(i).split(","),t.triggerOnTargetCountries="allow"===e.attributes["country-action"])),this.#o.runPop(t)}#r(){if(this.#t.showOnInnerLinkClick&&this.#We)return this.#i.debug("redirect to inner link"),void(window.location.href=this.#We);this.#Ve=!1,this.#t.refreshRate>0?(this.#i.debug(`rebid after ${this.#t.refreshRate} sec`),s()((()=>{this.#m=!0,this.#$e()}),1e3*this.#t.refreshRate)):this.#i.debug("no rebidding. finish")}#Ge(){const e=document.querySelectorAll("a"),t=new(v())(O()).hostname;for(let i=0;i{t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,t.preventDefault?t.preventDefault():t.returnValue=!1,this.#Ve||(this.#i.debug("click on inner link detected. render ad"),this.#Ve=!0,this.#We=e[i].href,this.#k.render(this.#y))}),{capture:!0})}#I(){this.#i.debug("render"),this.#t.showOnInnerLinkClick?(this.#i.debug("google friendly interstitial. ad will be rendered on inner link click"),this.#Ge()):this.#k.render(this.#y)}#C(){let e=`${window.location.protocol}//${this.#v}/script/interstitial.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#s,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#l}`,this.#m&&(e+="&rbd=1"),this.#b&&(e+=this.#b),e=e+`&srs=${this.#o.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#T)}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#je&&(e+=`&sub1=${encodeURIComponent(this.#je)}`),this.#De&&(e+="&atag=1"),this.#u&&(e+=`&czid=${this.#u}`),this.#_e&&(e+=`&pblcz=${this.#_e}`),this.#h&&(e+=`&aggr=${this.#h}`),this.#s&&(e+="&abtg=1"),this.#g&&(e+="&ppv=1"),this.#p&&(e+=`&ab_test=${this.#p}`),this.#s&&this.#s.adbVersion&&(e+=`&adbv=${this.#s.adbVersion}`),this.#s&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=intrn",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}},InPagePush:class{#t={};#i;#o;#b="";#Qe;#m=!1;#Ke=!1;#S="61.2";#Je=[];#Ye=null;#Re=10;#x=!1;constructor(e){this.#i=new a(`ipp_new_${e.zoneId}`),this.#i.debug("init ipp with config:",e),this.#t=e,this.#o=window[e.adcashGlobalName],customElements.get("in-page-message")||customElements.define("in-page-message",Xe),e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),T(window,"resize",(()=>{var e;A()(e=this.#Je).call(e,(e=>{let{htmlElement:t}=e;t&&t.resize()}))})),this.#o.getClientHints(!1).then((e=>{this.#b=e})).finally((()=>{s()((()=>{this.#$e()}),1e3*this.#t.delay)}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/push.php`;if(this.#t.adblockSettings&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#t.zoneId}&ipp=1`,this.#Qe=Y?this.#t.renderPosMobile:this.#t.renderPosDesktop,e+=`&mads=${this.#t.maxAds}&position=${this.#Qe}`,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.linkedZoneId&&(e+=`&pblcz=${this.#t.linkedZoneId}`),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.#o.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`+`&cbpage=${encodeURIComponent(O())}`+`&atv=${this.#S}`+`&cbref=${encodeURIComponent(F())}`,this.#b&&(e+=this.#b),this.#Ye&&(e+="&ipptr=1"),this.#t.adblockSettings&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=ippg",this.#i.debug(`bid url: ${e}`),te(e)):(this.#i.debug(`bid url: ${e}`),e)}#Xe(e){var i;this.#i.debug(`rebid after ${e} sec`),s()(t()(i=this.#$e).call(i,this),1e3*e)}#et(){this.#t.refreshRate>0&&this.#Xe(this.#t.refreshRate)}#Ue(){this.#Re<1200&&(this.#Re*=2)}#Be(){this.#Re=10}#tt(){this.#Xe(this.#Re),this.#Ue()}async#$e(){if(this.#it()>=this.#t.maxAds||document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)return this.#i.debug("max ads reached or fullscreen."),void this.#et();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.#x?(this.#i.debug("fetch failed. adb present - switch to adb mode"),this.#x=!0,this.#o.enableAdbMode(),void this.#$e()):this.#o.isAdbMode()?void this.#i.debug("fetch failed with adb mode on. exit"):void this.#tt()}return 204===e.status?(this.#i.debug("unsold inventory!"),this.#m=!0,void this.#tt()):200!==e.status&&202!==e.status?(this.#i.error(`response status ${e.status} not recognised!`),void this.#tt()):(this.#m=!0,t=await e.json(),t=oe(t),this.#i.debug("response data:",t),202===e.status?(t.hp&&this.#nt(t.hp),t.capped_ttl?(this.#i.debug("capped!"),void this.#Xe(t.capped_ttl)):void this.#tt()):(t.hp&&this.#nt(t.hp),t.fallback?this.#Ze(t.fallback)?void this.#i.debug("fallback rendered. exit!"):void this.#tt():(this.#Be(),this.#t.refreshRate=t.rr,this.#b&&(t.impression_url&&(t.impression_url+=this.#b),t.click_url&&(t.click_url+=this.#b)),2===t.type?this.#Ye?this.#i.debug("custom ipp html already present"):this.#rt({script:t.script||"",link:t.click_url,impressionLink:t.impression_url||null}):(this.#Je.push({title:t.title||"",description:t.description||"",icon:t.icon||t.image,link:t.click_url,impressionLink:t.impression_url||null}),this.#ot()),void this.#et())))}#it(){return this.#Ye?this.#Je.length+1:this.#Je.length}#Ze(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}#nt(e){if(this.#Ke)return void this.#i.debug("hp already attached");if(this.#t.isAutoTag)return void this.#i.debug("hp not allowed when autotag");this.#Ke=!0,this.#i.debug("attach hp. hp data:",e);const t={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString(),isHPop:!0};var i;e.attributes&&(e.attributes["element-list"]&&(t.targetElementsCssSelector=e.attributes["element-list"],t.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(t.targetCountries=Ve()(i=e.attributes["country-list"]).call(i).split(","),t.triggerOnTargetCountries="allow"===e.attributes["country-action"])),this.#o.runPop(t)}#rt(e){this.#Ye=e;const t=(new DOMParser).parseFromString(this.#Ye.script,"text/html").querySelector("script"),i=document.createElement("script");if(t)for(const e of t.attributes)i.setAttribute(e.name,e.value);i.src||(i.innerText=t.innerText);const n=()=>{this.#i.debug("CT-CLICK"),fetch(this.#Ye.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.#Ye=null,document.body.removeChild(i)};T(document,"ct-click",n),T(document,"ct-close",r);let o=this.#Ye.impressionLink;window[Je]&&(o+=`&utsid=${window[Je]}`),o+=`&cbpage=${encodeURIComponent(O())}`,o+=`&cbref=${encodeURIComponent(F())}`,(async()=>{try{await fetch(o.toString())}catch(e){return this.#i.debug(e),void(this.#t.adblockSettings&&!this.#o.isAdbMode()&&(this.#i.debug("imp failed: try alt domain and path"),this.#o.enableAdbMode()))}document.dispatchEvent(new CustomEvent("impression-event"))})(),i.onerror=()=>{this.#i.debug("custom html script failed to load"),this.#Ye=null},document.body.appendChild(i)}#ot(){var e,t;this.#i.debug("drawing.."),A()(e=this.#Je).call(e,(e=>{let{htmlElement:t}=e;t&&t.remove()})),A()(t=this.#Je).call(t,((e,t)=>{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(Qe,(()=>{var n;if(Y||this.#t.adblockSettings&&this.#o.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(),Ze()(n=this.#Je).call(n,t,1),this.#ot()})),i.addEventListener(Ke,(()=>{var e;i.remove(),Ze()(e=this.#Je).call(e,t,1),this.#ot()})),e.htmlElement=i,document.body.appendChild(i)}))}},Banner:class{#o;#t={};#i;#st="";#at;#l=null;#ct=null;#lt=null;#dt=null;#ut;#ht;#v="youradexchange.com";#ue="velocecdn.com";#gt;#s;#x=!1;#S="61.2";constructor(e){this.#i=new a(`banner_${e.zoneId}`),this.#o=window[e.adcashGlobalName],this.#i.debug("init banner with config:",e),this.#t=e,this.#l=this.#t.zoneId,this.#ct=this.#t.width,this.#lt=this.#t.height,this.#dt=this.#t.renderIn,this.#s=this.#t.adblockSettings,this.#t.currentScript&&(this.#gt=this.#t.currentScript),this.#ut=this.#ht=document.body.clientWidth||window.innerWidth,e.tagVersionSuffix&&(this.#S+=e.tagVersionSuffix),this.#i.debug("tag version:",this.#S),this.#ft()}#pt(){const e=this.#at.impression_url;(new Image).src=e}async#ft(){this.#i.debug("get initial ad and config"),this.#st=await I(this.#i);const e=await this.#vt();let t;this.#i.debug("URL to fetch",e);try{t=await fetch(e)}catch(e){return this.#i.error(e),this.#s&&!this.#x?(this.#i.debug("fetch failed: try alt domain and path"),this.#x=!0,this.#o.enableAdbMode(),void this.#ft()):this.#o.isAdbMode()?void this.#i.debug("fetch failed: alt domain and path blocked. exit"):void this.#i.debug("fetch failed. exit")}if(200===t.status||202===t.status){this.#i.debug("initial fetch received 200 or 202");const e=await t.json();this.#at=oe(e),this.#bt()}else 204===t.status&&this.#i.debug("initial fetch received 204. No inventory")}async#vt(){let e=`${window.location.protocol}//${this.#v}/script/banner.php`;if(this.#s&&this.#o.isAdbMode()){const{adserverDomain:t}=this.#s,i=`/${ee("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${i}`}return e+=`?r=${this.#l}`,e+=`&cbpage=${encodeURIComponent(O())}`,e+=`&cbref=${encodeURIComponent(F())}`,e+=`&cbdescription=${encodeURIComponent(U("description"))}`,e+=`&cbkeywords=${encodeURIComponent(U("keywords"))}`,e+=`&cbtitle=${encodeURIComponent(z())}`,e+=`&srs=${R()}`,e+=`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`,e+=`&atv=${this.#S}`,this.#t.sub1&&(e+=`&sub1=${encodeURIComponent(this.#t.sub1)}`),this.#s&&this.#o.isAdbMode()?(e+="&sadbl=2",e+="&fmt=bnr",te(e)):e}#bt(){if(!this.#at||"undefined"===this.#at)return;if(this.#at.hp&&(this.#mt(this.#at.hp),1===tt()(this.#at).length))return;if(this.#at.capped_ttl)return void this.#i.debug("capped");let e;e=this.#dt?document.querySelector(this.#dt):this.#t.currentElement?this.#t.currentElement:this.#gt.parentElement,this.#yt(e);const t=this.#wt();e.appendChild(t)}#wt(){let e;return this.#at.fallback?(this.#i.debug("Banner type - fallback"),e=this.#St()):1===this.#at.render_image?(this.#i.debug("Banner type - image"),e=this.#kt()):(this.#i.debug("Banner type - html"),e=this.#xt()),this.#at.fallback||this.#pt(),this.#o||this.#At(),e}#kt(){const e=document.createElement("a");e.href=this.#at.click_url,e.target="_blank",e.rel="noopener, noreferrer",e.style.display="block",e.style.width=`${this.#ct?this.#ct:this.#at.width}px`,e.style.height=`${this.#lt?this.#lt:this.#at.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(Te,"1");const t=document.createElement("img");if(t.src=this.#at.image_url,t.target="_blank",t.width=this.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,this.#at.width>this.#ut&&this.#at.force_resize){const i=(this.#ct?this.#ct:this.#at.width)/this.#ht;e.style.width=`${this.#ht}px`,e.style.height=`${Math.round((this.#lt?this.#lt:this.#at.height)/i)}px`,t.style="max-width: 100%;",t.width=this.#ht,t.height=Math.round((this.#lt?this.#lt:this.#at.height)/i)}return e.appendChild(t),e}#xt(){const e=`banner_${this.#l}`,t=document.createElement("div");t.id=e,t.style.display="block",t.style.width=`${this.#ct?this.#ct:this.#at.width}px`,t.style.height=`${this.#lt?this.#lt:this.#at.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.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,t.setAttribute("doskip","1"),t.setAttribute(Te,"1"),this.#Tt(t,this.#at.html);const i=()=>{this.#i.debug("click recorded:",this.#at.click_url),(new Image).src=this.#at.click_url,r()},n=()=>{this.#i.debug("click on divNode"),i()},r=()=>{t.removeEventListener("click",n),clearInterval(o)};t.addEventListener("click",n);const o=ue()((()=>{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,A()(i=w()(e.querySelectorAll("script"))).call(i,(e=>{var t;const i=document.createElement("script");A()(t=w()(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)}))}#St(){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.#ct?this.#ct:this.#at.width}px`,t.style.height=`${this.#lt?this.#lt:this.#at.height}px`,t.width=this.#ct?this.#ct:this.#at.width,t.height=this.#lt?this.#lt:this.#at.height,t.scrolling="no",t.vspace="0",t.hspace="0",t.allowtransparency="true",t.allowfullscreen="true",t.srcdoc=this.#at.fallback,t}#mt=e=>{if(this.#o){const i={zoneId:e.pop_zone_id.toString(),linkedZoneId:e.source_zone_id.toString()};var t;return e.attributes&&(e.attributes["element-list"]&&(i.targetElementsCssSelector=e.attributes["element-list"],i.triggerOnTargetElementsClick="allow"===e.attributes["element-action"]),e.attributes["country-list"]&&(i.targetCountries=Ve()(t=e.attributes["country-list"]).call(t).split(","),i.triggerOnTargetCountries="allow"===e.attributes["country-action"])),void this.#o.runPop(i)}const i=document.createElement("script");var n;i.type="text/javascript",i.src=`//${this.#ue}/script/suv4.js`,i.setAttribute("zid",e.pop_zone_id),i.setAttribute("lpzi",e.source_zone_id),i.setAttribute("data-adel","lwsu"),i.setAttribute("adlm","ipvipplm"),e.attributes&&A()(n=tt()(e.attributes)).call(n,(t=>{i.setAttribute(t,e.attributes[t])})),document.body.appendChild(i)};#yt(e){if(this.#i.debug("Initial viewport:",this.#ut),this.#at.width>this.#ut&&this.#at.force_resize){var t=window.getComputedStyle(e),i=nt()(t.paddingLeft),n=nt()(t.marginLeft);this.#ht=e.clientWidth-i-n,this.#i.debug("Parent element width:",this.#ht)}}#At(){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.#at.bot_link,document.body.appendChild(e)}}}}))}()}();