var t={764(t,e,i){i.r(e),i.d(e,{EmbeddedSafeFrame:()=>s,default:()=>a});var o=i(46),n=function(t,e,i,o){return new(i||(i=Promise))(function(n,d){function s(t){try{r(o.next(t))}catch(t){d(t)}}function a(t){try{r(o.throw(t))}catch(t){d(t)}}function r(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,a)}r((o=o.apply(t,e||[])).next())})};class s{constructor(){this.SAFEFRAME_LIBRARY_CONTENT=()=>{
/*! safeframe-wrapper v1.0.0 - 2025-10-07 */
window.safeFrameInit={config:[],setConfig:function(t){this.config=[...t]},init:function(){var t=!1;-1!=window.location.search.indexOf("optidigital_debug=true")&&(t=!0),this.config.length&&this.config.map(e=>{if(o=document.getElementById(e.id))if(e.hideElSiblings)for(var i of o.children)i.style.height="1px",i.style.visibility="hidden";else o.innerHTML="";else(o=document.createElement("div")).setAttribute("id",e.id),document.body.appendChild(o);var o=e.id+"-content",n=((o=(!document.getElementById(o)&&((n=document.createElement("div")).setAttribute("id",o),o=document.getElementById(e.id))&&o.appendChild(n),document.createElement("script"))).setAttribute("type","text/x-safeframe"),o.classList.add("sf_data"),o.setAttribute("id","sf_tag_"+e.id),e.renderHtml.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/"/g,'\\"').replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"));n="{id: 'ad-"+e.id+"', html: `"+n+"`, conf: {'size': '"+e.size+"', dest: '"+e.id+"-content'}, meta: {id: '"+e.id+"', size: '"+e.size+"', debug: '"+t+"'}}";o.textContent=n,document.body.appendChild(o)}),this.baseSafeFrame(),this.hostSafeFrame(),this.renderTemplate()},renderTemplate:function(){this.config.length&&this.config.forEach(t=>{new $sf.host.Config({renderFile:t.renderFile})})},baseSafeFrame:function(){if(window.$sf)try{t.ver="1-1-1",t.specVersion="1.1"}catch(t){}else var t={ver:"1-1-1",specVersion:"1.1"};var e,i,o,n,d,s,a,r=window,l="object",c="function",u="string",p="number",g="replace",w="length",f="document",h=r&&r.Number,m=r&&r.Math,y=r&&r[f],v=r&&r.navigator,b=v&&v.userAgent||"",T="toLowerCase",S="getAttribute",C="setAttribute",A="removeAttribute",k="getElementsByTagName",I=r&&r.String,P=(t=I.fromCharCode(92))+t,_=I.fromCharCode(34),x=t+_,E=(t=I.fromCharCode(43),"scr"+_+t+_+"ipt"),D="about:blank",L="nodeType",O="iframe",M="CollectGarbage",R="",z=F,$=!0,F=!1,B=null,N={preventDefault:0,stopImmediatePropagation:0,stopPropagation:0,preventBubble:0},U=h&&h.MAX_VALUE,j=-1*U,V=(r&&r.escape,r&&r.unescape,!(!window.ActiveXObject&&"ActiveXObject"in window)&&r&&"ActiveXObject"in r),q=0,G=F,H=0,W=B,K=0,Y=B,J=0,X=0,Z=0,Q={},tt="",et="",it=B,ot=B;function nt(t){var e=typeof t;return e==u?t:e!=p||t?e==l&&t&&t.join?t.join(""):!1===t?"false":!0===t?"true":t?I(t):"":"0"}function dt(t){try{t=t&&typeof t==c&&t.toString()&&new t.constructor?t:B}catch(e){t=B}return!!t}function st(t,e,i,o,n){var d,s,a;if(e&&t)for(s in e)a=typeof(d=e[s]),i&&!e.hasOwnProperty(s)||n&&s in t||o&&a==c||(a==l&&(d=d&&(d.slice?st([],d):st({},d))),t[s]=d);return t}function at(){return(new Date).getTime()}function rt(){return m.round(100*m.random())}function lt(t){return(t=nt(t))&&t[g](/^\s\s*/,"")[g](/\s\s*$/,"")}function ct(t,e,i,o){var n,d,s=i&&typeof i==l?i:r,a=0,c=B;if(t)if(t=nt(t),e=e&&typeof e==l?e:B,t.indexOf("."))for(n=t.split(".");d=n[a++];)d=lt(d),c=a==n[w]?s[d]&&e?s[d]=st(s[d],e,F,B,o):o&&d in s?s[d]:s[d]=s[d]||e||{}:o&&d in s?s[d]:s[d]=s[d]||{},s=s[d];else c=s[t]&&e?s[t]=st(s[t],e,F,B,o):s[t]=s[t]||e||{};return c}function ut(){return P}function pt(){return x}function gt(){return"\\r"}function wt(){return"\\n"}function ft(t,e,i){return nt(["<",e,E,i,">"])}function ht(t){return escape(t)}function mt(t){return unescape(t)}function yt(t,e,i){return i?t.lastIndexOf(e):t.indexOf(e)}function vt(t,e,i,o,n){var d,s,a,r,c,u,p,g,f,h,m,y,v=this,b=F;if(!(v instanceof vt))return new vt(t,e,i,o,n);if(!arguments[w])return v;if(t&&typeof t==l)return st(new vt("",e,i,o,n),t);if(t=nt(t),e=nt(e)||"&",i=nt(i)||"=",!t)return v;for(f=(c=(t=(t="?"!=e&&"?"!=i&&"?"==t.charAt(0)?t.substring(1):t).charAt(0)==e?t.substring(1):t).split(e))[w],d=0;f--;)if(s=c[d++],b=g=F,s){if(2<(m=(u=s.split(i))[w])){if(p=mt(u[0]),u.shift(),n)if(h=yt(t,a=p+i),r=t.substring(h+(m=a[w])),y=(a=e+e)[w],-1!=(a=yt(r,a))){for(r in h=new vt(r=t.substr(h+m,a+y),e,i,o,n),r="",m=0,h)m++;0<m&&(d+=m-1),s=h}else s=mt(u.join(i));else s=mt(u.join(i));b=$}else 2==m&&(p=mt(u[0]),s=mt(u[1]),b=$);b&&(o&&p in v||(v[p]=s,g=$),n)&&g&&p&&s&&typeof s!=l&&(0<=yt(s,e)||0<=yt(s,i))&&(v[p]=new vt(s,e,i,o,n))}}function bt(t){var e=0;return parseFloat(t.replace(/\./g,function(){return 1==e++?"":"."}))}function Tt(t,e,i){return t=t&&t.match(e),i==B?t:t&&t[i]||B}function St(t,e){return t.test(e)}function Ct(t){var i,o={},n=new Date;if(!t&&ot)return ot;o.ie=o.opera=o.gecko=o.webkit=o.safari=o.chrome=o.air=o.ipod=o.ipad=o.iphone=o.android=o.webos=o.silk=o.nodejs=o.phantomjs=0,o.mobile=o.ios=o.os=B,o.accel=!1,o.caja=v&&v.cajaVersion,o.cks=F,(t=t||b||"")&&(St(/windows|win32/i,t)?o.os="windows":St(/macintosh|mac_powerpc/i,t)?o.os="macintosh":St(/android/i,t)?o.os="android":St(/symbos/i,t)?o.os="symbos":St(/linux/i,t)?o.os="linux":St(/rhino/i,t)&&(o.os="rhino"),St(/KHTML/,t)&&(o.webkit=1),St(/IEMobile|XBLWP7/,t)&&(o.mobile="windows"),St(/Fennec/,t)&&(o.mobile="gecko"),(i=Tt(t,/AppleWebKit\/([^\s]*)/,1))&&(o.webkit=bt(i),o.safari=o.webkit,St(/PhantomJS/,t)&&(i=Tt(t,/PhantomJS\/([^\s]*)/,1))&&(o.phantomjs=bt(i)),St(/ Mobile\//,t)||St(/iPad|iPod|iPhone/,t)?(o.mobile="Apple",i=(i=Tt(t,/OS ([^\s]*)/,1))&&bt(i.replace("_",".")),o.ios=i,(i=Tt(t,/iPad|iPod|iPhone/,o.ipad=o.ipod=o.iphone=0))&&(o[i[T]()]=o.ios)):((i=Tt(t,/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/,0))&&(o.mobile=i),St(/webOS/,t)&&(o.mobile="WebOS",i=Tt(t,/webOS\/([^\s]*);/,1))&&(o.webos=bt(i)),St(/ Android/,t)&&(o.mobile="Android",i=Tt(t,/Android ([^\s]*);/,1))&&(o.android=bt(i)),St(/Silk/,t)&&((i=Tt(t,/Silk\/([^\s]*)\)/,1))&&(o.silk=bt(i)),o.android||(o.android=2.34,o.os="Android"),St(/Accelerated=true/,t))&&(o.accel=!0)),(i=t.match(/(Chrome|CrMo)\/([^\s]*)/))&&i[1]&&i[2]?(o.chrome=bt(i[2]),o.safari=0,"CrMo"===i[1]&&(o.mobile="chrome")):(i=Tt(t,/AdobeAIR\/([^\s]*)/))&&(o.air=i[0])),o.webkit||((i=Tt(t,/Opera[\s\/]([^\s]*)/,1))?(o.opera=bt(i),(i=Tt(t,/Opera Mini[^;]*/,0))&&(o.mobile=i)):(i=Tt(t,/MSIE\s([^;]*)/,1))?o.ie=bt(i):(i=(i=Tt(t,/Gecko\/([^\s]*)/))&&Tt(t,/rv:([^\s\)]*)/,o.gecko=1))&&(o.gecko=bt(i))));try{n.setTime(n.getTime()+1e3),y.cookie=e(["sf_ck_tst=test; expires=",n.toGMTString(),"; path=/"]),-1!=y.cookie.indexOf("sf_ck_tst")&&(o.cks=$)}catch(t){o.cks=F}try{typeof process==l&&process.versions&&process.versions.node&&(o.os=process.platform,o.nodejs=numberify(process.versions.node))}catch(t){o.nodejs=0}return o}function At(){X&&(clearTimeout(X),X=0)}function kt(t){Ut(r,"load",kt),Ut(r,"DOMContentLoaded",kt),W=$}function It(){var t,e,i,o;if(At(),300<=J&&(Y=B,W=$),W===B){try{i=(e=(t=y&&y.body)&&Mt("*",t))&&e[w],o=t&&t.lastChild}catch(t){K=0,Y=B}K&&i==K&&o==Y?(Y=B,W=$):(K=i,Y=o,J+=1,X=setTimeout(It,50))}else Y=B}function Pt(t){var e=zt(t,"id"),i=e&&Q[e];i&&(Ut(t,"load",i),Q[e]=B,delete Q[e])}function _t(t){return t&&typeof t==u&&Lt(t)||t}function xt(t,e,i,o){try{it=it||n.msghost}catch(t){it=B}if(r==top)return t&&it&&it[t]&&it[t](e,i,o)}function Et(t){var e=B;try{t&&(e=9==t[L]?t:t[f]||t.ownerDocument||B)}catch(t){e=B}return e}function Dt(t){var e,i=B;try{t&&(i=(i=t.parentWindow||t.defaultView||B)||(e=Et(t))&&(e.parentWindow||e.defaultView)||B)}catch(t){i=B}return i}function Lt(t){var e;return(e=1<(e=arguments)[w]?Et(e[1]):y)&&e.getElementById(t)||B}function Ot(t){return t&&1==t[L]&&t.tagName[T]()||""}function Mt(t,e){var i=[];try{i=e&&e[k]?e[k](t)||i:y[k](t)||i}catch(t){i=[]}return i}function Rt(t){return t&&(t.parentNode||t.parentElement)}function zt(t,i,o){try{2<arguments[w]?o===B?G?t[A](i,0):t[A](i):(o=e(o),"class"==i[T]()?t.className=o:G?t[C](i,o,0):t[C](i,o)):o=e(G?t[S](i,0):t[S](i))}catch(t){o=""}return o}function $t(t,i){var o;try{o=t.style,1<arguments[w]?o.cssText=e(i):i=o.cssText}catch(t){i=""}return i}function Ft(t,e){return(1<arguments[w]&&Et(e)||y).createElement(t)}function Bt(t,e){var i=F;try{t&&(i=t.appendChild(e))}catch(t){i=F}return i}function Nt(t,e,i){try{z?t[R]("on"+e,i):t[R](e,i,F)}catch(t){}}function Ut(t,e,i){try{z?t.detachEvent("on"+e,i):t.removeEventListener(e,i,F)}catch(t){}}function jt(){var t;return At(),W?(Y=B,$):((t=y.readyState)&&(Y=B,W="loaded"==t||"complete"==t||"interactive"==t?$:F),Y=B,J=K=0,It(),!!W)}function Vt(t){var e=B;try{e=(t=t||r.event)?t[tt]||t[et]:B}catch(t){e=B}return e}function qt(t,e,i,o,n){return Gt(t,e,i,o,n)}function Gt(t,o,n,d,s,a){var r,l,c,u,p,g=["<",O," "];if(a)u=t;else{if(Ot(t=_t(t))!=O)return B;u=t.cloneNode(F)}for(l in"src"in(o=o||{})?zt(u,"src",B):o.src=zt(t,"src")||D,"name"in o?zt(u,"name",B):o.name=zt(t,"name"),o.src||(o.src=D),r=s&&xt("prep",o),a||(zt(u,"width",B),zt(u,"height",B)),n&&((c=$t(u))&&";"!=c.charAt(c[w]-1)&&(c+=";"),$t(u,[c,e(n)])),Bt(c=Ft("div"),u),a=c.innerHTML.replace(/<iframe(.*?)>(.*?)<\/iframe>/gim,"$1"),g.push('name="',o.name,'" ',a,"></",O,">"),delete o.name,c.innerHTML=e(g),p=c.firstChild,o)zt(p,l,o[l]);return zt(p,"id")||(zt(p,"id","sf_"+O+"_"+Z),Z++),zt(p,"FRAMEBORDER","no"),zt(p,"SCROLLING","no"),zt(p,"ALLOWTRANSPARENCY",$),zt(p,"HIDEFOCUS",$),zt(p,"TABINDEX",-1),zt(p,"MARGINWIDTH",0),zt(p,"MARGINHEIGHT",0),((t,e)=>{var o,n;i(e)&&(o=function(i){var d=Vt(i);if(Pt(d),d&&e)try{e.call(d,i)}catch(t){}t=e=o=n=B},n=zt(t,"id"),Pt(t),n&&(Q[n]=o),Nt(t,"load",o)),o=B})(p,d),r&&xt("attach",p,r,s),s=u=d=t=c=null,p}function Ht(t,e,i,o){return Gt(Ft(O),t,e,i,o,$)}(t=vt.prototype).toString=t.valueOf=function t(e,i,o,n){var d,s,a,r=[];for(d in e=e||"&",i=i||"=",this)s=typeof(a=this[d]),a&&s==c||(a&&s==l&&(a=a.tagName||a.nodeType?"#node":t.apply(a,[e,i,o,n])),o&&(d=ht(d)),n||(a=ht(a)),r.push(d,i,a,e));return r[w]&&(r[r[w]-1]=""),nt(r)},o=ct("$sf.lib.lang",{ParamHash:vt,cstr:nt,cnum:function(t,e,i,o){if(typeof t!=p)try{t=t?parseFloat(t):h.NaN}catch(e){t=h.NaN}return o==B&&(o=U),i==B&&(i=j),(isNaN(t)||t<i||o<t)&&e!=B?e:t},cbool:function(t){return t&&"0"!=t&&"false"!=t&&"no"!=t&&"undefined"!=t&&"null"!=t?$:F},noop:function(){},trim:lt,callable:dt,guid:function(t){return nt([t||"","_",at(),"_",rt(),"_",q++])},mix:st,time:at,rand:rt,def:ct,ns:function(t,e){var i,o,n=/\[(('|")?)((\s|.)*?)(('|")?)\]/gm,d=/\./gm,s=0,a=$,l=e=e||r;if(t)if(t=nt(t))if(i=(t=lt(t)).match(/(\[(.{1,})\])|(\.\w+)/gm))for(e=t[g](/(\[.*)|(\..*)/g,""),i.unshift(e);o=i[s++];){if(!l[o=o[g](n,"$3")[g](d,"")]){a=F;break}l=l[o]}else l=l[o=t];else a=F;else a=F;return a&&l||F},jssafe_html:function(t){return(t=nt(t))&&(t=(t=(t=(t=(t=(t=(t=t.replace(/(<noscript[^>]*>)(\s*?|.*?)(<\/noscript>)/gim,"")).replace(/\\/g,ut)).replace(/\"/g,pt)).replace(/\n/g,wt)).replace(/\r/g,gt)).replace(/<(\/)*script([^>]*)>/gi,ft)).replace(/\t/gi," "),t=nt([_,t,_]),t=_+t+_),t},isArray:function(t){return null!=t&&"string"!=typeof t&&null!=t[w]&&t.constructor==Array}}),ct("$sf.env",{isIE:V}),e=nt,i=dt,(ot=Ct()).parse=Ct,o.def("$sf.env.ua",ot,B,$),V?(tt="srcElement",et="target",zt(s=Ft(O),"SCROLLING","no"),G="no"!=zt(s,"SCROLLING"),d=M in r?function(){H&&clearTimeout(H),H=setTimeout(function(){try{r[M]()}catch(t){}},3e3)}:_lang.noop):(tt="target",et="currentTarget"),r.addEventListener&&!V?R="addEventListener":V&&(z=$,R="attachEvent"),s=B;try{s=y.createEvent("UIEvent")}catch(t){s=B}if(!s)try{s=y.createEvent("UIEvents")}catch(t){s=B}if(s)for(a in N)s[a]&&(N[a]=1);s=B,Nt(r,"load",kt),Nt(r,"DOMContentLoaded",kt),n=o.def("$sf.lib.dom",{doc:Et,view:Dt,elt:Lt,tagName:Ot,tags:Mt,par:Rt,make:Ft,css:$t,attr:zt,gc:d,append:Bt,purge:function(t){var e,i=F,o=Ot(t)==O;o&&(xt("detach",t),Pt(t),V||zt(t,"src",D));try{(e=Rt(t))&&(e.removeChild(t),i=$,V)&&o&&d()}catch(t){}return t=e=B,i},attach:Nt,detach:Ut,ready:jt,wait:function t(e){if(jt())try{o.callable(e)&&e()}catch(t){}else setTimeout(function(){t(e),e=B},51)},evtCncl:function(t){var e="";if(t=t||r.event){try{t.returnValue=F}catch(t){}try{t.cancelBubble=$}catch(t){}try{t.stopped=$}catch(t){}for(e in N)if(N[e])try{t[e]()}catch(t){}}return F},evtTgt:Vt},B,$),o.def("$sf.lib.dom.iframes",{make:Ht,clone:qt,replace:function(t,i,o,n,d){var s,a,r,l,c=(r=Ot(c=(a=(t=t||{}).id)&&_t(a)))?c:B;(r=r==O?c:B)?(xt("detach",r),Pt(r),l=Rt(r),zt(s=qt(r,t,i,n,d),"onload",B),zt(s,"onreadystatechange",B)):(!(l=o&&Ot(o=_t(o))?o:l)&&c&&(l=Rt(c)),s=Ht(t,i=e(i)||$t(c)||"",n,d));try{l?r?l.replaceChild(s,r):c?l.replaceChild(s,c):Bt(l,s):Bt(y.body,s)}catch(t){}return s=t=l=n=B,Lt(a)},view:function(t){var e,i,o,n,d,s,a=0;try{if(!(e=t.contentWindow||B))for(n=(i=(o=Et(t))&&Dt(o))&&i.frames||[];d=n[a++];){try{s=d.frameElement}catch(t){s=B}if(s&&s==t){e=d;break}}}catch(t){e=B}return e}},B,$),o.def("$sf.lib.logger",{log:function(t){r.console&&console.log&&console.log(t)},error:function(t){r.console&&console.error?console.error(t):r.console&&console.log&&console.log(t)}},B,$),o.def("$sf.info",{errs:[],list:[]},B,$),I.prototype.trim||(I.prototype.trim=o.trim)},hostSafeFrame:function(){function t(i){var o,n,d,s,a,r=this;if(!arguments.length)return qe?le({},qe):H;if(!(r instanceof t))return new t(i);if(!i)return qe=H;if(a=!!qe,r.auto="auto"in i?oe(i.auto):W,r.cdn=de(i.cdn),r.debug=oe(i.debug),r.root=de(i.root),r.renderFile=de(i.renderFile),r.msgFile=de(i.msgFile),r.to=ne(i.to,Y),r.ver=de(i.ver)||Jt,r.onBeforePosMsg=se(i.onBeforePosMsg)?i.onBeforePosMsg:ae,r.onPosMsg=se(i.onPosMsg)?i.onPosMsg:ae,r.onStartPosRender=se(i.onStartPosRender)?i.onStartPosRender:ae,r.onEndPosRender=se(i.onEndPosRender)?i.onEndPosRender:ae,r.onFailure=se(i.onFailure)?i.onFailure3:ae,n=i.positions,r.positions=o={},n)for(d in n)(s=n[d])&&typeof s==gt&&(o[d||s.id||re(J)]=new e(s));qe=r,a=!!(a&&r.auto&&te&&te.ns("$sf.host.boot"));try{a&&Yt.host.boot()}catch(t){}return le({},qe)}function e(i,o,n){var d,s,a=this,r=i&&typeof i||"";return a instanceof e?(r==gt?(a.id=de(i.id),a.dest=de(i.dest||o),a.bg=de(i.bg)||"transparent",a.tgt=de(i.tgt)||"_top",a.css=de(i.css),a.w=ne(i.w,0),a.h=ne(i.h,0),a.z=ne(i.z,0),a.supports=le({},i.supports||ot,W,W,W),a.w&&a.h?a.size=a.w+"x"+a.h:(d=de(i.size))?(s=d.split(/x/gi),a.w=ne(s[0],0),a.h=ne(s[1],0),a.size=d):a.size=""):"string"==r?(a.id=de(i),a.dest=de(i.dest)):(a.dest="",a.bg="transparent",a.tgt="_top",a.css="",a.w=0,a.h=0,a.size="",a.z=0,a.supports={}),a.id=a.id||re(J),!qe&&n&&t(n),qe&&(qe.positions[a.id]=a),le({},a)):new e(i,o,n)}function i(t,e,o){var d,a;if(!(this instanceof i))return new i(key,o,pos);d={sf_ver:de(Yt.ver),flash_ver:n(),ck_on:s()?"1":"0"},a={},t&&typeof t==gt&&(d=le(d,t)),e&&typeof e==wt&&o&&typeof o==gt&&(a[e]=o),this.toString=function(){var t=new Se;return t.shared=d,t.non_shared=a,t.toString()},this.value=function(t,e){var i="";return t&&typeof t==wt?"shared"==(e=e&&typeof e==wt?e:"shared")?d[t]||"":t in a&&a[prop_key]||"":i}}function o(t,e){var i,o;try{(Qt=Qt||Yt&&Yt.lib)&&Qt.logger&&G==top?e?(Qt.logger.error(t),Yt.info.errs.push(t)):Qt.logger.log(t):(i=d.getElementsByTagName("head")[0],(o=d.createElement("script")).type="text/plain",o.text="\x3c!-- SafeFrame "+(e?"error":"log")+": "+(t||"unknown")+" --\x3e",i.appendChild(i,o))}catch(t){}}function n(){if(Ve===H||null==Ve)if(navigator.plugins&&0<navigator.plugins.length){var t=navigator.mimeTypes;t&&t[Kt]&&t[Kt].enabledPlugin&&t[Kt].enabledPlugin.description&&((t=t[Kt].enabledPlugin).version?Ve=t.version:t.description&&(Ve=t.description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]))}else if(Yt.env.isIE)for(var e,i,o=0;o<Ge.length;o++)try{i=(e=new ActiveXObject(Ge[o]).GetVariable("$version")).indexOf(" "),Ve=(-1<i?e.substr(i+1):e).replace(/,/gi,".");break}catch(t){Ve=0;continue}else Ve=0;return Ve}function s(){var t=!!navigator.cookieEnabled;return void 0!==navigator.cookieEnabled||t||(document.cookie="testcookie",t=-1!=document.cookie.indexOf("testcookie"),navigator&&(navigator.cookieEnabled=t)),t}function a(t){var e=(t=t&&ge(t)||Ce)[Mt],i=t[Rt];return e&&!_e&&"CSS1Compat"!=e?t.body:i}function r(t){var e=H;try{t&&(e=9==u(t)?t:t[zt]||t.ownerDocument||H)}catch(t){e=H}return e}function l(t){return t&&(t[Ut]||t.parentElement)}function c(t){return 1===u(t)}function u(t){return ne(t&&t.nodeType,-1)}function p(t){return 1===u(t)&&t.tagName.toLowerCase()||""}function g(t){return((t=de(t))&&-1==t.search(/\D+/g)||t&&-1!=t.search(/px/gi))&&W}function w(t,e,i){var o=0,n=0;return(i=i||v(t))&&(o=st.borderTopWidth,n=st.borderLeftWidth,o=g(o)?ne(o,0):0,n=g(n)?ne(n,0):0,Pe)&&/^t(?:able|d|h|r|head|foot)$/i.test(we(t))&&(o=n=0),(e=e||{t:0,l:0}).t+=o,e.l+=n,e}function f(t){var e={x:0,y:0,w:0,h:0},i={scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0},o=0,n=0,d=(t=ge(t)||Ce)[Rt]||i;i=t.body||i;return(t=t.defaultView)&&(o=ne(t.pageXOffset,0),n=ne(t.pageYOffset,0)),e.x=ve(d.scrollLeft,i.scrollLeft,o),e.y=ve(d.scrollTop,i.scrollTop,n),e.w=ve(d.scrollWidth,i.scrollWidth,0),e.h=ve(d.scrollHeight,i.scrollHeight,0),e}function h(t){var e,i,n,d,s,l,u,g,h,m,y,b,T={t:0,l:0,r:0,b:0,w:0,h:0,z:0},S="getBoundingClientRect",C=0,A=0,k=(I=r(t)||G[zt])[Mt],I=I.documentMode||0;if(c(t))try{if(g=v(t),d=a(t),s=f(t),T.l=t[_t]||0,T.t=t[Pt]||0,u=H,n=Pe||519<Ie,(l=t)!==d&&t[S])Ae&&(!I||0<I&&I<8||"BackCompat"===k)&&(m=d.clientLeft,y=d.clientTop),b=t[S](),T.t=b.top,T.l=b.left,(m||y)&&(T.l-=m,T.t-=y),(s.y||s.x)&&(!Zt.ios||4.2<=Zt.ios)&&(T.l+=s.x,T.t+=s.y);else{for(;(l=l[It])&&c(l)&&u!==l;)m=l[_t],y=l[Pt],T.t+=y,T.l+=m,n&&(T=w(l,T)),u=l;if("fixed"!=g.position)for(l=t,u=H;(l=l[Ut])&&c(l)&&u!==l&&l!=d;)e=l[At],i=l[kt],Pe&&"visible"!=(h=v(l))[Vt]&&(T=w(l,T,h)),(e||i)&&(T.l-=i,T.t-=e),u=l;T.l+=s.x,T.t+=s.y}C=t==d?(A=t[Lt],t[Dt]):(A=t[Et],t[xt]),T.b=T.t+A,T.r=T.l+C,T.w=ve(C,0),T.h=ve(A,0),T.z=g.zIndex}catch(e){e&&e[Gt]||(e={message:"null exception"}),o("sf Exception in rect calculation tag - "+p(t)+" : "+e[Gt],W),T={t:0,l:0,r:0,b:0,w:0,h:0,z:0}}return T}function m(t){var e=0,i=0;return(t=a(t))&&(e=t.scrollWidth||0,i=t.scrollHeight||0),{t:0,l:0,b:i,r:e,w:e,h:i}}function y(t,e){var i=K,o=t&&t[$t]||-1,n=e&&e[$t]||-1;if(1==o&&-1!=n)if(t[Ft])if(_e||1==n)i=t[Ft](e);else for(;e;){if(t===e){i=W;break}if((e=e.parentNode)==Ce[Rt])break}else t[Bt]&&(i=t===e||!!(16&t[Bt](e)));return i}function v(t,e){var i="",o="getComputedStyle";if(arguments[ht]&&e)if(ke)try{i=t.currentStyle[e]}catch(t){i=""}else try{i=fe(t)[o](t,H)[e]}catch(t){i=""}else if(ke)try{i=t.currentStyle}catch(t){i=H}else try{i=fe(t)[o](t,H)}catch(t){i=H}return i}function b(t,e,i){var o,n,d,s,l,c,u,p,g,w,m,v,b,T,S,C=h(t),A=r(t),k=a(A),I=C.t,P=C.l,_=tt,x=[],E=0;if(e=ne(e,x.on=0,0),i=ne(i,0,0),I&&!C.h&&i&&(C.h=i,C.b=I+i),P&&!C.w&&e&&(C.w=e,elrect.r=P+e),o=C.w,n=C.h,l=d=Te(o/_),c=s=Te(n/_),!(o<=1||n<=1||d<1||s<1)&&(S=(i=f()).y,T=i.x,v=P+o,b=I+n,A)&&k&&A[Nt]){for(;l<o;){for(c=s;c<n;)p=I+c,(u=P+l)<=v&&p<=b&&x.push({x:u,y:p,on:0}),c+=s;l+=d}for(;g=x[E++];)u=ve(g.x-T,0),u=be(u,g.x),p=ve(g.y-S,0),p=be(p,g.y),0==u?(g.on="!x-offscreen",x.on++):0==p?(g.on="!y-offscreen",x.on++):(m=A[Nt](u,p))&&m!==k&&m!==t&&!y(m,t)&&((w=pe(m,"id"))||(w=re("geom_inter"),pe(m,"id",w)),g.on=w,x.on++)}return x}function T(t,e,i,o){return je=je||ee.msghost_fb,t&&je&&je[t]&&je[t](e,i,o)}function S(t){var e=t&&t.data,i=t&&t.source,o=(o=(n=(e=e&&-1!=JSON.stringify(e).indexOf(Wt)&&Se(e))&&e.id)&&ce(n))&&he(o),n=n&&Le[n],d=e&&e[Wt],s=n&&n[Wt],a=(n=n&&n._xmsgcb,K);if(s&&d&&d==s&&i&&o&&o==i)try{a=n(e.msg)}catch(t){a=K}return a&&ee.evtCncl(t),a}function C(t,e){var i,o,n,d=t&&Le[t],s=K;if(d)if((i=Se()).msg=e,i.guid=d.guid,ze){n=ce(t),o=he(n);try{o[Ht](de(i),d.srcHost||"*"),s=W}catch(t){s=K}}else s=T("send",t,e);else s=T("send",t,e);return i=o=n=H,s}function A(t){var e,i,o=[],n=arguments,d=n[ht],s=0,a=K;if(qe&&(e=qe[t])){for(;d--;)(i=n[s++])!=t&&o.push(i);try{a=e.apply(H,o)}catch(t){a=K}}return a}function k(){Be&&(clearTimeout(Be),Be=0)}function I(){Ne&&(clearTimeout(Ne),Ne=0)}function P(t){I(),Ne=setTimeout(function(){(t=>{var e,i,o,n;for(e in De)(o=(i=De[e])&&i.dest)&&ce(o)&&i&&(o=Se(),n=Se(),o.pos=e,o.cmd=n.cmd=ct,o.value=t,A(it,e,ct,t),B(i,o));I()})(t)},2)}function _(t){k(),Be=t?setTimeout(D,Z):setTimeout(E,Z)}function x(t){var e,i,o,n;for(e in De)t&&e in Re||(n=(n=(i=De[e])&&i.dest)&&ce(n))&&i&&(n=j(e,n,W),(o=Se()).pos=e,o.cmd=lt,o.geom=me(n),A(it,e,lt,n),B(i,o));k()}function E(){x()}function D(){x(W)}function L(t){P(W)}function O(t){P(G[zt].hasFocus())}function M(t){_(1)}function R(t){_()}function z(t){var e,i;k();try{for(e in ee.detach(G,Tt,M),ee.detach(G,"resize",R),ee.detach(G,"unload",z),ee.detach(G,"focus",L),ee.detach(G,"blur",O),Re)(i=Re[e])&&(i.tID&&clearTimeout(i.tID),ee.detach(Re[e],Tt,i[Ot]),i[Ot]=i.node=H),Re[e]=H,delete Re[e];Fe=K}catch(t){}}function $(t){var e,i=K,o=Se(t,H,H,W,W);if(o&&o.pos&&(e=De[o.pos]))switch(o.cmd){case"exp-push":V(o,W),i=W;break;case"exp-ovr":V(o),i=W;break;case"collapse":(t=>{var e,i=t&&t.pos,o=i&&De[i],n=o&&o.conf,d=n&&n.dest,s=d&&ce(d),a=s&&ce(X+"-"+i),r=s&&s[ft],l=a&&a[ft];i&&o&&s&&a&&o.expanded&&((e=Re[i])&&e.tID&&clearTimeout(e.tID),k(),A(et,i,dt,0,0)||(r.left=r.top="0px",l[mt]=r[mt]=n.w+vt,l[yt]=r[yt]=n.h+vt,r.zIndex=o.dx=o.dy=0,U(d),A(it,i,dt,0,0),t.cmd="collapse",t.geom=me(j(i,s,W)),B(o,t),s=r=a=l=o=t=H))})(o),i=W;break;case rt:(t=>{var e=t&&t.pos,i=e&&De[e],o=i&&i.conf,n=(o=(o=o&&o.dest)&&ce(o))&&ce(X+"-"+e);o&&o[ft],n&&n[ft],A(it,t.pos,ut,t.msg),t.cmd="msg",t.geom=me(j(e,o,W)),B(i,t)})(o),i=W;break;case at:(t=>{var e=t&&t.pos,i=e&&De[e],o=(i=(i=(i=i&&i.conf)&&i.dest)&&ce(i))&&ce(X+"-"+e);i&&i[ft],o&&o[ft],Yt&&Yt.info&&Yt.info.errs&&Yt.info.errs.push(t),A(it,e,at,t)})(o),i=W;break;case lt:Yt.lib.logger.log("Geom update complete: "+o.pos),i=W;break;case"read-cookie":i=e.conf&&e.conf.supports&&e.conf.supports[o.cmd]&&"0"!=e.conf.supports[o.cmd]?((t=>{var e,i=t&&t.pos,o=i&&De[i],n=o&&o.conf,d=(d=n&&n.dest)&&ce(d),s="read-cookie";n.supports&&n.supports[s]&&"0"!=n.supports[s]&&i&&o&&d&&(n=t.cookie)&&(e=(()=>{var t,e,i,o={};for(e=(t=document.cookie.split("; ")).length-1;0<=e;e--)o[(i=t[e].split("="))[0]]=i[1];return o})(),A(it,s,i,0,0),t.cmd=s,t.geom=me(j(i,d,W)),t.value=e[n],B(o,t),d=o=t=H)})(o),W):K;break;case"write-cookie":i=e.conf&&e.conf.supports&&e.conf.supports[o.cmd]&&"0"!=e.conf.supports[o.cmd]?((t=>{var e,i,o=t&&t.pos,n=o&&De[o],d=n&&n.conf,s=(s=d&&d.dest)&&ce(s),a="write-cookie";d.supports&&d.supports[a]&&"0"!=d.supports[a]&&o&&n&&s&&(d=t.cookie)&&(e=escape(t.value),(i=new Date).setDate(i.getDate()+1),i=e+"; expires="+i.toUTCString(),document.cookie=d+"="+i,A(it,a,o,0,0),t.cmd=a,t.geom=me(j(o,s,W)),t.info=e,t.value="",B(n,t),s=n=t=H)})(o),W):K}return i}function F(){var t,e=W;for(t in Oe){e=K;break}return e}function B(t,e){Ue="sending-msg-down-"+e.cmd,setTimeout(function(){var i=t&&t.dest;i&&e&&C(i,e.toString()),Ue="",e=t=H},Q)}function N(){var t=this,e=pe(t,"_pos_id");Oe[e]&&(clearTimeout(Oe[e]),delete Oe[e],Me[e]=e,pe(t,"_pos_id",H),pe(t,"name",H),t[ft].visibility="inherit",t[ft].display="block",A("onEndPosRender",e)),F()||(Ue="")}function U(t,e,i,o,n){var d,s;Ae&&(d=ce(t),s=ce(t="shm_"+t),e?s?s[ft].visibility="visible":(s=ie.clone(d,{id:t,src:"",name:t},[mt,":",i,vt,";",yt,":",o,vt,";z-index:",n-1,";filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0)"]),ee.append(ue(d),s)):!e&&s&&(s[ft].visibility="hidden"))}function j(t,e,i){var n,d,s,a,r=Se(),l={};try{ee.bounds(e,l,W),i||l.isRoot||!l.canScroll||((s=l.expRect).xs||s.ys)&&(n=Re[t],d=l.refNode,n&&n.node!=d&&(n.tID&&clearTimeout(n.tID),ee.detach(void 0,Tt,n[Ot]),n.node=n[Ot]=H,Re[t]=H,delete Re[t]),Re[t]||((n={}).node=d,n[Ot]=function(e){(t=>{var e=Re[t];e&&(e.tID&&(clearTimeout(e.tID),delete e.tID),e.tID=setTimeout(function(){var i,o,n=De[t];(o=(o=n&&n.dest)&&ce(o))&&n&&(o=j(t,o,W),(i=Se()).pos=t,i.cmd=lt,i.geom=me(o),A(it,t,lt,o),B(n,i)),delete e.tID},Z))})(t)},Re[t]=n,ee.attach(d,Tt,n[Ot])))}catch(t){r=H,o("Exception in build_geom: "+(t&&t[Gt]||"NULL"),W)}try{r&&(r.win=Se(ee.winRect()),r.par=Se(l.clipRect),s=Se(l.expRect),(a=Se(l.rect)).iv=s.iv,a.xiv=s.xiv,a.yiv=s.yiv,delete s.iv,delete s.xiv,delete s.yiv,r.exp=s,r.self=a)}catch(t){r=H,o("build_geom info error: "+(t&&t[Gt]||"NULL"),W)}return r}function V(t,e){var i,o,n,d,s,a,r,l,c,u,p,g,w,f,h=K,m=K,y=t&&t.pos;y&&(a=(i=De[y])&&i.conf,i)&&a&&(u=i.dest,o=ce(u),d=ce(X+"-"+y),o)&&d&&(n=o[ft],d=d[ft],n)&&((f=Re[y])&&f.tID&&clearTimeout(f.tID),k(),f=t.exp_obj,s=a.w,a=a.h,f?(p=ne(f.t,0,0),g=ne(f.l,0,0),w=ne(f.r,0,0),f=ne(f.b,0,0),w=ne(s+g+w,0,0),c=ne(a+p+f,0,0),p?(l=-1*p,m=W):l=0,g?(r=-1*g,h=W):r=0):(w=(h=(r=i.dx=ne(t.dx))<0)?s+-1*r:s+r,c=(m=(l=i.dy=ne(t.dy))<0)?a+-1*l:a+l),w<=s&&c<=a||A(et,y,nt,r,l)||(n[mt]=w+vt,n[yt]=c+vt,h&&(n.left=r+vt),m&&(n.top=l+vt),f=ne(i.z,0),n.zIndex=f=f||pt,U(u,W,w,c,f-1),e?(d[mt]=w+vt,d[yt]=c+vt):(d[mt]=s+vt,d[yt]=a+vt),i.expanded=W,t.dx=r,t.dy=l,t.w=w,t.h=c,t.cmd="expand",t.geom=me(j(y,o,W)),A(it,y,nt,r,l),B(i,t)))}function q(){var t,e,i,o,n,d,s,a=0,r=W,l=arguments;if(!l[ht]||"*"==l[a])for(t in l=[],De)l.push(t);for(;t=l[a++];)if(e=De[t]){t in Oe&&(clearTimeout(Oe[t]),delete Oe[t]),t in Me&&delete Me[t],n=(i=(e=e.dest)&&ce(e))&&ue(i),-1!=ee.attr(n,"id").indexOf(X)&&(n=ue(o=n)),ee.purge(i),o&&ee.purge(o);for(s=$sf.info.list.length-1;0<=s;s--)if((d=$sf.info.list[s])&&d.id===t){$sf.info.list.splice(s,1);break}De[t]=H,delete De[t],i=ee.make("div"),ee.attr(i,"id",e),ee.append(n,i)}for(t in t="",De){r=K;break}r&&(Ue="",z())}var G,H,W,K,Y,J,X,Z,Q,tt,et,it,ot,nt,dt,at,rt,lt,ct,ut,pt,gt,wt,ft,ht,mt,yt,vt,bt,Tt,St,Ct,At,kt,It,Pt,_t,xt,Et,Dt,Lt,Ot,Mt,Rt,zt,$t,Ft,Bt,Nt,Ut,jt,Vt,qt,Gt,Ht,Wt,Kt,Yt,Jt,Xt,Zt,Qt,te,ee,ie,oe,ne,de,se,ae,re,le,ce,ue,pe,ge,we,fe,he,me,ye,ve,be,Te,Se,Ce,Ae,ke,Ie,Pe,_e,xe,Ee,De,Le,Oe,Me,Re,ze,$e,Fe,Be,Ne,Ue,je,Ve,qe,Ge;G=window,K=!(W=!(H=null)),Y=6e4,J="od",X="od-sf",Z=750,tt=10,et="onBeforePosMsg",it="onPosMsg",ot={"exp-ovr":Q=1,"exp-push":0,bg:0,pin:0,"read-cookie":0,"write-cookie":0},nt="exp-ovr",dt="collapse",at="error",lt="geom-update",ct="focus-change",ut=rt="msg",pt=3e3,gt="object",wt="string",ft="style",ht="length",mt="width",yt="height",vt="PX",bt="clip",St=(Tt="scroll")+"Width",Ct=Tt+"Height",At=Tt+"Top",kt=Tt+"Left",It="offsetParent",Pt="offsetTop",_t="offsetLeft",xt="offsetWidth",Et="offsetHeight",Dt="clientWidth",Lt="clientHeight",Ot="onscroll",Mt="compatMode",Rt="documentElement",zt="document",$t="nodeType",Ft="contains",Bt="compareDocumentPosition",Nt="elementFromPoint",Ut="parentNode",jt="auto",Vt="overflow",qt="toFixed",Gt="message",Ht="postMessage",Wt="guid",Kt="application/x-shockwave-flash",Yt=G&&G.$sf,Jt=Yt&&Yt.ver,Xt=Yt&&Yt.env,Zt=Xt&&Xt.ua,Qt=Yt&&Yt.lib,te=Qt&&Qt.lang,ee=Qt&&Qt.dom,ie=ee&&ee.iframes,oe=te&&te.cbool,ne=te&&te.cnum,de=te&&te.cstr,se=te&&te.callable,ae=te&&te.noop,re=te&&te[Wt],le=te&&te.mix,ce=ee&&ee.elt,ue=ee&&ee.par,ee&&ee.tags,pe=ee&&ee.attr,ge=ee&&ee.doc,we=ee&&ee.tagName,fe=ee&&ee.view,he=ie&&ie.view,ee&&ee.purge,ee&&ee.ready,me=G&&G.escape,ye=G&&G.Math,ve=ye&&ye.max,be=ye&&ye.min,Te=ye&&ye.round,Se=te&&te.ParamHash,Ce=G&&G[zt],Ae=Xt&&Xt.isIE,ke=Zt&&Zt.ie||0,Ie=Zt&&Zt.webkit||0,Pe=Zt&&Zt.gecko||0,_e=Zt&&Zt.opera||0,xe=G&&G.location,Ee=xe&&(xe.protocol+"//"+(xe.host||xe.hostname)||""),De={},Le={},Oe={},Me={},Re={},Fe=$e=ze=K,Ne=Be=0,qe=Ve=je=Ue=H,Ge=[(ye="ShockwaveFlash.ShockwaveFlash")+".11",ye+".8",ye+".7",ye+".6",ye],te&&G==top&&(te.def("dom",{rect:h,currentStyle:v,contains:y,docRect:m,winRect:function(t){var e=(d=t&&fe(t)||G).innerHeight||0,i=d.innerWidth||0,o=d.screenY||d.screenTop||0,n=e+o,d=d.screenX||d.screenLeft||0,s=i+d;t=a(t);return e||i||!t||(e=t.clientHeight||0,s=d+(i=t.clientWidth||0),n=o+e),{t:o,l:d,b:n,r:s,w:i,h:e}},bounds:function(t,e,i,o,n){var d,s,r,c,u,w,y,T,S,C,A,k,I,P,_,x,E,D,L,O,M,R,z,$,F,B,N,U,j,V,q,Y=t&&l(t),J=a(t),X=h(t),Z=h(J),Q=f(J),tt=m(t),et={t:0,l:0,r:0,b:0,xs:0,ys:0,xiv:0,yiv:0,iv:0,w:0,h:0},it=[],ot={left:H,right:H,top:H,bottom:H};if(e=e&&"object"==typeof e?e:{},o=ne(o,0,0),n=ne(n,0,0),!X.h&&n&&(X.h=n,X.b=X.t+n),!X.w&&o&&(X.w=o,X.r=X.l+o),Y)for(s=Z.t,r=Z.l,c=Z.r,u=Z.b;(M=v(Y))&&("block"!=M.display&&"absolute"!=M.position&&"none"==M.float&&"none"==M.clear||(d=Y==J,T=(V=h(Y)).t,S=V.l,C=V.r,A=V.b,D=M[Vt+"X"],L=M[Vt+"Y"],O=M[Vt],M=d?[-1,-1,-1,-1]:(t=>{var e,i,o,n,d=[-1,-1,-1,-1],s=[bt+"Top",bt+"Right",bt+"Bottom",bt+"Left"],a=0;if(t)if(ke)for(;i=s[a];)g(e=t[i])&&0<=(e=ne(e,-1))&&(d[a]=e),a++;else if((e=t[bt])&&-1!=e.search(/\d+/g))for(n=(d=(d=(e=e.replace(/\w+\(([^\)]*?)\)/g,"$1")).split(" "))[ht]<=1?d.split(","):d)[ht],a=0;n--;)g(o=d[a])?d[a]=ne(o,-1):d[a]=-1,a++;return d})(M),q=K,_=d?(k=Q.w,Q.h):(k=Y[St],Y[Ct]),I=Y[xt],x=Y[Et],P=Y[Dt],E=Y[Lt],!y&&P<I&&(y=I-P),!w&&E<x&&(w=x-E),d?(P<k&&(r<(S=0)&&(r=S),(C=(G.innerWidth||I)+Q.x)<c)&&(c=C),E<_&&(s<(T=0)&&(s=T),(A=(G.innerHeight||x)+Q.y)<u)&&(u=A)):(y&&C-S==I&&(C-=y),w&&A-T==x&&(A-=w),("hidden"==D||D==Tt||D==jt||"hidden"==O||O==Tt||O==jt)&&(r<S&&(r=S,ot.left=Y),C<c&&(c=C,ot.right=Y),D==Tt||O==Tt||(D==jt||O==jt)&&P<k)&&(it.push(Y),q=W),0<M[3]&&r<($=S+M[3])&&(r=$,ot.left=Y),0<M[1]&&(F=C+M[1])<c&&(c=F,ot.right=Y),"hidden"!=L&&L!=Tt&&L!=jt&&"hidden"!=O&&O!=Tt&&O!=jt||(s<T&&(s=T,ot.top=Y),A<u&&(u=A,ot.bottom=Y),q)||(L==Tt||O==Tt||(L==jt||O==jt)&&E<_)&&(it.push(Y),q=W),0<M[0]&&s<(R=T+M[0])&&(s=R,ot.top=Y),0<M[2]&&(z=V.t+M[2])<u&&(u=z,ot.bottom=Y))),Y!=J)&&(Y=l(Y))&&p(Y););return S=X.l,C=X.r,T=X.t,A=X.b,N=C-S,$=Z.l,F=Z.r,R=Z.t,z=Z.b,B=(U=A-T)<(B=(B=be(A,z)-ve(T,R))<0?0:B)?U:B,j=N<(j=(j=be(C,F)-ve(S,$))<0?0:j)?N:j,et.t=!(R<T)||z<=T?0:ve(T-R,0),et.b=!(A<z)||A<=R?0:ve(z-A,0),et.l=!($<S)||F<=S||z<=T||A<=R?0:ve(S-$,0),et.r=!(C<F)||C<=$||z<=T?0:ve(F-C,0),et.w=ve(et.r-et.l,0),et.h=ve(et.b-et.t,0),et.xiv=0<N?ne((j/N)[qt](2)):0,et.yiv=0<U?ne((B/U)[qt](2)):0,et.iv=0<N||0<U?ne((j*B/(N*U))[qt](2)):0,et.civ=0,i&&.49<et.iv&&(B=(j=b(t,o,n))[ht],N=ne(j.on,0))&&(U=1-ne((N/B)[qt](2),0),et.civ=et.iv=U),e.rect=X,e.clipRect=Z,e.docRect=tt,it[ht]?(e.isRoot=K,e.canScroll=W,et.xs=!!w,et.ys=!!y):(e.isRoot=W,et.xs=!!(tt.w>Z.w&&w),et.ys=!!(tt.h>Z.h&&y),e.canScroll=tt.w>Z.w||tt.h>Z.h),e.scrollNodes=it,e.clipNodes=ot,e.expRect=et},overlaps:b},Qt,W),te&&(te.def("msghost",{prep:function(t){var e,i,o,n=H,d=(-1<(d=(o=-1<(d=xe.href.indexOf("#"))?xe.href.substr(0,d):xe.href).indexOf("?"))&&(o=o.substr(0,d)),escape(o));return t&&(o=t.name,o=Se(o),i=0!=(i=(e=de(t.src))&&e.substring(0,e.indexOf("/",9))).search(/http/gi)?"":i,(n=Se(o)).id=t.id||"iframe_"+re(),n.src=e,n.srcHost=i,n[Wt]=n[Wt]||re(),n.host=Ee,n.loc=d,n.proxyID="",ze?(n.html5=1,n.proxyPath=""):(o=T("prep",n))&&(n=o),t.name=n),n},attach:function(t,e,i){var o;"iframe"==we(t)&&(o=pe(t,"id"))&&e&&e instanceof Se&&o==e.id&&(ze?((Le[o]=e)._xmsgcb=i,$e||(ee.attach(G,Gt,S),$e=W)):T("attach",t,e,i))},detach:function(t){var e=pe(t,"id"),i=e&&Le[e],o=W;if(i){for(e in i&&(i._xmsgcb=Le[e]=H,i=H,delete Le[e]),e="",Le)if((i=Le[e])&&i[Wt]){o=K;break}o&&ze&&$e&&($e=K,ee.detach(G,Gt,S))}else T("detach",t)},usingHTML5:function(){return ze},send:C},ee,W),re(),Ee=0==Ee.indexOf("file")?"file":Ee,(Xt="on"+Gt)in G?ze=W:(ee.attach(G,Gt,ye=function(){}),"function"==typeof G[Xt]?(ze=W,ee.detach(G,Gt,ye)):ze=K)),te.def("$sf.host",{Config:t,PosConfig:e,PosMeta:i,Position:function t(d,a,r,l){var c,u,p=this,g=d&&typeof d;return p instanceof t?null==qe?o("Publisher Config not initialized - abort",W):(g==gt?le(p,d):c=p.id=de(d)||re(J),a?(p.html=a,p.src=""):p.src?p.html=((g=p.src)&&(-1<(g=-1<g.indexOf("${sf_ver}")?g.replace(/\${sf_ver}/gi,$sf.ver):g).indexOf("${ck_on}")&&(u=s()?"1":"0",g=g.replace(/\${ck_on}/gi,u)),-1<g.indexOf("${flash_ver}"))&&(u=n(),g=g.replace(/\${flash_ver}/gi,u)),de(["<scr","ipt type='text/javascript', src='",g,"'></scr","ipt>"])):(p.html=p.html||"",p.src=""),p.html||(p.html=""),null==r||r instanceof i||(r=new i(r)),p.meta=r||p.meta||new i,p.conf=l||p.conf||{},void(c&&(qe&&qe.positions[c]?p.conf=qe.positions[c]:l&&(l.id=c,p.conf=new e(l))))):new t(d,a,r,l)},nuke:q,get:function(t){return(t=De[t])?le({},t):null},render:function t(){var e,i,o,n,d,s,a,r,l,c,u,p,g,w=0,f=arguments;if(!qe)return K;if(!ee.ready())return ee.wait(function(){t.apply(H,f),f=H}),H;for(f[0]instanceof Array&&1==f[ht]&&(f=f[0]);e=f[w++];)if((o=(i=e.id)?qe.positions[i]:H)&&(n=(r=o.dest)&&ce(r))){if(c=o.w,u=o.h,!c){try{c=n.offsetWidth}catch(t){c=0}c&&(o.w=c)}if(!u){try{u=n.offsetHeight}catch(t){u=0}u&&(o.h=u)}c&&u&&(a=new Se,d=ce(l=X+"-"+i),s=ue(n),d&&s==d&&(s=ue(d)),U(r),(p=Oe[i])&&clearTimeout(p),Me[i]&&delete Me[i],Oe[i]=setTimeout(function(){(t=>{var e=t&&Oe[t];e&&(clearTimeout(e),q(t),A(it,"render-timeout",t)),F()||(Ue="")})(i)},qe.to),Ue="rendering",A("onStartPosRender",i,o,e),p=["margin:auto;z-index:0;",mt,":",c,vt,";",yt,":",u,vt,";","visibility:inherit;"],d?((g=d[ft]).width=c+vt,g.height=u+vt,(g=n&&n[ft]).width=c+vt,g.height=u+vt):((d=ee.make("div")).id=l,d.className="iab_sf",c=n.cloneNode(K),ee.css(c,p),d.appendChild(c),ee.css(d,p),s.replaceChild(d,n),n=ce(r)),a.id=i,a.dest=r,a.conf=Se(o),a.meta=e.meta.toString(),a.html=me(e.html),a.geom=me(j(i,n)),a.src=qe.renderFile,a.has_focus=te.cstr(document.hasFocus()),p[13]="top:0px;left:0px;visibility:hidden;display:none;max-width:none;max-height:none;",Fe||(ee.attach(G,Tt,M),ee.attach(G,"resize",R),ee.attach(G,"unload",z),ee.attach(G,"focus",L),ee.attach(G,"blur",O),Fe=W),ie.replace({id:r,name:a,src:qe.renderFile,_pos_id:i},p,d,N,$),De[i]=a,delete(g=$sf.lib.lang.mix({},a,!1,!0)).geom,delete g.has_focus,$sf.info.list.push(g))}},status:function(){return Ue}},H,W)),(t=>{var e=!1,i=!0,o=null,n=t&&t.document,d=t&&t.$sf,s=d&&d.lib,a=s&&s.lang,r=s&&s.dom,l=a&&a.cstr,c=a&&a.guid,u=r&&r.elt,p=r&&r.par,g=r&&r.tags,w=r&&r.attr,f=r&&r.purge,h=r&&r.ready,m={},y=0,v=e,b=e;function T(e,i){var o,a;try{(s=s||d&&d.lib)&&s.logger&&t==top?i?(s.logger.error(e),d.info.errs.push(e)):s.logger.log(e):(o=n.getElementsByTagName("head")[0],(a=n.createElement("script")).type="text/plain",a.text="\x3c!-- SafeFrame "+(i?"error":"log")+": "+(e||"unknown")+" --\x3e",o.appendChild(o,a))}catch(t){}}function S(){var t,e;if(r)for(t in m)(e=u(t))&&(f(e),delete m[t])}function C(){var f,y,C,A,k,I,P,_,x,E,D,L,O,M,R,z=g&&g("script")||[],$=[],F=0,B=e,N=d&&d.host,U=N&&N.conf;if(!d||!a||!r)return T("SafeFrame base library not found",i),B;if(s=s||d&&d.lib,b&&v)return T("Automatic boot already invoked"),B;if(t==top){try{M=N.Config()}catch(t){M=o}if(U&&!M)try{M=N.Config(U)}catch(t){M=o}if(!M)return T("No configuration found",i),B}for(;f=z[F++];)if(("sf_data"==f.className||"text/x-safeframe"==w(f,"type"))&&(v=i,(I=w(f,"id"))||(I=c("sf_data_element"),w(f,"id",I)),!m[I])){C=f.text||f.innerHTML||f.innerText;try{C=a.trim(C),C=(C=new Function("return "+C))()}catch(t){C=o,T("Error parsing tag configuration "+(t&&t.message||""),i);continue}if(C&&C.id&&(C.html||C.src))if(t!=top)R=C.html||(R=C.src,l(["<scr","ipt type='text/javascript', src='",R,"'></scr","ipt>"])),h()?T("cannot write html content into already loaded document"):n.write(R);else if(y=p(f))if((k=M&&M.positions[C.id])||((k=C.conf).id=C.id,k=k&&new N.PosConfig(k)),k){if(k.dest||(k=new N.PosConfig(k,c("sf_position"))),C.meta){for(O in O="",E={},P=C.meta)x=typeof(_=P[O]),!D&&"object"==x&&_&&(D=_,L=O),"object"!=x&&"function"!=x&&(E[O]=_);P=new N.PosMeta(E,L||"",L&&D?D:o)}if(A=new N.Position(C,o,P,k),m[I]=I,!u(k.dest))if(h()){I=r.make("div"),w(I,"id",k.dest);try{y.insertBefore(I,f)}catch(t){T("failed auto-adding destination element "+t.message,i);continue}}else n.write("<div id='",k.dest,"'></div>");$.push(A)}else T("no position conf found pre-defined or inline for position "+C.id,i);else T("can't find parent element for script tag",i);else T("no content or id property found in the inline position object",i)}if($.length)try{N.render($)}catch(t){T("failed during rendering "+t.message,i)}else T("No new positions to boot");r.wait(S)}setTimeout(function n(){var s,a,l,c,u,p=i;if(!v)if(a=d&&d.host,t==top){a&&!a.boot&&(a.boot=C);try{s=a&&a.Config()}catch(t){s=o}if(!s)try{s=a&&a.conf}catch(t){s=o}s&&("auto"in s&&s.auto===e&&(p=e),!a.render||!a.Config)&&(l=s.hostFile)?(c=g("head")[0],(u=r.make("script")).id="sf_host_lib",u.type="text/javascript",u.className="sf_lib",u.src=l,t.ActiveXObject?u.onreadystatechange=function(){var t=u.readyState;"loaded"!=t&&"complete"!=t||(b=e,p&&C(),u.onreadystatechange=o,u=c=a=s=o)}:u.onload=function(){b=e,p&&C(),u.onload=o,u=c=a=s=o},b=i,c.appendChild(u)):p&&(s?(b=i,C(),b=e):y++<=100&&setTimeout(n,50))}else C()},50)})(window)}}},this._isLoaded=!1,this.isLoading=!1,this.loadPromise=null,this.callbacks=[],this.safeFrameInstance=null,this.log=o.log}executeLibraryContent(){return n(this,void 0,void 0,function*(){try{if(this.SAFEFRAME_LIBRARY_CONTENT(),window.safeFrameInit)return this.safeFrameInstance=window.safeFrameInit,this._isLoaded=!0,this.log("SafeFrame library loaded from embedded content"),this.safeFrameInstance;throw new Error("SafeFrame library content executed but safeFrameInit not found")}catch(t){throw this.log("Error executing SafeFrame library content",t),t}})}load(){return n(this,void 0,void 0,function*(){if(this._isLoaded&&this.safeFrameInstance)return this.safeFrameInstance;if(this.isLoading&&this.loadPromise)return this.loadPromise;this.isLoading=!0;try{this.loadPromise=this.executeLibraryContent();const t=yield this.loadPromise;return this.isLoading=!1,this.callbacks.forEach(e=>{try{e(t)}catch(t){this.log("Error in SafeFrame callback",t)}}),this.callbacks=[],t}catch(t){throw this.isLoading=!1,this.loadPromise=null,t}})}init(t){return n(this,void 0,void 0,function*(){if(t)for(const e of t)e.id&&this.log("SafeFrame ID found in configuration",e.id);const e=yield this.load();return t&&e.setConfig(t),e.init(),e})}isLoaded(){return this._isLoaded&&!!this.safeFrameInstance}getInstance(){return this.safeFrameInstance}onLoad(t){this._isLoaded&&this.safeFrameInstance?t(this.safeFrameInstance):this.callbacks.push(t)}reset(){this._isLoaded=!1,this.isLoading=!1,this.loadPromise=null,this.callbacks=[],this.safeFrameInstance=null;const t=window;t.safeFrameInit&&delete t.safeFrameInit,window&&window.safeFrameInit&&delete window.safeFrameInit}}const a=s},862(t,e,i){i.d(e,{K:()=>s}),t=i.hmd(t);const o={};var n,d;function s(t){return o.TCStringParse(t)}n=o,d=function(){function t(t){return parseInt(t,2)||0}var e=function(e){return 100*t(e)},i=function(e){for(var i="A".charCodeAt(),o=e.match(/.{6}/g)||[],n="",d=0,s=o.length;d<s;d+=1){var a=t(o[d])+i;n+=String.fromCharCode(a)}return n},o=function(t){return Boolean(Number(t))},n=function(t){for(var e=t.split(""),i={},n=0,d=e.length;n<d;n+=1)i[n+1]=o(e[n]);return i},d=function(t){for(var e=t.split(""),i={},n=0,d=Math.min(11,e.length);n<d;n+=1)i[n+1]=o(e[n]);return i},s=function(t){for(var e=t.split(""),i={},n=0,d=Math.min(1,e.length);n<d;n+=1)i[n+1]=o(e[n]);return i};return function(a){function r(t,e,i,d){function s(){if(d.pubRestrictionEntry&&d.rangeEntry)for(var e in d.rangeEntry)Object.prototype.hasOwnProperty.call(d.rangeEntry,e)&&(d.pubRestrictionEntry[e]=(d.pubRestrictionEntry[e]||[]).concat(d.rangeEntry[e]));d.numPubRestrictions&&(--d.numPubRestrictions,t.push({key:"purposeId",size:6},{key:"restrictionType",size:2},{key:"numEntries",size:12}))}function a(){d.numEntries?(--d.numEntries,t.push({key:"isRange",size:1,decoder:o},{key:"startVendorId",size:16})):s()}function r(){return!d.purposeId||[{purpose:d.purposeId,isAllowed:0!==d.restrictionType,isConsentRequired:1===d.restrictionType,isLegitimateInterestRequired:2===d.restrictionType}]}if("isRangeEncoding"===e.key)t.push(i?{key:"numEntries",size:12}:{key:"bitField",size:d.maxVendorId,decoder:n});else if("numEntries"===e.key)d.rangeEntry={},a();else if("isRange"===e.key)i&&t.push({key:"endVendorId",size:16});else if("startVendorId"===e.key)d.isRange||(d.rangeEntry[i]=r(),a());else if("endVendorId"===e.key){for(var l=d.startVendorId;l<=d.endVendorId;l+=1)d.rangeEntry[l]=r();a()}else"numCustomPurposes"===e.key?t.push({key:"customPurposeConsents",size:d.numCustomPurposes,decoder:n},{key:"customPurposeLegitimateInterests",size:d.numCustomPurposes,decoder:n}):"numPubRestrictions"===e.key&&(d.pubRestrictionEntry={},s())}function l(t){return t.pubRestrictionEntry||t.rangeEntry||t.bitField||t}function c(e,i){var o=i.slice(p,p+e.size);return p+=e.size,(e.decoder||t)(o)}function u(t,e){for(var i={},o=0;o<t.queue.length;o+=1){var n=t.queue[o],d=function(t,e){if(!t.queue)return c(t,e);for(var i={},o=0;o<t.queue.length;o+=1){var n=t.queue[o],d=c(n,e);n.key&&(i[n.key]=d),r(t.queue,n,d,i)}return l(i)}(n,e);n.key&&(i[n.key]=d),r(t.queue,n,d,i)}return l(i)}var p=0;return function(){for(var n=function(e){if("string"!=typeof e)throw new Error("Invalid transparency and consent string specified");for(var i=e.split("."),o=[],n=0,d=i.length;n<d;n+=1)o.push(function(t){for(var e="",i=0,o=t.length;i<o;i+=1){var n=t.charCodeAt(i).toString(2);e+="00000000".slice(0,8-n.length)+n}return e}(function(t){if("function"==typeof atob){var e=t.replace(/_/g,"/").replace(/-/g,"+");try{return atob(e)}catch(t){throw new Error("Unable to decode transparency and consent string")}}if("function"==typeof Buffer)return Buffer.from(t,"base64").toString("binary");throw new Error("Unable to detect base64 decoder")}(i[n])));var s=t(o[0].slice(0,6));if(2!==s)throw new Error("Unsupported transparency and consent string version "+s);return o}(a),r=function(n){for(var a=[{key:"purposeConsents",size:24,decoder:d},{key:"purposeLegitimateInterests",size:24,decoder:d}],r=[{key:"maxVendorId",size:16},{key:"isRangeEncoding",size:1,decoder:o}],l=[{key:"version",size:6},{key:"created",size:36,decoder:e},{key:"lastUpdated",size:36,decoder:e},{key:"cmpId",size:12},{key:"cmpVersion",size:12},{key:"consentScreen",size:6},{key:"consentLanguage",size:12,decoder:i},{key:"vendorListVersion",size:12},{key:"policyVersion",size:6},{key:"isServiceSpecified",size:1,decoder:o},{key:"useNonStandardStacks",size:1,decoder:o},{key:"specialFeatureOptins",size:12,decoder:s}].concat(a).concat({key:"purposeOneTreatment",size:1,decoder:o},{key:"publisherCountryCode",size:12,decoder:i},{key:"vendorConsents",queue:[{key:"maxVendorId",size:16},{key:"isRangeEncoding",size:1,decoder:o}]},{key:"vendorLegitimateInterests",queue:r},{key:"publisherRestrictions",queue:[{key:"numPubRestrictions",size:12}]}),c=[{size:3}],u=[].concat(c).concat(r),p=[].concat(c).concat(r),g=[].concat(c).concat(a).concat({key:"numCustomPurposes",size:6}),w=[{key:"core",queue:l}],f=1;f<n.length;f+=1){var h=t(n[f].slice(0,3));1===h?w.push({key:"disclosedVendors",queue:u}):2===h?w.push({key:"allowedVendors",queue:p}):3===h&&w.push({key:"publisherTC",queue:g})}return w}(n),l={},c=0;c<r.length;c+=1){var g=r[c],w=u(g,n[c]);g.key&&(l[g.key]=w),p=0}l.publisherTC=l.publisherTC||{},l.publisherTC.purposeConsents=l.publisherTC.purposeConsents||{},l.publisherTC.purposeLegitimateInterests=l.publisherTC.purposeLegitimateInterests||{};for(var f=1;f<=11;f+=1)f in l.publisherTC.purposeConsents||(l.publisherTC.purposeConsents[f]=!1),f in l.publisherTC.purposeLegitimateInterests||(l.publisherTC.purposeLegitimateInterests[f]=!1);return l}()}},"function"==typeof define&&i.amdO?define([],d):t.exports?t.exports=d():n.TCStringParse=d()},46(t,e,i){function o(){let t=!1;var e;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}function n(){let t=!1;var e;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}function d(){return(new Date).getTime()-window.odTagStartTime.getTime()}function s(t,e){window.odT?.debug&&(console.log(window.odT.logPrefix+t+" (time:"+d()+"ms)","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color: #79ba23"),void 0!==e&&console.log(e)),window.odBackfill?.debug&&(console.log(`%cBACKFILL_SA:%c ${t} (time:`+d()+"ms)","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),void 0!==e&&console.log(e)),window.odAnalytics?.debug&&(console.log(`%cANALYTICS_SA:%c ${t} (time:`+d()+"ms)","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),void 0!==e&&console.log(e))}function a(t,e){(window.odT?.analytics?.debugAnalytics||window?.odAnalytics?.analytics?.debugAnalytics)&&(console.log((window?.odT?.analyticsLogPrefix||"%cOptiDigital_Debug_Analytics:%c ")+t+" (time:"+d()+"ms)","background: #79ba23;border-radius:5px;color:#286090;font-weight:700;padding:2px 5px;","color: #286090"),void 0!==e&&console.log(e))}function r(t,e){Math.imul||(Math.imul=function(t,e){var i=65535&t,o=65535&e;return i*o+((t>>>16&65535)*o+i*(e>>>16&65535)<<16>>>0)|0});var i,o=3735928559^e,n=1103547991^e;for(i=0;i<t.length;i++){var d=t.charCodeAt(i);o=Math.imul(o^d,2654435761),n=Math.imul(n^d,1597334677)}return o=Math.imul(o^o>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(o^o>>>13,3266489909)))+(o>>>0)}function l(){let t=function(t){return t.test(window.navigator.userAgent)};switch(!0){case t(/edg/i):return"Edge";case t(/trident/i):return"Internet Explorer";case t(/firefox|fxios/i):return"Firefox";case t(/opr\//i):return"Opera";case t(/ucbrowser/i):return"UC Browser";case t(/samsungbrowser/i):return"Samsung Browser";case t(/chrome|chromium|crios/i):return"Chrome";case t(/^((?!chrome|chromium|crios|android).)*safari/i):return"Safari";default:return"Other"}}function c(){let t=window.navigator.platform,e=window.navigator.userAgent,i=null;return i=-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?"Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(t)?"iOS":/Android/.test(e)?"Android":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?"Windows":!i&&/Linux/.test(t)?"Linux":"Other",i}function u(){if(n())return o()?{deviceCategory:"Smartphone",dDevice:"30001"}:{deviceCategory:"Tablet",dDevice:"30002"};return"Mobile"===(window.document.documentElement.clientWidth<768?"Mobile":"Desktop")?{deviceCategory:"Smartphone",dDevice:"30001"}:{deviceCategory:"Desktop",dDevice:"30000"}}function p(t){return t?(t^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,p)}function g(t,e){for(const i in t)if(t.hasOwnProperty(i)&&t[i].name&&t[i].name.startsWith(e))return t[i].name;return!1}function w(t,e){Object.keys(e).forEach(i=>{t.setAttribute(i,e[i])})}function f(t,e,i="…"){if(t.length<=e)return t;const o=new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t)[Symbol.iterator]();let n=0;for(let d=0;d<=e-i.length;d++){const e=o.next();if(e.done)return t;n=e.value.index}for(let e=0;e<i.length;e++)if(o.next().done)return t;return t.slice(0,n)+i}function h(t,e){return toString.call(t)==="[object "+e+"]"}function m(t){return h(t,"Object")}function y(t){return h(t,"Function")}function v(t){return h(t,"String")}function b(t){return h(t,"Boolean")}function T(t){return h(t,"Number")}i.r(e),i.d(e,{ajax:()=>k,analyticsLog:()=>a,buildAdUnitPath:()=>L,checkSafeFrameDelivery:()=>I,checkSlotTargeting:()=>$,createGptPfUnitConfig:()=>D,cyrb53:()=>r,deepEqual:()=>P,detectBrowser:()=>l,detectOS:()=>c,deviceDetection:()=>u,emitEvent:()=>O,flattenTargetingValues:()=>F,formatSizeArrayToString:()=>z,generateUuid:()=>p,getCookie:()=>R,getElapsedTime:()=>d,getPbjs:()=>E,hasNameInObject:()=>g,isA:()=>h,isArray:()=>S,isBoolean:()=>b,isClientMobile:()=>o,isClientMobileOrTablet:()=>n,isEmpty:()=>C,isFn:()=>y,isNumber:()=>T,isPlainObject:()=>m,isStr:()=>v,isValidHttpUrl:()=>A,log:()=>s,mergeDeep:()=>x,setAttributes:()=>w,setCookie:()=>M,truncate:()=>f,uniqueArray:()=>_});const S=Array.isArray.bind(Array);function C(t){return!t||(S(t)||v(t)?!(t.length>0):Object.keys(t).length<=0)}function A(t){let e;try{e=new URL(t)}catch(t){return!1}return"http:"===e.protocol||"https:"===e.protocol}function k(t,e,i,o){throw new Error("Function not implemented.")}function I(t,e){let i=!1;return Array.isArray(window?.odT?.setup?.prebidSafeframe?.bidders)&&window?.odT?.setup?.biddersSetup?.triplelift&&window.odT.setup.prebidSafeframe.bidders.push("triplelift"),window.odT.setup.hasOwnProperty("prebidSafeframe")&&-1!=window.odT.setup.prebidSafeframe.bidders.indexOf(e.hb_bidder)&&"1800x1000"!=e.hb_size&&(i=!0,"smart"!=e.hb_bidder||-1==t.indexOf("Content_")||"300x600"!=e.hb_size&&"320x480"!=e.hb_size||(i=!1),(e.hasOwnProperty("hb_deal_appnexus")||e.hasOwnProperty("hb_deal_xandr"))&&(i=!1)),i}function P(t,e){if(t===e)return!0;if(m(t)&&m(e)){const i=Object.keys(t),o=Object.keys(e);return i.length===o.length&&i.every(i=>P(t[i],e[i]))}return!(!Array.isArray(t)||!Array.isArray(e))&&(t.length===e.length&&t.every((t,i)=>P(t,e[i])))}function _(t){const e=[];for(const i of t)e.some(t=>P(t,i))||e.push(i);return e}function x(t,...e){if(!e.length)return t;const i=e.shift();if(m(t)&&m(i))for(const e in i)m(i[e])?(t[e]||(t[e]={}),x(t[e],i[e])):Array.isArray(i[e])?(Array.isArray(t[e])||(t[e]=[]),t[e]=_([...t[e],...i[e]])):t[e]=i[e];return x(t,...e)}function E(){return window.odBackfill?.backfill?.hasOwnProperty("pbjs")?window.odBackfill.backfill.pbjs:window.odAnalytics?.setup?.hasOwnProperty("pbjs")?window.odAnalytics.pbjs:void 0!==window.odBackfill?.pbjs?window.odBackfill.pbjs:void 0!==window.odAnalytics?.pbjs?window.odAnalytics.pbjs:window._pbjsGlobals?window._pbjsGlobals&&1===window._pbjsGlobals.length?(window.odBackfill&&(window.odBackfill.pbjs=window[_pbjsGlobals[0]]),window.odAnalytics&&(window.odAnalytics.pbjs=window[_pbjsGlobals[0]]),window[_pbjsGlobals[0]]):void 0:(window.odBackfill?.debug&&console.warn("%cBACKFILL_SA:%c prebid.js isn't loaded yet, assume it will be pbjs","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),window.odAnalytics?.debug&&console.warn("%cANALYTICS_SA:%c prebid.js isn't loaded yet, assume it will be pbjs","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[],window.odBackfill&&(window.odBackfill.pbjs=window.pbjs),window.odAnalytics&&(window.odAnalytics.pbjs=window.pbjs),window.odBackfill?window.odBackfill.pbjs:window.odAnalytics?window.odAnalytics.pbjs:window.pbjs)}function D(t){let e={adUnitPath:L(t.getAdUnitPath()),customDimensions:{}};return window.odBackfill?.backfill?.hasOwnProperty("gptCustomDimensionKey")&&Object.keys(window.odBackfill.backfill.gptCustomDimensionKey).length>0&&Object.entries(window.odBackfill.backfill.gptCustomDimensionKey).forEach(([i,o],n)=>{e.customDimensions[i]=t.getConfig("targeting")?.targeting?.[o]?.[0]}),e.interstitial=!1,t?.getOutOfPage()&&(e.interstitial=!0),e}function L(t){if("string"!=typeof t)return t;let e=t;return e.startsWith("/")||(e="/"+e),e=e.replace(/,([^/]*\/)/,"/"),e}function O(t,e={}){window.dispatchEvent(new CustomEvent(t,{detail:e}))}function M(t,e,i,o){let n=new Date;n.setTime(n.getTime()+1e3*i);let d="expires="+n.toUTCString();document.cookie=o?t+"="+e+";"+d+";domain="+o+";path=/;sameSite=Lax":t+"="+e+";"+d+";path=/"}function R(t){let e=t+"=",i=document.cookie.split(";");for(let t=0;t<i.length;t++){let o=i[t];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}function z(t){return t[0]+"x"+t[1]}function $(t){if(t){const e=t.getConfig("targeting"),i=e?.targeting?.hb_bidder?.[0]||"",o=e?.targeting?.hb_pb?.[0]||"",n=e?.targeting?.amznbid?.[0]?.length>1?1:0,d=e?.targeting?.amznbid?.[0]?.length>0?1:0;return{hb_bidder:i,hb_pb:o,amznbid:n,od_pfg:"1"===e?.targeting?.od_pfg?.[0]?1:0,od_pf_group:"1"===e?.targeting?.od_pf_group?.[0]?1:0,od_pf_pb:e?.targeting?.od_pf_pb?.[0]?parseFloat(e.targeting.od_pf_pb[0]):"",od_pf_ta:e?.targeting?.od_pf_ta?.[0]||"",hb_format:e?.targeting?.hb_format?.[0]||null,isAmznbid:d}}return{}}function F(t){return t.reduce((t,e)=>Array.isArray(e)?t.concat(F(e)):(t.push(e),t),[])}}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var d=e[o]={id:o,loaded:!1,exports:{}};return t[o](d,d.exports,i),d.loaded=!0,d.exports}i.amdO={},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class o{constructor(t,e,i){this.screen=t,this.setup=e,this.divIdPrefix=i}addInterstitial(t){var e,i,o,n;if((null===(e=this.setup.adSlotsConfig)||void 0===e?void 0:e.hasOwnProperty(`disable${this.screen}Interstitial`))&&this.setup.adSlotsConfig[`disable${this.screen}Interstitial`])return;const d=(null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i[`nameInterstitial${this.screen}`])||`${this.screen}_Interstitial`,{cdValue:s,adUnitPathSuffix:a,customKeyValues:r}=(null===(n=null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.adSlotsDefinitions)||void 0===n?void 0:n.find(t=>t.name===d))||{};t[d]=Object.assign(Object.assign(Object.assign({name:d,adUnit:d,divId:`${this.divIdPrefix}${d}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[[320,480],[336,280],[300,250],[250,250]]},s&&{cdValue:s}),a&&{customAdUnitCode:a}),r&&{customKeyValues:r})}isInterstitialSlot(t){return t.toLowerCase().includes("interstitial")}getLoadType(){return 6}}class n{constructor(t,e,i){this.screen=t,this.setup=e,this.divIdPrefix=i}addSideRails(t){var e,i,o,n,d;((null===(i=null===(e=this.setup.adSlotsConfig)||void 0===e?void 0:e.sideRailsConfig)||void 0===i?void 0:i.enableLeft)||(null===(n=null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.sideRailsConfig)||void 0===n?void 0:n.enableRight))&&document.documentElement.clientWidth>=1200&&document.documentElement.clientHeight>=650&&Object.keys((null===(d=this.setup.adSlotsConfig)||void 0===d?void 0:d.sideRailsConfig)||{}).forEach(e=>{var i,o,n,d,s,a;if(null===(o=null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i.sideRailsConfig)||void 0===o?void 0:o[e]){const i="enableLeft"===e?"Left":"Right",o=(null===(d=null===(n=this.setup.adSlotsConfig)||void 0===n?void 0:n.sideRailsConfig)||void 0===d?void 0:d[`nameSiderail${i}`])||`SideRail_${i}`,{cdValue:r,adUnitPathSuffix:l,refreshDelay:c,customKeyValues:u}=(null===(a=null===(s=this.setup.adSlotsConfig)||void 0===s?void 0:s.adSlotsDefinitions)||void 0===a?void 0:a.find(t=>t.name===o))||{};t[o]=Object.assign(Object.assign(Object.assign(Object.assign({name:o,adUnit:o,divId:`${this.divIdPrefix}${o}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[]},r&&{cdValue:r}),l&&{customAdUnitCode:l}),c&&{refreshDelay:c}),u&&{customKeyValues:u})}})}isSideRailSlot(t){return t.toLowerCase().includes("siderail")}getLoadType(){return 7}}var s=i(46);class a{constructor(t,e,i,o,n,d,a){this.rewardedAdDivId="",this.adSlotsDefinitions={},this.rewardedAdListenersRegistered=!1,this.grantedRewardedAdSlotNames=[],this.rewardedAdPayload=null,this.rewardedAdsReady=!1,this.tools=s,this.log=s.log.bind(s),this.screen=t,this.setup=e,this.divIdPrefix=i,this.rewardedAdCookie=o,this.rewardedAdFrequency=n,this.rewardedAdFrequencyImps=d,this.rewardedAdFrequencyInterval=a}addRewardedAds(t,e=!1,i=`${this.screen}_RewardedAd`){var o,n,d,s,a,r,l,c,u,p,g;if(!e&&!(null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.hasOwnProperty("rewardedAdConfiguration")))return this.log("[Rewarded AD] Configuration not found for normal flow"),!1;if(!e&&!(null===(n=this.setup.adSlotsConfig)||void 0===n?void 0:n.rewardedAdConfiguration)||!this.checkRewardedAdFrequency()||(null===(d=this.setup.adSlotsConfig)||void 0===d?void 0:d.hasOwnProperty(`disable${this.screen}RewardedAd`))&&this.setup.adSlotsConfig[`disable${this.screen}RewardedAd`])return!1;if(!this.checkRewardedAdFrequency())return this.log("[Rewarded AD] Frequency limit reached"),!1;if((null===(s=this.setup.adSlotsConfig)||void 0===s?void 0:s.hasOwnProperty(`disable${this.screen}RewardedAd`))&&this.setup.adSlotsConfig[`disable${this.screen}RewardedAd`])return this.log("[Rewarded AD] Disabled by ad slot configuration"),!1;(null===(a=this.setup.adSlotsConfig)||void 0===a?void 0:a.hasOwnProperty(`nameRewardedAd${this.screen}`))?i=null===(r=this.setup.adSlotsConfig)||void 0===r?void 0:r[`nameRewardedAd${this.screen}`]:(null===(l=this.setup.adSlotsConfig)||void 0===l?void 0:l.hasOwnProperty("rewardedAdConfiguration"))&&(null===(c=this.setup.adSlotsConfig.rewardedAdConfiguration)||void 0===c?void 0:c.hasOwnProperty(`nameRewardedAd${this.screen}`))&&(i=null===(u=this.setup.adSlotsConfig.rewardedAdConfiguration)||void 0===u?void 0:u[`nameRewardedAd${this.screen}`]);const{cdValue:w,adUnitPathSuffix:f,customKeyValues:h}=(null===(g=null===(p=this.setup.adSlotsConfig)||void 0===p?void 0:p.adSlotsDefinitions)||void 0===g?void 0:g.find(t=>t.name===i))||{};return t[i]=Object.assign(Object.assign(Object.assign({name:i,adUnit:i,divId:`${this.divIdPrefix}${i}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[[320,480],[336,280],[300,250],[250,250]]},w&&{cdValue:w}),f&&{customAdUnitCode:f}),h&&{customKeyValues:h}),this.adSlotsDefinitions[i]=t[i],!0}isRewardedAdSlot(t){return t.toLowerCase().includes("rewardedad")}getLoadType(){return 8}rewardedAdSlotReady(t){var e;(null===(e=window.optidigitalToolbox)||void 0===e?void 0:e.hasOwnProperty("rewardedSlotReady"))&&window.optidigitalToolbox.rewardedSlotReady(t)}rewardedAdSlotGranted(t){var e;(null===(e=window.optidigitalToolbox)||void 0===e?void 0:e.hasOwnProperty("rewardedSlotGranted"))&&window.optidigitalToolbox.rewardedSlotGranted(t)}rewardedAdSlotClosed(t){var e;(null===(e=window.optidigitalToolbox)||void 0===e?void 0:e.hasOwnProperty("rewardedSlotClosed"))&&window.optidigitalToolbox.rewardedSlotClosed(t)}setRewardedAdDivId(t){this.rewardedAdDivId=t}get odT(){return window.odT}getLauncherGptAdSlots(){var t,e;return null!==(e=null===(t=this.odT)||void 0===t?void 0:t.gptAdSlots)&&void 0!==e?e:{}}setLauncherGptAdSlots(t,e){var i;const o=null===(i=this.odT)||void 0===i?void 0:i.gptAdSlots;o&&(o[t]=e)}getLauncherInitConfigAdUnit(){var t,e,i;return null!==(i=null===(e=null===(t=this.odT)||void 0===t?void 0:t.initConfig)||void 0===e?void 0:e.adUnit)&&void 0!==i?i:""}getGPTSlot(t){const e=this.getLauncherGptAdSlots();return t in e?[e[t]]:[]}setLauncherFinalAdSlots(t,e){var i,o;const n=null===(o=null===(i=this.odT)||void 0===i?void 0:i.finalAdSlotsConfig)||void 0===o?void 0:o.adSlotsDefinitions;n&&(n[t]=e)}pushLauncherFirstLoadAdSlots(t){var e,i;null===(i=null===(e=this.odT)||void 0===e?void 0:e.firstLoadAdSlots)||void 0===i||i.push(t)}filterLauncherLazyLoadPendingAdSlots(){const t=this.odT;(null==t?void 0:t.lazyLoadPendingAdSlots)&&(null==t?void 0:t.firstLoadAdSlots)&&(t.lazyLoadPendingAdSlots=t.lazyLoadPendingAdSlots.filter(e=>!t.firstLoadAdSlots.includes(e)))}handleRewardedAdsUncropping(){var t,e;null===(e=null===(t=this.odT)||void 0===t?void 0:t.handleRewardedAdsUncropping)||void 0===e||e.call(t)}getRewardedAdDivId(){return this.rewardedAdDivId}checkRewardedAdFrequency(){if(!0===this.rewardedAdFrequency){const t=this.getCookie(this.rewardedAdCookie);if(void 0!==t&&t>=this.rewardedAdFrequencyImps)return!1}return!0}incrementRewardedAdFrequency(t){let e=t.tools.getCookie(t.rewardedAdCookie);e.length>0?e++:e=1,t.tools.setCookie(t.rewardedAdCookie,e,t.rewardedAdFrequencyInterval)}getCookie(t){var e;const i=`; ${document.cookie}`.split(`; ${t}=`);if(2===i.length){const t=null===(e=i.pop())||void 0===e?void 0:e.split(";").shift();return t?parseInt(t,10):0}return 0}setFrequency(t){var e,i,o,n;this.rewardedAdCookie=null!==(e=t.cookieName)&&void 0!==e?e:this.rewardedAdCookie,this.rewardedAdFrequency=null!==(i=t.frequency)&&void 0!==i?i:this.rewardedAdFrequency,this.rewardedAdFrequencyImps=null!==(o=t.frequencyImps)&&void 0!==o?o:this.rewardedAdFrequencyImps,this.rewardedAdFrequencyInterval=null!==(n=t.frequencyInterval)&&void 0!==n?n:this.rewardedAdFrequencyInterval}createRewardedAdSlot(t=this.screen+"_RewardedAd",e=!1){var i,o,n,d,s,a,r,l,c;let u;if(!0===e){if(!this.addRewardedAds({},!0,t))return this.log("[Rewarded AD] Failed to add rewarded ad definition"),!1;this.setLauncherFinalAdSlots(t,this.adSlotsDefinitions[t]),this.pushLauncherFirstLoadAdSlots(t),this.filterLauncherLazyLoadPendingAdSlots(),u=(null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i[`nameRewardedAd${this.screen}`])||""}else{if(!(null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.rewardedAdConfiguration))return this.log("[Rewarded AD] Configuration not found"),!1;u=(null===(d=null===(n=this.setup.adSlotsConfig)||void 0===n?void 0:n.rewardedAdConfiguration)||void 0===d?void 0:d[`nameRewardedAd${this.screen}`])||""}if(8==(null===(s=this.adSlotsDefinitions[t])||void 0===s?void 0:s.loadType)&&(t.toLowerCase().includes("_rewardedad")||t.toLowerCase().includes(null==u?void 0:u.toLowerCase()))){if((null===(a=this.getGPTSlot(t))||void 0===a?void 0:a.length)>0)return this.log("[Rewarded AD] Slot already declared on google tag"),!1;const i=u||t;this.setRewardedAdDivId(i.toLowerCase());let o=window.googletag.defineOutOfPageSlot(`${this.getLauncherInitConfigAdUnit()}${this.adSlotsDefinitions[t].customAdUnitCode?"/"+this.adSlotsDefinitions[t].customAdUnitCode:""}`,window.googletag.enums.OutOfPageFormat.REWARDED);if(o){let i=this.setup.adSlotsConfig&&this.setup.adSlotsConfig.adManagerKeyName?this.setup.adSlotsConfig.adManagerKeyName:(null===(c=null===(l=null===(r=this.setup)||void 0===r?void 0:r.customTargeting)||void 0===l?void 0:l.adslot)||void 0===c?void 0:c.name)?this.setup.customTargeting.adslot.name:"adslot";if(o.setConfig({targeting:{[i]:this.adSlotsDefinitions[t].cdValue?this.adSlotsDefinitions[t].cdValue:this.adSlotsDefinitions[t].adUnit}}),o.addService(googletag.pubads()),this.adSlotsDefinitions[t].customKeyValues)for(let e in this.adSlotsDefinitions[t].customKeyValues)o.setConfig({targeting:{[e]:this.adSlotsDefinitions[t].customKeyValues[e]}});if(this.setLauncherGptAdSlots(this.adSlotsDefinitions[t].name,o),this.log("[Rewarded AD] Created adslot "+t),this.rewardedAdListenersRegistered)this.log("[Rewarded AD] Listeners already registered");else{this.log("[Rewarded AD] Registering listeners");const t=this;googletag.pubads().addEventListener("rewardedSlotReady",e=>{var i,o;let n=t.grantedRewardedAdSlotNames;const d=t.getLauncherGptAdSlots(),s=Object.keys(d).find(t=>d[t]===e.slot)||"";if(n.includes(s)&&(n=n.filter(t=>t!==s)),t.rewardedAdSlotReady(e),null===(o=null===(i=t.setup.adSlotsConfig)||void 0===i?void 0:i.rewardedAdConfiguration)||void 0===o?void 0:o.enableForArticles){t.rewardedAdsReady=!0;const i=document.getElementById("od_rwdad_enable_reward_ad");i&&(i.classList.remove("od-loading"),i.addEventListener("click",i=>{e.makeRewardedVisible(),t.log("[Rewarded AD] Ad is active.")}))}}),googletag.pubads().addEventListener("rewardedSlotClosed",i=>{var o,n;t.rewardedAdSlotClosed(i),(null===(n=null===(o=t.setup.adSlotsConfig)||void 0===o?void 0:o.rewardedAdConfiguration)||void 0===n?void 0:n.enableForArticles)&&t.rewardedAdPayload&&(t.rewardedAdPayload=null);const d=t.getLauncherGptAdSlots(),s=i.slot?Object.keys(d).find(t=>d[t]===i.slot):Object.keys(d).find(e=>t.isRewardedAdSlot(e)),a=i.slot||(s?d[s]:null);if(a&&s){googletag.destroySlots([a]),delete d[s];const i=performance.now(),o=()=>{performance.now()-i>=300?t.grantedRewardedAdSlotNames.includes(s)||t.createRewardedAdSlot(s,e)&&window.googletag.cmd.push(function(){window.googletag.pubads().refresh(t.getGPTSlot(s))}):requestAnimationFrame(o)};requestAnimationFrame(o)}}),googletag.pubads().addEventListener("rewardedSlotGranted",e=>{var i,o;const n=t.getLauncherGptAdSlots();t.grantedRewardedAdSlotNames.push(Object.keys(n).find(t=>n[t]===e.slot)||""),!0===t.rewardedAdFrequency&&t.incrementRewardedAdFrequency(t),t.rewardedAdSlotGranted(e),(null===(o=null===(i=t.setup.adSlotsConfig)||void 0===i?void 0:i.rewardedAdConfiguration)||void 0===o?void 0:o.enableForArticles)&&(t.rewardedAdPayload=e.payload,t.handleRewardedAdsUncropping())}),this.rewardedAdListenersRegistered=!0}return this.log("[Rewarded AD] Slot created - "+t),!0}return this.log("[Rewarded AD] Failed to create adslot - "+t),!1}return this.log("[Rewarded AD] Slot not created - "+t),!1}}class r{constructor(t,e,i){this.stickyAdDivIds={},this.stickyAdModes={},this.stickyAdStatuses={},this.stickyAdTopTriggers={},this.stickyAdAutoHidePxValues={},this.screen=t,this.setup=e,this.divIdPrefix=i}getStickyAdConfigurations(){var t;const e=this.setup,i=this.screen,o=`${i}_Sticky_`,n=(null===(t=null==e?void 0:e.adSlotsConfig)||void 0===t?void 0:t.stickyAdConfiguration)||(null==e?void 0:e.stickyAdConfiguration);if(!n)return[];if("object"==typeof n){const t=Object.keys(n),e=t.some(t=>t.includes(o)),d=t.some(t=>t.includes("_Sticky_"));if(e){const t=[];for(const[e,o]of Object.entries(n))e.includes(i)&&t.push({slotName:e,config:o});return t}if(d)return[];const s=this.getStickyAdName(n);return s?[{slotName:s,config:n}]:[]}return[]}getStickyAdConfigurationBySlotName(t,e){var i,o,n;const d=`name${this.screen}`;if(e&&e.length>0){const i=e.find(({slotName:e,config:i})=>e===t||i&&i[d]===t);if(i)return i.config}const s=null===(o=null===(i=this.setup)||void 0===i?void 0:i.adSlotsConfig)||void 0===o?void 0:o.stickyAdConfiguration;if(s&&"object"==typeof s&&!Array.isArray(s)){if(!Object.keys(s).some(t=>t.includes(`${this.screen}_Sticky_`)))return s;{const e=s,i=Object.values(e).find(e=>e&&"object"==typeof e&&e[d]===t);if(i)return i;if(e[t])return e[t]}}const a=null===(n=this.setup)||void 0===n?void 0:n.stickyAdConfiguration;return a||null}createStickyAd(t,e){var i,o,n,d;if(!t||"string"!=typeof t)return void(e.log&&e.log("createStickyAd NOSTICKY because adSlotName is invalid"));const{initConfigAdUnit:s,log:a,getCookie:r,firstLoadAdSlots:l=[],setAttributes:c,stickyAutoCloseScroll:u,refreshAdSlots:p,onLegacyStateUpdate:g,adLayoutEnabled:w}=e,f=this.screen,h=this.setup,m=this.getCookieName(t),y=this.getStickyAdConfigurations();let v=this.getStickyAdConfigurationBySlotName(t,y);const b=/[^a-zA-Z0-9]/g,T=(null===(i=null==h?void 0:h.adSlotsConfig)||void 0===i?void 0:i.stickyAdConfiguration)||(null==h?void 0:h.stickyAdConfiguration);if(!v)return;const S=Number(null==v?void 0:v.frequency)||0,C=null==v?void 0:v.frequencyImps,A=Number(C),k=Number.isFinite(A)&&Number.isInteger(A)&&A>0;if(S&&k&&r&&m){const t=Number.parseInt(String(null!==(o=r(m))&&void 0!==o?o:""),10);if(Number.isFinite(t)&&t>=A)return void(null==a||a("createStickyAd NOSTICKY because of FREQUENCY CAPPING"))}const I=`disable${f}`,P=`adUnitsExcluded${f}`,_=(null==v?void 0:v.hasOwnProperty(I))&&v[I],x=(null==v?void 0:v.adUnitsExcluded)&&Array.isArray(v.adUnitsExcluded)&&v.adUnitsExcluded.includes(s),E=null==v?void 0:v[P],D=E&&Array.isArray(E)&&E.includes(s),L=null==h?void 0:h.adSlotsConfig,O=null===(n=null==L?void 0:L.adSlotsDefinitions)||void 0===n?void 0:n.some(e=>e.name===t&&0===e.status);if(_||x||D||O)return;const M=this.getStickyAdConfigKey(y,t);let R=this.getStickyAdModeFromConfig(v,M);"top"===R&&(this.setStickyAdTopTrigger(t,0),this.setStickyAdAutoHidePx(t,0));const z=`stickyAdTopTrigger${f}`,$=`stickyAdAutoHidePx${f}`,F=(null==v?void 0:v.hasOwnProperty(z))?v[z]:(null==T?void 0:T.hasOwnProperty(z))?T[z]:void 0,B=(null==v?void 0:v.hasOwnProperty($))?v[$]:(null==T?void 0:T.hasOwnProperty($))?T[$]:void 0;null!=F?this.setStickyAdTopTrigger(t,F):this.setStickyAdTopTrigger(t,this.getStickyAdTopTrigger(t)||0),null!=B?this.setStickyAdAutoHidePx(t,B):this.setStickyAdAutoHidePx(t,0);const N=`${this.divIdPrefix}${t}`,U=0===Object.keys(this.stickyAdDivIds).length;this.setStickyAdMode(t,R),this.setStickyAdDivId(t,N),this.setStickyAdStatus(t,"off");const j=this.getStickyAdTopTrigger(t),V=this.getStickyAdAutoHidePx(t);g&&U&&g({stickyAdDivId:N,stickyAdMode:R,stickyAdStatus:"off",stickyAdTopTrigger:j,stickyAdAutoHidePx:V}),a&&a("createStickyAd MODE:"+R+" with ADSLOT: "+t);const q=(null==v?void 0:v.zIndex)||"10";let G=(null==v?void 0:v.adCloseTop)||"-24";"top"===R&&"-24"===G&&(G="-23");let H=document.createElement("style");const W=null==v?void 0:v[`stickyAdMode${f}X`],K="none"===W?"none":"left"===W?"left":"inner-left"===W?"inner-left":"right",Y=null==v?void 0:v.backgroundColor,J=!Y||!(Y.includes("rgba")&&parseFloat(Y.split(",")[3])<1),X=this.isVerticalStickyAdSlot(t);let Z,Q,tt,et,it,ot,nt,dt,st,at,rt;if(X)Z="top",Q="20",tt="left"===K||"inner-left"===K?"left":"right",et="10",it="border: 1px solid #999;",ot="50%",nt="",dt="50",st="50",at="34",rt="34";else{if(Z="inner-left"===K||"bottom"===R?"top":"bottom",Q="inner-left"===K?"3":"-24",tt="left"===K||"inner-left"===K?"left":"right",et="inner-left"===K?"3":"0",dt="24",st="24",at="16",rt="16",it="border: none;",J)if("inner-left"===K)it="border: 1px solid #999;";else if("bottom"===R){it=`border-${"left"===K?"right":"left"}: 1px solid #999; border-top: 1px solid #999; border-${"left"===K?"left":"right"}: none; border-bottom: none;`}else it="border: none;";if(ot="0px 0 0 12px","inner-left"===K?ot="50%":"top"===R?ot="left"===K?"0 0 12px 0":"0px 0 0 12px":"bottom"===R&&(ot="left"===K?"0 12px 0 0":"12px 0 0 0"),nt="",J&&"inner-left"!==K){nt=`box-shadow: 0 ${"bottom"===R?"-1px":"1px"} 1px 0 rgba(0, 0, 0, 0.2);`}}const lt=Y||"#fff",ct=X||!J?"":"border-top: 1px solid #999; box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);",ut=t.replace(b,"_"),pt=`opd_adsticky_${ut}`,gt=`opd_adsticky-scroll_${ut}`,wt=`opd_adsticky-close_${ut}`,ft=`opd_adclosebox_${ut}`,ht=`opd_adclose_${ut}`,mt=this.getStickyAdContainerId(t);let yt="";if(X){yt=`\n        .${pt} {\n          display: none;\n          position: fixed;\n          ${"left"===R?"left: 0;":"right: 0;"}\n          top: ${(null==v?void 0:v.topValue)||"50%"};\n          transform: translateY(-50%) scale(${(null==v?void 0:v.verticalScale)||"0.4"});\n          transform-origin: ${R} center;\n          width: 300px;\n          height: auto;\n          padding: 0;\n          text-align: center;\n          background-color: ${lt};\n          z-index: ${q};\n        }\n        .${pt} .optidigital-wrapper-div {\n          width: 300px !important;\n          min-width: 300px !important;\n          max-width: 300px !important;\n          margin: 0 !important;\n          padding: 0 !important;\n        }\n      `}else yt=`\n        .${pt} {\n          display: none;\n          position: fixed;\n          margin-bottom: 0;\n          ${R}: 0;\n          left: 0;\n          width: 100%;\n          height: auto;\n          padding: 5px 0 4px;\n          text-align: center;\n          background-color: ${lt};\n          ${ct}\n        }\n      `;(null==v?void 0:v.biggerCloseIcon)&&(yt+=`\n        .${ft}::before {\n          content: '';\n          display: block;\n          width: 70px;\n          height: 70px;\n          position: absolute;\n          ${Z}: -${et}px !important;\n          ${tt}: -${et}px !important;\n        }\n      `),H.innerHTML=`\n      ${yt}\n      .${gt}:not(.${wt}) {\n        display: block;\n      }\n      /* Hide sticky ad when close class is present - works for both base and scroll states */\n      .${pt}.${wt},\n      .${gt}.${wt},\n      [id="${mt}"].${wt} {\n        display: none !important;\n        visibility: hidden !important;\n        opacity: 0 !important;\n      }\n      .${ft} {\n        appearance: none;\n        cursor: pointer;\n        position: absolute;\n        pointer-events: auto;\n        z-index: ${parseInt(q)+1};\n        ${"none"===K?"display: none;":""}\n        ${Z}: ${Q}px !important;\n        ${tt}: ${et}px !important;\n        width: ${dt}px;\n        height: ${st}px;\n        padding: 0px 0 0 0px;\n        background-color: ${lt};\n        ${it}\n        border-radius: ${ot};\n        font-size: 1.4em;\n        color: #444;\n        ${nt}\n      }\n      .${ht} {\n        position: absolute;\n        left: ${X?"6":"left"===K||"inner-left"===K?"2":"4"}px;\n        top: ${X?"6":"inner-left"===K?"3":"4"}px;\n        width: ${at}px;\n        height: ${rt}px;\n        opacity: 1;\n        text-align: center;\n        pointer-events: none;\n      }\n      .${ht}:before,\n      .${ht}:after {\n        position: absolute;\n        content: ' ';\n        height: ${at}px;\n        width: 2px;\n        background-color: #333;\n      }\n      .${ht}:before {\n        transform: rotate(45deg);\n      }\n      .${ht}:after {\n        transform: rotate(-45deg);\n      }\n    `;const vt=document.body;if(vt)vt.appendChild(H);else{const t=setInterval(()=>{document.body&&(document.body.appendChild(H),clearInterval(t))},50)}let bt=document.createElement("div");const Tt=`z-index:${q};`;c?c(bt,{id:mt,class:`opd_adsticky ${pt}`,style:Tt}):(bt.id=mt,bt.className=`opd_adsticky ${pt}`,bt.setAttribute("style",Tt));let St=document.createElement("span");St.setAttribute("class",`opd_adclose ${ht}`);let Ct=document.createElement("button");Ct.type="button";const At=X?"":`${"bottom"===R?"top":"bottom"}:${"inner-left"===K?"3":G}px!important;`;c?c(Ct,{class:`opd_adclosebox ${ft}`,style:At}):(Ct.className=`opd_adclosebox ${ft}`,At&&Ct.setAttribute("style",At));const kt=this,It=function(e){return e.preventDefault(),e.stopPropagation(),kt.closeStickyAd(t,g),!1};Ct.addEventListener("click",It,!1),Ct.addEventListener("mousedown",It,!1),Ct.addEventListener("touchstart",It,!1);let Pt=document.createElement("div");c?c(Pt,{id:N,class:t,style:"display: none;"}):(Pt.id=N,Pt.className=t,Pt.setAttribute("style","display: none;")),w||Pt.classList.add("optidigital-ad-center"),Ct.appendChild(St),"bottom"==R?(bt.appendChild(Ct),bt.appendChild(Pt)):(bt.appendChild(Pt),bt.appendChild(Ct)),0==j&&(this.setStickyAdStatus(t,"init"),l.push(t),g&&g({stickyAdStatus:"init"}));const _t=(null==v?void 0:v.stickyTarget)||"body",xt=document.querySelector(_t);if(xt)xt.appendChild(bt);else if(vt)vt.appendChild(bt);else{const t=setInterval(()=>{const e=document.querySelector(_t);e?(clearInterval(t),e.appendChild(bt)):document.body&&(clearInterval(t),document.body.appendChild(bt))},50)}if(!(null===(d=window.odT)||void 0===d?void 0:d._stickyScrollListenerAdded)){window.odT=window.odT||{},window.odT._stickyScrollListenerAdded=!0;let t=!1;const e=document.body,i=document.documentElement,o=t=>{let e=bt.getAttribute("style")||"";e.includes("display:")?e=e.replace("block"===t?"display: none;":"display: block;","block"===t?"display: block;":"display: none;"):e+="block"===t?"display: block;":"display: none;",c?c(bt,{id:mt,style:e}):(bt.id=mt,bt.setAttribute("style",e))};document.addEventListener("scroll",()=>{t||(t=!0,requestAnimationFrame(()=>{var n;const d=e.scrollTop||i.scrollTop,s=null===(n=window.odT)||void 0===n?void 0:n.stickyAdapter;if(!s)return void(t=!1);s.getAllStickyAdSlotNames().forEach(t=>{const e=s.getStickyAdTopTrigger(t)||0,i=s.getStickyAdMode(t),n=s.getStickyAdStatus(t);if(d>e&&("off"===n||"hidden"===n))if("hidden"===n)s.setStickyAdStatus(t,"rendered"),o("block");else{s.setStickyAdStatus(t,"init");const e=window.odT;(null==e?void 0:e.userAction)&&!e.userAction.length&&e.userAction.push("triggerSticky"),p&&p(t)}d<e&&"rendered"===n&&(s.setStickyAdStatus(t,"hidden"),o("none"));const a=s.getStickyAdAutoHidePx(t)||0;if("top"===i&&"rendered"===n&&a>0){const e=s.getStickyAdContainerId(t),i=document.getElementById(e);if(i){const e=`opd_adsticky-close opd_adsticky-close_${t.replace(b,"_")}`;d>a?i.classList.remove(e):u&&i.classList.add(e)}}}),t=!1}))},{passive:!0})}}getStickyAdConfigKey(t,e){for(const{slotName:i,config:o}of t)if(i===e||(null==o?void 0:o[`name${this.screen}`])===e)return i;return e}closeStickyAd(t,e){try{const i=this.getStickyAdContainerId(t),o=document.getElementById(i);if(o){const i=`opd_adsticky-close_${t.replace(/[^a-zA-Z0-9]/g,"_")}`;o.classList.add("opd_adsticky-close",i),this.setStickyAdStatus(t,"closed");const n=this.getStickyAdDivId(t);if(e){const t=window.odT;if(t&&t.stickyAdDivId===n){e({stickyAdStatus:"closed"});const t=document.getElementById("opd_bottomstickyad");t&&t.classList.add("opd_adsticky-close")}}}}catch(t){}}getStickyAdName(t,e){var i;const o=this.screen,n=this.setup,d=`name${o}`,s=`mode${o}`;if(null==t?void 0:t[d])return t[d];if(e)return e;const a=t||(null===(i=null==n?void 0:n.adSlotsConfig)||void 0===i?void 0:i.stickyAdConfiguration)||(null==n?void 0:n.stickyAdConfiguration);if(!a||"object"!=typeof a||Array.isArray(a))return;const r=a;if(r[d])return r[d];const l=Object.keys(r);if(l.some(t=>t.includes("_Sticky_"))&&!l.some(t=>t.includes(`${o}_Sticky_`)))return;const c={"sticky-top":"top","sticky-left":"left","sticky-right":"right"};let u="bottom";if(r.hasOwnProperty(s)){u=c[r[s]]||"bottom"}if(u){return{left:`${o}_Sticky_Left`,right:`${o}_Sticky_Right`,top:`${o}_Sticky_Top`,bottom:`${o}_Sticky_Bottom`}[u]}}getStickyAdContainerId(t){return t.toLowerCase().includes("bottom")?"opd_bottomstickyad":`opd_sticky_${t.replace(/[^a-zA-Z0-9]/g,"_")}`}getCookieName(t){return`opd_sticky_${t.replace(/[^a-zA-Z0-9]/g,"_")}`}updateStickyFrequency(t){const e=this.getStickyAdConfigurations(),i=this.getCookieName(t);let o=this.getStickyAdConfigurationBySlotName(t,e);if(!o)return;const n=Number(null==o?void 0:o.frequency)||0,d=Number(null==o?void 0:o.frequencyInterval),s=Number.isFinite(d)&&Number.isInteger(d)&&d>0,a=window.odT;if(n>0&&s&&(null==a?void 0:a.getCookie)&&(null==a?void 0:a.setCookie)){const t=a.getCookie(i),e=Number.parseInt(String(null!=t?t:""),10),o=(Number.isFinite(e)?e:0)+1;a.setCookie(i,o,d)}}getStickyAdModeFromConfig(t,e){if(e){const t=e.toLowerCase().split("_").pop();if(t&&["top","bottom","left","right"].includes(t))return t}if(t.hasOwnProperty(`mode${this.screen}`)){const e=t[`mode${this.screen}`];if("sticky-top"==e)return"top";if("sticky-left"==e)return"left";if("sticky-right"==e)return"right"}return"bottom"}isVerticalStickyAdSlot(t){const e=this.getStickyAdConfigurations();for(const{slotName:i,config:o}of e)if(i.toLowerCase()===t.toLowerCase()||(null==o?void 0:o[`name${this.screen}`])===t){const t=i.toLowerCase();return t.includes("sticky")&&(t.includes("left")||t.includes("right"))}const i=t.toLowerCase();return i.includes("sticky")&&(i.includes("left")||i.includes("right"))}isStickyAdSlot(t){return!!this.getStickyAdConfigurations().find(({slotName:e,config:i})=>e.toLowerCase()===t.toLowerCase()||(null==i?void 0:i[`name${this.screen}`])===t)}hasFallback(t){return!!this.getFallback(t)}getFallback(t){const e=this.getStickyAdConfigurations(),i=this.getStickyAdConfigurationBySlotName(t,e);return null==i?void 0:i.fallback}isFallback(t){const e=this.getStickyAdConfigurations(),i=this.getStickyAdConfigurationBySlotName(t,e);return!(!(null==i?void 0:i.hasOwnProperty("isFallback"))||!0!==i.isFallback)}isVerticalStickySlot(t){if(!this.isStickyAdSlot(t))return!1;return!!this.getStickyAdMode(t)&&this.isVerticalStickyAdSlot(t)}getLoadType(t){return t&&this.isVerticalStickyAdSlot(t)?9:5}getLoadTypes(){return[5,9]}getVerticalSizes(){return[["fluid"],[300,600],[300,350],[300,250],[336,280],[160,600],[120,600],[250,250],[200,200]]}getHorizontalSizes(){return"Mobile"===this.screen?[[320,50],[320,80],[320,100],[300,100],[300,50]]:[[1e3,90],[970,90],[728,90]]}filterVerticalSizes(t){return t.filter(t=>{if(!Array.isArray(t))return!1;if(1===t.length&&"fluid"===t[0])return!0;if(2!==t.length)return!1;const e=t[0],i=t[1];return"number"==typeof e&&"number"==typeof i&&i>e})}getStickyAdDivId(t){return this.stickyAdDivIds[t]}getStickyAdMode(t){return this.stickyAdModes[t]}getStickyAdStatus(t){return this.stickyAdStatuses[t]}getStickyAdTopTrigger(t){return this.stickyAdTopTriggers[t]}getStickyAdAutoHidePx(t){return this.stickyAdAutoHidePxValues[t]}getAllStickyAdSlotNames(){return Object.keys(this.stickyAdDivIds)}getStickyAdSlotNameFromDivId(t){for(const[e,i]of Object.entries(this.stickyAdDivIds))if(i===t)return e;return null}shouldRefreshStickyAd(t,e){if(!t)return!1;const i=this.getStickyAdContainerId(t),o=document.getElementById(i),n=`opd_adsticky-scroll_${t}`,d=`opd_adsticky-close_${t}`,s=e||!o||!o.classList.contains(n),a=!o||!o.classList.contains(d);return s&&a}setStickyAdDivId(t,e){this.stickyAdDivIds[t]=e}setStickyAdMode(t,e){this.stickyAdModes[t]=e}setStickyAdStatus(t,e){this.stickyAdStatuses[t]=e}setStickyAdTopTrigger(t,e){this.stickyAdTopTriggers[t]=e}setStickyAdAutoHidePx(t,e){this.stickyAdAutoHidePxValues[t]=e}setStickyAdState(t,e){this.setStickyAdDivId(t,e.divId),this.setStickyAdMode(t,e.mode),this.setStickyAdStatus(t,e.status),this.setStickyAdTopTrigger(t,e.topTrigger),this.setStickyAdAutoHidePx(t,e.autoHidePx)}addStickyAdSlots(t,e){var i;const o=this.screen,n=this.divIdPrefix,d=this.setup,s=`${o}_Sticky_`,a=`stickyAdTopTrigger${o}`,r=`stickyAdAutoHidePx${o}`,l=null===(i=null==d?void 0:d.adSlotsConfig)||void 0===i?void 0:i.adSlotsDefinitions,c=this.getStickyAdConfigurations().filter(({slotName:t})=>t.startsWith(s));0!==c.length&&c.forEach(({slotName:i,config:d})=>{const s=i,c=`${n}${s}`;if(!document.getElementById(c))return;const u=null==l?void 0:l.find(t=>t.name===s),{cdValue:p,adUnitPathSuffix:g,customKeyValues:w,outOfPage:f,adTemplate:h}=u||{},m=this.getStickyAdModeFromConfig(d),y=d[a]||0,v=d[r]||100;t[s]=Object.assign(Object.assign(Object.assign(Object.assign({name:s,adUnit:s,divId:c,loadType:this.getLoadType(s),lazyLoadPx:0,lazyLoadPxWithCore:900,dfpSizes:[],adTemplate:h||`${o}sticky`},p&&{cdValue:p}),g&&{customAdUnitCode:g}),w&&{customKeyValues:w}),f&&{outOfPage:f});const b={divId:c,mode:m,status:"off",topTrigger:y,autoHidePx:v};this.setStickyAdState(s,b),e.setStickyAdState(s,b)})}getStickyNames(){var t,e,i,o,n;const d=this.getStickyAdConfigurations();if(d.length>0)return d.map(({slotName:t,config:e})=>this.getStickyAdName(e,t)||t).filter(t=>t);{const d=(null===(i=null===(e=null===(t=window.odT)||void 0===t?void 0:t.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===i?void 0:i.stickyAdConfiguration)||(null===(n=null===(o=window.odT)||void 0===o?void 0:o.setup)||void 0===n?void 0:n.stickyAdConfiguration),s=(null==d?void 0:d[`name${this.screen}`])||this.getStickyAdName(d)||null;return s?[s]:[]}}}class l{constructor(t,e,i,d,s,l,c){this.interstitialAdapter=new o(t,e,i),this.sideRailsAdapter=new n(t,e,i),this.rewardedAdsAdapter=new a(t,e,i,d,s,l,c),this.stickyAdapter=new r(t,e,i)}addSpecialAdSlots(t,e){this.interstitialAdapter.addInterstitial(t),this.sideRailsAdapter.addSideRails(t),this.rewardedAdsAdapter.addRewardedAds(t),e&&this.stickyAdapter.addStickyAdSlots(t,e)}isSpecialAdSlot(t){return this.interstitialAdapter.isInterstitialSlot(t)||this.sideRailsAdapter.isSideRailSlot(t)||this.rewardedAdsAdapter.isRewardedAdSlot(t)}isSpecialAdLoadType(t){return t===this.interstitialAdapter.getLoadType()||t===this.sideRailsAdapter.getLoadType()||t===this.rewardedAdsAdapter.getLoadType()||this.stickyAdapter.getLoadTypes().includes(t)}getStickyAdapter(){return this.stickyAdapter}}var c=function(t,e,i,o){return new(i||(i=Promise))(function(n,d){function s(t){try{r(o.next(t))}catch(t){d(t)}}function a(t){try{r(o.throw(t))}catch(t){d(t)}}function r(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,a)}r((o=o.apply(t,e||[])).next())})};class u{constructor(t){var e,i,o,n,d,s,a,r,l,c,u;if(this.baseAutoInsertion={parentDiv:".od-ai-wrapper",divIdPrefix:"optidigital-adslot-",interval:300,previousType:"p",positionFirst:1,dontBreakWithPreviousType:["ul","ol"],keepTheDistancePx:100,keepDistanceFromTheBottom:100,intervalIncrement:300,recurrenceLevel:2,insertAdslotBeforeTarget:!1,insertAdslotIntoTarget:!1,debug:!1},this.autoInsertionDesktop=Object.assign(Object.assign({},this.baseAutoInsertion),{adSlots:this.generateAdSlots("Content_AI_",6)}),this.autoInsertionMobile=Object.assign(Object.assign({},this.baseAutoInsertion),{adSlots:this.generateAdSlots("Mobile_AI_",6)}),this.runImmediately=!0,this.scrollHandler=()=>{var t,e,i,o;((null===(i=null===(e=null===(t=window.odT.setup)||void 0===t?void 0:t.adSlotsConfig)||void 0===e?void 0:e.aiContent)||void 0===i?void 0:i[`enable${window.odT.screen}`])||(null===(o=window.odT)||void 0===o?void 0:o.forceAiContent))&&this.addAiArticle()},this.optidigitaltagsinserter=t,this.articleContentAdded=!1,this.articleHtmlFromApi={},this.articleContentAdded||!this.optidigitaltagsinserter||!(null===(o=null===(i=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===i?void 0:i.aiContent)||void 0===o?void 0:o[`enable${window.odT.screen}`])&&!(null===(n=window.odT)||void 0===n?void 0:n.forceAiContent))return;window.odT.analytics.setContentMetrics(!0);const p=null===(s=null===(d=window.odT.setup)||void 0===d?void 0:d.adSlotsConfig)||void 0===s?void 0:s.rewardedAdConfiguration,g=(null==p?void 0:p.articleContentSelector)||"article",w=document.querySelector(g);(null===(r=null===(a=window.odT.setup)||void 0===a?void 0:a.adSlotsConfig)||void 0===r?void 0:r.rewardedAdConfiguration)&&(null===(u=null===(c=null===(l=window.odT.setup)||void 0===l?void 0:l.adSlotsConfig)||void 0===c?void 0:c.rewardedAdConfiguration)||void 0===u?void 0:u.enableForArticles)&&window.odT.adAdaptersFactory.rewardedAdsAdapter.checkRewardedAdFrequency()&&w||(this.runImmediately=!1),this.runImmediately?this.scrollHandler():window.addEventListener("scroll",this.scrollHandler,{passive:!0})}generateAdSlots(t,e){return Array.from({length:e},(e,i)=>`${t}${i+1}`)}addAiArticle(){var t,e,i,o,n;window.odT.log("AI-Based Content: Trying to add AI article content"),window.removeEventListener("scroll",this.scrollHandler),this.articleContentAdded=!0;const d=(null===(i=null===(e=null===(t=window.odT.setup)||void 0===t?void 0:t.adSlotsConfig)||void 0===e?void 0:e.aiContent)||void 0===i?void 0:i.articleSelector)||(null===(n=null===(o=window.odT)||void 0===o?void 0:o.analytics)||void 0===n?void 0:n.articleSelector);window.odT.log(`AI-Based Content: Article container selector: ${d}`);document.querySelector(d)?this.checkAvailability().then(t=>{var e,i,o,n,s,a,r,l,c;if(t&&Object.keys(t).length>0||window.odT.forceAiContent){this.articleHtmlFromApi=t;const u=(null==t?void 0:t.title)||(null===(o=null===(i=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===i?void 0:i.aiContent)||void 0===o?void 0:o.articleTitle)||"",p=(null==t?void 0:t.subtitle)||(null===(a=null===(s=null===(n=window.odT.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===s?void 0:s.aiContent)||void 0===a?void 0:a.articleHeader)||"AI-assisted contextual content, generated to enrich your reading.",g=(null==t?void 0:t.content)||(window.odT.forceAiContent?"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pulvinar sapien nibh. Sed metus metus, gravida nec ultricies eget, venenatis ut nisl. Maecenas varius, sem ut dignissim hendrerit, sapien erat consectetur nisi, quis blandit sem libero quis tortor. Curabitur rhoncus viverra bibendum.</p><p>Nunc aliquet at magna et luctus. Ut suscipit elementum eleifend. Integer vehicula purus et enim sodales, vitae malesuada neque sagittis. Aliquam tempus, purus eget posuere mattis, quam justo consequat nibh, volutpat ultricies nunc libero non orci. Aenean tincidunt porttitor ultrices. Donec ullamcorper eu libero eget finibus.</p><p>In id enim id sem venenatis dictum non nec dolor. Donec tincidunt feugiat leo, eget volutpat lectus tincidunt at. Ut sodales ante quis est euismod, sed sollicitudin metus fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris malesuada tincidunt convallis. Pellentesque vel velit a ante cursus sollicitudin at sit amet purus. Ut in dolor blandit, venenatis sapien nec, porta nunc.</p><p>Etiam sit amet mauris a neque feugiat fringilla nec sed ligula. Sed pulvinar dui nec lectus venenatis egestas. In orci quam, consequat quis leo eget, ultricies convallis arcu. Nulla accumsan lobortis lorem, a placerat risus porta et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed eros diam. Etiam accumsan neque turpis. Mauris congue vulputate purus, et tempus nunc cursus non. Quisque tempor ex sem.</p><p>Phasellus finibus, magna at tincidunt feugiat, erat risus luctus purus, nec facilisis lectus augue non est. Integer sit amet tortor nec sapien tincidunt malesuada. Vivamus vel odio ut erat luctus posuere.</p><p>Sed at mauris vel lorem tincidunt ultrices. Fusce sit amet turpis vitae nulla pharetra luctus. Donec ut lorem nec justo viverra gravida sit amet sed erat.</p>":""),w=(null==t?void 0:t.icon)||(null===(c=null===(l=null===(r=window.odT.setup)||void 0===r?void 0:r.adSlotsConfig)||void 0===l?void 0:l.aiContent)||void 0===c?void 0:c.articleIcon)||"",f=`\n            <div class="od-ai-header">\n            ${w?`<div class="od-ai-icon">${w}</div>`:""}\n            <div class="od-ai-titles">\n            ${u?`<h3 class="od-ai-title">${u}</h3>`:""}\n            ${p?`<p class="od-ai-subtitle">${p}</p>`:""}\n            </div>\n            </div>\n            ${g}\n          `||"";this.appendMatchingParagraph(d,f);const h=this.getAutoInsertionConfig();h?this.optidigitaltagsinserter.insertInRead(h):window.odT.log("AI-Based Content: No auto-insertion config available.")}}).catch(t=>{}):window.odT.log(`AI-Based Content: Container not found: ${d}`)}getAutoInsertionConfig(){var t,e,i;const o=`autoInsertion${window.odT.screen}`,n="Desktop"===window.odT.screen?this.autoInsertionDesktop:this.autoInsertionMobile,d=null===(i=null===(e=null===(t=window.odT.setup)||void 0===t?void 0:t.adSlotsConfig)||void 0===e?void 0:e.aiContent)||void 0===i?void 0:i[o];return d?Object.assign(Object.assign({},n),d):n}checkAvailability(){return c(this,void 0,void 0,function*(){var t,e,i;let o="https://scripts.opti-digital.com/content/";const n=window.location.hostname,d=window.location.pathname,s=null===(i=null===(e=null===(t=window.odT.setup)||void 0===t?void 0:t.info)||void 0===e?void 0:e.publisherId)||void 0===i?void 0:i.toString(),a=`${s}${n}${d}`;o=`${o}${yield this.sha256(a)}.json?domain=${n}&pubid=${s}`;try{const t=yield fetch(o,{method:"GET"});if(!t.ok)return{};const e=yield t.json();return(null==e?void 0:e.enrichment)||{}}catch(t){return{}}})}sha256(t){return c(this,void 0,void 0,function*(){const e=(new TextEncoder).encode(t),i=yield crypto.subtle.digest("SHA-256",e),o=new Uint8Array(i);let n="";for(let t=0;t<o.length;t++){n+=o[t].toString(16).padStart(2,"0")}return n})}appendMatchingParagraph(t,e,i){var o,n,d,s,a,r,l;const c=document.querySelector(t);if(!c)return void window.odT.log(`AI-Based Content: Container not found: ${t}`);let u=document.createElement("style");let p=`\n      .od-ai-wrapper { min-height: ${"Desktop"===window.odT.screen?"700px":"800px"}; ${"Desktop"===window.odT.screen?"background-color: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 rgb(255 255 255 / 0.18), inset 0 0 0 rgb(0 0 0 / 0.18), 0 4px 12px rgb(0 0 0 / 0.28); border-radius: 8px; padding: 10px;":""};}\n      .od-ai-wrapper .od-ai-title { font-size: 1.1em !important; font-weight: bold !important; margin: 0 !important; padding: 0 !important; }\n      .od-ai-wrapper .od-ai-subtitle { font-style: italic; font-size: 0.85em; margin: 0; padding: 0; }\n      .od-ai-wrapper > h2 { margin: 30px 0 10px 0 !important; padding: 0; font-weight: bold; font-size: 1em; }\n      .od-ai-wrapper > p { margin-top: 10px !important; font-weight: normal !important; }\n      .od-ai-wrapper > h3 { margin: 30px 0 10px 0 !important; padding: 0; font-weight: bold; font-size: 1em; }\n      .od-ai-wrapper > h3 + p, .od-ai-wrapper > h2 + p { margin-top: 0 !important; }\n      .od-ai-header { display: flex; ${"Desktop"===window.odT.screen?"align-items: center; gap: 15px":"align-items: flex-start; gap: 5px; flex-direction: column"}; margin: 15px 0 0 0;}\n      .od-ai-icon { line-height: 1; }\n      .od-ai-icon svg { height: 45px; width: 45px; }\n      .od-ai-footer { display: flex; gap: 8px; align-items: center; margin: 20px 0 0 0; justify-content: space-between; padding: 0; }\n      .od-ai-vote { display: flex; gap: 8px; } \n      .od-ai-vote button { background: transparent; border: 1px solid rgba(0,0,0,0.15); border-radius: 6px; padding: 6px; cursor: pointer; line-height: 0; min-width: 30px; }\n      .od-ai-vote button:hover { background: rgba(0,0,0,0.05); }\n      .od-ai-vote svg { width: 16px; height: 16px; fill: currentColor; }\n      .od-ai-vote .od-voted { opacity: 0.6; pointer-events: none; }\n      .od-ai-footer-text { font-size: ${"Desktop"===window.odT.screen?"14px":"11px"} !important; font-style: italic; margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }\n    `;u.appendChild(document.createTextNode(p)),document.getElementsByTagName("head")[0].appendChild(u);const g=this.getMostCommonParagraphWrapper(c),w=(null===(d=null===(n=null===(o=window.odT)||void 0===o?void 0:o.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===d?void 0:d.aiContent)||{},f="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=(void 0===w.typingEffect||!0===w.typingEffect||(null===(s=window.odT)||void 0===s?void 0:s.forceAiContent))&&!f&&!this.runImmediately;if(g){const{wrapper:t,originalP:o}=g,n=this.getPathIndices(t,o);let d=t.cloneNode(!0);const s=this.isolatePathInClone(d,n);if(s){const t=document.createElement("div");t.classList.add("od-ai-wrapper"),s===d?d=t:s.replaceWith(t),this.stripIdsRecursively(d);const o=c.children,n=null===(l=null===(r=null===(a=window.odT.setup)||void 0===a?void 0:a.adSlotsConfig)||void 0===r?void 0:r.aiContent)||void 0===l?void 0:l.insertBeforeLast;if(n&&"number"==typeof n&&o.length-n>0){const t=o[o.length-n];c.insertBefore(d,t)}else c.appendChild(d);return void(h?this.startTypewriterWhenInView(t,e,()=>{this.appendVoteControls(t),window.odT.log("AI-Based Content: AI content appended with nested structure."),i&&i()}):(t.innerHTML=e,this.appendVoteControls(t),window.odT.log("AI-Based Content: AI content appended"),i&&i()))}}const m=document.createElement("div");m.classList.add("od-ai-wrapper"),c.appendChild(m),h?this.startTypewriterWhenInView(m,e,()=>{this.appendVoteControls(m),window.odT.log("AI-Based Content: AI content using fallback structure."),i&&i()}):(m.innerHTML=e,this.appendVoteControls(m),window.odT.log("AI-Based Content: AI content appended immediately"),i&&i())}getPathIndices(t,e){const i=[];let o=e;for(;o&&o!==t;){const t=o.parentElement;if(!t)break;const e=Array.from(t.children).indexOf(o);if(-1===e)break;i.unshift(e),o=t}return i}isolatePathInClone(t,e){let i=t;for(const t of e){const e=Array.from(i.children);if(!e[t])return null;const o=e[t];for(const t of e)t!==o&&i.removeChild(t);i=o}return i}getMostCommonParagraphWrapper(t){const e=Array.from(t.querySelectorAll("p")).filter(e=>this.isEligibleParagraph(e,t));if(0===e.length)return null;const i=new Map;for(const o of e){const e=this.topLevelWrapperOf(o,t);if(!e)continue;const n=this.structureSignature(e,o),d=i.get(n);d?d.count+=1:i.set(n,{count:1,sampleWrapper:e,sampleP:o})}let o=null;for(const t of i.values())(!o||t.count>o.count)&&(o=t);return o?{wrapper:o.sampleWrapper,originalP:o.sampleP}:null}isEligibleParagraph(t,e){if(!e.contains(t))return!1;if((t.textContent||"").trim().length<40)return!1;const i=new Set(["ASIDE","NAV","FOOTER","HEADER","FIGURE","FIGCAPTION","PRE","CODE","LI","UL","OL","TABLE","THEAD","TBODY","TH","TD","BLOCKQUOTE"]);let o=t;for(;o&&o!==e;){if(i.has(o.tagName))return!1;o=o.parentElement}if(null===t.offsetParent)return!1;const n=window.getComputedStyle(t);if("none"===n.display||"hidden"===n.visibility)return!1;return 0!==t.getClientRects().length}topLevelWrapperOf(t,e){let i=t;for(;i&&i.parentElement&&i.parentElement!==e;)i=i.parentElement;return i&&i.parentElement===e?i:null}structureSignature(t,e){const i=Array.from(t.classList).sort().join(".");return`${`${t.tagName.toLowerCase()}.${i}`}|depth:${this.depthBetween(e,t)}|children:${t.children?t.children.length:0}`}depthBetween(t,e){let i=0,o=t;for(;o&&o!==e;)o=o.parentElement,i+=1;return i}stripIdsRecursively(t){t.hasAttribute&&t.hasAttribute("id")&&t.removeAttribute("id");const e=t.children||[];for(let t=0;t<e.length;t++){const i=e[t];this.stripIdsRecursively(i)}}startTypewriterWhenInView(t,e,i){try{const o=this.setupTypewriter(t,e);if(!o)return void(i&&i());const{tasks:n,speedMs:d,chunkSize:s}=o;if(!n||0===n.length)return void(i&&i());if("function"==typeof window.IntersectionObserver){new IntersectionObserver((t,e)=>{for(const o of t)if(o.isIntersecting){e.disconnect(),this.runTyping(n,d,s).then(()=>{i&&i()});break}},{threshold:.1}).observe(t)}else this.runTyping(n,d,s).then(()=>{i&&i()})}catch(o){t.innerHTML=e,i&&i()}}setupTypewriter(t,e){var i,o,n,d,s;const a=(null===(n=null===(o=null===(i=window.odT)||void 0===i?void 0:i.setup)||void 0===o?void 0:o.adSlotsConfig)||void 0===n?void 0:n.aiContent)||{},r=a.typewriter||{},l="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,c=(void 0===a.typingEffect||!0===a.typingEffect||(null===(d=window.odT)||void 0===d?void 0:d.forceAiContent))&&!l&&!this.runImmediately,u=Number(r.speedMs)>0?Number(r.speedMs):15,p=Math.max(1,Number(r.chunkSize)||1),g=Math.max(0,Number(null!==(s=r.immediateParagraphs)&&void 0!==s?s:2));if(!c)return t.innerHTML=e,null;const w=document.createElement("template");w.innerHTML=e;const f=[],h=new Set;try{const t=Array.from(w.content.querySelectorAll("p")),e=Array.from(w.content.childNodes).filter(t=>t.nodeType===Node.ELEMENT_NODE)[1];!e||"H2"!==e.tagName&&"H3"!==e.tagName||h.add(e);const i=w.content.querySelector(".od-ai-header h3");i&&h.add(i);for(let e=0;e<Math.min(g,t.length);e++)h.add(t[e])}catch(t){}const m=t=>{for(const e of h)if(e.contains(t))return!0;return!1},y=(t,e,i)=>{if(t.nodeType===Node.TEXT_NODE){const o=t.textContent||"";if(e)return document.createTextNode(o);{const t=document.createTextNode("");return f.push({node:t,text:o,written:0,paragraph:i}),t}}if(t.nodeType===Node.ELEMENT_NODE){const o=t.cloneNode(!1),n=Array.from(t.childNodes);for(const t of n){const n=e||m(t),d=i||("P"===o.tagName?o:null),s=y(t,n,d);o.appendChild(s)}return o}return document.createDocumentFragment()},v=document.createDocumentFragment();return Array.from(w.content.childNodes).forEach(t=>{v.appendChild(y(t,m(t),null))}),t.innerHTML="",t.appendChild(v),{tasks:f,speedMs:u,chunkSize:p}}runTyping(t,e,i){var o,n,d;const s=null===(o=this.getAutoInsertionConfig)||void 0===o?void 0:o.call(this),a=Number(null!==(n=null==s?void 0:s.interval)&&void 0!==n?n:0),r=Number(null!==(d=null==s?void 0:s.intervalIncrement)&&void 0!==d?d:0),l=new Map,c=new Set;for(const e of t)e.paragraph&&l.set(e.paragraph,(l.get(e.paragraph)||0)+1);const u=l.size;let p=0,g=0,w=0,f=Math.max(0,a);const h=t=>{if(c.size>=u)return;const e=this.measureElementHeight(t);if(w+=e,w>=f){const e=document.createElement("div"),i=Array.isArray(null==s?void 0:s.adSlots)?s.adSlots:null;let o;if(i&&g+1<i.length)o=i[g+1];else{o=`${"Desktop"===window.odT.screen?"Content_":"Mobile_"}AI_${g+2}`}e.className=o,e.style.display="none",t.insertAdjacentElement("afterend",e),g++,w=0,f=Math.max(0,a+g*r)}};return new Promise(o=>{const n=()=>{const d=t[p];if(!d)return void o();const s=Math.min(d.text.length,d.written+i);if(d.node.textContent=d.text.slice(0,s),d.written=s,d.written===d.text.length){if(d.paragraph){const t=(l.get(d.paragraph)||0)-1;l.set(d.paragraph,t),0!==t||c.has(d.paragraph)||(c.add(d.paragraph),h(d.paragraph))}p++}(null==d?void 0:d.paragraph)?setTimeout(n,e):n()};n()})}appendVoteControls(t){var e,i,o,n,d,s;try{if(!(t&&t instanceof HTMLElement))return;if(t.querySelector(".od-ai-footer"))return;const a=document.createElement("div");a.className="od-ai-footer";const r=document.createElement("div");r.className="od-ai-vote";const l=document.createElement("button");l.type="button",l.title="Helpful",l.setAttribute("aria-label","Vote helpful"),l.innerHTML='<svg fill="#000000" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"/></svg>';const u=document.createElement("button");u.type="button",u.title="Not helpful",u.setAttribute("aria-label","Vote not helpful"),u.innerHTML='<svg fill="#000000" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"/></svg>';const p=()=>{l.classList.add("od-voted"),u.classList.add("od-voted")};l.addEventListener("click",()=>c(this,void 0,void 0,function*(){p(),yield this.sendVote("up")})),u.addEventListener("click",()=>c(this,void 0,void 0,function*(){p(),yield this.sendVote("down")}));const g=document.createElement("p");g.className="od-ai-footer-text",g.textContent=(null===(i=null===(e=this.articleHtmlFromApi)||void 0===e?void 0:e.footer)||void 0===i?void 0:i.toString())||(null===(s=null===(d=null===(n=null===(o=window.odT)||void 0===o?void 0:o.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===d?void 0:d.aiContent)||void 0===s?void 0:s.articleFooter)||"This content was generated using AI and reviewed according to publisher guidelines.",r.appendChild(l),r.appendChild(u),a.appendChild(r),a.appendChild(g),t.appendChild(a)}catch(t){}}sendVote(t){return c(this,void 0,void 0,function*(){var e,i;try{null===(i=null===(e=window.odT)||void 0===e?void 0:e.log)||void 0===i||i.call(e,`AI-Based Content: Vote (${t}) skipped, no endpoint.`)}catch(t){}})}measureElementHeight(t){var e;try{if(!t)return 0;const i=null===(e=t.getBoundingClientRect)||void 0===e?void 0:e.call(t);let o=i?i.height:0;return(!o||o<1)&&(o=t.offsetHeight||0),Math.max(0,Math.round(o))}catch(t){return 0}}}class p{constructor(t,e){this.POTENTIAL_BIDDERS=[],this.APPROVED_BIDDERS=[],this.ENDPOINT="https://pbs.optidigital.com/cookie_sync",this.PURPOSE_FOR_COOKIE_DROPPING=1,this.OPTIDIGITAL_ID=915,this.biddersCount=0,this.biddersDone=0,this.MAX_SYNC_COUNT=0,this.vendorsList=[{id:32,name:"appnexus"},{id:76,name:"pubmatic"},{id:52,name:"rubicon"},{id:45,name:"smartadserver"},{id:28,name:"triplelift"},{id:241,name:"onetag"},{id:91,name:"criteo"},{id:259,name:"adyoulike"},{id:61,name:"gumgum"},{id:1043,name:"rise"},{id:164,name:"outbrain"},{id:10,name:"ix"},{id:253,name:"improvedigital"},{id:687,name:"missena"},{id:658,name:"bliink"},{id:628,name:"tappx"},{id:31,name:"ogury"},{id:36,name:"unruly"},{id:58,name:"33across"},{id:21,name:"thetradedesk"},{id:333,name:"inmobi"},{id:1028,name:"sparteo"},{id:639,name:"smilewanted"},{id:972,name:"kargo"},{id:69,name:"openx"}],this.getStringifiedData=()=>{var t,e;const i={bidders:this.APPROVED_BIDDERS};return this.MAX_SYNC_COUNT&&(i.limit=this.MAX_SYNC_COUNT),window.optidigitalToolboxGdpr&&(i.gdpr=1),(null===(e=null===(t=window.odT)||void 0===t?void 0:t.consentV2TCData)||void 0===e?void 0:e.tcString)&&(i.gdpr_consent=window.odT.consentV2TCData.tcString),JSON.stringify(i)},this.ajax=(t,e,i,o={})=>{try{window.odT.log("Cookie sync request"),window.postMessage({preSync:{status:"loaded"}},"*");const n=3e3;let d;const s=o.method||(i?"POST":"GET");let a="object"==typeof e?e:{success:e,error:function(t){}};d=new window.XMLHttpRequest,d.onreadystatechange=function(){if(4===d.readyState){const t=d.status;t>=200&&t<300||304===t?(window.odT.log("Cookie sync response success"),a.success(d.responseText,d)):a.error(d.statusText,d)}},d.open(s,t),d.timeout=n,o.withCredentials&&(d.withCredentials=!0),o.preflight&&d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.setRequestHeader("Content-Type",o.contentType||"text/plain"),"POST"===s&&i?d.send(i):d.send()}catch(t){}},this.isValidUrl=t=>new RegExp(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i).test(t),this.insertElement=(t,e,i)=>{let o;e=e||document,o=i?e.getElementsByTagName(i):e.getElementsByTagName("head");try{let i=o.length?o[0]:e.getElementsByTagName("body")[0];i&&i.insertBefore(t,i.firstChild)}catch(t){}},this.getEmptyIframe=(t,e)=>{let i=document.createElement("iframe");return i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),i.setAttribute("marginheight","0"),i.setAttribute("marginwidth","0"),i.setAttribute("TOPMARGIN","0"),i.setAttribute("LEFTMARGIN","0"),i.setAttribute("allowtransparency","true"),i.setAttribute("width",String(e)),i.setAttribute("height",String(t)),i.style.setProperty("height","0","important"),i.style.setProperty("width","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("display","block","important"),i},this.triggerDone=()=>{this.biddersDone++,this.biddersDone===this.biddersCount&&(window.odT.cookieSyncReady=!0,window.odT.log("Cookie sync complete"),window.postMessage({preSync:{status:"complete"}},"*"))},this.triggerPixel=(t,e)=>{const i=new Image;i.addEventListener("load",e),i.addEventListener("error",e),i.src=t},this.triggerIframeLoad=(t,e,i)=>{if(!t)return;let o=this.getEmptyIframe(0,0);o.id=`sync_${e}_${Date.now()}`,o.src=t,o.onload=i,this.insertElement(o,document,"html")},this.doBidderSync=(t,e,i,o)=>{e&&this.isValidUrl(e)?"image"===t||"redirect"===t?this.triggerPixel(e,o):"iframe"===t?this.triggerIframeLoad(e,i,o):o():o()},this.doAllSyncs=t=>{0!==t.length?(this.biddersCount=t.length,t.forEach(t=>{t.no_cookie&&this.doBidderSync(t.usersync.type,t.usersync.url,t.bidder,this.triggerDone)})):window.odT.cookieSyncReady=!0},this.process=t=>{const e=JSON.parse(t);"ok"!==e.status&&"no_cookie"!==e.status||e.bidder_status&&this.doAllSyncs(e.bidder_status)},this.run=()=>{var t,e,i,o;if(window.optidigitalToolboxGdpr){if((null===(o=null===(i=null===(e=null===(t=window.odT)||void 0===t?void 0:t.consentV2TCData)||void 0===e?void 0:e.purpose)||void 0===i?void 0:i.consents)||void 0===o?void 0:o[this.PURPOSE_FOR_COOKIE_DROPPING])&&window.odT.checkVendor(this.OPTIDIGITAL_ID)&&"Safari"!==window.odT.checkBrowser&&this.POTENTIAL_BIDDERS){const t=new Map(this.vendorsList.map(t=>[t.name,t]));this.POTENTIAL_BIDDERS.forEach(e=>{const i=t.get(e);i&&window.odT.checkVendor(i.id)&&!this.APPROVED_BIDDERS.includes(e)&&this.APPROVED_BIDDERS.push(e)}),this.APPROVED_BIDDERS.length&&this.ajax(this.ENDPOINT,this.process,this.getStringifiedData(),{withCredentials:!0})}}else"Safari"!==window.odT.checkBrowser&&this.POTENTIAL_BIDDERS&&(this.APPROVED_BIDDERS.push(...this.POTENTIAL_BIDDERS),this.ajax(this.ENDPOINT,this.process,this.getStringifiedData(),{withCredentials:!0}))},t&&(this.POTENTIAL_BIDDERS=this.sanitizeBidders(t)||[]),e&&(this.MAX_SYNC_COUNT=e),this.run()}sanitizeBidders(t){if(t){const e=t.split(",").filter(function(t){return!!t});if(e.length>0)return e}}}class g{constructor(t,e){var i;this.liveAnalyticsSampling=25,this.liveAnalyticsRand=0,this.isFirstAd=!0,this.articleSelector=null,this.pageViewCalls=0,this.liveAnalyticsId=null,this.pageViewPayload={},this.tagMode=!1,this.performances={scriptLoadingTime:0,adFirstRenderTime:0,fcp:0,tbt:0,ttfb:0,height:null,words:null,paragraphs:null,adDensity:null,isPerformances:!0},this.userPerformances={cls:null,fid:null,inp:null,lcp:0,isUserPerformances:!0},this.inpEventCount=0,this.enablePerformances=!0,this.isFirstCLSTrigerred=!0,this.userPerformanceSent=!1,this.adRequestStats=!0,this.widthBreakpoint=document.documentElement.clientWidth,this.checkBrowser=null,this.checkOs=null,this.deviceCategory={},this.debugAnalytics=!1,this.adSlotsLoadCount={},this.adSlotsLoadTime={},this.auctionBids={},this.auctionFailsafe={},this.auctionMetrics={},this.adslotsNumber=null,this.adUnitPath=null,this.gamSlots=[],this.gamSlotsIds=[],this.tools=s,this.log=this.tools.log,this.analyticsLog=this.tools.analyticsLog,this.checkBrowser=this.tools.detectBrowser(),this.checkOs=this.tools.detectOS(),this.deviceCategory=this.tools.deviceDetection(),this.log("Init Analytics Module"),this.setLiveAnalyticsSampling(t,e),this.setLiveAnalyticsRand(),this.isAdDensityEnabled=null===(i=t.enableAdDensity)||void 0===i||i,this.contentSelectors=t.contentSelectors||g.DEFAULT_CONTENT_SELECTORS,this.wordsHTMLTag=g.DEFAULT_WORDS_HTML_TAG,this.excludeTags=g.DEFAULT_EXCLUDE_TAGS,this.excludePatterns=t.excludePatterns||g.DEFAULT_EXCLUDE_PATTERNS,this.excludeLengthPatterns=g.DEFAULT_EXCLUDE_LENGTH_PATTERNS,this.minWords=g.MIN_WORDS,this.minSurface=g.MIN_SURFACE,this.minRatioWords=g.MIN_RATIO_WORDS,this.childRatio=g.CHILD_RATIO,this.setup=t,window!==window.top&&(this.tagMode=!0);const o=window.location.search;t.hasOwnProperty("adRequestStats")&&!1===t.adRequestStats&&(this.adRequestStats=!1),t.hasOwnProperty("enablePerformances")&&!1===t.enablePerformances&&(this.enablePerformances=t.enablePerformances),(o.includes("optidigital_debug_analytics=true")||!0===window.optidigital_debug_analytics)&&(this.debugAnalytics=!0)}findMainContent(){try{const t=document.querySelectorAll("article, section, div, main");let e=null,i=0;const o=document.body.innerText.trim().split(/\s+/).length;return t.forEach(t=>{let n=1;const d=this.countWords(t),s=this.getElSurface(t);if(s<this.minSurface)return;if(d<this.minWords)return;if(d/o<this.minRatioWords)return;this.containsExcludedTag(t)&&(n=1e4,this.analyticsLog("[findMainContent] Element ratio modified due to excluded tag",t)),this.containsExcludedElement(t)&&(n=1e5,this.analyticsLog("[findMainContent] Element ratio modified due to excluded pattern",t));let a=this.getScore(d,s);this.analyticsLog(`[findMainContent] MainContent candidate: tag=${t.tagName}, wordCount=${d}, surface=${s}, score=${a}`,t);let r=!1;t.querySelectorAll("article, section, div, main").forEach(e=>{if(e!==t&&this.countWords(e)>this.minWords&&this.getElSurface(e)>this.minSurface){const t=this.getScore(this.countWords(e),this.getElSurface(e));t/a>this.childRatio&&(this.analyticsLog(`[findMainContent] Child score (${t}) and element score (${a}) have a ratio (${t/a}) higher than allowed ratio (${this.childRatio})`,e),r=!0)}}),r?this.analyticsLog(`[findMainContent] Skipped because a child dominates: ${t.tagName}`):(a/=n,this.analyticsLog(`[findMainContent] MainContent candidate after updated score : tag=${t.tagName}, coefExclude=${n}, score=${a}`,t),a>i&&(i=a,e=t))}),e?(this.debugAnalytics&&(this.analyticsLog("[findMainContent] Best Element IS",e),e.style.border="3px solid red"),this.checkIfHiddenArticle(e)?(this.analyticsLog("[findMainContent] Best element has a computed height and hidden overflow"),null):e):null}catch(t){return this.analyticsLog(`[findMainContent] Error in findMainContent: ${t}`),null}}getElSurface(t){const e=t.getBoundingClientRect();return e.width*e.height}getScore(t,e){return t/Math.log(e)}containsExcludedElement(t){const e=t=>{const e=t.className+" "+t.id;return this.excludePatterns.some(t=>t.test(e))};if(e(t))return!0;let i=t.parentElement;for(;i;){if(e(i))return!0;i=i.parentElement}const o=t.querySelectorAll("*");for(const t of o)if(e(t))return!0;return!1}containsExcludedTag(t){let e=t.parentElement;for(;e;){if(this.excludeTags.includes(e.tagName.toLowerCase()))return!0;e=e.parentElement}return t.querySelectorAll(this.excludeTags.join(",")).length>0}checkIfHiddenArticle(t){const e=window.getComputedStyle(t,null),i=""!=t.style.height,o="hidden"===e.overflow;return i&&o}setLiveAnalyticsSampling(t,e){var i;this.liveAnalyticsSampling=e?100:null!==(i=null==t?void 0:t.liveAnalyticsSampling)&&void 0!==i?i:25}setLiveAnalyticsRand(){this.liveAnalyticsRand||(this.liveAnalyticsRand=Math.floor(100*Math.random()))}isSamplingCase(){return Boolean(this.liveAnalyticsSampling&&this.liveAnalyticsRand<this.liveAnalyticsSampling)}getConsentObject(){return window.odT||window.odConsent||{}}sendAnalyticsRequest(t,e="https://analytics.optidigital.com/adrequest",i=!1){const o=JSON.stringify(t);i?navigator.sendBeacon(e,o):fetch(e,{method:"POST",body:o})}countWords(t){let e=t.innerHTML.replace(/<script[^>]*>[\s\S]*?<\/script>/gi," ").replace(/<style[^>]*>[\s\S]*?<\/style>/gi," ").replace(/<a[^>]*>[\s\S]*?<\/a>/gi," ");e=e.replace(/<div[^>]*style="display: none;"[^>]*>[\s\S]*?<\/div>/gi," ");let i=e.replace(/<[^>]*>/g," ").replace(/[.,;:!?()]/g," ").replace(/\s+/g," ").trim().split(" ").filter(t=>t.length>0).length;return i||0}calculateAdDensity(t,e){if(0===t||0===e||!1===this.isAdDensityEnabled)return 0;return Math.min(1,Math.round(t/e*100)/100)}getPageHeight(){const{body:t,documentElement:e}=document;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}countWordsInElements(t){return Array.from(t).reduce((t,e)=>t+this.countWords(e),0)}createPerformanceObserver(t,e){PerformanceObserver.supportedEntryTypes.includes(t)&&new PerformanceObserver((i,o)=>{for(const n of i.getEntriesByType(t))e(n,o)}).observe({type:t,buffered:!0})}logPerformanceMetric(t,e){this.analyticsLog(`${t} captured: ${e||0}`)}registerPerformanceObserver(){if(this.enablePerformances&&this.isSamplingCase()&&"Chrome"===this.checkBrowser)try{this.createPerformanceObserver("paint",this.handlePaintEntry.bind(this)),this.createPerformanceObserver("largest-contentful-paint",this.handleLCPEntry.bind(this)),this.createPerformanceObserver("longtask",this.handleLongTaskEntry.bind(this)),this.createPerformanceObserver("event",this.handleEventEntry.bind(this)),this.createPerformanceObserver("layout-shift",this.handleCLSEntry.bind(this)),this.createPerformanceObserver("first-input",this.handleFIDEntry.bind(this)),this.createPerformanceObserver("navigation",this.handleNavigationEntry.bind(this))}catch(t){}}handlePaintEntry(t,e){"first-contentful-paint"===t.name&&(this.performances.fcp=Math.round(t.startTime),this.logPerformanceMetric("FCP",this.performances.fcp),e.disconnect())}handleLCPEntry(t){this.userPerformances.lcp=Math.round(t.startTime),this.logPerformanceMetric("LCP",this.userPerformances.lcp)}handleCLSEntry(t){!t.hadRecentInput&&t.value&&t.value>0&&(this.userPerformances.cls||(this.userPerformances.cls=0),this.userPerformances.cls+=Math.round(1e3*t.value)/1e3,this.logPerformanceMetric("CLS",this.userPerformances.cls))}handleFIDEntry(t,e){t.processingStart&&t.processingStart>t.startTime&&(this.userPerformances.fid=Math.round(t.processingStart-t.startTime),this.logPerformanceMetric("FID",this.userPerformances.fid),e.disconnect())}handleNavigationEntry(t,e){t.responseStart&&(this.performances.ttfb=Math.round(t.responseStart),this.logPerformanceMetric("TTFB",this.performances.ttfb),e.disconnect())}handleLongTaskEntry(t,e){if(t.duration>=50){const i=Math.round(t.duration-50);this.performances.tbt+=i,this.logPerformanceMetric("TBT",i),e.disconnect()}}handleEventEntry(t,e){if(this.inpEventCount>=50)return this.isSamplingCase()&&"Chrome"===this.checkBrowser&&!this.userPerformanceSent&&this.pageViewEvent({isUserPerformanceCall:!0,userAction:"ko"!==this.getConsentObject().consentType&&this.getConsentObject().consentCMPUIShown}),void e.disconnect();this.userPerformances.inp||(this.userPerformances.inp=0),t.duration>this.userPerformances.inp&&(this.userPerformances.inp=Math.round(t.duration),this.logPerformanceMetric("INP",this.userPerformances.inp)),this.inpEventCount++}getElementsInContext(t,e="*"){const i=[],o=e=>{for(const n of Array.from(e))n instanceof HTMLElement&&(t&&!(null==n?void 0:n.matches(t))||i.push(n),n.shadowRoot&&o(Array.from(n.shadowRoot.querySelectorAll("*"))))};return o(Array.from(document.querySelectorAll(e))),i}isAdDiv(t){var e;return"true"===t.getAttribute("data-optidigital-slot")||(null===(e=this.gamSlotsIds)||void 0===e?void 0:e.includes(t.id))||!1}collectDivElements(t="*"){return this.getElementsInContext("div",t)}extractContentMetrics(t){try{if("string"==typeof t)return this.getContentMetricsFromMainContent(t);if(t instanceof HTMLElement){const e=[t];let i=!1;const o=Array.from(t.querySelectorAll("div")).filter(t=>this.isAdDiv(t)).map(t=>{try{const e=t.getBoundingClientRect();return e.width*e.height<=1&&t.parentElement&&this.gamSlotsIds.length?t.parentElement:t}catch(e){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for ad div: ${e}`),t}}).filter(t=>{try{const e=t.getBoundingClientRect();return e.width*e.height>1}catch(t){return this.analyticsLog(`[extractContentMetrics] Error filtering by dimensions: ${t}`),!1}});let n=0,d=0;try{n=e.reduce((t,e)=>t+e.querySelectorAll("p").length,0),n-=o.reduce((t,e)=>t+e.querySelectorAll("p").length,0),d=e.reduce((t,e)=>t+this.countWordsInElements(e.querySelectorAll(this.wordsHTMLTag.toString())),0),d-=o.reduce((t,e)=>t+this.countWordsInElements(e.querySelectorAll(this.wordsHTMLTag.toString())),0)}catch(t){this.analyticsLog(`[extractContentMetrics] Error in paragraph/word counting: ${t}`)}if(e.forEach(t=>{t.style.height&&(i=!0)}),i)return{heights:null,paragraphs:n,words:d};let s=0,a=0;try{let i,n;s=o.reduce((t,e)=>{try{return t+e.getBoundingClientRect().height}catch(e){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for ad div: ${e}`),t}},0),a=e.reduce((t,e)=>{try{const i=e.getBoundingClientRect();return t+(e instanceof HTMLElement?i.height:0)}catch(e){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for main content: ${e}`),t}},0);let d=!1;for(const e of t.children)n=(e.className?e.className.toString():"")+" "+(e.id?e.id.toString():""),d=this.excludeLengthPatterns.some(t=>t.test(n)),d&&(i=e.getBoundingClientRect(),a-=i.height)}catch(t){this.analyticsLog(`[extractContentMetrics] Error in height calculation: ${t}`)}return{heights:{adsDivLength:s,contentLength:a},paragraphs:n,words:d}}return this.analyticsLog("[extractContentMetrics] Invalid context in extractContentMetrics"),{heights:null,paragraphs:0,words:0}}catch(t){return this.analyticsLog(`[extractContentMetrics] Error in extractContentMetrics: ${t}`),{heights:null,paragraphs:0,words:0}}}getContentMetricsFromMainContent(t){const e=this.getElementsInContext(t);let i=!1;if(!e.length)return{heights:null,paragraphs:0,words:0};const o=this.collectDivElements(`${t} div`).filter(t=>this.isAdDiv(t)).map(t=>{const e=t.getBoundingClientRect();return e.width*e.height<=1&&t.parentElement&&this.gamSlotsIds.length?t.parentElement:t}).filter(t=>{const e=t.getBoundingClientRect();return e.width*e.height>1});let n=e.reduce((t,e)=>t+e.querySelectorAll("p").length,0);n-=o.reduce((t,e)=>t+e.querySelectorAll("p").length,0);let d=e.reduce((t,e)=>t+this.countWordsInElements(e.querySelectorAll(this.wordsHTMLTag.toString())),0);if(d-=o.reduce((t,e)=>t+this.countWordsInElements(e.querySelectorAll(this.wordsHTMLTag.toString())),0),e.forEach(t=>{t.style.height&&(i=!0)}),i)return{heights:null,paragraphs:n,words:d};return{heights:{adsDivLength:o.reduce((t,e)=>t+e.getBoundingClientRect().height,0),contentLength:e.reduce((t,e)=>{const i=e.getBoundingClientRect();return t+(e instanceof HTMLElement?i.height:0)},0)},paragraphs:n,words:d}}setContentMetrics(t=!1){try{if(!this.isAdDensityEnabled&&!t)return this.performances.height=null,this.performances.paragraphs=null,this.performances.words=null,this.performances.adDensity=null,void this.log("Ad Density disabled");if(this.contentSelectors.length>0)for(const t of this.contentSelectors){const{heights:e,paragraphs:i,words:o}=this.extractContentMetrics(t);if(e)return this.performances.height=Math.floor(e.contentLength),this.performances.paragraphs=Math.floor(i),this.performances.words=Math.floor(o),this.performances.adDensity=this.calculateAdDensity(e.adsDivLength,e.contentLength),this.log(`Ad Density computed from selector ${t}`,this.performances.adDensity),this.articleSelector=t,void this.analyticsLog("[setContentMetrics] Ad Density details",{heights:e,adDensity:this.performances.adDensity})}else{let t=null;try{t=this.findMainContent()}catch(t){this.analyticsLog(`[setContentMetrics] Error in [findMainContent]: ${t}`)}if(t){const{heights:e,paragraphs:i,words:o}=this.extractContentMetrics(t);if(e)return this.performances.height=Math.floor(e.contentLength),this.performances.paragraphs=Math.floor(i),this.performances.words=Math.floor(o),this.performances.adDensity=this.calculateAdDensity(e.adsDivLength,e.contentLength),this.articleSelector=this.getElementSelector(t),this.log("Ad Density computed from automatic detection",this.performances.adDensity),void this.analyticsLog("[setContentMetrics] Ad Density details",{heights:e,adDensity:this.performances.adDensity})}}this.log("No ad density computed"),this.performances.height=null,this.performances.paragraphs=null,this.performances.words=null,this.performances.adDensity=null}catch(t){this.analyticsLog(`[setContentMetrics] Error: ${t}`),this.performances.height=null,this.performances.paragraphs=null,this.performances.words=null,this.performances.adDensity=null}}getElementSelector(t){try{const e=t,i=t=>{try{if("undefined"!=typeof CSS&&"function"==typeof CSS.escape)return CSS.escape(t)}catch(t){}return t.replace(/([\0-\x1F\x7F!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")};if(e.id&&e.id.trim().length>0){return`#${i(e.id.trim())}`}if(e.classList&&e.classList.length>0){const t=Array.from(e.classList).filter(Boolean).map(t=>i(t)).join(".");if(t)return`.${t}`}return e.tagName?e.tagName.toLowerCase():"*"}catch(t){return""}}isFirstAdRendered(t){const e=this.performances.adFirstRenderTime||0;return this.isFirstAd&&(0==e||t<e)}handleFirstAdPerformanceTracking(t=""){const e=Math.round(performance.now());if(this.enablePerformances&&"Chrome"===this.checkBrowser&&this.isSamplingCase()&&this.isFirstAdRendered(e)){this.isFirstAd=!1,this.performances.adFirstRenderTime=e,this.log(`First Ad Render Ended ${t}. Total render time: ${e} (ms)`),this.performances.scriptLoadingTime=window.launcherLoadTime,this.setContentMetrics(),this.log("Sending analytics for performances",this.performances);const i=this.getConsentObject();"ko"!==(null==i?void 0:i.consentType)&&(null==i?void 0:i.consentCMPUIShown)?this.pageViewEvent({isPerformanceCall:!0,userAction:!0}):this.pageViewEvent({isPerformanceCall:!0})}}pageViewEvent(t={},e=!1){var i,o,n,d,s,a,r,l,c,u,p,g,w,f,h,m,y,v;if(t.isPerformanceCall||t.isUserPerformanceCall||e||(this.pageViewCalls+=1),!(null===(i=null===window||void 0===window?void 0:window.googletag)||void 0===i?void 0:i.cmd)||this.adslotsNumber||(null===window||void 0===window?void 0:window.odT)||window.googletag.cmd.push(()=>{var t,e,i,o,n;if(this.gamSlots=window.googletag.pubads().getSlots(),this.gamSlots.length>0)if(this.adslotsNumber=this.gamSlots.length,this.gamSlotsIds=this.gamSlots.map(t=>t.getSlotElementId()),(null===(t=this.gamSlots[0])||void 0===t?void 0:t.getSlotElementId())!==(null===(e=this.gamSlots[0])||void 0===e?void 0:e.getAdUnitPath())){const t=`/${null===(i=this.gamSlots[0])||void 0===i?void 0:i.getSlotElementId()}`||"";this.adUnitPath=(null===(o=this.gamSlots[0])||void 0===o?void 0:o.getAdUnitPath().replace(t,""))||""}else this.adUnitPath=((null===(n=this.gamSlots[0])||void 0===n?void 0:n.getAdUnitPath())||"").split("/").slice(0,-1).join("/")}),this.isSamplingCase()||e){if(!this.liveAnalyticsId){let t;try{t=self.crypto.randomUUID()}catch(e){t=this.tools.generateUuid()}this.liveAnalyticsId=t}const i=this.getConsentObject();let b=window.location.protocol+"//"+window.location.host+window.location.pathname,T="ok";T=(null==i?void 0:i.consentCMPUIShown)&&!t.userAction?"ui":"CMPv2_OOS"===(null==i?void 0:i.consentStatus)?"oos":1!==this.pageViewCalls||!t.firstCall||(null==i?void 0:i.consentV2TCData)&&(null===(o=null==i?void 0:i.consentV2TCData)||void 0===o?void 0:o.gdprApplies)&&!1!==(null===(n=null==i?void 0:i.consentV2TCData)||void 0===n?void 0:n.gdprApplies)?null==i?void 0:i.consentType:(null==i?void 0:i.waitingForCMPFinished)?"waiting_callback":"waiting_tcfapi";let S={id:this.liveAnalyticsId,part:this.pageViewCalls,gdpr:{gdprUi:(null==i?void 0:i.consentCMPUIShown)?1:0,gdprApplies:window.optidigitalToolboxGdpr?1:0,status:T}},C=JSON.parse(JSON.stringify(S)),A=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({sampling:this.liveAnalyticsSampling||25,country:window.optidigitalToolboxCC},null!=(null===(s=null===(d=this.setup)||void 0===d?void 0:d.info)||void 0===s?void 0:s.networkId)&&{networkId:this.setup.info.networkId}),null!=(null===(r=null===(a=this.setup)||void 0===a?void 0:a.info)||void 0===r?void 0:r.publisherId)&&{publisherId:this.setup.info.publisherId}),null!=(null===(c=null===(l=this.setup)||void 0===l?void 0:l.info)||void 0===c?void 0:c.siteId)&&{siteId:this.setup.info.siteId}),null!=(null===(p=null===(u=this.setup)||void 0===u?void 0:u.info)||void 0===p?void 0:p.revision)&&{revision:this.setup.info.revision}),{domain:window.location.hostname,uri:window.location.pathname,urlHash:this.tools.cyrb53(b,100),abTest:(null===(g=window.odT)||void 0===g?void 0:g.testGroup)?window.odT.testGroup:"control",device:{deviceCategory:this.deviceCategory.deviceCategory,browserWidth:this.widthBreakpoint,breakpoint:this.widthBreakpoint,browser:this.checkBrowser,os:this.checkOs},meta:{}}),C);t.firstCall||(A.gdpr.delayForCallback=this.tools.getElapsedTime()),document.referrer&&(A.source||(A.source={}),A.source.referrer=document.referrer,A.source.refDomain=new URL(document.referrer).hostname),new URL(window.location.href).searchParams.get("utm_source")&&(A.source||(A.source={}),A.source.utmSource=new URL(window.location.href).searchParams.get("utm_source")),new URL(window.location.href).searchParams.get("utm_campaign")&&(A.source||(A.source={}),A.source.utmCampaign=new URL(window.location.href).searchParams.get("utm_campaign")),(null===(f=null===(w=window.odT)||void 0===w?void 0:w.initConfig)||void 0===f?void 0:f.adUnit)&&""!==(null===(m=null===(h=window.odT)||void 0===h?void 0:h.initConfig)||void 0===m?void 0:m.adUnit)?A.adUnitPath=window.odT.initConfig.adUnit:this.adUnitPath&&(A.adUnitPath=this.adUnitPath);const k=window.document.querySelector("meta[property='og:title']");k&&k.getAttribute("content")?A.meta.title=k.getAttribute("content"):document.title&&(A.meta.title=document.title);const I=window.document.querySelector("meta[property='og:description']"),P=window.document.querySelector('meta[name="description"]');I&&I.getAttribute("content")?A.meta.description=I.getAttribute("content"):P&&P.getAttribute("content")&&(A.meta.description=P.getAttribute("content"));const _=window.document.querySelector("meta[property='og:image']");_&&_.getAttribute("content")&&(A.meta.image=_.getAttribute("content"));const x=window.document.querySelector("meta[property='article:author']"),E=window.document.querySelector('meta[name="author"]');x&&x.getAttribute("content")?A.meta.articleAuthor=x.getAttribute("content"):E&&E.getAttribute("content")&&(A.meta.articleAuthor=E.getAttribute("content"));const D=window.document.querySelector("meta[property='article:published_time']");if(D&&D.getAttribute("content")&&(A.meta.articlePublishedTime=D.getAttribute("content")),this.pageViewPayload=Object.assign({},A),!this.tagMode&&!e){let e=null;if(t.isPerformanceCall)e=Object.assign({performances:Object.assign({},this.performances)},C),this.log("Succesfully get performances payload",e);else if(t.isUserPerformanceCall)e=Object.assign({userPerformances:{}},C),0!==this.userPerformances.inp&&(e.userPerformances.inp=this.userPerformances.inp),0!==this.userPerformances.fid&&(e.userPerformances.fid=this.userPerformances.fid),e.userPerformances.lcp=this.userPerformances.lcp,this.isFirstCLSTrigerred&&(e.userPerformances.cls=this.userPerformances.cls),e.userPerformances.isUserPerformances=!0,this.log("Succesfully get user performances payload",e.userPerformances),this.userPerformanceSent=!0;else{let o=C;3===this.pageViewCalls||t.userAction?o.gdpr.delayForUserAction=Date.now()-(null==i?void 0:i.timeStampCMPUIShown):o.gdpr.delayForCallback=this.tools.getElapsedTime(),e=1===this.pageViewCalls?A:o}(null===(v=null===(y=null===window||void 0===window?void 0:window.odT)||void 0===y?void 0:y.finalAdSlotsConfig)||void 0===v?void 0:v.adSlotsDefinitions)?e.adslotsNumber=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).length:this.adslotsNumber&&(e.adslotsNumber=this.adslotsNumber),this.sendAnalyticsRequest(e,"https://analytics.optidigital.com/pageview",!!t.sendBeacon)}}}adRequestEvent(t,e=!1,i=!0){var o,n,d,s,a,r,l,c,u,p,g,w,f,h,m,y,v,b,T,S,C,A,k,I,P,_,x,E,D,L,O,M;const{divId:R,divIdFull:z,filled:$,demandType:F,lineItemId:B,size:N,prebidBid:U,prebidWinner:j,amazonStatus:V,oyStatus:q,oyTestGroup:G,oyPb:H,nogam:W,bidders:K,format:Y}=t,J=this.getConsentObject();if(i){let t;if(z&&(t=document.getElementById(z)),$&&z&&(null===(o=window.odT)||void 0===o?void 0:o.adSlotsUnfilledCount)&&(t&&t.closest(".optidigital-wrapper-div")&&(t.closest(".optidigital-brand")&&(null===(n=t.closest(".optidigital-brand"))||void 0===n?void 0:n.previousSibling)&&(null===(a=null===(s=null===(d=t.closest(".optidigital-brand"))||void 0===d?void 0:d.previousSibling)||void 0===s?void 0:s.classList)||void 0===a?void 0:a.contains("optidigital-text-ads"))&&(null===(c=null===(l=null===(r=t.closest(".optidigital-brand"))||void 0===r?void 0:r.previousSibling)||void 0===l?void 0:l.style)||void 0===c||c.setProperty("display","block")),t.previousSibling&&(null===(u=t.previousSibling.classList)||void 0===u?void 0:u.contains("optidigital-text-ads"))&&t.previousSibling.style.setProperty("display","block"),t.nextElementSibling&&(t.nextElementSibling.style.setProperty("display","block"),setTimeout(()=>{var e;null===(e=t.nextElementSibling)||void 0===e||e.classList.add("optidigital-brand-logo-active")},2e3),t.firstChild&&t.firstChild.firstChild&&t.firstChild.firstChild.offsetWidth&&t.firstChild.firstChild.offsetWidth>1?(t.nextElementSibling.style.setProperty("width",t.firstChild.firstChild.offsetWidth+"px","important"),t.firstChild.firstChild.offsetWidth===document.documentElement.clientWidth&&t.nextElementSibling.style.setProperty("margin-right","15px","important")):(t.nextElementSibling.style.setProperty("width","100%","important"),t.nextElementSibling.style.setProperty("margin-right","15px","important")))),window.odT.adSlotsUnfilledCount.hasOwnProperty(`${z}`)&&(window.odT.adSlotsUnfilledCount[`${z}`]=0)),!$&&z&&(null===(p=window.odT)||void 0===p?void 0:p.adSlotsUnfilledCount)){if(t&&t.closest(".optidigital-wrapper-div")){"none"===(getComputedStyle(t)&&getComputedStyle(t).display)&&(t.closest(".optidigital-brand")&&(null===(g=t.closest(".optidigital-brand"))||void 0===g?void 0:g.previousSibling)&&(null===(f=null===(w=t.closest(".optidigital-brand"))||void 0===w?void 0:w.previousSibling)||void 0===f?void 0:f.classList.contains("optidigital-text-ads"))&&(null===(h=t.closest(".optidigital-brand"))||void 0===h?void 0:h.previousSibling).style.setProperty("display","none"),t.previousSibling&&t.previousSibling.classList.contains("optidigital-text-ads")&&t.previousSibling.style.setProperty("display","none"),t.nextElementSibling&&t.nextElementSibling.style.setProperty("display","none"))}window.odT.adSlotsUnfilledCount.hasOwnProperty(`${z}`)?window.odT.adSlotsUnfilledCount[`${z}`]++:window.odT.adSlotsUnfilledCount[`${z}`]=1}t&&t.closest(".optidigital-wrapper-div")&&t.closest(".optidigital-wrapper-div").style.setProperty("background-image","none"),"Billboard_1"===R&&$&&"1800x1000"!==N&&(null===(y=null===(m=null===window||void 0===window?void 0:window.odT)||void 0===m?void 0:m.finalAdSlotsConfig)||void 0===y?void 0:y.adSlotsDefinitions)&&(window.odT.finalAdSlotsConfig.adSlotsDefinitions.Billboard_1.dfpSizes=window.odT.finalAdSlotsConfig.adSlotsDefinitions.Billboard_1.dfpSizes.filter(t=>!(1800===t[0]&&1e3===t[1]))),"Billboard_1"===R&&$&&"1800x1000"===N&&(null===window||void 0===window?void 0:window.odT)&&(window.odT.wallpaperForBillboard=!0),R.toLowerCase().includes("wallpaper")&&$&&"1800x1000"===N&&(null===window||void 0===window?void 0:window.odT)&&(window.odT.wallpaperFilled=!0)}if(this.adRequestStats&&(e||this.isSamplingCase())){!e||null!=this.pageViewPayload&&"object"==typeof this.pageViewPayload&&0!==Object.keys(this.pageViewPayload).length||this.pageViewEvent({},!0),this.pageViewPayload=this.pageViewPayload||{},this.pageViewPayload.sampling=e?100:this.liveAnalyticsSampling||25,delete this.pageViewPayload.gdpr;let t={0:"Direct",1:"Lazy Load",2:"Manual",5:"Sticky",6:"Interstitial",7:"Siderail",8:"Rewarded",9:"StickyOverlay"};const i=z||((null===(v=null===window||void 0===window?void 0:window.odT)||void 0===v?void 0:v.divIdPrefix)?`${null===(b=null===window||void 0===window?void 0:window.odT)||void 0===b?void 0:b.divIdPrefix}${R}`:`${R}`);let o=Object.assign({adRequest:{adSlot:void 0!==R&&(null===(A=null===(C=null===(S=null===(T=window.odT)||void 0===T?void 0:T.finalAdSlotsConfig)||void 0===S?void 0:S.adSlotsDefinitions)||void 0===C?void 0:C[R])||void 0===A?void 0:A.cdValue)?window.odT.finalAdSlotsConfig.adSlotsDefinitions[R].cdValue:R,lineItemId:B,filled:$?1:0,refresh:(null===(k=this.adSlotsLoadCount)||void 0===k?void 0:k[i])&&this.adSlotsLoadCount[i]>1?1:0,adSize:N,demandType:F,prebidWinner:j,prebidBid:U,amazonStatus:V,oyStatus:q,oyTestGroup:G,oyPb:H,nogam:W,format:Y},gdpr:{gdprApplies:window.optidigitalToolboxGdpr?1:0,gdprUi:(null==J?void 0:J.consentCMPUIShown)?1:0,status:null==J?void 0:J.consentType}},this.pageViewPayload);(null===(P=null===(I=window.odT)||void 0===I?void 0:I.initConfig)||void 0===P?void 0:P.adUnit)&&"string"==typeof window.odT.initConfig.adUnit&&""!==window.odT.initConfig.adUnit&&(null===(D=null===(E=null===(x=null===(_=window.odT)||void 0===_?void 0:_.finalAdSlotsConfig)||void 0===x?void 0:x.adSlotsDefinitions)||void 0===E?void 0:E[R])||void 0===D?void 0:D.customAdUnitCode)&&(o.adUnitPath=`${window.odT.initConfig.adUnit}/${window.odT.finalAdSlotsConfig.adSlotsDefinitions[R].customAdUnitCode}`),(null===(M=null===(O=null===(L=window.odT)||void 0===L?void 0:L.finalAdSlotsConfig)||void 0===O?void 0:O.adSlotsDefinitions)||void 0===M?void 0:M[R])&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[R].hasOwnProperty("loadType")&&(o.adRequest.loadType=t[window.odT.finalAdSlotsConfig.adSlotsDefinitions[R].loadType]),K&&"object"==typeof K&&Object.keys(K).length&&((null==K?void 0:K.isCached)&&(o.adRequest.isCached=!0,delete K.isCached),o.adRequest.bidders=K),window.odTLibs&&window.odT&&(o.v={l:window.odTLibs.odlauncher,c:window.odTLibs.odcore});const n={};Object.keys(o.adRequest).forEach(t=>{const e=o.adRequest[t];""!==e&&null!=e&&(n[t]=e)}),o.adRequest=n,this.sendAnalyticsRequest(o)}}addBidderMetrics(t,e,i,o,n){const d=window.odpbjs||this.tools.getPbjs(),s=()=>{var e,i,n,s,a,r,l,c,u,p,g,w,f,h,m,y,v,b,T,S,C,A,k,I,P,_,x,E,D,L,O,M,R,z,$,F,B,N,U,j,V,q,G;const H={};if(t&&"function"==typeof(null==d?void 0:d.getBidResponsesForAdUnitCode)&&"function"==typeof d.getNoBidsForAdUnitCode){const o=d.getBidResponsesForAdUnitCode(t),h=d.getNoBidsForAdUnitCode(t);this.auctionBids[t]=[...o.bids,...h.bids];const m=(t=>{if(0===t.length)return[];const e=t[t.length-1].auctionId;return t.every(t=>t.auctionId===e)?[...t]:t.filter(t=>t.auctionId===e)})(this.auctionBids[t]),y=null===(e=null==d?void 0:d.getHighestUnusedBidResponseForAdUnitCode(t))||void 0===e?void 0:e.cpm,v=null===(s=null===(n=null===(i=null===window||void 0===window?void 0:window.odT)||void 0===i?void 0:i.bidsFromOe)||void 0===n?void 0:n.find(e=>e.creativeId===t))||void 0===s?void 0:s.cpm;let b=0,T=!1;H.c2s=H.c2s||[],H.s2s=H.s2s||[];for(let e of m){let i=null===(r=null===(a=null==e?void 0:e.metrics)||void 0===a?void 0:a.getMetrics())||void 0===r?void 0:r["adapter.client.total"];i=void 0!==i?Math.round(i):null;const o={name:e.cpm?e.bidderCode:e.bidder,bid:e.cpm?e.cpm:e.timeout?-1:0,time:e.cpm?e.timeToRespond:(null===(c=null===(l=this.auctionMetrics)||void 0===l?void 0:l[e.auctionId])||void 0===c?void 0:c[e.bidder])?null===(p=null===(u=this.auctionMetrics)||void 0===u?void 0:u[e.auctionId])||void 0===p?void 0:p[e.bidder]:i};if(e.cpm&&(b=e.cpm>b?e.cpm:b),(null===(g=this.auctionFailsafe)||void 0===g?void 0:g[null==t?void 0:t.replace((null===(w=null===window||void 0===window?void 0:window.odT)||void 0===w?void 0:w.divIdPrefix)?window.odT.divIdPrefix:"","")])&&(o.bid=-3),"client"!==(null==e?void 0:e.src)&&"client"!==(null==e?void 0:e.source)||H.c2s.push(o),"s2s"===(null==e?void 0:e.src)||"s2s"===(null==e?void 0:e.source)){const t="context deadline exceeded";(null===(f=null==e?void 0:e.serverErrors)||void 0===f?void 0:f.find(e=>e.message===t))&&(o.bid=-2),H.s2s.push(o)}}(y&&y>b||v&&v>b)&&(T=!0,H.isCached=T)}if(t&&(null===(m=null===(h=this.auctionMetrics)||void 0===h?void 0:h.firstCall)||void 0===m?void 0:m[t])&&!(null===(y=H.c2s)||void 0===y?void 0:y.length)&&!(null===(v=H.s2s)||void 0===v?void 0:v.length)){H.dc=H.dc||[];const e=(null===(S=null===(T=null===(b=this.auctionMetrics)||void 0===b?void 0:b.firstCall)||void 0===T?void 0:T[t])||void 0===S?void 0:S.dc)||[],i=Object.entries(e).map(([t,{bid:e,time:i}])=>({name:t,bid:e<0?-2:parseFloat(window.odT.convertBidCpm(e)),time:i}));H.dc.push(...i)}if(t&&!(null===(A=null===(C=this.auctionMetrics)||void 0===C?void 0:C.firstCall)||void 0===A?void 0:A[t])&&(null===(k=this.auctionMetrics)||void 0===k?void 0:k[t])&&!(null===(I=H.c2s)||void 0===I?void 0:I.length)&&!(null===(P=H.s2s)||void 0===P?void 0:P.length)){H.dc=H.dc||[];((null===(x=null===(_=this.auctionMetrics)||void 0===_?void 0:_.firstCallConfig)||void 0===x?void 0:x[t])||[]).forEach(e=>{var i;const o={name:e,bid:-1,time:(null===(i=this.auctionMetrics)||void 0===i?void 0:i[t])||void 0};H.dc&&H.dc.push(o)})}if(t&&(null===(D=null===(E=this.auctionMetrics)||void 0===E?void 0:E.amazon)||void 0===D?void 0:D[t])){H.c2s=H.c2s||[];const e={name:"amazon",bid:Number(o)>0?404:(null===(R=null===(M=null===(O=null===(L=null===window||void 0===window?void 0:window.odT)||void 0===L?void 0:L.setup)||void 0===O?void 0:O.biddersSetup)||void 0===M?void 0:M.amazon)||void 0===R?void 0:R.timeout)?(null===(B=null===(F=null===($=null===(z=null===window||void 0===window?void 0:window.odT)||void 0===z?void 0:z.setup)||void 0===$?void 0:$.biddersSetup)||void 0===F?void 0:F.amazon)||void 0===B?void 0:B.timeout)>(null===(U=null===(N=this.auctionMetrics)||void 0===N?void 0:N.amazon)||void 0===U?void 0:U[t])?0:-1:0,time:null===(V=null===(j=this.auctionMetrics)||void 0===j?void 0:j.amazon)||void 0===V?void 0:V[t]};(null===(q=this.auctionFailsafe)||void 0===q?void 0:q[null==t?void 0:t.replace((null===(G=null===window||void 0===window?void 0:window.odT)||void 0===G?void 0:G.divIdPrefix)?window.odT.divIdPrefix:"","")])&&(e.bid=-3),H.c2s.push(e)}const W=["c2s","s2s","dc"].filter(t=>Array.isArray(H[t])&&H[t].length>0).reduce((t,e)=>(t[e]=H[e],t),{});return H.isCached&&(W.isCached=!0),Object.keys(W).length?W:{}};if(void 0!==d&&"function"==typeof d.getBidResponsesForAdUnitCode)return s();const a=s();return d.que.push(s),a}updateAdSlotLoad(t){let e=new Date;this.adSlotsLoadTime[t]=e.getTime(),this.adSlotsLoadCount.hasOwnProperty(t)?this.adSlotsLoadCount[t]++:this.adSlotsLoadCount[t]=1}registerAdslotLoad(t,e,i,o){var n,d,s,a,r,l,c,u,p,g,w,f,h,m,y;let v=(new Date).getTime(),b=0,T=!1;const{hb_bidder:S,hb_pb:C,amznbid:A,od_pfg:k,od_pf_group:I,od_pf_pb:P,hb_format:_,isAmznbid:x}=this.tools.checkSlotTargeting(i.slot);let E="gam_direct";if(null!=i.yieldGroupIds&&(E="gam_adx"),null!=i.advertiserId&&(null===(n=this.setup)||void 0===n?void 0:n.advertisers)&&Object.keys(this.setup.advertisers).length>0)(null===(d=this.setup.advertisers)||void 0===d?void 0:d.hasOwnProperty("adx"))?-1!=(null===(s=this.setup.advertisers.adx)||void 0===s?void 0:s.indexOf(i.advertiserId))&&(E=i.lineItemId?"gam_direct":"gam_adx"):E=i.lineItemId?"gam_direct":"gam_adx",(null===(a=this.setup.advertisers)||void 0===a?void 0:a.hasOwnProperty("house"))&&-1!=(null===(r=this.setup.advertisers.house)||void 0===r?void 0:r.indexOf(i.advertiserId))&&(E="gam_house"),(null===(l=this.setup.advertisers)||void 0===l?void 0:l.hasOwnProperty("amazon"))&&-1!=(null===(c=this.setup.advertisers.amazon)||void 0===c?void 0:c.indexOf(i.advertiserId))&&(E="amazon"),(null===(u=this.setup.advertisers)||void 0===u?void 0:u.hasOwnProperty("prebid"))&&-1!=(null===(p=this.setup.advertisers.prebid)||void 0===p?void 0:p.indexOf(i.advertiserId))&&(E="prebid",T=!0);else{const e=((t,e)=>{var i,o;const n=document.getElementById(t),d=null==n?void 0:n.querySelector("iframe");let s;if(d)try{s=(null===(o=null===(i=d.contentDocument)||void 0===i?void 0:i.body)||void 0===o?void 0:o.innerHTML)||void 0}catch(t){s=void 0}const a=[null==n?void 0:n.outerHTML,s].filter(Boolean);for(const t of a){const e=t.toLowerCase();if(e.includes("renderad")||e.includes("prebid")||e.includes("uctag"))return T=!0,"prebid";if(e.includes("apstag")||e.includes("amazon-adsystem"))return"amazon"}return e.lineItemId?"gam_direct":"gam_adx"})(t,i);E=e||(i.adTransparencyUrl?"gam_house":i.lineItemId?"gam_direct":"gam_adx")}if(e?b++:E="unfilled",window.odT){if(window.odT.adSlotsLoadStatus.hasOwnProperty(t)?("prebid"!==E||"prebid"===E&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[t].time=v,window.odT.adSlotsLoadStatus[t].c++,window.odT.adSlotsLoadStatus[t].f1+=b,window.odT.adSlotsLoadStatus[t].s.push("prebid"===E?`${E}_${S}`:E)):("prebid"!==E||"prebid"===E&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[t]={time:v,c:1,f1:b,s:["prebid"===E?`${E}_${S}`:E]}),"gam_direct"===E){if(window.odT.adSlotsLoadStatus[t].delay=!1,window.odT.setup.directDemandRefreshDelay&&(window.odT.adSlotsLoadStatus[t].delay=window.odT.setup.directDemandRefreshDelay),window.odT.setup.directDemandCustomRefresh){const e=((t=null,e=null)=>{const i=window.odT.setup.directDemandCustomRefresh.find(t=>e&&t.lineItems&&t.lineItems.includes(e));if(i)return i.delay;const o=window.odT.setup.directDemandCustomRefresh.find(e=>t&&e.advertisers&&e.advertisers.includes(t));return o?o.delay:null})(i.advertiserId,i.lineItemId);e&&(window.odT.adSlotsLoadStatus[t].delay=e)}}else("prebid"!==E||"prebid"===E&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[t].delay=!1);if("gam_direct"===E){let t=!1;const e=()=>{var e,o,n,d;return t=window.odT.setup.anchorModeDirectDemand||(null===(o=null===(e=window.odT.setup)||void 0===e?void 0:e.anchorModeAdvertisers)||void 0===o?void 0:o.includes(i.advertiserId))||(null===(d=null===(n=window.odT.setup)||void 0===n?void 0:n.anchorModeLineItems)||void 0===d?void 0:d.includes(i.lineItemId)),t};e(),!t||window.odT.stickyFormatLoaded.length&&window.odT.stickyFormatLoaded.includes(o)||null===i.size||1===i.size[0]||1800===i.size[0]||1e3===i.size[1]||!window.odT.stickyFormatClosed||window.odT.setStickyFormat(o,null===(g=i.size)||void 0===g?void 0:g[0],window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3)}}let D="null";null!=i.size&&(D=this.tools.formatSizeArrayToString(i.size)),x&&(null===(f=null===(w=window.odAnalytics)||void 0===w?void 0:w.amazonAuction)||void 0===f?void 0:f.duration)&&(window.odAnalytics.analytics.auctionMetrics.amazon=window.odAnalytics.analytics.auctionMetrics.amazon||{},window.odAnalytics.analytics.auctionMetrics.amazon[t]=window.odAnalytics.amazonAuction.duration);const L=this.addBidderMetrics(t,S,C,A,null),O=Object.assign({divId:o,divIdFull:t,filled:e,demandType:E,lineItemId:i.lineItemId,size:D,prebidWinner:S,prebidBid:C,amazonStatus:A,oyStatus:k,oyTestGroup:I,oyPb:P,nogam:!1,bidders:Object.keys(L).length?L:null},T&&{format:_});"unfilled"===E||(null===(h=null===window||void 0===window?void 0:window.odT)||void 0===h?void 0:h.replaceHouseCampaigns(o,null==i?void 0:i.advertiserId))||this.adRequestEvent(O),"unfilled"!==E||(null===(m=null===window||void 0===window?void 0:window.odT)||void 0===m?void 0:m.isBackfillEnabled(o))||(null===(y=null===window||void 0===window?void 0:window.odT)||void 0===y?void 0:y.isSecondChanceEnabled(o,t))||this.adRequestEvent(O)}}g.DEFAULT_CONTENT_SELECTORS=[],g.DEFAULT_WORDS_HTML_TAG=["h1","h2","h3","p"],g.DEFAULT_EXCLUDE_TAGS=["header","footer"],g.DEFAULT_EXCLUDE_PATTERNS=[/taboola/i,/smartbox/i,/ob-smartfeed-wrapp/i,/feed/i,/comment/i],g.DEFAULT_EXCLUDE_LENGTH_PATTERNS=[/taboola/i,/smartbox/i,/ob-smartfeed-wrapp/i,/feed/i,/comment/i],g.MIN_WORDS=100,g.MIN_SURFACE=5e4,g.MIN_RATIO_WORDS=.1,g.CHILD_RATIO=.667;const w=g;const f=class{constructor(t){var e;if(this.setup={},this.prebidAdUnits=[],this.adslotResults=new Map,this.videoInstreamStatus="init",this.videoGAMCorrelator=0,this.videoInstreamDMEncoding=1,this.videoInstreamPageTargeting={},this.videoInstreamLazyLoad=!0,this.startExecuted=!1,this.videoInstreamHBTimeout=3e3,this.videoInstreamTimeout=4e3,this.videoInstreamPrebidReady=!1,this.videoInstreamAmazonReady=!1,this.currentVideoAdSlotConfig=null,this.prebidParams=[],this.amazonParams=[],this.prebidVideoAdunits=[],this.waitingForConsent=!1,this.consentCallbackRegistered=!1,this.tools=s,0!==Object.keys(t).length){if(window.odT.log("InStream Module - Initializing"),this.setup=t,this.videoInstreamDMEncoding=null!==(e=t.dmEncoding)&&void 0!==e?e:1,this.startExecuted=t.startExecuted||!1,window.odT.initConfig.pageTargeting&&"object"==typeof window.odT.initConfig.pageTargeting){const t=window.odT.initConfig.pageTargeting||{};try{this.videoInstreamPageTargeting=this.normalizeCustomTargetingMap(t)}catch(t){window.odT.log("InStream Module - Error - Invalid page targeting:",t)}}this.init()}else window.odT.log("InStream Module - Error: OptiDigitalInstreamV1 setup is empty")}init(){window.odT.log("InStream Module - Initialized"),window.odT.optidigitalInstream=this}setStartExecuted(t){this.startExecuted=t}getVideoInstreamAds(t,e,i){var o;this.setStartExecuted(!0);const n=null===(o=this.setup.videoAdSlotConfigurations)||void 0===o?void 0:o.map(e=>Object.assign(Object.assign({},e),{videoAdslots:e.videoAdslots.filter(e=>t.includes(e.adslot))})).filter(t=>t.videoAdslots.length>0);if(n&&0!==n.length){if(this.currentVideoAdSlotConfig=n,this.videoInstreamCallback=e,i&&(this.videoInstreamTimeout=i),this.videoInstreamStatus="auction",this.videoInstreamPrebidReady=!1,this.videoInstreamAmazonReady=!1,this.videoInstreamLazyLoad=!1,this.setup.lazyload){const t=document.querySelector(this.setup.lazyload.divSelector);if(null!=t){const e=t.getBoundingClientRect();e.top>=0&&e.top-window.innerHeight<=this.setup.lazyload.lazyLoadPx||e.top<0&&Math.abs(e.top)<=this.setup.lazyload.lazyLoadPx?this.videoInstreamLazyLoad=!1:(this.videoInstreamLazyLoad=!0,this.monitorVideoLazyLoadPlayer(this.setup.lazyload.divSelector,this.setup.lazyload.lazyLoadPx))}}this.videoInstreamLazyLoad||(this.startExecuted?this.checkConsentAndFetchVIADS():(this.videoInstreamPrebidReady=!0,this.videoInstreamAmazonReady=!0,this.videoBiddersBack()))}else window.odT.log(`InStream Module - Error: Div configuration not found for adslots: ${t}`,this.setup.videoAdSlotConfigurations)}monitorVideoLazyLoadPlayer(t,e){this.videoInstreamLazyIntervalID=setInterval(()=>{if(this.videoInstreamLazyLoad){const i=document.querySelector(t);if(null!=i){const t=i.getBoundingClientRect();(t.top>=0&&t.top-window.innerHeight<=e||t.top<0&&Math.abs(t.top)<=e)&&(clearInterval(this.videoInstreamLazyIntervalID),this.videoInstreamLazyLoad=!1,window.odT.log("InStream Module - Load Video Lazy Load player configuration"),this.startExecuted?this.checkConsentAndFetchVIADS():(this.videoInstreamPrebidReady=!0,this.videoInstreamAmazonReady=!0,this.videoBiddersBack()))}}},500)}checkConsentAndFetchVIADS(){if(window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){if(window.odT.log("InStream Module - CMP consent rejected, aborting video ad fetch"),this.videoInstreamStatus="aborted",this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(t){window.odT.log("InStream Module - Error: Video instream callback (consent rejected):",t)}}else!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)?this.fetchVIADS():this.waitingForConsent||(this.waitingForConsent=!0,window.odT.log("InStream Module - Waiting for CMP consent decision"),this.registerConsentCallback())}registerConsentCallback(){if(this.consentCallbackRegistered)return;this.consentCallbackRegistered=!0,window.odT.eventCallback||(window.odT.eventCallback=[]);const t=(e,i)=>{if("CONSENT_READY"===e){if(this.waitingForConsent=!1,window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){window.odT.log("InStream Module - CMP consent rejected, aborting video ad fetch"),this.videoInstreamStatus="aborted";const e=window.odT.eventCallback.indexOf(t);if(e>-1&&window.odT.eventCallback.splice(e,1),this.consentCallbackRegistered=!1,this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(t){window.odT.log("InStream Module - Error: Video instream callback (consent rejected):",t)}return}if(!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){window.odT.log("InStream Module - CMP consent OK, proceeding with video ad fetch");const e=window.odT.eventCallback.indexOf(t);e>-1&&window.odT.eventCallback.splice(e,1),this.consentCallbackRegistered=!1,this.fetchVIADS()}}};window.odT.eventCallback.push(t),!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&setTimeout(()=>{t("CONSENT_READY",{status:window.odT.consentStatus})},0)}fetchVIADS(){this.fetchPrebidVideoBids(),this.setup.biddersSetup&&this.setup.biddersSetup.amazon?this.fetchAPSVideoBids():this.videoInstreamAmazonReady=!0,setTimeout(()=>{try{this.callVideoInstreamCallback()}catch(t){window.odT.log("InStream Module - Error: Video instream callback:",t)}},this.videoInstreamTimeout)}fetchPrebidVideoBids(){if(!this.currentVideoAdSlotConfig)return;const t=[];for(const e of this.currentVideoAdSlotConfig)e.videoAdslots.forEach(e=>{const i=this.findConfigForAdslot(e.adslot);if(!i)return;const o=`${i.adslot}`;if(t.push(o),-1===this.prebidAdUnits.indexOf(o)){const t=this.getPrebidVideoAdunit(o,i.videoAdunitConfig);t&&(this.prebidVideoAdunits.push(t),this.prebidAdUnits.push(o))}}),t.length>0?window.odpbjs.que.push(()=>{var e;window.odT.log("InStream Module - Prebid bids request"),window.odT.oyStatus&&(null===(e=window.optiyield)||void 0===e||e.cmd.push(()=>{var t;const e=null===(t=window.optiyield)||void 0===t?void 0:t.setPrebidFloors(window.odT.instreamModule.prebidVideoAdunits,window.odT.setP);(null==e?void 0:e.length)>0&&(window.odT.instreamModule.prebidVideoAdunits=e)})),window.odT.log("InStream Module - Prebid bids addAdUnits",window.odT.instreamModule.prebidVideoAdunits),window.odpbjs.addAdUnits(window.odT.instreamModule.prebidVideoAdunits),window.odT.log("InStream Module - Prebid bids requestBids"),window.odpbjs.setConfig({mediaTypePriceGranularity:{video:{buckets:[{precision:2,min:0,max:.1,increment:.01},{precision:2,min:.1,max:10,increment:.05},{precision:2,min:10,max:50,increment:.25}]}}}),window.odpbjs.requestBids({timeout:window.odT.instreamModule.videoInstreamTimeout,adUnitCodes:t,bidsBackHandler:t=>{let e=window.odpbjs.getBidResponses();window.odT.log("InStream Module - "+(e&&"object"==typeof e&&Object.keys(e).length>0?"Prebid bids received":"No prebid bids received"),e);let i=window.odpbjs.getAdserverTargeting();window.odT.instreamModule.processPrebidBids(i),window.odT.instreamModule.videoInstreamPrebidReady=!0,window.odT.instreamModule.videoBiddersBack()}})}):this.videoInstreamPrebidReady=!0}processPrebidBids(t){if(!this.currentVideoAdSlotConfig)return this.videoInstreamPrebidReady=!0,void this.videoBiddersBack();for(const e of this.currentVideoAdSlotConfig)e.videoAdslots.forEach(e=>{const i=this.findConfigForAdslot(e.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`;if(t.hasOwnProperty(o)&&t[o].hasOwnProperty("hb_bidder")&&t[o].hasOwnProperty("hb_uuid")&&t[o].hasOwnProperty("hb_pb")&&t[o].hasOwnProperty("hb_size")&&t[o].hasOwnProperty("hb_format")){let e="&hb_bidder="+t[o].hb_bidder;e+="&hb_uuid="+t[o].hb_uuid,e+="&hb_pb="+t[o].hb_pb,e+="&hb_size="+t[o].hb_size,e+="&hb_format="+t[o].hb_format;const i=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}};this.prebidParams[o]=e,this.adslotResults.set(n,i)}})}fetchAPSVideoBids(){var t;if(window.odT.log("InStream Module - Fetch Amazon"),!window.odT.enableAmazonAPS||!this.currentVideoAdSlotConfig)return this.videoInstreamAmazonReady=!0,void this.videoBiddersBack();let e=[];for(const i of this.currentVideoAdSlotConfig)i.videoAdslots.forEach(t=>{var i,o,n;const d=this.findConfigForAdslot(t.adslot);if(!d)return;const s=`${d.adslot}`;if(null===(n=null===(o=null===(i=this.setup.biddersSetup)||void 0===i?void 0:i.amazon)||void 0===o?void 0:o.adSlots)||void 0===n?void 0:n.hasOwnProperty(s)){const t={slotID:this.setup.biddersSetup.amazon.adSlots[s].slotId,mediaType:"video",sizes:this.setup.biddersSetup.amazon.adSlots[s].sizes,optiYield:{adUnitPath:window.odT.initConfig.adUnit,cd:{cd1:s}}};e.push(t)}}),e.length>0?(window.odT.oyStatus&&(null===(t=window.optiyield)||void 0===t||t.cmd.push(()=>{var t;try{e=null===(t=window.optiyield)||void 0===t?void 0:t.setAmazonFloors(e,window.odT.setA)}catch(t){window.odT.log("InStream Module - Error: setAmazonFloors:",t)}})),window.apstag.fetchBids({slots:e,timeout:this.videoInstreamTimeout},t=>{window.odT.log("InStream Module - "+(t&&t.length>0?"Amazon VIDEO bids received":"No amazon VIDEO bids received"),t),this.processAmazonBids(t),this.videoInstreamAmazonReady=!0,this.videoBiddersBack()})):(this.videoInstreamAmazonReady=!0,this.videoBiddersBack())}processAmazonBids(t){if(!this.currentVideoAdSlotConfig)return this.videoInstreamAmazonReady=!0,void this.videoBiddersBack();if(t.length>0)for(const e of this.currentVideoAdSlotConfig)e.videoAdslots.forEach(e=>{const i=this.findConfigForAdslot(e.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`,d=t.find(t=>{var e,i,n,d;return t.slotID===(null===(d=null===(n=null===(i=null===(e=this.setup.biddersSetup)||void 0===e?void 0:e.amazon)||void 0===i?void 0:i.adSlots)||void 0===n?void 0:n[o])||void 0===d?void 0:d.slotId)});if(d){const t=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}};this.amazonParams[o]=d.encodedQsParams,this.adslotResults.set(n,t)}})}getPrebidVideoAdunit(t,e){const i=[];if(this.setup.biddersSetup&&Object.keys(this.setup.biddersSetup).forEach(e=>{var o;if("amazon"===e)return;const n=this.setup.biddersSetup[e];if(null===(o=null==n?void 0:n.adSlots)||void 0===o?void 0:o.hasOwnProperty(t)){const o={bidder:e,params:n.adSlots[t]};i.push(o)}}),i.length>0){let o={};if(window.odT.initConfig&&window.odT.initConfig.adUnit&&window.odT.enableGpid){const e=`${window.odT.initConfig.adUnit}/${t}`;o={ext:{data:{pbadslot:e},gpid:e}}}return{code:t,mediaTypes:{video:e},bids:i,optiYield:{adUnitPath:`${window.odT.initConfig.adUnit}`,cd:{cd1:t}},ortb2Imp:o}}return null}videoBiddersBack(){this.videoInstreamAmazonReady&&this.videoInstreamPrebidReady&&(window.odT.log("InStream Module - Prebid & Amazon VIDEO bids received"),this.callVideoInstreamCallback())}findConfigForAdslot(t){const e=this.currentVideoAdSlotConfig;if(e)for(const i of e){const e=i.videoAdslots.find(e=>e.adslot===t);if(e)return e}}callVideoInstreamCallback(){if(this.videoInstreamStatus&&"done"!==this.videoInstreamStatus&&"aborted"!==this.videoInstreamStatus){if(window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){if(window.odT.log("InStream Module - CMP consent rejected, aborting GAM callback"),this.videoInstreamStatus="aborted",this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(t){window.odT.log("InStream Module - Error in video instream callback (consent rejected):",t)}return}if(this.videoInstreamStatus="done",!this.currentVideoAdSlotConfig)return;const t=[];this.vastURLCustomParams={};for(const e of this.currentVideoAdSlotConfig){e.videoAdslots.forEach(e=>{const i=this.findConfigForAdslot(e.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`,d=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}},s=this.getVideoCustomParam(i,this.amazonParams&&this.amazonParams[o]||"",this.prebidParams&&this.prebidParams[o]||"");1===this.videoInstreamDMEncoding?(d[o].customParams=s,this.setup.dmGAMVASTParams&&(d[o].customParams+=this.setup.dmGAMVASTParams)):d[o].customParams=encodeURIComponent(s),this.vastURLCustomParams[o]=d[o].customParams,d[o].vastURL=this.getVideoGAMVASTTagURL(i),t.push(d)});try{window.odT.log("InStream Module - Callback"),this.videoInstreamCallback(t)}catch(t){window.odT.log("InStream Module - Error in video instream callback:",t)}}}}getVideoGAMVASTTagURL(t){var e,i;let o="https://pubads.g.doubleclick.net/gampad/ads?";o+="iu="+window.odT.initConfig.adUnit,Array.isArray(t.videoAdunitConfig.playerSize[0])?o+="&sz="+t.videoAdunitConfig.playerSize.map(t=>t.join("x")).join("|"):o+="&sz="+t.videoAdunitConfig.playerSize.join("x"),o+="&ad_rule=0&plcmt="+(t.videoAdunitConfig.plcmt||1)+"&cust_params=",this.vastURLCustomParams&&this.vastURLCustomParams[t.adslot]&&(o+=encodeURIComponent(this.vastURLCustomParams[t.adslot]));let n="auto",d="0";return t.videoAdunitConfig.playbackmethod&&(t.videoAdunitConfig.playbackmethod.includes(3)&&(n="click"),(t.videoAdunitConfig.playbackmethod.includes(2)||t.videoAdunitConfig.playbackmethod.includes(6))&&(d="1")),o+="&vpa="+n+"&vp_mute="+d,o+="&vpos="+t.type,o+="&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp",o+="&correlator="+(this.videoGAMCorrelator++||Math.floor(1e13*Math.random())),o+="&url="+encodeURIComponent((null===(e=window.top)||void 0===e?void 0:e.location.href)||""),o+="&description_url="+encodeURIComponent((null===(i=window.top)||void 0===i?void 0:i.location.href)||""),window.odT.consentV2TCData&&!0===window.odT.consentV2TCData.gdprApplies&&(o+="&gdpr=1",o+="&gdpr_consent="+window.odT.consentV2TCData.tcString),o}getVideoCustomParam(t,e,i){var o;let n="adslot="+t.adslot;const d={odtag_status:"1"};"test"===window.odT.testGroup&&(d.test_group="test");const s=window.odT.customPageTargeting||{},a=Object.assign(Object.assign(Object.assign(Object.assign({},d),this.videoInstreamPageTargeting),s),t.customTargeting||{});return n+=this.stringifyCustomTargetingMap(a),!0!==window.odT.limitedAds||"CMPv2_LAokHBok"!==window.odT.consentStatus&&"CMPv2_LAokHBko"!==window.odT.consentStatus||(n+="&od_limitedads=1"),window.odT.oyStatus&&(null===(o=window.optiyield)||void 0===o||o.cmd.push(()=>{var e;const i=decodeURIComponent(null===(e=window.optiyield)||void 0===e?void 0:e.getVideoInStreamFloor(window.odT.initConfig.adUnit,{cd1:t.adslot}));i&&(n+="&"+i)})),i&&(n+=i),e&&(n+=e),n}isSerializableTargetingValue(t){return"string"==typeof t||"number"==typeof t}normalizeCustomTargetingMap(t={}){try{return Object.entries(t).reduce((t,[e,i])=>{if(Array.isArray(i)){const o=this.tools.flattenTargetingValues(i).filter(t=>this.isSerializableTargetingValue(t)).map(t=>String(t)).filter(t=>""!==t);return o.length>0&&(t[e]=o),t}return this.isSerializableTargetingValue(i)&&""!==i?(t[e]=String(i),t):t},{})}catch(t){return window.odT.log("InStream Module - Error - Can not normalize custom targeting:",t),{}}}stringifyCustomTargetingMap(t={}){try{return Object.entries(t).map(([t,e])=>{if(Array.isArray(e)){const i=this.tools.flattenTargetingValues(e).filter(t=>this.isSerializableTargetingValue(t)).filter(t=>""!==t).join(",");return i?`&${t}=${i}`:""}return null==e||""===e?"":this.isSerializableTargetingValue(e)?`&${t}=${String(e)}`:""}).join("")}catch(t){return window.odT.log("InStream Module - Error - Can not stringify custom targeting:",t),""}}};var h=i(862);window.launcherLoadTime=Math.round(performance.now());const m=class{adserver="GAM";adSlotsLoadStatus=[];adSlotsUnfilledCount=[];apsSizes=[[1e3,250],[1e3,90],[970,250],[970,90],[800,250],[700,250],[728,90],[468,60],[300,600],[120,600],[160,600],[336,280],[320,180],[300,250],[300,100],[300,50],[250,250],[320,100],[320,50],[200,200]];consentOK=["CMPv2_GAMokHBok","CMPv2_GAMokHBko","CMPv2_OOS"];consentStatusNoGAM=["CMPv2_RejectALL","CMPv2_GAMmv","CMPv2_GAMko","CMPv2_LAokHBok","CMPv2_LAokHBko","CMPv2_LAko","CMPv2_LAMmv"];consentStatusNoGAMButLA=["CMPv2_RejectALL","CMPv2_GAMmv","CMPv2_GAMko","CMPv2_LAko","CMPv2_LAMmv"];consentType="ko";customDNR=!0;customPageTargeting={};debug=!1;debugBidderDiscount=1;defaultPriceGranularity={buckets:[{max:3,min:0,increment:.01,precision:2},{max:8,min:3,increment:.05,precision:2},{max:20,min:8,increment:.5,precision:2}]};enableArticleReporting=!0;enableGpid=!0;enableSourceReporting=!0;enableLimitedAds=!0;enableCookieConsent=!1;engageBackfill=!0;eventCallback=[];finalAdSlotsConfig={};firstLoadAdSlots=[];googleInit=!1;gptAdSlots=[];iasId=!1;iasReady=!1;infiniteScrollId=1;infiniteScrollWallpaperSlot=!1;initConfig={};insertInreadStartDone=!1;isFirstCLSTrigerred=!0;lazyLoadPendingAdSlots=[];lazyLoadPendingAdSlotsWithRewarded=[];limitedAds=!1;logPrefix="%cOptiDigital_Debug:%c ";analyticsLogPrefix="%cOptiDigital_Debug_Analytics:%c ";mobileEvenVerticalSizes=!1;noGamUseSafeframe=!0;notVisibleAdslots=[];observedPerformances=["navigation","paint","first-input","largest-contentful-paint","layout-shift","longtask","event"];oyStatus=!0;pageViewCalls=0;pfConfig={};prebidSizes=[[1e3,250],[1e3,90],[970,250],[970,90],[800,250],[700,250],[728,90],[468,60],[300,600],[120,600],[160,600],[336,280],[320,200],[320,180],[320,150],[300,250],[300,100],[300,50],[250,250],[320,100],[320,50],[200,200]];prebidSizesAdjusted=!1;rewardedAdContentSelector="article";rewardedAdCookie="opd_rewardedAd";rewardedAdTimeout=3e3;screen=window.top?window.top.document.documentElement.clientWidth<768?"Mobile":"Desktop":document.documentElement.clientWidth<768?"Mobile":"Desktop";secondChancePending=[];setup={};siteCode="na";sizesFor={default:[["fluid"],[336,280],[250,250],[300,250],[200,200]],billboard:[[1e3,250],[1e3,90],[970,250],[800,250],[970,90],[728,90],[700,250],[300,250],[468,60]],halfpagead:[["fluid"],[300,600],[300,250],[160,600],[120,600],[250,250],[200,200]],content:[["fluid"],[336,280],[300,250],[250,250],[728,90],[700,250],[468,60]],interstitial:[[320,480],[336,280],[300,250],[250,250]],mobilepos:[["fluid"],[300,250],[320,160],[320,100],[320,80],[320,50],[250,250],[336,280],[300,50]],desktopsticky:[[1e3,90],[970,90],[728,90]],mobilesticky:[[320,50],[320,80],[320,100],[300,100],[300,50]],verticalsticky:[["fluid"],[300,600],[300,350],[300,250],[336,280],[160,600],[120,600],[250,250],[200,200]],outofpage:[[1,1]],wallpaper:[[1,1]]};sizesForMobilePos=[[300,600],[160,600],[120,600]];sourceDomains=["www.google.fr","www.google.com","news.google.com","www.facebook.com","facebook.com","m.facebook.com","l.facebook.com","lm.facebook.com","from.flipboard.com","pinterest.com","pinterest.fr","www.linkedin.com","linkedin.com","t.co","instagram.com","googleapis.com","www.googleapis.com"];sourceID=!1;stickyAutoCloseScroll=!0;stickyAdAutoHidePx=100;stickyAdDivId=!1;stickyAdMode="bottom";stickyAdStatus="off";stickyAdTopTrigger=0;stickyCookie="opd_sticky";stickyFormatClosed=!0;stickyFormatLoaded=[];tagMode=!1;tagSizes=[["fluid"],[336,280],[250,250],[300,250],[200,200],[1e3,250],[1e3,90],[970,250],[800,250],[970,90],[728,90],[700,250],[468,60],[300,600],[160,600],[120,600],[320,480],[320,100],[320,80],[320,50],[300,50],[320,160],[300,100]];testGroup="control";userAction=[];windowStatus=1;constructor(t={}){window.odT=this,this.optidigitalSetup=window.optidigitalSetup,this.tools=s,this.cyrb53=s.cyrb53.bind(s),this.log=s.log.bind(s),this.checkSafeFrameDelivery=s.checkSafeFrameDelivery.bind(s),this.loadLibs(),window.optidigitalToolbox=this,this.infiniteScrollRefresh=this.spaManualLoad,this.loadConfig(this.optidigitalSetup||{}),this.analytics=new w(this.setup,this.forceAnalytics),this.iasModule=t?.iasModule,this.divIdPrefix=void 0!==this.setup.divIdPrefix?this.setup.divIdPrefix:"optidigital-adslot-",this.adAdaptersFactory=new l(this.screen,this.setup,this.divIdPrefix,this.rewardedAdCookie,this.rewardedAdFrequency,this.rewardedAdFrequencyImps,this.rewardedAdFrequencyInterval),this.stickyAdapter=this.adAdaptersFactory.getStickyAdapter(),this.setup.hasOwnProperty("launcherInit")&&"function"==typeof this.setup.launcherInit&&(this.setup.launcherInit(this.initConfig),this.log("launcherInit executed")),window.optiyield=window.optiyield||{cmd:[]},window.optiyield.initOptiYieldSdk=!1,window.googletag=window.googletag||{cmd:[]},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push(function(){window.googletag.setConfig({disableInitialLoad:!0})}),window.odpbjs=window.odpbjs||{que:[]},this.setup&&this.setup.pbAlias&&(window[this.setup.pbAlias]=window.odpbjs),window.odpbjs.renderAd=function(t,e){window.odT.bidsFromOe&&window.odT.bidsFromOe.length&&window.odT.bidsFromOe.forEach(i=>{if(i.bidId===e)try{const o=t?.defaultView?.frameElement;o&&(o.width=i.w,o.height=i.h),t.write(i.adm);const n=window.odT.bidsFromOe.findIndex(t=>t.bidId===e);-1!==n&&window.odT.bidsFromOe.splice(n,1)}catch(t){}})};try{const t=window.odT?.setup?.videoInstreamSetup,e=t&&"object"==typeof t&&!Array.isArray(t)&&Array.isArray(t.videoAdSlotConfigurations)&&t.videoAdSlotConfigurations.length>0;this.instreamModule=e?new f(t):null,window.optidigitalToolbox.getVideoInstreamAds=this.instreamModule.getVideoInstreamAds.bind(this.instreamModule)}catch(t){}this.openConnection(),this.bootstrapConsent(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{if(document.body)window.odT.startODT();else{let t=setInterval(()=>{document.body&&(window.odT.startODT(),clearInterval(t))},10)}}):window.odT.startODT()}getVideoInstreamAds(t,e,i){if(void 0===this.instreamModule){const t=this.setup?.videoInstreamSetup,e=t&&"object"==typeof t&&!Array.isArray(t)&&Array.isArray(t.videoAdSlotConfigurations)&&t.videoAdSlotConfigurations.length>0;this.instreamModule=e?new f(t):null}this.instreamModule&&this.instreamModule.getVideoInstreamAds(t,e,i)}startODT(){window?.odT?.setup?.[`lightPackageAndAmazon${window.odT.screen}`]&&window.odT.loadAPS(),window.odT.analytics.registerPerformanceObserver(),window.odT.processCommandQueue(),window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode||window.odT.setDefaultSizes()}setAdLayout(t,e,i,o,n,d,s){let a,r,l,c,u,p,g={optidigitalWrapper:{display:"flex","align-items":"center","justify-content":"center",width:"100%"},logoLoading:{"background-image":"url('https://scripts.opti-digital.com/img/optidigital_logo.svg')","background-position":"center","background-repeat":"no-repeat","background-size":"50px 50px"},addBackground:{"background-color":"transparent"},optidigitalBrand:{src:"https://scripts.opti-digital.com/img/optidigital_logo.svg",alt:"Optidigital Logo",link:`https://www.optidigital.com/?utm_medium=aio&utm_source=${window.location.host&&window.location.host.replace("www.","")}`,text:"Powered by",textCss:{}},reverse:!1,important:"important",customCss:"",adslotMinHeight:!0,sticky:!0,stickyTop:{769:"0",768:"67",525:"10"},fitContent:!1,width100:!0,checkParentOverflow:!1},w={"font-size":"13px","font-family":"Verdana",padding:"5px 0",margin:"0"},f=function t(e,...i){if(!i.length)return e;const o=i.shift();for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]instanceof Object?(e[i]||Object.assign(e,{[i]:{}}),t(e[i],o[i])):Object.assign(e,{[i]:o[i]}));return t(e,...i)}({},g,t),h=f.reverse?"column-reverse":"column";requestAnimationFrame(()=>{let t=function(t){let e,i,o,n=t,d=0;for(;n&&(e=window.getComputedStyle(n),i=parseFloat(e.paddingLeft),o=parseFloat(e.paddingRight),d=n.clientWidth-i-o,!(d>0));)n=n.parentElement;return d}(e);a=o>=t?t+"px":o+"px";let n=i;if(1==f.adslotMinHeight){if(f.optidigitalWrapper["padding-top"]&&(i+=parseFloat(f.optidigitalWrapper["padding-top"].slice(0,-2))),f.optidigitalWrapper["padding-bottom"]&&(i+=parseFloat(f.optidigitalWrapper["padding-bottom"].slice(0,-2))),f.optidigitalBrand&&(i+=20),f.addText&&e.getAttribute("id")&&5!==s){if(f.addText["font-size"]?i+=parseFloat(f.addText["font-size"]):i+=parseFloat(w["font-size"]),f.addText.padding){let t=f.addText.padding.split(" ");1===t.length||2===t.length?i+=2*parseFloat(t[0]):3!==t.length&&4!==t.length||(i+=parseFloat(t[0])+parseFloat(t[2]))}f.addText["padding-top"]&&(i+=parseFloat(f.addText["padding-top"])),f.addText["padding-bottom"]&&(i+=parseFloat(f.addText["padding-bottom"])),f.addText.padding||f.addText["padding-top"]||f.addText["padding-bottom"]||(i+=10)}if(f.addBackground&&"transparent"!==f.addBackground["background-color"]&&!1===f.optidigitalBrand){let t=f.optidigitalWrapper.hasOwnProperty("padding-bottom")?f.optidigitalWrapper["padding-bottom"]:"15px";i+=parseFloat(t)}if(!f.addText&&"transparent"!==f.addBackground["background-color"]&&e.getAttribute("id")&&5!==s){let t=f.optidigitalWrapper.hasOwnProperty("padding-top")?f.optidigitalWrapper["padding-top"]:"15px";r=t,i+=parseFloat(t)}l=i+"px"}let d=e.parentElement;if(d){let t=getComputedStyle(d);!f.forceTextAndBranding&&"number"==typeof parseFloat(t.height)&&parseFloat(t.height)>0&&"number"==typeof parseFloat(t["min-height"])&&parseFloat(t["min-height"])!==parseFloat(t.height)&&parseFloat(t.height)<parseFloat(l)&&(f.optidigitalBrand=!1,f.addText=!1,l=n+"px",c=!0)}let g=e.getBoundingClientRect().width,h=screen.width;if(0===g&&(g=h),u=h,p=(h-g)/2,f.sticky){if(f.checkParentOverflow){let t=e.parentElement;for(;t&&"body"!==t.nodeName.toLowerCase()&&"html"!==t.nodeName.toLowerCase();)"visible"!==getComputedStyle(t).overflow&&(t.style.overflow="clip"),t=t.parentElement}if(e&&(!f.hasOwnProperty("optidigitalBrand")||!1===f.optidigitalBrand))if(e.style.setProperty("position","sticky",f.important),f.hasOwnProperty("stickyTop")){e.style.setProperty("top","0",f.important);for(const t in f.stickyTop)screen.width>t&&e.style.setProperty("top",f.stickyTop[t]+"px",f.important)}else e.style.setProperty("top","0",f.important)}}),requestAnimationFrame(()=>{let t=document.createElement("div");if(t.setAttribute("data-optidigital-slot","true"),t.className="optidigital-wrapper-div",f.nosnippet&&t.setAttribute("data-nosnippet",""),f.hasOwnProperty("optidigitalWrapper")){for(const[e,i]of Object.entries(f.optidigitalWrapper))t.style.setProperty(e,i,f.important);e.getAttribute("id")&&5===s&&t.style.setProperty("padding","0",f.important),d&&t.style.setProperty("justify-content","top"===d?"flex-start":"center"===d?"center":"flex-end",f.important)}if(t.style.setProperty("min-width",a,f.important),t.style.setProperty("flex-direction",h,f.important),t.style.setProperty("padding-top",r,f.important),t.style.setProperty("min-height",l,f.important),f.hasOwnProperty("addBackground")&&(e.getAttribute("id")&&5!==s||f.addBackground.enableSticky)){let e=f.optidigitalWrapper.hasOwnProperty("padding-bottom")?f.optidigitalWrapper["padding-bottom"]:"15px";f.fitContent?(t.style.setProperty("background-color",f.addBackground["background-color"],f.important),t.style.setProperty("width","fit-content",f.important),t.style.setProperty("margin-left","auto",f.important),t.style.setProperty("margin-right","auto",f.important)):t.style.setProperty("background-color",f.addBackground["background-color"],f.important),!1!==f.optidigitalBrand||"transparent"===f.addBackground["background-color"]||c||t.style.setProperty("padding-bottom",e,f.important)}if(e&&(e.parentNode.classList.contains("optidigital-brand")||(e.parentNode.insertBefore(t,e),t.appendChild(e))),u<525&&t.parentElement&&"opd_bottomstickyad"!==t.parentElement.getAttribute("id"))if("100%"===f[`wDivWidth${odT.screen}`])t.style.setProperty("width","100%","important");else{t.style.setProperty("width",`${u}px`,"important");const e="rtl"===document?.documentElement?.dir||"rtl"===document?.body?.dir;t.style.setProperty(e?"margin-right":"margin-left",`-${p}px`,"important")}if(e.closest(".optidigital-wrapper-div")&&e.getAttribute("id")&&(e.getAttribute("id").includes("Content")||e.getAttribute("id").includes("Mobile_Pos")||e.getAttribute("id").includes("Mobile_AI"))&&("".includes("margin-top")||(e.closest(".optidigital-wrapper-div").style.cssText+="margin-top:1em;"),"".includes("margin-bottom")||(e.closest(".optidigital-wrapper-div").style.cssText+="margin-bottom:1em;"),e.style.marginTop=0,e.style.marginBottom=0),f.hasOwnProperty("logoLoading")&&f.logoLoading){let i=Number(l.replace("px",""));i&&i<50&&(f.logoLoading["background-size"]="auto");for(const[i,o]of Object.entries(f.logoLoading))e&&t.style.setProperty(i,o,f.important)}if(f.hasOwnProperty("addText")&&!1!==f.addText&&e.getAttribute("id")&&5!==s){let t=document.createElement("div");t.className="optidigital-text-ads";for(const[e,i]of Object.entries(w))t.style.setProperty(e,i,f.important);if(Object.entries(f.addText).length)for(const[e,i]of Object.entries(f.addText))t.style.setProperty(e,i,f.important);t.style.setProperty("line-height","1"),t.style.setProperty("display","none"),t.style.setProperty("position","static",f.important);let i=document.createElement("span");f.addText.hasOwnProperty("font-size")?i.style.setProperty("font-size",f.addText["font-size"],f.important):i.style.setProperty("font-size",w["font-size"],f.important);let o="La suite après la publicité",n="Publicité";f.addText.textdesktop&&(n=f.addText.textdesktop),f.addText.textmobile&&(o=f.addText.textmobile),i.textContent=window.matchMedia("(min-width: 760px)").matches?n:o,i.style.setProperty("position","static",f.important),t.append(i),e&&e.before(t)}if(f.hasOwnProperty("optidigitalBrand")&&f.optidigitalBrand){if(f.optidigitalBrand.hasOwnProperty("disableBrandStickyFormat")&&f.optidigitalBrand.disableBrandStickyFormat&&e.getAttribute("id")&&5===s)return!1;let t=document.createElement("div");t.className="optidigital-brand",t.style.setProperty("display","flex",f.important),t.style.setProperty("flex-direction",h,f.important),t.style.setProperty("margin","0",f.important),f.width100&&(t.style.setProperty("width","100%",f.important),t.style.setProperty("align-items","center",f.important));let i="";if(f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link){let t=e&&e.getAttribute("id")?e.getAttribute("id"):"";t=t.replace(odT.divIdPrefix,""),i=`<div class="optidigital-brand-logo" style="display:none;"><a href="${f.optidigitalBrand.link}${t?"&utm_campaign="+t:""}" ${!1===f.optidigitalBrand.optidigitalBrandNoFollow?"":"rel='nofollow'"} class="optidigital-brand-logo-link" target="_blank"></a></div>`}else i=`<div class="optidigital-brand-logo" style="display:none;"><img align="right" src="${f.optidigitalBrand.src}" alt="${f.optidigitalBrand.alt}"/></div>`;if(f.sticky&&t){if(t.style.setProperty("position","sticky",f.important),f.hasOwnProperty("stickyTop")){t.style.setProperty("top","0",f.important);for(const e in f.stickyTop)u>e&&t.style.setProperty("top",f.stickyTop[e]+"px",f.important)}else t.style.setProperty("top","0",f.important);e.classList.remove("optidigital-ad-center-sticky")}if(e&&(e.parentNode.classList.contains("optidigital-brand")||(e.parentNode.insertBefore(t,e),t.appendChild(e),e.insertAdjacentHTML("afterend",i))),document.querySelector(".optidigital-brand-logo")&&!document.getElementById("optidigital-layout-style")){let t=document.createElement("style");t.id="optidigital-layout-style";let e=`.optidigital-brand-logo {opacity: 0; transition: opacity 2s; text-align: right; line-height: 1!important; height: 20px!important; margin: 0!important; } .optidigital-brand-logo.optidigital-brand-logo-active { opacity: 1; } .optidigital-brand-logo .optidigital-brand-logo-link {display: inline-block; color: transparent !important; border: none!important; text-decoration: none; box-shadow: none!important; height: 15px!important; background: url(${f.optidigitalBrand.src}) no-repeat right!important; background-size: 13px!important; padding: 0; margin: 3px 0 0 0; width: auto; min-width:${f.optidigitalBrand.textCss["min-width"]?f.optidigitalBrand.textCss["min-width"]:"85px"}!important; letter-spacing: normal!important; } .optidigital-brand-logo img { margin: 1px 0 0 0!important; padding: 0!important; width: 13px!important; height: auto !important; } ${f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link?".optidigital-brand-logo a":".optidigital-brand-logo"}{ position: relative !important; top: 0!important; } ${f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link?".optidigital-brand-logo a":".optidigital-brand-logo"}::before {content: "${f.optidigitalBrand.text?f.optidigitalBrand.text:""}"; position: absolute!important; top: ${f.optidigitalBrand.textCss.top?f.optidigitalBrand.textCss.top:"2px"}!important; right: ${f.optidigitalBrand.textCss.right?f.optidigitalBrand.textCss.right:"16px"}!important; font-size: ${f.optidigitalBrand.textCss["font-size"]?f.optidigitalBrand.textCss["font-size"]:"11px"}!important; line-height: ${f.optidigitalBrand.textCss["line-height"]?f.optidigitalBrand.textCss["line-height"]:"11px"}!important; font-family: ${f.optidigitalBrand.textCss["font-family"]?f.optidigitalBrand.textCss["font-family"]:"Verdana"}!important; color: ${f.optidigitalBrand.textCss.color?f.optidigitalBrand.textCss.color:"#888888"}!important; font-weight: normal!important; }`;t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}}if(e.parentNode.classList.contains("optidigital-brand")&&f.sticky&&e.style.setProperty("position","static",f.important),"auto"===f[`adDivWidth${odT.screen}`]?e.style.setProperty("width","auto",f.important):e.style.setProperty("width","100%",f.important),f.hasOwnProperty("adDivStyle"))for(const[t,i]of Object.entries(f.adDivStyle))e&&e.style.setProperty(t,i,f.important);if(f.hasOwnProperty("customCss")){const t=document.createElement("style");t.textContent=f.customCss,document.head.appendChild(t)}})}loadLibs(){var t;function e(t,o){var n=i();return(e=function(t,e){return n[t-=456]})(t,o)}function i(){var t=["candidatesData","450TlPpUN","wrapperClass","parentElement","secureCandidateAdder","optidigital","previousTypeExtra","version","parentNode","nextElementSibling","verifyKeepDistanceFromTheBottom failed","_extendDefaults","Crawling DOM searching for possible candidates","forbiddenElements","insertOne","parentDiv","intervalIncrement","dontBreakWithPreviousType","insertInRead","keepTheDistancePx","1735LdfHMK","Step out ","Crawling DOM for candidates finished","_setupForbidden","pop","getBoundingClientRect","getElementsByClassName","topWithDistance","insertAtTheEnd","createElement","from","none","getElementById","infiniteScroll","verifyKeepTheDistanceFrom failed","debug","random","wrapperTag","length","block","verbose","debugLevel","keepDistanceFromBottom","557058HByNRb","invisible","useXPath","tagName","2.2.11","stepOut","getComputedStyle","readDOM","stepIn","appendChild","floor","parentDiv selector missing !","height","getInsertedAds","omitInvisible","color","14154UpmHDx","FIRST_ORDERED_NODE_TYPE","insertBefore","innerHTML","minHeight","error","createAdSlotElement","insertedAds","isOptiDiv","verifyInterval failed","style","exports","25150xPRwoq","insertAdslotIntoTarget","background","adsTag","top","previousType","getContainer","replace","81Hlizbw","includes","interval","recurrenceLevel","8UIFSTG","1396692myCUWX","keepDistanceFromTheBottom","bottom","presentLevel","children","every","setAttribute","classList","keepDistancePx","keepDistanceFromTheTop","display","info","data-adslot-id","forbidden","9912kaukii","insertAdslotBeforeTarget","nextSibling","verifyKeepDistanceFromTheTop failed","396583dGAPEZ"," <= ","className","_insertAll","Insertion start","_overrideTheOptions","getAttribute","parentContainer","2548553ipUeCg","keepDistanceFrom","push","domToolkit","candidateElements","optidigital-adslot-","isOptiClass","nextElement","infiniteAdslot","candidate:","adsCount","adSlots","positionFirst","reverse","isVisible","keepTheDistanceFrom","divIdPrefix","previousTypeClass","log","OptiDigital Smart Inserter","forEach","evaluate","__setupSingleForbidden","toLocaleLowerCase","logger","keepDistanceFromTop","singleNodeValue"];return(i=function(){return t})()}(()=>{var t={895:(t,e,i)=>{var o,n,d;function s(t,e){var i=a();return s=function(e,o){var n=i[e-=393];if(void 0===s.KIyUjI){var d=function(t){for(var e,i,o="",n="",s=o+d,a=0,r=0;i=t.charAt(r++);~i&&(e=a%4?64*e+i:i,a++%4)?o+=s.charCodeAt(r+10)-10!=0?String.fromCharCode(255&e>>(-2*a&6)):a:0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var l=0,c=o.length;l<c;l++)n+="%"+("00"+o.charCodeAt(l).toString(16)).slice(-2);return decodeURIComponent(n)};s.rYuNnP=d,t=arguments,s.KIyUjI=!0}var a=e+i[0],r=t[a];if(r)n=r;else{var l=function(t){this.ylGxOJ=t,this.QFRlrM=[1,0,0],this.MYLxhs=function(){return"newState"},this.lRKEDe="\\w+ *\\(\\) *{\\w+ *",this.bxjPTs="['|\"].+['|\"];? *}"};l.prototype.iLVXgA=function(){var t=new RegExp(this.lRKEDe+this.bxjPTs).test(this.MYLxhs.toString())?--this.QFRlrM[1]:--this.QFRlrM[0];return this.zcekba(t)},l.prototype.zcekba=function(t){return Boolean(~t)?this.IVHzJZ(this.ylGxOJ):t},l.prototype.IVHzJZ=function(t){for(var e=0,i=this.QFRlrM.length;e<i;e++)this.QFRlrM.push(Math.round(Math.random())),i=this.QFRlrM.length;return t(this.QFRlrM[0])},new l(s).iLVXgA(),n=s.rYuNnP(n),t[a]=n}return n},s(t,e)}function a(){var t=["Dw5KzwzPBMvK","Dg9tDhjPBMC","mtGZmda4mffcC3zhuq","zgvMAw5LuhjVCa","kcGOlISPkYKRkq","yxbWBhK","y2vPBa","y29UC3rYDwn0BW","zNjVBunOyxjdBW","Dg9tDhjPBMDuyq","zxHWB3j0CW","Eg9YrgvJCNLWDa","ohL6y0PmtW","BgvUz3rO","nZy5Du9nsxzq","mtu3nhbpDunIuG","B2jQzwn0","zNvUy3rPB24","mtC1ote2mxDyr3DQqW","nJyZndbWrhruAxy","DMfSDwu","AgfZt3DUuhjVCa","mJqYmZK0AMTXDhLd","zxj0Eq","zNjVBunVzgvqBW","x19LC01VzhvSzq","C2vHCMnO","yw1K","vvrgoefYCLrVuW","ChjVDg90ExbL","y2HHCKnVzgvbDa","tw9KDwXL","tw9KDwXLCW","mtmWwwflqKTV","Aw50","B0fYCG","mZiYmtC5m0PdBM92qq","y2fSBa","mta1ota4nLPywfPwEq"];return(a=function(){return t})()}t=i.nmd(t),function(t){for(var e=s,i=t();;)try{if(393714==parseInt(e(419))/1*(parseInt(e(420))/2)+parseInt(e(423))/3+parseInt(e(424))/4*(-parseInt(e(399))/5)+-parseInt(e(427))/6+-parseInt(e(404))/7+parseInt(e(417))/8*(-parseInt(e(402))/9)+parseInt(e(407))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(a),function(a,r){var l,c=s,u=(l=!0,function(t,e){var i=l?function(){if(e){var i=e[s(410)](t,arguments);return e=null,i}}:function(){};return l=!1,i}),p=u(this,function(){var t=s;return p[t(406)]()[t(431)](t(409)+"+$")[t(406)]()[t(412)+"r"](p)[t(431)](t(409)+"+$")});p(),c(421)==typeof e&&"object"==c(421)?t[c(415)]=r():"function"==c(422)&&i.amdD[c(393)]?(n=[],void 0===(d="function"==typeof(o=r)?o.apply(e,n):o)||(t.exports=d)):c(421)==typeof e?e[c(398)]=r():a[c(398)]=r()}(self,()=>(()=>{var t=s,e={d:(t,i)=>{var o=s;for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object[o(408)+o(428)](t,n,{enumerable:!0,get:i[n]})},o:(e,i)=>Object[t(395)][t(426)+t(428)][t(403)](e,i),r:e=>{var i=t,o={};o[i(425)]=i(397);var n={};n[i(425)]=!0,i(405)!=typeof Symbol&&Symbol.toStringTag&&Object[i(408)+i(428)](e,Symbol[i(414)+"g"],o),Object[i(408)+"erty"](e,i(430),n)}},i={};function o(e,i){var o=t;const n=e.replace(/[^A-Za-z0-9+/]/g,""),d=n.length,s=i?Math[o(411)]((3*d+1>>2)/i)*i:3*d+1>>2,a=new Uint8Array(s);let r,l,c=0,u=0;for(let t=0;t<d;t++)if(l=3&t,c|=((p=n.charCodeAt(t))>64&&p<91?p-65:p>96&&p<123?p-71:p>47&&p<58?p+4:43===p?62:47===p?63:0)<<6*(3-l),3===l||d-t==1){for(r=0;r<3&&u<s;)a[u]=c>>>(16>>>r&24)&255,r++,u++;c=0}var p;return a}function n(e){var i=t;let o,n="";const d=e[i(418)];for(let t=0;t<d;t++)o=e[t],n+=String[i(429)+i(400)](o>251&&o<254&&t+5<d?1073741824*(o-252)+(e[++t]-128<<24)+(e[++t]-128<<18)+(e[++t]-128<<12)+(e[++t]-128<<6)+e[++t]-128:o>247&&o<252&&t+4<d?(o-248<<24)+(e[++t]-128<<18)+(e[++t]-128<<12)+(e[++t]-128<<6)+e[++t]-128:o>239&&o<248&&t+3<d?(o-240<<18)+(e[++t]-128<<12)+(e[++t]-128<<6)+e[++t]-128:o>223&&o<240&&t+2<d?(o-224<<12)+(e[++t]-128<<6)+e[++t]-128:o>191&&o<224&&t+1<d?(o-192<<6)+e[++t]-128:o);return n}function d(e,i){for(var o=t,n="",d=0;d<e[o(418)];d++){var s=e.charCodeAt(d),a=i[o(396)](d%i.length);n+=String[o(413)+"de"](s^a)}return n}var a={};return a[t(394)+"tr"]=()=>n,a["base64DecT"+t(401)]=()=>o,a[t(416)]=()=>d,e.r(i),e.d(i,a),i})())}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var d=e[o]={id:o,loaded:!1,exports:{}};return t[o](d,d.exports,i),d.loaded=!0,d.exports}i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t=i(895),e=function(){var e={config:{},dNR:1,dDevice:"30001",rand:0,randInterstitial:0,samplingInterstitial:25,unitTemplate:"%AU%|%C1%|%NR%|%D%|%C%",seed:100,acceptedConsents:["nocmp","nocmp_api","CMPv2_OOS","CMPv2_GAMokHBok","CMPv2_GAMokHBko"],params:Object.fromEntries(new URLSearchParams(window.location.search).entries()),debug:!1,pubId:0,initConfig:{},i4n3i2tConfig:{},clientDebug:!1,forceDebugPf:!1,pfDebug:void 0,pbjsCustomFloorsConfig:!1,pbjs:void 0,sourceID:void 0,sourceRatio:void 0,pfUnits:{},pbjsEvents:{addAdUnitsEvent:void 0,beforeBidRequestEvent:void 0},conf:{ma:!1},ABModeSplit:!1,randAB:0,ABgroupB:!1,aed:[{max:.01,min:0},{max:.25,min:.01},{max:.5,min:.25},{max:.75,min:.5},{max:1,min:.75},{max:1.25,min:1},{max:1.5,min:1.25},{max:1.75,min:1.5},{max:2,min:1.75},{max:3,min:2},{min:3}],logS:"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;",logC:"color:#1E90FF",logP:"%cOYSDK:%c ",oy_mode_enum:Object.freeze({INACTIVE:"0",YIELD:"1",LASTLOOK:"2",HYBRID:"3"})};function i(t,e){return t.hasOwnProperty(e)}function o(t){if(void 0===t||void 0===t.adUnitPath)return{haveParent:!1,floorConfig:t};const e=t.adUnitPath.match(/(?<dirname>.*)\//);return null!=e&&i(e,"groups")&&void 0!==e.groups&&e.groups.dirname?(t.adUnitPath=e.groups.dirname,{haveParent:!0,floorConfig:t}):{haveParent:!1,floorConfig:t}}function n(t,o=""){let n="";try{n=a(t)}catch(t){}let s=window.odT.cyrb53(n,e.seed);e.debug&&console.log(e.logP+o+" pfUnit "+s+" was encrypted "+n,e.logS,e.logC);let r=function(t,o,n=""){if(!(i(e.config,"cur")&&i(e.config.cur,"code")&&e.config.cur.code.gam&&e.config.cur.code.amazon&&e.config.cur.code.prebid&&i(e.config.cur,"ratio")&&e.config.cur.ratio.gam&&e.config.cur.ratio.amazon&&e.config.cur.ratio.prebid))return;let s={imps:0,unfilled:0,firstUnfilled:0,pf:{def:!1,defgam:"0.00",defprebid:"0.00",defamazon:"0.00"}};if(!i(e.config,t)){e.conf?.spf?(s.is_small=!0,s.tf=87):(s.tf=0,s.ae=0),s.oy_mode=e.oy_mode_enum.LASTLOOK,e.pfUnits[t]=s,e.debug&&console.log("%cOYSDK:%c pfUnit: "+t+" configured as SMALL pfUnit","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF");const i=d(window.location.hostname,window.odT.checkBrowser,o.adUnitPath,o.customDimensions?.cd1);return null!=i&&(s.pf.def=!0,s.pf.defgam=window.odT.getCpmStringValue(i,e.config.pbd),s.pf.defprebid=(s.pf.defgam*e.config.cur.ratio.prebid).toFixed(2),s.pf.defamazon=(s.pf.defgam*e.config.cur.ratio.amazon).toFixed(2)),e.pfUnits[t]}if(void 0!==e.pfUnits[t])return e.pfUnits[t];var a;s.pf.gam="0.00",s.pf.prebid="0.01",s.pf.amazon="0.01",s.tf=e.config[t]?.tf||0,s.ae=e.config[t]?.ae||0,s.oy_mode=(a=e.config[t])&&0===Object.keys(a).length?e.oy_mode_enum.INACTIVE:!("ll"in a)&&a?.pf?e.oy_mode_enum.HYBRID:"ll"in a&&!a.ll?e.oy_mode_enum.YIELD:"pf"in a?(e.debug&&console.warn("%cOYSDK:%c Issue with oy_mode extraction. Invalid configuration for pfUnit: "+a,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),e.oy_mode_enum.INACTIVE):e.oy_mode_enum.LASTLOOK,e.debug&&console.log("%cOYSDK:%c pfUnit: "+t+" oy_mode set to = "+s.oy_mode+" ("+Object.keys(e.oy_mode_enum).find(t=>e.oy_mode_enum[t]===s.oy_mode)+")","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),s.status=e.config[t].status;let r=w(e.config[t]),l=e.sourceRatio?e.sourceRatio:1;var c=(e.config[t]?.pf||0)*e.config.cur.ratio.gam*r*l;s.pf.cr=1,s.pf.gam=window.odT.getCpmStringValue(c,e.config.pbd),s.pf.prebid=(s.pf.gam*e.config.cur.ratio.prebid).toFixed(2),s.pf.amazon=(s.pf.gam*e.config.cur.ratio.amazon).toFixed(2);const u=d(window.location.hostname,window.odT.checkBrowser,o.adUnitPath,o.customDimensions?.cd1);return null!=u&&(s.pf.def=!0,s.pf.defgam=window.odT.getCpmStringValue(u,e.config.pbd),s.pf.defprebid=(s.pf.defgam*e.config.cur.ratio.prebid).toFixed(2),s.pf.defamazon=(s.pf.defgam*e.config.cur.ratio.amazon).toFixed(2)),s.oy_mode==e.oy_mode_enum.LASTLOOK&&(s.pf.gam=s.pf.defgam,s.pf.prebid=s.pf.defprebid,s.pf.amazon=s.pf.defamazon),"0.00"==s.pf.amazon&&(s.pf.amazon="0.01"),"0.00"==s.pf.prebid&&(s.pf.prebid="0.01"),e.pfUnits[t]=s,e.debug&&console.log(e.logP+n+" pfUnit "+t+" pf_bucket:"+s.pf.gam+" pf_calculated: "+c+" pf_orig: "+e.config[t]?.pf+" ratio_gam: "+e.config.cur.ratio.gam+" tbr: "+r+" sbr: "+l,e.logS,e.logC),e.pfUnits[t]}(s,t,o);return{pfUnit:s,pfUnitObj:r}}function d(t,i,o,n){if(!e?.config?.defpf)return;const d="string"==typeof i?i.toLowerCase():"",s=e.config.defpf,a=[`${d}|${t}|${n}|${o}`,`${d}|${t}|${n}|*`,`${d}|${t}|*|${o}`,`${d}|${t}|*|*`,`${d}|*|${n}|${o}`,`${d}|*|${n}|*`,`${d}|*|*|${o}`,`${d}|*|*|*`,`*|${t}|${n}|${o}`,`*|${t}|${n}|*`,`*|${t}|*|${o}`,`*|${t}|*|*`,`*|*|${n}|${o}`,`*|*|${n}|*`,`*|*|*|${o}`,"*|*|*|*"];for(const t of a)if(void 0!==s[t])return s[t]}function s(t){if("string"!=typeof t)return t;let e=t;return e.startsWith("/")||(e="/"+e),e=e.replace(/,([^/]*\/)/,"/"),e}function a(t){var o=e.unitTemplate;if(!t)throw"Configuration is missing.";if(!i(t,"adUnitPath"))throw"AdUnitPath is missing. Check the configuration.";{let e=s(t.adUnitPath);o=o.replace("%AU%",e.toLowerCase())}return i(t,"customDimensions")&&Object.keys(t.customDimensions).length>0&&Object.entries(t.customDimensions).forEach(([t,e],i)=>{e&&(o=o.replace(`%C${t.substring(2)}%`,e.toLowerCase()))}),o}function r(t){var o="od_pf_ab";i(e.conf,"ab_key")&&(o=e.conf.ab_key);var n="1";return i(e.conf,"ab_values")?Array.isArray(e.conf.ab_values)&&0!=e.conf.ab_values.length&&(e.conf.ab_values.length>1?n=t?e.conf.ab_values[1]:e.conf.ab_values[0]:t&&(n=e.conf.ab_values[0])):n=t?"1":"0",{abKey:o,abValue:n}}function l(t,i,o){return i===e.oy_mode_enum.LASTLOOK?o?`${t}_2`:`${t}_1`:e.oy_mode_enum.YIELD===i||e.oy_mode_enum.HYBRID===i?o?`${t}_5`:`${t}_4`:`${t}_${i}`}function c(t){var o=!1;return(t.isEmpty||i(e.conf,"hcid")&&null!==t.advertiserId&&e.conf.hcid.includes(t.advertiserId))&&(o=!0),o}function u(){window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("slotRenderEnded",function(t){(function(t,o){let n=function(t,o){let n=p(t),d=!1,s="";try{s=a(n)}catch(t){return d}s=window.odT.cyrb53(s,e.seed);let r=e.pfUnits[s];if(void 0===r||!e.config[s])return d;if(c(o)){0==r.firstUnfilled&&(r.firstUnfilled=r.imps+1);var l=.5;i(e.conf,"rd")&&(l=e.conf.rd),r.pf.cr=r.pf.cr*l,d=!0,r.unfilled++}else{var u=1.15;i(e.conf,"ru")&&(u=e.conf.ru);var g=r.pf.cr*u;g<1&&(r.pf.cr=g,d=!0),r.imps++}if(d){var f=w(e.config[s]),h=(e.config[s]?.pf||0)*e.config.cur.ratio.gam*r.pf.cr*f;r.pf.gam=window.odT.getCpmStringValue(h,e.config.pbd),r.pf.prebid=(r.pf.gam*e.config.cur.ratio.prebid).toFixed(2),r.pf.amazon=(r.pf.gam*e.config.cur.ratio.amazon).toFixed(2),r.oy_mode==e.oy_mode_enum.LASTLOOK&&(r.pf.gam=r.pf.defgam,r.pf.prebid=r.pf.defprebid,r.pf.amazon=r.pf.defamazon),"0.00"==r.pf.amazon&&(r.pf.amazon="0.01"),"0.00"==r.pf.prebid&&(r.pf.prebid="0.01"),e.debug&&console.log(e.logP+"REFRESH pfUnit "+s+" pf_bucket:"+r.pf.gam+" pf_calculated: "+h+" pf_orig: "+e.config[s]?.pf+" ratio_gam: "+e.config.cur.ratio.gam+" tbr: "+f+" ratio_refresh:"+r.pf.cr,e.logS,e.logC)}return d}(t,o);if(n){if(window.odT.loadCoreFinished){let t=window.odT.getPbjs(e);void 0!==t&&t.que.push(function(){window.optiyield.setPrebidFloors(t.adUnits,window.odT.setP)})}g(t)}})(t.slot,t),function(t){if(t.slot.getOutOfPage()){if(e.randInterstitial>e.samplingInterstitial)return;let i=window.odT.cyrb53(a(p(t.slot)),e.seed);if(void 0===e.config[i])return;let o=t.slot.getConfig("targeting")?.targeting?.od_pf_group?.[0];void 0===o&&(o="0");let n=t.slot.getConfig("targeting")?.targeting?.od_pf_ta?.[0];void 0===n&&(n="oop_0_0");let d=0;c(t)&&(d=1);try{fetch(`https://optiyield-analytics.opti-digital.com/pfc/interstitial?pfunit=${i}&pubid=${e.pubId}&unfilled=${d}&od_pf_group=${o}&s=${e.samplingInterstitial}&od_pf_ta=${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}catch(t){}}}(t)})})}function p(t){let o={adUnitPath:s(t.getAdUnitPath()),customDimensions:{}};return i(e.initConfig,"gtpCustomDimensionKey")?Object.entries(e.initConfig.gtpCustomDimensionKey).forEach(([e,i],n)=>{o.customDimensions[e]=t.getConfig("targeting")?.targeting?.[i]?.[0]}):i(e.initConfig,"gptCustomDimensionKey")?Object.entries(e.initConfig.gptCustomDimensionKey).forEach(([e,i],n)=>{o.customDimensions[e]=t.getConfig("targeting")?.targeting?.[i]?.[0]}):i(e.conf,"gcdk")&&Object.entries(e.conf.gcdk).forEach(([e,i],n)=>{o.customDimensions[e]=t.getConfig("targeting")?.targeting?.[i]?.[0]}),o.interstitial=!1,t.getOutOfPage()&&(o.interstitial=!0),o}function g(t,o=!1){let n=window.optiyield.getFloors(p(t),"GPT",o);1==n.pfStatus?(n?.pf?.gam&&t.setConfig({targeting:{od_pf_pb:n.pf.gam}}),t.setConfig({targeting:{od_pf_group:(n?.group??0).toString()}}),i(n,"tf")&&(t.setConfig({targeting:{od_pf_ta:n.kv_ta}}),t.setConfig({targeting:{od_pf_mta:n.kv_mta}}),t.setConfig({targeting:{od_pfg:"1"}})),n?.kv_pff&&1==n?.group&&t.setConfig({targeting:{od_pf_filter:n.kv_pff}})):(t.setConfig({targeting:{od_pf_group:"0"}}),i(n,"tf")&&(t.setConfig({targeting:{od_pf_ta:n.kv_ta}}),t.setConfig({targeting:{od_pf_mta:n.kv_mta}}),t.setConfig({targeting:{od_pfg:"1"}}))),e.sourceID&&t.setConfig({targeting:{od_pf_sbr:e.sourceID.toString()}}),e.debug&&console.log(e.logP+` GPT ${1==n.pfStatus?`configure a price floor (${n.pf.gam})`:"doesn't find a price floor"} ADSlot ID: ${t.getSlotElementId()}`,e.logS,e.logC)}function w(t){return function(t,e,o){if(void 0===e)return 1;let n;if(i(e,o))n=e[o];else{if(!i(e,"0"))return 1;n=e[0]}let d=n.find(function(e){if(t<=e.h&&t>=e.l)return e});return d&&i(d,"r")?d.r:1}((new Date).getHours(),e.conf.tbc,t.tbc)}function f(t){return e.oy_mode_enum.YIELD===t?.oy_mode||e.oy_mode_enum.HYBRID===t?.oy_mode}return class{constructor(){}_d1spl4yS9ts(){try{console.log(e.pfUnits)}catch(t){console.error(t)}}_0i4n3i2t(o,n,d,s){try{if(window.optiyield._ready)return;if(window.optiyield._ready=!0,e.pubId=o,s&&"object"==typeof s&&(e.i4n3i2tConfig={...s}),"boolean"==typeof window?.top?.op5tiRyi1eld_dTeb9ugP&&window?.top?.op5tiRyi1eld_dTeb9ugP&&(e.debug=!0),(e.params&&"true"===e.params.optiyield_debug||"true"===sessionStorage.getItem("optiyield_debug"))&&(e.forceDebugPf=!0,e.clientDebug=!0),(e.params&&"false"===e.params.optiyield_debug||"false"===sessionStorage.getItem("optiyield_debug"))&&(e.forceDebugPf=!1,e.clientDebug=!0),e.params&&void 0!==e.params.optiyield_pf&&(e.pfDebug=e.params.optiyield_pf),e.debug&&console.log(e.logP+" version 4.0.31",e.logS,e.logC),n&&"object"==typeof n){if(n.ut){var a,r=(0,t.base64DecToArr)(n.ut),l=(0,t.UTF8ArrToStr)(r);a="number"==typeof o?o.toString():o,e.unitTemplate=(0,t.xorDecrypt)(l,a)}i(n,"conf")&&(e.conf=n.conf,i(e.conf,"si")&&(e.samplingInterstitial=e.conf.si))}var c=navigator.userAgent.toLowerCase();-1!=c.indexOf("safari")?-1==c.indexOf("chrome")&&(e.dNR=0):-1!=c.indexOf("firefox")&&(e.dNR=0),e.config={...n},e.unitTemplate=e.unitTemplate.replace("%NR%",e.dNR),e.rand=Math.floor(Math.random()*Math.floor(100)),e.randInterstitial=Math.floor(Math.random()*Math.floor(100)),e.randAB=Math.floor(Math.random()*Math.floor(100)),i(e.conf,"ab_r")&&i(e.conf,"ab_enable")&&e.conf.ab_enable&&(e.randAB<e.conf.ab_r&&(i(e.conf,"ab_m")&&"split"==e.conf.ab_m&&(e.ABModeSplit=!0),e.ABgroupB=!0),e.debug&&console.log(e.logP+" AB TEST enabled - mode %s - ratio %s% - group %s ",e.logS,e.logC,e.conf.ab_m,e.conf.ab_r,e.ABgroupB?"B":"A")),function(){if(1===e.dNR){let t=e.dNR.toString();window.googletag.cmd.push(function(){window.googletag.setConfig({targeting:{od_pf_nr:t}})})}}();try{!function(t){if(!t)throw"Country is missing.";e.unitTemplate=e.unitTemplate.replace("%C%",t)}(d)}catch(t){}(e.debug||e.clientDebug)&&console.log(e.logP+" is ready",e.logS,e.logC),i(e.conf,"sbr")&&function(o){if(void 0!==e.sourceID)return;if(!o)return;let n,d=(0,t.base64DecToArr)(o),s=(0,t.UTF8ArrToStr)(d),a="";a="number"==typeof e.pubId?e.pubId.toString():e.pubId;try{n=JSON.parse((0,t.xorDecrypt)(s,a))}catch(t){return void console.error(t)}if(void 0!==n){if(window.location&&window.location.href){let t=new URL(window.location.href).searchParams.toString();if(i(n,"sourceCampaignTrackers")){let o=n.sourceCampaignTrackers.find(e=>i(e,"s")&&t.includes(e.s));if(o)return e.sourceID=window.odT.cyrb53(o.s,100),void(e.sourceRatio=o.r)}}if(document.referrer&&i(n,"sourceDomains")){let t=new URL(document.referrer).hostname,o=n.sourceDomains.find(e=>i(e,"s")&&t.includes(e.s));if(o)return e.sourceID=window.odT.cyrb53(o.s,100),void(e.sourceRatio=o.r);let d=n.sourceDomains.find(t=>i(t,"s")&&"default".includes(t.s));d&&(e.sourceID=window.odT.cyrb53(d.s,100),e.sourceRatio=d.r)}}}(e.conf.sbr),function(){if("object"==typeof window.optiyield&&"object"==typeof window.optiyield.cmd)for(window.optiyield.cmd.push=function(t){if("function"==typeof t)try{t.call()}catch(t){console.error(t)}};window.optiyield.cmd.length>0;)try{window.optiyield.cmd.shift().call()}catch(t){console.error(t)}}(),e.ABModeSplit||u(),window.googletag.cmd.push(function(){window.googletag.setConfig({targeting:{od_pfs:"1"}})})}catch(t){}}init(t,o){try{if(window.optiyield._init_ready)return;if(window.optiyield._init_ready=!0,function(){try{e.dDevice=window.odT.dDevice,e.unitTemplate=e.unitTemplate.replace("%D%",e.dDevice);var t="1";i(e.i4n3i2tConfig,"deviceDetection")&&1==e.i4n3i2tConfig.deviceDetection&&("30000"==e.dDevice?t="0":"30001"==e.dDevice?t="1":"30002"==e.dDevice&&(t="2"),window.googletag.cmd.push(function(){window.googletag.setConfig({targeting:{od_pf_dd:t}})}))}catch(t){}}(),"object"==typeof t&&(e.initConfig={...t},e.ABModeSplit))return;"function"==typeof o&&(e.callback=o,e.callback())}catch(t){console.error(t)}}getFloors(t,d="RAW",s=!1){try{var a={};if(e.ABModeSplit)return a.pfStatus=0,a;let c=n(t,d);if(void 0===c.pfUnitObj&&i(e.conf,"faup")&&e.conf.faup){let e={haveParent:!1,floorConfig:t},i=5,s=0;do{if(e=o(e.floorConfig),c=n(e.floorConfig,d),void 0!==c.pfUnitObj)break;s+=1}while(e.haveParent&&s<i)}let u="";i(t,"interstitial")&&t.interstitial&&(u="oop_");let p=c.pfUnitObj,g=c.pfUnit;if(e.acceptedConsents.includes(window.odT.consentStatus))if(void 0!==p){let i=function(t,e){return e.find(function(e){if((void 0===e.max||t<=e.max)&&t>e.min)return e})}(p.ae,e.aed),o="";t.interstitial||(void 0!==i?o=i.hasOwnProperty("max")?`_${i.max.toFixed(2)}`:"_max":p?.is_small&&(o="_spf"));let n="0";if(s&&(p.oy_mode==e.oy_mode_enum.HYBRID&&(n=s.cpm>parseFloat(p.pf.gam)?window.odT.getCpmStringValue(s.cpm,e.config.pbd):p.pf.gam,e.debug&&console.log("%cOYSDK:%c HYBRID cpm = "+n+" for "+g,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF")),p.oy_mode==e.oy_mode_enum.LASTLOOK&&(n=window.odT.getCpmStringValue(s.cpm,e.config.pbd),e.debug&&console.log("%cOYSDK:%c LASTLOOK cpm = "+n+" for "+g,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"))),!Object.values(p.pf).some(t=>null===t||""===t)&&e.rand<p.tf){a.pfStatus=1,a.group=1,a.tf=p.tf,s||p.oy_mode!=e.oy_mode_enum.LASTLOOK?a.pf={gam:s?n:p.pf.gam,amazon:p.pf.amazon,prebid:p.pf.prebid}:p.pf.def?a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"}:a.pf={},a.kv_ta=`${u}1_${a.tf}${o}`,f(p)&&(a.kv_pff="1");const t=f(p)?"&od_pf_filter=1":"";a.kv_mta=l(a.kv_ta,p.oy_mode,s),a.gamSlotTargeting=`od_pf_group=1&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}${t}`,a.pf.gam&&(a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`),e.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${e.sourceID}`)}else a.pfStatus=0,a.group=0,a.tf=p.tf,a.kv_ta=`${u}0_${a.tf}${o}`,a.kv_mta=l(a.kv_ta,p.oy_mode,s),a.gamSlotTargeting=`od_pf_group=0&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}`,p.pf.def&&(a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"},a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`,a.pfStatus=1),e.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${e.sourceID}`)}else a.pfStatus=0,a.group=0,a.tf=0,a.kv_ta=`${u}0_0`,a.kv_mta=`${a.kv_ta}_0`,a.gamSlotTargeting=`od_pf_group=0&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}`,e.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${e.sourceID}`),p?.pf?.def&&(a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"},a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`,a.pfStatus=1);if(0===Object.keys(a).length&&(a.pfStatus=0,a.group=0,a.gamSlotTargeting="od_pf_group=0"),e.clientDebug&&(e.forceDebugPf?(a.pfStatus=1,a.pf={gam:"1.00",prebid:"1.01",amazon:"1.02"},void 0!==e.pfDebug&&(a.pf.gam=e.pfDebug,a.pf.prebid=e.pfDebug,a.pf.amazon=e.pfDebug),a.gamSlotTargeting=`od_pf_group=1&od_pf_pb=${a.pf.gam}`):(a.gamSlotTargeting="od_pf_group=0",a.pfStatus=0)),e.debug)if(void 0===p)console.log(e.logP+d+" PfUnit "+g+" doesn't exist. Returned price floor object ",e.logS,e.logC,a);else{var r="ctrl";1==a.group&&(r="test"),console.log(e.logP+d+" PfUnit "+g+" is in "+r+" group . Returned price floor object ",e.logS,e.logC,a)}return a}catch(t){}return{pfStatus:0,gamSlotTargeting:"od_pf_group=0"}}setGptFloors(t){try{window.googletag.cmd.push(function(){if(i(e.conf,"ab_enable")&&e.conf.ab_enable){let t=r(e.ABgroupB);void 0!==typeof t.abValue&&window.googletag.setConfig({targeting:{[t.abKey]:t.abValue.toString()}})}e.ABModeSplit||window.googletag.pubads().getSlots().forEach(i=>{let o=!1;t&&t.find(t=>t.adUnitCode===i.getSlotElementId())?o=t.find(t=>t.adUnitCode===i.getSlotElementId()):t&&e.conf&&e.conf.gmapkey&&e.conf.pmapkey&&t.find(t=>t.adUnitCode===`${e.conf.pmapkey}${i.getConfig("targeting")?.targeting?.[e.conf.gmapkey]?.[0]}`)&&(o=t.find(t=>t.adUnitCode===`${e.conf.pmapkey}${i.getConfig("targeting")?.targeting?.[e.conf.gmapkey]?.[0]}`)),g(i,o)})})}catch(t){}}setAmazonCbk(t,i){if("function"==typeof i)return i(t,e)}setPrebidCbk(t,i){if("function"==typeof i)return i(t,e,s)}getVideoInStreamFloor(t,o={}){try{var n="";if(1===e.dNR&&(n+="od_pf_nr=1"),i(e.conf,"ab_enable")&&e.conf.ab_enable){let t=r(e.ABgroupB);if(""!==n&&(n+="&"),n+=t.abKey+"="+t.abValue,e.ABModeSplit)return encodeURIComponent(n)}var d=window.optiyield.getFloors({adUnitPath:t,customDimensions:o},"Video-instream");return"object"==typeof d&&(""!==n&&(n+="&"),n+=d.gamSlotTargeting),n.includes("od_pfg")||e.acceptedConsents.includes(e.consentStatus)&&(""!==n&&(n+="&"),n+="od_pfg=1"),encodeURIComponent(n)}catch(t){console.error(t)}return""}}}();if(window.optiyield=window.optiyield||{},window.optiyield.cmd=window.optiyield.cmd||[],window.optiyield.initOptiYieldSdk=window.optiyield.initOptiYieldSdk||!1,window.optiyield._ready=window.optiyield._ready||!1,0==window.optiyield._ready)var o=new e;window.optiyield.getFloors=o.getFloors,window.optiyield.setGptFloors=o.setGptFloors,window.optiyield.init=o.init,window.optiyield._0i4n3i2t=o._0i4n3i2t,window.optiyield._d1spl4yS9ts=o._d1spl4yS9ts,window.optiyield.setAmazonFloors=o.setAmazonCbk,window.optiyield.setPrebidFloors=o.setPrebidCbk,window.optiyield.getVideoInStreamFloor=o.getVideoInStreamFloor})()})(),t=new(function(){function t(t,e){return t.hasOwnProperty(e)}return class{constructor(){}getPbjs(e){return t(e.initConfig,"pbjs")?e.initConfig.pbjs:t(e.conf,"pbjs")?(window[e.conf.pbjs]=window[e.conf.pbjs]||{},window[e.conf.pbjs].que=window[e.conf.pbjs].que||[],window[e.conf.pbjs]):void 0!==e.pbjs?e.pbjs:window._pbjsGlobals?window._pbjsGlobals&&1==window._pbjsGlobals.length?(e.pbjs=window[_pbjsGlobals[0]],window[_pbjsGlobals[0]]):void 0:(e.debug&&console.warn(e.logP+" prebid.js isn't loaded yet, assume it will be pbjs",e.logS,e.logC),window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[],e.pbjs=window.pbjs,e.pbjs)}setA(e,i){try{return i.ABModeSplit||e.forEach(e=>{if(!t(e,"optiYield"))return;let o={adUnitPath:e.optiYield.adUnitPath,customDimensions:{}};t(e.optiYield,"cd")&&(o.customDimensions=e.optiYield.cd);let n=window.optiyield.getFloors(o,"AMAZON");i.clientDebug&&(1==n.pfStatus&&n.pf?.amazon?console.log(i.logP+" AMAZON configure a price floor ("+n.pf.amazon+") slot slotID: "+e.slotID,i.logS,i.logC):console.log(i.logP+" AMAZON doesn't find a price floor slotID: "+e.slotID,i.logS,i.logC)),0!==n.pfStatus&&void 0!==n.pf.amazon&&(t(e,"floor")?e.floor.value=Math.round(100*parseFloat(n.pf.amazon)):e.floor={currency:t(i.config,"cur")&&t(i.config.cur,"code")&&t(i.config.cur.code,"amazon")?i.config.cur.code.amazon:"USD",value:Math.round(100*parseFloat(n.pf.amazon))})}),e}catch(t){console.error(t)}return e}setP(e,i,o){try{if(i.ABModeSplit)return e;let n;n=t(i.conf,"pwmap")&&(void 0===e||Array.isArray(e)&&0==e.length)?function(e,i){let o=[];return window.googletag.cmd.push(function(){window.googletag.pubads().getSlots().forEach(n=>{let d="",s=e(n.getAdUnitPath());if(t(i.conf,"pwmap")&&"sei"===i.conf.pwmap?d=n.getSlotElementId():t(i.conf,"pwmap")&&"aup"===i.conf.pwmap?d=s:t(i.conf,"gmapkey")&&(t(i.conf,"pmapkey")&&""!==i.conf.pmapkey&&(d=i.conf.pmapkey),d+=n.getTargeting(i.conf.gmapkey)[0]),void 0!==d&&""!==d){let e={};e.code=d,e.optiYield={adUnitPath:s},function(e,i,o){t(o.conf,"gcdk")&&(e.optiYield.cd={},Object.entries(o.conf.gcdk).forEach(([t,o],n)=>{e.optiYield.cd[t]=i.getTargeting(o)[0]}))}(e,n,i),o.push(e)}})}),o}(o):e;let d=window.odT.getPbjs(i),s={floors:{data:{currency:t(i.config,"cur")&&t(i.config.cur,"code")&&t(i.config.cur.code,"prebid")?i.config.cur.code.prebid:"EUR",schema:{fields:["adUnitCode","mediaType"],delimiter:"|"},values:{}}}};return n.forEach(e=>{if(!t(e,"optiYield"))return;let o={adUnitPath:e.optiYield.adUnitPath,customDimensions:{}};t(e.optiYield,"cd")&&(o.customDimensions=e.optiYield.cd);let n=window.optiyield.getFloors(o,"PREBID");i.clientDebug&&(1==n.pfStatus&&n.pf?.prebid?console.log(i.logP+" PREBID configure a price floor ("+n.pf.prebid+") AdUnit code: "+e.code,i.logS,i.logC):console.log(i.logP+" PREBID doesn't find a price floor AdUnit code: "+e.code,i.logS,i.logC)),0!==n.pfStatus&&void 0!==n.pf.prebid&&(t(e,"code")&&(s.floors.data.values[e.code+"|*"]=parseFloat(n.pf.prebid)),t(e,"floors")?e.floors.values={"*":parseFloat(n.pf.prebid)}:e.floors={currency:t(i.config,"cur")&&t(i.config.cur,"code")&&t(i.config.cur.code,"prebid")?i.config.cur.code.prebid:"EUR",schema:{fields:["mediaType"]},values:{"*":parseFloat(n.pf.prebid)}})}),void 0===d||!i.conf||i.conf.ma||!i.conf.use_pb_cpm&&!i.conf.force_pb_cpm||i.auctionEndDone||(i.auctionEndDone=!0,d.que.push(function(){d.onEvent("auctionEnd",function(){const t=function(t){if(!t.conf.use_pb_cpm&&!t.conf.force_pb_cpm)return!1;const e=[];try{let i=1,o=!1;const n=odT.getPbjs(t)?.getConfig()?.currency?.adServerCurrency;n!==t?.config?.cur?.code?.gam&&(o=!0,i=.95);let d=odT.getPbjs(t).getHighestCpmBids();if(d.length)return d.map(d=>{const s=function(t,e){if(!e||!e.cpm)return 0;const i={low:"pbLg",medium:"pbMg",high:"pbHg",auto:"pbAg",dense:"pbDg",custom:"pbCg"}["function"==typeof odT.getPbjs(t)?.getConfig&&odT.getPbjs(t)?.getConfig("priceGranularity")]||"pbAg";return e[i]?parseFloat(e[i]):e.cpm}(t,d);e.push({adUnitCode:d.adUnitCode,cpm:parseFloat(o?odT.getPbjs(t).convertCurrency(s,n,t?.config?.cur?.code?.gam):s)*i})}),e}catch(t){}return!1}(i);window.optiyield.setGptFloors(t)})})),e}catch(t){console.error(t)}return e}}}()),window.odT.setA=t.setA,window.odT.setP=t.setP,window.odT.getPbjs=t.getPbjs,function(t){for(var i=e,o=t();;)try{if(351602===parseInt(i(530))/1+-parseInt(i(546))/2*(-parseInt(i(566))/3)+-parseInt(i(571))/4+-parseInt(i(507))/5*(parseInt(i(585))/6)+parseInt(i(460))/7*(parseInt(i(570))/8)+parseInt(i(488))/9*(parseInt(i(558))/10)+parseInt(i(589))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(i),(()=>{var t={147:t=>{var i=e;t[i(557)]={i8:i(534)}}},i={};function o(n){var d=e,s=i[n];if(void 0!==s)return s[d(557)];var a=i[n]={exports:{}};return t[n](a,a[d(557)],o),a[d(557)]}(()=>{var t=e;class i{constructor(t,i){var o=e;this[o(522)]=t,this[o(528)]=i}[t(478)](e){var i=t;this[i(522)]&&"verbose"===this[i(528)]&&console[i(478)](e)}[t(582)](e){var i=t;this[i(522)]&&[i(527),i(582)][i(567)](this[i(528)])&&console[i(582)](e)}[t(551)](e){var i=t;this.debug&&console[i(551)](e)}}class n{constructor({previousType:e,adsTag:o,insertAdslotBeforeTarget:n,insertAdslotIntoTarget:d,dontBreakWithPreviousType:s,recurrenceLevel:a,divIdPrefix:r,previousTypeExtra:l,previousTypeClass:c,parentContainer:u,debug:p,debugLevel:g,omitInvisible:w,infiniteScroll:f}){var h=t;this[h(586)]=n,this[h(559)]=d,this.previousType=e,this[h(476)]=r,this[h(493)]=l,this.previousTypeClass=c,this[h(504)]=s,this[h(561)]=o,this[h(522)]=p,this[h(522)]=g,this[h(484)]=new i(p,g),this[h(574)]=0,this[h(470)]=0,this[h(569)]=a,this[h(459)]=u,this[h(544)]=w,this[h(553)]=[],this[h(487)]=[],this.infiniteScroll=f}static[t(564)](e,i=!1){var o=t;if(i)return document[o(481)](e,document,null,XPathResult[o(547)],null)[o(486)];let n=e[o(565)]("#","")[o(565)](".","");if(e[o(567)]("#"))return document[o(519)](n);let d=document[o(513)](n);return d?d[0]:null}stepIn(){this[t(574)]++}stepOut(){this[t(574)]--}isVisible(e){var i=t,o=window[i(536)](e),n=e.getBoundingClientRect()[i(542)];return i(518)!==o[i(581)]&&"hidden"!==o.visibility&&n>0}[t(466)](e){var i=t;return!!e.classList&&e[i(578)].contains(this.previousTypeClass)}[t(491)](e,i,o){var n=t;if(!this.insertAdslotIntoTarget){if(!this[n(474)](o))return;if(!this[n(493)][n(567)](e))return}if(this[n(477)]&&!this.isOptiClass(o))return;if(this[n(559)]||this[n(586)])return this[n(522)]&&(this[n(487)][n(462)]({element:o,rect:o[n(512)]()}),o[n(577)]("data-adslot-top",o[n(512)]().top)),i[n(462)](o);let d=this[n(587)](o);if(this.logger[n(478)]({msg:"next sibling",nextSibling:d,htmlElement:o}),d)return this.candidatesData.push({element:d,rect:d.getBoundingClientRect()}),i.push(d);this.logger[n(582)]({htmlElement:o,nextSibling:d})}[t(537)](e,i=[]){var o=t;let n=e[o(533)][o(483)](),d=Array.from(e[o(575)]);var s,a=0;return this.presentLevel<this[o(569)]&&!this[o(504)][o(567)](n)?(this[o(484)][o(478)]({msg:"Step in "+this[o(574)]+" / "+this[o(569)],htmlElement:e}),this[o(538)](),a=i[o(525)],d[o(480)](t=>{this[o(537)](t,i)}),s=i.length,this[o(484)][o(478)]({msg:o(508)+this[o(574)]+" / "+this[o(569)],htmlElement:e,found:i[o(525)]}),this[o(535)](),a===s&&this[o(491)](n,i,e)):this.secureCandidateAdder(n,i,e),i}[t(554)](e){var i=t;return!!e.id&&e.id[i(567)](i(492))}nextSibling(e){var i=t;if(e===this.parentContainer)return null;let o=e[i(496)];if(this.logger[i(582)]({msg:i(469),candidate:e,next:o}),o){if(this.omitInvisible||this[i(474)](o))return this[i(554)](o)?this.nextSibling(o):o;this[i(484)][i(582)]({msg:i(531),candidate:e,next:o})}return this[i(587)](e[i(495)])}[t(467)](e){var i=t;return e[i(496)]||this[i(587)](e.parentNode)}[t(501)](e,i,o=null,n=""){var d=t;if(o){var s=document[d(516)](o);s.id="optidigital-ad-wrapper-"+(this[d(553)][d(525)]+1),s.className=n,s[d(539)](i),this[d(559)]?e[d(539)](s):e[d(495)][d(548)](s,e)}else this[d(559)]?e[d(539)](i):e[d(495)][d(548)](i,e);return this[d(553)].push(i),i}[t(515)](e,i){var o=t;return e.appendChild(i),this[o(553)][o(462)](i),i}[t(543)](){return this[t(553)]}[t(552)](e,i=!1){var o=t;let n=document[o(516)](this[o(561)]);return this[o(520)]||i||(n.id=this[o(476)]+e),n[o(577)](o(583),this.divIdPrefix+e),n[o(591)]=e,n[o(556)][o(581)]=o(518),n}}const d={parentDiv:null,divIdPrefix:t(465),omitInvisible:!0,wrapperTag:null,wrapperClass:"",adSlots:[],previousType:"div",previousTypeExtra:[],previousTypeClass:null,positionFirst:1,dontBreakWithPreviousType:["ul","ol"],keepTheDistanceFrom:[],keepDistanceFrom:[],keepTheDistancePx:100,keepDistancePx:null,keepDistanceFromTheTop:0,keepDistanceFromTop:null,keepDistanceFromTheBottom:0,keepDistanceFromBottom:null,interval:1200,intervalIncrement:0,recurrenceLevel:1,insertAdslotBeforeTarget:!1,insertAdslotIntoTarget:!1,infiniteAdslot:!1,infiniteScroll:!1,useXPath:!1,debugLevel:t(527),debug:!1};var s=o(147).i8;function a(e,i,o){var n=t;if(0===e)return!0;if(o){var d=o.getBoundingClientRect()[n(562)];return i.getBoundingClientRect()[n(573)]-e>=d}return!1}function r(e,i,o,n,d,s,a){var r=t;if(0===o)return!0;var l=e+i*(o-1);let c=d[r(512)]()[r(562)];function u(t){var e=r;return e(518)!==window[e(536)](t)[e(581)]}if(!u(d)){let t=null!==d[r(496)]?d[r(496)]:d[r(490)];for(;t;){if(!0===u(t)){c=t[r(512)]()[r(562)];break}t=null!==t[r(496)]?t[r(496)]:t[r(490)]}}let p=c+l;var g=p<=s;return g?a[r(582)]({msg:"verifyInterval ok",interval:e,intervalIncrement:i,adsInserted:o,test:g,candidate:n,lastPickedCandidate:d,lastPickedCandidateTop:d[r(512)]()[r(562)],testLogic:" "+p+r(590)+s+" ?",posY:p,candidateTop:s}):a.info({msg:r(555),interval:e,intervalIncrement:i,adsInserted:o,test:g,candidate:n,lastPickedCandidate:d,lastPickedCandidateTop:d[r(512)]().top,testLogic:" "+p+r(590)+s+" ?",posY:p,candidateTop:s}),g}window.optidigitaltagsinserter=new class{constructor(){this[t(494)]=s}[t(498)](t){var e={};for(var i in d)e[i]=t[i]?t[i]:d[i];return e}[t(457)](e){var i=t;e[i(461)].length>0&&0===e[i(475)][i(525)]&&(e[i(475)]=e[i(461)]),e.keepDistancePx&&(e[i(506)]=e[i(579)]),e[i(485)]&&(e.keepDistanceFromTheTop=e.keepDistanceFromTop),e[i(529)]&&(e[i(572)]=e.keepDistanceFromBottom),e[i(493)]=[...new Set([e[i(563)],...e[i(493)]])],this.adsTag="div",this.parentDiv=e[i(502)],this[i(563)]=e[i(563)],this[i(493)]=e[i(493)],this[i(477)]=e[i(477)],this[i(532)]=e.useXPath,this.debug=e[i(522)],this.debugLevel=e[i(528)],this.keepDistanceFromTheTop=e[i(580)],this.keepDistanceFromTheBottom=e[i(572)],this[i(472)]=e[i(472)],this[i(471)]=[...e[i(471)]][i(473)](),this[i(569)]=e[i(569)],this.interval=e.interval,this[i(503)]=e[i(503)],this.insertAdslotBeforeTarget=e[i(586)],this[i(559)]=e[i(559)],this[i(468)]=e[i(468)],this[i(475)]=e[i(475)],this[i(506)]=e.keepTheDistancePx,this.wrapperTag=e[i(524)],this[i(489)]=e[i(489)],this[i(520)]=e[i(520)]}[t(482)](i){var o=t;function n(t){var i=e,o=window[i(536)](t);return!(!o||!o[i(581)]||i(518)===o[i(581)])}var d=this[o(463)][o(467)](i);if(d){let t=i[o(512)]()[o(562)]-this[o(506)],e=d.getBoundingClientRect()[o(562)]+this[o(506)];e<t&&(e=t+this[o(506)]),n(i)&&(this.forbidden[o(462)]({topWithDistance:i[o(512)]().top-this[o(506)],botWithDistance:e}),this[o(500)][o(462)](i))}else this[o(484)][o(478)]({msg:"Missed next for forbidden element",forbiddenElement:i}),n(i)&&(this.forbiddenElements.push(i),this[o(584)][o(462)]({topWithDistance:i[o(512)]()[o(562)]-this.keepTheDistancePx,botWithDistance:this[o(459)][o(512)]().bottom+this[o(506)]}))}[t(510)](){var e=t;this[e(584)]=[],this[e(500)]=[],this[e(475)][e(480)](t=>{var i=e;if(t[i(567)]("#")){var o=document[i(519)](t[i(565)]("#",""));o&&this[i(482)](o)}else Array[i(517)](document.getElementsByClassName(t.replace(".","")))[i(480)](t=>{this.__setupSingleForbidden(t)})})}[t(505)](e={}){var o=t,d=this._extendDefaults(e);if(this[o(457)](d),this[o(484)]=new i(this.debug,this[o(528)]),this[o(484)][o(582)]({msg:o(479),version:this[o(494)],config:d}),this[o(502)]){if(this[o(459)]=n[o(564)](this[o(502)],this[o(532)]),this[o(459)])return this[o(463)]=new n({previousType:this[o(563)],adsTag:this[o(561)],insertAdslotBeforeTarget:d[o(586)],insertAdslotIntoTarget:d[o(559)],dontBreakWithPreviousType:d[o(504)],recurrenceLevel:d[o(569)],divIdPrefix:d.divIdPrefix,previousTypeExtra:d.previousTypeExtra,previousTypeClass:d.previousTypeClass,parentContainer:this[o(459)],debug:d[o(522)],debugLevel:d[o(528)],omitInvisible:d[o(544)],infiniteScroll:d[o(520)]}),this[o(484)].info({msg:o(499)}),this[o(464)]=this[o(463)].readDOM(this[o(459)]),this[o(484)][o(582)]({msg:o(509)}),this[o(510)](),this[o(484)].info({forbiddenDimensions:this.forbidden,forbiddenElements:this.forbiddenElements,candidates:this.candidateElements,candidatesData:this[o(463)].candidatesData}),this[o(592)](),this[o(522)]&&this[o(463)].getInsertedAds().forEach(t=>{var e=o;t[e(556)][e(581)]=e(526),t[e(556)][e(545)]="#FFFFF0",t[e(556)][e(560)]="#AA0000";var i=100+Math[e(540)](200*Math[e(523)]());t[e(556)][e(550)]=i+"px",t[e(549)]=t[e(458)](e(583))}),!0;this.logger[o(551)]({msg:"parentDiv missing!",selector:d[o(502)]})}else this[o(484)].error({msg:o(541),selector:d[o(502)]})}_insertAll(){var e=t;if(this[e(484)][e(582)]({msg:e(456),parent:this.parentContainer}),0===this.adSlots[e(525)])return!1;var i=0,o=null,n=this[e(471)][0];if(this.candidateElements.every(t=>{var d,s,l,c,u,p=e;if(0===this[p(471)][p(525)]&&!this[p(468)])return!1;if(i++,!(this[p(472)]<=i))return this[p(484)][p(582)]({msg:"verifyFirstIndex failed",candidate:t,positionFirst:this[p(472)],counter:i}),!0;if(!function(t,e,i){var o=p;if(0===t)return!0;var n=i[o(512)]()[o(562)];return e[o(512)]().top+t<=n}(this[p(580)],this[p(459)],t))return this[p(484)].info({msg:p(588),candidate:t}),!0;if(!r(this[p(568)],this.intervalIncrement,this[p(463)].getInsertedAds()[p(525)],t,o,t[p(512)]()[p(562)],this[p(484)]))return!0;if(d=this[p(584)],s=t,l=this.logger,u=0,!d[(c=p)(576)](t=>{var e=c;u++;var i=t[e(514)]>s[e(512)]().top||t.botWithDistance<s[e(512)]()[e(562)];return i||l[e(478)]({index:u,avoidDict:t,candidate:s,rectTop:s[e(512)]().top}),i}))return this[p(484)][p(582)]({msg:p(521),candidate:t}),!0;if(!a(this[p(572)],this[p(459)],t))return this.logger[p(582)]({msg:p(497),candidate:t,keepDistanceFromTheBottom:this[p(572)]}),!0;const g=0===this.adSlots.length,w=g?n:this[p(471)].pop(),f=g?n:this.wrapperClass,h=!!g;var m=this[p(463)][p(552)](w,h);return o=t,this.logger[p(582)]({msg:"INSERTING ABOVE",candidate:t,wrapperTag:this[p(524)],wrapperClass:f}),this.domToolkit.insertOne(t,m,this[p(524)],f),!0}),this[e(471)][e(525)]>0&&a(this[e(572)],this[e(459)])&&r(this[e(568)],this[e(503)],this[e(463)][e(543)]()[e(525)],null,o,this[e(459)][e(512)]()[e(573)],this[e(484)])){this.logger.info({msg:"INSERTING at the end of parent"});var d=this[e(471)][e(511)](),s=this[e(463)].createAdSlotElement(d);this[e(463)][e(515)](this[e(459)],s)}return this[e(484)][e(582)]({msg:"Insertion Finished"}),!0}}})()})()}setDefaultSizes(){const t={};if(!1===this.insertInreadStartDone&&this.setup?.[`insertInread${this.screen}`])try{optidigitaltagsinserter.insertInRead(this.setup[`insertInread${this.screen}`][0])}catch(t){}this.setup.hasOwnProperty("insertInreadTags")&&0==this.insertInreadStartDone&&this.setup.insertInreadTags(this.initConfig.adUnit);let e=document.querySelectorAll(`[id^="${this.divIdPrefix}"]`);e=Array.from(e);this.stickyAdapter.getStickyAdConfigurations();const i=this.stickyAdapter.getStickyNames(),o=(i[0],this.screen,t=>{t.forEach(t=>{if(!e.includes(t)){const o=t.getAttribute("class"),n=t.getAttribute("id");i.find(t=>o&&o.includes(t)||n&&n.includes(t))||e.push(t)}})});if(document.querySelectorAll(`[class^="${this.divIdPrefix}"]`).length){o(document.querySelectorAll(`[class^="${this.divIdPrefix}"]`))}if(this.setup.adSlotsConfig&&this.setup.adSlotsConfig.adSlotsPrefixes&&this.setup.adSlotsConfig.adSlotsPrefixes.length){this.mappedSite=!0;let t=this.setup.adSlotsConfig.adSlotsPrefixes.map(t=>`[id^="${t}"]`).join(","),e=`${this.setup.adSlotsConfig.adSlotsPrefixes.map(t=>`[class^="${t}"]`).join(",")},${this.setup.adSlotsConfig.adSlotsPrefixes.map(t=>`[class*="${t}"]`).join(",")}`;if(document.querySelectorAll(t).length){o(document.querySelectorAll(t))}if(document.querySelectorAll(e).length){o(document.querySelectorAll(e))}}else{if(document.querySelectorAll('[id^="Billboard_"], [id^="Mobile_"], [id^="Content_"], [id^="HalfpageAd_"], [id^="Rectangle_"], [id^="Wallpaper"]').length){o(document.querySelectorAll('[id^="Billboard_"], [id^="Mobile_"], [id^="Content_"], [id^="HalfpageAd_"], [id^="Rectangle_"], [id^="Wallpaper"]'))}if(document.querySelectorAll('[class^="Billboard_"], [class^="Mobile_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Mobile_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]').length){o(document.querySelectorAll('[class^="Billboard_"], [class^="Mobile_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Mobile_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]'))}}if(i.forEach(t=>{if(this.stickyAdapter.isFallback(t))this.log(`Sticky ad "${t}" is in fallback mode. It will not be created.`);else try{this.stickyAdapter.createStickyAd(t,{initConfigAdUnit:this.initConfig.adUnit,log:t=>this.log(t),getCookie:t=>this.getCookie(t),firstLoadAdSlots:this.firstLoadAdSlots,setAttributes:(t,e)=>this.tools.setAttributes(t,e),stickyAutoCloseScroll:this.stickyAutoCloseScroll,refreshAdSlots:t=>this.refreshAdSlots(t),onLegacyStateUpdate:t=>{void 0===t.stickyAdDivId||this.stickyAdDivId||(this.stickyAdDivId=t.stickyAdDivId),void 0!==t.stickyAdMode&&(this.stickyAdMode=t.stickyAdMode),void 0!==t.stickyAdStatus&&(this.stickyAdStatus=t.stickyAdStatus),void 0!==t.stickyAdTopTrigger&&(this.stickyAdTopTrigger=t.stickyAdTopTrigger),void 0!==t.stickyAdAutoHidePx&&(this.stickyAdAutoHidePx=t.stickyAdAutoHidePx)},adLayoutEnabled:this.setup.adLayoutEnabled})}catch(e){this.log('Error creating sticky ad "'+t+'": '+(e&&e.message?e.message:e))}}),i.forEach(t=>{if(document.getElementById(`${this.divIdPrefix}${t}`)&&""!==this.divIdPrefix){document.querySelectorAll(`[id="${this.divIdPrefix}${t}"]`).forEach(t=>{e.includes(t)||e.push(t)})}}),e.forEach(e=>{let o="",n="",d=0,s=null,a=null,r=null,{deviceTarget:l,adUnitPathSuffix:c,customKeyValues:u,outOfPage:p,disableGPT:g}=window.odT.setup?.adSlotsConfig?.adSlotsDefinitions?.find(t=>t.name===o)||{};const w=e.getAttribute("id"),f=i.some(t=>w===`${window.odT.divIdPrefix}${t}`);if(f)o=e.getAttribute("id"),o=o.replace(window.odT.divIdPrefix,"");else{if(!e.getAttribute("id")||e.getAttribute("id")&&!e.getAttribute("id").startsWith(window.odT.divIdPrefix)&&""!==window.odT.divIdPrefix){o=e.getAttribute("class");const t="Desktop"===window.odT.screen?/(Billboard_|Content_|HalfpageAd_|Rectangle_|Wallpaper_)\w+/:/(Mobile_)\w+/,i=o.match(t);if(i&&(o=i[0]),o=o.replace(window.odT.divIdPrefix,""),document.getElementById(`${window.odT.divIdPrefix}${o}`)&&document.querySelectorAll(`[id="${window.odT.divIdPrefix}${o}"]`).length<2&&document.querySelectorAll(`.${CSS.escape(o)}`).length>1){let t=document.querySelectorAll(`[id^="${window.odT.divIdPrefix}${o}"]`).length;e.setAttribute("id",`${window.odT.divIdPrefix}${o}_${t}`),d=t}else e.setAttribute("id",`${window.odT.divIdPrefix}${o}`)}else o=e.getAttribute("id").replace(window.odT.divIdPrefix,""),n=e.getAttribute("data-template")?e.getAttribute("data-template"):null,s=e.getAttribute("data-adslotname")?e.getAttribute("data-adslotname"):null,a=e.getAttribute("data-adunitcode")?e.getAttribute("data-adunitcode"):c||null,r=e.getAttribute("data-devicetargeting")?e.getAttribute("data-devicetargeting"):l||null,u=e.getAttribute("data-customkeyvalues")?e.getAttribute("data-customkeyvalues"):u||null;o&&"Wallpaper"!==o&&e.classList.add("optidigital-ad-center-sticky")}if(!window.odT.tagMode&&!f){if("Desktop"===window.odT.screen&&o.toLowerCase().includes("mobile")||"Desktop"===window.odT.screen&&r?.toLowerCase().includes("mobile"))return;if("Mobile"===window.odT.screen&&!o.toLowerCase().includes("mobile")||"Mobile"===window.odT.screen&&r?.toLowerCase().includes("desktop"))return}e.setAttribute("style","");const h=o;let m,y={name:s||(d?`${h}_${d}`:h),adUnit:h,divId:`${window.odT.divIdPrefix}${d?`${h}_${d}`:h}`,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},...n&&{adTemplate:n},...a&&{customAdUnitCode:a},...u&&{customKeyValues:u},...p&&{outOfPage:p},...g&&{disableGPT:g}};m="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?e.getBoundingClientRect().width&&e.getBoundingClientRect().width>0?e.getBoundingClientRect().width:e.parentElement?e.parentElement.getBoundingClientRect().width:0:screen.width;const v=window.odT.tagMode?document.documentElement.clientHeight:e.parentElement?getComputedStyle(e.parentElement)&&getComputedStyle(e.parentElement)["max-height"]:"";window.odT.setAdSlotParams(t,y,h,m,v,n),y.dfpSizes.length||window.odT.log(`There is no dfpSizes for ${y.name}`)}),this.setup?.adSlotsConfig?.adSlotsDefinitions&&this.setup.adSlotsConfig.adSlotsDefinitions.some(t=>void 0!==t.divTarget)){this.mappedSite=!0,this.setup.adSlotsConfig.adSlotsDefinitions.filter(t=>t.divTarget).forEach(t=>{if("Desktop"===window.odT.screen&&(!t.deviceTarget||t?.deviceTarget?.toLowerCase().includes("mobile")))return;if("Mobile"===window.odT.screen&&t?.deviceTarget?.toLowerCase().includes("desktop"))return;let i=1;t.divTarget.length&&t.divTarget.map(o=>{let n={name:t.name,adUnit:t.name,divId:null,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:t.adTemplate};if(t.adUnitPathSuffix&&(n.customAdUnitCode=t.adUnitPathSuffix),t.cdValue&&(n.cdValue=t.cdValue),t.customKeyValues&&(n.customKeyValues=t.customKeyValues),t.outOfPage&&(n.outOfPage=!0),o.startsWith("#")){let d=o.slice(1);document.getElementById(d)&&(n.divId=d,n.name=i>1?`${t.name}_${i}`:t.name,e?.some(t=>t.divId===n.divId)||(e.push(n),i++))}else if(o.startsWith(".")){let d=o.slice(1);document.querySelectorAll(`.${CSS.escape(d)}`).forEach(d=>{let s={name:t.name,adUnit:t.name,divId:null,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:t.adTemplate};t.adUnitPathSuffix&&(s.customAdUnitCode=t.adUnitPathSuffix),t.cdValue&&(s.cdValue=t.cdValue),t.customKeyValues&&(n.customKeyValues=t.customKeyValues),t.outOfPage&&(n.outOfPage=!0),d.getAttribute("id")?(s.name=i>1?`${t.name}_${i}`:t.name,s.divId=d.getAttribute("id")):(d.setAttribute("id",i>1?`${o.slice(1)}_${i}`:o.slice(1)),s.name=i>1?`${t.name}_${i}`:t.name,s.divId=i>1?`${o.slice(1)}_${i}`:o.slice(1)),e?.some(t=>t.divId===s.divId)||(e.push(s),i++)})}else document.getElementById(o)&&(n.divId=o,n.name=i>1?`${t.name}_${i}`:t.name,e?.some(t=>t.divId===n.divId)||(e.push(n),i++));if(document.getElementById(t.divId)){const e=document.getElementById(t.divId);e.getAttribute("data-template")&&(n.adTemplate=e.getAttribute("data-template")),e.getAttribute("data-adslotname")&&(n.name=e.getAttribute("data-adslotname")),e.getAttribute("data-adunitcode")&&(n.customAdUnitCode=e.getAttribute("data-adunitcode"))}})}),i.forEach(t=>{let{cdValue:i,adUnitPathSuffix:o,customKeyValues:n,outOfPage:d,adTemplate:s}=this.setup?.adSlotsConfig?.adSlotsDefinitions?.find(e=>e.name===t)||{};if(document.getElementById(`${window.odT.divIdPrefix}${t}`)){let a={name:t,adUnit:t,divId:`${this.divIdPrefix}${t}`,loadType:this.stickyAdapter.getLoadType(t),lazyLoadPx:0,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:s||`${this.screen}sticky`,...i&&{cdValue:i},...o&&{customAdUnitCode:o},...n&&{customKeyValues:n},...d&&{outOfPage:d}};e.push(a)}else window?.odT?.firstLoadAdSlots?.includes(t)&&window.odT.stickyAdDivId&&"string"==typeof t&&(window.odT.firstLoadAdSlots=window.odT.firstLoadAdSlots.filter(e=>e!==t),window.odT.log(`Sticky postion removed due to mispelling or not existing divId: ${t}`))}),e.forEach(e=>{if(e.divId){let i,o=document.getElementById(e.divId);o.setAttribute("style",""),i="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?o&&o.getBoundingClientRect().width&&o.getBoundingClientRect().width>0?o.getBoundingClientRect().width:o&&o.parentElement?o.parentElement.getBoundingClientRect().width:0:screen.width;const n=window.odT.tagMode?document.documentElement.clientHeight:o&&o.parentElement?getComputedStyle(o.parentElement)&&getComputedStyle(o.parentElement)["max-height"]:"";window.odT.setAdSlotParams(t,e,e.name,i,n,e.adTemplate,e.divId),e.dfpSizes.length||window.odT.log(`There is no dfpSizes for ${e.name}`)}})}if(this.finalAdSlotsConfig.adSlotsDefinitions=t,"Mobile"===this.screen&&this.mobileEvenVerticalSizes){(t=>{window.odT.mobilePosPostions=0;for(const[e,i]of Object.entries(t))e.startsWith("Mobile_Pos")&&parseInt(e.slice(-1))%2==0&&(i.dfpSizes=[...i.dfpSizes,...window.odT.sizesForMobilePos])})(this.finalAdSlotsConfig.adSlotsDefinitions)}try{this.adAdaptersFactory.addSpecialAdSlots(this.finalAdSlotsConfig.adSlotsDefinitions)}catch(t){this.log("[Rewarded AD] Failed to add special ad slots",t)}function n(t,e,i=[]){if(t.parentElement&&t.parentElement.classList&&t.parentElement.classList.contains("optidigital-wrapper-div"))return i;const o=t.classList?Array.from(t.classList):[];for(const n of e)if("string"==typeof n)if(n.startsWith(".")){const e=n.substring(1);o.some(t=>t.startsWith(e))&&i.push({foundEl:t,selector:e})}else if(n.startsWith("#")){const e=n.substring(1);t.id!==e||Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some(t=>t.divId?.includes(n))||i.push({foundEl:t,selector:e})}else t.id!==n||Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some(t=>t.divId?.includes(n))||i.push({foundEl:t,selector:n});if(t.children&&t.children.length)for(let o=0;o<t.children.length;o++)n(t.children[o],e,i);return i}function d(t,e,i){t.forEach(t=>{"childList"===t.type&&t.addedNodes.forEach(t=>{if(t.nodeType===Node.ELEMENT_NODE){n(t,i).forEach(t=>{window.odT.addNewAdSlot(t)})}})})}this.log("Valid adslots ",this.finalAdSlotsConfig.adSlotsDefinitions),this.createAdStyles(),this.adslotInit();const s=(()=>{let t=null,e=null,i=null;return()=>{const o=window.odT.screen,n=window.odT?.setup?.adSlotsConfig?.adSlotsDefinitions,d=n?JSON.stringify(Object.keys(n).sort()):"";if(t&&e===o&&i===d)return t;let s=[];if(n){const t="Desktop"===o,e="Mobile"===o;for(const[i,o]of Object.entries(n))if(o.divTarget&&Array.isArray(o.divTarget)){const i=o.deviceTarget?.toLowerCase()||"";(t&&i&&!i.includes("mobile")||e&&!i.includes("desktop"))&&s.push(...o.divTarget)}}return 0===s.length&&(s="Mobile"===o?[".Mobile_"]:[".Billboard_",".Content_",".HalfpageAd_",".Rectangle_",".Wallpaper"]),t=s,e=o,i=d,s}})(),a=new MutationObserver((t,e)=>{if(!t.some(t=>"childList"===t.type&&t.addedNodes.length>0))return;d(t,0,s())}),r=document,l={childList:!0,subtree:!0};window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode||window.odT?.setup?.adSlotsConfig?.adSlotsPrefixes||a.observe(r,l)}setAdSlotParams(t,e,i,o,n,d,s){let a=d||i.replace(/[0-9]/g,"").replace(/_/g,"").toLowerCase();const r=this.screen?`${this.screen.toLowerCase()}sticky`:null,l=this.stickyAdapter.isStickyAdSlot(i),c=l?this.stickyAdapter.getStickyAdConfigurations():[];let u=!1;l&&(e.loadType=this.stickyAdapter.getLoadType(i),e.lazyLoadPx=0,u=this.stickyAdapter.isVerticalStickyAdSlot(i));const p=(t,e,i,o)=>2!==t.length||(!i||t[e]>=i)&&(!o||t[e]<=o),g=t=>t.map(t=>t.startsWith("#")||t.startsWith(".")?t.slice(1):t),w=t=>!("Desktop"===window.odT.screen&&(!t.deviceTarget||t?.deviceTarget?.toLowerCase().includes("mobile")))&&("Mobile"!==window.odT.screen||!t?.deviceTarget?.toLowerCase().includes("desktop"));let f=function(t,e){for(const i in t)if(i.includes(e.toLowerCase()))return i;for(const i in t)if(e.includes(i.toLowerCase()))return i;return e===r?`${window.odT.screen.toLowerCase()}sticky`:null}(this.sizesFor,a),h=[];if(h=this.tagMode?[...this.tagSizes]:l&&u?[...this.sizesFor.verticalsticky]:f?[...this.sizesFor[f]]:[...this.sizesFor.default],this.setup.adSlotsConfig){if(this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")){const{odSize:t,size:o,minMaxSizes:n,disableBackfill:d,status:a,lazyLoadPx:r,refreshDelay:l,contentExtraCLS:c,vPos:u,anchor:f,adTemplate:m,customSizes:y,clsMaxHeight:v,adUnitPathSuffix:b,cdValue:T,customKeyValues:S,divTarget:C,name:A,outOfPage:k,multiFormat:I,disableGPT:P}=this.setup.adSlotsConfig.adSlotsDefinitions.find(t=>t.name===i||t.divTarget&&g(t.divTarget).includes(s)&&w(t)||t.name===e?.adUnit)||{};m&&this.sizesFor[m]&&(h=this.sizesFor[m]),k&&(e.outOfPage=k,h=this.sizesFor.outofpage);const _=I?.banner||{customSizes:y,size:o,minMaxSizes:n};if(_.customSizes&&(h=_.customSizes),_.size){const t=_.size;h=h.concat(t.filter(t=>-1===h.indexOf(t)))}_.minMaxSizes&&4===_.minMaxSizes.length&&(h=h.filter(t=>p(t,0,_.minMaxSizes[0],_.minMaxSizes[1])&&p(t,1,_.minMaxSizes[2],_.minMaxSizes[3]))),I&&(I.native&&(h=[["fluid"]],I.nativeSize=t??[300,250]),e.multiFormat=I),d&&(e.disableBackfill=d),0===a&&(e.status=0,document.getElementById(e.divId)&&(document.getElementById(e.divId).classList.remove("optidigital-ad-center-sticky"),document.getElementById(e.divId).style.setProperty("min-height","auto"))),r&&(e.lazyLoadPx=r,e.lazyLoadPxWithCore=r),l&&(e.refreshDelay=l),c&&(e.contentExtraCLS=c),u&&(e.vPos=u),f&&(e.anchor=f),v&&Number.isFinite(v)&&(e.clsMaxHeight=v),b&&!e.customAdUnitCode&&(e.customAdUnitCode=b),T&&!e.cdValue&&(e.cdValue=T),S&&!e.customKeyValues&&(e.customKeyValues=S),C&&(e.adUnit=A),P&&(e.disableGPT=P)}const{lazyLoadPxGlobal:t,lazyLoadPxWithCoreGlobal:o}=this.setup.adSlotsConfig||{};if("object"!=typeof h)return void window.odT.log(`There is no sizes for ${e.name}`);e.multiFormat?this.setup.adSlotsConfig&&this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`]&&4===this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`].length&&(h=h.filter(t=>p(t,0,this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][0],this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][1])&&p(t,1,this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][2],this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][3]))):this.setup.adSlotsConfig&&this.setup.adSlotsConfig[`minMaxSizes${this.screen}`]&&4===this.setup.adSlotsConfig[`minMaxSizes${this.screen}`].length&&(h=h.filter(t=>p(t,0,this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][0],this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][1])&&p(t,1,this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][2],this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][3]))),t&&600===e.lazyLoadPx&&(e.lazyLoadPx=t),o&&900===e.lazyLoadPxWithCore&&(e.lazyLoadPxWithCore=o)}const m=this.setup?.adSlotsConfig?.adSlotsDefinitions?.find(t=>t.name===i||t.divTarget&&g(t.divTarget).includes(s)&&w(t)||t.name===e?.adUnit)?.allowAdsOverflow??this.setup?.adSlotsConfig?.allowAdsOverflow??10;if(o>0&&((o=m?o*(1+m/100):o)>=screen.width&&(o=screen.width),h=h.filter(t=>2!==t.length||t[0]<=o||1800===t[0])),("string"==typeof n&&n.endsWith("px")&&parseFloat(n)>0||"number"==typeof n&&n>0)&&(n=parseFloat(n),this.log(`Sizes of ${e.name} were limited to the height of ${n}`),n=m?n*(1+m/100):n,h=h.filter(t=>2!==t.length||t[1]<=n)),l&&!u){const t=this.stickyAdapter.getStickyAdConfigurationBySlotName(i,c);if(t&&t[`fat${this.screen}`]){let t="Desktop"===this.screen?1250:800;if(window.innerHeight>=t){let t="Desktop"===this.screen?[[1e3,250],[970,250],[800,250],[700,250]]:[[320,200],[320,180],[320,150]];h=[...h,...t]}}}u&&(h=this.sizesFor.verticalsticky),l&&!u&&0===h.length&&(h=this.stickyAdapter.getHorizontalSizes()),e.dfpSizes=h,void 0!==e.status&&0===e.status||!e.dfpSizes.length||(t[e.name]=e)}insertNewSlot(t,e,i,o){this.mobilePosPostions++,o?(t[`${e.className}${i}`]={...t[o]},t[`${e.className}${i}`].adUnit=`${e.className}`):t[`${e.className}${i}`]={...t[e.className]},t[`${e.className}${i}`].name=`${e.className}${i}`,t[`${e.className}${i}`].divId=`${this.divIdPrefix}${e.className}${i}`,t[`${e.className}${i}`].parentDiv=!1;let n=t[`${e.className}${i}`];n&&n.name&&n.name.startsWith("Mobile_Pos")&&"Mobile"===this.screen&&this.mobileEvenVerticalSizes&&(this.mobilePosPostions%2==0&&n.name?(n.dfpSizes=n.dfpSizes.filter(t=>!this.sizesForMobilePos.some(e=>JSON.stringify(e)===JSON.stringify(t))),n.dfpSizes=[...n.dfpSizes,...this.sizesForMobilePos]):n.dfpSizes=n.dfpSizes.filter(t=>!this.sizesForMobilePos.some(e=>JSON.stringify(e)===JSON.stringify(t)))),e.setAttribute("id",t[`${e.className}${i}`].divId),this.adslotInit([t[`${e.className}${i}`]]),!this.lazyLoadPendingAdSlots.includes(t[`${e.className}${i}`].name)&&window?.odT?.monitorLazyLoadCalled&&(this.lazyLoadPendingAdSlots.push(t[`${e.className}${i}`].name),this.monitorLazyLoadAdSlots(t[`${e.className}${i}`].name))}addNewAdSlot(t){let e,i;if(t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length)({foundEl:e,selector:i}=t);else{if(!(t&&t instanceof HTMLElement))return;e=t}let o=e.getAttribute("id");const{adSlotsDefinitions:n}=window.odT.finalAdSlotsConfig,d=window.odT?.setup?.adSlotsConfig?.adSlotsDefinitions?.filter(t=>t?.divTarget?.includes(i)||t?.divTarget?.includes(`#${i}`)||t?.divTarget?.includes(`.${i}`));if(document.getElementById(o)){if(!Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some(t=>t.divId.replace(window.odT.divIdPrefix,"")===o.replace(window.odT.divIdPrefix,""))){window.odT.log("New element with ID",e);let t=o.replace(window.odT.divIdPrefix,"");const i=e.parentElement?getComputedStyle(e.parentElement)&&getComputedStyle(e.parentElement)["max-height"]:"";let d,s={};s.name=t,s.adUnit=t,s.divId=o,s.parentDiv=!0,s.loadType=1,s.lazyLoadPx=600,s.lazyLoadPxWithCore=900,s.dfpSizes={},d="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?e.getBoundingClientRect().width&&e.getBoundingClientRect().width>0?e.getBoundingClientRect().width:e.parentElement?e.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,s,t,d,i,!1,s.divId),n[s.name]&&(window.odT.adslotInit([n[s.name]]),!window.odT.lazyLoadPendingAdSlots.includes(n[s.name].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[s.name].name),window.odT.monitorLazyLoadAdSlots(n[s.name].name)))}}else{window.odT.log("New element",e);const t="Desktop"===window.odT.screen?/(Billboard_|Mobile_|Content_|HalfpageAd_|Rectangle_|Wallpaper_)\w+/:/(Mobile_)\w+/,o=e.className.match(t);o&&(e.className=o[0]);let s=2;if(n[e.className]){s=`_${Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter(t=>t.startsWith(e.className)).length}`,void 0!==n[e.className]&&0===n[e.className].status||window.odT.insertNewSlot(n,e,s)}else if(Array.isArray(d)&&d.length){const t=d?.[0]?.name;if(!t)return;let o=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter(e=>e.startsWith(t)).length;s=o>0?`_${o+1}`:"";const a=e.parentElement?getComputedStyle(e.parentElement)&&getComputedStyle(e.parentElement)["max-height"]:"";let r,l={};l.name=`${t}${s}`,l.adUnit=`${t}`,l.divId=`${window.odT.divIdPrefix}${t}${s}`,l.parentDiv=!0,l.loadType=1,l.lazyLoadPx=600,l.lazyLoadPxWithCore=900,l.dfpSizes={},r="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?e.getBoundingClientRect().width&&e.getBoundingClientRect().width>0?e.getBoundingClientRect().width:e.parentElement?e.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,l,i,r,a,!1,l.divId),n[l.name]&&(e.setAttribute("id",n[l.name].divId),window.odT.adslotInit([n[l.name]]),!window.odT.lazyLoadPendingAdSlots.includes(n[l.name].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[l.name].name),window.odT.monitorLazyLoadAdSlots(n[l.name].name)))}else{let t=window.odT.tools.hasNameInObject(window.odT.finalAdSlotsConfig.adSlotsDefinitions,`${e.className}_`),i=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter(t=>t.startsWith(e.className)).length;s=t?`_${i}`:"";const o=e.parentElement?getComputedStyle(e.parentElement)&&getComputedStyle(e.parentElement)["max-height"]:"";let d,a={};a.name=`${e.className}${s}`,a.adUnit=`${e.className}`,a.divId=`${window.odT.divIdPrefix}${e.className}${s}`,a.parentDiv=!0,a.loadType=1,a.lazyLoadPx=600,a.lazyLoadPxWithCore=900,a.dfpSizes={},d="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?e.getBoundingClientRect().width&&e.getBoundingClientRect().width>0?e.getBoundingClientRect().width:e.parentElement?e.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,a,e.className,d,o,!1,a.divId),n[a.name]&&(e.setAttribute("id",n[`${e.className}${s}`].divId),window.odT.adslotInit([n[`${e.className}${s}`]]),!window.odT.lazyLoadPendingAdSlots.includes(n[`${e.className}${s}`].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[`${e.className}${s}`].name),window.odT.monitorLazyLoadAdSlots(n[`${e.className}${s}`].name)))}}}handleRewardedAdsCropping(){if(!this.setup?.adSlotsConfig?.rewardedAdConfiguration||!this.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableForArticles||!this.adAdaptersFactory.rewardedAdsAdapter.checkRewardedAdFrequency())return;let t=this.setup?.adSlotsConfig?.rewardedAdConfiguration;window.odT.rewardedAdContentSelector=t?.articleContentSelector||"article";const e=t?.contentOffset;let i=t?.blurLastParagraphs;const o=t?.blurInPercentage||.2,n=t?.minParagraphs||10,d=t?.minParagraphsHeight||500,s=t?.excludedElements||{},a=t?.blurLayerZIndex||2147483646,r=t?.minAreaToBlur||!1,l=t?.blurRatio||8,c=t?.customTagName||"P";let u=document.querySelector(window.odT.rewardedAdContentSelector);if(!u)return void window.odT.log("Rewarded ad: Content selector not found");window.odT.analytics.enablePerformances&&window.odT.analytics.isSamplingCase()&&"Chrome"===window.odT.checkBrowser&&!0===window.odT.analytics.isFirstAd&&window.odT.analytics.setContentMetrics();let p=u.scrollHeight,g=Array.from(u.children);i&&i>g.length&&(i=g.length);let w=-1,f=0,h=-1,m=0;const y="number"==typeof i?p:e?p*(.8-e):p*o,v=g.length-1;"number"==typeof i&&g.length;for(let t=v;t>=0;t--)if(f+=g[t].offsetHeight,g[t].tagName===c)if("number"==typeof i&&m<i)m++,w=t;else{if(!(0===m&&f<=y))break;w=t}if(Object.keys(s).length){f=0;const t={},e=Object.keys(s),i={};for(let o=v;o>=0;o--){const n=g[o],d=n.id,a=n.classList;f+=n.offsetHeight;for(const r of e){if(t[r]>=(s[r]||1))continue;(r.startsWith(".")?a.contains(r.slice(1)):r.startsWith("#")?d===r.slice(1):d===r||a.contains(r))&&(t[r]=(t[r]||0)+1,i[r]={index:o+1,acc:f-n.offsetHeight})}}Object.keys(i).length&&(h=Math.max(...Object.values(i).map(t=>t.index)),f=Math.min(...Object.values(i).map(t=>t.acc)))}if(w=w>h?w:h,r&&f>=r&&(t.enableBlur=!0),g.length<=n)return void window.odT.log("Rewarded ad: Not enough paragraphs");if(p<=d)return void window.odT.log("Rewarded ad: Content height is less than minimum required");if(-1===w)return void window.odT.log("Rewarded ad: No suitable cut-off index found");const b=e=>{let i;return t?.consentHTML&&(i=document.createElement("div"),i.id="od_rwdad_consent_container",i.innerHTML=t?.consentHTML,t?.rewardedContainer?.style&&Object.keys(t?.rewardedContainer?.style).forEach(e=>{i.style[e]=t?.rewardedContainer?.style[e]}),e.appendChild(i)),i},T=(e,i=!1,o=!1)=>{let n,d=!0;document.querySelector("#od_rwdad_enable_reward_ad")?n=document.querySelector("#od_rwdad_enable_reward_ad"):(n=document.createElement("button"),d=!1),n.type="button",n.id="od_rwdad_enable_reward_ad",n.className=t?.readMoreButton?.className||"mx-auto btn-inscription-newsletter btn btn-secondary",n.textContent=t?.readMoreButton?.textContent||"Read more";const s=t?.readMoreButton?.bottomPosition||"135px",r=t?.readMoreButton?.spinColor||"#fff";if(t?.readMoreButton?.style&&Object.keys(t?.readMoreButton?.style).forEach(e=>{n.style[e]=t?.readMoreButton?.style[e]}),!d&&n&&e.appendChild(n),!document.getElementById("od-blur-overlay-style")){const e=document.createElement("style");e.id="od-blur-overlay-style",e.textContent=`\n          .od-loading { position: relative; color: transparent !important; pointer-events: none; user-select: none; }\n          .od-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 1em; height: 1em; margin: -0.5em 0 0 -0.5em; border: 2px solid ${r}; border-top: 2px solid transparent; border-radius: 50%; animation: spin 0.6s linear infinite; background-color: transparent; }\n          @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n        `,t?.enableBlur&&(e.textContent+=`\n            #od_rwdad_consent_container { visibility: hidden; opacity: 0; position: fixed; left: ${i.left}px; right: 0; bottom: ${s}; width: ${i.width}px; z-index: 2147483646; display: flex; justify-content: center; align-items: center; transition: visibility .3s, opacity 0.3s linear; }\n            .od-blur-overlay { position: absolute; left: -15px; right: 0; top: ${o}px; bottom: 0; width: calc(100% + 30px); height: calc(100% - ${o}px); pointer-events: all; backdrop-filter: blur(${l}px); z-index: ${a}; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; transition: visibility .3s, opacity 0.3s linear; }\n          `),document.head.appendChild(e)}};if(t?.enableBlur){let t=g[w];if(!t)return void window.odT.log("Rewarded ad: No suitable overlay start element found");const e=u.getBoundingClientRect();let i=t.getBoundingClientRect();if(0===i.top&&0===i.width){t=g[w-1!=-1?w-1:w],i=t.getBoundingClientRect()}const o=i.top-e.top;if(o<0&&0===i.top&&0===i.width)return void window.odT.log("Rewarded ad: Top offset is less than 0");window.odT.hiddenContainer=[];for(let t=g.length-1;t>=w;t--)window.odT.hiddenContainer.push({element:g[t],filter:g[t].style.filter,pointerEvents:g[t].style.pointerEvents}),g[t].style.filter=`blur(${l}px)`,g[t].style.pointerEvents="none";let n=b(document.body);T(n,e,o);const d=()=>{const e=t.getBoundingClientRect(),i=u.getBoundingClientRect(),o=n.getBoundingClientRect(),d=o.bottom-o.height/2;e.top<d&&i.bottom>o.bottom?(n.style.visibility="visible",n.style.opacity="1",n.style.pointerEvents="auto"):(n.style.visibility="hidden",n.style.opacity="0",n.style.pointerEvents="all")};window.addEventListener("scroll",d,{passive:!0})}else{let e=document.createElement("div");if(e.id="od_rwdad_wrapper",0==!document.querySelectorAll(`#${e.id}`).length)return;if(u.parentNode.insertBefore(e,u),t?.enableFade){let i=document.createElement("div");i.id="od_rwdad_fade_container",i.style.maskImage=`linear-gradient(to bottom, rgba(0,0,0,1) ${100-(t?.gradientPercentage||15)}%, rgba(0,0,0,0) 100%)`,i.style.webkitMaskImage=i.style.maskImage,0==document.querySelectorAll(`#${i.id}`).length&&(e.appendChild(i),document.querySelector(`#${i.id}`).appendChild(u))}else document.querySelector(`#${e.id}`).appendChild(u);window.odT.hiddenContainer=[];for(let t=g.length-1;t>=w;t--)window.odT.hiddenContainer.push({element:g[t],display:g[t].style.display}),g[t].style.display="none";b(e),T(e)}if(window.odT.rewardedAdReady=!0,t?.articleLeftToRead&&document.querySelector(".od_article_left_to_read")){const t=parseInt(f/p*100);t>=40?document.querySelector(".od_article_left_to_read").innerHTML=t:document.querySelector(".od_article_left_to_read").parentElement.style.display="none"}}handleRewardedAdsUncropping(){if(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableForArticles)if(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableBlur)window.odT.hiddenContainer.forEach(t=>{t.element.style.filter=t.filter,t.element.style.pointerEvents=t.pointerEvents}),document.querySelector(".od-blur-overlay")&&(document.querySelector(".od-blur-overlay").style.display="none"),document.querySelector("#od_rwdad_consent_container")&&(document.querySelector("#od_rwdad_consent_container").style.display="none"),window.odT.rewardedAdReady=!1,window.odT.refreshAdSlots(window.odT.lazyLoadPendingAdSlotsWithRewarded,"lazy"),window.odT.lazyLoadPendingAdSlotsWithRewarded=[];else if(window.odT.hiddenContainer.forEach(t=>{t.element.style.display=t.display}),document.querySelector("#od_rwdad_consent_container")&&(document.querySelector("#od_rwdad_consent_container").style.display="none"),document.querySelector("#od_rwdad_enable_reward_ad")&&(document.querySelector("#od_rwdad_enable_reward_ad").style.display="none"),window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableFade){let t=document.querySelector("#od_rwdad_fade_container");t&&(t.style.maskImage="none",t.style.webkitMaskImage="none")}}getMinHeight(t,e,i){let o=0;for(const e of t){if(2===e.length&&1e3===e[1]&&!i){o=0;break}2===e.length&&1e3===e[1]&&i||2===e.length&&e[1]>0&&e[1]>o&&(o=e[1])}return e?Math.min(o,e):o}getMaxWidth(t){let e=0;for(let i=0;i<t.length;i++)2==t[i].length&&t[i][0]>e&&this.prebidSizes.some(e=>t[i].every((t,i)=>t===e[i]))&&(e=t[i][0]);return e}adslotInit(t){this.log("Initialize adslot CSS");let e=t||this.finalAdSlotsConfig.adSlotsDefinitions;for(const i of Object.values(e))if("object"==typeof i){const e=document.getElementById(i.divId);if(null!=e){let o=!1;if(i.dfpSizes&&i.dfpSizes.length){let t=i.dfpSizes,e=[[1,1],[1800,1e3]];t=t.filter(t=>!e.some(e=>e[0]===t[0]&&e[1]===t[1])),t.length||(o=!0)}let n=!("function"!=typeof this.setAdLayout||!this.setup.adLayoutEnabled||o||this.setup?.adLayoutConfig?.excludedAdslots?.includes(i.name)||this.setup?.adLayoutConfig?.excludedAdslots?.includes(i.adUnit)||this.stickyAdapter.isVerticalStickyAdSlot(i.adUnit)),d=i.vPos||"center",s=i.clsMaxHeight||null,a=i.loadType,r=5===a||9===a||i.outOfPage?null:this.getMinHeight(i.dfpSizes,s,n);if(i.hasOwnProperty("contentExtraCLS")&&parseFloat(i.contentExtraCLS)>0?r+=i.contentExtraCLS:this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("contentExtraCLS")&&parseFloat(this.setup.adSlotsConfig.contentExtraCLS)>0&&(i.adUnit.toLowerCase().includes("content_")||i.adUnit.toLowerCase().includes("mobile_pos")||i.adUnit.toLowerCase().includes("mobile_ai"))&&(r+=parseFloat(this.setup.adSlotsConfig.contentExtraCLS)),!i.vPos&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("contentExtraCLS")&&parseFloat(this.setup.adSlotsConfig.contentExtraCLS)>0&&(i.adUnit.toLowerCase().includes("content_")||i.adUnit.toLowerCase().includes("mobile_pos")||i.adUnit.toLowerCase().includes("mobile_ai"))&&(d="top"),n){let o;const n=this.stickyAdapter.getStickyAdSlotNameFromDivId(e.id);if(!n||"left"!==this.stickyAdapter.getStickyAdMode(n)&&"right"!==this.stickyAdapter.getStickyAdMode(n))o=this.getMaxWidth(i.dfpSizes);else if(i.dfpSizes&&i.dfpSizes.length>0){let t=!1;for(let e of i.dfpSizes)if(Array.isArray(e)&&2===e.length&&e[1]>e[0]){o=e[0],t=!0;break}t||(o=300)}else o=300;let s=this.setup.adLayoutConfig?this.setup.adLayoutConfig:{};t&&e.setAttribute("style",""),this.setAdLayout(s,e,r,o,i,d,a)}else{if(r>1){t&&e.setAttribute("style",""),this.log("CLS size for "+i.name+" => "+r+"px");const o=document.createElement("div"),n=`min-height: ${r}px; display: flex; flex-direction: column; justify-content: ${"center"===d?"center":"start"}; align-items: center; margin: auto;`;o.setAttribute("style",n),o.setAttribute("data-optidigital-slot","true"),o.classList.add("optidigital-wrapper-div"),e.parentNode.insertBefore(o,e),o.appendChild(e)}else e.parentElement?.setAttribute("data-optidigital-slot","true"),this.log("CLS size for "+i.adUnit+" => 0 => NO PARENT DIV");i.parentDiv=!0}}}this.log("Finish ad slot initialization"),this.layoutReady=!0,this.CMPready&&!t?this.runAuction("layoutReady"):!1===this.CMPready&&this.loadOdas(this.runOdasAuction)}checkVendor(t){let e=!1;return this.consentV2TCData&&this.consentV2TCData.hasOwnProperty("vendor")&&this.consentV2TCData.vendor.hasOwnProperty("consents")&&this.consentV2TCData.vendor.consents.hasOwnProperty(t)&&this.consentV2TCData.vendor.consents[t]&&(e=!0),e}consentCheckHBVendors(){let t=!1,e="CMP vendors MISSING: ",i=[{id:755,name:"google"},{id:915,name:"optidigital"},{id:32,name:"xandr"},{id:52,name:"magnite"},{id:45,name:"smart"},{id:91,name:"criteo"},{id:132,name:"teads"},{id:436,name:"invibes"},{id:793,name:"amazon"},{id:28,name:"triplelift"},{id:76,name:"pubmatic"},{id:259,name:"adyoulike"},{id:108,name:"richaudience"},{id:157,name:"seedtag"},{id:164,name:"outbrain"}],o=0;for(let t=0;t<i.length;t++)this.consentV2TCData.vendor.consents.hasOwnProperty(i[t].id)&&1==this.consentV2TCData.vendor.consents[i[t].id]?(o++,e+=`${i[t].name}_OK,`):e+=`${i[t].name}_KO,`;return o==i.length&&(t=!0,e=e.replace("MISSING","OK")),this.log(e),t}checkRejectAll(t){let e=!1,i=0,o=0;for(let e in t)"boolean"==typeof t[e]&&(i++,0==t[e]&&o++);return o==i&&(e=!0),e}analyzeConsentV2(){const t=this.consentV2TCData;if(!t||"object"!=typeof t)return;const{gdprApplies:e,purpose:i,vendor:o}=t;if(e&&i&&i.consents&&o&&o.consents&&o.legitimateInterests)if(e)if(this.checkRejectAll(i.consents))if(this.checkRejectAll(i.legitimateInterests))this.consentStatus="CMPv2_RejectALL";else if(!0===o.legitimateInterests[755]){[2,7,9,10].every(t=>!0===i.legitimateInterests[t])?(this.consentType="li",this.consentCheckHBVendors()?this.consentStatus="CMPv2_LAokHBok":this.consentStatus="CMPv2_LAokHBko"):this.consentStatus="CMPv2_LAko"}else this.consentStatus="CMPv2_LAMmv";else if(o.consents.hasOwnProperty("755")&&!0===o.consents[755]){const t=[2,7,9,10].every(t=>i.consents.hasOwnProperty(t)&&!0===i.consents[t]||i.legitimateInterests.hasOwnProperty(t)&&!0===i.legitimateInterests[t]);i.consents.hasOwnProperty(1)&&!0===i.consents[1]&&t?(this.consentType="ok",!0===i.consents[3]&&!0===i.consents[4]?this.consentCheckHBVendors()?this.consentStatus="CMPv2_GAMokHBok":this.consentStatus="CMPv2_GAMokHBko":!0===this.consentCheckHBVendors()?this.consentStatus="CMPv2_GAMnpHBok":this.consentStatus="CMPv2_GAMnpHBko"):this.consentStatus="CMPv2_GAMko"}else this.consentStatus="CMPv2_GAMmv";else this.consentStatus="CMPv2_OOS",this.consentType="ok";else this.consentStatus="CMPv2_invalid"}loadConfig(t){if(window!==window.top&&(this.tagMode=!0),"object"==typeof window.top.location&&window.top.location.hasOwnProperty("search")){const t=window.top.location.search;(t.includes("optidigital_debug=true")||!0===window.optidigital_debug)&&(this.debug=!0),t.includes("optidigital_debug_wallpaper=true")&&(this.debugWallpaper=!0,this.debugBidderDiscount=100),t.includes("optidigital_gamenv=test")&&(this.GAMEnv="test"),(t.includes("optidigital_fanalytics=true")||1==window.optidigital_fanalytics)&&(this.forceAnalytics=!0),t.includes("optidigital_fdload=true")&&(this.forceDload=!0),t.includes("optidigital_aicontent=true")&&(this.forceAiContent=!0)}this.setup=t,this.log("Load setup file and page configuration"),this.setup?.testGroup&&(this.testGroup=this.setup.testGroup,this.log(`Test group sampling is ${this.setup.sampling}`),this.log(`Test config revision is ${this.setup.info.revision}`));let e=document.getElementById("optidigital-ad-init");if(null!==e){let t=e.getAttribute("config");if(null==t&&(t=e.getAttribute("data-config")),t)try{this.initConfig=JSON.parse(t)}catch(e){let i=t;i=i.replace(",]","]"),this.log("Invalid JSON input => fixed "+e.message);try{this.initConfig=JSON.parse(i)}catch(t){this.log("Invalid JSON input => load error adUnit "),this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError})}}else this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError});let i=e.getAttribute("src");i.length>0&&(this.siteCode=i.substring(i.indexOf("site=")+5),-1!=this.siteCode.indexOf("&")&&(this.siteCode=this.siteCode.slice(0,this.siteCode.indexOf("&"))),this.log("Script site code => "+this.siteCode)),this.log("Opti Digital script config",this.initConfig)}else this.log("No script with id:optidigital-ad-init","error"),this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError});if(!(this.setup?.info?.publisherId&&this.setup?.info?.networkId&&this.setup?.info?.siteId&&this.setup?.info?.revision))return void this.log("No setup info");if(this.setup.hasOwnProperty("info")&&this.setup.info.hasOwnProperty("revision")&&this.log("PUBLIHSER:"+this.setup.info.publisherId+" - SITE:"+this.setup.info.siteId+" - REVISION:"+this.setup.info.revision),this.setup.info.hasOwnProperty("odNetworkId")&&this.setup.info.odNetworkId&&(this.odNetworkId=this.setup.info.odNetworkId),this.setup?.breakpoint&&(this.screen=window.top?window.top.document.documentElement.clientWidth<this.setup.breakpoint?"Mobile":"Desktop":document.documentElement.clientWidth<this.setup.breakpoint?"Mobile":"Desktop"),this.setup.hasOwnProperty("publisherInit")&&"function"==typeof this.setup.publisherInit)try{this.setup.publisherInit(this.initConfig)}catch(t){}if(this.setup.hasOwnProperty("publisherInitStart")&&"function"==typeof this.setup.publisherInitStart)try{this.setup.publisherInitStart(this.initConfig)}catch(t){}if(this.setup.hasOwnProperty("oyStatus")&&(this.oyStatus=this.setup.oyStatus),this.setup&&this.setup.hasOwnProperty("enableCookieConsent")&&(this.enableCookieConsent=this.setup.enableCookieConsent),this.setup.hasOwnProperty("enableArticleReporting")&&(this.enableArticleReporting=this.setup.enableArticleReporting),this.setup.hasOwnProperty("iasId")&&(this.iasId=this.setup.iasId),this.enableArticleReporting){let t=window.location.protocol+"//"+window.location.host+window.location.pathname;t.length>0&&(this.articleID=this.cyrb53(t,100)),this.setup.hasOwnProperty("enableArticleReportingKey")&&this.initConfig.hasOwnProperty("pageTargeting")&&this.initConfig.pageTargeting.hasOwnProperty(this.setup.enableArticleReportingKey)&&(this.articleID=this.initConfig.pageTargeting[this.setup.enableArticleReportingKey],this.log("Custom reporting key: "+this.setup.enableArticleReportingKey+" with value: "+this.articleID))}if(this.setup.hasOwnProperty("enableSourceReporting")&&(this.enableSourceReporting=this.setup.enableSourceReporting),this.enableSourceReporting){let t=document.referrer,e="direct_traffic";if(this.setup.hasOwnProperty("sourceCampaignTrackers")&&this.setup.sourceCampaignTrackers.length>0)for(let t in this.setup.sourceCampaignTrackers)if(-1!=window.location.search.indexOf(this.setup.sourceCampaignTrackers[t])){this.sourceID=this.cyrb53(this.setup.sourceCampaignTrackers[t],100),this.log("Source campaign: "+this.setup.sourceCampaignTrackers[t]);break}if(0==this.sourceID){if(t.length>0){let t=document.createElement("a");t.href=document.referrer,e=-1!=this.sourceDomains.indexOf(t.hostname)||this.setup.hasOwnProperty("sourceDomains")&&-1!=this.setup.sourceDomains.indexOf(t.hostname)?t.hostname:"referrer_unknown"}this.sourceID=this.cyrb53(e,100)}}this.setup.hasOwnProperty("enableLimitedAds")&&(this.enableLimitedAds=this.setup.enableLimitedAds),this.enableLimitedAds&&(this.consentStatusNoGAM=this.consentStatusNoGAMButLA,this.limitedAds=!0),this.setup.hasOwnProperty("targetingODBidder")&&1==this.setup.targetingODBidder&&(this.targetingPrebidPB="odtag_pb",this.targetingODBidder=!0),this.setup.hasOwnProperty("engageBackfill")&&!1===this.setup.engageBackfill&&(this.engageBackfill=!1),this.setup.hasOwnProperty("infiniteScrollWallpaperSlot")&&(this.infiniteScrollWallpaperSlot=this.setup.infiniteScrollWallpaperSlot),this.setup.hasOwnProperty("mobileEvenVerticalSizes")&&this.setup.mobileEvenVerticalSizes&&(this.mobileEvenVerticalSizes=!0),this.setup.hasOwnProperty("enableGpid")&&!1===this.setup.enableGpid&&(this.enableGpid=!1),this.setup.hasOwnProperty("noGamUseSafeframe")&&(this.noGamUseSafeframe=this.setup.noGamUseSafeframe),this.deviceDetection(),this.checkBrowser=this.tools.detectBrowser(),this.checkOs=this.tools.detectOS(),"Safari"!==this.checkBrowser&&"Firefox"!==this.checkBrowser||(this.customDNR=!1);let i=this.setup.pageViewEventTimeout||0===this.setup.pageViewEventTimeout?this.setup.pageViewEventTimeout:1e3;setTimeout(()=>{window.odT.consentV2TCData||window.odT.consentCMPUIShown||!window.optidigitalToolboxGdpr||"timeout_tcfapi"===window.odT.consentType||window.odT.analytics.pageViewEvent({firstCall:!0})},i);const o=this.setup?.adSlotsConfig?.stickyAdConfiguration||this.setup?.stickyAdConfiguration;if(o&&"object"==typeof o){!Object.keys(o).some(t=>t.includes(`${this.screen}_Sticky_`))&&o.hasOwnProperty("frequency")&&o.hasOwnProperty("frequencyImps")&&o.hasOwnProperty("frequencyInterval")&&(this.stickyFrequency=o.frequency,this.stickyFrequencyImps=o.frequencyImps,this.stickyFrequencyInterval=o.frequencyInterval)}this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("rewardedAdConfiguration")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequency")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequencyImps")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequencyInterval")&&(this.rewardedAdFrequency=this.setup.adSlotsConfig.rewardedAdConfiguration.frequency,this.rewardedAdFrequencyImps=this.setup.adSlotsConfig.rewardedAdConfiguration.frequencyImps,this.rewardedAdFrequencyInterval=this.setup.adSlotsConfig.rewardedAdConfiguration.frequencyInterval),this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes("ok")&&(this.setup.enableOdas=[...this.setup.enableOdas,"timeout_callback","timeout_tcfapi"]),window.top.addEventListener("blur",function(){window.odT.log("Window blur"),window.setTimeout(function(){"iframe"==document.activeElement.tagName.toLowerCase()?window.odT.windowStatus=1:window.odT.windowStatus=0},0)}),window.top.addEventListener("focus",function(){window.odT.windowStatus=1,window.odT.log("Window focus")}),window.top.document.addEventListener("visibilitychange",t=>{window.odT.analytics.enablePerformances&&window.odT.analytics.isSamplingCase()&&"Chrome"===window.odT.checkBrowser&&"hidden"===document.visibilityState&&!window.odT.analytics.userPerformanceSent&&(window.odT.log("Sending user performances analytics on visibility change",window.odT.analytics.userPerformances),"ko"!==window.odT.consentType&&window.odT.consentCMPUIShown?window.odT.analytics.pageViewEvent({isUserPerformanceCall:!0,sendBeacon:!0,userAction:!0}):window.odT.analytics.pageViewEvent({isUserPerformanceCall:!0,sendBeacon:!0})),"visible"!==document.visibilityState&&(window.odT.windowStatus=0,window.odT.log("Window not visible"))}),window.addEventListener("mousedown",t=>{window.odT.userAction.includes(t.type)||window.odT.userAction.push(t.type)}),window.addEventListener("mousemove",t=>{window.odT.userAction.includes(t.type)||window.odT.userAction.push(t.type)}),window.addEventListener("touchstart",t=>{window.odT.userAction.includes(t.type)||window.odT.userAction.push(t.type)}),window.addEventListener("scroll",t=>{window.odT.userAction.includes(t.type)||window.odT.userAction.push(t.type)},{passive:!0})}getInfiniteScrollDPFSizes(t){return t.filter(function(t){let e=!1;return void 0!==t&&1800!=t[0]&&(e=!0),e})}setFrequency(t){this.adAdaptersFactory.rewardedAdsAdapter.setFrequency(t)}createRewardedAdSlot(t=this.screen+"_RewardedAd"){window.googletag.cmd.push(function(){try{if(window.odT?.finalAdSlotsConfig?.adSlotsDefinitions)window.odT.adAdaptersFactory.rewardedAdsAdapter.createRewardedAdSlot(t,!0);else{let e=0;const i=50,o=setInterval(function(){e+=i,window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?(clearInterval(o),window.odT.adAdaptersFactory.rewardedAdsAdapter.createRewardedAdSlot(t,!0)):e>=window.odT.rewardedAdTimeout&&(clearInterval(o),window.odT.log(`Rewarded AD] Ad slots definitions still not defined after ${window.odT.rewardedAdTimeout}ms, failed to create slot: ${t}`))},i)}}catch(e){window.odT.log(`[Rewarded AD] Failed to create rewarded ad slot "${t}"`,e)}})}defineSlots(t){const{adSlotsDefinitions:e}=this.finalAdSlotsConfig,{adSlotsConfig:i}=this.setup;for(let o in t)if(!this.gptAdSlots.hasOwnProperty(t[o])&&e.hasOwnProperty(t[o])&&!this.isGPTdisabledForSlot(e[t[o]].name)&&!this.setup.disableGPT){let n=i&&i.adManagerKeyName?i.adManagerKeyName:this.setup?.customTargeting?.adslot?.name?this.setup.customTargeting.adslot.name:"adslot";if(6==e[t[o]].loadType){let i=window.googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${e[t[o]].customAdUnitCode?"/"+e[t[o]].customAdUnitCode:""}`,window.googletag.enums.OutOfPageFormat.INTERSTITIAL);if(i){if(i.setConfig({targeting:{[n]:e[t[o]].cdValue?e[t[o]].cdValue:e[t[o]].adUnit}}),i.addService(window.googletag.pubads()),e[t[o]].customKeyValues)for(let n in e[t[o]].customKeyValues)i.setConfig({targeting:{[n]:e[t[o]].customKeyValues[n]}});this.gptAdSlots[e[t[o]].name]=i,this.log("Created INTERSTITIAL adslot "+t[o])}else this.log("FAILED to create INTERSTITIAL adslot "+t[o]);continue}if(7==e[t[o]].loadType&&(t[o].toLowerCase().includes("siderail_left")||t[o].toLowerCase().includes(window.odT.setup?.adSlotsConfig?.sideRailsConfig?.nameSiderailLeft?.toLowerCase()))){let i=googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${e[t[o]].customAdUnitCode?"/"+e[t[o]].customAdUnitCode:""}`,googletag.enums.OutOfPageFormat.LEFT_SIDE_RAIL);if(i){if(i.setConfig({targeting:{[n]:e[t[o]].cdValue?e[t[o]].cdValue:e[t[o]].adUnit}}),i.addService(googletag.pubads()),e[t[o]].customKeyValues)for(let n in e[t[o]].customKeyValues)i.setConfig({targeting:{[n]:e[t[o]].customKeyValues[n]}});this.gptAdSlots[e[t[o]].name]=i,this.log("Created SIDE RAIL LEFT adslot "+t[o])}else this.log("FAILED to create SIDE RAIL LEFT adslot "+t[o]);continue}if(7==e[t[o]].loadType&&(t[o].toLowerCase().includes("siderail_right")||t[o].toLowerCase().includes(window.odT.setup?.adSlotsConfig?.sideRailsConfig?.nameSiderailRight?.toLowerCase()))){let i=googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${e[t[o]].customAdUnitCode?"/"+e[t[o]].customAdUnitCode:""}`,googletag.enums.OutOfPageFormat.RIGHT_SIDE_RAIL);if(i){if(i.setConfig({targeting:{[n]:e[t[o]].cdValue?e[t[o]].cdValue:e[t[o]].adUnit}}),i.addService(googletag.pubads()),e[t[o]].customKeyValues)for(let n in e[t[o]].customKeyValues)i.setConfig({targeting:{[n]:e[t[o]].customKeyValues[n]}});this.gptAdSlots[e[t[o]].name]=i,this.log("Created SIDE RAIL RIGHT adslot "+t[o])}else this.log("FAILED to create SIDE RAIL RIGHT adslot "+t[o]);continue}if(window.odT.setup.hasOwnProperty("adSlotsConfig")&&window.odT.setup.adSlotsConfig.hasOwnProperty("rewardedAdConfiguration"))try{if(this.adAdaptersFactory.rewardedAdsAdapter.createRewardedAdSlot(t[o]))continue}catch(e){this.log("[Rewarded AD] Failed to create rewarded ad slot `"+t[o]+"`",e)}if((-1!=e[t[o]].name.indexOf("OutOfPage")||e[t[o]].outOfPage)&&this.setup.sourceDomains&&"frandroid.com"!=this.setup.sourceDomains[0]&&this.setup.sourceDomains&&"numerama.com"!=this.setup.sourceDomains[0])this.gptAdSlots[e[t[o]].name]=window.googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${e[t[o]].customAdUnitCode?"/"+e[t[o]].customAdUnitCode:""}`,e[t[o]].divId).setConfig({collapseDiv:"ON_NO_FILL",targeting:{[n]:e[t[o]].cdValue?e[t[o]].cdValue:e[t[o]].adUnit}}).addService(window.googletag.pubads());else{let i=!1,d=e[t[o]].dfpSizes;e[t[o]].hasOwnProperty("infiniteScrollId")&&e[t[o]].infiniteScrollId>1&&(d=this.getInfiniteScrollDPFSizes(d),i=!0);const s=document.getElementById(e[t[o]].divId)+"-iframe-odadsrv";null!=s&&null!=s.parentElement&&s.parentElement.removeChild(s);try{if(this.gptAdSlots[e[t[o]].name]=window.googletag.defineSlot(`${this.initConfig.adUnit}${e[t[o]].customAdUnitCode?"/"+e[t[o]].customAdUnitCode:""}`,d,e[t[o]].divId).setConfig({collapseDiv:"ON_NO_FILL",targeting:{[n]:e[t[o]].cdValue?e[t[o]].cdValue:e[t[o]].adUnit}}).addService(window.googletag.pubads()),e[t[o]].customKeyValues)for(let i in e[t[o]].customKeyValues)this.gptAdSlots[e[t[o]].name].setConfig({targeting:{[i]:e[t[o]].customKeyValues[i]}});1==i&&window.odT.setSlotTargeting(this.gptAdSlots[e[t[o]].name],"infinite-scroll","yes")}catch(t){}}}}initPageTargeting(){if(window.odT.initConfig.hasOwnProperty("pageTargeting")&&"object"==typeof window.odT.initConfig.pageTargeting&&null!=window.odT.initConfig.pageTargeting){let t=Object.keys(window.odT.initConfig.pageTargeting);for(let e in t){if("string"!=typeof t[e])continue;let i=window.odT.initConfig.pageTargeting[t[e]];if("number"==typeof i)i=i.toString();else if(Array.isArray(i)&&(i=this.tools.flattenTargetingValues(i).filter(t=>"string"==typeof t||"number"==typeof t).map(t=>"number"==typeof t?t.toString():t),0===i.length))continue;window.odT.setPageTargeting(t[e],i)}}if(window.odT.articleID&&window.odT.setPageTargeting("article_id",window.odT.articleID.toString()),window.odT.sourceID&&window.odT.setPageTargeting("source_id",window.odT.sourceID.toString()),window.odT.testGroup&&"test"==window.odT.testGroup&&window.odT.setPageTargeting("test_group","test"),window.odT.GAMEnv&&"test"==window.odT.GAMEnv&&window.odT.setPageTargeting("optidigital_gamenv","test"),!window.odT.limitedAds||"CMPv2_LAokHBok"!=window.odT.consentStatus&&"CMPv2_LAokHBko"!=window.odT.consentStatus||window.odT.setPageTargeting("od_limitedads","1"),window.odT.setPageTargeting("odtag_status","1"),"Chrome"===window.odT.checkBrowser){let t="0";window.odT.setPageTargeting("od_ccd",t),"cookieDeprecationLabel"in navigator&&navigator.cookieDeprecationLabel.getValue().then(e=>{-1!=e.indexOf("treatment_1.")&&(t="1"),-1!=e.indexOf("control_2")&&(t="2"),window.odT.setPageTargeting("od_ccd",t)})}}isAdslotVisible(t){if(!t&&!t.parentElement)return!1;if(window.odT.setup?.adSlotsConfig?.adSlotsDefinitions){const e=t.getAttribute("id").replace(window.odT.divIdPrefix,""),i=t=>t.map(t=>t.startsWith("#")||t.startsWith(".")?t.slice(1):t),o=t=>!("Desktop"===window.odT.screen&&(!t.deviceTarget||t?.deviceTarget?.toLowerCase().includes("mobile")))&&("Mobile"!==window.odT.screen||!t?.deviceTarget?.toLowerCase().includes("desktop")),n=Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find(t=>t.divId===e),d=window.odT.setup.adSlotsConfig.adSlotsDefinitions.find(t=>t.name===e||t.divTarget&&i(t.divTarget).includes(e)&&o(t)||t.name===n?.adUnit);if(d&&d?.ignoreParentVisibility)return!0}return!(0==t.parentElement.offsetWidth&&0==t.parentElement.offsetHeight)&&"hidden"!==getComputedStyle(t)?.visibility}buildFirstLoadAdSlots(){for(let t of Object.values(this.finalAdSlotsConfig.adSlotsDefinitions)){if(!t.hasOwnProperty("dfpSizes"))continue;let e=0,i=0;if(t.hasOwnProperty("loadType")&&(e=t.loadType),t.hasOwnProperty("lazyLoadPx")&&(i=t?.lazyLoadPxWithCore?Math.max(t.lazyLoadPxWithCore,t.lazyLoadPx):t.lazyLoadPx),0==e||this.adAdaptersFactory.isSpecialAdLoadType(e)){this.stickyAdapter.isStickyAdSlot(t.name)&&!window.odT.stickyAdapter.isFallback(t.name)&&0!==(this.stickyAdapter.getStickyAdTopTrigger(t.name)||0)||-1!=this.firstLoadAdSlots.indexOf(t.name)||this.firstLoadAdSlots.push(t.name)}else if(1==e){const e=document.getElementById(t.divId);if(null!=e&&this.isAdslotVisible(e)){const o=e.getBoundingClientRect();this.log(`Position for ${t.name} - top: ${o.top}, innerHeight: ${window.innerHeight}`),o.top>=0&&o.top-window.innerHeight<=i||o.top<0&&Math.abs(o.top)<=i||this.forceDload?-1==this.firstLoadAdSlots.indexOf(t.name)&&this.firstLoadAdSlots.push(t.name):-1==this.lazyLoadPendingAdSlots.indexOf(t.name)&&this.lazyLoadPendingAdSlots.push(t.name)}else null==e||this.isAdslotVisible(e)||this.notVisibleAdslots.push(t.divId)}}if(window.odT.loadByGroup(window.odT.firstLoadAdSlots),window.odT.fetchAPSBids(window.odT.firstLoadAdSlots||[]),this.log("First ad slots were created"),this.notVisibleAdslots.length){const t=new Map,e=e=>{const i=document.getElementById(e);if(!i)return;const o=i.parentElement;if(!o)return;let n=!1;const d=()=>{if(n)return;n=!0;const d=window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find(t=>t.divId===e):null,s=d?d.name:null;s&&(window.odT.lazyLoadPendingAdSlots.push(s),window.odT.monitorLazyLoadAdSlots(s)),window.odT.notVisibleAdslots=window.odT.notVisibleAdslots.filter(t=>t!==e);const a=t.get(e);a&&(a.intersection?.unobserve(i),a.resize?.unobserve(o),t.delete(e))},s=new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>0&&d()})},{threshold:.1}),a=new ResizeObserver(t=>{t.forEach(t=>{const{width:e,height:i}=t.contentRect;e>0&&i>0&&d()})});s.observe(i),a.observe(o),t.set(e,{intersection:s,resize:a})};window.odT.notVisibleAdslots.forEach(e)}window.odT.AIArticles=new u(optidigitaltagsinserter)}createAdStyles(){let t=document.createElement("style");t.type="text/css";let e=".optidigital-ad-center { text-align: center; } .optidigital-ad-center-sticky { text-align: center; width:100%; position: -webkit-sticky; position: sticky; top: 0; }";for(let t of Object.values(this.finalAdSlotsConfig.adSlotsDefinitions))"object"!=typeof t||this.tagMode||(t.adUnit.includes("Content")||t.adUnit.includes("Mobile_Pos")||t.adUnit.includes("Mobile_AI"))&&(e+="."+t.adUnit+"{margin-top: 1em;margin-bottom: 1em;}");t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}getGPTSlots(t){var e=[];for(var i in t)this.gptAdSlots.hasOwnProperty(t[i])&&e.push(this.gptAdSlots[t[i]]);return e}refreshAdSlots(t,e,i){window.odT.setup[`fullPackage${window.odT.screen}`]||"OD"===window.odT.adserver||window?.odT?.dynamicAdslotsCalled||window.odT.loadCore();const o=(t,e,i,o=!1)=>{null!==t&&window.odT.log(`Refresh ad slots - loadType:${e} prebidTimeout: ${i}, slot: ${t}`);window.odT.stickyAdapter.getStickyAdConfigurations();this.stickyAdapter.getStickyNames().forEach(e=>{if(null!==t&&t.includes(`${e}`)){const t=`${window.odT.divIdPrefix}${e}`;if(document.getElementById(`sf_tag_${t}`)||document.getElementById(`${t}-iframe-od`)||document.getElementById(`${t}-iframe-odadsrv`)){const i=document.getElementById(t);if(i){i.style.height=getComputedStyle(i).height,i.innerHTML="";const t=String(e).replace(/[^a-zA-Z0-9]/g,"_"),o=document.getElementsByClassName(`opd_adsticky-scroll_${t}`)[0];o&&(o.style.display="none")}}}}),void 0===e&&(e="manual"),void 0===i&&(i=null);let n=[],d=[],s=window.odT.setup.biddersSetup&&window.odT.setup.timeouts&&window.odT.setup.timeouts.prebidIndirect?window.odT.setup.timeouts.prebidIndirect:1500,a=window.odT.setup.biddersSetup&&window.odT.setup.timeouts&&window.odT.setup.timeouts.failsafe?window.odT.setup.timeouts.failsafe:2500;if(n="string"==typeof t?[t]:t,!window.odT.firstLoadAdSlotsShowed&&window.odT.setup[`fullPackage${window.odT.screen}`]&&(n=n?n.concat(window.odT.firstLoadAdSlots):window.odT.firstLoadAdSlots,window.odT.firstLoadAdSlotsShowed=!0),"OD"==window.odT.adserver&&window.odT.setup.adSlotsConfig&&window.odT.setup.adSlotsConfig.adSlotsDefinitions&&window.odT.setup.adSlotsConfig.adSlotsDefinitions.some(t=>void 0!==t.odZoneId)){let t=[];for(let e=0;e<n.length;e++)for(let i in window.odT.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[n[e]].adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name){let o={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize,divId:window.odT.finalAdSlotsConfig.adSlotsDefinitions[n[e]].divId};t.push(o);break}if(t.length>0){let i=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,t,"refresh",window.odT.consentType,window.odT.testGroup,e,!1,i)}return"ok"}for(let t in n)window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(n[t])&&d.push(n[t]);if(0==d.length)return"error: no matching slot";const r=window.odT.setup.disableGPT?[]:d.filter(t=>!window.odT.isGPTdisabledForSlot(t));null!==i&&(s=i),r.length>0&&window.googletag.cmd.push(function(){window.odT.defineSlots(r)}),window.odT.setup.hasOwnProperty("prebidIndirectStaticCpm")&&1==window.odT.setup.prebidIndirectStaticCpm&&window.odT.setup.hasOwnProperty("consentData")&&window.odT.setup.consentData.hasOwnProperty("consentData")&&window.odT.setup.consentData.hasOwnProperty("gdprApplies")&&!o&&window.odpbjs.que.push(function(){window.odpbjs.setConfig({consentManagement:{gdpr:{cmpApi:"static",allowAuctionWithoutConsent:!0,consentData:{getTCData:{tcString:window.odT.consentData.consentData,gdprApplies:window.odT.consentData.gdprApplies}}}},cache:{url:"https://pbs.optidigital.com/cache",ignoreBidderCacheKey:!0}})});for(let t in r)window.odT.gptAdSlots.hasOwnProperty(r[t])&&(window.googletag.cmd.push(function(){Object.keys(window.odT.gptAdSlots[r[t]]?.getConfig("targeting")?.targeting||[]).forEach(e=>{e.includes("hb_")&&window.odT.gptAdSlots[r[t]].setConfig({targeting:{[e]:null}})})}),"auto"==e&&window.googletag.cmd.push(function(){window.odT.setSlotTargeting(window.odT.gptAdSlots[r[t]],"auto_refresh","yes")}));return s>0&&!o?window.odTC.executeAPSAndPrebid(s,a,structuredClone(d)):o?window.odT.callPrebidAdapter("refresh",null,null,d):r.length>0&&window.googletag.cmd.push(function(){window.googletag.pubads().refresh(window.odT.getGPTSlots(r))}),"ok"};if(window.odT.loadCoreFinished&&window.odT.userAction.length)o(t,e,i);else if(!window.odT.loadCoreFinished&&window.odT.userAction.length){let n=0;const d=setInterval(()=>{let s=window.odT.setup.loadCoreTimeout?window.odT.setup.loadCoreTimeout:1e3;window.odT.loadCoreFinished?(clearInterval(d),o(t,e,i)):n>s&&(clearInterval(d),o(t,e,i,!0)),n+=50},50)}else o(t,e,i,!0)}monitorAutomaticRefresh(){const{automaticRefresh:t}=this.setup;let e=t&&t.intervalTimeout?t.intervalTimeout:2e3;setInterval(()=>{if(0==window.odT.windowStatus)return!1;if(window.odT?.setup?.refreshAfterUserAction&&!window.odT?.userAction?.length)return!1;const e=new Date,i=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions);let o=[];for(let n in i){if("string"!=typeof i[n])continue;let d=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].adUnit,s=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].divId,a=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].loadType,r=t&&t.max?t.max:1/0,l=3e4;if(window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].refreshDelay?l=window.odT.adSlotsLoadStatus?.[s]?.delay?window.odT.adSlotsLoadStatus[s].delay:window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].refreshDelay:window.odT.adSlotsLoadStatus?.[s]?.delay&&(l=window.odT.adSlotsLoadStatus[s].delay),window.odT.analytics.adSlotsLoadCount[s]>=1&&window.odT.analytics.adSlotsLoadCount[s]<r&&l>0&&e.getTime()-window.odT.analytics.adSlotsLoadTime[s]>=l){let r=.5;t&&t.adSlots&&t.adSlots[d]&&t.adSlots[d].hasOwnProperty("view")&&"number"==typeof t.adSlots[d].view&&(r=t.adSlots[d].view);const l=document.getElementById(s);if(null==l||window.odT.tagMode){if(null!==l&&window.odT.tagMode){const t=t=>{let e=t.getBoundingClientRect();return(!window.odT.adSlotsUnfilledCount[s]||window.odT.adSlotsUnfilledCount[s]<3)&&e.height>=50&&(e.top>=0&&window.top.innerHeight-e.top>e.height*r||e.top<0&&Math.abs(e.top)<e.height*r)||0==r};let e=window.top.document.querySelectorAll("iframe");for(let d=0;d<e.length;d++){let s=e[d];if(s.contentWindow===window){t(s)&&o.push(i[n]);break}}}}else{const t=getComputedStyle(l)?.visibility;let d=l.getBoundingClientRect();if(0===d.top&&0===d.width||window.odT.setup.disableGPT&&0===d.height)if(l.closest(".optidigital-wrapper-div")&&5!==a&&9!==a)d=l.closest(".optidigital-wrapper-div").getBoundingClientRect();else{let t=l.parentElement;for(;t&&t.offsetHeight<1;)t=t.parentElement;d=t?t.getBoundingClientRect():l.getBoundingClientRect()}window.odT.log(`Position for ${i[n]}, top: ${d.top}, height: ${d.height}, innerHeight: ${window.innerHeight}`);const c=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(s);let u=!0;if(c){const t=window.odT.stickyAdapter.getStickyAdContainerId(c),e=document.getElementById(t);if(e&&e.getBoundingClientRect()){let t=e.getBoundingClientRect();0===t.top&&0===t.bottom&&0===t.width&&0===t.height&&(u=!1)}}const p=document.getElementById("opd_bottomstickyad");if(p&&p.getBoundingClientRect()&&!window.odT.stickyAdapter.isFallback(c)){let t=p.getBoundingClientRect();0===t.top&&0===t.bottom&&0===t.width&&0===t.height&&(u=!1)}const g="closed"===(c?window.odT.stickyAdapter.getStickyAdStatus(c):null)||"closed"===window.odT.stickyAdStatus;5!==a&&9!==a||window.odT.adSlotsUnfilledCount[s]&&!(window.odT.adSlotsUnfilledCount[s]<3)||g||!c||!window.odT.stickyAdapter.shouldRefreshStickyAd(c,u)?(5===a||9===a||window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].outOfPage||s.toLowerCase().includes("outofpage")||s.toLowerCase().includes("wallpaper")&&window.odT.wallpaperFilled||s.toLowerCase().includes("billboard_1")&&window.odT.wallpaperForBillboard||window.odT.adSlotsUnfilledCount[s]&&!(window.odT.adSlotsUnfilledCount[s]<3)||"hidden"===t||!(d.height>=1)||!(d.top>=0&&window.innerHeight-d.top>d.height*r||d.top<0&&Math.abs(d.top)<d.height*r))&&0!=r||(window.odT.log("Refresh slot => "+(e.getTime()-window.odT.analytics.adSlotsLoadTime[s])),window.odT.analytics.adSlotsLoadTime[s]=e.getTime(),o.push(i[n]),window.odT.loadByGroup(o,!1)):(window.odT.log("Refresh slot => "+(e.getTime()-window.odT.analytics.adSlotsLoadTime[s])),window.odT.analytics.adSlotsLoadTime[s]=e.getTime(),o.push(s.replace(window.odT.divIdPrefix,"")))}}else!window.odT.tagMode&&7===window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[i[n]].loadType&&l>0&&e.getTime()-window.odT?.analytics?.adSlotsLoadTime?.[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]>=l&&(!window.odT.adSlotsUnfilledCount[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]||window.odT.adSlotsUnfilledCount[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]<3)&&(window.odT.log("Refresh slot => "+(e.getTime()-window.odT?.analytics?.adSlotsLoadTime?.[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()])),window.odT.analytics.adSlotsLoadTime[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]=e.getTime(),o.push(i[n]));if(window.odT.analytics.adSlotsLoadCount[s]>=1&&window.odT.analytics.adSlotsLoadCount[s]<r&&e.getTime()-window.odT.analytics.adSlotsLoadTime[s]>=l-5e3){let e=.5;t&&t.adSlots&&t.adSlots[d]&&t.adSlots[d].hasOwnProperty("view")&&"number"==typeof t.adSlots[d].view&&(e=t.adSlots[d].view);const i=document.getElementById(s);if(null!=i){const t=i.getBoundingClientRect();(t.height>=1&&(t.top>=0&&window.innerHeight-t.top>t.height*e||t.top<0&&Math.abs(t.top)<t.height*e)||0==e)&&(window.odT.setup[`fullPackage${window.odT.screen}`]||window.odT.loadCore())}}}o.length>0&&window.odT.refreshAdSlots(o,"auto")},e),this.log("Monitor automatic refresh is starting")}monitorLazyLoadAdSlots(t=!1){if(t&&!window?.odT?.monitorLazyLoadCalled&&(window.odT.dynamicAdslotsCalled=!0),t||(window.odT.monitorLazyLoadCalled=!0),!window?.odT?.monitorLazyLoadCalled)return;const e=(t,e)=>new IntersectionObserver((t,i)=>{const o=[];t.forEach(t=>{if(t.isIntersecting){const n=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.divId,d=n?document.getElementById(n):null;let s=!1;window.odT.rewardedAdReady&&window.odT?.setup?.adSlotsConfig?.rewardedAdConfiguration?.articleContentSelector&&(s=window.odT.isElementUnderBlur(d,document.querySelector(window.odT.setup.adSlotsConfig.rewardedAdConfiguration.articleContentSelector))),!window.odT.rewardedAdReady||window.odT.rewardedAdReady&&!s?this.stickyAdapter&&(this.stickyAdapter.isStickyAdSlot(e)||this.stickyAdapter.isVerticalStickySlot(e))&&this.stickyAdapter.isFallback(e)||o.push(e):window.odT.lazyLoadPendingAdSlotsWithRewarded.push(e),window.odT.lazyLoadPendingAdSlots=window.odT.lazyLoadPendingAdSlots.filter(t=>t!==e),i.unobserve(t.target)}}),o.length>0&&(window.odT.loadByGroup(o),window.odT.refreshAdSlots(o,"lazy"))},{root:null,rootMargin:t,threshold:0});let i=null;const o=new Map,n=t=>{const n=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.divId;if(!n)return;if(o.has(n))return;let d="0px";const s=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t];s?.lazyLoadPx&&(d=`${s.lazyLoadPxWithCore?Math.max(s.lazyLoadPxWithCore,s.lazyLoadPx):s.lazyLoadPx}px`),o.set(n,{lazyLoadObserver:null,adSlotId:t,rootMargin:d}),i||(i=new MutationObserver(t=>{if(0===o.size)return;const i=new Set(o.keys());t.forEach(t=>{"childList"===t.type&&t.addedNodes.forEach(t=>{if(t.nodeType===Node.ELEMENT_NODE&&t.id&&i.has(t.id)){const i=o.get(t.id);if(!i)return;i.lazyLoadObserver||(i.lazyLoadObserver=e(i.rootMargin||"0px",i.adSlotId)),i.lazyLoadObserver.observe(t)}})})}),i.observe(document.body,{childList:!0,subtree:!0}));const a=document.getElementById(n);if(!a)return;const r=o.get(n);r&&(r.lazyLoadObserver||(r.lazyLoadObserver=e(d,t)),r.lazyLoadObserver.observe(a))};t?n(t):this.lazyLoadPendingAdSlots.forEach(t=>{n(t)}),this.log("Monitor lazy load is starting")}loadCoreConfig(){!function(){var t=document.createElement("link");t.rel="preload",t.as="script",t.href=`https://scripts.opti-digital.com/tags/?lib=corev2_c&site=${window.odT.siteCode}${"test"===window.odT.testGroup?"&test=true":""}`;var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e);var i=document.createElement("script");i.async=!0,i.type="text/javascript",i.src=t.href,i.onload=function(){"object"==typeof window.odTC&&window.odTC.start()},t.after(i)}()}loadCore(){!window.odT.loadOTExecuted&&!window.odT.userAction.length||!0===window.odT.loadOTExecuted&&window.odT.userAction.length||!0===window.odT.loadOTExecuted&&!window.odT.userAction.length||(window.odT.setup[`fullPackage${window.odT.screen}`]||window.odT.loadCoreConfig(),window.odT.loadCoreLib())}async loadCoreLib(){if(window.odT.loadOTExecuted=!0,-1==window.location.search.indexOf("optidigital_loads=0"))if(window.odT.setup[`fullPackage${window.odT.screen}`])"object"==typeof optidigitalSetupCore&&"object"==typeof window.odTC&&window.odTC.start();else{let t=`https://scripts.opti-digital.com/lib/?lib=corev2&site=${window.odT.siteCode}&v=${odTLibs.odcore}`;const{default:e}=await import(t);new e}}initAdserver(t,e,i){const o=(t,e,i)=>{if(window.odpbjs.initAdserverSet)return;window.odpbjs.initAdserverSet=!0;const o=[];if(!i&&window.odT.firstLoadAdSlots.length>0)for(const t of window.odT.firstLoadAdSlots){if(window.odT.isGPTdisabledForSlot(t)||window.odT.setup.disableGPT){const e=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.divId;if(e){window.odT.log(`First Chance: ${t} UNFILLED (GPT disabled)`),window.odT.triggerFallback(t),window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:e,name:t}}),window.odT.analytics.updateAdSlotLoad(e);const i=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===e):null,{amznbid:o,od_pfg:n,od_pf_group:d,od_pf_pb:s}=window.odT.tools.checkSlotTargeting(i),a=window.odT.analytics.addBidderMetrics(e,null,null,o);let r={divId:t,divIdFull:e,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:null,amazonStatus:o,oyStatus:n,oyTestGroup:d,oyPb:s,prebidBid:null,nogam:!0,bidders:Object.keys(a).length?a:null};window.odT.analytics.adRequestEvent(r,!0)}continue}o.push(t)}window.googletag.cmd.push(function(){window.odT.log(`Init ads server from ${e}, CMP consent status: ${window.odT.consentStatus}`),void 0===window.googletag.pubadsReady?setTimeout(function(){window.googletag.cmd.push(function(){i?window.googletag.pubads().refresh(window.odT.getGPTSlots(i)):o.length>0&&window.googletag.pubads().refresh(window.odT.getGPTSlots(o))})},10):i?window.googletag.pubads().refresh(window.odT.getGPTSlots(i)):o.length>0&&window.googletag.pubads().refresh(window.odT.getGPTSlots(o))})};if(!window.odT.enableAmazonAPS||window.odT.amazonBidsReady)o(0,e,i);else{const t=(window.odT.setup.biddersSetup.amazon.timeout||1e3)-(Date.now()-window.odT.initAPS);let n=0;if(t>0){let d=setInterval(()=>{window.odT.amazonBidsReady||n>=t?(clearInterval(d),o(0,e,i)):n+=20},20)}else o(0,e,i)}}setCookie(t,e,i,o){let n=new Date;n.setTime(n.getTime()+1e3*i);let d="expires="+n.toUTCString();document.cookie=o?t+"="+e+";"+d+";domain="+o+";path=/;sameSite=Lax":t+"="+e+";"+d+";path=/"}getCookie(t){let e=t+"=",i=document.cookie.split(";");for(let t=0;t<i.length;t++){let o=i[t];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}handleUnfilledSlot(t,e,i,o){window.odT.log(`First Chance: ${t} UNFILLED ${i}`),window.odT.triggerFallback(t);const n=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(e);if(n){const t=window.odT.stickyAdapter.getStickyAdContainerId(n),i=document.getElementById(t);if(i){const t=n.replace(/[^a-zA-Z0-9]/g,"_");i.classList.remove("opd_adsticky-scroll_"+t)}if(e==window.odT.stickyAdDivId){const t=document.getElementById("opd_bottomstickyad");t&&t.classList.remove("opd_adsticky-scroll")}}if(window.odT.loadChildrenIfEmpty&&window.odT.loadChildrenIfEmpty.hasOwnProperty(e)&&window.odT.refreshAdSlots(window.odT.loadChildrenIfEmpty[e],"parent"),window.odT.isBackfillEnabled(t))window.odT.callPrebidAdapter("backfill",e,t);else if(window.odT.isSecondChanceEnabled(t,e))"undefined"!=typeof optidigitalAdsrv?window.odT.runSecondChance(t,e,o):(window.odT.secondChancePending.push({adslotKV:t,divId:e,event:o}),window.odT.loadOdas(window.odT.runSecondChance,window.odT.secondChancePending));else{const i=window.odT.adAdaptersFactory.rewardedAdsAdapter.getRewardedAdDivId();"string"==typeof t&&"string"==typeof i&&t.toLowerCase()===i.toLowerCase()&&window.optidigitalToolbox?.rewardedSlotUnfilled&&window.optidigitalToolbox.rewardedSlotUnfilled(t),window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:e,name:t}})}window.odT.analytics.updateAdSlotLoad(e);let d={slot:o};window.odT.analytics.registerAdslotLoad(e,!1,d,t)}getSlotNameFromEntry(t){return"string"==typeof t?t:t?.placementId||t?.adUnitCode||t}buildOptiyieldDebugFromGptSlot(t){let e="OY_PF:";try{e+=t?.getConfig("targeting")?.targeting?.od_pf_pb?.[0]||"na"}catch(t){e+="na"}return e}handleUnfilledSlotEntry(t){const e=this?.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.divId;e&&this.handleUnfilledSlot(t,e,"",null)}eventSlotRendered(t){window.odT.analytics.handleFirstAdPerformanceTracking("through GAM");const e=t.slot.getSlotElementId();let i="";const o=window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:window.odT.setup?.customTargeting?.adslot?.name?window.odT.setup.customTargeting.adslot.name:"adslot";if(1==t.slot.getConfig("targeting")?.targeting?.[o]?.length){let e=t.slot.getConfig("targeting")?.targeting?.[o]?.[0];i=Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find(t=>t&&t.cdValue===e||t.adUnit===e)&&Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find(t=>t&&t.cdValue===e||t.adUnit===e).name}if(!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i])return;let n="OY_PF:";1==t.slot.getConfig("targeting")?.targeting?.od_pf_pb?.length?n+=t.slot.getConfig("targeting")?.targeting?.od_pf_pb?.[0]:n+="na";window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(e)&&document.getElementById(e)&&(document.getElementById(e).style.height="auto");let d=`${window.odT.screen}_Sticky_Bottom`;const s=window.odT.setup?.adSlotsConfig?.stickyAdConfiguration||window.odT.setup?.stickyAdConfiguration;if(s&&"object"==typeof s){const t=Object.keys(s);if(t.some(t=>t.includes(`${window.odT.screen}_Sticky_`))){const e=t.filter(t=>t.includes(`${window.odT.screen}_Sticky_`));e.length>0&&(d=e[0])}else s[`name${window.odT.screen}`]&&(d=s[`name${window.odT.screen}`])}if(e===window.odT.stickyAdDivId&&document.getElementById(`${window.odT.divIdPrefix}${d}`)&&(document.getElementById(`${window.odT.divIdPrefix}${d}`).style.height="auto"),t.isEmpty)window.odT.handleUnfilledSlot(i,e,n,t.slot);else{let o="null";if(null!=t.size&&(o=window.odT.tools.formatSizeArrayToString(t.size)),window.odT.log(`First Chance: ${i} FILLED (${o}) ${n} `),8===window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[i]?.loadType){window.odT.handleRewardedAdsCropping();const t=window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.timeout||5e3,e=performance.now(),i=()=>{if(window.odT.adAdaptersFactory?.rewardedAdsAdapter?.rewardedAdsReady)return;performance.now()-e>=t?window.odT.handleRewardedAdsUncropping():requestAnimationFrame(i)};requestAnimationFrame(i)}window.odT.analytics.adSlotsLoadCount.hasOwnProperty(e)||window.odT.stickyFormatLoaded.length&&window.odT.stickyFormatLoaded.includes(i)||!window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(i)||!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].hasOwnProperty("anchor")||!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].anchor||null===t.size||1===t.size[0]||1800===t.size[0]||1e3===t.size[1]||!window.odT.stickyFormatClosed||window.odT.setStickyFormat(i,t.size[0],window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3),window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:e,size:o,name:i,gptEvent:t}}),window.odT.loadChildrenIfFilled&&window.odT.loadChildrenIfFilled.hasOwnProperty(e)&&window.odT.refreshAdSlots(window.odT.loadChildrenIfFilled[e],"parent");const d=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(e);if(d){const t=window.odT.stickyAdapter.getStickyAdContainerId(d),i=`opd_adsticky-scroll_${d.replace(/[^a-zA-Z0-9]/g,"_")}`,o=document.getElementById(t);if(o&&o.classList.add(i),window.odT.stickyAdapter.setStickyAdStatus(d,"rendered"),e==window.odT.stickyAdDivId){window.odT.stickyAdStatus="rendered";const t=document.getElementById("opd_bottomstickyad");t&&t.classList.add("opd_adsticky-scroll")}window.odT.stickyAdapter.updateStickyFrequency(d)}window.odT.replaceHouseCampaigns(i,t?.advertiserId)&&window.odT.callPrebidAdapter("backfill",e,i),window.odT.analytics.updateAdSlotLoad(e),window.odT.analytics.registerAdslotLoad(e,!0,t,i)}}replaceHouseCampaigns(t,e){return!!this.isBackfillEnabled(t)&&(!(!Array.isArray(this.setup?.advertisers?.house_backfill)||!this.setup?.advertisers?.house_backfill?.includes(e))||!!(this.setup.backfillReplaceHouse&&Array.isArray(this.setup?.advertisers?.house)&&this.setup?.advertisers?.house?.includes(e)&&!Array.isArray(this.setup?.advertisers?.house_backfill)||0===this.setup?.advertisers?.house_backfill?.length))}callPrebidAdapter(t,e,i,o){window.odT.log("Build Engage payload - "+t);let n="backfill"===t,d="refresh"===t;const s=t=>{let e=[];for(let i=0;i<t.length;i++)if(2===t[i].length){let o=window.odT.tools.formatSizeArrayToString(t[i]);e.push(o)}return e},a=function(){let t=0;return function(){return t++,t}}(),r=()=>a()+Math.random().toString(16).substr(2),l={ko:"1",li:"2",ok:"3",timeout_callback:"3",timeout_tcfapi:"3"};let c=[];const u=t=>{let i={},o=e||(window.odT.mappedSite?window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].divId:window.odT.divIdPrefix+t);if(i={sizes:s(window.odT.getPrebidAdUnitsSizes(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.dfpSizes||[])),bidId:r(),adUnitCode:o,placementId:n&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t]?.cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].cdValue:window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].adUnit},document.getElementById(`${o}`)&&(i.adContainerWidth=document.getElementById(`${o}`).offsetWidth,i.adContainerHeight=document.getElementById(`${o}`).offsetHeight),window.odT.initConfig&&window.odT.initConfig.adUnit&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t]&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].adUnit&&window.odT.enableGpid){let e=`${window.odT.initConfig.adUnit}/${window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].adUnit}`;i.gpid=e}if(!n&&window.odT.setup?.s2sConfig){const t=((t,e)=>{let i={};return Object.entries(t).forEach(([o,n])=>{const d=n.adSlots?.[e];if(d){const d=n?.countries,s=n?.browsers,a=n?.devices;if((!d||d.includes(window.optidigitalToolboxCC))&&(!s||s.includes(window.odT.checkBrowser.toLowerCase()))&&(!a||a.includes(window.odT.deviceCategory.toLowerCase()))){let d;switch(o){case"outbrain":let i;n.adSlots[e].hasOwnProperty("publisherId")&&(i={publisher:{id:n.adSlots[e].publisherId}},i.publisher.name=window.location.host.replace("www.",""),i.publisher.domain=window.location.host,i.tagid=e,d=i);break;case"optidigital":try{let i;if(!n.adSlots[e].hasOwnProperty("status")||"1"!=n.adSlots[e].status||1!==t?.optidigitalAdSlots)return d;i={},i.publisherId="direct"===window.odT.setup?.schain?`p${window.odT.setup.info.publisherId.toString()}`:`s${window.odT.setup.info.siteId.toString()}`,i.placementId=window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].adUnit,i.divId=""!==window.odT.divIdPrefix?window.odT.divIdPrefix+e:window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].divId,i.pageTemplate=window.odT.initConfig.adUnit,odT.setup.hasOwnProperty("bapp")&&Array.isArray(odT.setup.bapp)&&(i.bapp=window.odT.setup.bapp),d=i}catch(t){}break;default:n.adSlots[e]}i[o]=d||n.adSlots[e]}}}),0!==Object.keys(i).length&&i})(window.odT.setup.s2sConfig,i.placementId);t&&(i.s2sConfig=t)}return i};if(n||d)if(!n&&d){if(o&&o.forEach(t=>{let e=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.loadType;if(this.adAdaptersFactory.isSpecialAdSlot(t)||e&&6===e||e&&7===e||e&&8===e)return;const i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.dfpSizes;if(i&&i.length){if(!window.odT.getPrebidAdUnitsSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].dfpSizes).length)return}let o=u(t);o?.sizes?.length?c.push(o):window.odT.runGPTAuction("EngageNoBidRefresh",[t])}),!c.length)return void window.odT.runGPTAuction("EngageNotEligible")}else{let t=u(i);if(!t?.sizes?.length)return;c.push(t)}else{if(window.odT.callOy(),!window.odT.firstLoadAdSlots.length)return void window.odT.runGPTAuction("EngageNoDirectSlot");if(window.odT.firstLoadAdSlots.forEach(t=>{let e=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.loadType;if(this.adAdaptersFactory.isSpecialAdSlot(t)||e&&6===e||e&&7===e||e&&8===e)return;const i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.dfpSizes;if(i&&i.length){if(!window.odT.getPrebidAdUnitsSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].dfpSizes).length)return}let o=u(t);if(!o?.sizes?.length)return window.odT.firstLoadAdSlots=window.odT.firstLoadAdSlots.filter(e=>e!==t),void window.odT.runGPTAuction("EngageNoBidRefresh",[t]);c.push(o)}),!c.length)return void window.odT.runGPTAuction("EngageNotEligible")}const p={referrer:window.location.href,pageTemplate:window.odT.initConfig.adUnit,hb_version:"optidigital/3.0.0",deviceWidth:document.documentElement.clientWidth,bidderRequestId:r(),publisherId:"direct"===window.odT.setup?.schain?`p${window.odT.setup.info.publisherId.toString()}`:`s${window.odT.setup.info.siteId.toString()}`,imp:c,badv:[],bcat:[],bapp:[]};if(window.odT.setup.schain&&"direct"===window.odT.setup.schain||(p.schain={complete:1,nodes:[{asi:"optidigital.com",hp:1,sid:window.odT?.setup?.info?.sellerId?window.odT.setup.info.sellerId.toString():window.odT.odNetworkId?`p${window.odT.setup.info.publisherId.toString()}`:window.odT.setup.info.siteId.toString()}],ver:"1.0"}),p.device={w:window.screen.width,h:window.screen.height,dnt:navigator.doNotTrack?1:0,ua:navigator.userAgent,language:navigator.language,ext:{vpw:window.innerWidth,vph:window.innerHeight}},navigator?.userAgentData?.brands?.length&&(p.device.sua={source:navigator.userAgentData?1:0,platform:{brand:navigator.userAgentData.platform},browsers:navigator.userAgentData.brands.map(t=>({brand:t.brand,version:[t.version]})),mobile:navigator.userAgentData.mobile?1:0}),n){const t=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[i]?.divId):null,{od_pf_group:o,od_pf_ta:n}=window.odT.tools.checkSlotTargeting(t);p.subids={},window.odT.testGroup&&"test"===window.odT.testGroup&&(p.subids.sub1="test"),window.odT.analytics.adSlotsLoadCount.hasOwnProperty(e)&&window.odT.analytics.adSlotsLoadCount[e]>0&&(p.subids.sub2="yes"),window.odT.consentType&&l[window.odT.consentType]&&(p.subids.sub3=l[window.odT.consentType]),o&&(p.subids.sub4="test"),p.subids.sub5=window.odT.customDNR?"1":"0",p.subids.sub6=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[i].cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].cdValue:i,n&&(p.subids.sub7=n)}p.gdpr={consent:window.odT.consentV2TCData&&window.odT.consentV2TCData.tcString?window.odT.consentV2TCData.tcString:"",required:!!window.optidigitalToolboxGdpr},window.odT?.consentV2TCData?.addtlConsent&&(p.gdpr.addtlConsent=window.odT.consentV2TCData.addtlConsent),-1!==window.location.href.indexOf("optidigitalTestMode=true")&&(p.testMode=!0),this.setup.hasOwnProperty("bcat")&&Array.isArray(this.setup.bcat)&&(p.bcat=[...this.setup.bcat]),this.setup.hasOwnProperty("badv")&&Array.isArray(this.setup.badv)&&(p.badv=[...this.setup.badv]),this.setup.hasOwnProperty("bapp")&&Array.isArray(this.setup.bapp)&&(p.bapp=[...this.setup.bapp]);let g=document.querySelector('meta[name="keywords"]'),w=g?.content?.trim().replace(/\s+/g,"");w&&(p.site=p.site||{},p.site.keywords=w);const f={eids:[]};let h={criteoId:{source:"criteo.com",uids:[{id:"",atype:1}]},sharedId:{source:"pubcid.org",uids:[{atype:1}]},id5Id:{source:"id5-sync.com",uids:[{id:"",atype:1,ext:""}]},liverampId:{source:"liveramp.com",uids:[{id:"",atype:3}]},pairId:{source:"google.com",uids:[]}};window.odT.setup?.userids&&Object.keys(window.odT.setup.userids).length&&(h=((t,e)=>Object.keys(t).reduce((i,o)=>1===e[o]?.status?{...i,[o]:t[o]}:i,{}))(h,window.odT.setup.userids));try{let t={adUnits:[]};for(let e in window.odT.finalAdSlotsConfig.adSlotsDefinitions){const i=window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].dfpSizes.filter(t=>Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]);if(i.length>0){let o={code:window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].divId,mediaTypes:{banner:{sizes:i}},bids:[]};t.adUnits.push(o)}}if(this.iasModule&&this.iasId&&!n&&!Object.keys(window.odT.analytics.adSlotsLoadCount).length&&!window.odT.iasModuleCalled){this.iasModuleCalled=!0;let e={name:"ias",waitForIt:!1,params:{pubId:this.iasId}};this.log("IAS Initialization"),this.iasModule.init(e),t=t||window.odpbjs.adUnits,this.iasModule.getBidRequestData(t,()=>{this.iasModule.getTargetingData(t.adUnits.map(t=>(window.odT.iasReady=!0,t.code)))},e)}}catch(t){t instanceof Error||(t=new Error(t)),this.log("IAS Module failed")}if(this.setUserId(!0,h,f),f.eids.length&&(p.user=f),!n&&window.odT.setup?.s2sConfig){const t=Object.entries(window.odT.setup.s2sConfig).reduce((t,[e,i])=>{if("aliasBidders"===e)Object.entries(i).forEach(([e,i])=>{t[e]={aliases:i}});else{if("optidigitalAdSlots"===e&&1===i)return p.optidigitalAdSlots=i,t;if("directBidders"!==e&&(!i.countries||i.countries.includes(window.optidigitalToolboxCC))&&(!i.browsers||i.browsers.includes(window.odT.checkBrowser.toLowerCase()))&&(!i.devices||i.devices.includes(window.odT.deviceCategory.toLowerCase()))){if("optidigital"===e&&1!==p?.optidigitalAdSlots)return t;t[e]={discount:i.discount,...t[e]||{}},(window.odT.setup.s2sConfig?.directBidders&&window.odT.setup.s2sConfig.directBidders.includes(e)||window.odT.setup?.directBidders?.length&&window.odT.setup.directBidders.includes(e))&&(t[e].direct=!0)}}return t},{});Object.keys(t).length&&p.imp&&Object.values(p.imp)?.some(t=>t.hasOwnProperty("s2sConfig"))&&(p.s2sConfig=t)}function m(){if(window.odT.id5Obj&&!p?.user?.eids.some(t=>Object.values(t).includes("id5-sync.com"))&&h?.id5Id&&(h.id5Id.uids[0].id=window.odT.id5Obj.universal_uid,h.id5Id.uids[0].ext=window.odT.id5Obj.ext,f.eids.push(h.id5Id)),window.odT.liveRampObj&&!p?.user?.eids.some(t=>Object.values(t).includes("liveramp.com"))&&h?.liverampId&&(h.liverampId.uids[0].id=window.odT.getCookie("_lr_env"),f.eids.push(h.liverampId)),window.odT.pairIdObj&&window.odT.getCookie("_lr_pairId")&&!p?.user?.eids.some(t=>Object.values(t).includes("google.com"))&&h?.pairId){let t=JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId"))))&&JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId")))).envelope;t&&t.length&&(t.forEach(t=>{h.pairId.uids.push({id:t,atype:571187})}),f.eids.push(h.pairId))}f.eids.length&&!p.user&&(p.user={}),f.eids.length&&!p.user.eids&&(p.user.eids=f.eids),!n&&window.optiyield._ready&&window.optiyield.cmd.push(function(){p.imp.forEach((t,e)=>{let i={adUnitPath:`${window.odT.initConfig.adUnit}${window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[t.placementId]?.customAdUnitCode?"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[t.placementId]?.customAdUnitCode:""}`,customDimensions:{cd1:t.placementId}},o=window.optiyield.getFloors(i,"prebid");if(o&&1===o.pfStatus&&o.pf.prebid){const t=(t,e)=>Math.ceil((parseFloat(t)*Math.pow(10,e)).toFixed(1))/Math.pow(10,e),i=(t,e)=>{const i=Math.pow(10,10);return t*i/(e*i)*(t*i)/i},n=((e,o=.99)=>{if(e>0){let n=i(e,e*o);return t(n,4)}})(window.odT.convertToCurrency(Number(o.pf.prebid),"USD"));isNaN(n)||(p.imp[e].bidFloor=n)}})})}let y=window.odT.setup.processTimeout?window.odT.setup.processTimeout:300,v=0;if(window.odT.checkServicesReady())window.odT.log("Services are ready without wait"),m(),this.sendEngageRequest("PresyncReady",p,n,d,o);else{let t=setInterval(()=>{window.odT.checkServicesReady()?(window.odT.log("Services are ready after some time"),clearInterval(t),m(),window.odT.sendEngageRequest("PresyncReady",p,n,d,o)):v>=y?(clearInterval(t),window.odT.log("Some services might be skipped due to timeout"),m(),window.odT.sendEngageRequest("PresyncTimeout",p,n,d,o)):v+=20},20)}if(this.id5Obj){const t=new Date(localStorage.getItem("id5id_last")),e=28800;Date.now()-t.getTime()>1e3*e&&this.setId5Id()}}callPrebidAndAmazon(){window.odT.setUserId();let t=window.odT.setup.processTimeout?window.odT.setup.processTimeout:300,e=0;if(window.odT.checkServicesReady())window.odT.refreshAdSlots(null);else{let i=setInterval(()=>{window.odT.checkServicesReady()?(window.odT.log("User IDs are ready"),clearInterval(i),window.odT.refreshAdSlots(null)):e>=t?(clearInterval(i),window.odT.refreshAdSlots(null)):e+=20},20)}if(window.odT.id5Obj){const t=new Date(localStorage.getItem("id5id_last")),e=28800;Date.now()-t.getTime()>1e3*e&&window.odT.setId5Id()}}sendEngageRequest(t,e,i=!1,o=!1,n=[]){const d=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{if("xmlhttprequest"===t.initiatorType&&t.name.includes("https://pbs.optidigital.com/bidder")){const i=parseInt(t.duration);e.imp.forEach(t=>{window.odT.analytics.auctionMetrics[t.adUnitCode]=i}),d.disconnect()}})});if(d.observe({type:"resource",buffered:!0}),i||1!==e?.optidigitalAdSlots||e.s2sConfig){e?.imp&&e.imp.forEach(t=>{window.odT.analytics.auctionMetrics.firstCallConfig=window.odT.analytics.auctionMetrics.firstCallConfig||{},window.odT.analytics.auctionMetrics.firstCallConfig[t.adUnitCode]=Object.keys(t?.s2sConfig||{})}),this.log("Send Engage request - "+t);const n=i?`https://pbs.optidigital.com/bidder/backfill/${e.publisherId}`:`https://pbs.optidigital.com/bidder/${e.publisherId}`,d=(new Date).getTime(),s=new XMLHttpRequest;s.withCredentials=!0,s.open("POST",n,!0),s.timeout=this.setup.timeouts&&this.setup.timeouts.prebidDirect?this.setup.timeouts.prebidDirect:1500,s.onreadystatechange=function(){if(4==this.readyState)if(200==this.status){const t=(new Date).getTime()-d;let n;window.odT.bidTimeStamp=(new Date).getTime();try{n=JSON.parse(this.responseText)}catch(t){}if(n?.analytics?.imps&&e.imp.forEach(t=>{window.odT.analytics.auctionMetrics.firstCall=window.odT.analytics.auctionMetrics.firstCall||{},window.odT.analytics.auctionMetrics.firstCall[t.adUnitCode]=n.analytics.imps?.[t.bidId]||{}}),n&&n.hasOwnProperty("bids")&&n.bids.length>0){if(!i){let i=[];window.odT.bidsFromOe=[],window.odT.setup.minCpm=window.odT.setup.minCpm??1e3,n.bids.forEach(o=>{if(window.odT.log(`Engage bid - response received for ${o.placementId} - $${o.cpm}`),(window.odT.setup.minCpm||0===window.odT.setup.minCpm)&&o.cpm>window.odT.setup.minCpm||window.odT.isGPTdisabledForSlot(o.placementId)||window.odT.setup.disableGPT){window.odT.log(`Engage bid - for ${o.placementId} - $${o.cpm} rendered directly`),window.odT.renderEngage(o.creativeId,o.adm,[Number(o.w),Number(o.h)],o),window.odT.analytics.handleFirstAdPerformanceTracking("without GAM");const n=window.odT.tools.formatSizeArrayToString([Number(o.w),Number(o.h)]);window.odT.log(`First Chance: ${o.placementId} FILLED (${n})`),window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:o.creativeId,size:n,name:o.placementId}}),i.push(o.placementId),window.odT.analytics.updateAdSlotLoad(o.creativeId),e.imp.forEach(e=>{e.placementId===o.placementId&&window.googletag&&window.googletag.cmd.push(function(){const e=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===o.creativeId):null;let i=window.odT.convertBidCpm(o.cpm);const{amznbid:d,od_pfg:s,od_pf_group:a,od_pf_pb:r}=window.odT.tools.checkSlotTargeting(e),l=window.odT.analytics.addBidderMetrics(o.creativeId,o.hb_bidder||"optidigital",i,null,t);let c={divId:o.placementId,divIdFull:o.creativeId,filled:!0,demandType:"prebid",lineItemId:null,prebidWinner:o.hb_bidder||"optidigital",amazonStatus:d,oyStatus:s,oyTestGroup:a,oyPb:r,size:`${n}`,prebidBid:i,nogam:!0,bidders:Object.keys(l).length?l:null};window.odT.analytics.adRequestEvent(c,!0)})})}else{let t={creativeId:o.creativeId,placementId:o.placementId,cpm:o.cpm,bidId:o.bidId,w:o.w,h:o.h,adm:o.adm,ttl:o.ttl,cur:o.cur};o.hb_bidder&&(t.hb_bidder=o.hb_bidder),window.odT.bidsFromOe.push(t)}});let d=((t,e)=>{const i=new Set(e.map(JSON.stringify));return t.filter(t=>!i.has(JSON.stringify(t)))})(o?e?.imp.map(t=>odT?.gptAdSlots?.[t.placementId]||window.odT.setup.disableGPT?t.placementId:t.adUnitCode):window.odT.firstLoadAdSlots,i);return void(d.length&&window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageBidsReady"),d,window.odT.bidsFromOe))}n.bids.forEach(t=>{window.odT.renderEngage(t.creativeId,t.adm,[Number(t.w),Number(t.h)],t);const e=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(e=>e.getSlotElementId()===t.creativeId):null,{amznbid:i,od_pfg:o,od_pf_group:n,od_pf_pb:d}=window.odT.tools.checkSlotTargeting(e);let s=window.odT.convertBidCpm(t.cpm);const a=window.odT.analytics.addBidderMetrics(t.creativeId,t.hb_bidder||"optidigital",s,i);let r={divId:t.placementId,divIdFull:t.creativeId,filled:!0,demandType:"backfill",lineItemId:null,prebidWinner:t.hb_bidder||"optidigital",amazonStatus:i,oyStatus:o,oyTestGroup:n,oyPb:d,size:`${t.w}x${t.h}`,prebidBid:s,nogam:!1,bidders:Object.keys(a).length?a:null};window.odT.analytics.adRequestEvent(r),window.odT.log(`Second Chance (backfill): ${t.placementId} FILLED`);const l=window.odT.tools.formatSizeArrayToString([Number(t.w),Number(t.h)]);window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:t.creativeId,size:l,name:t.placementId}}),window.odT.analytics.adSlotsLoadCount.hasOwnProperty(t.creativeId)&&window.odT.analytics.adSlotsLoadCount[t.creativeId]<2&&(!window.odT.stickyFormatLoaded.length||!window.odT.stickyFormatLoaded.includes(t.placementId))&&window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(t.placementId)&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t.placementId].hasOwnProperty("anchor")&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t.placementId].anchor&&1!==Number(t.w)&&1800!==Number(t.w)&&1e3!==Number(t.h)&&window.odT.stickyFormatClosed&&window.odT.setStickyFormat(t.placementId,Number(t.w),window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3)})}else i?window.odT.handleUnfilled(e.imp[0].placementId,e.imp[0].adUnitCode):(window.odT.log("Engage request - no bid in response"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageNoBid"),o?e.imp:null))}else 0===this.status?i?window.odT.handleUnfilled(e.imp[0].placementId,e.imp[0].adUnitCode):(window.odT.log("Engage request - timeout"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageTimeout"),o?e.imp:null)):i?window.odT.handleUnfilled(e.imp[0].placementId,e.imp[0].adUnitCode):(window.odT.log("Engage request - no bid"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageNoBid"),o?e.imp:null))},s.setRequestHeader("Content-type","text/plain"),s.send(JSON.stringify(e))}else{let t=window.odT?.firstLoadAdSlots?.length&&!o?window.odT.firstLoadAdSlots:n,e=o?"EngageNoBidRefresh":"NoEnagageCall";window.odT.runGPTAuction(e,t)}}handleUnfilled(t,e){const i=Object.values(odT.finalAdSlotsConfig.adSlotsDefinitions).find(e=>e.cdValue===t);i&&(t=i.adUnit),window.odT.log(`Second Chance (backfill): ${t} UNFILLED`);const o=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===e):null;if(window.odT.isSecondChanceEnabled(t,e))"undefined"!=typeof optidigitalAdsrv?window.odT.runSecondChance(t,e,o):(window.odT.secondChancePending.push({adslotKV:t,divId:e,event:o}),window.odT.loadOdas(window.odT.runSecondChance,window.odT.secondChancePending));else{"string"==typeof t&&t.toLowerCase()===window.odT.adAdaptersFactory.rewardedAdsAdapter.getRewardedAdDivId()&&window.optidigitalToolbox?.rewardedSlotUnfilled&&window.optidigitalToolbox.rewardedSlotUnfilled(t),window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:e,name:t}});const{amznbid:i,od_pfg:n,od_pf_group:d,od_pf_pb:s}=window.odT.tools.checkSlotTargeting(o),a=window.odT.analytics.addBidderMetrics(e,null,null,i);let r={divId:t,divIdFull:e,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:null,amazonStatus:i,oyStatus:n,oyTestGroup:d,oyPb:s,prebidBid:null,nogam:!1,bidders:Object.keys(a).length?a:null};window.odT.stickyAdapter.isVerticalStickyAdSlot(t)?(r.nogam=!0,window.odT.analytics.adRequestEvent(r,!0)):window.odT.analytics.adRequestEvent(r)}}triggerFallback(t){if(!t||!window.odT.stickyAdapter||!window.odT.stickyAdapter.isStickyAdSlot(t)&&!window.odT.stickyAdapter.isVerticalStickyAdSlot(t)||!window.odT.stickyAdapter.hasFallback(t))return;const e=window.odT.stickyAdapter.getFallback(t);if(!e)return;window.odT.log(`${t} unfilled, triggering fallback to ${e}`),window.odT.stickyAdapter&&"function"==typeof window.odT.stickyAdapter.closeStickyAd&&window.odT.stickyAdapter.closeStickyAd(t);try{let t=[];this.stickyAdapter.createStickyAd(e,{initConfigAdUnit:this.initConfig.adUnit,log:t=>this.log(t),getCookie:t=>this.getCookie(t),firstLoadAdSlots:t,setAttributes:(t,e)=>this.tools.setAttributes(t,e),stickyAutoCloseScroll:this.stickyAutoCloseScroll,refreshAdSlots:t=>this.refreshAdSlots(t),onLegacyStateUpdate:t=>{void 0===t.stickyAdDivId||this.stickyAdDivId||(this.stickyAdDivId=t.stickyAdDivId),void 0!==t.stickyAdMode&&(this.stickyAdMode=t.stickyAdMode),void 0!==t.stickyAdStatus&&(this.stickyAdStatus=t.stickyAdStatus),void 0!==t.stickyAdTopTrigger&&(this.stickyAdTopTrigger=t.stickyAdTopTrigger),void 0!==t.stickyAdAutoHidePx&&(this.stickyAdAutoHidePx=t.stickyAdAutoHidePx)},adLayoutEnabled:this.setup.adLayoutEnabled})}catch(t){this.log('Error creating sticky ad "'+e+'": '+(t&&t.message?t.message:t))}const i=this.stickyAdapter.getStickyAdDivId(e);if(i){const t=document.getElementById(i);t&&this.addNewAdSlot(t)}this.refreshAdSlots(e,"lazy",this.setup.processTimeout||2e3)}async renderEngage(t,e,o,n){const d=this.stickyAdapter.getStickyAdSlotNameFromDivId(t);if(d){const e=this.stickyAdapter.getStickyAdContainerId(d),i=`opd_adsticky-scroll_${d.replace(/[^a-zA-Z0-9]/g,"_")}`,o=document.getElementById(e);if(o&&(o.classList.add(i),o.style.display="block"),this.stickyAdapter.setStickyAdStatus(d,"rendered"),t==this.stickyAdDivId){this.stickyAdStatus="rendered";const t=document.getElementById("opd_bottomstickyad");t&&t.classList.add("opd_adsticky-scroll")}this.stickyAdapter.updateStickyFrequency(d)}const s={hb_bidder:n.hb_bidder||n.bidder,hb_size:window.odT.tools.formatSizeArrayToString(o)};if(n.hasOwnProperty("hb_deal_appnexus")&&(s.hb_deal_appnexus=n.hb_deal_appnexus),n.hasOwnProperty("hb_deal_xandr")&&(s.hb_deal_xandr=n.hb_deal_xandr),(window.odT.noGamUseSafeframe||this.stickyAdapter.isVerticalStickyAdSlot(d??t))&&window.odT.checkSafeFrameDelivery(t,s)){const{EmbeddedSafeFrame:n}=i(764),d=new n;let s=[{id:t,size:window.odT.tools.formatSizeArrayToString(o),renderHtml:e,renderFile:"https://scripts.opti-digital.com/lib/?site="+window.odT.siteCode+"&lib=safeframe&v=1.1.0"}];document.getElementById(t).style.display="block",await d.init(s)}else{const i=document.getElementById(t);if(null!==i){i.innerHTML="";let n=e,d=document.createElement("div");d.setAttribute("style","border: 0pt none; margin: auto; text-align: center; width: "+o[0]+"px; height: "+o[1]+"px;");var a=document.createElement("iframe");window.odT.tools.setAttributes(a,{id:t+"-iframe-od",width:o[0],height:o[1],scrolling:"no",marginwidth:"0",marginheight:"0",frameborder:"0"}),d.appendChild(a),i.appendChild(d),a.contentWindow.document.open(),a.contentWindow.document.write(n),a.contentWindow.document.close(),i.style.display="block"}}return!0}setUserId(t=!1,e={},i=!1){if(this.consentOK.includes(this.consentStatus)){if(t&&e?.criteoId){const{criteoId:t}=e,o=localStorage.getItem("cto_bidid"),n=91;o&&this.checkVendor(n)&&(t.uids[0].id=o,i.eids.push(t))}const o=this.getCookie("_pbjs_id_optout")||this.getCookie("_pubcid_optout"),n=localStorage.getItem("_pbjs_id_optout")||localStorage.getItem("_pubcid_optout"),d=this.getCookie("_lr_env"),s=this.getCookie("_lr_pairId");if(!o&&!n&&e?.sharedId){const{sharedId:o}=e;let n=this.getCookie("_sharedid");const d=this.getCookie("_sharedid_cst"),{calculatedId:s,finalHashedConsent:a}=this.setShareId();let r=7776e3,l=window.location.host&&window.location.host.indexOf("www.")||window.location.host.replace("www.","");if(n)d&&d!==a&&this.setCookie("_sharedid_cst",a,r,l),t&&(o.uids[0].id=n,i.eids.push(o));else if(s&&a){let e=s;"object"==typeof window.PublisherCommonId&&window.PublisherCommonId.hasOwnProperty("getId")&&"function"==typeof window.PublisherCommonId.getId&&(e=window.PublisherCommonId.getId()),this.setCookie("_sharedid",e,r,l),this.setCookie("_sharedid_cst",a,r,l),t&&(o.uids[0].id=e,i.eids.push(o))}}if(this.checkVendor("131")&&e?.id5Id){const{id5Id:o}=e;if(this.id5Permission=!0,localStorage.getItem("id5id")){if(this.id5Obj=JSON.parse(decodeURIComponent(localStorage.getItem("id5id"))),localStorage.getItem("id5id_1019_nb")){let t=parseInt(localStorage.getItem("id5id_1019_nb"))+1,e=new Date(Date.now()+2592e6).toUTCString();localStorage.setItem("id5id_1019_nb",t),localStorage.setItem("id5id_1019_nb_exp",e)}t&&(o.uids[0].id=this.id5Obj.universal_uid,o.uids[0].ext=this.id5Obj.ext,i.eids.push(o))}else this.setId5Id()}if(e?.liverampId&&d&&(this.setup.liverampId||window.odT.setup?.userids?.liverampId?.params?.pid)&&t){const{liverampId:t}=e;t.uids[0].id=d,i.eids.push(t)}if(s&&(this.setup.liverampId||window.odT.setup?.userids?.liverampId?.params?.pid)&&t&&e?.pairId){const{pairId:t}=e;let o=JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId"))))&&JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId")))).envelope;o&&o.length&&(o.forEach(e=>{t.uids.push({id:e,atype:571187})}),i.eids.push(t))}if(1===window.odT.setup?.userids?.truelinkId?.status){if(window.odT.setup?.userids?.truelinkId?.params?.cookie?window.odT.getCookie(window.odT.setup.userids.truelinkId.params.cookie):window.odT.getCookie("id5-true-link")?window.odT.getCookie("id5-true-link"):null){const t={source:"true-link-id5-sync.com",uids:[{id:window.odT.getCookie("id5-true-link"),atype:1}]};i.eids.push(t)}}}}setShareId(){let t=null;window.odT.consentV2TCData&&window.odT.consentV2TCData.hasOwnProperty("gdprApplies")&&window.odT.consentV2TCData.gdprApplies&&window.odT.consentV2TCData.hasOwnProperty("tcString")&&window.odT.consentV2TCData.tcString&&(t=[window.odT.consentV2TCData.gdprApplies,window.odT.consentV2TCData.tcString]);const e=[JSON.stringify(t),"null","null"];let i="";e.forEach((t,e)=>{i+=`${e>0?":":""}${this.cyrb53(t)}`}),i+=":0";const o=this.cyrb53(i),n=encodeURIComponent((t=>{let e=Number(t);const i=[];for(;e>0;)i.push(String.fromCharCode(255&e)),e>>>=8;return btoa(i.join())})(o)),d=t=>t?(t^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,d);return{calculatedId:d(),finalHashedConsent:n}}setId5Id(){if(window.odT.id5CallSent)return;window.odT.id5CallSent=!0;const{calculatedId:t,finalHashedConsent:e}=this.setShareId(),i=t=>new Date(Date.now()+864e5*t).toUTCString(),o=localStorage.getItem("id5id"),n=i(90),d=i(30),s=window.odT.setup?.userids?.id5Id?.params?.partner||"1019",a={partner:s,gdpr:window.optidigitalToolboxGdpr?1:0,v:"optidigital/3.0.0",o:"client-side-fetch-api",u:window.location.href,top:(()=>{try{if(window.top===window.self)return!0}catch(t){return!1}return!1})?1:0};if(window.optidigitalToolboxGdpr&&(a.gdpr_consent=this.consentV2TCData&&this.consentV2TCData.tcString?this.consentV2TCData.tcString:""),document.referrer&&(a.rf=document.referrer),window.odT.setup?.userids?.id5Id?.params?.pd&&(a.pd=window.odT.setup.userids.id5Id.params.pd),o){const t=JSON.parse(decodeURIComponent(o));a.s=t.signature}let r=0;localStorage.getItem(`id5id_${s}_nb`)&&(r=parseInt(localStorage.getItem(`id5id_${s}_nb`))+1);const l=window.odT.setup?.userids?.id5Id?.params?.abTesting||{enabled:!1};l.enabled&&(a.ab_testing={enabled:!0,control_group_pct:l.controlGroupPct||.1});const c=`https://id5-sync.com/g/v2/${s}.json`,u=new XMLHttpRequest;u.open("POST",c,!0),u.onreadystatechange=function(){if(4==this.readyState&&200==this.status){window.odT.log("ID5 was set");let t=JSON.parse(this.responseText);window.odT.id5Obj=t,localStorage.setItem("id5id",encodeURIComponent(this.responseText)),localStorage.setItem("id5id_exp",n),localStorage.setItem("id5id_last",(new Date).toUTCString()),localStorage.setItem("id5id_last_exp",n),localStorage.setItem(`id5id_${s}_nb`,r),localStorage.setItem(`id5id_${s}_nb_exp`,d),localStorage.setItem("id5id_privacy",JSON.stringify(t.privacy)),localStorage.setItem("id5id_privacy_exp",d),localStorage.setItem("id5id_cst",decodeURIComponent(e)),window.odT.setPpid()}},u.send(JSON.stringify(a))}initOy(){let t=window.odT.odNetworkId?window.odT.odNetworkId:window.odT.setup.info.networkId;window.optiyield&&"function"==typeof window.optiyield._0i4n3i2t&&window.optiyield._0i4n3i2t(t,window.odT.pfConfig,window.odT.pfConfig.country),window.optiyield.cmd.push(function(){let e={pubId:t,mode:"manual"};""!==window.odT.setup?.adSlotsConfig?.adManagerKeyName?e.gtpCustomDimensionKey={cd1:window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:"adslot"}:""!==window.odT.setup?.customTargeting?.adslot?.name&&(e.gtpCustomDimensionKey={cd1:window.odT.setup?.customTargeting?.adslot?.name||"adslot"}),window.optiyield.init(e,function(){window.odT.log("window.optiyield SDK is ready")}),window.optiyield.setGptFloors()})}callOy(){this.log("Call OY SDK config"),this.pfConfig=window.optidigitalPFconfig,Object.keys(this.pfConfig).length>0?this.initOy():this.skipOy=!0}runAuction(t){this.setup?.info?.publisherId&&this.setup?.info?.networkId&&this.setup?.info?.siteId&&this.setup?.info?.revision&&(this.setup?.sspPriorities?.ssp&&(this.enableCookieSync=!0,this.runPBSUserSync()),this.buildFirstLoadAdSlots(),this.monitorLazyLoadAdSlots(),this.monitorAutomaticRefresh(),this.initConfig.uuid&&Object.keys(this.initConfig.uuid).some(t=>["email_md5","email_sha256","email_sha1"].includes(t))&&(this.setup.liverampId||this.setup?.userids?.liverampId?.params?.pid)?(window&&!window.ats&&(window.ats={},window.ats.retrieveEnvelope=this.retrieveEnvelope),this.refreshAtsEnvelope()):this.skipLiveRamp=!0,window.googletag.cmd.push(function(){window.odT.log("GPT is starting"),window.odT.setPpid(),window.odT.initPageTargeting(),window.odT.defineSlots(window.odT.firstLoadAdSlots),window.googletag.setConfig({singleRequest:!0,centering:!0}),window.googletag.pubads().addEventListener("slotRenderEnded",window.odT.eventSlotRendered),window.googletag.enableServices()}),this.setup[`fullPackage${this.screen}`]?(this.userAction.push("fullPackage"),this.callOy(),this.loadCore(),this.callPrebidAndAmazon()):this.callPrebidAdapter(t))}getCpmStringValue(t,e){let i="";const o=e.reduce((t,e)=>t.max>e.max?t:e,{max:0});let n=0,d=e.find(function(e){if(t>o.max){let t=e.precision;void 0===t&&(t=_defaultPrecision),i=e.max.toFixed(t)}else{if(t<=e.max&&t>=n)return e.min=n,e;n=e.max}});return d&&(i=window.odT.getCpmTarget(t,d)),i}getCpmTarget(t,e){const i=e.hasOwnProperty("precision")&&e.precision?e.precision:2,o=e.increment,n=e.min;let d,s,a=Math.pow(10,i+2),r=(t*a-n*a)/(o*a);try{d=Math.floor(r)*o+n}catch(t){s=!0}return(s||"number"!=typeof d)&&(d=Math.floor(r)*o+n),d=Number(d.toFixed(10)),d.toFixed(i)}convertToCurrency(t,e="EUR"){let i=window.odT.setup.adServerCurrency?window.odT.setup.adServerCurrency:"EUR";if("USD"==window.odT.setup.adServerCurrency)return t;if("EUR"===e){let e=window.odT.setup.defaultRates?window.odT.setup.defaultRates:{USD:{EUR:.87,PLN:3.53}};window.odT.setup.currentRates?t*=window.odT.setup.currentRates.USD[i]:t*=e.USD[i]}if("USD"===e){t*=(window.odT.setup.defaultRatesUsd?window.odT.setup.defaultRatesUsd:{EUR:{USD:1.15,PLN:4.21}}).EUR.USD}return t}isGPTdisabledForSlot(t){const e=window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[t];return e&&(this.stickyAdapter.isVerticalStickyAdSlot(t)||!0===e?.disableGPT)}runGPTAuction(t,e,i){if(!0===window.odT.setup?.disableGPT){if(Array.isArray(e)&&e.length)e.forEach(t=>{const e=this.getSlotNameFromEntry(t);this.handleUnfilledSlotEntry(e)});else if(!e&&Array.isArray(window.odT.firstLoadAdSlots)&&window.odT.firstLoadAdSlots.length){window.odT.firstLoadAdSlots.forEach(t=>{const e=this.getSlotNameFromEntry(t);this.handleUnfilledSlotEntry(e)})}return}let o=e;if(e){const t=e.filter(t=>this.isGPTdisabledForSlot("string"==typeof t?t:t?.placementId||t?.adUnitCode||t));if(t&&t.length&&t.forEach(t=>{const e=this.getSlotNameFromEntry(t);this.handleUnfilledSlotEntry(e)}),o=e.filter(t=>!this.isGPTdisabledForSlot("string"==typeof t?t:t?.placementId||t?.adUnitCode||t)),0===o.length)return}if(window.googletag.cmd.push(function(){if(i&&i.length){const t=i.map(t=>{let e=window.odT.convertToCurrency(t.cpm,"EUR"),i=window.odT.setup.prebidPriceGranularity?window.odT.setup.prebidPriceGranularity:window.odT.defaultPriceGranularity,o=window.odT.getCpmStringValue(e,i.buckets);const n=window.odT.setup.adServerCurrency?window.odT.setup.adServerCurrency:"EUR";if(window?.optidigitalPFconfig?.cur?.code?.gam&&n!==window?.optidigitalPFconfig?.cur?.code?.gam){const t=window?.optidigitalPFconfig?.cur?.ratio?.gam||1,e=.9,i=parseFloat(o);isNaN(i)||(o=(i*e*t).toString())}let d;return window.odT?.gptAdSlots?.[t.placementId]?d=window.odT.gptAdSlots[t.placementId]:window.odT?.gptAdSlots?.[t.creativeId]?d=window.odT.gptAdSlots[t.creativeId]:window.odT.divIdPrefix&&t?.creativeId&&window.odT?.gptAdSlots?.[t.creativeId?.replace(window.odT.divIdPrefix,"")]&&(d=window.odT.gptAdSlots[t.creativeId.replace(window.odT.divIdPrefix,"")]),d&&(window.odT.setSlotTargeting(d,"hb_pb",window.odT.getCpmStringValue(e,i.buckets),t.hb_bidder,!0),window.odT.setSlotTargeting(d,"hb_bidder",t.hb_bidder?t.hb_bidder:"optidigital",t.hb_bidder,!0),window.odT.setSlotTargeting(d,"hb_adid",t.bidId,t.hb_bidder,!0),window.odT.setSlotTargeting(d,"hb_size",`${t.w}x${t.h}`,t.hb_bidder,!0),window.odT.setSlotTargeting(d,"hb_format",t.hb_format?t.hb_format:"banner",t.hb_bidder,!0),window.odT.setSlotTargeting(d,"hb_safeframe","native"!=t.hb_format&&"video"!=t.hb_format&&window.odT.checkSafeFrameDelivery(t.placementId,t)?"1":"0",!1,!1),window.odT.setSlotTargeting(d,"multi_format","banner"!=t.hb_format?"1":"0")),{adUnitCode:t.creativeId,cpm:o}});window.optiyield.cmd.push(function(){window.optiyield.setGptFloors(t)}),window.addEventListener("message",window.odT.receivedMessage,!1)}}),o&&"EngageNoBidRefresh"!==t)window.odT.initAdserver(null,t,o);else if(o||"EngageNoBidRefresh"===t){let t=[];Array.isArray(o)&&(o.forEach(e=>{e&&(e.hasOwnProperty("adUnitCode")&&window.odT?.gptAdSlots?.[e.adUnitCode]?t.push(e.adUnitCode):e.hasOwnProperty("placementId")&&window.odT?.gptAdSlots?.[e.placementId]?t.push(e.placementId):e.hasOwnProperty("adUnitCode")&&window.odT.divIdPrefix&&window.odT?.gptAdSlots?.[e.adUnitCode.replace(window.odT.divIdPrefix,"")]?t.push(e.adUnitCode.replace(window.odT.divIdPrefix,"")):"string"==typeof e&&window.odT.divIdPrefix&&e.startsWith(window.odT.divIdPrefix)?t.push(e.replace(window.odT.divIdPrefix,"")):t.push(e))}),window.odT.refreshGPTSlots(t))}else window.odT.initAdserver(null,t)}receivedMessage(t){if(window.odT.bidsFromOe&&window.odT.bidsFromOe.length){let e=t.message?"message":"data",i={};try{i=JSON.parse(t[e])}catch(t){return}if(i&&i.adId&&i.message&&"Prebid Request"===i.message&&window.odT.bidsFromOe.some(t=>t.bidId===i.adId)){let e=window.odT.getReplier(t);const o=window.odT.bidsFromOe.find(t=>t.bidId===i.adId),n={adId:o.bidId,ad:o.adm,width:Number(o.w),height:Number(o.h),cpm:o.cpm,originalCpm:o.cpm};window.odT.sendAdToCreative(n,e)}}}getReplier(t){return t.ports.length>0?function(e){t.ports[0].postMessage(JSON.stringify(e))}:null!==t.origin?function(e){t.source.postMessage(JSON.stringify(e),t.origin)}:void 0}sendAdToCreative(t,e){const{adId:i,ad:o,adUrl:n,width:d,height:s}=t;if(i){e({message:"Prebid Response",ad:o,adUrl:n,adId:i,width:d,height:s});const t=window.odT.bidsFromOe.findIndex(t=>t.bidId===i);-1!==t&&window.odT.bidsFromOe.splice(t,1)}}refreshGPTSlots(t){window.googletag.cmd.push(function(){window.odT.getGPTSlots(t),window.optiyield.cmd.push(function(){window.optiyield.setGptFloors()}),window.googletag.pubads().refresh(window.odT.getGPTSlots(t))})}callEventCallback(t,e){window.odT.eventCallback.forEach(i=>{if("function"==typeof i)try{i(t,e)}catch(t){}})}getCMPConsent(){if(this.enableCookieConsent&&this.CMPready&&this.consentStatus&&"nocmp"!==this.consentStatus)return this.log("Cookie consent: Already retrieved, registering event listener for updates"),void("function"==typeof window.top.__tcfapi&&window.top.__tcfapi("addEventListener",2,(t,e)=>{!e||"useractioncomplete"!==t.eventStatus&&"cmpuiclosed"!==t.eventStatus||(this.consentStatus="CMPv2_ready",this.consentV2TCData=t,this.analyzeConsentV2(),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,t),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cmpConsentUpdated")):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:t,source:"cmp_update"}))}));let t=this.setup?this.setup.cmpCallbackTimeout||(0===this.setup.cmpCallbackTimeout?this.setup.cmpCallbackTimeout:1500):1500,e=!1,i=0,o=!1;i=setTimeout(()=>{o=!0,window.odT.log("Timeout NO RESPONSE FROM CMP CALLBACK"),window.odT.consentStatus="CMPv2_GAMokHBok",window.odT.consentType="timeout_callback",-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&(window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpTimeoutCallback")),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus}),window.odT.analytics.pageViewEvent(),e=!0},t),"function"==typeof window.top.__tcfapi?window.top.__tcfapi("addEventListener",2,function(t,n){o||(n&&"cmpuishown"===t.eventStatus&&(clearTimeout(i),window.odT.consentCMPUIShown=!0,window.odT.timeStampCMPUIShown=Date.now(),window.odT.log("CMP UI shown"),e||(window.odT.analytics.pageViewEvent(),e=!0)),!n||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus&&"cmpuiclosed"!=t.eventStatus?n&&!t.gdprApplies&&(clearTimeout(i),window.odT.consentStatus="CMPv2_OOS",window.odT.consentType="ok",window.odT.consentCMPUIShown?window.odT.analytics.pageViewEvent({userAction:!0}):window.odT.analytics.pageViewEvent(),window.odT.log(`CMP consent ready ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpReadyOOS")):(clearTimeout(i),window.odT.consentStatus="CMPv2_ready",window.odT.consentV2TCData=t,window.odT.analyzeConsentV2(),window.odT.setup&&window.odT.setup.hasOwnProperty("onConsentCaptured")&&(window.odT.setup.onConsentCaptured,1)&&window.odT.setup.onConsentCaptured(window.odT.consentStatus,t),window.odT.log(`CMP consent ready ${window.odT.consentStatus}`),-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)?(window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpConsentReadyOK"),window.odT?.setup?.enableCrModal?.includes(window.odT.consentType)&&"ok"!==window.odT.consentType&&window.odT?.setup?.crZoneId&&(window.odT.userAction.push("Load Cr Modal"),window.odT.loadOdas(odT.initCRModal))):(window.odT.CMPready=!1,window.odT.layoutReady&&window.odT.loadOdas(window.odT.runOdasAuction)),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus,tcData:t}),window.top.__tcfapi("removeEventListener",2,function(t){t&&window.odT.log("TCFAPPI event listener removed")},t.listenerId),window.odT.consentCMPUIShown?window.odT.analytics.pageViewEvent({userAction:!0}):window.odT.analytics.pageViewEvent()))}):this.consentStatus="nocmp"}tryCookieConsent(){if(!this.enableCookieConsent||!window.optidigitalToolboxGdpr)return!1;const t=[];this.setup&&this.setup.consentCookieName&&t.push(this.setup.consentCookieName),t.push("euconsent-v2","euconsent");let e=null;for(const i of t){const t=this.getCookie(i);if(t&&""!==t.trim()){e=t;break}}if(!e)return!1;try{const t=this.decodeTCStringFromCookie(e);if(t&&this.validateTCData(t))return this.processConsentData(t),!0}catch(t){}return this.log("Cookie consent: Failed to decode TC String from cookie"),!1}decodeTCStringFromCookie(t){try{const e=(0,h.K)(t);if(e&&e.core)return this.convertParsedTCToTCData(e,t)}catch(t){}this.log("Failed to decode TC String from cookie")}convertParsedTCToTCData(t,e){const i=t.core||{},o=t.publisherTC||{},n=i.vendorConsents||{},d=i.vendorLegitimateInterests||{},s=i.purposeConsents||{},a=i.purposeLegitimateInterests||{},r=o.purposeConsents||{},l=o.purposeLegitimateInterests||{},c=o.customPurposeConsents||{},u=o.customPurposeLegitimateInterests||{},p={...s},g={...a},w=Object.values(r).some(t=>!0===t)||Object.values(l).some(t=>!0===t),f=Object.keys(o).some(t=>"purposeConsents"!==t&&"purposeLegitimateInterests"!==t);(w||f)&&(Object.assign(p,r),Object.assign(g,l));return{tcString:e,gdprApplies:window.optidigitalToolboxGdpr?1:0,cmpId:i.cmpId,cmpVersion:i.cmpVersion,tcfPolicyVersion:i.policyVersion,purpose:{consents:p,legitimateInterests:g},vendor:{consents:n,legitimateInterests:d},publisher:{consents:r,legitimateInterests:l,customPurpose:{consents:c,legitimateInterests:u},restrictions:i.publisherRestrictions||{}},isServiceSpecific:i.isServiceSpecified,publisherCC:i.publisherCountryCode,useNonStandardTexts:i.useNonStandardStacks,purposeOneTreatment:i.purposeOneTreatment,specialFeatureOptins:i.specialFeatureOptins||{},vendorListVersion:i.vendorListVersion,consentLanguage:i.consentLanguage,consentScreen:i.consentScreen,created:i.created,lastUpdated:i.lastUpdated}}validateTCData(t){return t&&t.hasOwnProperty("tcString")&&t.hasOwnProperty("gdprApplies")&&t.hasOwnProperty("purpose")&&t.hasOwnProperty("vendor")&&t.tcString&&"string"==typeof t.tcString&&t.tcString.length>0}processConsentData(t){this.consentStatus="CMPv2_ready",this.consentV2TCData=t,this.analyzeConsentV2(),this.log(`Cookie consent: Retrieved consent, status: ${this.consentStatus}`),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,t),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cookieConsentReady"),this?.setup?.enableCrModal?.includes(this.consentType)&&"ok"!==this.consentType&&this?.setup?.crZoneId&&(this.userAction.push("Load Cr Modal"),this.loadOdas(this.initCRModal))):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:t,source:"cookie"}),this.analytics.pageViewEvent()}bootstrapConsent(){if(this.enableCookieConsent){const t=this.tryCookieConsent();setTimeout(()=>{t||this.CMPready?(t||this.CMPready)&&"function"==typeof window.top.__tcfapi&&window.top.__tcfapi("addEventListener",2,(t,e)=>{!e||"useractioncomplete"!==t.eventStatus&&"cmpuiclosed"!==t.eventStatus||(this.consentStatus="CMPv2_ready",this.consentV2TCData=t,this.analyzeConsentV2(),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,t),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cmpConsentUpdated")):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:t,source:"cmp_update"}))}):this.waitForCMP()},150)}else this.waitForCMP()}waitForCMP(){window.odT.log("CMP Start waiting API");let t=0,e=window.odT.setup&&(window.odT.setup.cmpApiTimeout||0===window.odT.setup.cmpApiTimeout)?window.odT.setup.cmpApiTimeout:1e3,i=0,o=!1;window.optidigitalToolboxGdpr?"function"==typeof window.top.__tcfapi?(window.odT.log("CMP API ready, wait for consent signal"),o=!0,window.odT.waitingForCMPFinished=!0,"loading"!==document.readyState?window.odT.getCMPConsent():document.addEventListener("DOMContentLoaded",function(t){window.odT.getCMPConsent()})):t=window.setInterval(function(){i+=50,o||("function"==typeof window.top.__tcfapi?(window.odT.log("CMP API ready, wait for consent signal"),window.clearInterval(t),o=!0,window.odT.waitingForCMPFinished=!0,"loading"!==document.readyState?window.odT.getCMPConsent():document.addEventListener("DOMContentLoaded",function(t){window.odT.getCMPConsent()})):i>=e&&(window.clearInterval(t),o=!0,window.odT.waitingForCMPFinished=!0,window.odT.log("Timeout NO CMP API"),window.odT.consentStatus="CMPv2_GAMokHBok",-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&(window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpTimeoutAPI")),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus}),window.odT.consentType="timeout_tcfapi",window.odT.analytics.pageViewEvent()))},50):(window.odT.consentStatus="CMPv2_OOS",window.odT.consentType="ok",window.odT.log("NO GDPR"),window.odT.analytics.pageViewEvent(),window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("initnoGDPR"))}runPBSUserSync(t=!1){try{if(window.odT.setup.hasOwnProperty("disablePresync")&&window.odT.setup.disablePresync)return!1;if("Chrome"!==window.odT.checkBrowser&&"Edge"!==window.odT.checkBrowser)return!1;if(-1!=window.odT.consentOK.indexOf(window.odT.consentStatus)){let e="rubicon,smartadserver,pubmatic,criteo,appnexus,triplelift,outbrain,onetag,ix,ttd";window.odT?.setup?.sspList&&"string"==typeof window.odT.setup.sspList&&(window.odT.setup.sspList.includes("ttd")&&(window.odT.setup.sspList=window.odT.setup.sspList.replace("ttd","thetradedesk")),e=window.odT.setup.sspList.toString());const i=window.odT?.setup?.sspPriorities?.ssp||[],o=i.filter(t=>1===Number(t?.priority)).map(t=>t?.name).filter(Boolean).join(","),n=i.slice().sort((t,e)=>Number(t?.priority??Number.POSITIVE_INFINITY)-Number(e?.priority??Number.POSITIVE_INFINITY)).map(t=>t?.name).filter(Boolean).join(","),d=t?n||e:o||"",s=t?null:Number.isInteger(window.odT?.setup?.sspPriorities?.maxSspSync)?window.odT.setup.sspPriorities.maxSspSync:null;this.CookieSync=new p(d,s)}}catch(t){}}isBackfillEnabled(t){let e=!1;if(window.odT.finalAdSlotsConfig.adSlotsDefinitions[t]&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].disableBackfill)return e;if(window.odT.stickyAdapter.hasFallback(t))return e;if(window.odT.engageBackfill&&window.odT.consentOK.includes(window.odT.consentStatus)){let i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.loadType;const o=window.odT.getPrebidAdUnitsSizes(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.dfpSizes||[]);t&&!this.adAdaptersFactory.isSpecialAdSlot(t)&&(!i||i&&6!==i)&&(!i||i&&7!==i)&&(!i||i&&8!==i)&&o.length&&(e=!0)}return e}deviceDetection(){window.odT.tools.isClientMobileOrTablet()?window.odT.tools.isClientMobile()?(window.odT.deviceCategory="Smartphone",window.odT.dDevice="30001"):(window.odT.deviceCategory="Tablet",window.odT.dDevice="30002"):"Mobile"===window.odT?.screen?(window.odT.deviceCategory="Smartphone",window.odT.dDevice="30001"):(window.odT.deviceCategory="Desktop",window.odT.dDevice="30000")}setStickyFormat(t,e,i=4e3){const o=window.odT?.setup?.anchorModeTop?window.odT.setup.anchorModeTop:0;let n,d=document.getElementById(`${window.odT.divIdPrefix}${t}`);if(!d){const e=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.divId;e&&(d=document.getElementById(`${e}`))}if(""===window.odT.divIdPrefix&&(n=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[t]?.adUnit,t=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[t]?.divId,d=document.getElementById(`${t}`)),d&&"none"!==getComputedStyle(d).display&&"hidden"!==getComputedStyle(d).visibility){let s;window.odT.stickyFormatLoaded.push(t);let a={},r={},l=d.parentElement,c=window.getComputedStyle(d),u=window.getComputedStyle(l),p=parseFloat(c.marginTop)+parseFloat(c.marginBottom),g=Math.ceil(parseFloat(c.height)+p),w=!1;window.odT.stickyFormatClosed=!1;let f=0;r.display=u.display,r["flex-direction"]=u.flexDirection,r["align-items"]=u.alignItems,!window.odT.setup.adLayoutEnabled||window.odT.setup?.adLayoutConfig?.excludedAdslots&&(window.odT.setup?.adLayoutConfig?.excludedAdslots?.includes(t)||window.odT.setup?.adLayoutConfig?.excludedAdslots?.includes(n))?(r["min-height"]=u.minHeight,r["justify-content"]=u.justifyContent,r.margin=u.margin):(r.width=u.width,r.position=u.position,r.top=u.top),a.position=c.position,a.background=c.background,a.margin=c.margin,a.width=c.width,a["max-width"]=c.maxWidth,a.top=c.top,a.left=c.left,a.right=c.right,a.display=c.display,a["padding-left"]=c.paddingLeft,a["padding-right"]=c.paddingRight,a["border-color"]=c.borderColor;const h=()=>{if(w){d.style.setProperty("visibility","hidden"),d.style.setProperty("opacity","0"),d.style.setProperty("transition","visibility 0s .5s, opacity .5s linear");const t=document.querySelector(".optidigital-close-button");t&&(t.style.setProperty("visibility","hidden"),t.style.setProperty("opacity","0"),t.style.setProperty("transition","visibility 0s .5s, opacity .5s linear"))}},m=()=>{const t=document.querySelector(".optidigital-temporary-element");t&&t.remove();const e=document.querySelector(".optidigital-close-button");e&&e.remove(),w=!1,d.style.setProperty("top","0"),d.style.setProperty("left","0"),d.style.setProperty("z-index","1"),d.style.setProperty("visibility","visible"),d.style.setProperty("opacity","1");for(const t in a)d.style.setProperty(t,a[t]);for(const t in r)l.style.setProperty(t,r[t])},y=t=>{if(!window.odT.stickyFormatClosed){let i=document.documentElement.clientWidth;if(e>0&&(f=(i-e)/2),!w||!document.querySelector(".optidigital-temporary-element")){w=!0;const e=document.createElement("div");e.classList.add("optidigital-temporary-element"),e.style.setProperty("height",`${g}px`),l.insertBefore(e,d);const i=document.createElement("div");if(i.innerHTML='<span><svg><path stroke="#ffffff" transform="translate(5.5,5) scale(0.6)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/><circle r="7.5" cx="9.5" cy="9.5"></circle></svg></span>',i.classList.add("optidigital-close-button"),i.setAttribute("style",`position: fixed; top: ${o}px; left: 0; width: 100%; z-index: 2147483647; background: rgba(0,0,0, 0.2); color: #fff; height: 25px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; user-select: none; -webkit-tap-highlight-color: transparent;`),l.insertBefore(i,d),document.querySelector(".optidigital-close-button")){const e=document.querySelector(".optidigital-close-button span");e.setAttribute("style","display: flex; height: 25px; align-items: center; position: relative; top: 0;");document.querySelector(".optidigital-close-button span svg").setAttribute("style",`position: absolute; top: 2.5px; right: ${f}px; width: 20px; height: 20px; transform: rotateY(-180deg) rotateZ(-90deg); max-width: unset;`);document.querySelector(".optidigital-close-button span svg circle").setAttribute("style",`stroke-dasharray: 47px; stroke-dashoffset: 0px; stroke-linecap: round; stroke-width: 2px; stroke: white; fill: none; animation: countdown ${t}ms linear forwards;`);let i=document.createElement("style");i.type="text/css";let o="@keyframes countdown {from {stroke-dashoffset: 0px;} to {stroke-dashoffset: 47px;}}";i.appendChild(document.createTextNode(o)),document.getElementsByTagName("head")[0].appendChild(i),e.addEventListener("click",()=>{h(),setTimeout(()=>{m(),clearTimeout(s),window.odT.stickyFormatClosed=!0},500)})}}d.setAttribute("style",`position: fixed; top: ${o+25}px; left: 0; right: 0; z-index: 2147483647; width: 100%; max-width: unset; background: rgba(0,0,0, 0.2); margin: 0 auto; border-color: transparent!important; padding-right: 0; padding-left: 0;`),window.odT.setup.adLayoutEnabled&&l.setAttribute("style","z-index","2147483647"),"flex"!==getComputedStyle(l).display&&d.style.setProperty("display","flex")}};let v;const b=new window.IntersectionObserver(([t])=>{if(t.isIntersecting)return v=Date.now(),void(s=setTimeout(()=>{h(),setTimeout(()=>{m(),b.unobserve(d),window.odT.stickyFormatClosed=!0},500)},i))},{root:null,threshold:.1});if(b.observe(d),d.getBoundingClientRect().top<0){v=Date.now();let t=Date.now();t-v<i&&y(i-(t-v))}const T=()=>{const e="number"==typeof window?.odT?.setup?.anchorModeTopTrigger?window.odT.setup.anchorModeTopTrigger:25,o="number"==typeof window?.odT?.setup?.anchorModeTopTrigger?window.odT.setup.anchorModeTopTrigger:0,n=d?.getBoundingClientRect(),s=l?.getBoundingClientRect();if(n.top<e){let e=Date.now();e-v<i&&odT.stickyFormatLoaded.slice(-1)[0]===t&&y(i-(e-v))}s.top>=o&&m()};let S=!1;window.addEventListener("scroll",()=>{S||(S=!0,requestAnimationFrame(()=>{T(),S=!1}))},{passive:!0})}}registerEventCallback(t){var e=!1;return"function"==typeof t&&(window.odT.eventCallback.push(t),e=!0),e}adjustPrebidSizesForInfiniteScroll(){if(this.prebidSizesAdjusted)return!0;this.prebidSizesAdjusted=!0,this.log("Adjust sizes for Prebid infiniteScroll (remove 1800x1000)");for(let t in window.odpbjs.adUnits){if(window.odpbjs.adUnits[t].hasOwnProperty("mediaTypes")&&window.odpbjs.adUnits[t].mediaTypes.hasOwnProperty("banner")&&window.odpbjs.adUnits[t].mediaTypes.banner.hasOwnProperty("sizes"))for(let e in window.odpbjs.adUnits[t].mediaTypes.banner.sizes)1800==window.odpbjs.adUnits[t].mediaTypes.banner.sizes[e][0]&&1e3==window.odpbjs.adUnits[t].mediaTypes.banner.sizes[e][1]&&(window.odpbjs.adUnits[t].mediaTypes.banner.sizes[e][0]=1,window.odpbjs.adUnits[t].mediaTypes.banner.sizes[e][1]=1);if(window.odpbjs.adUnits[t].hasOwnProperty("sizes"))for(let e in window.odpbjs.adUnits[t].sizes)1800==window.odpbjs.adUnits[t].sizes[e][0]&&1e3==window.odpbjs.adUnits[t].sizes[e][1]&&(window.odpbjs.adUnits[t].sizes[e][0]=1,window.odpbjs.adUnits[t].sizes[e][1]=1)}return!0}cleanWallpaper(){this.log("Wallpaper cleanup");let t=document.getElementById("rp-skin-container-sandbox");null!=t&&(t.style.display="none"),t=document.getElementById("rubiconExpander"),null!=t&&(t.style.display="none")}spaManualLoad(t){if("string"==typeof t&&(window.odT.initConfig.adUnit=t),window.odT.setup.hasOwnProperty("publisherInfiniteScrollRefresh")&&"function"==typeof window.odT.setup.publisherInfiniteScrollRefresh&&window.odT.setup.publisherInfiniteScrollRefresh(window.odT.initConfig),(window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode)&&0===Object.keys(window.odT.finalAdSlotsConfig).length)window.odT.log("Call SPA manual mode after first load"),window.odT.setDefaultSizes();else if((window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode)&&Object.keys(window.odT.finalAdSlotsConfig).length){const t="Desktop"===window.odT.screen?'[class^="Billboard_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]':'[class^="Mobile_"], [class*=" Mobile_"]';document.querySelectorAll(t).length&&(window.odT.log("Call SPA manual mode"),document.querySelectorAll(t).forEach(t=>{window.odT.addNewAdSlot(t)}))}window.odT.log(`Call SPA function with adUnit: ${window.odT.initConfig.adUnit}`),window.odT.log("Updated adslots list",window.odT.finalAdSlotsConfig.adSlotsDefinitions),!1!==window.odT.infiniteScrollWallpaperSlot&&(window.odT.log("Manage infiniteScrollWallpaperSlot"),window.odT.adjustPrebidSizesForInfiniteScroll(),2==window.odT.infiniteScrollWallpaperSlot&&window.odT.cleanWallpaper()),window.odT.infiniteScrollId++}processCommandQueue(){window.odT.log("Processing command queue");const t=async function(t){try{if("function"!=typeof t)return;if(-1!==t.toString().indexOf("getVideoInstreamAds"))return window.odT.userAction.push("triggerInstream"),window.optidigitalCoreQueue=window.optidigitalCoreQueue||{},window.optidigitalCoreQueue.cmd=window.optidigitalCoreQueue.cmd||[],window.optidigitalCoreQueue.cmd.push(t),void window.odT.loadCore();t.call()}catch(t){window.odT.log("Error processing command : "+t.message)}};if("object"==typeof optidigitalQueue&&"object"==typeof optidigitalQueue.cmd)for(optidigitalQueue.cmd.push=function(e){t(e)};optidigitalQueue.cmd.length>0;)t(optidigitalQueue.cmd.shift())}loadOdas(t,e){if(!this.odasLoaded&&this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes(this.consentType)&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")&&Array.isArray(this.setup.adSlotsConfig.adSlotsDefinitions)&&this.setup.adSlotsConfig.adSlotsDefinitions.length&&this.setup.adSlotsConfig.adSlotsDefinitions.some(t=>void 0!==t.odZoneId)&&("ko"===this.consentType||this.userAction.length&&"ko"!==this.consentType)){this.log("Load odas"),this.odasLoaded=!0,"ko"===this.consentType&&(this.adserver="OD",this.buildFirstLoadAdSlots(),this.monitorLazyLoadAdSlots());let i=document.createElement("script");i.async=!0,i.type="text/javascript",i.src=`https://scripts.opti-digital.com/lib/?lib=od-exads-tagsv3&v=${odTLibs.odas}`,i.onload=function(){"undefined"!=typeof optidigitalAdsrv&&(e?e.forEach(e=>{t(e.adslotKV,e.divId,e.event)}):t())};let o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o)}}isSecondChanceEnabled(t,e){let i=!1,o=e.substring(this.divIdPrefix.length);if(this.engageBackfill&&this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes(this.consentType)&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")&&("ko"===this.consentType||this.userAction.length&&"ko"!==this.consentType)&&!window.odT.stickyAdapter.hasFallback(t)&&(1==this.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(o)||Object.values(this.finalAdSlotsConfig.adSlotsDefinitions).find(t=>t.divId===o)))for(let e in this.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof this.setup.adSlotsConfig.adSlotsDefinitions[e]&&this.setup.adSlotsConfig.adSlotsDefinitions[e].odZoneId&&this.setup.adSlotsConfig.adSlotsDefinitions[e].odSize&&t==this.setup.adSlotsConfig.adSlotsDefinitions[e].name&&!this.setup.adSlotsConfig.adSlotsDefinitions[e].disableBackfill){i=!0;break}return i}runOdasAuction(){let t=[];for(let e=0;e<window.odT.firstLoadAdSlots.length;e++)for(let i=0;i<window.odT.setup.adSlotsConfig.adSlotsDefinitions.length;i++)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[window.odT.firstLoadAdSlots[e]]?.adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name){let o={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize,divId:window.odT.finalAdSlotsConfig.adSlotsDefinitions[window.odT.firstLoadAdSlots[e]].divId};t.push(o);break}if(t.length>0){let e=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,t,"start",window.odT.consentType,window.odT.testGroup,"direct",!1,1,e)}window.odT.initCRModal()}runSecondChance(t,e,i){let o=t,n=[];for(let t in window.odT.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[t]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[o]?.adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].name){let i={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[t]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[t].odSize,divId:e};n.push(i);break}if(n.length>0){let t=window.odT.analytics.adSlotsLoadCount[e]>=1?"auto":"no",o=!(!i||-1==i.getConfig("targeting")?.targeting?.od_pf_group?.[0]?.indexOf("1")),d="0";window.googletag.cmd.push(function(){-1!=window.googletag.getConfig("targeting")?.targeting?.od_pf_nr?.[0]?.indexOf("1")&&(d="1")}),optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,n,"unfilled",window.odT.consentType,window.odT.testGroup,t,o,d)}else{window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:e,name:t}});const i=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===e):null,{hb_bidder:o,hb_pb:n,amznbid:d,od_pfg:s,od_pf_group:a,od_pf_pb:r}=window.odT.tools.checkSlotTargeting(i),l=window.odT.analytics.addBidderMetrics(e,o,n,d);let c={divId:t,divIdFull:e,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:o,prebidBid:n,amazonStatus:d,oyStatus:s,oyTestGroup:a,oyPb:r,nogam:!1,bidders:Object.keys(l).length?l:null};window.odT.analytics.adRequestEvent(c)}}setPageTargeting(t,e){if(!t||!e)return;let i=window.odT?.setup?.customTargeting?.[t]?.name||t,o=window.odT?.setup?.customTargeting?.[t]?.value||e;this.log("CALL setPageTargeting key="+i+" value="+o),window.odT.customPageTargeting[i]=o,window.googletag.cmd.push(function(){window.googletag.setConfig({targeting:{[i]:o}})})}retrieveEnvelope(t){let e;try{e=decodeURIComponent(document.cookie.match("(^|;) *_lr_env=([^;]*)")[2]),e={envelope:JSON.parse(atob(e)).envelope},e=JSON.stringify(e)}catch(t){return e}finally{if(!t)return e;t(e)}}callAtsEnvelope(){const{email_md5:t,email_sha256:e,email_sha1:i}=this.initConfig.uuid,o={method:"GET"};let n=`https://api.rlcdn.com/api/identity/v2/envelope?pid=${Number(this.setup?.userids?.liverampId?.params?.pid||this.setup.liverampId)||0}`;n+=t?`&it=4&iv=${t}`:"",n+=e?`&it=4&iv=${e}`:"",n+=i?`&it=4&iv=${i}`:"",n+=`&ct=${window.optidigitalToolboxGdpr?"4":"3"}&cv=${this.consentV2TCData&&this.consentV2TCData.tcString}`;try{fetch(n,o).then(t=>t&&200!==t.status?(window.odT.skipLiveRamp=!0,!1):t).then(t=>t.json()).then(t=>{t.envelopes&&t.envelopes.length&&window.odT.getEnvelope(t.envelopes)}).catch(t=>{})}catch(t){}}refreshAtsEnvelope(){const t={method:"GET"};let e=window.odT.retrieveEnvelope();if(!e)return void window.odT.callAtsEnvelope();e=JSON.parse(e).envelope;const i=`https://api.rlcdn.com/api/identity/v2/envelope/refresh?pid=${this.setup?.userids?.liverampId?.params?.pid||this.setup.liverampId}&it=19&iv=${e}&ct=${window.optidigitalToolboxGdpr?"4":"3"}&cv=${this.consentV2TCData&&this.consentV2TCData.tcString}`;try{fetch(i,t).then(t=>t&&200!==t.status?(window.odT.skipLiveRamp=!0,!1):t).then(t=>t.json()).then(t=>{t.envelopes&&t.envelopes.length?window.odT.getEnvelope(t.envelopes):window.odT.callAtsEnvelope()}).catch(t=>{})}catch(t){}}calculateEnvelopeTTL(t,e){let i=2592e3;"US"===t&&"CA"===e&&(i=1296e3);return{expirationTime:i,expirationDate:1e3*i+ +new Date}}getEnvelope(t){const e=t.find(t=>"envelopeLiveramp"===t.source),i=t.find(t=>"pairIds"===t.source),o=e?e.value:null,n=i?i.value:null,d=window.odT.calculateEnvelopeTTL();if(o){const t={envelope:o},e=btoa(JSON.stringify(t));window.odT.liveRampObj=e,window.odT.setCookie("_lr_env",encodeURIComponent(e),d.expirationTime),window.odT.setCookie("_lr_env_exp",d.expirationDate,d.expirationTime)}if(n){const t=atob(n),e={envelope:JSON.parse(t)},i=btoa(JSON.stringify(e));window.odT.setCookie("_lr_pairId",encodeURIComponent(i),d.expirationTime),window.odT.setCookie("_lr_pairId_exp",d.expirationDate,d.expirationTime),window.odT.pairIdObj=i}}setPpid(){if(this.setup.enablePPID&&this.consentV2TCData&&this.consentV2TCData.hasOwnProperty("publisher")&&this.consentV2TCData.publisher.hasOwnProperty("consents")&&this.consentV2TCData.publisher.consents[1]){let t;const e=this.setup?.enablePPIDSource;if(e){const i=window.localStorage.getItem(e);if(i)try{const o=decodeURIComponent(i);let n;try{n=JSON.parse(o)}catch{n=o}t="id5Id"===e?n?.gp:n}catch(t){}else t=window.odT?.getCookie(e)}if(this.setup.hasOwnProperty("enablePPIDSource")&&!t)return;t||(t=this.getCookie("_oppid"));const i=15552e3;if(!t)try{t=self.crypto.randomUUID()}catch(e){t=this.tools.generateUuid()}this.setCookie("_oppid",t,i),window.googletag.cmd.push(function(){window.googletag.pubads().setPublisherProvidedId(t)})}}setSlotTargeting(t,e,i,o="optidigital",n=!1){const d=!!window.odT.setup.enableSendAllBids&&`_${o}`;let s=window.odT?.setup?.customTargeting?.[e]?.name||e,a=window.odT?.setup?.customTargeting?.[e]?.value||i;t.setConfig({targeting:{[s]:a}}),d&&n&&(s=`${s}${d}`.slice(0,20),t.setConfig({targeting:{[s]:a}}))}initCRModal(){if(window.odT.setup.crZoneId&&!window.odT.consentOK.includes(window.odT.consentStatus)){window.odT.log("Load Consent Recovery Modal");const t=window.odT.setup.crZoneId;let e=document.createElement("div");e.setAttribute("id","optidigital-adslot-CRModal"),e.setAttribute("class","CRModal"),e.setAttribute("style","display:none;"),document.body.appendChild(e);let i=[],o={zoneId:t,adslot:"CRModal",size:[1,1],divId:"optidigital-adslot-CRModal"};i.push(o);let n=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,i,"start",window.odT.consentType,window.odT.testGroup,"direct",!1,n)}}start(){this.runAuction("cmpConsentReadyOK")}loadByGroup(t,e=!0){if(window.odT.setup?.adSlotsConfig?.groups&&"object"==typeof window.odT.setup.adSlotsConfig.groups&&t){Object.keys(window.odT.setup.adSlotsConfig.groups).forEach(t=>{Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).forEach(e=>{window.odT.setup.adSlotsConfig.groups[t].includes(e.adUnit)&&!window.odT.setup.adSlotsConfig.groups[t].includes(e.name)&&window.odT.setup.adSlotsConfig.groups[t].push(e.name)})});Object.entries(window.odT.setup.adSlotsConfig.groups).filter(([e,i])=>i.some(e=>t.includes(e))).forEach(([e,i])=>{i.forEach(e=>{!t.includes(e)&&Object.values(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions)?.find(t=>t.name===e)&&t.push(e)})})}e&&(window.odT.lazyLoadPendingAdSlots=window.odT.lazyLoadPendingAdSlots.filter(e=>!t.includes(e)))}getPrebidAdUnitsSizes(t){return t.filter(function(t){let e=!1;if(void 0!==t&&2==t.length)for(let i in odT.prebidSizes)odT.prebidSizes[i][0]==t[0]&&odT.prebidSizes[i][1]==t[1]&&(e=!0);return e})}isElementUnderBlur(t,e){if(!t)return!1;return((t,e)=>{let i=t.parentElement;for(;i;){if(i.style.filter.includes("blur("))return!0;if(i===e)break;i=i.parentElement}return!1})(t,e)}checkServicesReady(){return(window.odT.id5Obj||!window.odT.id5Permission)&&(window.optiyield._ready||window.odT.skipOy)&&(window.odT.liveRampObj||window.odT.skipLiveRamp)&&(window.odT.iasReady||!window.odT.iasId)&&(window.odT.cookieSyncReady||!window.odT.enableCookieSync)}loadAPS(){if(window.odT.setup.biddersSetup&&window.odT.setup.biddersSetup.hasOwnProperty("amazon")&&(0==window.odT.setup.hasOwnProperty("skipAmazonInit")||1!=window.odT.setup.skipAmazonInit)&&(!window.odT.setup.biddersSetup?.amazon?.countries?.length||window.odT.setup.biddersSetup?.amazon?.countries.includes(window.optidigitalToolboxCC))&&(!window.odT.setup.biddersSetup?.amazon?.browsers?.length||window.odT.setup.biddersSetup?.amazon?.browsers.includes(window.odT.checkBrowser.toLowerCase()))&&(!window.odT.setup.biddersSetup?.amazon?.devices?.length||window.odT.setup.biddersSetup?.amazon?.devices.includes(window.odT.deviceCategory.toLowerCase()))&&!window.odT.enableAmazonAPS){var t=document.createElement("link");t.rel="preload",t.as="script",t.href="//c.amazon-adsystem.com/aax2/apstag.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),function(t,e,i,o,n,d,s){function a(i,o){e[t]._Q.push([i,o])}e[t]||(e[t]={init:function(){a("i",arguments)},fetchBids:function(){a("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]},(d=i.createElement(o)).async=!0,d.src="//c.amazon-adsystem.com/aax2/apstag.js",(s=i.getElementsByTagName(o)[0]).parentNode.insertBefore(d,s))}("apstag",window,document,"script");var i={pubID:window.odT.setup.amazonPubId?window.odT.setup.amazonPubId:window.odT.setup.biddersSetup.amazon.pubID,adServer:"googletag",videoAdServer:"DFP",isSelfServePub:!0};!window.odT.setup.hasOwnProperty("info")||!window.odT.setup.info.hasOwnProperty("siteId")||window.odT.setup?.directBidders?.length&&window.odT.setup?.directBidders?.includes("amazon")||(i.schain={complete:1,ver:"1.0",nodes:[{asi:"optidigital.com",sid:window.odT?.setup?.info?.sellerId?window.odT.setup.info.sellerId.toString():window.odT.odNetworkId?`p${window.odT.setup.info.publisherId.toString()}`:window.odT.setup.info.siteId.toString(),hp:1}]}),window.apstag.init(i),window.odT.enableAmazonAPS=!0}(window.odT.setup.hasOwnProperty("skipAmazonInit")||1==window.odT.setup.skipAmazonInit)&&(window.odT.enableAmazonAPS=!0)}getAPSAdslotSizes(t){return t.filter(function(t){let e=!1;if(void 0!==t&&2==t.length)for(let i in window.odT.apsSizes)window.odT.apsSizes[i][0]==t[0]&&window.odT.apsSizes[i][1]==t[1]&&(e=!0);return e})}fetchAPSBids(t,e,i){if(window.odT.enableAmazonAPS&&t.length>0){let o=[];for(let e in t)if(window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(t[e])&&window.odT.setup.biddersSetup.amazon.adSlots.hasOwnProperty(window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].adUnit)){let i={};i.slotID=window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].divId,i.slotName=window.odT.initConfig.adUnit+"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].name,i.sizes=window.odT.getAPSAdslotSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].dfpSizes),i.optiYield={adUnitPath:`${window.odT.initConfig.adUnit}${window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].customAdUnitCode?"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].customAdUnitCode:""}`,cd:{cd1:window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].cdValue:window.odT.finalAdSlotsConfig.adSlotsDefinitions[t[e]].adUnit}},o.push(i)}if(o.length>0){window.odT.oyStatus&&window.optiyield.cmd.push(function(){Object.keys(window.optidigitalPFconfig).length>0&&!window.optiyield._init_ready&&window.odT.initOy(),o=window.optiyield.setAmazonFloors(o,window.odT.setA)});const t=Date.now();window.odT.initAPS=Date.now(),window.apstag.fetchBids({slots:o,timeout:window.odT.setup.biddersSetup.amazon.timeout},function(n){const d=Date.now();o.forEach(e=>{window.odT.analytics.auctionMetrics.amazon=window.odT.analytics.auctionMetrics?.amazon||{},window.odT.analytics.auctionMetrics.amazon[e.slotID]=d-t}),window.odT.log("Amazon bids received"),window.googletag.cmd.push(function(){window.apstag.setDisplayBids(),e&&i?(e.aps=!0,i()):window.odT.amazonBidsReady=!0})})}else window.odT.log("No APS slots to request bids for"),e&&i?(e.aps=!0,i()):window.odT.amazonBidsReady=!0}}convertBidCpm(t=null){let e=t;if(e){const i=window.odT.convertToCurrency(t,"EUR"),o=window.odT.setup.prebidPriceGranularity?window.odT.setup.prebidPriceGranularity:window.odT.defaultPriceGranularity;e=window.odT.getCpmStringValue(i,o.buckets)}return e}openConnection(){try{if(!this.setup?.sspPriorities?.ssp)return;window.odT.log("Open connection");const t="https://pbs.optidigital.com/status",e=new XMLHttpRequest;e.withCredentials=!window.optidigitalToolboxGdpr,e.open("GET",t,!0),e.timeout=3e3,e.onreadystatechange=function(){this.readyState},e.send()}catch(t){}}};export{m as default};