function anonymous( ) { // hash: M83A6i4yep0pT0q6e/usRN9DiwOYKwWDOP1AOKQcE+i1uoHwkc31femD4DJjNxPuD718kkLQRAUBxcMGgdOy38EJdkfiFs1Krpt7Xu9v8Rqni3CgWVo8fj4WCQN674l9T/AfzE6gvSh8qA0ba5HHdds4kPbzlWYEC8uEhxBRq0g= var _ADAGIO=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1},Z.prototype.set=function(e,t){var n=this.__data__,i=Q(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var Y=F(b,"Map");function X(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&i%1==0&&i<=9007199254740991)&&ye(o,r)&&(p(e)||me(e))}(e,t,fe)}var Ie=function(){try{var e=F(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var we=Object.prototype.hasOwnProperty;function _e(e,t,n){var i=e[t];we.call(e,t)&&J(i,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&Ie?Ie(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)}function Oe(e,t,n){return null==e?e:function(e,t,n,i){if(!x(e))return e;for(var a=-1,r=(t=de(t,e)).length,s=r-1,o=e;null!=o&&++aa?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(a);++i1?t-1:0),i=1;i>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},Pe=function(){var e,t;switch(e=Ce().navigator.userAgent,/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?5:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(e)?4:2){case 2:t="desktop";break;case 4:t="mobile";break;case 5:t="tablet"}return t},Re=function(e){if("string"!=typeof e||"http"!==e.slice(0,4))return Te("uriParser: unable to parse uri, invalid",e),!1;var t=document.createElement("a"),n="",i={};t.href=e;for(var a=0,r=(n=t.search.slice(1).split("&")).length;a0?t.timing.navigationStart:null},ze=function(){var e=Ce(),t=null;return e.performance&&e.performance.timing&&e.performance.timing.domContentLoadedEventStart&&(t=e.performance.timing.domContentLoadedEventStart),t};var Me=function(){return o((function e(){r(this,e),this.storage=new Ue,this.maxTimeSession=18e5,this._ensureSchema()}),[{key:"_ensureSchema",value:function(){var e=this.storage.get("navigation"),t=this.storage.get("navigation.session");if(t){if(t.sampling)try{var n=t.sampling.avw,i=t.sampling.rates.avw;t.rnd=!0===n?i+.01:i-.01,t.vwSmplg=i,t.vwSmplgNxt=e&&e.nextSamplingRates&&e.nextSamplingRates.avw?e.nextSamplingRates.avw:i,t._firstPageviewId=t.sampling.firstPageviewId,t._bidsSmplg=.1,t._currentPagetype=t.currentPagetype,t._previousPagetype=t.previousPagetype,t._pages=t.pages,delete t.sampling,delete t.currentPagetype,delete t.previousPagetype,delete t.pages}catch(e){}this.storage.store("session",t),this.storage.unset("navigation.session"),delete e.session,delete e.nextSamplingRates}e&&(this.storage.store("_navigation",e),this.storage.unset("navigation"))}},{key:"startOrUpdate",value:function(e){var t=Date.now(),n=this.storage.get("_navigation"),i=this.storage.get("session");try{!n||!i||!0===i.new||e.isNew||"number"!=typeof i.lastActivityTime||"number"!=typeof i.vwSmplg||t-i.lastActivityTime>this.maxTimeSession?this.start(e):this.update(e)}catch(e){Te(e)}}},{key:"start",value:function(e){var t=this.storage.get("_navigation")||{},i=parseInt(t.totalPages,10)||0,a=parseInt(t.totalSessions,10)||0,r=this.storage.get("session")||{};this.storage.store("_navigation.totalPages",i+1),this.storage.store("_navigation.totalSessions",a+1);var s,o,d,u,c=Date.now(),l=r.vwSmplgNxt||.1;Object.keys(r).length&&"snippet"===r.initiator?(s=r.rnd,o=r.sessionId,d=r.testName,u=r.testVersion):(s=e&&e.rnd?e.rnd:Math.random(),o=e&&e.sessionId?e.sessionId:Be()),this.storage.store("session",n(n({_firstPageviewId:null,_pages:1,_currentPagetype:null,_previousPagetype:null,_bidsSmplg:.1,lastActivityTime:c,rnd:s,sessionId:o,initiator:"adgjs",vwSmplg:l,vwSmplgNxt:l},void 0!==d&&{testName:d}),void 0!==u&&{testVersion:u}))}},{key:"update",value:function(){var e=Date.now(),t=this.storage.get("_navigation"),n=this.storage.get("session");if(!t||!n)throw new Error("Key missing in localStorage");var i=parseInt(n._pages,10)||0,a=parseInt(t.totalPages,10)||0;this.storage.store("session.lastActivityTime",e),this.storage.store("session._pages",i+1),this.storage.store("_navigation.totalPages",a+1)}},{key:"setVwSamplingNext",value:function(e){this.storage.store("session.vwSmplgNxt",e)}},{key:"setSampling",value:function(e,t){var n=this.storage.get("session._firstPageviewId");if(!this.storage.get("session.rnd"))throw new Error("The key rnd has not been found");n?n===e&&t&&"number"==typeof t.vwSmplgNxt&&t.vwSmplgNxt>=0&&(this.storage.store("session.vwSmplg",t.vwSmplgNxt),this.storage.store("session.vwSmplgNxt",t.vwSmplgNxt)):this.storage.store("session._firstPageviewId",e)}}])}(),Ve=function(){return o((function e(){r(this,e),this._storage=new Ue}),[{key:"sessionLength",get:function(){return this._storage.get("session._pages")||1}},{key:"avgSessionLength",get:function(){var e=parseInt(this._storage.get("_navigation.totalSessions"),10)||1;return(parseInt(this._storage.get("_navigation.totalPages"),10)||1)/e}},{key:"referrerFQDN",get:function(){var e="";if(Se()){var t=window.top.document.referrer;if(t)e=Re(t).hostname}return e}},{key:"totalSessions",get:function(){return this._storage.get("_navigation.totalSessions")||1}},{key:"previousPagetype",get:function(){return this._storage.get("session._previousPagetype")}},{key:"currentPagetype",get:function(){return this._storage.get("session._currentPagetype")}},{key:"allowBeaconSending",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(-1===["avw","bids"].indexOf(e))return!0;switch(e){case"bids":t="number"==typeof n?n:this._storage.get("session._bidsSmplg"),0===this._storage.get("session.vwSmplg")&&(t=0);break;case"avw":t=this._storage.get("session.vwSmplg")}var i=this._storage.get("session.rnd");return"number"!=typeof t||"number"!=typeof i||i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,r=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw r}}}}(i);try{for(r.s();!(a=r.n()).done;){var s=a.value;Je({event:s,collector:t,data:n})}}catch(e){r.e(e)}finally{r.f()}}else We({collector:t,data:n})},Ke=function e(t,n){if(!n||!n.length)return!1;if(!t||"function"!=typeof t.getBoundingClientRect)return!1;try{var i=t.getBoundingClientRect(),a=Math.round(i.width)+"x"+Math.round(i.height);if(-1!==n.indexOf(a))return t;var r=t.querySelectorAll("*:not(script)");if(r.length){for(var s=0,o=r.length;s=50))},Xe=function(){"hidden"===this.w.document.visibilityState&&(this.hasMaxExposureDuration()||this.sendBeacon({becauseOf:"visibilitychange"}))},et=function(){var e=Date.now();"hidden"===this.w.document.visibilityState?this.pageVisibility.ts=e:(this.pageVisibility.computedDuration+=e-this.pageVisibility.ts,this.pageVisibility.ts=!1)},tt=function(e,t,n){var i=e.adUnitCode,a=e.adUnitElementId,r=e.refreshConfig,s=e.currentPrintNumber,o=e.timeout,d=Ce();if(d.googletag){var u=d.googletag.pubads().getSlots().filter((function(e){return e.getSlotElementId()===a}))[0],c=function(e,t){var n=e.pbjs,i=e.ADAGIO.pbjsAdUnits.find((function(e){return e.code=t}));return i&&i.localPbjsRef&&(n=i.localPbjsRef),n}(d,i);u?(u.setTargeting("adg_refresh","true"),s&&u.setTargeting("adg_pn",parseInt(s.toString(),10)+1),t({adUnitCode:i,adUnitElementId:a,refreshConfig:r,currentPrintNumber:s}).then((function(e){!1!==e&&n({pbjs:c,adUnitCode:i,timeout:o,bidsBackHandler:function(){c.setTargetingForGPTAsync(a),d.googletag.pubads().refresh([u])}})}))):Te("No slot detected for adunitCode "+i+" with elementId : "+a)}else je("Can not find the property: googletag in window")},nt=function(e,t){var n=e.adUnitCode,i=e.adUnitElementId,a=e.refreshConfig,r=Ce();if(r.sas){var s=r.ADAGIO.adUnits;!s||s[n]?t({adUnitCode:n,adUnitElementId:i,refreshConfig:a}).then((function(e){if(!1!==e)try{r.sas.refresh(n)}catch(e){Ne(e)}})):Te("No slot detected for adunitCode "+n+" with elementId : "+i)}else je("Can not find the property: sas in window")},it=function(e){if(!e.refreshConfig||!e.refreshConfig.beforeRefresh||"function"!=typeof e.refreshConfig.beforeRefresh)return new Promise((function(e){return e(!0)}));var t=e.refreshConfig.beforeRefresh(e);return Te("Refresh: handleBeforeRefresh",t),new Promise((function(e,n){if(!(t instanceof Promise))return e(t);t.then((function(t){return e(t)})).catch((function(){return n(!1)}))}))},at=function(e){var t=e.adUnitCode,n=e.bidsBackHandler,i=e.pbjs,a=e.timeout;i.que.push((function(){i.requestBids({timeout:a,adUnitCodes:[t],bidsBackHandler:n})}))},rt=["1012"],st={page_dimensions:"pg_dims",viewport_dimensions:"vp_dims",dom_loading:"dom_l",layout:"lay",adunit_position:"adu_pos",user_timestamp:"u_ts",device:"dvc",browser:"brwsr",url:"url",print_number:"pn"},ot={organizationId:"org_id",site:"site",placement:"plcmt",adUnitCode:"adu_code",pagetype:"pgtyp",category:"cat",subcategory:"subcat",environment:"env"},dt={adsrv:"adsrv",adsrv_advrt_id:"adsrv_advrt_id",adsrv_cmpgn_id:"adsrv_cmpgn_id",adsrv_crea_id:"adsrv_crea_id",adsrv_empty:"adsrv_empty",adsrv_lnitem_id:"adsrv_lnitem_id",adsrv_size:"adsrv_size"},ut=function(){var e=Ce();if(e)return e.ONFOCUS=e.ONFOCUS||{},e.ONFOCUS.donotrefresh||e.onfocus_donotrefresh||e.onfocus_donotrefresh_slots||e.ONFOCUS.donotrefresh_slots},ct=function(){return o((function e(t){var n=t.ts,i=t.adUnitElementId,a=t.auctionId,s=t.params,o=t.options,d=t.featuresManager,u=t.measurersManager,c=t.navigationFeatures;return r(this,e),Te("New measurer for adUnitElementId ".concat(i,":"),{params:s,options:o}),this.w=Ce(),this.navigationFeatures=c,this.featuresManager=d,this.measurersManager=u,this.params=s||{},this.options=o||{},this.auctionId=a,this.initTime=null,this.startTime=null,this.ts=n,this.navigationStart=Le(),this.internalId=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),this.resetCounter=0,this.resetTime=null,this.beaconVersion=0,this.intervalId=!1,this.avwBeaconTimeoutId=!1,this.refreshStarted=!1,this.refreshConfig=this.options.refresh||!1,this.doNotRefresh=!1,this.useIntersectionObserver=!0,this.clickListenerHandler=null,this.mouseHoverListenerHandler=null,this.mouseOutListenerHandler=null,this.gptImpressionViewable=Ze.bind(this),this.gptSlotVisibilityChanged=Ye.bind(this),this.pageVisibility={ts:!1,computedDuration:0},this._adUnitElementId=this.adUnitElementId=i,this.element={},this.prebidAdUnitConfig=this.options.adUnitConfig||[],this.throttleBeacons="boolean"!=typeof this.options.throttleBeacons||this.options.throttleBeacons,this.beaconsQueue=[],this.beaconsPending=!1,this.limitFirstBeaconsTimer=!1,window.self.document.getElementById(this.adUnitElementId)?this.init()?(this.unbindBeaconEvents(),this.bindBeaconEvents(),void this.start()):(je("Unable to init measurer"),!1):(je("Element to measure is missing in window: ".concat(this.adUnitElementId)),!1)}),[{key:"init",value:function(){this.initTime=Date.now(),this.measurable=!0;var e=this.getFeatures(this._adUnitElementId);if(this.features=e&&e.features?e.features:{},this.featuresVersion=e&&e.version?e.version:"1",this.clickListenerHandler=this.clickListener.bind(this),this.mouseHoverListenerHandler=this.mouseHoverListener.bind(this),this.mouseOutListenerHandler=this.mouseOutListener.bind(this),this.resetViewability(),!window.IntersectionObserver)return this.useIntersectionObserver=!1,this.measurable=!1,je("no intersection observer"),void this.stop("noIObserver");if("function"!=typeof window.CustomEvent)return this.stop("noCustomEvent"),!1;this.bindAdserverEvents();var t=this.detectBestDomElement();if(!t)return this.stop("noElement"),!1;this.setElement(t),this.startBackgroundDetection(),Te("Init measurer for adUnitElementId ".concat(this.adUnitElementId," with this detected element:"),{el:this.element.el,refresh:this.refreshConfig}),this.w.ADAGIO=this.w.ADAGIO||{},this.w.ADAGIO.doNotRefresh=ut()||this.w.ADAGIO.doNotRefresh||[];var n=this.params.adUnitCode||!1;return this.refreshConfig||(Te("No refreshConfig for this Measurer: ".concat(n)),this.doNotRefresh=!0),n||(Te("No adUnitCode for this Measurer: ".concat(n)),this.doNotRefresh=!0),Array.isArray(this.w.ADAGIO.doNotRefresh)&&-1!==this.w.ADAGIO.doNotRefresh.indexOf("*")&&(Te("No Refresh because doNotRefresh is activate on the whole page"),this.doNotRefresh=!0),Array.isArray(this.w.ADAGIO.doNotRefresh)&&n&&-1!==this.w.ADAGIO.doNotRefresh.indexOf(n)&&(Te("This adUnitCode is in the ADAGIO.doNotRefresh: ".concat(n)),this.doNotRefresh=!0),!0}},{key:"resetViewability",value:function(e){var t={adagio:{visible:!1,continuousCounter:0,viewableSince:null,exposureDuration:0,lastUpdateTs:!1,elementMouseOver:!1,exposureDurationOnClick:null,lastAttentionBeaconSent:0,inViewport:!1},adserver:{visible:!1,viewableSince:null,continuousCounter:0,exposureDuration:0,lastUpdateTs:!1,lastAttentionBeaconSent:0,exposureDelta:0,inViewport:!1}};e&&this.viewability&&Object.prototype.hasOwnProperty.call(this.viewability,e)?this.viewability[e]=Object.assign({},t[e]):this.viewability=Object.assign({},t),this.startObserver(!0)}},{key:"detectBestDomElement",value:function(){try{var e=window.self.document.getElementById(this.adUnitElementId),t=function(e){return Ke(e,f)}(e),n=!!t,i=function(e,t){return Ke(e,t)}(e,this.prebidAdUnitConfig.sizes&&this.prebidAdUnitConfig.sizes.length?this.prebidAdUnitConfig.sizes.map((function(e){return e[0]+"x"+e[1]})):[]),a=!!i,r=i||t||e;return{el:r,elId:r.id,size:this.formatElementSize(r),reasonNotMeasurable:t?v:h,hasIABDimensions:n,hasPbjsDimensions:a}}catch(e){return Ne(e),!1}}},{key:"setElement",value:function(e){this.element=e}},{key:"hasMinPageExposureDuration",value:function(){return!!(ze()&&Date.now()-ze()>=3e4)}},{key:"hasMaxExposureDuration",value:function(){return"dfp"===this.options.adsrv?this.viewability.adagio.exposureDuration>9e4||this.viewability.adserver.exposureDuration>9e4||this.viewability.adagio.exposureDuration>6e4&&this.viewability.adserver.exposureDuration>6e4:this.viewability.adagio.exposureDuration>6e4}},{key:"formatElementSize",value:function(e){try{var t=e.getBoundingClientRect();return[Math.round(t.width),Math.round(t.height)].join("x")}catch(e){return"0x0"}}},{key:"startBackgroundDetection",value:function(){if(this.element.el&&!this.element.hasIABDimensions&&!this.element.hasPbjsDimensions&&this.options&&[0,"0"].includes(this.options.adsrv_empty)&&Date.now()<=this.initTime+4e3){var e=this;return setTimeout((function(){var t=e.detectBestDomElement();t&&(t.hasIABDimensions||t.hasPbjsDimensions)&&e.resetWithElement(t),e.startBackgroundDetection()}),50),!1}}},{key:"start",value:function(){if(this.startTime=Date.now(),"function"!=typeof window.CustomEvent)return this.stop("abort"),!1;this.sendBeacon({becauseOf:"start"}),this.bindMouseListeners(this.element.el),this.bindClickListener(),this.bindMeasureEvents(),this.w.document.dispatchEvent(new CustomEvent("adagio.measure.afterStart",{detail:{measure:this}}))}},{key:"stop",value:function(e){e=e||"stop",this.unbindAdserverEvents(),this.unbindMeasureEvents(),this.unbindClickListener(),this.element.el&&this.unbindMouseListeners(this.element.el),this.unbindBeaconEvents(),this.resetThrottledBeacon(),this.sendBeacon({becauseOf:e}),this.sendBeacon=function(){}}},{key:"resetWithElement",value:function(e){Te("Reset measurer for ".concat(this.adUnitElementId," with this element"),e),this.resetCounter++,this.resetTime=Date.now(),this.element.el&&this.unbindMouseListeners(this.element.el),this.setElement(e),this.bindMouseListeners(this.element.el),this.resetViewability(),this.sendBeacon({becauseOf:"reset"})}},{key:"startObserver",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this;this.observer&&!t||(this.observer=new IntersectionObserver((function(t){t.forEach((function(t){t.isIntersecting?n.viewability.adagio.inViewport=!0:(n.viewability.adagio.inViewport=!1,document.dispatchEvent(new CustomEvent("adagio.measure.onUpdateExposureDuration",{detail:{elementId:e._adUnitElementId,measurer:"adagio",viewability:n.viewability.adagio}})))}))}),{threshold:[.49,.5,.51]}),this.observer.observe(window.document.getElementById(this._adUnitElementId)))}},{key:"clickListener",value:function(){var e=this.viewability.adagio;try{if(document.activeElement instanceof HTMLIFrameElement){var t=this.element.el.getBoundingClientRect(),n=document.activeElement.getBoundingClientRect(),i=!(t.rightn.right||t.bottomn.bottom),a=this.element.el;a instanceof HTMLIFrameElement||(a=a.querySelector("iframe")),(document.activeElement===a||e.elementMouseOver||i)&&null==e.exposureDurationOnClick&&(e.exposureDurationOnClick=e.exposureDuration,Te("Click event detected on ".concat(this.element.elId," :"),this))}}catch(e){Ne(e)}}},{key:"bindClickListener",value:function(){var e=this.params.adUnitCode||!1;if(e&&this.measurersManager)try{this.measurersManager.get(e)?je("Measure: click: clickListener already bound for adUnitCode ".concat(e)):window.addEventListener("blur",this.clickListenerHandler,!1)}catch(e){Ne(e)}else Ne("Measure: click: unable to bind clickListener")}},{key:"unbindClickListener",value:function(){window.removeEventListener("blur",this.clickListenerHandler,!1)}},{key:"mouseHoverListener",value:function(){this.viewability.adagio.elementMouseOver=!0}},{key:"mouseOutListener",value:function(){this.viewability.adagio.elementMouseOver=!1}},{key:"bindMouseListeners",value:function(e){e&&(e.addEventListener("mouseover",this.mouseHoverListenerHandler),e.addEventListener("mouseout",this.mouseOutListenerHandler))}},{key:"unbindMouseListeners",value:function(e){e&&(e.removeEventListener("mouseover",this.mouseHoverListenerHandler),e.removeEventListener("mouseout",this.mouseOutListenerHandler))}},{key:"bindAdserverEvents",value:function(){this.unbindAdserverEvents(),this.w.document.addEventListener("adagio.gpt.impressionViewable",this.gptImpressionViewable,!1),this.w.document.addEventListener("adagio.gpt.slotVisibilityChanged",this.gptSlotVisibilityChanged,!1)}},{key:"unbindAdserverEvents",value:function(){this.w.document.removeEventListener("adagio.gpt.impressionViewable",this.gptImpressionViewable),this.w.document.removeEventListener("adagio.gpt.slotVisibilityChanged",this.gptSlotVisibilityChanged)}},{key:"bindMeasureEvents",value:function(){var e=this;this.startObserver(),this.intervalId=setInterval((function(){document.hidden?Object.keys(e.viewability).forEach((function(t){"adagio"!==t&&"dfp"!==e.options.adsrv||e.resetPreViewability(t)})):("dfp"===e.options.adsrv&&e.updateActiveViewViewability(),e.updateViewabilityWithIntersectionObserver())}),50)}},{key:"unbindMeasureEvents",value:function(){clearInterval(this.intervalId)}},{key:"bindBeaconEvents",value:function(){this.w.document.addEventListener("visibilitychange",Xe.bind(this),!1),this.w.document.addEventListener("visibilitychange",et.bind(this),!1)}},{key:"unbindBeaconEvents",value:function(){this.w.document.removeEventListener("visibilitychange",Xe),this.w.document.removeEventListener("visibilitychange",et)}},{key:"setBeaconTimeout",value:function(e){var t=this;e=e||"adagio";var n=this.params.organizationId,i=this.viewability[e];this.avwBeaconTimeoutId||i.visible&&i.exposureDuration-i.lastAttentionBeaconSent>1e3&&!this.hasMaxExposureDuration()&&(this.avwBeaconTimeoutId=setTimeout((function(){-1===rt.indexOf(n)&&t.sendBeacon({becauseOf:"exp_chg"}),t.avwBeaconTimeoutId=!1,i.lastAttentionBeaconSent=i.exposureDuration}),5e3))}},{key:"updateViewability",value:function(){var e=Date.now(),t=this.viewability.adagio;t.visible||t.continuousCounter>=1e3&&(t.visible=!0,t.viewableSince=e,Te("Adagio impressionViewable: ".concat(this._adUnitElementId)),this.sendBeacon({becauseOf:"vsbl"})),this.updateExposureDuration(e,"adagio"),t.lastUpdateTs=e,this.setBeaconTimeout("adagio"),this.w.document.dispatchEvent(new CustomEvent("adagio.measure.onUpdateViewability",{detail:{measure:this}})),!1===this.refreshStarted&&!1===this.doNotRefresh&&this.refresh()}},{key:"updateViewabilityWithIntersectionObserver",value:function(){var e=Date.now(),t=this.viewability.adagio;if(!t.visible&&t.continuousCounter>=1e3){t.visible=!0,t.viewableSince=e;var n=new Date(t.viewableSince).toString();Te("Adagio impressionViewable with IObsrv: ".concat(this.element.elId," at ").concat(n)),this.sendBeacon({becauseOf:"vsbl"})}t.inViewport?(this.updateExposureDuration(e,"adagio"),t.lastUpdateTs=e,this.setBeaconTimeout("adagio"),!1===this.refreshStarted&&!1===this.doNotRefresh&&this.refresh()):this.resetPreViewability("adagio")}},{key:"updateActiveViewViewability",value:function(){var e=Date.now(),t=this.viewability.adserver;t.inViewport?(this.updateExposureDuration(e,"adserver"),t.lastUpdateTs=e,!1===this.refreshStarted&&!1===this.doNotRefresh&&this.refresh("adserver"),this.setBeaconTimeout("adserver")):this.resetPreViewability("adserver")}},{key:"refresh",value:function(e){e=e||"adagio";var t=this.params.adUnitCode||!1;if(t){var n=!(!this.w.ADAGIO.adUnits||!this.w.ADAGIO.adUnits[t])&&this.w.ADAGIO.adUnits[t].printNumber,i=this.viewability[e];if(!n)return Te("No PrintNumber to start refresh for this adUnit: ".concat(t)),void(this.doNotRefresh=!0);if(n&&n>=this.refreshConfig.maxRefresh)return Te("Stoping refresh because currentPrintNumber is >= of ".concat(this.refreshConfig.maxRefresh," maxRefresh for this adUnit: ").concat(t)),void(this.doNotRefresh=!0);if((1!==n||this.hasMinPageExposureDuration())&&i.continuousCounter>=this.refreshConfig.timeToRefresh&&n<=this.refreshConfig.maxRefresh){var a=(ut()||[]).concat(this.w.ADAGIO.doNotRefresh||[]);if(Array.isArray(a)&&-1!==a.indexOf("*"))return Te("No Refresh because doNotRefresh is activate on the whole page"),this.doNotRefresh=!0,!1;if(Array.isArray(a)&&t&&-1!==a.indexOf(t))return Te("This adUnitCode is in the ADAGIO.doNotRefresh: ".concat(t)),this.doNotRefresh=!0,!1;this.refreshStarted=!0,Te("Trying to refresh adUnitCode: "+t+" at "+i.continuousCounter+" with conf: ",this.refreshConfig),function(e){var t=e.adUnitCode,n=e.adUnitElementId,i=e.refreshConfig,a=e.currentPrintNumber,r=new CustomEvent("adagio.refresh.onBeforeRefresh",{detail:{adUnitCode:t,adUnitElementId:n,refreshConfig:i,currentPrintNumber:a},cancelable:!0});Ce().document.dispatchEvent(r)?"dfp"===i.adServer?tt(e,it,at):"sas"===i.adServer?nt(e,it):Te("No refresher has been defined"):Te("Refresh is handled by the publisher itself")}({adUnitCode:t,adUnitElementId:this.adUnitElementId,refreshConfig:this.refreshConfig,currentPrintNumber:n})}}else Te("No adUnitCode to start refresh for this adUnit: ".concat(t))}},{key:"updateExposureDuration",value:function(e,t){t=t||"adagio";var n=this.viewability[t];if(!n.lastUpdateTs)return 0;var i=e-n.lastUpdateTs;n.exposureDuration+=i,n.continuousCounter+=i}},{key:"resetPreViewability",value:function(e){e=e||"adagio";var t=this.viewability[e];t.lastUpdateTs=!1,t.visible||(t.continuousCounter=0),this.w.document.dispatchEvent(new CustomEvent("adagio.measure.onResetPreViewability",{detail:{measure:this}}))}},{key:"getFeatures",value:function(e){var t;return(t=this.featuresManager.get(e))?Te("Freezed features(v".concat(t.version,") for ").concat(e," from adagioBidAdapter:"),t.features):Te("No features found for ".concat(e)),t}},{key:"sendThrottledBeacon",value:function(){var e=this.beaconsQueue.pop();this.resetThrottledBeacon(),e&&(e.throttled=!0,this.sendBeacon(e))}},{key:"resetThrottledBeacon",value:function(){this.beaconsQueue=[],this.beaconsPending=!1}},{key:"sendBeacon",value:function(e){var t=this,n=this,i=(e=e||{}).events||[];return!!this.navigationFeatures&&(!!this.navigationFeatures.allowBeaconSending("avw")&&(this.throttleBeacons&&-1!==["start","reset","vsbl","vsbl_actvw"].indexOf(e.becauseOf)&&!e.throttled?this.beaconsPending?void this.beaconsQueue.push(e):(this.beaconsPending=!0,this.beaconsQueue.push(e),void setTimeout(this.sendThrottledBeacon.bind(this),3e3)):void Qe({collector:"avw",data:function(){e=e||{};var i=Date.now(),a=ze(),r=0;try{r=(new Date).getTimezoneOffset()}catch(e){}var s=[];n.prebidAdUnitConfig&&Array.isArray(n.prebidAdUnitConfig.sizes)&&n.prebidAdUnitConfig.sizes.map((function(e){return s.push(e.join("x"))}));var o={pv_id:t.w.ADAGIO&&t.w.ADAGIO.pageviewId?t.w.ADAGIO.pageviewId:"",adu_el_id:n.adUnitElementId,v:n.beaconVersion++,tz_off:r,evt:e.becauseOf||"",js_late:t.w.ADAGIO&&!0===t.w.ADAGIO.late?1:0,js_ts:t.w._ADAGIO&&t.w._ADAGIO.adagioStartTime?t.w._ADAGIO.adagioStartTime:"",size:n.element.size,pbjs_sizes:s.join(","),is_pbjs_size:!0===n.element.hasPbjsDimensions?1:0,is_iab_size:!0===n.element.hasIABDimensions?1:0,msrbl:!0===n.measurable?1:0,adu_exp:n.viewability.adagio.exposureDuration,pg_durat:a?i-a:0,pg_paused:n.pageVisibility.computedDuration,pg_exp:a?i-a-n.pageVisibility.computedDuration:0,vsbl:!0===n.viewability.adagio.visible?1:0,adsrv_vsbl:!0===n.viewability.adserver.visible?1:0,adsrv_att_delta:n.viewability.adserver.exposureDelta,clk_time:null!=n.viewability.adagio.exposureDurationOnClick?n.viewability.adagio.exposureDurationOnClick:"",reset:n.resetCounter,adsrv_adu_exp:n.viewability.adserver.exposureDuration,navs_ts:null!=n.navigationStart?n.navigationStart:"",trgr_ts:null!=n.ts?parseInt(n.ts,10):"",init_ts:n.initTime,start_ts:n.startTime,reset_ts:null!=n.resetTime?n.resetTime:"",vsbl_ts:null!=n.viewability.adagio.viewableSince?n.viewability.adagio.viewableSince:"",adsrv_vsbl_ts:null!=n.viewability.adserver.viewableSince?n.viewability.adserver.viewableSince:"",auct_id:n.auctionId?n.auctionId:""},d={};for(var u in n.params){if(Object.prototype.hasOwnProperty.call(ot,u))d[ot[u]]=n.params[u]?n.params[u]:""}var c={featv:n.featuresVersion};for(var l in n.features){if(Object.prototype.hasOwnProperty.call(st,l))c[st[l]]=n.features[l];else c[l]=n.features[l]}c.pn||(c.pn=1);var f={sess_lngth:t.navigationFeatures.sessionLength,avg_sess_lngth:t.navigationFeatures.avgSessionLength,sess_cnt:t.navigationFeatures.totalSessions,rfr_fqdn:t.navigationFeatures.referrerFQDN,prv_pgtyp:t.navigationFeatures.previousPagetype},v={};for(var h in n.options){if(Object.prototype.hasOwnProperty.call(dt,h))v[dt[h]]=n.options[h]?n.options[h]:""}return Object.assign(o,c,f,d,v),n.element.reasonNotMeasurable,o},events:i})))}}])}(),lt=new RegExp(/(^adagio$|[_-]adagio$|^adagio[_-])/i),ft=new RegExp(/^[a-zA-Z0-9-_]{1,50}$/),vt=new RegExp(/^[0-9]{4}$/),ht=function(e){return lt.test(e)},pt=function(e){var t=e||{},n=t.organizationId,i=t.site;return!(!vt.test(n)||!ft.test(i))},gt=function(e,t){var n=!1;if(e&&e.length){var i=e.filter((function(e){return e.code===t}));i.length&&(n=i[0])}return n},mt=function(){var e=Ce();if(!e)return[];e.ADAGIO=e.ADAGIO||{};var t=void 0,n=function(e){t=Array.isArray(t)?t.concat(e):e};e.ADAGIO.pbjsAdUnits&&(t=e.ADAGIO.pbjsAdUnits),e.ADAGIO.rtbpbjsAdUnits&&n(e.ADAGIO.rtbpbjsAdUnits),e.ADAGIO.pbjsWtgAdUnits&&n(e.ADAGIO.pbjsWtgAdUnits);var i=Pe();return t.forEach((function(e){try{e.bids[0].params.environment||(e.bids[0].params.environment=i)}catch(e){je(e)}})),t},bt={AUCTION_INIT:"auctionInit",AUCTION_END:"auctionEnd",BID_ADJUSTMENT:"bidAdjustment",BID_TIMEOUT:"bidTimeout",BID_REQUESTED:"bidRequested",BID_RESPONSE:"bidResponse",BID_WON:"bidWon",BIDDER_DONE:"bidderDone",SET_TARGETING:"setTargeting",NO_BID:"noBid",REQUEST_BIDS:"requestBids",ADD_AD_UNITS:"addAdUnits",AD_RENDER_FAILED:"adRenderFailed"},yt={code:"",bidder_ttr:"",no_bid:"",responses:[],timeout:""},At={cpm:"",cpm_adjst_rate:"",net_rev:"",cur:"",cur_rate:"",ttr:"",sts:"",w:"",h:"",deal:"",crea_id:"",mt:"",won:""},It=function(){return o((function e(t){var n=t.adUnit;r(this,e);var i=n.code,a=n.auctionId;if(!i)throw new Error("`code` property must be provided");if(!a)throw new Error("`auctionId` property must be provided");this.code=i,this.auctionId=a,this.amts="",this.asizes="",this.referrer="",this._dirty=!0,this._mediaTypes={},this.bidders=[],this.events=[]}),[{key:"isDirty",value:function(){return!!this._dirty}},{key:"setDirty",value:function(e){this._dirty=!!e}},{key:"get",value:function(e){return this[e]}},{key:"set",value:function(e,t){this[e]=t,this.setDirty(!0)}},{key:"getBidders",value:function(){return this.bidders||[]}},{key:"getBidder",value:function(e){return this.getBidders().find((function(t){return t.code===e}))}},{key:"setBidder",value:function(e,t){var i=this.getBidder(e);if(i||(i=n(n({},yt),{},{code:e,responses:[]}),this.bidders.push(i)),t||(t={}),t.adId)if(Array.isArray(i.responses)||(i.responses=[]),i.responses.length){var a=!!t.adId&&t.adId,r=i.responses.find((function(e){return e.adId===a}));r?this.assignProperties(r,t):i.responses.push(this.assignProperties(n({},At),t))}else i.responses.push(this.assignProperties(n({},At),t));else this.assignProperties(i,t);this.setDirty(!0)}},{key:"assignProperties",value:function(e,t){return Object.keys(t).filter((function(e){return"code"!==e})).forEach((function(n){e[n]=t[n]})),e}}])}(),wt=Ce();wt.ADAGIO=wt.ADAGIO||{};var _t=Le();function Ot(e,t,n){return e.map((function(e){var i=e[t];return"function"==typeof n&&(i=n(i)),"string"==typeof i&&(i=i.replace(/,/,"_comma_")),i})).join(",")}var Dt=function(){return o((function e(t){var n,i,a,s,o,d=t.auctionId;r(this,e),this.auctionId=d,this.partid=(n=new Date,i=n.getUTCDate(),a=n.getUTCMonth()+1,s=n.getUTCFullYear(),o=n.getUTCHours(),i<10&&(i="0"+i),a<10&&(a="0"+a),o<10&&(o="0"+o),s+a+i+o),this.auctionStart=-1,this.auctionEnd=-1,this.adUnits=[],this.beaconVersion=0,this.pageviewId=wt.ADAGIO.pageviewId||"",this.navigationFeatures=new Ve}),[{key:"getOrAddAdunit",value:function(e,t){if(!e)return!1;var i=this.adUnits.find((function(t){return t.code===e}));if(void 0===i){try{i=new It({adUnit:{code:e,auctionId:this.auctionId}}),t&&"function"==typeof t&&t(i),this.adUnits.push(i)}catch(e){je(e)}wt.ADAGIO.adUnits=wt.ADAGIO.adUnits||{};var a=wt.ADAGIO.adUnits[e]||{};a.prebidAuctionId=this.auctionId,a.pageviewId=this.pageviewId,wt.ADAGIO.adUnits[e]=n({},a)}return i}},{key:"setAuctionStart",value:function(e){-1===this.auctionStart&&(this.auctionStart=e)}},{key:"setAuctionEnd",value:function(e){-1===this.auctionEnd&&(this.auctionEnd=e)}},{key:"sendAfterPrebidAuction",value:function(e){var t=this;e&&-1!==t.auctionStart&&setTimeout((function(){t.send("pbtimeout3")}),e+3e3)}},{key:"send",value:function(e,t){if(!this.adUnits||!this.adUnits.length)return!1;var i=this.adUnits.map((function(e){return e.get("org_id")})),a=!1;if(["3598-www-larousse-fr","80541-coinweek-com","15771-dafont-com"].includes(this.adUnits[0].site)&&(a=1),-1===i.indexOf("1101")&&!this.navigationFeatures.allowBeaconSending("bids",a))return!1;var r=this,s=Date.now();this.beaconVersion++,this.adUnits.forEach((function(i){if((!t||t===i.get("code"))&&(i.getBidders().find((function(e){return ht(e.code)}))&&i.isDirty())){if(!pt({organizationId:i.get("org_id"),site:i.get("site")}))return je('bids: invalid "site" or "organizationId" in Prebid.js params'),!1;Qe({collector:"bids",data:function(){var t={ts:s,evt:e,pv_id:r.pageviewId,adu_code:i.get("code"),amts:i.get("amts"),asizes:i.get("asizes"),url:i.get("referrer"),auct_id:r.auctionId,auct_start:r.auctionStart,auct_end:r.auctionEnd,v:r.beaconVersion,js_late:wt.ADAGIO&&!0===wt.ADAGIO.late?1:0,js_ts:wt._ADAGIO&&wt._ADAGIO.adagioStartTime?wt._ADAGIO.adagioStartTime:"",navs_ts:null!=_t?_t:"",partid:r.partid},a=i.getBidders().map((function(e){var t;return t=e.responses.length&&e.responses.length>1?e.responses.reduce((function(e,t){return 1===t.won?t:1===e.won?e:e.cpm===t.cpm?e.ttr>t.ttr?t:e:e.cpmt.mt?n=1:e.mt0?"chrome":n.indexOf("firefox")>0?"firefox":n.indexOf("safari")>0?"safari":n.indexOf("opera")>0?"opera":n.indexOf("msie")>0||e.MSStream?"ie":"unknow"}var Lt=function(){return o((function e(){r(this,e),this._featuresByAdUnitElementId={},this.init()}),[{key:"init",value:function(){}},{key:"storeLegacy",value:function(e,t,n){if("object"!==a(t)||this.get(e)&&!n)return!1;this._featuresByAdUnitElementId[e]=t}},{key:"store",value:function(e,t){var i=e.adUnitCode,r=e.features,s=e.params;if(s.adUnitElementId){if("object"!==a(r)||this.get(s.adUnitElementId)&&!t)return je("Features cannot be set. data.features is not an object. adUnitCode: ".concat(i)),!1;var o="";Se()&&(o=Ce().location.href||"");var d,u,c=n(n({},r),{device:(u=Ce().navigator.userAgent,/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(u)?5:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(u)?4:2).toString(),os:(d=Ce().navigator.userAgent.toLowerCase(),d.indexOf("linux")>0?"linux":d.indexOf("mac")>0?"mac":d.indexOf("win")>0?"windows":""),browser:Rt(),url:o});this._featuresByAdUnitElementId[s.adUnitElementId]={version:"_",features:c}}else je("Features cannot be set. Missing adUnitElementId. adUnitCode: ".concat(i))}},{key:"get",value:function(e){return e?this._featuresByAdUnitElementId[e]:this._featuresByAdUnitElementId}}])}();var zt=[["rubicon","secure-assets.rubiconproject.com"],["pubmatic","ads.pubmatic.com"],["improvedigital","ice.360yield.com"],["onetag","onetag-sys.com"],["indexexchange","ssum-sec.casalemedia.com"],["richaudience","sync.richaudience.com"],["33across","ssc-cms.33across.com"],["appnexus","ib.adnxs.com"],["smart","ssbsync.smartadserver.com"],["adyoulike","visitor.omnitagjs.com"],["sovrn","ap.lijit.com"],["freewheel","ads.stickyadstv.com"],["openx","u.openx.net"],["openxpbs","u.openx.net"],["triplelift","eb2.3lift.com"],["eplanning","ads.us.e-planning.net"],["unruly","sync.1rx.io"]],Mt=[];e.adagioStartTime=Date.now();var Vt=function(e,t){var n=Ce(),i=new RegExp(/^(<\/iframe>)(?![<])$/i),a=new RegExp(/^()(?![<])$/i),r=n.document.getElementsByTagName("body")[0],s=i.test(e.html),o=a.test(e.html);return e.html&&(s||o)?(setTimeout((function(){r.insertAdjacentHTML("beforeend",e.html)}),t),!0):(Te("userSyncing: html markup is not valid to be added to the DOM."),!1)},Ft=function(e){var t=new Ue,n=Rt(),i=t.get("syncs")||{},a=u(zt);Ce().ADAGIO&&Ce().ADAGIO.bdrSyncs&&Ce().ADAGIO.bdrSyncs.length&&a.push.apply(a,u(Ce().ADAGIO.bdrSyncs));var r=Date.now(),s=0;e&&Array.isArray(e.user_syncs)&&e.user_syncs.forEach((function(e){var o=1e3*s;if("safari"===n){Te("userSyncing: enter in Safari mode");var d=function(e,t){var n=new RegExp(/src=["'](https?:\/\/[^'"]+)["']/),i=e.match(n);i[1]||je("userSyncing: unable to find src in markup");var a=Re(i[1]);return t.filter((function(e){return e[1]===a.hostname}))}(e.html,a);if(!d||!d.length)return void je("userSyncing: no bidder found",e.html);d.forEach((function(n){var a=n[0];if(Object.prototype.hasOwnProperty.call(i,a)){var d=i[a];r>=d+216e5&&Vt(e,o)&&(i[a]=r,t.store("syncs",i),s++)}else Vt(e,o)&&(i[a]=r,t.store("syncs",i),s++)}))}else Vt(e,o),s++}))},qt=function(e,t,n,i,a){var r=mt(),s=e.options||{};if(e.adUnitCode&&r){var o=Ce(),d=o.ADAGIO.adUnits&&o.ADAGIO.adUnits[e.adUnitCode]&&o.ADAGIO.adUnits[e.adUnitCode].auctionId;if(!d)return je("Cannot start measurer.","".concat(e.adUnitCode,": no auctionId config found in window.ADAGIO.adUnits")),!1;if(o.ADAGIO.adUnits[e.adUnitCode].pageviewId!==o.ADAGIO.pageviewId)return je("Cannot start measurer.","".concat(e.adUnitCode,": non consistent pageviewId for window.ADAGIO.adUnits")),!1;if(i.has(e.adUnitCode,d))return je("Cannot start measurer.","".concat(e.adUnitCode,": a measurer is already registred for current auction ").concat(d)),i.get(e.adUnitCode).stop(),i.remove(e.adUnitCode),!1;var u=i.get(e.adUnitCode);if(u&&u.auctionId!==d&&(u.stop(),i.remove(e.adUnitCode)),!u&&e.adUnitElementId){var c=i.getByAdUnitElementId(e.adUnitElementId);c&&c.map((function(e){var t=i.get(e);t&&(t.stop(),i.remove(e))}))}var l=function(e,t){var n=gt(e,t),i=!1;if(n){var a=n.bids.filter((function(e){return ht(e.bidder)}));a.length&&(i=a[0])}return i}(r,e.adUnitCode);if(!l)return je("Cannot start measurer.","".concat(e.adUnitCode,": adagio bidder has not been set (see prebid.js)")),!1;var f=function(e){if(!e||!e.params||!e.params.adUnitElementId)return!1;var t=e.params;return{adUnitElementId:t.adUnitElementId,category:t.category||"",environment:t.environment||"",organizationId:t.organizationId||"",pagetype:t.pagetype||"",placement:t.placement||"",site:t.site||"",size:t.size||"",subcategory:t.subcategory||"",postBid:t.postBid||!1}}(l);if(!f)return je("Cannot start measurer.","".concat(e.adUnitCode,": no params. Mainly due to lack of adUnitElementId in Adagio bidder params")),!1;if(f=Object.assign({},f,{adUnitCode:e.adUnitCode}),!pt(f))return je("Cannot start measurer.","".concat(e.adUnitCode,': invalid "site" or "organizationId" in Prebid.js params')),!1;var v=gt(r,e.adUnitCode);f.organizationId&&f.site&&(s.refresh=Mt.find((function(t){return t.adUnitCode==e.adUnitCode}))),s.refresh&&(s.adsrv?s.refresh.adServer=s.adsrv:je("Cannot detect adserver.")),v&&(s.adUnitConfig=v),t&&(s._window=t);var h=f.adUnitElementId;new ct({ts:e.ts,adUnitElementId:h,auctionId:d,params:f,options:s,featuresManager:n,measurersManager:i,navigationFeatures:a})}else je("Cannot start measurer.",{msg:"no adUnitCode or adUnitsArray"})},Ht=function(e,t,n,i,r){var s=t.adsrv,o=t.action,d=t.eventName,u=t.afterOptions;if(e.action!==o||!e.data.eventName)return!1;if(e.data.eventName===d){var c=e.data.args.elementId,l=mt();if(!l)return void Te("".concat(s,": Could not find ADAGIO.pbjsAdUnits or pbjs.adUnits before starting a measurer for ").concat(c));var f=l.filter((function(e){return e.bids.filter((function(e){return ht(e.bidder)&&e.params.adUnitElementId===c}))[0]}));if(!f||!f.length)return void Te("".concat(s,": Could not find adUnitCode from adUnitElementId ").concat(c));f=f.pop().code,Te("Start a measurer from ".concat(s,".").concat(d," event for adUnitCode ").concat(f,". Delay from queued: ").concat(Date.now()-e.ts));var v={adsrv:s,adsrv_crea_id:e.data.args.creativeId,adsrv_empty:!0===e.data.args.isEmpty?"1":"0",adsrv_size:function(e){if(Array.isArray(e)){var t=["string","number"];if(2===e.length&&(t.indexOf(a(e[0]))>0||t.indexOf(a(e[1]))>0))return e.join("x")}if("string"==typeof e&&new RegExp(/^\d{1,4}x\d{1,4}$/).test(e))return e;return""}(e.data.args.creativeSize)};"function"==typeof u&&u(e,v),qt({ts:e.ts,adUnitCode:f,adUnitElementId:c,options:v},e.data._window,n,i,r)}},$t=function(t,i){var r=i.auctionsManager,s=i.navigationFeatures,o=i.adagioNavigation,d=i.featuresManager,u=i.measurersManager,c=Ce();if(c._ADAGIO=c._ADAGIO||{},ke()&&(c._ADAGIO.queueHistory=c._ADAGIO.queueHistory||[],c._ADAGIO.queueHistory.push(t),c._ADAGIO.queueHistory.length>100&&c._ADAGIO.queueHistory.shift()),"object"!==a(t)||!t.action)return!1;if("ssp-data"===t.action){!function(e){e&&(e.ssp_version||e.sspVersion)&&(Ce().ADAGIO.versions.ssp=e.ssp_version||e.sspVersion)}(t.data),function(e,t){try{if(e&&"number"==typeof e.vwSmplgNxt){var n=Ce();t.setSampling(n.ADAGIO.pageviewId,{vwSmplgNxt:e.vwSmplgNxt}),t.setVwSamplingNext(e.vwSmplgNxt)}}catch(e){Te(e)}}(t.data,o),Ft(t.data),function(e){if(!e||!e.refresh)return!1;var t=Ce();e.refresh.map((function(e){t.ADAGIO.adUnits&&t.ADAGIO.adUnits[e.adUnitCode]&&!t.ADAGIO.adUnits[e.adUnitCode].printNumber&&(t.ADAGIO.adUnits[e.adUnitCode].printNumber=1),void 0===e.adServer&&(e.timeToRefresh=1e3*e.timeToRefresh),Mt.push(e)}))}(t.data);var l=mt();if(l&&l.length&&Array.isArray(l[0].bids)){var f=l[0].bids.filter((function(e){return ht(e.bidder)}))[0];f&&f.params&&f.params.pagetype&&(s.pageType=f.params.pagetype)}}else if("features"===t.action)t.data.adUnitCode?d.store(t.data,!0):Object.keys(t.data).map((function(e){d.storeLegacy(e,t.data[e],!0)}));else if("store"===t.action){if(!t.data)return void Ne("store action called without ob.data");Te("store action called with data:",t.data);var v=t.data.bidderRequestsCount?t.data.bidderRequestsCount.toString():"1",h=t.data,p=h.organizationId,g=h.site,m=h.adUnitCode,b=h.ortb2,y=void 0===b?{}:b,A=h.ortb2Imp,I=void 0===A?{}:A,w=h.params,_=void 0===w?{}:w,O=h.mediaTypes,D=void 0===O?{}:O,E=h.localPbjs,U=h.localPbjsRef,S=y.adg_rtd||{},C=n(n(n({},S.features||{}),I.adg_rtd),{},{print_number:v});d.store({features:C,params:{adUnitElementId:I.divId},adUnitCode:t.data.adUnitCode},!0);var G=new Set,x=D.banner,k=D.video;x&&Array.isArray(x.sizes)&&x.sizes.length&&(Array.isArray(x.sizes[0])?x.sizes.forEach((function(e){return G.add(e)})):G.add([x.sizes])),k&&Array.isArray(k.playerSize)&&k.playerSize.length&&G.add(k.playerSize[0]);var j=c.ADAGIO.pbjsAdUnits.filter((function(e){return e.code!==t.data.adUnitCode}));j.push({code:m,mediaTypes:D,sizes:Array.from(G),bids:[{bidder:"adagio",params:{organizationId:p,site:g,pagetype:y.pagetype,category:y.category,placement:I.placement}}],auctionId:S.uid||_.adagioAuctionId,pageviewId:c.ADAGIO.pageviewId,printNumber:v,localPbjs:E,localPbjsRef:U}),c.ADAGIO.pbjsAdUnits=j,c.ADAGIO.adUnits[m]={auctionId:S.uid||_.adagioAuctionId,pageviewId:c.ADAGIO.pageviewId,printNumber:v}}else if("gpt-event"===t.action)!function(e,t,n,i){if("gpt-event"!==e.action||!e.data.eventName)return!1;var a=Ce();if("slotRenderEnded"===e.data.eventName){var r=e.data.args,s=r.advertiserId,o=r.campaignId,d=r.creativeId,u=r.isEmpty,c=r.lineItemId,l=r.size,f=r.slot,v=f.getSlotElementId(),h=mt();if(!h)return void Te("DFP: Could not find ADAGIO.pbjsAdUnits or pbjs.adUnits before starting a measurer for ".concat(v));var p=h.filter((function(e){return e.bids.filter((function(e){return ht(e.bidder)&&e.params.adUnitElementId===v}))[0]}));if(p.length>0){if(p[0].bids.length&&p[0].bids[0].params&&-1!==[1013,"1013",1026,"1026",1090,"1090"].indexOf(p[0].bids[0].params.organizationId))return void Te("DFP: by-pass due to organizationId exception");p=p[0].code}else{if(!(a.ADAGIO&&a.ADAGIO.pbjsAdUnits&&a.ADAGIO.pbjsAdUnits.length))return void Te("DFP: Cannot start measurer","Could not find adUnitCode from adUnitElementId: ".concat(v));var g=f.getAdUnitPath(),m=a.ADAGIO.pbjsAdUnits.find((function(e){return e.code===g||e.code===v}));if(!m)return void Te("DFP: Cannot start measurer","Could not find adUnitCode from adUnitElementId: ".concat(v));Te("DFP: auto-detect prebid adunit","update ADAGIO.pbjsAdUnit array with adUnitElementId: ".concat(v)),m.bids[0].params.adUnitElementId=v,p=m.code}Te("Start a measurer from gpt.slotRenderEnded event for ".concat(v,". Delay from queued: ").concat(Date.now()-e.ts)),qt({ts:e.ts,adUnitCode:p,options:{adsrv:"dfp",adsrv_advrt_id:s,adsrv_cmpgn_id:o,adsrv_crea_id:d,adsrv_empty:!0===u?"1":"0",adsrv_lnitem_id:c,adsrv_size:l&&"undefined"!==l.join?l.join("x"):""}},e.data._window,t,n,i)}"function"==typeof window.CustomEvent&&a.document.dispatchEvent(new CustomEvent("adagio.gpt."+e.data.eventName,{detail:e}))}(t,d,u,s);else if("adagio-hb-event"===t.action)Ht(t,{adsrv:"hbagency",action:"adagio-hb-event",eventName:"renderEvent"},d,u,s);else if("adagio-avs-render"===t.action)Ht(t,{adsrv:"thm",action:"adagio-avs-render",eventName:"renderEvent"},d,u,s);else if("adagio-my-adserver-events"===t.action)Ht(t,{adsrv:"default",action:"adagio-my-adserver-events",eventName:"renderEvent"},d,u,s);else if("splcznsci-event"===t.action)Ht(t,{adsrv:"splcznsci",action:"splcznsci-event",eventName:"renderEvent"},d,u,s);else if("adagio-creative-rendered"===t.action)Ht(t,{adsrv:"sovrn",action:"adagio-creative-rendered",eventName:"renderEvent"},d,u,s);else if("adagio-hbPROJECT-event"===t.action)Ht(t,{adsrv:"hbproject",action:"adagio-hbPROJECT-event",eventName:"renderEvent"},d,u,s);else if("skyboard-event"===t.action)Ht(t,{adsrv:"skyboard",action:"skyboard-event",eventName:"renderEvent"},d,u,s);else if("purpleads-events"===t.action)Ht(t,{adsrv:"purpleads",action:"purpleads-events",eventName:"renderEvent"},d,u,s);else if("sas-event"===t.action)!function(e,t,n,i){if("sas-event"!==e.action||!e.data.eventName)return!1;var a=Ce();if("noad"===e.data.eventName){var r=e.data.args.formatId,s=mt();if(!s)return void Te("SAS: Could not find ADAGIO.pbjsAdUnits or pbjs.adUnits before starting a measurer for ".concat(r));s.filter((function(t){return t.code===e.data.args.tagId})).length&&(r=e.data.args.tagId),r="number"==typeof r?r.toString():r,a.ADAGIO.adUnits&&a.ADAGIO.adUnits[r]&&(a.ADAGIO.adUnits[r].sasNoad=!0)}if("setHeaderBiddingWinner"===e.data.eventName){var o=e.data.args.formatId,d=mt();if(!d)return void Te("SAS: Could not find ADAGIO.pbjsAdUnits or pbjs.adUnits before starting a measurer for ".concat(o));if(d.filter((function(t){return t.code===e.data.args.tagId})).length)o=e.data.args.tagId;else{var u=d.find((function(t){return!(!t.bids||!t.bids.find((function(t){return e.data.args.tagId===t.params.adUnitElementId})))}));u&&(o=u.code)}o="number"==typeof o?o.toString():o;var c=!1;a.ADAGIO.adUnits&&a.ADAGIO.adUnits[o]&&a.ADAGIO.adUnits[o].sasNoad&&(c=!!a.ADAGIO.adUnits[o].sasNoad,delete a.ADAGIO.adUnits[o].sasNoad),Te("Start a measurer from SAS","".concat(e.data.eventName," event for ").concat(o,". Delay from queued: ").concat(Date.now()-e.ts)),qt({ts:e.ts,adUnitCode:o,options:{adsrv:"sas",adsrv_empty:c?"1":"0"}},e.data._window,t,n,i)}"function"==typeof window.CustomEvent&&a.document.dispatchEvent(new CustomEvent("adagio.sas."+e.data.eventName,{detail:e}))}(t,d,u,s);else if("ast-event"===t.action)!function(e,t,n,i){if("ast-event"!==e.action||!e.data.eventName)return!1;if("adLoaded"===e.data.eventName&&"banner"===e.data.args[0].adType){var a=e.data.args[0],r=a.targetId,s=a.creativeId,o=a.width,d=a.height,u=mt();if(!u)return void Te("AST: Could not find ADAGIO.pbjsAdUnits or pbjs.adUnits before starting a measurer for ".concat(r));var c=u.filter((function(e){return e.bids.filter((function(e){return ht(e.bidder)&&e.params.adUnitElementId===r}))[0]}));if(!c.length)return void Te("AST: Cannot start measurer","Could not find adUnitCode from adUnitElementId: ".concat(r));c=c[0].code,Te("Start a measurer from ast.asLoaded event for ".concat(r,". Delay from queued: ").concat(Date.now()-e.ts)),qt({ts:e.ts,adUnitCode:c,adUnitElementId:r,options:{adsrv:"ast",adsrv_crea_id:s,adsrv_empty:0,adsrv_size:"".concat(o,"x").concat(d)}},e.data._window,t,n,i)}}(t,d,u,s);else if("pb-analytics-event"===t.action)Tt(0,t.data.eventName,t.data.args,r);else if("reset"===t.action)!function(t){Te("Reset action called");var n=Ce(),i=t.get();for(var a in i){var r=i[a];r.stop(),t.remove(r.params.adUnitCode)}e.adagioStartTime=Date.now(),n.ADAGIO.pageviewId=Be()}(u);else if("session"===t.action){var N=t.data&&t.data.session?t.data.session:{},T=N.rnd,B=N.sessionId,P=N.new;try{o.startOrUpdate({rnd:T,sessionId:B,isNew:P}),o.setSampling(c.ADAGIO.pageviewId)}catch(e){Te(e)}}else je('queue: Unknown action "'.concat(t.action,'" in payload ').concat(t))};!function(){var e=Ce();try{var t=document.currentScript;t&&t.id&&t.id.startsWith("adagiojs-")&&(Te("remove adagioScript from localStorage"),e.localStorage.removeItem("adagioScript"))}catch(e){Ne(e)}try{!function(){var e=Ce();if(e.ADAGIO=e.ADAGIO||{},e.ADAGIO.cleanAdIsLoading=e.ADAGIO.cleanAdIsLoading||!1,e.ADAGIO.cleanAdIsLoaded=e.ADAGIO.cleanAdIsLoaded||!1,!e.ADAGIO.cleanAdIsLoading&&!e.ADAGIO.cleanAdIsLoaded){e.ADAGIO.cleanAdIsLoading=!0;var t=e.document.createElement("script");t.src="https://cadmus.script.ac/dahhc4ozyvjm6/script.js",t.async=!0,t.setAttribute("data-client-key","7d1ed67e-10ef-4c22-b165-710c6bfa1345"),t.setAttribute("data-api-integration-mode","prebid");var n=function n(){t.removeEventListener("load",n),e.document.head.contains(t)||(e.ADAGIO.cleanAdIsLoaded=!0,e.ADAGIO.cleanAdIsLoading=!1)};t.addEventListener("load",n),setTimeout((function(){e.ADAGIO.cleanAdIsLoaded||(t.removeEventListener("load",n),e.document.head.removeChild(t)),e.ADAGIO.cleanAdIsLoading=!1}),1e3),e.document.head.appendChild(t)}}()}catch(e){Ne(e)}e.ADAGIO&&!0===e.ADAGIO.hasRtd||function(){var e={GPT:{IMPRESSION_VIEWABLE:"impressionViewable",SLOT_ON_LOAD:"slotOnload",SLOT_RENDER_ENDED:"slotRenderEnded",SLOT_REQUESTED:"slotRequested",SLOT_RESPONSE_RECEIVED:"slotResponseReceived",SLOT_VISIBILITY_CHANGED:"slotVisibilityChanged"},SAS:{CALL:"call",CLEAN:"clean",BEFORE_RENDER:"beforeRender",CMP_ANSWERED:"CmpAnswered",CMP_CALLED:"CmpCalled",LOAD:"load",NOAD:"noad",RENDER:"render",RESET:"reset",AD:"ad",SET_HEADER_BIDDING_WINNER:"setHeaderBiddingWinner"},AST:{adRequested:"adRequested",adAvailable:"adAvailable",adBadRequest:"adBadRequest",adLoaded:"adLoaded",adNoBid:"adNoBid",adRequestFailure:"adRequestFailure",adError:"adError",adCollapse:"adCollapse"}},t=Ce();t.ADAGIO=t.ADAGIO||{},t.ADAGIO.windows=t.ADAGIO.windows||[];var n=window.self,i=t.ADAGIO.windows.find((function(e){return e.self===n}));i||(i={self:n},t.ADAGIO.windows.push(i));try{if(!0===i.gpt||"gpt"===i.adserver)return;n.googletag=n.googletag||{},n.googletag.cmd=n.googletag.cmd||[],n.googletag.cmd.push((function(){Object.keys(e.GPT).map((function(t){return e.GPT[t]})).forEach((function(e){n.googletag.pubads().addEventListener(e,(function(i){t.ADAGIO.queue.push({action:"gpt-event",data:{eventName:e,args:i,_window:n},ts:Date.now()})}))})),i.gpt=!0,i.adserver="gpt"}))}catch(e){}try{if(!0===i.sas||"sas"===i.adserver)return;n.sas=n.sas||{},n.sas.cmd=n.sas.cmd||[],n.sas.cmd.push((function(){Object.keys(e.SAS).map((function(t){return e.SAS[t]})).forEach((function(e){n.sas.events.on(e,(function(i){t.ADAGIO.queue.push({action:"sas-event",data:{eventName:e,args:i,_window:n},ts:Date.now()})}))})),i.sas=!0,i.adserver="sas"}))}catch(e){}try{if(!0===i.ast||"ast"===i.adserver)return;n.apntag=n.apntag||{},n.apntag.anq=n.apntag.anq||[],n.apntag.anq.push((function(){Object.keys(e.AST).map((function(t){return e.AST[t]})).forEach((function(e){n.apntag.onEvent(e,(function(){t.ADAGIO.queue.push({action:"ast-event",data:{eventName:e,args:arguments,_window:n},ts:Date.now()})}))})),i.ast=!0,i.adserver="ast"}))}catch(e){}}(),e.ADAGIO&&!0===e.ADAGIO.loaded?Te("adagio.js already loaded"):(!function(){Te("Initialize adagio.js");var e=Ce(),t=new Me,n=new Ve,i=new Lt,a=new Pt,r=new Gt(i).getInstance();for(e.ADAGIO=e.ADAGIO||{},e.ADAGIO.versions=e.ADAGIO.versions||{},e.ADAGIO.versions.adagiojs="2.0.6",e.ADAGIO.pageviewId=e.ADAGIO.pageviewId||Be(),e.ADAGIO.features=e.ADAGIO.features||i,e.ADAGIO.spl=e.ADAGIO.spl||{},e.ADAGIO.spl.avw=e.ADAGIO.spl.avw||!1,e.ADAGIO.spl.bids=e.ADAGIO.spl.bids||!1,e.ADAGIO.queue=e.ADAGIO.queue||[],e.ADAGIO.windows=e.ADAGIO.windows||[],e.document.addEventListener("adagio.measure.afterStart",(function(e){a.store(e.detail.measure)}));e.ADAGIO.queue.length;)$t(e.ADAGIO.queue.shift(),{auctionsManager:r,navigationFeatures:n,adagioNavigation:t,featuresManager:i,measurersManager:a});e.ADAGIO.queue.push=function(e){try{$t(e,{auctionsManager:r,navigationFeatures:n,adagioNavigation:t,featuresManager:i,measurersManager:a})}catch(t){Ne("process queue",e.action,t)}}}(),Te("adagio.js loaded: vers. ".concat("2.0.6")),e.ADAGIO.loaded=!0)}();var Wt=Ce()._ADAGIO&&Ce()._ADAGIO.queueHistory?Ce()._ADAGIO.queueHistory:[];return e.queueHistory=Wt,e}({});try{window.top.location.href?top._ADAGIO=_ADAGIO:window._ADAGIO=_ADAGIO}catch(e){} }