(()=>{function z(s,c){var b=[],e=function(f,p){p==null||p===""||b.push({key:f,value:p})},m={};try{m=c()||{}}catch(f){m={}}e("consent",m.consent),e("gdpr",m.gdpr),e("us_privacy",m.us_privacy),e("gpp",m.gpp),e("gpp_sid",m.gpp_sid);try{var i=s.navigator.doNotTrack;(i==="1"||i==="0")&&e("dnt",i)}catch(f){}try{var v=s.navigator.globalPrivacyControl;v===!0?e("gpc","1"):v===!1&&e("gpc","0")}catch(f){}return b}function S(s,c,b){var e=b.src,m=b.initConfig||{},i=b.timeoutMs||5e3,v=b.pollMs||50;return new Promise(function(f){if(!e){f(void 0);return}if(!(s.rads&&s.rads.control)&&!c.querySelector('script[src="'+e+'"]')){var p=c.createElement("script");p.src=e,p.async=!0,(c.head||c.documentElement).appendChild(p)}var g=Date.now(),y=function(){var u=s.rads&&s.rads.control;if(u){try{typeof u.init=="function"&&u.init(m)}catch(n){}typeof u.ready=="function"?u.ready().then(function(){f(u)},function(){f(u)}):typeof u.onReady=="function"?u.onReady(function(){f(u)}):f(u);return}if(Date.now()-g>i){f(void 0);return}setTimeout(y,v)};y()})}(function(s,c){let b=function(n){return n==="true"||n===1},e={instanceId:null,zone:"456",refreshInterval:parseInt("0"),site:"19",host:"https://d2.ads.rmbl.ws",sizing:{width:parseInt("300"),height:parseInt("250"),aspectRatio:null,minWidth:0,minHeight:0,minScalePercent:.35,activeWidth:parseInt("300"),activeHeight:parseInt("250"),maxShownWidth:0,forceFullHeight:b("false")},pub:"22994",type:"3",loaded:!1,lazy:"true",correlator:"3J5qn8j2TU4corVeKzGlRnxbExy",parent:!1,script:null,scriptSrc:"id",adContainer:null,adContainerId:null,doubleVerify:{enabled:b("false"),src:""},omidVerification:{enabled:b("false"),scripts:JSON.parse("[]")},control:{src:"https://d2.ads.rmbl.ws/control"},frame:{el:null,injected:!1,loaded:!1,count:0},log:!1,params:{},extra:[function(){let n="";return n.length>0?"keywords="+n:""},function(){let n=i.searchParam("rac_caid");if(n===null||n.length===0)return"";let t=i.searchParam("rac_crid"),r="";return r+="rac_caid="+n,t!==null&&t.length>0&&(r+="&rac_crid="+t),r}]},m={promises:[],add(n){this.promises.push(n)},async wait(){try{return await Promise.allSettled(this.promises)}catch(n){}}},i={log:function(){e.log&&console.log("[Zone "+e.zone+": "+e.instanceId+"] ",...arguments)},isParent:function(){try{return s.self!==s.top}catch(n){return!0}},get:function(n){for(var t=!1,r=[function(){return localStorage[n]},function(){return sessionStorage[n]},function(){var o,l,h,d=c.cookie.split(";");for(o=0;o<d.length;o++)if(l=d[o].substr(0,d[o].indexOf("=")),h=d[o].substr(d[o].indexOf("=")+1),l=l.replace(/^\s+|\s+$/g,""),l===n)return decodeURI(h)}],a=0;a<r.length;a++)if(t=this.safe(r[a]),!i.undef(t)&&t!==!1)return t;return""},set:function(n,t){var r=[function(){localStorage[n]=t},function(){sessionStorage[n]=t},function(){var a=new Date,o=encodeURI(t)+"; expires="+a.setSeconds(a.getSeconds()+10*365*24*60*60).toUTCString();c.cookie=n+"="+o}];r.forEach(function(a){i.safe(a)})},safe:function(n){try{return n()}catch(t){return e.log&&console.warn(t),!1}},attr:function(n){var t=e.script.getAttribute(n);return t===null?"":encodeURIComponent(t)},style:function(n,t){return c.defaultView.getComputedStyle(n,null)[t]},searchParam:function(n){let t=window.location.search;return t.length===0?null:new URLSearchParams(t).get(n)},url:function(n){try{let t=(e.parent?c.referrer:c.location.href).substring(0,255);return n?encodeURIComponent(t):t}catch(t){return""}},title:function(){if(e.parent)return this.url(!1).replace(/[^a-z0-9]/gmi," ").replace(/(https?|www)/gmi," ").replace(/\s+/g," ").substring(0,255);let n=c.getElementsByTagName("title")[0];return(i.undef(n)?"":n.innerText).substring(0,255)},undef:function(n){return typeof n>"u"},objToHttpArr:function(n){if(typeof n!="object")return[];var t=[];for(var r in n){var a=n[r];Array.isArray(a)&&(a=a.join(",")),t.push(r+"="+encodeURIComponent(a))}return t},visible:function(n,t,r,a,o,l,h){var d=n.parentNode,_=2;return n===c.body||c.body.contains(n)?d.nodeType===9||d.nodeName==="HTML"?!0:n.nodeName!=="SCRIPT"&&(this.style(n,"opacity")==="0"||this.style(n,"display")==="none"||this.style(n,"visibility")==="hidden")?!1:((this.undef(t)||this.undef(o)||this.undef(a)||this.undef(r)||this.undef(l)||this.undef(h))&&(t=n.offsetTop,r=n.offsetLeft,a=t+n.offsetHeight,o=r+n.offsetWidth,l=n.offsetWidth,h=n.offsetHeight),d?n.offsetParent===d&&(this.style(d,"overflow")==="hidden"||this.style(d,"overflow")==="scroll")&&(r+_>d.offsetWidth+d.scrollLeft||r+l<d.scrollLeft||t+_>d.offsetHeight+d.scrollTop||t+h<d.scrollTop)?!1:(n.offsetParent===d&&(r+=d.offsetLeft,t+=d.offsetTop),this.visible(d,t,r,a,o,l,h)):!0):!1},isInViewport:function(n,t=1){let r=n.getBoundingClientRect(),a=s.innerHeight||c.documentElement.clientHeight,o=r.top;o>=0&&(o=0);let l=Math.floor(100-o/-r.height*100),h=Math.floor(100-(r.bottom-a)/r.height*100);return!(l<t||h<t)},visiblePercent:function(n){let t=n.getBoundingClientRect(),r=s.innerHeight||c.documentElement.clientHeight,a=s.innerWidth,o=Math.max(0,Math.min(t.bottom,r)-Math.max(t.top,0)),l=Math.max(0,Math.min(t.right,a)-Math.max(t.left,0)),h=t.width*t.height;return o*l/h*100},elementsVisibleSize(n,t,r){typeof t>"u"&&(t=Number.MAX_SAFE_INTEGER),typeof r>"u"&&(r=Number.MAX_SAFE_INTEGER);let a=n.parentNode,o=n.getBoundingClientRect(),l=Math.floor(o.width),h=Math.floor(o.height);return!isNaN(l)&&l>0&&(t=Math.min(t,l)),!isNaN(h)&&h>0&&(r=Math.min(r,h)),a!==null&&a.nodeType!==9&&a.nodeName!=="HTML"?i.elementsVisibleSize(a,t,r):[t,r]},canUseIntersectionObserver:function(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype},canUseResizeObserver:function(){return"ResizeObserver"in window},getFirstApplicableScriptById:function(){let n=c.querySelectorAll("script#nrp-"+e.zone+":not([data-rac-instance-id])");return n.length===0?null:n[0]},purgeScripts:function(){c.querySelectorAll('script[data-rac-instance-id="'+e.instanceId+'"]').forEach(function(t){i.safe(function(){t.remove()})})},getFirstAvailableInstanceId:function(){let n=Math.floor(Math.random()*9999999);return c.querySelectorAll('script[data-rac-instance-id="'+n+'"]').length>0?i.getFirstAvailableInstanceId():n},greatestCommonDivisor:function(n,t){return t===0?n:this.greatestCommonDivisor(t,n%t)},aspectRatio:function(n,t){let r=this.greatestCommonDivisor(n,t);return{widthRatio:n/r,heightRatio:t/r,ratio:n/r/(t/r),toString:function(){return this.widthRatio+":"+this.heightRatio}}},round(n,t){return Math.round(n*Math.pow(10,t))/Math.pow(10,t)},debounce:function(n,t){let r;return function(...a){let o=this;clearTimeout(r),r=setTimeout(function(){n.apply(o,a)},t)}},injectScript(n,t){if(!n||(s[t]=s[t]||!1,s[t]||c.querySelector('script[src="'.concat(n,'"]'))))return!1;s[t]=!0;let r=c.createElement("script");return r.src=n,r.async=!0,c.head.appendChild(r),!0}},v={booted:!1,init(){!e.control.src||e.control.src.length===0||(i.log("control: init"),m.add(S(s,c,{src:e.control.src,initConfig:{omid:{enabled:e.omidVerification.enabled}},timeoutMs:500,pollMs:10}).then(function(n){return n&&typeof n.getPromise=="function"?n.getPromise():void 0})),this.booted=!0)},hasBooted(){return this.booted}},f={booted:!1,init:function(){var n;!e.doubleVerify.enabled||((n=e.doubleVerify.src)==null?void 0:n.length)===0||(f.inject(e.doubleVerify.src)&&(s.onDvtagReady=function(t,r=750){s.dvtag=window.dvtag||{},dvtag.cmd=dvtag.cmd||[];let a={callback:t,timeout:r,timestamp:new Date().getTime()};dvtag.cmd.push(function(){dvtag.queueAdRequest(a)}),setTimeout(function(){let o=a.callback;a.callback=null,o&&o()},r)},s.defineDvtagSlot=s.defineDvtagSlot||function(t,r){s.dvtag=s.dvtag||{},dvtag.cmd=dvtag.cmd||[],dvtag.cmd.push(()=>dvtag.defineSlot(t,r))},s.getDvtagTargeting=s.getDvtagTargeting||function(t){return s.dvtag=s.dvtag||{},dvtag.getTargeting?dvtag.getTargeting(t):{}}),m.add(new Promise(function(t){s.onDvtagReady(function(){i.log("dv: tag ready"),t()})})),e.extra.push(function(){let t="",r=f.getTargeting(e.adContainerId);return Object.keys(r).forEach(function(a){r[a].length!==0&&(t!==""&&(t+="&"),t+="".concat(a,"=")+encodeURIComponent(r[a].join(",")))}),t}),this.booted=!0)},hasBooted(){return this.booted},inject(n){return i.injectScript(n,"_raDvInjectRun")?(i.log("dv: injected"),!0):(i.log("dv: already injected"),!1)},defineAdSlot(n,t,r){!this.hasBooted()||!s.defineDvtagSlot||s.defineDvtagSlot(t,{id:n,sizes:r})},getTargeting(n){if(!s.getDvtagTargeting)return{};let t=s.getDvtagTargeting(n),r={};return Object.keys(t).forEach(function(a){r["dv_".concat(a.toLowerCase())]=t[a]}),r}},p={session:null,client:null,unloadRegistered:!1,hasSession(){return this.session&&this.client},createSession(){var n,t;return!e.omidVerification.enabled||!((n=s.rads)!=null&&n.control)||!((t=s.rads.control)!=null&&t.omid)?null:(this.client=s.rads.control.omid,this.session=this.client.create({partnerName:"rumble",partnerVersion:"1.0.0",slotElement:e.adContainer,verificationScripts:e.omidVerification.scripts,url:i.url(!1)}),this.session&&i.log("omid: session created, id:",this.session.id),this.session)},impression(){this.hasSession()&&(this.client.impression(this.session),i.log("omid: impression signaled"))},finish(){this.hasSession()&&(this.client.finish(this.session),this.session=null,i.log("omid: session finished"))},registerUnloadHandler(){if(this.unloadRegistered)return;this.unloadRegistered=!0;let n=this;s.addEventListener("pagehide",function(){n.finish()},{capture:!0})}},g={isVisible:function(){return e.adContainer.offsetParent!==null},maxPossibleWidth:function(n){if(!n.parentElement)return n.clientWidth;let t=n.parentElement,r=t.style.position;if(t.style.width!==""||t.style.maxWidth!=="")return t.clientWidth;getComputedStyle(t).position==="static"&&(t.style.position="relative");let a="rac-ad-cs-"+e.instanceId,o=c.getElementById(a);return o||(o=c.createElement("div"),o.style.width="100%",o.style.position="absolute",o.style.visibility="hidden",o.style.height="0",o.style.margin="0",o.style.border="none",o.style.padding="0",o.style.overflow="hidden",o.style.pointerEvents="none",o.id=a,t.appendChild(o)),t.style.position=r,o.clientWidth},onResize:function(){let n=e.adContainer,t=n.offsetParent;if(n){if(g._resizeTimer&&clearTimeout(g._resizeTimer),!g.isVisible()){g._resizeTimer=setTimeout(function(){g.onResize()},150);return}t&&i.canUseResizeObserver()?new ResizeObserver(a=>{g.resizeToFitParent()}).observe(t):window.addEventListener("resize",function(){g.resizeToFitParent()})}},resizeToFitParent:i.debounce(function(){let n=e.adContainer;if(!n||!n.parentElement)return;let r=e.sizing.aspectRatio.ratio,a=g.maxPossibleWidth(n),o=a/r;(!a||a===0)&&(a=e.sizing.width,o=e.sizing.height),a=i.round(Math.min(Math.max(a,e.sizing.minWidth),e.sizing.width),4),e.sizing.forceFullHeight?o=e.sizing.height:o=i.round(Math.min(Math.max(o,e.sizing.minHeight),e.sizing.height),4),g.resize(a,o),y.resize(a,o),e.sizing.activeWidth=a,e.sizing.activeHeight=o,e.sizing.maxShownWidth=Math.max(e.sizing.maxShownWidth,a)},150),resize(n,t){e.adContainer.style.position="relative",e.adContainer.style.width=n+"px",e.adContainer.style.height=t+"px"}},y={syncTimer:null,lastLoad:null,contentWindow:function(){return e.frame.el?e.frame.el.contentWindow:null},send(n){return this.contentWindow().postMessage(n,"*")},recv(){this.sync()},sync(){let n=this;this.syncTimer!==null&&clearInterval(this.syncTimer);let t=function(){if(n.contentWindow()===null){clearInterval(n.syncTimer);return}let r=n.inViewPercent();n.send({type:"sync",data:{inViewPercent:r}}),n.canBeRefreshed()&&(i.log("refreshing iframe source after ".concat(e.refreshInterval," seconds")),n.setSrc(u.src()))};t(),this.syncTimer=setInterval(t,750)},canBeRefreshed(){let n=this.lastLoad!==null&&Date.now()/1e3-this.lastLoad>=e.refreshInterval;return e.frame.loaded&&c.hasFocus()&&e.refreshInterval>0&&this.inViewPercent()>25&&n},inViewPercent(){return e.frame.injected?i.visiblePercent(e.adContainer):e.lazy&&i.isInViewport(e.adContainer)?1:0},setLoaded(){this.lastLoad=Date.now()/1e3},setSrc(n){if(!e.frame.el)return;let t=this;i.safe(function(){e.frame.el.src=n,t.setLoaded(),e.frame.count++})},resize(n,t){e.frame.el&&e.frame.el.style.width!=="100%"&&(n!==e.sizing.width||t!==e.sizing.height)&&(e.frame.el.style.position="absolute",e.frame.el.style.top="0",e.frame.el.style.left="0",e.frame.el.style.bottom="0",e.frame.el.style.right="0",e.frame.el.style.width="100%",e.frame.el.style.height="100%")}},u={pre:function(){return s.rads=i.undef(s.rads)?{}:s.rads,s.rads.loaded=i.undef(s.rads.loaded)?[]:s.rads.loaded,i.undef(s.rads.correlator)&&!i.undef(e.correlator)&&e.correlator.length>0?s.rads.correlator=e.correlator:e.correlator=s.rads.correlator,s.rads.loaded.indexOf(e.zone)===-1&&s.rads.loaded.push(e.zone),e.lazy=e.lazy==="true",e.instanceId=i.getFirstAvailableInstanceId(),this.setSizing(),i.safe(u.setParams),!0},setSizing(){e.sizing.aspectRatio=i.aspectRatio(e.sizing.width,e.sizing.height),e.sizing.minWidth=e.sizing.width*e.sizing.minScalePercent,e.sizing.minHeight=e.sizing.height*e.sizing.minScalePercent},handleLazyLoad:function(n){if(i.canUseIntersectionObserver()){let r=new IntersectionObserver(a=>{i.isInViewport(n)&&(r.disconnect(),u.frame())},{threshold:.01});r.observe(n);return}let t=function(){if(i.isInViewport(n)&&!e.loaded){u.frame();return}setTimeout(t,100)};t()},shouldLazyLoad(n){return i.undef(c.currentScript)?!1:i.undef(n)||i.undef(n.lazy)?e.lazy:e.lazy=n.lazy==="true"},init:function(){if(i.log("init"),e.parent=i.isParent(),e.parent&&i.log("invoked within an iframe"),i.safe(function(){v.init()}),i.safe(function(){f.init()}),e.extra.push(function(){var r,a;return(a=(r=s.rads)==null?void 0:r.control)!=null&&a.buildEids?s.rads.control.buildEids():""}),e.script=i.getFirstApplicableScriptById(),e.scriptSrc="id",e.script===null)return i.log("script element unavailable"),!1;i.log("visibility",i.visible(e.script)),!i.undef(c.currentScript)&&!i.undef(c.currentScript.dataset)&&(c.currentScript.dataset.racInstanceId=e.instanceId.toString());let n=e.script.dataset;n.racInstanceId=e.instanceId.toString();let t=e.script.parentElement;if(e.adContainerId="rac-ad-"+e.instanceId.toString(),e.adContainer=c.createElement("div"),e.adContainer.id=e.adContainerId,e.adContainer.style.maxWidth="".concat(e.sizing.width,"px"),e.adContainer.style.maxHeight="".concat(e.sizing.height,"px"),e.adContainer.style.minWidth="".concat(e.sizing.minWidth,"px"),e.adContainer.style.minHeight="".concat(e.sizing.minHeight,"px"),t.appendChild(e.adContainer),g.onResize(),f.defineAdSlot(e.zone,e.adContainerId,[{width:e.sizing.width,height:e.sizing.height}]),u.shouldLazyLoad(n)){if(i.log("attempt lazy load"),t&&!i.isInViewport(e.adContainer))return this.handleLazyLoad(e.adContainer),!1;i.log("skipping lazy load")}return this.frame(),!0},src:function(){i.safe(u.setParams),i.safe(u.applyBrowserDefaults);var n=e.host+"/loader?a="+e.zone,t=i.url(!0),r=encodeURIComponent(i.title()),a=["if="+e.parent];return Object.keys(e.params).length>0&&a.push(i.objToHttpArr(e.params).join("&")),t.length!==0&&a.push("url="+t),r.length!==0&&a.push("title="+r),i.safe(function(){let[o,l]=i.elementsVisibleSize(e.adContainer);o>0&&o<Number.MAX_SAFE_INTEGER&&a.push("vw="+o),l>0&&l<Number.MAX_SAFE_INTEGER&&a.push("vh="+l)}),!i.undef(e.correlator)&&e.correlator.length>0&&a.push("pcorr="+e.correlator),e.extra.forEach(function(o){var l=i.safe(o);l=!l||l.length===0?"":a.push(l)}),n=n+"&"+a.join("&"),n},setParams:function(n){var t=n||s.rads.data||{};for(var r in t){let a=r.match(/s\d?\d\b/g);if(a!==null&&a.length>0){e.params[r]=t[r];continue}switch(r){case"debug":e.params.debug=t[r]==="true"||t[r]===!0;break;case"cpid":case"content_publisher_id":e.params.cpid=t[r];break;case"cuid":case"content_user_id":e.params.cuid=t[r];break;case"cvid":case"content_video_id":e.params.cvid=t[r];break;case"ccid":case"content_channel_id":e.params.ccid=t[r];break;case"keywords":e.params.keywords=t[r];break;case"categories":e.params.categories=Array.isArray(t[r])?t[r].join(","):t[r];break;case"log":e.log=t[r];break;case"cuab":e.params.cuab=t[r];break;case"cug":e.params.cug=t[r];break;case"cuuid":e.params.cuuid=t[r];break;case"cuh":e.params.cuh=t[r];break;case"coppa":e.params.coppa=t[r];break;case"gdpr":e.params.gdpr=t[r];break;case"us_privacy":e.params.us_privacy=t[r];break;case"consent":e.params.consent=t[r];break;case"gpp":e.params.gpp=t[r];break;case"gpp_sid":e.params.gpp_sid=Array.isArray(t[r])?t[r].join(","):t[r];break;case"gpc":e.params.gpc=t[r];break;case"dnt":e.params.dnt=t[r];break;case"lmt":e.params.lmt=t[r];break;case"content_id":e.params.content_id=t[r];break;case"content_title":e.params.content_title=t[r];break;case"content_artist":e.params.content_artist=t[r];break;case"content_cats":e.params.content_cats=Array.isArray(t[r])?t[r].join(","):t[r];break;case"content_len":e.params.content_len=t[r];break;case"content_live":e.params.content_live=t[r];break;case"content_rating":e.params.content_rating=t[r];break;case"content_bs":e.params.content_bs=t[r];break;case"content_episode":e.params.content_episode=t[r];break;case"content_series":e.params.content_series=t[r];break;case"content_genre":e.params.content_genre=t[r];break;case"content_prodq":e.params.content_prodq=t[r];break;case"content_context":e.params.content_context=t[r];break;case"content_mrating":e.params.content_mrating=t[r];break;case"content_lang":e.params.content_lang=t[r];break;case"producer_id":e.params.producer_id=t[r];break;case"producer_name":e.params.producer_name=t[r];break;case"producer_cats":e.params.producer_cats=Array.isArray(t[r])?t[r].join(","):t[r];break;case"producer_domain":e.params.producer_domain=t[r];break;case"channel_name":e.params.channel_name=t[r];break;case"channel_domain":e.params.channel_domain=t[r];break;case"network_id":e.params.network_id=t[r];break;case"network_name":e.params.network_name=t[r];break;case"network_domain":e.params.network_domain=t[r];break;case"rumble_cats":e.params.rumble_cats=Array.isArray(t[r])?t[r].join(","):t[r];break;case"rumble_embed":e.params.rumble_embed=t[r];break;case"rumble_embed_v":e.params.rumble_embed_v=t[r];break}}!i.undef(t.zones)&&!i.undef(t.zones[e.zone])&&u.setParams(t.zones[e.zone])},applyBrowserDefaults:function(){var n=function(t,r){r&&(i.undef(e.params[t])||e.params[t]==="")&&(e.params[t]=r)};i.safe(function(){for(var t=s.rads&&s.rads.control&&s.rads.control.getPrivacySignals?s.rads.control.getPrivacySignals:function(){return{}},r=z(s,t),a=0;a<r.length;a++)n(r[a].key,r[a].value)})},frame:async function(){i.log("inject iframe");let n=e.script.parentNode,t=n;if(e.adContainer!==null&&(t=e.adContainer),n===null)return!1;let r=c.createElement("iframe");if(await m.wait(),i.safe(function(){p.createSession()}),r.src=this.src(),r.width=String(e.sizing.width),r.height=String(e.sizing.height),r.scrolling="no",r.style.cssText="border:0;display:block;",r.sandbox="allow-popups allow-scripts allow-same-origin allow-forms",r.setAttribute("data-zone",e.zone),r.setAttribute("data-rac-instance-id",e.instanceId),r.onload=function(){e.frame.loaded=!0,y.recv(),i.safe(function(){p.impression(),p.registerUnloadHandler()})},e.frame.el=r,e.script.nodeName==="SCRIPT")return i.purgeScripts(),t.appendChild(r),e.frame.injected=!0,y.setLoaded(),g.resizeToFitParent(),!1;e.script.appendChild(r),e.frame.injected=!0,y.setLoaded(),g.resizeToFitParent()}};(function(){if(!u.pre())return!1;u.init()})()})(window,document);})();
