((a,c)=>{var i={instanceId:null,zone:"288",site:"71",host:"https://d2.ads.rmbl.ws",width:"300",height:"250",pub:"23453",type:"3",loaded:!1,lazy:"true",parent:!1,script:null,scriptSrc:"id",adContainer:null,frame:{el:null,injected:!1,loaded:!1},log:!1,params:{},extra:[function(){var e="";return 0<e.length?"keywords="+e:""},function(){var e=o.searchParam("rac_caid");if(null===e||0===e.length)return"";var t=o.searchParam("rac_crid");let n="";return n+="rac_caid="+e,null!==t&&0<t.length&&(n+="&rac_crid="+t),n}]},o={log:function(){i.log&&console.log("[Zone "+i.zone+": "+i.instanceId+"] ",...arguments)},isParent:function(){try{return a.self!==a.top}catch(e){return!0}},get:function(i){for(var e,t=[function(){return localStorage[i]},function(){return sessionStorage[i]},function(){for(var e,t,n=c.cookie.split(";"),r=0;r<n.length;r++)if(e=n[r].substr(0,n[r].indexOf("=")),t=n[r].substr(n[r].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))===i)return decodeURI(t)}],n=0;n<t.length;n++)if(e=this.safe(t[n]),!o.undef(e)&&!1!==e)return e;return""},set:function(t,n){[function(){localStorage[t]=n},function(){sessionStorage[t]=n},function(){var e=new Date,e=encodeURI(n)+"; expires="+e.setSeconds(e.getSeconds()+31536e4).toUTCString();c.cookie=t+"="+e}].forEach(function(e){o.safe(e)})},safe:function(e){try{return e()}catch(e){return i.log&&console.warn(e),!1}},attr:function(e){e=i.script.getAttribute(e);return null===e?"":encodeURIComponent(e)},style:function(e,t){return c.defaultView.getComputedStyle(e,null)[t]},searchParam:function(e){var t=window.location.search;return 0===t.length?null:new URLSearchParams(t).get(e)},url:function(e){try{var t=(i.parent?c.referrer:c.location.href).substring(0,255);return e?encodeURIComponent(t):t}catch(e){return""}},title:function(){var e;return(i.parent?this.url(!1).replace(/[^a-z0-9]/gim," ").replace(/(https?|www)/gim," ").replace(/\s+/g," "):(e=c.getElementsByTagName("title")[0],o.undef(e)?"":e.innerText)).substring(0,255)},undef:function(e){return void 0===e},objToHttpArr:function(e){if("object"!=typeof e)return[];var t,n=[];for(t in e){var r=e[t];Array.isArray(r)&&(r=r.join(",")),n.push(t+"="+encodeURIComponent(r))}return n},visible:function(e,t,n,r,i,a,o){var s=e.parentNode;return!(e!==c.body&&!c.body.contains(e))&&(9===s.nodeType||"HTML"===s.nodeName||("SCRIPT"===e.nodeName||"0"!==this.style(e,"opacity")&&"none"!==this.style(e,"display")&&"hidden"!==this.style(e,"visibility"))&&((this.undef(t)||this.undef(i)||this.undef(r)||this.undef(n)||this.undef(a)||this.undef(o))&&(r=(t=e.offsetTop)+e.offsetHeight,i=(n=e.offsetLeft)+e.offsetWidth,a=e.offsetWidth,o=e.offsetHeight),!s||(e.offsetParent!==s||"hidden"!==this.style(s,"overflow")&&"scroll"!==this.style(s,"overflow")||!(n+2>s.offsetWidth+s.scrollLeft||n+a<s.scrollLeft||t+2>s.offsetHeight+s.scrollTop||t+o<s.scrollTop))&&(e.offsetParent===s&&(n+=s.offsetLeft,t+=s.offsetTop),this.visible(s,t,n,r,i,a,o))))},isInViewport:function(e,t=1){var e=e.getBoundingClientRect(),n=a.innerHeight||c.documentElement.clientHeight;let r=e.top;0<=r&&(r=0);var i=Math.floor(100-r/-e.height*100),n=Math.floor(100-(e.bottom-n)/e.height*100);return!(i<t||n<t)},visiblePercent:function(e){var e=e.getBoundingClientRect(),t=a.innerHeight||c.documentElement.clientHeight,n=a.innerWidth;return Math.max(0,Math.min(e.bottom,t)-Math.max(e.top,0))*Math.max(0,Math.min(e.right,n)-Math.max(e.left,0))/(e.width*e.height)*100},canUseIntersectionObserver:function(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype},getFirstApplicableScriptById:function(){var e=document.querySelectorAll("script#nrp-"+i.zone+":not([data-rac-instance-id])");return 0===e.length?null:e[0]},purgeScripts:function(){document.querySelectorAll('script[data-rac-instance-id="'+i.instanceId+'"]').forEach(function(e){o.safe(function(){e.remove()})})},getFirstAvailableInstanceId:function(){var e=Math.floor(9999999*Math.random());return 0<document.querySelectorAll('script[data-rac-instance-id="'+e+'"]').length?o.getFirstAvailableInstanceId():e}},r={syncTimer:null,contentWindow:function(){return i.frame.el?i.frame.el.contentWindow:null},send(e){return this.contentWindow().postMessage(e,"*")},recv(){this.sync()},sync(){let e=this;null!==this.syncTimer&&clearInterval(this.syncTimer);function t(){null===e.contentWindow()?clearInterval(e.syncTimer):e.send({type:"sync",data:{inViewPercent:e.inViewPercent()}})}t(),this.syncTimer=setInterval(t,750)},inViewPercent(){return i.frame.injected?o.visiblePercent(i.adContainer):i.lazy&&o.isInViewport(i.adContainer)?1:0}},s={pre:function(){return a.rads=o.undef(a.rads)?{}:a.rads,a.rads.loaded=o.undef(a.rads.loaded)?[]:a.rads.loaded,-1===a.rads.loaded.indexOf(i.zone)&&a.rads.loaded.push(i.zone),i.lazy="true"===i.lazy,i.instanceId=o.getFirstAvailableInstanceId(),o.safe(s.setParams),!0},handleLazyLoad:function(n){if(o.canUseIntersectionObserver()){let t=new IntersectionObserver(e=>{o.isInViewport(n)&&(t.disconnect(),s.frame())},{threshold:.01});void t.observe(n)}else{let e=function(){o.isInViewport(n)&&!i.loaded?s.frame():setTimeout(e,100)};e()}},shouldLazyLoad(e){return!o.undef(document.currentScript)&&(o.undef(e)||o.undef(e.lazy)?i.lazy:i.lazy="true"===e.lazy)},init:function(){if(o.log("init"),i.parent=o.isParent(),i.parent&&o.log("invoked within an iframe"),i.script=o.getFirstApplicableScriptById(),i.scriptSrc="id",null===i.script)return o.log("script element unavailable"),!1;o.log("visibility",o.visible(i.script)),o.undef(document.currentScript)||o.undef(document.currentScript.dataset)||(document.currentScript.dataset.racInstanceId=i.instanceId.toString());var e=i.script.dataset,t=(e.racInstanceId=i.instanceId.toString(),i.script.parentElement);if(i.adContainer=document.createElement("div"),i.adContainer.id="rac-ad-"+i.instanceId.toString(),t.appendChild(i.adContainer),s.shouldLazyLoad(e)){if(o.log("attempt lazy load"),t&&!o.isInViewport(i.adContainer))return this.handleLazyLoad(i.adContainer),!1;o.log("skipping lazy load")}return this.frame(),!0},src:function(){var e=i.host+"/loader?a="+i.zone,t=o.url(!0),n=encodeURIComponent(o.title()),r=["if="+i.parent];return 0<Object.keys(i.params).length&&r.push(o.objToHttpArr(i.params).join("&")),0!==t.length&&r.push("url="+t),0!==n.length&&r.push("title="+n),i.extra.forEach(function(e){e=o.safe(e);e&&0!==e.length&&r.push(e)}),e+"&"+r.join("&")},setParams:function(e){var t,n=e||a.rads.data||{};for(t in n){var r=t.match(/s\d?\d\b/g);if(null!==r&&0<r.length)i.params[t]=n[t];else switch(t){case"debug":i.params.debug="true"===n[t]||!0===n[t];break;case"cpid":case"content_publisher_id":i.params.cpid=n[t];break;case"cuid":case"content_user_id":i.params.cuid=n[t];break;case"cvid":case"content_video_id":i.params.cvid=n[t];break;case"ccid":case"content_channel_id":i.params.ccid=n[t];break;case"keywords":i.params.keywords=n[t];break;case"categories":i.params.categories=Array.isArray(n[t])?n[t].join(","):n[t];break;case"log":i.log=n[t];break;case"cuab":i.params.cuab=n[t];break;case"cug":i.params.cug=n[t];break;case"cuuid":i.params.cuuid=n[t]}}o.undef(n.zones)||o.undef(n.zones[i.zone])||s.setParams(n.zones[i.zone])},frame:function(){o.log("inject iframe");let e=i.script.parentNode,t=e;var n;return null!==i.adContainer&&(t=i.adContainer),null!==e&&((n=c.createElement("iframe")).src=this.src(),n.width=i.width,n.height=i.height,n.scrolling="no",n.style.cssText="border:0;display:block;",n.sandbox="allow-popups allow-scripts allow-same-origin allow-forms",n.setAttribute("data-zone",i.zone),n.setAttribute("data-rac-instance-id",i.instanceId),n.onload=function(){i.frame.loaded=!0,r.recv()},i.frame.el=n,"SCRIPT"===i.script.nodeName?(o.purgeScripts(),o.safe(function(){e.removeChild(c.currentScript)}),o.safe(function(){e.removeChild(i.script)}),t.appendChild(n),!(i.frame.injected=!0)):(i.script.appendChild(n),void(i.frame.injected=!0)))}};s.pre()&&s.init()})(window,document);