(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=new Map;function f(e){d.clear();for(let t of e)d.set(t.name,{adapter:t.adapter,registration:t.registration})}function p(e){d.set(e.name,{adapter:e.adapter,registration:e.registration})}function m(e){d.delete(e)}function h(e){return d.has(e)}function g(e,t,n){let r=[];for(let[,{adapter:i,registration:a}]of d){if(a.onlyWithConsent&&!t)continue;let o=t?a.consentAlias:a.noConsentAlias,s=i.buildBid(o,e,n);s!=null&&r.push(s)}return r}function _(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}var v=o((()=>{}));function y(e,t,n){_(e,t),t.set(e,n)}var ee=o((()=>{v()}));function b(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}var te=o((()=>{}));function x(e,t,n){return e.set(b(e,t),n),n}var ne=o((()=>{te()}));function S(e,t){return e.get(b(e,t))}var re=o((()=>{te()}));function ie(){le=!0}function ae(){le&&(se=window.innerWidth,ce=window.innerHeight,le=!1)}function oe(){return ae(),se}var se,ce,le,ue=o((()=>{se=0,le=!0,window.addEventListener(`resize`,ie,{passive:!0}),window.addEventListener(`orientationchange`,ie,{passive:!0})}));function de(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function fe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){de(a,r,i,o,s,`next`,e)}function s(e){de(a,r,i,o,s,`throw`,e)}o(void 0)})}}var pe=o((()=>{}));function me(e){return typeof e==`object`&&!!e}function he(){let e=oe();return e>=1025?Se.DESKTOP:e<1025&&e>=768?Se.TABLET:Se.MOBILE}function ge(){let e=he();return{isDesktop:e===Se.DESKTOP,isMobile:e===Se.MOBILE,isTablet:e===Se.TABLET}}function _e(){var e,t;if(navigator.userAgentData)return navigator.userAgentData.brands.some(e=>e.brand===`Chromium`||e.brand===`Google Chrome`);let n=!!window.chrome||`chrome`in window,r=typeof CSS<`u`&&((e=(t=CSS).supports)==null?void 0:e.call(t,`-webkit-app-region`,`drag`))||`queryLocalFonts`in window;return n||r}function ve(e){return!!new URLSearchParams(window.location.search).get(e)}function ye(e){return!!be(e)||ve(e)}function be(e){try{return window.localStorage.getItem(e)}catch(t){return console.error(`Error while getting ${e} from local storage`,t),null}}function xe(){let e=`direct`,t=document.referrer;if(!t)return e;try{let e=[`facebook.com`,`instagram.com`,`twitter.com`,`linkedin.com`,`reddit.com`,`tiktok.com`,`pinterest.com`,`tumblr.com`,`snapchat.com`,`weibo.com`,`wechat.com`,`t.co`],n=[`google.com`,`google.co.uk`,`google.de`,`google.fr`,`google.es`,`google.it`,`bing.com`,`yahoo.com`,`duckduckgo.com`,`baidu.com`,`yandex.com`,`yandex.ru`,`ecosia.org`,`startpage.com`],r=new URL(t).hostname.toLowerCase().replace(/^www\./,``),i=e=>r===e||r.endsWith(`.`+e);if(e.some(i))return`social`;if(n.some(i))return`organic`}catch(e){}return e}var Se,Ce=o((()=>{ue(),Se={DESKTOP:`desktop`,MOBILE:`mobile`,TABLET:`tablet`}}));function we(e){"@babel/helpers - typeof";return we=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},we(e)}var Te=o((()=>{}));function Ee(e,t){if(we(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(we(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var De=o((()=>{Te()}));function Oe(e){var t=Ee(e,`string`);return we(t)==`symbol`?t:t+``}var ke=o((()=>{Te(),De()}));function Ae(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var je=o((()=>{ke()}));function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t{je()}));Ce();function Ne(e){return e!=null&&(!Array.isArray(e)||e.length>0)}function Pe(e){if(Ne(e.override))return e.override;let t=e.getAdUnitSizes(e.divId);return Ne(t)?t:e.getAdUnitSizes(e.adUnitKey)}ee(),ne(),re(),w();var Fe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,Re=new WeakMap,ze=new WeakMap,Be=class{constructor(e){y(this,Fe,void 0),y(this,Ie,void 0),y(this,Le,void 0),y(this,Re,void 0),y(this,ze,void 0),x(Fe,this,e.logger),x(Ie,this,e.fullNameAd),x(Re,this,e.getAdUnitSizes),x(ze,this,e.videoLoaderConfig),x(Le,this,{device:e.device,deviceForSSP:e.deviceForSSP,domain:e.domain,fullNameAd:e.fullNameAd,pageCategory:e.pageCategory,pageType:e.pageType,placementPrefix:e.fullNameAd?e.fullNameAd:e.slug+`/`,sellerId:e.sellerId,slug:e.slug})}buildAdUnitDefinition(e){var t;let n=e.adUnitKey,r=(t=e.overridePrebidAdUnitCode)==null?n:t,i=e.divId,a=e.adUnitPath,o=e.customSizes,s=Pe({getAdUnitSizes:S(Re,this),divId:i,adUnitKey:n,override:o}).slice(),c=s.indexOf(`fluid`);c>-1&&s.splice(c,1);let l=s.filter(e=>Array.isArray(e)&&e.length===2);if(!Ne(l))throw Error(`No numeric sizes found for adUnitKey: ${n}, divId: ${i}`);let u;if(a!=null&&u==null)try{let e=a.lastIndexOf(`/`);u=a.substring(e+1)}catch(e){console.error(e)}let d={code:r,pubstack:{adUnitName:u||r,adUnitPath:a||S(Ie,this)+r},mediaTypes:{banner:{sizes:l}},ortb2Imp:{ext:{data:{divId:n,placement:S(Ie,this)+n}}},bids:[]};try{let t=C(C({},S(Le,this)),{},{sspParams:e.sspParams}),r=g(n,e.personalizedAds,t);for(let e of r)d.bids.push(e)}catch(e){S(Fe,this).error(e)}return S(Fe,this).debug(`Bid container for adUnit: ${n}`,d),d}buildVideoAdUnitDefinition(e,t,n){let r={code:e,ortb2Imp:{ext:{gpid:S(Le,this).fullNameAd+e,data:{divId:e,placement:S(Le,this).fullNameAd+e}}},mediaTypes:{video:{context:`instream`,playerSize:[640,480],mimes:[`application/javascript`,`application/vnd.apple.mpegurl`,`application/x-mpegurl`,`video/3gpp`,`video/mp4`,`video/mpeg`,`video/ogg`,`video/webm`,`video/x-m4v`,`video/ms-asf`,`video/x-ms-wmv`,`video/x-msvideo`],protocols:[2,3,5,6,7,8,11,12,13,14],boxingallowed:1,minduration:S(ze,this).minDuration,maxduration:S(ze,this).maxDuration,linearity:1,api:[1,2,7],playbackmethod:[1,2,3,4,5,6],startdelay:0,plcmt:t,skip:0,pos:1,delivery:[1,2]}},bids:[]};try{let t=g(e,n,S(Le,this));for(let e of t)r.bids.push(e)}catch(e){S(Fe,this).error(e)}return S(Fe,this).debug(`Video bid container for adUnit: ${e}`,r),r}};ee(),ne(),re();var Ve={useBaseGvlid:!0};function He(e,t){for(let n of t)if(n.bidderAliases)for(let t of n.bidderAliases)!t.onlyWithConsent&&!t.onlyWithoutConsent&&e.aliasBidder(t.baseBidder,t.alias,Ve);for(let n of t)if(n.bidderAliases)for(let t of n.bidderAliases)(t.onlyWithConsent||t.onlyWithoutConsent)&&(console.log(`Registering consent-conditional bidder alias: ${t.baseBidder} → ${t.alias}`),e.aliasBidder(t.baseBidder,t.alias,Ve));for(let r of t){if(r.registration.onlyWithConsent)continue;let{noConsentAlias:t,consentAlias:i}=r.registration;if(t!==i){var n;let a=(n=r.registration.noConsentAliasBaseBidder)==null?i:n;e.aliasBidder(a,t,Ve)}}}var Ue=new WeakMap,We=class{constructor(){y(this,Ue,{})}withBase(){return x(Ue,this,{standard:{storageAllowed:!0}}),this}withAdapterSettings(e,t){for(let n of e)n.bidderSettings&&(n.bidderSettings.cpmAdjustment&&(S(Ue,this)[n.bidderSettings.consentAlias]={bidCpmAdjustment:n.bidderSettings.cpmAdjustment}),!t&&n.bidderSettings.noConsentAlias&&n.bidderSettings.noConsentCpmAdjustment&&(S(Ue,this)[n.bidderSettings.noConsentAlias]={bidCpmAdjustment:n.bidderSettings.noConsentCpmAdjustment}));return this}build(){return S(Ue,this)}},Ge=`PREBID_NO_BIDS_CONFIGURED`,Ke=class extends Error{constructor(e){super(`No bids configured for ad unit ${e}`),this.code=Ge,this.name=`PrebidNoBidsConfiguredError`,this.adUnitKey=e}};function qe(e){return e.trim().toLowerCase().replace(/^([a-z][a-z0-9+.-]*:)?\/\//,``).split(/[/?#:]/)[0].replace(/^www\./,``).replace(/\.$/,``)}function Je(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):typeof e==`string`?[e]:[]}function Ye(e,t){for(let n of Je(e)){let e=qe(n);if(e===``)continue;let r=t.find(t=>e===t||e.endsWith(`.`+t));if(r!==void 0)return{domain:e,matchedEntry:r}}}function Xe(e,t){for(let n of e.flatMap(Je)){let e=n.trim().toUpperCase();if(e===``)continue;let r=t.find(t=>e===t||e.startsWith(t+`-`));if(r!==void 0)return{category:e,matchedEntry:r}}}function Ze(e,t){var n;let r=(n=e.meta)==null?{}:n,i=Ye(r.advertiserDomains,t.domains);if(i)return{matchedEntry:i.matchedEntry,reason:tt,value:i.domain};if((r.cattax==null?$e:Number(r.cattax))!==$e)return;let a=Xe([r.primaryCatId,r.secondaryCatIds],t.categories);if(a)return{matchedEntry:a.matchedEntry,reason:nt,value:a.category}}function Qe({getOrtb2:e,onReject:t}){let n,r,i={categories:[],domains:[]};return(a,o,s,c)=>{var l;let u=(l=e())==null?{}:l;(u.badv!==n||u.bcat!==r)&&(n=u.badv,r=u.bcat,i={categories:Je(u.bcat).map(e=>e.trim().toUpperCase()).filter(Boolean),domains:Je(u.badv).map(qe).filter(Boolean)});let d=Ze(s,i);if(d){t==null||t(s,d,o),c(d.reason);return}return a(o,s,c)}}var $e,et,tt,nt,rt=o((()=>{$e=1,et=`engineBidBlocklist`,tt=`Adv domain is not allowed`,nt=`Category is not allowed`})),it,at,ot=o((()=>{Ce(),at=class e{constructor({logKey:e,label:t}){this.isDebug=!1,this.label=`%cENGINE`,ye(e)&&(this.isDebug=!0),typeof t==`string`&&(this.label=`${this.label} ${t}`)}debug(t,...n){this.isDebug&&console.debug(this.label,e.logStyle,t,...n)}error(t,...n){console.trace(this.label,e.errorStyle,t,...n)}warn(t,...n){this.isDebug&&console.warn(this.label,e.warnStyle,t,...n)}},it=at,it.logStyle=`background: #43A047; padding: 2px 4px;`,it.errorStyle=`background: #E53935; padding: 2px 4px;`,it.warnStyle=`background: #FB8C00; padding: 2px 4px;`}));rt(),Ce(),ot(),ee(),ne(),w(),re();var st={TCF:`tcf`,USP:`usp`};function ct(){return{buckets:[{precision:2,max:2,increment:.01},{precision:2,max:5,increment:.02},{precision:2,max:10,increment:.1},{precision:2,max:20,increment:.25}]}}function lt(){return{buckets:[{precision:2,max:2,increment:.02},{precision:2,max:10,increment:.05},{precision:2,max:20,increment:.1},{precision:2,max:30,increment:.25},{precision:2,max:70,increment:1}]}}var ut=`888.it,888casino.it,admiralbet.it,bet365.com,bet365.it,betfair.it,betflag.it,betimatic.com,betimatic.it,betsson.it,bonusquote.it,bwin.it,comparazione-quote.it,confrontabonuscasino.it,domusbet.it,eurobet.it,eurobet.live,giocodigitale.it,goldbet.it,goldbet.live,guidagiochi.it,instantcasino.com,leovegas.it,lottomatica.it,lottomatica.sport,netbet.it,oddschecker.com,planetwin365.it,pokerstars.it,quotebonus.com,quotebonus.net,quotecomparatore.com,sisal.it,sisalfunclub.it,snai.it,sportitaliabet.it,stanleybet.it,starcasino.it,starvegas.it,unibet.it,williamhill.it`.split(`,`),dt=new at({logKey:`debug_pbjs`,label:`BID_BLOCKLIST`}),ft=new WeakMap,pt=new WeakMap,mt=class{constructor(){y(this,ft,{}),y(this,pt,{})}withBase({logPrebid:e,advertisersUrlBlocklist:t,iabCategoriesBlocklist:n,timeoutBuffer:r=400,sellerId:i,userSync:a}){let o=ct();x(pt,this,{amx:`USD`,appnexus:`USD`,pbserver:`USD`,ix:`USD`,ogury:`USD`,outbrain:`USD`,richaudience:`USD`,rtbhouse:`USD`,rubicon:`USD`,triplelift:`USD`});let s=[...new Set([...t==null?[]:t,...ut])];return s.length>50&&dt.warn(`badv has ${s.length} entries: sending the first 50 to bidders, enforcing all of them on bid responses`,{notSentToBidders:s.slice(50)}),x(ft,this,{debug:e,bidderSequence:`fixed`,enableSendAllBids:!1,targetingControls:{alwaysIncludeDeals:!0},enableTIDs:!0,auctionOptions:{yield:!0},ortb2:{bcat:[...new Set([`IAB7`,`IAB9-20`,`IAB11`,`IAB14-1`,`IAB15-1`,`IAB23`,`IAB25`,`IAB26`,...n||[]])],badv:s.slice(0,50),source:{schain:{ver:`1.0`,complete:1,nodes:[{asi:`talksmedia.it`,sid:i,hp:1}]}}},[et]:{badv:s},useBidCache:!0,eventHistoryTTL:120,minBidCacheTTL:60,minTargetedBidCacheTTL:300,cache:{url:`https://prebid-cache.pubtech.ai/cache`,ignoreBidderCacheKey:!0},instreamTracking:{enabled:!0,urlPattern:/(prebid-cache\.pubtech\.ai.*\/cache\.*)|(search\.spotxchange\.com\/ad\/vast\.html\?key=\.*)/},rubicon:{netRevenue:!1,singleRequest:!0},outbrain:{bidderUrl:`https://b1h.outbrain.com/api/bidder/prebid/bid/`,usersyncUrl:`https://b1sync.outbrain.com/usersync/prebid`},timeoutBuffer:r,userSync:C({syncDelay:3e3,syncsPerBidder:5,aliasSyncEnabled:!0,filterSettings:{image:{bidders:`*`,filter:`include`},iframe:{bidders:`*`,filter:`include`}},userIds:[{name:`unifiedId`,params:{partner:`slk72bj`},storage:{type:`cookie`,name:`pubtech-unifiedid`,expires:60}},{name:`pubCommonId`,storage:{type:`cookie`,name:`_pubCommonId`,expires:365,refreshInSeconds:604800}},{name:`criteo`},{name:`id5Id`,params:{partner:306},storage:{type:`html5`,name:`id5id`,expires:90,refreshInSeconds:8*3600}},{name:`amxId`,storage:{type:`html5`,name:`amxId`,expires:1}}]},a),priceGranularity:o,mediaTypePriceGranularity:{video:lt(),"video-outstream":o,banner:o,native:o},currency:{adServerCurrency:`EUR`,granularityMultiplier:1,conversionRateFile:`https://cdn.pubtech.ai/ssp/prebid/fixer.json`,bidderCurrencyDefault:S(pt,this),defaultRates:{USD:{EUR:.88}}},deviceAccess:!0}),this}withCustomGptSlotMatching(e){return e!=null&&Object.keys(e).length>0&&(S(ft,this).customGptSlotMatching=t=>n=>t.getSlotElementId()===n||t.getAdUnitPath()===n||e[t.getSlotElementId()]===n),this}withRealTimeData(e){return S(ft,this).realTimeData={dataProviders:[{name:`adagio`,params:{organizationId:`1098`,site:e}}]},this}withAdagioAnalytics(e,t){return window.IS_ADAGIO_ENABLED!==void 0&&e.enableAnalytics([{provider:`adagio`,options:{organizationId:`1098`,site:t}}]),this}withConsentManagement(e){return typeof e==`string`?(e===st.USP&&(S(ft,this).consentManagement={usp:{cmpApi:`iab`,timeout:15e3}}),e===st.TCF&&(S(ft,this).consentManagement={gdpr:{cmpApi:`iab`,allowAuctionWithoutConsent:!0,timeout:15e3,defaultGdprScope:!0}}),this):this}withFloors({customFloorModelGroups:e,customFloorModelVersion:t,customFloorValues:n,disableFloor:r,personalizedAds:i,refreshNumberCb:a}){if(!r){let r=`default_2`,o={"*|banner|*|*|*|true":.03,"*|banner|*|*|*|false":.02,"*|video|*|*|*|*":.8,"O_INTERSTITIAL|banner|*|chrome|*|true":.6,"O_INTERSTITIAL|banner|*|*|*|false":.1,"O_INTERSTITIAL|banner|*|notChrome|*|true":.6};typeof t==`string`&&t.trim()!==``&&(r=t),typeof n==`object`&&n&&(o=n);let s=()=>({fields:[`adUnitCode`,`mediaType`,`size`,`browserType`,`refreshNumber`,`personalizedAds`]}),c=e!=null&&e.length>0?{currency:`EUR`,floorsSchemaVersion:2,skipRate:10,modelGroups:e.map(({modelVersion:e,modelWeight:t,skipRate:n,values:r})=>C(C({modelVersion:e,modelWeight:t},n!=null&&{skipRate:n}),{},{schema:s(),values:C({},r)}))}:{currency:`EUR`,skipRate:10,modelVersion:r,schema:s(),values:o};S(ft,this).floors={enforcement:{floorDeals:!1,bidAdjustment:!0},data:c,additionalSchemaFields:{browserType:()=>_e()?`chrome`:`notChrome`,refreshNumber:e=>typeof a==`function`?a(e.adUnitCode):`0`,personalizedAds:()=>String(i)}}}return this}withPrebidServer(e){return e&&(S(ft,this).s2sConfig={accountId:e,enabled:!0,adapter:`prebidServer`,endpoint:`https://prebid-server.pbstck.com/openrtb2/auction`,syncEndpoint:`https://prebid-server.pbstck.com/cookie_sync`,bidders:[`pubstack_server`]}),this}withNoConsentCurrencies(){return S(pt,this).NoConsentAmx=`USD`,S(pt,this).NoConsentAppnexus=`USD`,S(pt,this).NoConsentPbserver=`USD`,S(pt,this).NoConsentIx=`USD`,S(pt,this).NoConsentOgury=`USD`,S(pt,this).NoConsentOutbrain=`USD`,S(pt,this).NoConsentRichaudience=`USD`,S(pt,this).NoConsentRubicon=`USD`,S(pt,this).NoConsentTriplelift=`USD`,this}build(){return S(ft,this)}};function ht(e,t){_(e,t),t.add(e)}var gt=o((()=>{v()}));Ce(),ue(),w(),gt(),ee(),ne(),re(),te();var _t=[1e3,3e3,8e3],vt=1e4,yt=new Set([`hidden`,`frozen`,`terminated`]);function bt(){if(!(typeof AbortSignal>`u`||typeof AbortSignal.timeout!=`function`))return AbortSignal.timeout(vt)}var xt=`prebid.org wrapper`;function St(e){let t={adIds:new Set,creativeIds:new Set,isPrebidCacheWrapper:!1};if(e==null||e.trim()===``)return t;let n=new DOMParser().parseFromString(e,`text/xml`);if(n.getElementsByTagName(`parsererror`).length>0)return t;let r=(e,t)=>{for(let i of Array.from(n.getElementsByTagName(e))){var r;let e=(r=i.getAttribute(`id`))==null?void 0:r.trim();e&&t.add(e)}};return r(`Ad`,t.adIds),r(`Creative`,t.creativeIds),t.isPrebidCacheWrapper=Array.from(n.getElementsByTagName(`AdSystem`)).some(e=>{var t;return((t=e.textContent)==null?void 0:t.trim())===xt}),t}function Ct(e,t){if(t.isPrebidCacheWrapper&&e.wrapperAdSystems.includes(xt))return!0;let n=[e.adId,...e.wrapperAdIds],r=[e.creativeId,...e.wrapperCreativeIds];return n.some(e=>e!=null&&t.adIds.has(e))||r.some(e=>e!=null&&t.creativeIds.has(e))}var wt=[`modelGroups`,`modelWeight`,`modelWeightSum`,`noFloorSignalBidders`];function Tt(e,t){var n;let r=e==null?void 0:e.data;if(r==null)return null;if(r.floorsSchemaVersion!==2)return t==null||r.modelVersion===t?r:null;let i=(n=r.modelGroups)==null?void 0:n.find(e=>e.modelVersion===t);if(i==null)return null;let a=C(C({},r),i);for(let e of wt)delete a[e];return a.skipRate==null&&(a.skipRate=typeof(e==null?void 0:e.skipRate)==`number`?e.skipRate:0),a}var Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakSet,It=class{constructor(e){ht(this,Ft),y(this,Et,void 0),y(this,Dt,void 0),y(this,Ot,void 0),y(this,kt,void 0),y(this,At,void 0),y(this,jt,void 0),y(this,Mt,new Map),y(this,Nt,void 0),y(this,Pt,{dr:document.referrer,path:window.location.pathname,source:xe(),version:`0.10.0`,width:oe()}),x(Et,this,e.contextManager),x(Dt,this,e.getPersonalizedAds),x(Ot,this,e.getRefreshCount),x(kt,this,e.isCachedBidReusable),x(At,this,e.logger),x(jt,this,e.pageLifecycleManager),x(Nt,this,e.websiteId),S(jt,this).on(`stateChange`,e=>{yt.has(e)&&b(Ft,this,Ut).call(this)})}attach(e){e.onEvent(`auctionEnd`,t=>{var n;let r=t.auctionId,i=Array.from(new Set((n=t.adUnitCodes)==null?[]:n)),a=i.length>1,o={data:null,enforcement:null,additionalSchemaFields:[]};try{var s;let n=e.getConfig(`floors`),i=(s=t.adUnits)==null||(s=s.flatMap(e=>{var t;return(t=e.bids)==null?[]:t}).find(e=>{var t;return((t=e.floorData)==null?void 0:t.modelVersion)!=null}))==null||(s=s.floorData)==null?void 0:s.modelVersion,a=Tt(n,i);a==null&&(n==null?void 0:n.data)!=null&&S(At,this).warn(`${r}: no configured floors model matches '${i}', sending no floor data`),o={data:a,enforcement:(n==null?void 0:n.enforcement)||null,additionalSchemaFields:Object.keys((n==null?void 0:n.additionalSchemaFields)||{})}}catch(e){S(At,this).warn(`${r}: error reading floors config for auction data`,e)}for(let n of i)try{var c,l,u,d,f,p,m;let i=[],s=[];for(let e of t.bidsReceived){if(e.adUnitCode!==n)continue;let t=b(Ft,this,zt).call(this,{bidderCode:e.bidderCode});s.push(t),i.push({cpm:e.cpm,floorData:e.floorData,size:e.size,ssp:t,time:e.timeToRespond,timedOut:!1})}for(let e of t.noBids){if(e.adUnitCode!==n)continue;let t=b(Ft,this,zt).call(this,{bidderCode:e.bidder});s.push(t),i.push({ssp:t,time:e.timeToRespond,timedOut:!1})}for(let e of t.bidderRequests){var h;if(!((h=e.bids)!=null&&h.some(e=>e.adUnitCode===n)))continue;let t=b(Ft,this,zt).call(this,{bidderCode:e.bidderCode});s.includes(t)||i.push({ssp:t,timedOut:!0})}try{let t=e.getBidResponsesForAdUnitCode(n).bids;for(let e of t)e.auctionId===r||!S(kt,this).call(this,e)||i.push({cached:!0,cpm:e.cpm,size:e.size,ssp:b(Ft,this,zt).call(this,{bidderCode:e.bidderCode}),timedOut:!1})}catch(e){S(At,this).warn(`${n}: error reading cached bids for auction data`,e)}let g=(c=t.adUnits)==null?void 0:c.find(e=>e.code===n),_=g==null||(l=g.bids)==null||(l=l.find(e=>e.floorData!=null))==null?void 0:l.floorData,v={adunit:n,timestamp:t.auctionEnd,auctionId:r,bidRequests:i,dr:S(Pt,this).dr,floorConfig:o,path:S(Pt,this).path,sm:`openmarket`,source:S(Pt,this).source,type:`auction`,version:S(Pt,this).version,wId:S(Nt,this),width:S(Pt,this).width,metadata:{isBatchSelling:a,personalizedAds:S(Dt,this).call(this),refreshNumber:S(Ot,this).call(this,n),sizes:(u=(d=g==null||(f=g.mediaTypes)==null||(f=f.banner)==null?void 0:f.sizes)==null?g==null||(p=g.mediaTypes)==null||(p=p.video)==null?void 0:p.playerSize:d)==null?[]:u,browserType:_e()?`chrome`:`notChrome`,floorSkipped:(_==null?void 0:_.skipped)===!0,floorSkippedReason:(m=_==null?void 0:_.skippedReason)==null?null:m}};b(Ft,this,Bt).call(this,{data:v})}catch(e){S(At,this).warn(`${n}: error sending auction data`,e)}});let t=new Set;e.onEvent(`bidWon`,e=>{let n=e.adUnitCode;if(e.adId!=null&&t.has(e.adId))return;let r=null,i=null,a=[];try{let e=S(Et,this).getCurrentContext();r=e.author,i=e.pageType,a=b(Ft,this,Rt).call(this,e.customTargeting)}catch(e){S(At,this).warn(`${n}: error reading the context for impression data`,e)}try{let o={adunit:n,timestamp:Date.now(),auctionId:e.latestTargetedAuctionId||e.auctionId,author:r,categories:a,cpm:e.cpm,dr:S(Pt,this).dr,generatedAuctionId:e.auctionId,netRevenue:e.netRevenue,path:S(Pt,this).path,pTitle:document.title,pType:i,size:e.size,sm:`openmarket`,source:S(Pt,this).source,ssp:b(Ft,this,zt).call(this,{bidderCode:e.bidder}),type:`impression`,version:S(Pt,this).version,wId:S(Nt,this),width:S(Pt,this).width};b(Ft,this,Bt).call(this,{data:o}),e.adId!=null&&t.add(e.adId)}catch(e){S(At,this).warn(`${n}: error sending impression data`,e)}})}createVideoImpressionReporter(e,t){let n=!1,r;return i=>{if(!n){if(r!=null||(r=St(e.vastXml)),!Ct(i,r)){t.debug(`${e.adUnitCode}: the impression is not from the Prebid bid's VAST, not reporting it`,{bidAdIds:[...r.adIds],bidCreativeIds:[...r.creativeIds],impression:i});return}n=!0,b(Ft,this,Lt).call(this,e)}}}};function Lt(e){let t=e.adUnitCode,n=e.bidder,r=e.latestTargetedAuctionId||e.auctionId;try{let i=S(Et,this).getCurrentContext(),a=b(Ft,this,Rt).call(this,i.customTargeting),o={timestamp:Date.now(),adunit:t,auctionId:r,author:i.author,categories:a,cpm:e.cpm,dr:S(Pt,this).dr,generatedAuctionId:e.auctionId,netRevenue:e.netRevenue,path:S(Pt,this).path,pTitle:document.title,pType:i.pageType,size:e.size,sm:`openmarket`,source:S(Pt,this).source,ssp:b(Ft,this,zt).call(this,{bidderCode:n}),type:`impression`,version:S(Pt,this).version,wId:S(Nt,this),width:S(Pt,this).width,metadata:{trigger:`ima_impression`}};b(Ft,this,Bt).call(this,{data:o})}catch(e){S(At,this).warn(`${t}: error sending video impression data`,e)}}function Rt(e){let t=[e.article_section,e.article_tag],n=new Set;for(let e of t)if(!(e==null||e.trim()===``))for(let t of e.split(`,`)){let e=t.trim();e!==``&&n.add(e)}return Array.from(n)}function zt({bidderCode:e}){switch(e){case`freewheelssp`:return`freewheel`;case`ix`:return`indexexchange`;case`pubstack_server`:return`pubstack`;case`smartadserver`:return`smart`;default:return e}}function Bt({data:e}){let t=String(e.adunit),{type:n}=e,r=[`https://producer-ovh-node01.intelligence.pubtech.ai:8443/ad-data-raw/process?type=${e.type}`];for(let i of r)S(At,this).debug(`${t}: sending ${n} data`,e),b(Ft,this,Vt).call(this,{adunit:t,attempt:0,endpoint:i,payload:JSON.stringify(e),type:n})}function Vt(e){let{adunit:t,type:n}=e,r=r=>{r>=500?b(Ft,this,Ht).call(this,e,`status ${r}`):(r<200||r>=300)&&S(At,this).warn(`${t}: ${n} data rejected with status ${r}`)},i=()=>{b(Ft,this,Ht).call(this,e,`request failed`)};try{if(typeof fetch==`function`){fetch(e.endpoint,{body:e.payload,credentials:`omit`,keepalive:!0,method:`POST`,signal:bt()}).then(e=>r(e.status),i);return}let t=new XMLHttpRequest;t.open(`POST`,e.endpoint),t.timeout=vt,t.onload=()=>r(t.status),t.onerror=i,t.ontimeout=i,t.send(e.payload)}catch(e){S(At,this).warn(`${t}: error sending ${n} data`,e)}}function Ht(e,t){let{adunit:n,attempt:r,type:i}=e;if(r>=_t.length){S(At,this).warn(`${n}: ${i} data dropped after ${r+1} attempts (${t})`);return}S(At,this).debug(`${n}: ${i} data failed (${t}), retrying`);let a=C(C({},e),{},{attempt:r+1}),o=setTimeout(()=>{S(Mt,this).delete(a),b(Ft,this,Vt).call(this,a)},_t[r]*(.5+Math.random()));S(Mt,this).set(a,o),yt.has(S(jt,this).getState())&&b(Ft,this,Ut).call(this)}function Ut(){for(let[e,t]of S(Mt,this)){clearTimeout(t);let{adunit:n,type:r}=e;try{typeof navigator.sendBeacon==`function`&&navigator.sendBeacon(e.endpoint,e.payload)||S(At,this).warn(`${n}: ${r} data dropped, the beacon could not be queued`)}catch(e){S(At,this).warn(`${n}: error sending ${r} data via beacon`,e)}}S(Mt,this).clear()}var Wt=`slot:onLoad`,Gt=`slot:renderEnded`,Kt=`slot:responseReceived`;Ce(),w(),gt(),ee(),re(),ne(),te(),pe();function qt(e){return t=>new ln(C(C({},e),t))}var Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,$t=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,rn=new WeakMap,an=new WeakMap,on=new WeakMap,sn=new WeakMap,cn=new WeakSet,ln=class{constructor(e){var t;if(ht(this,cn),y(this,Jt,void 0),y(this,Yt,new Map),y(this,Xt,void 0),y(this,Zt,new Map),y(this,Qt,new Map),y(this,$t,void 0),y(this,en,void 0),y(this,tn,void 0),y(this,nn,void 0),y(this,rn,void 0),y(this,an,void 0),y(this,on,new Map),y(this,sn,e=>{var t;return e==null||e.trim()===``?`0`:String((t=S(on,this).get(e))==null?0:t)}),!e.sellerId)throw Error(`PrebidAdapter: sellerId must be provided`);x(Xt,this,e.eventDispatcher),x($t,this,{customFloorModelGroups:e.customFloorModelGroups,customFloorModelVersion:e.customFloorModelVersion,customFloorValues:e.customFloorValues,disableFloor:e.disableFloor}),x(en,this,e.logger),x(an,this,e.personalizedAds),x(rn,this,e.sspAdapters),x(nn,this,new It({contextManager:e.contextManager,getPersonalizedAds:()=>S(an,this),getRefreshCount:e=>{var t;return(t=S(on,this).get(e))==null?0:t},isCachedBidReusable:e=>b(cn,this,un).call(this,e),logger:S(en,this),pageLifecycleManager:e.pageLifecycleManager,websiteId:e.websiteId})),f(S(rn,this)),x(Jt,this,new Be({device:e.device,deviceForSSP:e.deviceForSSP,domain:e.domain,fullNameAd:e.fullNameAd,getAdUnitSizes:e.sizeMappingRegistry.getAdUnitSizes,logger:S(en,this),pageCategory:e.pageCategory,pageType:e.pageType,sellerId:e.sellerId,slug:e.websiteSlug,videoLoaderConfig:(t=e.videoLoaderConfig)==null?{maxDuration:30,minDuration:1}:t})),x(tn,this,e.instance.then(t=>{He(t,S(rn,this));let n=ye(`debug_pbjs`),r=new mt().withBase(C(C({},e),{},{logPrebid:n})).withCustomGptSlotMatching(e.divIdToAdUnitKeyMapping).withRealTimeData(e.websiteSlug).withAdagioAnalytics(t,e.websiteSlug).withConsentManagement(e.consentManagementType).withFloors(C(C({},e),{},{personalizedAds:S(an,this),refreshNumberCb:S(sn,this)})).withPrebidServer(e.prebidServerAccountId).withNoConsentCurrencies().build();t.setConfig(C(C({},r),{},{bidCacheFilterFunction:e=>b(cn,this,un).call(this,e)})),t.bidderSettings=new We().withBase().withAdapterSettings(S(rn,this),S(an,this)).build(),e.consentReader&&e.consentReader.onConsentReleased({onConsentCallback:e=>{e.personalizedAds!==S(an,this)&&(x(an,this,e.personalizedAds),b(cn,this,hn).call(this,t,e.personalizedAds))}});try{b(cn,this,pn).call(this,t)}catch(e){S(en,this).warn(`Failed to track the floors outcome of the auctions`,e instanceof Error?e.message:String(e))}try{S(nn,this).attach(t)}catch(e){S(en,this).warn(`Failed to initialize real time bidding analytics`,e instanceof Error?e.message:String(e))}return t.processQueue(),t}))}removeAdUnit(e){S(Yt,this).set(e,Date.now()),S(Qt,this).delete(e),S(on,this).delete(e),S(tn,this).then(t=>t.removeAdUnit(e))}removeUserSyncs(){S(tn,this).then(e=>{if(typeof e.removeUserSyncs!=`function`)return;let t=e.removeUserSyncs();S(en,this).debug(`Removed ${t} user sync iframes`)})}runAuction({adUnitKey:e,adUnitPath:t,customSizes:n,divId:r,overridePrebidAdUnitCode:i,refreshCount:a,sspParams:o}){var s=this;return fe(function*(){let c=yield S(tn,s);return new Promise((l,u)=>{let d=[e];c.removeAdUnit(i==null?e:i);let f=S(Jt,s).buildAdUnitDefinition({adUnitKey:e,adUnitPath:t,customSizes:n,divId:r,overridePrebidAdUnitCode:i,personalizedAds:S(an,s),sspParams:o});if(f.bids.length>0)c.addAdUnits(f),S(on,s).set(f.code,a==null?0:a);else{u(new Ke(e));return}c.requestBids({adUnitCodes:[f.code],adUnits:[f],bidsBackHandler:()=>{l(d)}})})})()}runBatchAuction(e){var t=this;return fe(function*(){let n=yield S(tn,t);return new Promise((r,i)=>{let a=[],o=[];for(let r of e){var s;a.push(r.adUnitKey),n.removeAdUnit((s=r.overridePrebidAdUnitCode)==null?r.adUnitKey:s);try{let e=S(Jt,t).buildAdUnitDefinition({adUnitKey:r.adUnitKey,adUnitPath:r.adUnitPath,customSizes:r.customSizes,divId:r.divId,overridePrebidAdUnitCode:r.overridePrebidAdUnitCode,personalizedAds:S(an,t),sspParams:r.sspParams});if(e.bids.length>0){var c;n.addAdUnits(e),S(on,t).set(e.code,(c=r.refreshCount)==null?0:c),o.push(e)}}catch(e){S(en,t).error(`Error building ad unit definition for ${r.adUnitKey}`,e)}}if(o.length===0){i(Error(`Prebid: No bids configured for any of the batch slots`));return}n.requestBids({adUnitCodes:o.map(e=>e.code),adUnits:o,bidsBackHandler:()=>{r(a)}})})})()}getAllWinningBids(){var e=this;return fe(function*(){return(yield S(tn,e)).getAllWinningBids()})()}getHighestCpmBids(e){var t=this;return fe(function*(){return(yield S(tn,t)).getHighestCpmBids(e)})()}renderWinningBid(e,t,n){var r=this;return fe(function*(){let i=yield S(tn,r),a=!1,o=i.getHighestCpmBids(n);if(o.length>0){let s=o[0],c=e.getElementById(s.adUnitCode);if(c===null)throw Error(`Div with id ${s.adUnitCode} not found for rendering the winning bid`);t!==s.adUnitCode&&S(en,r).warn(`Div id provided for rendering (${t}) does not match the adUnitCode of the winning bid (${s.adUnitCode}). Rendering into the div with id ${s.adUnitCode}.`),c.innerHTML=``,c.setAttribute(`data-hb-query-id`,s.adId),c.removeAttribute(`style`);let l={EVENT_NAME:Kt,divId:t,adUnitKey:n,isEmpty:s===null,adProvider:`prebid`};S(Xt,r).dispatch(l);let u=e.createElement(`div`);u.setAttribute(`style`,`display: flex; justify-content: center; align-items: center;`);let d=`ifrm_`+s.adUnitCode,f=s.adId,p=e.createElement(`iframe`);p.setAttribute(`id`,d),p.setAttribute(`scrolling`,`no`),p.setAttribute(`style`,`border:0`),p.setAttribute(`marginwidth`,`0`),p.setAttribute(`marginheight`,`0`),p.setAttribute(`height`,`0`),p.setAttribute(`width`,`0`),p.addEventListener(`load`,()=>{S(Xt,r).dispatch({EVENT_NAME:Wt,adUnitKey:n,adProvider:`prebid`,isEmpty:!1})},{once:!0}),u.appendChild(p),c.appendChild(u);let m=e.getElementById(d);if(m instanceof HTMLIFrameElement&&m.contentWindow!=null){let e=m.contentWindow.document;i.renderAd(e,f),a=!0}else throw Error(`Iframe with id ${d} not found in the DOM after appending it for rendering the winning bid`)}let s={EVENT_NAME:Gt,divId:t,adUnitKey:n,adProvider:`prebid`,isEmpty:!a};return S(Xt,r).dispatch(s),a})()}setTargetingForGPT(e){var t=this;return fe(function*(){(yield S(tn,t)).setTargetingForGPTAsync(e)})()}isSSPConfigured(e){return h(e)}addSSP(e){p(e)}removeSSP(e){m(e)}buildVideoVast(e,t,n){var r=this;return fe(function*(){let i=yield S(tn,r),{adUnitKey:a,placement:o,vast:s}=e;i.removeAdUnit(a);let c=S(Jt,r).buildVideoAdUnitDefinition(a,o,S(an,r));if(c.bids.length===0){n.debug(`No bid found`),t(s);return}i.addAdUnits(c),i.requestBids({timeout:3e3,adUnitCodes:[a],adUnits:[c],bidsBackHandler:()=>{let e;try{e=i.adServers.gam.buildVideoUrl({adUnit:c,url:s}),n.debug(`Video URL built successfully`)}catch(e){n.debug(`Error while building video URL`,e),t(s);return}let o;try{var l;let e=(l=i.getHighestCpmBids(c.code))==null?void 0:l[0];e&&(n.debug(`== ${a} == Winning bid:`,e),o=S(nn,r).createVideoImpressionReporter(e,n),i.markWinningBidAsUsed({adId:e.adId,events:!1,analytics:!1}))}catch(e){n.warn(`${a}: error preparing the video impression report`,e)}t(e,o)}})})()}};function un(e){return b(cn,this,dn).call(this,e)&&b(cn,this,fn).call(this,e)}function dn(e){let t=S(Yt,this).get(e.adUnitCode);return t==null||e.requestTimestamp>=t}function fn(e){return!S(Zt,this).has(e.auctionId)||S(Qt,this).get(e.adUnitCode)===!0}function pn(e){e.onEvent(`auctionInit`,e=>{var t,n,r;let i=(t=((n=e.adUnits)==null?[]:n).flatMap(e=>{var t;return(t=e.bids)==null?[]:t}).find(e=>e.floorData!=null))==null?void 0:t.floorData,a=(i==null?void 0:i.skipped)===!0,o=(r=e.adUnitCodes)==null?[]:r;a&&S(Zt,this).set(e.auctionId,{adUnitCodes:o,isEnded:!1});for(let e of o)S(Qt,this).set(e,a)}),e.onEvent(`auctionEnd`,t=>{let n=S(Zt,this).get(t.auctionId);n!=null&&(n.isEnded=!0),b(cn,this,mn).call(this,e)})}function mn(e){let t=new Map,n=n=>{let r=t.get(n);return r==null&&(r=e.getBidResponsesForAdUnitCode(n).bids,t.set(n,r)),r};for(let[e,{adUnitCodes:t,isEnded:r}]of S(Zt,this))r&&(t.some(t=>n(t).some(t=>t.auctionId===e))||S(Zt,this).delete(e))}function hn(e,t){if(!S($t,this).disableFloor){let n=new mt().withFloors(C(C({},S($t,this)),{},{personalizedAds:t,refreshNumberCb:S(sn,this)})).build();e.setConfig(n)}e.bidderSettings=new We().withBase().withAdapterSettings(S(rn,this),t).build()}function gn(e,t,n=1){let r=parseFloat(e);return isNaN(r)&&(r=``),{low:r===``?``:_n(e,xn,n),med:r===``?``:_n(e,Sn,n),high:r===``?``:_n(e,Cn,n),auto:r===``?``:_n(e,Tn,n),dense:r===``?``:_n(e,wn,n),custom:r===``?``:_n(e,t,n)}}function _n(e,t,n){let r=``;if(!vn(t))return r;let i=t.buckets.reduce((e,t)=>e.max>t.max?e:t,{max:0}),a=0,o=t.buckets.find(t=>{if(e>i.max*n){let e=t.precision;e===void 0&&(e=bn),r=(t.max*n).toFixed(e)}else if(e<=t.max*n&&e>=a*n)return t.min=a,t;else a=t.max});return o&&(r=yn(e,o,n)),r}function vn(e){if(Oi(e)||!e.buckets||!Array.isArray(e.buckets))return!1;let t=!0;return e.buckets.forEach(e=>{(!e.max||!e.increment)&&(t=!1)}),t}function yn(e,t,n){let r=t.precision===void 0?bn:t.precision,i=t.increment*n,a=t.min*n,o=Math.floor,s=D.getConfig(`cpmRoundingFunction`);typeof s==`function`&&(o=s);let c=Math.pow(10,r+2),l=(e*c-a*c)/(i*c),u,d;try{u=o(l)*i+a}catch(e){d=!0}return(d||typeof u!=`number`)&&(U(`Invalid rounding function passed in config`),u=Math.floor(l)*i+a),u=Number(u.toFixed(10)),u.toFixed(r)}var bn,xn,Sn,Cn,wn,Tn,En=o((()=>{K(),O(),bn=2,xn={buckets:[{max:5,increment:.5}]},Sn={buckets:[{max:20,increment:.1}]},Cn={buckets:[{max:20,increment:.01}]},wn={buckets:[{max:3,increment:.01},{max:8,increment:.05},{max:20,increment:.5}]},Tn={buckets:[{max:5,increment:.05},{max:10,increment:.1},{max:20,increment:.5}]}})),Dn,On,T,kn,An,jn,E,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un=o((()=>{Dn={PL_CODE:`code`,PL_SIZE:`sizes`,PL_BIDS:`bids`,BD_BIDDER:`bidder`,BD_ID:`paramsd`,BD_PL_ID:`placementId`,ADSERVER_TARGETING:`adserverTargeting`,BD_SETTING_STANDARD:`standard`},On=`pbjs_debug`,T={AUCTION_INIT:`auctionInit`,AUCTION_TIMEOUT:`auctionTimeout`,AUCTION_END:`auctionEnd`,BID_ADJUSTMENT:`bidAdjustment`,BID_TIMEOUT:`bidTimeout`,BID_REQUESTED:`bidRequested`,BID_RESPONSE:`bidResponse`,BID_ACCEPTED:`bidAccepted`,BID_REJECTED:`bidRejected`,NO_BID:`noBid`,BID_WON:`bidWon`,BIDDER_DONE:`bidderDone`,BIDDER_ERROR:`bidderError`,SET_TARGETING:`setTargeting`,BEFORE_REQUEST_BIDS:`beforeRequestBids`,BEFORE_BIDDER_HTTP:`beforeBidderHttp`,REQUEST_BIDS:`requestBids`,AD_RENDER_FAILED:`adRenderFailed`,AD_RENDER_SUCCEEDED:`adRenderSucceeded`,TCF2_ENFORCEMENT:`tcf2Enforcement`,AUCTION_DEBUG:`auctionDebug`,BID_VIEWABLE:`bidViewable`,STALE_RENDER:`staleRender`,EXPIRED_RENDER:`expiredRender`,BILLABLE_EVENT:`billableEvent`,PBS_ANALYTICS:`pbsAnalytics`,BEFORE_PBS_HTTP:`beforePBSHttp`,BROWSI_INIT:`browsiInit`,BROWSI_DATA:`browsiData`,BROWSER_INTERVENTION:`browserIntervention`},kn={PREVENT_WRITING_ON_MAIN_DOCUMENT:`preventWritingOnMainDocument`,NO_AD:`noAd`,EXCEPTION:`exception`,CANNOT_FIND_AD:`cannotFindAd`,MISSING_DOC_OR_ADID:`missingDocOrAdid`},An={bidWon:`adUnitCode`},jn={LOW:`low`,MEDIUM:`medium`,HIGH:`high`,AUTO:`auto`,DENSE:`dense`,CUSTOM:`custom`},E={BIDDER:`hb_bidder`,AD_ID:`hb_adid`,PRICE_BUCKET:`hb_pb`,SIZE:`hb_size`,DEAL:`hb_deal`,SOURCE:`hb_source`,FORMAT:`hb_format`,UUID:`hb_uuid`,CACHE_ID:`hb_cache_id`,CACHE_HOST:`hb_cache_host`,ADOMAIN:`hb_adomain`,ACAT:`hb_acat`,CRID:`hb_crid`,DSP:`hb_dsp`,VERSION:`hb_ver`},Mn={BIDDER:`hb_bidder`,AD_ID:`hb_adid`,PRICE_BUCKET:`hb_pb`,SIZE:`hb_size`,DEAL:`hb_deal`,FORMAT:`hb_format`,UUID:`hb_uuid`,CACHE_HOST:`hb_cache_host`,VERSION:`hb_ver`},Nn={title:`hb_native_title`,body:`hb_native_body`,body2:`hb_native_body2`,privacyLink:`hb_native_privacy`,privacyIcon:`hb_native_privicon`,sponsoredBy:`hb_native_brand`,image:`hb_native_image`,icon:`hb_native_icon`,clickUrl:`hb_native_linkurl`,displayUrl:`hb_native_displayurl`,cta:`hb_native_cta`,rating:`hb_native_rating`,address:`hb_native_address`,downloads:`hb_native_downloads`,likes:`hb_native_likes`,phone:`hb_native_phone`,price:`hb_native_price`,salePrice:`hb_native_saleprice`,video:`hb_native_video`,rendererUrl:`hb_renderer_url`,adTemplate:`hb_adTemplate`},Pn={SRC:`s2s`,DEFAULT_ENDPOINT:`https://prebid.adnxs.com/pbs/v1/openrtb2/auction`,SYNCED_BIDDERS_KEY:`pbjsSyncs`},Fn={BID_TARGETING_SET:`targetingSet`,RENDERED:`rendered`,BID_REJECTED:`bidRejected`},In={INVALID:`Bid has missing or invalid properties`,INVALID_REQUEST_ID:`Invalid request ID`,BIDDER_DISALLOWED:`Bidder code is not allowed by allowedAlternateBidderCodes / allowUnknownBidderCodes`,FLOOR_NOT_MET:`Bid does not meet price floor`,CANNOT_CONVERT_CURRENCY:`Unable to convert currency`,DSA_REQUIRED:`Bid does not provide required DSA transparency info`,DSA_MISMATCH:`Bid indicates inappropriate DSA rendering method`,PRICE_TOO_HIGH:`Bid price exceeds maximum value`},Ln={body:`desc`,body2:`desc2`,sponsoredBy:`sponsored`,cta:`ctatext`,rating:`rating`,address:`address`,downloads:`downloads`,likes:`likes`,phone:`phone`,price:`price`,salePrice:`saleprice`,displayUrl:`displayurl`},Rn={sponsored:1,desc:2,rating:3,likes:4,downloads:5,price:6,saleprice:7,phone:8,address:9,desc2:10,displayurl:11,ctatext:12},zn={ICON:1,MAIN:3},Bn=[`privacyIcon`,`clickUrl`,`adTemplate`,`rendererUrl`,`type`],Vn={REQUEST:`Prebid Request`,RESPONSE:`Prebid Response`,NATIVE:`Prebid Native`,EVENT:`Prebid Event`,INTERVENTION:`Prebid Intervention`},Hn=`__pb_locator__`}));function Wn(e,t=!0){let n=t?{priceGranularity:ar.MEDIUM,customPriceBucket:{},mediaTypePriceGranularity:{},bidderSequence:ir,auctionOptions:{}}:{},r=(()=>{let e=[`suppressStaleRender`,`suppressExpiredRender`,`legacyRender`,`rejectUnknownMediaTypes`,`rejectInvalidMediaTypes`,`yield`],t=[`secondaryBidders`],n={viewabilityMeasurement:[`observer`,`boundingBox`]},r=[].concat(e,t,Object.keys(n));return function(i){if(!L(i))return U(`Auction Options must be an object`),!1;for(let a of Object.keys(i)){if(!r.includes(a))return U(`Auction Options given an incorrect param: ${a}`),!1;if(t.includes(a)){if(!R(i[a]))return U(`Auction Options ${a} must be of type Array`),!1;if(!i[a].every(F))return U(`Auction Options ${a} must be only string`),!1}else if(e.includes(a)){if(!Dr(i[a]))return U(`Auction Options ${a} must be of type boolean`),!1}else if(n.hasOwnProperty(a)&&!n[a].includes(i[a]))return U(`Auction Options ${a} must be one of: ${n[a].join(`, `)}`),!1}return!0}})();function i(e){return n[e]}function a(t,r){n.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0}),n[t]=r}return Object.defineProperties(e,Object.fromEntries(Object.entries({publisherDomain:{set(e){e!=null&&U(`publisherDomain is deprecated and has no effect since v7 - use pageUrl instead`),a(`publisherDomain`,e)}},priceGranularity:{set(e){s(e)&&(typeof e==`string`?a(`priceGranularity`,o(e)?e:ar.MEDIUM):L(e)&&(a(`customPriceBucket`,e),a(`priceGranularity`,ar.CUSTOM),G(`Using custom price granularity`)))}},customPriceBucket:{},mediaTypePriceGranularity:{set(e){e!=null&&a(`mediaTypePriceGranularity`,Object.keys(e).reduce((t,n)=>(s(e[n])?typeof e[n]==`string`?t[n]=o(e[n])?e[n]:i(`priceGranularity`):L(e[n])&&(t[n]=e[n],G(`Using custom price granularity for ${n}`)):U(`Invalid price granularity for media type: ${n}`),t),{}))}},bidderSequence:{set(e){rr[e]?a(`bidderSequence`,e):U(`Invalid order: ${e}. Bidder Sequence was not set.`)}},auctionOptions:{set(e){r(e)&&a(`auctionOptions`,e)}}}).map(([e,t])=>[e,Object.assign({get:i.bind(null,e),set:a.bind(null,e),enumerable:n.hasOwnProperty(e),configurable:!n.hasOwnProperty(e)},t)]))),e;function o(e){return Object.keys(ar).find(t=>e===ar[t])}function s(e){if(!e)return W("Prebid Error: no value passed to `setPriceGranularity()`"),!1;if(typeof e==`string`)o(e)||U("Prebid Warning: setPriceGranularity was called with invalid setting, using `medium` as default.");else if(L(e)&&!vn(e))return W("Invalid custom price value passed to `setPriceGranularity()`"),!1;return!0}}function Gn(){let e=[],t,n,r,i=null;function a(){t={};let e=Wn({debug:Kn,bidderTimeout:qn,enableSendAllBids:Jn,useBidCache:Xn,deviceAccess:Zn,disableAjaxTimeout:Yn,maxNestedIframes:Qn,maxBid:$n,userSync:{topics:er}});n&&g(Object.keys(n).reduce((t,r)=>(n[r]!==e[r]&&(t[r]=e[r]||{}),t),{})),n=e,r={}}function o(){if(i&&r&&L(r[i])){let e=r[i],t=new Set([...Object.keys(n),...Object.keys(e)]),a={};for(let r of t){let t=n[r],i=e[r];a[r]=i===void 0?t:t===void 0?i:L(i)?V({},t,i):i}return a}return C({},n)}function s(){let e=o();return Object.defineProperty(e,"ortb2",{get:function(){throw Error(`invalid access to 'ortb2' config - use request parameters instead`)}}),e}let[c,l]=[o,s].map(e=>function(...t){if(t.length<=1&&typeof t[0]!=`function`){let n=t[0];return n?M(e(),n):o()}return h(...t)}),[u,d]=[l,c].map(e=>function(...t){let n=e(...t);return n&&typeof n==`object`&&(n=N(n)),n});function f(){return r}function p(e){if(!L(e)){W(`setConfig options must be an object`);return}let r=Object.keys(e),i={};r.forEach(r=>{let a=e[r];L(t[r])&&L(a)&&(a=Object.assign({},t[r],a));try{i[r]=n[r]=a}catch(e){U(`Cannot set config for property ${r} : `,e)}}),g(i)}function m(e){if(!L(t)){W(`defaults must be an object`);return}Object.assign(t,e),Object.assign(n,e)}function h(t,n,r={}){let i=n;if(typeof t!=`string`&&(i=t,t=or,r=n||{}),typeof i!=`function`){W(`listener must be a function`);return}let a={topic:t,callback:i};return e.push(a),r.init&&i(t===or?l():{[t]:l(t)}),function(){e.splice(e.indexOf(a),1)}}function g(t){let n=Object.keys(t);e.filter(e=>n.includes(e.topic)).forEach(e=>{e.callback({[e.topic]:t[e.topic]})}),e.filter(e=>e.topic===or).forEach(e=>e.callback(t))}function _(e,t=!1){try{n(e),e.bidders.forEach(n=>{r[n]||(r[n]=Wn({},!1)),Object.keys(e.config).forEach(i=>{let a=e.config[i],o=r[n][i];if(L(a)&&(o==null||L(o))){let e=t?V:Object.assign;r[n][i]=e({},o||{},a)}else r[n][i]=a})})}catch(e){W(e)}function n(e){if(!L(e))throw Error(`setBidderConfig bidder options must be an object`);if(!(Array.isArray(e.bidders)&&e.bidders.length))throw Error(`setBidderConfig bidder options must contain a bidders list with at least 1 bidder`);if(!L(e.config))throw Error(`setBidderConfig bidder options must contain a config object`)}}function v(e){if(!L(e)){W(`mergeConfig input must be an object`);return}let t=V(o(),e);return p(Object.keys(e).reduce((e,n)=>(Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]),e),{})),t}function y(e){return _(e,!0)}function ee(e,t){i=e;try{return t()}finally{x()}}function b(e){return function(t){return function(...n){if(typeof t==`function`)return ee(e,t.bind(this,...n));U(`config.callbackWithBidder callback is not a function`)}}}function te(){return i}function x(){i=null}return a(),{getCurrentBidder:te,resetBidder:x,getConfig:l,getAnyConfig:c,readConfig:u,readAnyConfig:d,setConfig:p,mergeConfig:v,setDefaults:m,resetConfig:a,runWithBidder:ee,callbackWithBidder:b,setBidderConfig:_,getBidderConfig:f,mergeBidderConfig:y}}var Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,D,O=o((()=>{En(),K(),Un(),w(),Kn=Di(On).toUpperCase()===`TRUE`,qn=3e3,Jn=!0,Yn=!1,Xn=!1,Zn=!0,Qn=10,$n=5e3,er={},tr=`random`,nr=`fixed`,rr={},rr[tr]=!0,rr[nr]=!0,ir=tr,ar={LOW:`low`,MEDIUM:`medium`,HIGH:`high`,AUTO:`auto`,DENSE:`dense`,CUSTOM:`custom`},or=`*`,D=Gn()})),sr,cr=o((()=>{sr={pbGlobal:`pubtech_pbjs`,defineGlobal:!0,features:{NATIVE:!0,VIDEO:!0,UID2_CSTG:!0,GREEDY:!1,AUDIO:!0,LOG_NON_ERROR:!0,LOG_ERROR:!0},distUrlBase:`https://cdn.jsdelivr.net/npm/prebid.js@11.41.0/dist/chunks/`,skipCalls:{}}}));function lr(){return sr.pbGlobal}function ur(){return sr.defineGlobal}function dr(){return sr.distUrlBase}var fr=o((()=>{cr()}));function pr(){return hr}function k(e){hr.installedModules.push(e)}var mr,hr,A=o((()=>{fr(),mr=ur()?window:{},hr=mr[lr()]=mr[lr()]||{},hr.cmd=hr.cmd||[],hr.que=hr.que||[],hr.installedModules=hr.installedModules||[],mr===window&&(mr._pbjsGlobals=mr._pbjsGlobals||[],mr._pbjsGlobals.push(lr()))}));function gr(e=0){return new j(t=>{xr(t,e)})}function _r(e=0){let t=window.scheduler;if(typeof(t==null?void 0:t.postTask)==`function`)try{return j.resolve(t.postTask(()=>{},{priority:`user-blocking`,delay:e})).catch(()=>{})}catch(e){}return gr(e)}function vr({promiseFactory:e=e=>new j(e)}={}){function t(e){return t=>e(t)}let n,r;return{promise:e((e,t)=>{n=e,r=t}),resolve:t(n),reject:t(r)}}var yr,br,xr,j,Sr=o((()=>{A(),xr=(yr=pr().setTimeout)==null?setTimeout:yr,j=(br=pr().Promise)==null?Promise:br}));function M(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r{}));function wr(e){var t,n,r;if(Array.isArray(e)){for(n=Array(t=e.length);t--;)n[t]=(r=e[t])&&typeof r==`object`?wr(r):r;return n}if(Object.prototype.toString.call(e)===`[object Object]`){for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:wr(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(r=e[t])&&typeof r==`object`?wr(r):r;return n}return e}var Tr=o((()=>{}));function N(e){return wr(e)||{}}function Er(e,t){return t.filter(t=>e[t]).reduce((t,n)=>Object.assign(t,{[n]:e[n]}),{})}function P(e){return typeof e==`function`}function F(e){return typeof e==`string`}function I(e){return typeof e==`number`}function L(e){return kr.call(e)===`[object Object]`}function Dr(e){return typeof e==`boolean`}function Or(e,t){return R(e)&&(!t||e.length===t)&&e.every(e=>z(e))}var kr,R,z,Ar=o((()=>{Tr(),kr=Object.prototype.toString,R=Array.isArray.bind(Array),z=Number.isInteger.bind(Number)}));function jr(){return!!D.getConfig(`debug`)}var Mr=o((()=>{O()}));function Nr(e){Rr=e}function Pr(e,t=!1){var n;let r=(n=window.console)==null?void 0:n[e],i=`${Lr[e]}:`;return function(...n){typeof r==`function`&&jr()&&r.apply(console,Ir(n,i)),t&&zr(T.AUCTION_DEBUG,{type:Lr[e],arguments:n})}}function Fr(e){function t(t){return function(...n){t(e,...n)}}return{logError:t(Ur),logWarn:t(Hr),logMessage:t(Br),logInfo:t(Vr)}}function Ir(e,t){e=[].slice.call(e);let n=D.getCurrentBidder();return t&&e.unshift(t),n&&e.unshift(r(`#aaa`)),e.unshift(r(`#3b88c3`)),e.unshift(`%cPrebid`+(n?`%c${n}`:``)),e;function r(e){return`display: inline-block; color: #fff; background: ${e}; padding: 1px 4px; border-radius: 3px;`}}var Lr,Rr,zr,Br,Vr,Hr,Ur,Wr=o((()=>{O(),Mr(),Un(),Lr={log:`MESSAGE`,info:`INFO`,warn:`WARNING`,error:`ERROR`},zr=(e,...t)=>{Rr!=null&&Rr(e,...t)},Br=Pr(`log`),Vr=Pr(`info`),Hr=Pr(`warn`,!0),Ur=Pr(`error`,!0)}));function B(e,t,n){t.split&&(t=t.split(`.`));for(var r=0,i=t.length,a=e,o,s;r{}));function Kr(e,t){let n={},r={},i=[];Object.entries(t).forEach(([t,a])=>{if(typeof a==`object`&&a){let r=new Kr(()=>{var n;return(n=e())==null?void 0:n[t]},a);n[t]=r.obj,i.push(r.reset)}else a===!0&&Object.defineProperty(n,t,{get(){if(!r.hasOwnProperty(t)){var n;r[t]=(n=e())==null?void 0:n[t]}return r[t]}})}),this.obj=n,this.reset=function(){i.forEach(e=>e()),r={}}}var qr=o((()=>{}));function Jr(){Qr.winDimensions.reset()}function Yr(e){var t,n,r,i;let a=e==null?wi()?Ba.getWindowTop():Ba.getWindowSelf():e,o=(t=(n=a==null?void 0:a.screen)==null?(r=Ba.getWindowSelf())==null?void 0:r.screen:n)==null?(i=window)==null?void 0:i.screen:t,s=Number(o==null?void 0:o.width),c=Number(o==null?void 0:o.height);if(!(!Number.isFinite(s)||!Number.isFinite(c)))return c>=s?`portrait`:`landscape`}var Xr,Zr,Qr,$r,ei=o((()=>{K(),qr(),Xr=20,Zr=new Kr(()=>wi()?Ba.getWindowTop():Ba.getWindowSelf(),{innerHeight:!0,innerWidth:!0,screen:{width:!0,height:!0},visualViewport:{width:!0,height:!0},document:{documentElement:{clientWidth:!0,clientHeight:!0,scrollTop:!0,scrollLeft:!0},body:{scrollTop:!0,scrollLeft:!0,clientWidth:!0,clientHeight:!0}}}),Qr={winDimensions:Zr},$r=(()=>{let e;return function(){return(!e||Date.now()-e>Xr)&&(Qr.winDimensions.reset(),e=Date.now()),Qr.winDimensions.obj}})()}));function ti(e){return ni.apply(this,arguments)}function ni(){return ni=fe(function*(e){typeof e!=`string`&&(e=JSON.stringify(e));let t=new TextEncoder().encode(e),n=new Blob([t]).stream().pipeThrough(new window.CompressionStream(`gzip`)),r=yield(yield new Response(n).blob()).arrayBuffer();return new Uint8Array(r)}),ni.apply(this,arguments)}var ri,ii=o((()=>{pe(),ri=function(){let e=fe(function*(){try{if(window.CompressionStream===void 0||window.DecompressionStream===void 0)return!1;let e=`prebid-gzip-probe`,t=yield ti(e),n=new Blob([t]).stream().pipeThrough(new window.DecompressionStream(`gzip`));return(yield new Response(n).text())===e}catch(e){return!1}})();return()=>e}()})),ai=c({_each:()=>Ai,_map:()=>Mi,binarySearch:()=>Na,buildUrl:()=>Ca,canAccessWindowTop:()=>wi,checkCookieSupport:()=>da,cleanObj:()=>va,compareCodeAndSlot:()=>Ja,compressDataWithGZip:()=>ti,contains:()=>ji,convertObjectToArray:()=>ja,createIframe:()=>Ua,createInvisibleIframe:()=>Ei,createTrackPixelHtml:()=>Hi,cyrb53Hash:()=>Ea,debugTurnedOn:()=>za,deepAccess:()=>M,deepClone:()=>N,deepEqual:()=>wa,deepSetValue:()=>B,delayExecution:()=>fa,encodeMacroURI:()=>Ui,extractDomainFromHost:()=>Ia,flatten:()=>Gi,formatQS:()=>xa,generateUUID:()=>ci,getBidIdParameter:()=>ui,getBidRequest:()=>Ki,getBidderCodes:()=>Ji,getDefinedParams:()=>Er,getDocument:()=>Ci,getDomLoadingDuration:()=>la,getFallbackWindow:()=>Ti,getParameterByName:()=>Di,getPerformanceNow:()=>ca,getPrebidInternal:()=>oi,getSafeframeGeometry:()=>ea,getScreenOrientation:()=>Yr,getUniqueIdentifierStr:()=>si,getUnixTimestampFromNow:()=>Aa,getUserConfiguredParams:()=>ha,getValue:()=>qi,getWinDimensions:()=>$r,getWindowLocation:()=>Si,getWindowSelf:()=>xi,getWindowTop:()=>bi,groupBy:()=>pa,hasDeviceAccess:()=>ua,hasNonSerializableProperty:()=>Pa,inIframe:()=>Qi,insertElement:()=>Ni,insertHtmlIntoIframe:()=>zi,insertUserSyncIframe:()=>Bi,internal:()=>Ba,isAdUnitCodeMatchingSlot:()=>ga,isApnGetTagDefined:()=>Xi,isArray:()=>R,isArrayOfNums:()=>Or,isBoolean:()=>Dr,isChromeIOSBrowser:()=>ra,isEmpty:()=>Oi,isEmptyStr:()=>ki,isFirefoxBrowser:()=>na,isFn:()=>P,isGptPubadsDefined:()=>Yi,isGzipCompressionSupported:()=>ri,isInteger:()=>z,isNumber:()=>I,isPlainObject:()=>L,isSafariBrowser:()=>ta,isSafeFrameWindow:()=>$i,isStr:()=>F,isValidMediaTypes:()=>ma,logError:()=>W,logInfo:()=>H,logMessage:()=>G,logWarn:()=>U,memoize:()=>ka,mergeDeep:()=>V,parseGPTSingleSizeArray:()=>gi,parseGPTSingleSizeArrayToRtbSize:()=>vi,parseQS:()=>ba,parseQueryStringParameters:()=>di,parseSizesInput:()=>mi,parseUrl:()=>Sa,pick:()=>ya,politeInsertUserSyncIframe:()=>Ii,politeTriggerPixel:()=>Fi,prefixLog:()=>Ra,removeUserSyncIframes:()=>Vi,replaceAuctionPrice:()=>aa,replaceClickThrough:()=>oa,replaceMacros:()=>ia,resetWinDimensions:()=>Jr,runBackgroundTask:()=>Ri,safeJSONEncode:()=>Oa,safeJSONParse:()=>Da,setOnAny:()=>Fa,setScriptAttributes:()=>Ma,shuffle:()=>Zi,sizeTupleToRtbSize:()=>_i,sizeTupleToSizeString:()=>hi,sizesToSizeTuples:()=>pi,sortByHighestCpm:()=>qa,timestamp:()=>sa,transformAdServerTargetingObj:()=>fi,triggerNurlWithCpm:()=>La,triggerPixel:()=>Li,uniques:()=>Wi,unsupportedBidderMessage:()=>_a,waitForElementToLoad:()=>Pi});function oi(){return Va}function si(){return Ha()+Math.random().toString(16).substring(2)}function ci(e){return e?(e^li()>>e/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,ci)}function li(){return window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(1))[0]%16:Math.random()*16}function ui(e,t){return(t==null?void 0:t[e])||``}function di(e){let t=``;for(var n in e)e.hasOwnProperty(n)&&(t+=n+`=`+encodeURIComponent(e[n])+`&`);return t=t.replace(/&$/,``),t}function fi(e){return e&&Object.getOwnPropertyNames(e).length>0?Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join(`&`):``}function pi(e){return typeof e==`string`?e.split(/\s*,\s*/).map(e=>e.match(/^(\d+)x(\d+)$/i)).filter(e=>e).map(([e,t,n])=>[parseInt(t,10),parseInt(n,10)]):Array.isArray(e)?yi(e)?[e]:e.filter(yi):[]}function mi(e){return pi(e).map(hi)}function hi(e){return e[0]+`x`+e[1]}function gi(e){if(yi(e))return hi(e)}function _i(e){return{w:e[0],h:e[1]}}function vi(e){if(yi(e))return _i(e)}function yi(e){return R(e)&&e.length===2&&!isNaN(e[0])&&!isNaN(e[1])}function bi(){return window.top}function xi(){return window.self}function Si(){return window.location}function Ci(){return document}function wi(){try{if(Ba.getWindowTop().location.href)return!0}catch(e){return!1}}function Ti(e){return e||(wi()?Ba.getWindowTop():Ba.getWindowSelf())}function Ei(){return Ua(document,{id:si(),width:0,height:0,src:`about:blank`},{display:`none`,height:`0px`,width:`0px`,border:`0px`})}function Di(e){return ba(Si().search)[e]||``}function Oi(e){return e?R(e)||F(e)?!(e.length>0):Object.keys(e).length<=0:!0}function ki(e){return F(e)&&(!e||e.length===0)}function Ai(e,t){if(P(e==null?void 0:e.forEach))return e.forEach(t,this);Object.entries(e||{}).forEach(([e,n])=>t.call(this,n,e))}function ji(e,t){return P(e==null?void 0:e.includes)&&e.includes(t)}function Mi(e,t){return P(e==null?void 0:e.map)?e.map(t):Object.entries(e||{}).map(([n,r])=>t(r,n,e))}function Ni(e,t,n,r){t=t||document;let i;i=n?t.getElementsByTagName(n):t.getElementsByTagName(`head`);try{if(i=i.length?i:t.getElementsByTagName(`body`),i.length){i=i[0];let t=r?null:i.firstChild;return i.insertBefore(e,t)}}catch(e){}}function Pi(e,t){let n=null;return new j(r=>{let i=function(){e.removeEventListener(`load`,i),e.removeEventListener(`error`,i),n!=null&&window.clearTimeout(n),r()};e.addEventListener(`load`,i),e.addEventListener(`error`,i),t!=null&&(n=window.setTimeout(i,t))})}function Fi(e,t=`include`){Ri(()=>{if(window.fetch&&window.Request)try{let n=new Request(e,{method:`GET`,mode:`no-cors`,credentials:t,keepalive:!0});window.fetch(n).catch(()=>{t!==`omit`&&Li(e)});return}catch(e){}t!==`omit`&&Li(e)})}function Ii(e,t,n,r){Ri(()=>Bi(e,t,n,r))}function Li(e,t,n){let r=new Image;t&&Ba.isFn(t)&&Pi(r,n).then(t),r.src=e}function Ri(e){let t=window.scheduler;if(t!=null&&t.postTask){t.postTask(e,{priority:`background`}).catch(()=>e());return}if(typeof window.requestIdleCallback==`function`){window.requestIdleCallback(()=>e(),{timeout:2e3});return}e()}function zi(e){if(!e)return;let t=Ei();Ba.insertElement(t,document,`body`),(t=>{t.open(),t.write(e),t.close()})(t.contentWindow.document)}function Bi(e,t,n,r){if(!e)return;let i=Ua(document,{sandbox:`allow-scripts allow-same-origin`,src:e},{width:`0px`,height:`0px`,display:`none`});Wa.set(i,Ba.isFn(r)?r:null),t&&Ba.isFn(t)&&Pi(i,n).then(t),Ba.insertElement(i,document,`html`,!0)}function Vi(){let e=Array.from(document.querySelectorAll(`iframe`)).filter(e=>Wa.has(e));return e.forEach(e=>{var t;let n=Wa.get(e);Wa.delete(e);try{n==null||n()}catch(e){W(`Error cleaning up user sync iframe`,e)}(t=e.parentNode)==null||t.removeChild(e)}),e.length}function Hi(e,t=encodeURI){if(!e)return``;let n=t(e),r=`
`;return r+=`
`,r}function Ui(e){let t=``,n=0;for(let r of e.matchAll(Ka))t+=encodeURI(e.slice(n,r.index))+"${"+r[1].replace(Ga,encodeURIComponent)+`}`,n=r.index+r[0].length;return t+encodeURI(e.slice(n))}function Wi(e,t,n){return n.indexOf(e)===t}function Gi(e,t){return e.concat(t)}function Ki(e,t){if(e)return t.flatMap(e=>e.bids).find(t=>[`bidId`,`adId`,`bid_id`].some(n=>t[n]===e))}function qi(e,t){return e[t]}function Ji(e){return e.map(e=>e.bids.map(e=>e.bidder).reduce(Gi,[])).reduce(Gi,[]).filter(e=>e!==void 0).filter(Wi)}function Yi(){if(window.googletag&&P(window.googletag.pubads)&&P(window.googletag.pubads().getSlots))return!0}function Xi(){if(window.apntag&&P(window.apntag.getTag))return!0}function Zi(e){let t=e.length;for(;t>0;){let n=Math.floor(Math.random()*t);t--;let r=e[t];e[t]=e[n],e[n]=r}return e}function Qi(){try{return Ba.getWindowSelf()!==Ba.getWindowTop()}catch(e){return!0}}function $i(){if(!Qi())return!1;let e=Ba.getWindowSelf();return!!(e.$sf&&e.$sf.ext)}function ea(){try{let e=xi();return typeof e.$sf.ext.geom==`function`?e.$sf.ext.geom():void 0}catch(e){W(`Error getting SafeFrame geometry`,e);return}}function ta(){return/^((?!chrome|chromium|android|crios|fxios).)*safari/i.test(navigator.userAgent)}function na(){return/firefox|fxios/i.test(navigator.userAgent)}function ra(){return/crios|crmo/i.test(navigator.userAgent)}function ia(e,t){if(e)return Object.entries(t).reduce((e,[t,n])=>e.replace(RegExp(`\\$\\{`+t+`\\}`,`g`),n||``),e)}function aa(e,t){return ia(e,{AUCTION_PRICE:t})}function oa(e,t){if(!(!e||!t||typeof t!=`string`))return e.replace(/\${CLICKTHROUGH}/g,t)}function sa(){return new Date().getTime()}function ca(){return window.performance&&window.performance.now&&window.performance.now()||0}function la(e){var t;let n=-1;e=e||xi();let r=e.performance;if((t=e.performance)!=null&&t.timing&&e.performance.timing.navigationStart>0){let e=r.timing.domLoading-r.timing.navigationStart;e>0&&(n=e)}return n}function ua(){return D.getConfig(`deviceAccess`)!==!1}function da(){if(window.navigator.cookieEnabled||document.cookie.length)return!0}function fa(e,t){if(t<1)throw Error(`numRequiredCalls must be a positive number. Got ${t}`);let n=0;return function(){n++,n===t&&e.apply(this,arguments)}}function pa(e,t){return e.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function ma(e){let t=[`banner`,`native`,`video`,`audio`];return Object.keys(e).every(e=>t.includes(e))?e.video&&e.video.context?[`instream`,`outstream`].includes(e.video.context):!0:!1}function ha(e,t,n){return e.filter(e=>e.code===t).flatMap(e=>e.bids).filter(e=>e.bidder===n).map(e=>e.params||{})}function ga(e){let t=D.getConfig(`customGptSlotMatching`),n=P(t)&&t(e);return P(n)?n:t=>Ja(e,t)}function _a(e,t){let n=Object.keys(e.mediaTypes||{banner:`banner`}).join(`, `);return` ${e.code} is a ${n} ad unit containing bidders that don't support ${n}: ${t}. This bidder won't fetch demand. `}function va(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0))}function ya(e,t){return typeof e==`object`?t.reduce((n,r,i)=>{if(typeof r==`function`)return n;let a=r,o=r.match(/^(.+?)\sas\s(.+?)$/i);o&&(r=o[1],a=o[2]);let s=e[r];return typeof t[i+1]==`function`&&(s=t[i+1](s,n)),s!==void 0&&(n[a]=s),n},{}):{}}function ba(e){return e?e.replace(/^\?/,``).split(`&`).reduce((e,t)=>{let[n,r]=t.split(`=`);return/\[\]$/.test(n)?(n=n.replace(`[]`,``),e[n]=e[n]||[],e[n].push(r)):e[n]=r||``,e},{}):{}}function xa(e){return Object.keys(e).map(t=>Array.isArray(e[t])?e[t].map(e=>`${t}[]=${e}`).join(`&`):`${t}=${e[t]}`).join(`&`)}function Sa(e,t){let n=document.createElement(`a`);t&&`noDecodeWholeURL`in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);let r=t&&`decodeSearchAsString`in t&&t.decodeSearchAsString;return{href:n.href,protocol:(n.protocol||``).replace(/:$/,``),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,`/`),search:r?n.search:Ba.parseQS(n.search||``),hash:(n.hash||``).replace(/^#/,``),host:n.host||window.location.host}}function Ca(e){return(e.protocol||`http`)+`://`+(e.host||e.hostname+(e.port?`:${e.port}`:``))+(e.pathname||``)+(e.search?`?${Ba.formatQS(e.search||``)}`:``)+(e.hash?`#${e.hash}`:``)}function wa(e,t,{checkTypes:n=!1}={}){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if(e.length!==t.length)return!1;for(let r=0;r{e[i].some(e=>wa(e,t))||e[i].push(t)}):e[i]=[...a]:e[i]=a}}function Ea(e,t=0){let n=function(e,t){if(P(Math.imul))return Math.imul(e,t);t|=0;var n=(e&4194303)*t;return e&4290772992&&(n+=(e&4290772992)*t|0),n|0},r=3735928559^t,i=1103547991^t;for(let t=0,a;t>>16,2246822507)^n(i^i>>>13,3266489909),i=n(i^i>>>16,2246822507)^n(r^r>>>13,3266489909),(4294967296*(2097151&i)+(r>>>0)).toString()}function Da(e){try{return JSON.parse(e)}catch(e){}}function Oa(e){try{return JSON.stringify(e)}catch(e){return``}}function ka(e,t=function(e){return e}){let n=new Map,r=function(){let r=t.apply(this,arguments);return n.has(r)||n.set(r,e.apply(this,arguments)),n.get(r)};return r.clear=n.clear.bind(n),r}function Aa(e=0,t=`d`){if([`m`,`d`].indexOf(t)<0)return Date.now();let n=t===`m`?e*60*1e3:e*24*60*60*1e3;return Date.now()+(e&&e>0?n:0)}function ja(e){return Object.keys(e).map(t=>({[t]:e[t]}))}function Ma(e,t){Object.entries(t).forEach(([t,n])=>e.setAttribute(t,n))}function Na(e,t,n=e=>e){let r=0,i=e.length&&e.length-1,a=n(t);for(;i-r>1;){let t=r+Math.round((i-r)/2);a>n(e[t])?r=t:i=t}for(;e.length>r&&a>n(e[r]);)r++;return r}function Pa(e,t=new Set){for(let n in e){let r=e[n],i=typeof r;if(r===void 0||i===`function`||i===`symbol`||r instanceof RegExp||r instanceof Map||r instanceof Set||r instanceof Date||r!==null&&i===`object`&&Object.prototype.hasOwnProperty.call(r,`toJSON`)||r!==null&&i===`object`&&r.constructor===Object&&(t.has(r)||(t.add(r),Pa(r,t))))return!0}return!1}function Fa(e,t){for(let n=0,r;n0){t=n[0];for(let e=1;et.length&&(t=n[e])}}catch(e){t=null}return t}function La(e,t){F(e.nurl)&&e.nurl!==``&&(e.nurl=e.nurl.replace(/\${AUCTION_PRICE}/,t),Fi(e.nurl))}var H,U,W,G,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,K=o((()=>{O(),Sr(),Cr(),Ar(),Wr(),Mr(),Gr(),Ar(),ei(),ii(),H=Vr,U=Hr,W=Ur,G=Br,Ra=Fr,za=jr,Ba={checkCookieSupport:da,getWindowSelf:xi,getWindowTop:bi,canAccessWindowTop:wi,getWindowLocation:Si,insertUserSyncIframe:Bi,insertElement:Ni,isFn:P,triggerPixel:Li,logError:W,logWarn:U,logMessage:G,logInfo:H,parseQS:ba,formatQS:xa,deepEqual:wa,runBackgroundTask:Ri},Va={},Ha=function(){var e=0;return function(){return e++,e}}(),Ua=(()=>{let e={border:`0px`,hspace:`0`,vspace:`0`,marginWidth:`0`,marginHeight:`0`,scrolling:`no`,frameBorder:`0`,allowtransparency:`true`};return(t,n,r={})=>{let i=t.createElement(`iframe`);return Object.assign(i,Object.assign({},e,n)),Object.assign(i.style,r),i}})(),Wa=new WeakMap,Ga=/["<>`\t\n\v\f\r ]/g,Ka=/\$\{([^}#$&+,/:;=?@]+)\}/g,qa=(e,t)=>t.cpm-e.cpm,Ja=(e,t)=>e.getAdUnitPath()===t||e.getSlotElementId()===t}));function Ya({getMeta:e=(e,t)=>({generatedAt:t}),hashFields:t}={}){let n,r,i,a,o,s,c,l,u,d;function f(){i=vr(),n=!1,o=null,s=!1,a=null,r=!0,c=null,l=null,u=!1,d=[]}function p(e){return e&&t?t.map(t=>e[t]):e}function m(e){return!wa(p(o),p(e))}function h(){r&&d.forEach(e=>e(o))}function g(e){r=m(e),o=e,u=!1,l=null,s=!0,i.resolve(e),h()}function _(e){r=m(null),o=null,s=!0,l=e,u=!0,i.reject(e),h()}return f(),{reset:f,get generatedTime(){return a},enable(){n=!0},get enabled(){return n},get ready(){return s},get promise(){return s?u?j.reject(l):j.resolve(o):(n||g(null),i.promise)},setConsentData(e,t=sa()){a=t,g(e)},getConsentData(){return n?o:null},getConsentMeta(){if(a!=null&&o!=null)return e(o,a)},error:_,get hash(){return r&&(c=Ea(JSON.stringify(p(o))),r=!1),c},onChange(e){d.push(e)}}}function Xa(){let e={},t={},n={};return{register(r,i,a){a&&((e[i]=e[i]||{})[r]=a,t.hasOwnProperty(i)?t[i]!==a&&(t[i]=n):t[i]=a)},get(r){let i={modules:e[r]||{}};return t.hasOwnProperty(r)&&t[r]!==n&&(i.gvlid=t[r]),i}}}function Za(e=so){let t=Object.entries(e);function n(e){return function(){return Object.fromEntries(t.map(([t,n])=>[t,n[e]()]))}}let r=n(`getConsentData`),i=n(`reset`),a;function o(){a=[],Object.values(e).forEach(e=>e.onChange(()=>{a.forEach(e=>e(r()))}))}return o(),{getConsentData:r,onChange(e){a.push(e)},get promise(){return j.all(t.map(([e,t])=>t.promise.then(t=>[e,t]))).then(e=>Object.fromEntries(e))},get hash(){return Ea(t.map(([e,t])=>t.hash).join(`:`))},getConsentMeta:n(`getConsentMeta`),reset(){i(),o()}}}var Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo=o((()=>{K(),Sr(),O(),Qa=Symbol(`VENDORLESS_GVLID`),$a=`gdpr`,eo=`coppa`,to=Ya(),no=Ya({getMeta(e,t){if(e.vendorData)return{gdprApplies:e.gdprApplies,consentStringSize:F(e.vendorData.tcString)?e.vendorData.tcString.length:0,generatedAt:t,apiVersion:e.apiVersion}},hashFields:[`gdprApplies`,`consentString`,`addtlConsent`]}),ro=Ya({hashFields:[`applicableSections`,`gppString`]}),io=(()=>{let e=(e=>Object.assign(e,{getCoppa(){return e.getConsentData()},reset(){}}))(Ya({getMeta(e,t){return e}}));return e.enable(),e.setConsentData(!!D.getConfig(`coppa`)),D.getConfig(`coppa`,t=>{e.setConsentData(typeof t.coppa==`object`&&Oi(t.coppa)?!1:!!t.coppa)}),e})(),ao=Xa(),oo=Xa(),so={[$a]:no,usp:to,gpp:ro,[eo]:io},co=Za(),lo={}}));uo(),K();function fo(){return wi()?bi():xi()}var po=function(){let e=fo();return e.ADAGIO=e.ADAGIO||{},e.ADAGIO.pageviewId=e.ADAGIO.pageviewId||ci(),e.ADAGIO.adUnits=e.ADAGIO.adUnits||{},e.ADAGIO.pbjsAdUnits=e.ADAGIO.pbjsAdUnits||[],e.ADAGIO.queue=e.ADAGIO.queue||[],e.ADAGIO.versions=e.ADAGIO.versions||{},e.ADAGIO.versions.pbjs=`11.41.0`,e.ADAGIO.windows=e.ADAGIO.windows||[],e.ADAGIO.isSafeFrameWindow=$i(),e.ADAGIO}(),q,J,Y,mo,ho,go=o((()=>{q=`native`,J=`video`,Y=`banner`,mo=`audio`,ho=[q,J,Y,mo]})),_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo=o((()=>{_o=`accessDevice`,vo=`syncUser`,yo=`enrichUfpd`,bo=`enrichEids`,xo=`fetchBids`,So=`reportAnalytics`,Co=`transmitEids`,wo=`transmitUfpd`,To=`transmitPreciseGeo`,Eo=`transmitTid`,Do=`accessRequestCredentials`}));function ko(e){return`/g,`]]]]>`)}]]>`}function Ao(e){return String(e).replace(/&/g,`&`).replace(/{})),Mo=s(((e,t)=>{s.SYNC=1,s.ASYNC=2,s.QUEUE=4;var n=`fun-hooks`,r=Object.freeze({ready:0}),i=new WeakMap;function a(e,t){return Array.prototype.slice.call(e,t)}function o(e){for(var t;t=e.shift();)t()}function s(e){var t={},c=[];e=Object.assign({},r,e);function l(e,t){if(typeof e==`function`)return m.call(null,`sync`,e,t);if(typeof e==`string`&&typeof t==`function`)return m.apply(null,arguments);if(typeof e==`object`)return d.apply(null,arguments)}var u;e.ready?l.ready=function(){u=!0,o(c)}:u=!0;function d(e,t,n){var r=!0;t===void 0&&(t=Object.getOwnPropertyNames(e).filter(e=>!e.match(/^_/)),r=!1);var i={},a=[`constructor`];do t.forEach(function(t){var r=t.match(/(?:(sync|async):)?(.+)/),o=r[1]||`sync`,s=r[2];if(!i[s]&&typeof e[s]==`function`&&a.indexOf(s)===-1){var c=e[s];i[s]=e[s]=m(o,c,n?[n,s]:void 0)}}),e=Object.getPrototypeOf(e);while(r&&e);return i}function f(e){var r=Array.isArray(e)?e:e.split(`.`);return r.reduce(function(t,i,a){var o=t[i],s=!1;return o||(a===r.length-1?(u||c.push(function(){s||console.warn(n+`: referenced '`+e+`' but it was never created`)}),t[i]=p(function(e){t[i]=e,s=!0})):t[i]={})},t)}function p(e){var t=[],n=[],r=function(){},a={before:function(e,n){return o.call(this,t,`before`,e,n)},after:function(e,t){return o.call(this,n,`after`,e,t)},getHooks:function(e){var r=t.concat(n);typeof e==`object`&&(r=r.filter(function(t){return Object.keys(e).every(function(n){return t[n]===e[n]})}));try{Object.assign(r,{remove:function(){return r.forEach(function(e){e.remove()}),this}})}catch(e){console.error("error adding `remove` to array, did you modify Array.prototype?")}return r},removeAll:function(){return this.getHooks().remove()}};return i.set(a.after,{install:function(i,a,o){this.type=i,r=o,o(t,n),e&&e(a)}}),a;function o(e,i,a,o){var s={hook:a,type:i,priority:o||10,remove:function(){var i=e.indexOf(s);i!==-1&&(e.splice(i,1),r(t,n))}};return e.push(s),e.sort(function(e,t){return t.priority-e.priority}),r(t,n),this}}function m(t,r,o){var l=r.after&&i.get(r.after);if(l){if(l.type!==t)throw n+`: recreated hookable with different type`;return r}var d=o?f(o):p(),m,h={get:function(e,t){return d[t]||Reflect.get.apply(Reflect,arguments)}};u||c.push(v);var g=new Proxy(r,h);return i.get(g.after).install(t,g,_),g;function _(e,n){var r=[],i;e.length||n.length?(e.forEach(o),i=r.push(void 0)-1,n.forEach(o),m=function(e,n,o){var s=r.slice(),c=0,l,u=t===`async`&&typeof o[o.length-1]==`function`&&o.pop();function d(e){t===`sync`?l=e:u&&u.apply(null,arguments)}function f(e){if(s[c]){var r=a(arguments);return f.bail=d,r.unshift(f),s[c++].apply(n,r)}t===`sync`?l=e:u&&u.apply(null,arguments)}return s[i]=function(){var r=a(arguments,1);t===`async`&&u&&(delete f.bail,r.push(f));var i=e.apply(n,r);t===`sync`&&f(i)},f.apply(null,o),l}):m=void 0,v();function o(e){r.push(e.hook)}}function v(){u||t===`sync`&&!(e.ready&s.SYNC)||t===`async`&&!(e.ready&s.ASYNC)?h.apply=m:t===`sync`||!(e.ready&s.QUEUE)?h.apply=function(){throw n+`: hooked function not ready`}:h.apply=function(){var e=arguments;c.push(function(){g.apply(e[1],e[2])})}}}return l.get=f,l}t.exports=s}));function No(e,t,{postInstallAllowed:n=!1}={}){X(`async`,function(r){r.forEach(e=>t(...e)),n&&(Vo[e]=t)},e)([])}function Po(e,...t){let n=Vo[e];if(n)return n(...t);Bo(e).before((e,n)=>{n.push(t),e(n)})}function Fo(e,t){return Object.defineProperties(t,Object.fromEntries([`before`,`after`,`getHooks`,`removeAll`].map(t=>[t,{get:()=>e[t]}]))),t}function Io(e){return Fo(e,function(...t){return t.push(function(){}),e.apply(this,t)})}var Lo,X,Ro,zo,Bo,Vo,Ho=o((()=>{Lo=u(Mo()),Sr(),X=(0,Lo.default)({ready:Lo.default.SYNC|Lo.default.ASYNC|Lo.default.QUEUE}),Ro=vr(),X.ready=(()=>{let e=X.ready;return function(){try{return e.apply(X)}finally{Ro.resolve()}}})(),zo=Ro.promise,Bo=X.get,Vo={}}));function Uo(e){return!!(e!=null&&e.renderer||e!=null&&e.safeRenderer)}function Wo(e){var t;let n=e==null||(t=e.mediaTypes)==null?void 0:t.video;if(n!=null){if(n.plcmt==null){var r,i;n.context===`outstream`||[2,3,4].includes(n.placement)?n.plcmt=4:!((r=n.playbackmethod)==null||(i=r.some)==null)&&i.call(r,e=>[2,6].includes(e))&&(n.plcmt=2)}let t=Or(n.playerSize,2)?n.playerSize:Array.isArray(n.playerSize)&&Or(n.playerSize[0])?n.playerSize[0]:null,a=I(n.w)&&I(n.h)?[n.w,n.h]:null,o=!1;t==null?a!=null&&(n.playerSize==null?n.playerSize=[a]:o=!0):[`w`,`h`].forEach((e,r)=>{n[e]!=null&&n[e]!==t[r]?o=!0:n[e]=t[r]}),o&&U(`Ad unit "${e.code} has conflicting playerSize and w/h`,e)}}function Go(e,{index:t=Z.index}={}){var n;let r=(n=t.getMediaTypes(e))==null?void 0:n.video,i=r&&(r==null?void 0:r.context),a=r&&(r==null?void 0:r.useCacheKey),o=t.getAdUnit(e);return Xo(e,o,r,i,a)}var Ko,qo,Jo,Yo,Xo,Zo=o((()=>{K(),O(),Ho(),gu(),fr(),Ko=`outstream`,qo=`instream`,Jo=[[`mimes`,e=>Array.isArray(e)&&e.length>0&&e.every(e=>typeof e==`string`)],[`minduration`,z],[`maxduration`,z],[`startdelay`,z],[`maxseq`,z],[`poddur`,z],[`protocols`,Or],[`w`,z],[`h`,z],[`podid`,F],[`podseq`,z],[`rqddurs`,Or],[`placement`,z],[`plcmt`,z],[`linearity`,z],[`skip`,e=>[1,0].includes(e)],[`skipmin`,z],[`skipafter`,z],[`sequence`,z],[`slotinpod`,z],[`mincpmpersec`,I],[`battr`,Or],[`maxextended`,z],[`minbitrate`,z],[`maxbitrate`,z],[`boxingallowed`,z],[`playbackmethod`,Or],[`playbackend`,z],[`delivery`,Or],[`pos`,z],[`api`,Or],[`companiontype`,Or],[`poddedupe`,Or]],Yo=new Map(Jo),Xo=X(`sync`,function(e,t,n,r,i){if(n&&(i||r!==`outstream`)){let{url:t,useLocal:n,allowVastXmlOnly:r}=D.getConfig(`cache`)||{};return!t&&!n&&e.vastXml&&!e.vastUrl?r===!0?(U(`This bid contains only vastXml, and caching is disabled. Proceeding because cache.allowVastXmlOnly is enabled.`),!0):(W(` This bid contains only vastXml and will not work when a prebid cache url is not specified. Try enabling either prebid cache with ${lr()}.setConfig({ cache: {url: "..."} }); or local cache with ${lr()}.setConfig({ cache: { useLocal: true }}); `),!1):!!(e.vastUrl||e.vastXml)}return r===`outstream`&&!i?Uo(e)||Uo(t)||Uo(n):!0},`checkVideoBidSetup`)})),Qo,$o,es,ts,ns=o((()=>{Qo=`prebid`,$o=`bidder`,es=`userId`,ts=`analytics`}));function rs(e,t){var n,r,i;let a=!(t==null||(n=t.impression)==null)&&n.length?t.impression.map(e=>`${ko(e)}`).join(``):``,o=!(t==null||(r=t.error)==null)&&r.length?t.error.map(e=>`${ko(e)}`).join(``):``,s=``;return!(t==null||(i=t.trackingEvents)==null)&&i.length&&(s=`${t.trackingEvents.map(({event:e,url:t})=>`${ko(t)}`).join(``)}`),`prebid.org wrapper`+ko(e)+``+a+o+``+s+``}function is(e,{index:t=Z.index}={}){let n=e.vastXml,r=t.getAuction(e),i={type:`xml`,value:n,ttlseconds:Number(e.ttl)+us};return D.getConfig(`cache.vasttrack`)&&(i.bidder=e.bidder,i.bidid=e.requestId,i.aid=e.auctionId),r!=null&&(i.timestamp=r.getAuctionStart()),typeof e.customCacheKey==`string`&&e.customCacheKey!==``&&(i.key=e.customCacheKey),i}function as(e){return{success:function(t){let n;try{n=JSON.parse(t).responses}catch(t){e(t,[]);return}n?e(null,n):e(Error(`The cache server didn't respond with a responses property.`),[])},error:function(t,n){e(Error(`Error storing video ad in the cache: ${t}: ${JSON.stringify(n)}`),[])}}}function os(e,t,n=e=>mm(Qo,`cache`,e)){let r={puts:e.map(e=>is(e))};n(D.getConfig(`cache.timeout`))(D.getConfig(`cache.url`),as(t),JSON.stringify(r),{contentType:`text/plain`,withCredentials:!0})}function ss(e,t){return`${e}?uuid=${t}`}function cs({bidResponse:e,auctionInstance:t,afterBidAdded:n,videoMediaType:r}){var i,a;ps(e);let o=r&&(r==null?void 0:r.context),s=r&&(r==null?void 0:r.useCacheKey),{useLocal:c,url:l,ignoreBidderCacheKey:u}=D.getConfig(`cache`)||{},d=(i=e.safeRenderer)!=null&&i.url?e.safeRenderer.requiresVastUrl:(a=e.renderer)==null?void 0:a.requiresVastUrl,f=e.mediaType===`video`&&o===`outstream`&&d===!0&&!e.vastUrl;if(f&&(!e.vastXml||!c&&!l)){W(`Video renderer requires vastUrl, but this bid has no VAST XML or video cache is disabled`),n();return}let p=(c||l)&&(s||o!==`outstream`||f),m=!e.videoCacheKey||u;if(p&&m){xs(t,e,n,r);return}if(p&&!m&&!e.vastUrl){W(`videoCacheKey specified but not required vastUrl for video bid`),n();return}Al(t,e),n()}function ls(e){let t=e.map(e=>e.bidResponse);function n(e){W(`Failed to save to the video cache: ${e}. Video bids will be discarded:`,t)}let r=D.getConfig(`cache.url`);hs.store(t,function(t,i){t?n(t):e.length===i.length?i.forEach((t,n)=>{let{auctionInstance:i,bidResponse:a,afterBidAdded:o}=e[n];t.uuid===``?U(`Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded.`):(a.cacheUrl=r,ms(a,ss(r,t.uuid),t.uuid),Al(i,a),o())}):W(`expected ${e.length} cache IDs, got ${i.length} instead`)})}var us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss=o((()=>{ym(),O(),gu(),K(),jo(),du(),Ho(),Zo(),ns(),us=15,ds=new Map,fs=e=>{let t=e.vastXml,n=URL.createObjectURL(new Blob([t],{type:`text/xml`}));ms(e,n),ds.set(e.videoCacheKey,n)},ps=X(`sync`,function(e){!e.vastXml&&e.vastUrl&&(e.vastXml=rs(e.vastUrl,e.vastTrackers))},`updateVast`),ms=(e,t,n)=>{e.videoCacheKey=n||ci(),e.vastUrl||(e.vastUrl=t)},hs={store:os},D.getConfig(`cache`,({cache:e})=>{gs=typeof e.batchSize==`number`&&e.batchSize>0?e.batchSize:1,_s=typeof e.batchTimeout==`number`&&e.batchTimeout>0?e.batchTimeout:0,e.useLocal&&!vs&&(vs=Z.onExpiry(e=>{e.getBidsReceived().forEach(e=>{let t=ds.get(e.videoCacheKey);t&&t.startsWith(`blob`)&&URL.revokeObjectURL(t),ds.delete(e.videoCacheKey)})}))}),ys=(e=setTimeout,t=ls)=>{let n=[[]],r=!1,i=e=>e();return function(a,o,s){let c=_s>0?e:i;n[n.length-1].length>=gs&&n.push([]),n[n.length-1].push({auctionInstance:a,bidResponse:o,afterBidAdded:s}),r||(r=!0,c(()=>{n.forEach(t),n=[[]],r=!1},_s))}},bs=ys(),xs=X(`async`,function(e,t,n,r){D.getConfig(`cache.useLocal`)?(fs(t),Al(e,t),n()):bs(e,t,n)},`callPrebidCache`)}));function Cs(e){return function(t,n,r){let i={[Ts]:t,[Es]:n,[ws]:`${t}.${n}`};return t===`bidder`&&(i[Ds]=e(n)),Ps(Object.assign(i,r))}}var ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs=o((()=>{ns(),Ho(),ws=`component`,Ts=`componentType`,Es=`componentName`,Ds=`adapterCode`,Os=`storageType`,ks=`storageKey`,As=`write`,js=`configName`,Ms=`syncType`,Ns=`_config`,Ps=X(`sync`,e=>e)}));function Is(e=Ra(`Activity control:`)){let t={};function n(e){return t[e]=t[e]||[],t[e]}function r(t,n,r,i){let a;try{a=r(i)}catch(r){e.logError(`Exception in rule ${n} for '${t}'`,r),a={allow:!1,reason:r}}return a&&Object.assign({activity:t,name:n,component:i.component},a)}let i={};function a({activity:t,name:n,allow:r,reason:a,component:o}){let s=`${n} ${r?`allowed`:`denied`} '${t}' for '${o}'${a?`:`:``}`,c=i.hasOwnProperty(s);if(c&&clearTimeout(i[s]),i[s]=setTimeout(()=>delete i[s],1e3),!c){let t=[s];a&&t.push(a),(r?e.logInfo:e.logWarn).apply(e,t)}}return[function(e,t,r,i=10){let a=n(e),o=a.findIndex(([e])=>i=0&&a.splice(e,1)}},function(e,t){let i,o;for(let[s,c,l]of n(e)){if(i!==s&&o)break;i=s;let n=r(e,c,l,t);if(n)if(n.allow)o=n;else return a(n),!1}return o&&a(o),!0}]}var Ls,Rs,zs=o((()=>{K(),Fs(),[Ls,Rs]=Is()}));function Bs(e,t,n){return!t||!n||!e?(W(`cannot load external script without url, moduleType, or moduleCode`),!1):!!Rs(`loadExternalScript`,Zp(t,n))}function Vs(e,t,n,r,i,a){if(!Bs(e,t,n))return;let o=typeof r==`function`||typeof(r==null?void 0:r.success)==`function`||typeof(r==null?void 0:r.error)==`function`;function s(e,t){if(t==null)if(typeof e==`function`)e();else{var n;(n=e.success)==null||n.call(e)}else{var r;(r=e.error)==null||r.call(e,t)}}i||(i=document);let c=f(i,e);if(c)return o&&(c.loaded?s(r,c.error):c.callbacks.push(r)),c.tag;let l=Ws.get(i)||{},u={error:null,loaded:!1,tag:null,callbacks:[]};return l[e]=u,Ws.set(i,l),o&&u.callbacks.push(r),U(`module ${n} is loading external JavaScript`),d(e,function(){u.loaded=!0;try{for(let e=0;e{Oo(),Qp(),zs(),K(),pe(),Ws=new WeakMap,Gs=ka(function(e){return new Promise((t,n)=>{let r=document.createElement(`link`);r.rel=`preload`,r.as=`script`,r.href=e,r.onload=()=>t(),r.onerror=n,Ni(r)})}),Hs.clear=Gs.clear}));function qs(e){return!!(e&&(e.url||e.renderNow))}function Js(e,t,n){let r=null;e.config&&e.config.documentResolver&&(r=e.config.documentResolver(t,document,n)),r||(r=document),e.documentContext=r,e.render(t,e.documentContext)}function Ys(e){var t;let n=Xs.adUnits.find(t=>t.code===e);if(!n)return!1;let r=n==null?void 0:n.renderer,i=!!(r&&r.url&&r.render),a=n==null||(t=n.mediaTypes)==null||(t=t.video)==null?void 0:t.renderer,o=!!(a&&a.url&&a.render);return!!(i&&r.backupOnly!==!0||o&&a.backupOnly!==!0)}var Xs,Zs,Qs,$s=o((()=>{Ks(),K(),A(),ns(),je(),Xs=pr(),Zs=`outstream`,Qs=class e{constructor(e){Ae(this,`url`,void 0),Ae(this,`config`,void 0),Ae(this,`handlers`,void 0),Ae(this,`id`,void 0),Ae(this,`renderNow`,void 0),Ae(this,`requiresVastUrl`,void 0),Ae(this,`adUnitCode`,void 0),Ae(this,`loaded`,void 0),Ae(this,`cmd`,void 0),Ae(this,`push`,void 0),Ae(this,`callback`,void 0),Ae(this,`render`,void 0),Ae(this,`documentContext`,void 0),Ae(this,`_render`,void 0);let{url:t,config:n,id:r,callback:i,loaded:a,adUnitCode:o,renderNow:s,requiresVastUrl:c}=e;this.url=t,this.config=n,this.handlers={},this.id=r,this.renderNow=s,this.requiresVastUrl=c,this.adUnitCode=o,this.loaded=a,this.cmd=[],this.push=e=>{if(typeof e!=`function`){W(`Commands given to Renderer.push must be wrapped in a function`);return}this.loaded?e():this.cmd.push(e)},this.callback=i||(()=>{this.loaded=!0,this.process()}),this.render=(...e)=>{let n=()=>{this._render?this._render(...e):U(`No render function was provided, please use .setRender on the renderer`)};Ys(o)?(U(`External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ${o}`),n()):s?n():(this.cmd.unshift(n),Vs(t,Qo,Zs,this.callback,this.documentContext))}}static install(t){let{url:n,config:r,id:i,callback:a,loaded:o,adUnitCode:s,renderNow:c,requiresVastUrl:l}=t;return new e({url:n,config:r,id:i,callback:a,loaded:o,adUnitCode:s,renderNow:c,requiresVastUrl:l})}getConfig(){return this.config}setRender(e){this._render=e}setEventHandlers(e){this.handlers=e}handleVideoEvent({id:e,eventName:t}){typeof this.handlers[t]==`function`&&this.handlers[t](),G(`Prebid Renderer event for id ${e} type ${t}`)}process(){for(;this.cmd.length>0;)try{this.cmd.shift()()}catch(e){W(`Error processing Renderer command on ad unit '${this.adUnitCode}':`,e)}}}}));function ec(e){return e==null?this.defaultScope:e}var tc,nc,rc,ic=o((()=>{K(),A(),Un(),gt(),je(),te(),tc=new WeakSet,nc=class{constructor(e,t){ht(this,tc),Ae(this,`getSettings`,void 0),Ae(this,`defaultScope`,void 0),this.getSettings=e,this.defaultScope=t}get(e,t){let n=this.getOwn(e,t);return n===void 0&&(n=this.getOwn(null,t)),n}getOwn(e,t){return e=b(tc,this,ec).call(this,e),M(this.getSettings(),`${e}.${t}`)}getScopes(){return Object.keys(this.getSettings()).filter(e=>e!==this.defaultScope)}settingsFor(e){return V({},this.ownSettingsFor(null),this.ownSettingsFor(e))}ownSettingsFor(e){return e=b(tc,this,ec).call(this,e),this.getSettings()[e]||{}}},rc=new nc(()=>pr().bidderSettings||{},Dn.BD_SETTING_STANDARD)}));function ac({moduleName:e,moduleType:t,advertiseKeys:n=!0}={},{isAllowed:r=Rs}={}){function i(i,a,o,s){let c=e,l=D.getCurrentBidder();l&&t===`bidder`&&Q.aliasRegistry[l]===e&&(c=l);let u={[Os]:a,[As]:s};return n&&o!=null&&(u[ks]=o),i({valid:r(_o,Zp(t,c,u))})}function a(e,t,n,r,a){if(a&&typeof a==`function`)fc.push(function(){a(i(e,t,n,r))});else return i(e,t,n,r)}let o=function(e,t,n,r,i,o){return a(function(a){if(a&&a.valid){let a=i&&i!==``?` ;domain=${encodeURIComponent(i)}`:``,o=n&&n!==``?` ;expires=${n}`:``,s=(r==null?void 0:r.toLowerCase())===`none`?`; Secure`:``;document.cookie=`${e}=${encodeURIComponent(t)}${o}; path=/${a}${r?`; SameSite=${r}`:``}${s}`}},dc,e,!0,o)},s=function(e,t){return a(function(t){if(t&&t.valid){let t=window.document.cookie.match(`(^|;)\\s*`+e+`\\s*=\\s*([^;]*)\\s*(;|$)`);return t?decodeURIComponent(t[2]):null}return null},dc,e,!1,t)},c=function(e){return a(function(e){return e&&e.valid?da()&&pc():!1},dc,null,!1,e)};function l(e){let t=e.charAt(0).toUpperCase()+e.substring(1),n=()=>window[e],r=function(t){return a(function(t){if(t&&t.valid)try{return!!n()}catch(t){W(`${e} api disabled`)}return!1},uc,null,!1,t)};return{[`has${t}`]:r,[`${e}IsEnabled`](e){return a(function(e){if(e&&e.valid)try{return n().setItem(`prebid.cookieTest`,`1`),n().getItem(`prebid.cookieTest`)===`1`}catch(e){}finally{try{n().removeItem(`prebid.cookieTest`)}catch(e){}}return!1},uc,null,!1,e)},[`setDataIn${t}`](e,t,i){return a(function(i){i&&i.valid&&r()&&n().setItem(e,t)},uc,e,!0,i)},[`getDataFrom${t}`](e,t){return a(function(t){return t&&t.valid&&r()?n().getItem(e):null},uc,e,!1,t)},[`removeDataFrom${t}`](e,t){return a(function(t){t&&t.valid&&r()&&n().removeItem(e)},uc,e,!0,t)}}}return C(C(C({setCookie:o,getCookie:s,cookiesAreEnabled:c},l(`localStorage`)),l(`sessionStorage`)),{},{findSimilarCookies:function(e,t){return a(function(t){if(t&&t.valid){let t=[];if(ua()){let n=document.cookie.split(`;`);for(;n.length;){let r=n.pop(),i=r.indexOf(`=`);i=i<0?r.length:i,decodeURIComponent(r.slice(0,i).replace(/^\s+/,``)).indexOf(e)>=0&&t.push(decodeURIComponent(r.slice(i+1)))}}return t}},dc,e,!1,t)}})}function oc({moduleType:e,moduleName:t,bidderCode:n}={}){function r(){throw Error(`Invalid invocation for getStorageManager: must set either bidderCode, or moduleType + moduleName`)}return n?((e&&e!==`bidder`||t)&&r(),e=$o,t=n):(!t||!e)&&r(),ac({moduleType:e,moduleName:t})}function sc(e){return ac({moduleName:e,moduleType:Qo})}function cc(){if(!ua())return{allow:!1}}function lc(e,t=rc){if(e.componentType!==`bidder`)return;let n=t.get(e[Ds],`storageAllowed`);if(!n||n===!0)n=!!n;else{let t=e[Os];n=Array.isArray(n)?n.some(e=>e===t):n===t}if(!n)return{allow:n}}var uc,dc,fc,pc,mc,hc=o((()=>{K(),ic(),ns(),zs(),Fs(),Oo(),O(),Ho(),Xp(),Qp(),w(),uc=`html5`,dc=`cookie`,fc=[],pc=(()=>{let e=sc(`storage`);return ka(function(t,n=e){let r=new Date(sa()+10*1e3).toUTCString(),i=`_rdc${Date.now()}`,a=`writeable`;return n.setCookie(i,a,r,`Lax`,t),n.getCookie(i)===a?(n.setCookie(i,``,`Thu, 01 Jan 1970 00:00:01 GMT`,void 0,t),!0):!1})})(),Ls(_o,`deviceAccess config`,cc),Ls(Do,`deviceAccess config`,cc),Ls(_o,`bidderSettings.*.storageAllowed`,lc),mc=X(`sync`,(e,t)=>{})}));function gc(){return!ta()&&!na()&&!ra()&&yc.cookiesAreEnabled()}function _c(e){let t={},n=s(),r=new Set,i={},a={image:!0,iframe:!1},o=e.config;D.getConfig(`userSync`,e=>{if(e.userSync){let t=e.userSync.filterSettings;L(t)&&!t.image&&!t.all&&(e.userSync.filterSettings.image={bidders:`*`,filter:`include`})}o=Object.assign(o,e.userSync)}),e.regRule(vo,`userSync config`,e=>{if(!o.syncEnabled)return{allow:!1,reason:`syncs are disabled`};if(e.componentType===`bidder`){let n=e[Ms],r=e[Es];if(!t.canBidderRegisterSync(n,r))return{allow:!1,reason:`${n} syncs are not enabled for ${r}`}}});function s(){return{image:[],iframe:[]}}function c(){if(!(!o.syncEnabled||!e.browserSupportsCookies)){try{d(),u()}catch(e){return W(`Error firing user syncs`,e)}n=s()}}function l(e,t){Zi(e).forEach(t)}function u(){a.image&&l(n.image,e=>{let[t,n]=e;G(`Invoking image pixel user sync for bidder: ${t}`),o.usePoliteSync?Fi(n):Li(n)})}function d(){a.iframe&&l(n.iframe,e=>{let[t,r,i]=e;G(`Invoking iframe user sync for bidder: ${t}`),o.usePoliteSync?Ii(r,void 0,void 0,i):Bi(r,void 0,void 0,i),f(n,t)})}function f(e,t){e.image=e.image.filter(e=>e[0]!==t)}function p(e,t){return e[t]?e[t]+=1:e[t]=1,e}t.registerSync=(t,a,s,c)=>{if(r.has(a))return G(`already fired syncs for "${a}", ignoring registerSync call`);if(!o.syncEnabled||!R(n[t]))return U(`User sync type "${t}" not supported`);if(!a)return U(`Bidder is required for registering sync`);if(o.syncsPerBidder!==0&&Number(i[a])>=o.syncsPerBidder)return U(`Number of user syncs exceeded for "${a}"`);e.isAllowed(`syncUser`,Zp(`bidder`,a,{syncType:t,syncUrl:s}))&&(n[t].push([a,s,c]),i=p(i,a))},t.bidderDone=r.add.bind(r);function m(e,t){let n=o.filterSettings;if(h(n,e)){a[e]=!0;let r=n.all?n.all:n[e],i=r.bidders===`*`?[t]:r.bidders;return{include:(e,t)=>!e.includes(t),exclude:(e,t)=>e.includes(t)}[r.filter||`include`](i,t)}return!a[e]}function h(e,t){if(e.all&&e[t])return U(`Detected presence of the "filterSettings.all" and "filterSettings.${t}" in userSync config. You cannot mix "all" with "iframe/image" configs; they are mutually exclusive.`),!1;let n=e.all?e.all:e[t],r=e.all?`all`:t;if(!n)return!1;let i=n.filter,a=n.bidders;return i&&i!==`include`&&i!==`exclude`?(U(`UserSync "filterSettings.${r}.filter" setting '${i}' is not a valid option; use either 'include' or 'exclude'.`),!1):a!==`*`&&!(Array.isArray(a)&&a.length>0&&a.every(e=>F(e)&&e!==`*`))?(U(`Detected an invalid setup in userSync "filterSettings.${r}.bidders"; use either '*' (to represent all bidders) or an array of bidders.`),!1):!0}return t.syncUsers=(e=0)=>{if(e)return setTimeout(c,Number(e));c()},t.triggerUserSyncs=()=>{o.enableOverride&&t.syncUsers()},t.removeUserSyncs=()=>Vi(),t.canBidderRegisterSync=(e,t)=>!(o.filterSettings&&m(e,t)),t}var vc,yc,bc,xc=o((()=>{K(),O(),hc(),zs(),Oo(),Fs(),ns(),Qp(),vc={syncEnabled:!0,filterSettings:{image:{bidders:`*`,filter:`include`}},syncsPerBidder:5,syncDelay:3e3,auctionDelay:500,usePoliteSync:!1},D.setDefaults({userSync:N(vc)}),yc=sc(`usersync`),bc=_c(Object.defineProperties({config:D.getConfig(`userSync`),isAllowed:Rs,regRule:Ls},{browserSupportsCookies:{get:function(){return gc()}}}))}));function Sc(){if(document.hidden)wc=Date.now();else{var e;Tc+=Date.now()-((e=wc)==null?0:e),wc=null,Ec.forEach(({callback:e,startTime:t,setTimerId:n})=>n(Cc(e,Tc-t)())),Ec=[]}}function Cc(e,t){let n=Tc,r=setTimeout(()=>{Tc===n&&wc==null?e():wc==null?r=Cc(e,Tc-n)():Ec.push({callback:e,startTime:n,setTimerId(e){r=e}})},t);return()=>r}var wc,Tc,Ec,Dc=o((()=>{wc=null,Tc=0,Ec=[],document.addEventListener(`visibilitychange`,Sc)}));function Oc({startTime:e=sa,ttl:t=()=>null,monotonic:n=!1,slack:r=5e3}={}){let i=new Map,a=[],o=[],s=n?e=>o.push(e):e=>o.splice(Na(o,e,e=>e.expiry),0,e),c,l;function u(){if(l&&clearTimeout(l()),o.length>0){let e=sa();c=Math.max(e,o[0].expiry+r),l=Cc(()=>{let e=sa(),t=0;for(let n of o){if(n.expiry>e)break;a.forEach(e=>{try{e(n.item)}catch(e){W(e)}}),i.delete(n.item),t++}o.splice(0,t),l=null,u()},c-e)}else l=null}function d(n){let i={},a=f,o;function d(){a===f&&i.start!=null&&i.delta!=null&&(o=i.start+i.delta,s(h),(l==null||c>o+r)&&u())}let[p,m]=Object.entries({start:e,delta:t}).map(([e,t])=>{let r;return function(){let a=r={};j.resolve(t(n)).then(t=>{a===r&&(i[e]=t,d())})}}),h={item:n,refresh:m,get expiry(){return o}};return p(),m(),h}let f={};return{[Symbol.iterator]:()=>i.keys(),add(e){!i.has(e)&&i.set(e,d(e))},has(e){return i.has(e)},delete(e){let t=i.get(e);if(t){for(let e=0;e{let t=a.indexOf(e);t>=0&&a.splice(t,1)}}}}var kc=o((()=>{Sr(),K(),Dc()})),Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc=o((()=>{K(),Un(),kc(),O(),Wr(),Ac=`eventHistoryTTL`,jc=null,Mc=Oc({monotonic:!0,ttl:()=>jc}),D.getConfig(Ac,e=>{let t=jc,n=e==null?void 0:e[Ac];jc=typeof n==`number`?n*1e3:null,t!==jc&&Mc.refresh()}),Nc=Object.values(T),Pc=An,Fc=0,Ic=new WeakMap,Lc=function(){let e={};function t(t,n){G(`Emitting event for: `+t);let r=n[0]||{},i=r[Pc[t]],a=e[t]||{que:[]};var o=Object.keys(a);let s=[],c={eventType:t,args:r,id:i,elapsedTime:ca(),sequence:Fc++};Mc.add(c),i&&o.includes(i)&&s.push(...a[i].que),s.push(...a.que),(s||[]).forEach(function(e){if(e)try{e(c,...n)}catch(e){W(`Error executing handler:`,`events.js`,e,t)}})}function n(e){return Nc.includes(e)}function r(t,r,i){if(n(t)){let n=e[t]||{que:[]};i?(n[i]=n[i]||{que:[]},n[i].que.push(r)):n.que.push(r),e[t]=n}else W(`Wrong event name : `+t+` Valid event names :`+Nc)}return{has:n,listen:r,on:function(e,t,n){let i=Ic.has(t)?Ic.get(t):(e,...n)=>t(...n);Ic.set(t,i),r(e,i,n)},emit:function(e,...n){t(e,n)},off:function(t,n,r){var i,a;n!=null&&Ic.has(n)&&(n=Ic.get(n));let o=e[t];if(Oi(o)||Oi(o.que)&&Oi(o[r])||r&&(Oi(o[r])||Oi(o[r].que)))return;let s=e=>e.filter(e=>e!==n);r&&((i=o[r].que)==null?void 0:i.length)>0?o[r].que=s(o[r].que):((a=o.que)==null?void 0:a.length)>0&&(o.que=s(o.que)),e[t]=o},get:function(){return e},addEvents:function(e){Nc=Nc.concat(e)},getEvents:function(){return Mc.toArray().map(e=>Object.assign({},e))}}}(),Nr(Lc.emit.bind(Lc)),{on:Rc,off:zc,get:Bc,getEvents:Vc,emit:Hc,addEvents:Uc,has:Wc,listen:Gc}=Lc}));function qc(e,t,n){return function(...r){t&&t();try{return e.apply(this,r)}finally{n&&n()}}}function Jc({now:e=el,mkNode:t=Xc,mkTimer:n=Yc,mkRenamer:r=e=>e,nodes:i=tl}={}){return function(){function a(o,s=e=>({forEach(t){t(e)}})){s=r(s);function c(e){return function(t){return o.dfWalk({visit(n,r){let i=r[e];if(i.hasOwnProperty(t))return i[t]}})}}let l=c(`timestamps`);function u(e,t){let n=s(e);o.dfWalk({follow(e,t){return t.propagate&&(!e||!e.stopPropagation)},visit(e,r){n.forEach(n=>{e==null?r.metrics[n]=t:(r.groups.hasOwnProperty(n)||(r.groups[n]=[]),r.groups[n].push(t))})}})}function d(t){o.timestamps[t]=e()}function f(t,n){let r=l(t),i=r==null?null:e()-r;return n!=null&&u(n,i),i}function p(e,t,n){let r=l(e),i=l(t),a=r!=null&&i!=null?i-r:null;return n!=null&&u(n,a),a}function m(t){return n(e,e=>u(t,e))}function h(e,t){return m(e).stopAfter(t)()}function g(e,t,n){let r=m(e);return n(function(e){let t=r.stopBefore(e);return t.bail=e.bail&&r.stopBefore(e.bail),t.stopTiming=r,t.untimed=e,t}(t))}function _(){let e={};return o.dfWalk({visit(t,n){let r=(t,n)=>{Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n)};Object.entries(n.metrics).forEach(([e,t])=>r(e,t)),(!t||t.includeGroups)&&Object.entries(n.groups).forEach(([e,t])=>r(e,t))}}),e}function v({propagate:e=!0,stopPropagation:n=!1,includeGroups:r=!1}={}){return a(t([[o,{propagate:e,stopPropagation:n,includeGroups:r}]]),s)}function y(e,{propagate:t=!0,stopPropagation:n=!1,includeGroups:r=!1}={}){let a=i.get(e);a!=null&&a.addParent(o,{propagate:t,stopPropagation:n,includeGroups:r})}function ee(e){return a(o,e)}function b(){return a(o.newSibling(),s)}let te={startTiming:m,measureTime:h,measureHookTime:g,checkpoint:d,timeSince:f,timeBetween:p,setMetric:u,getMetrics:_,fork:v,join:y,newMetrics:b,renameWith:ee,toJSON(){return _()}};return i.set(te,o),te}return a(t([]))}}function Yc(e,t){let n=e(),r=!1;function i(){r||(t(e()-n),r=!0)}return i.stopBefore=e=>qc(e,i),i.stopAfter=e=>qc(e,null,i),i}function Xc(e){return{metrics:{},timestamps:{},groups:{},addParent(t,n){e.push([t,n])},newSibling(){return Xc(e.slice())},dfWalk({visit:t,follow:n=()=>!0,visited:r=new Set,inEdge:i}={}){let a;if(!r.has(this)){if(r.add(this),a=t(i,this),a!=null)return a;for(let[o,s]of e)if(n(i,s)&&(a=o.dfWalk({visit:t,follow:n,visited:r,inEdge:s}),a!=null))return a}}}}function Zc(e){return rl&&e||nl}function Qc(e,t){return function(n,r){return(i,...a)=>Zc(t.apply(this,a)).measureHookTime(e+n,i,e=>r.call(this,e,...a))}}var $c,el,tl,nl,rl,il,al,ol,sl=o((()=>{O(),$c=`performanceMetrics`,el=window.performance&&window.performance.now?()=>window.performance.now():()=>Date.now(),tl=new WeakMap,nl=(()=>{let e=function(){},t=()=>({}),n={forEach:e},r=()=>null;r.stopBefore=e=>e,r.stopAfter=e=>e;let i=Object.defineProperties({dfWalk:e,newSibling:()=>i,addParent:e},Object.fromEntries([`metrics`,`timestamps`,`groups`].map(e=>[e,{get:t}])));return Jc({now:()=>0,mkNode:()=>i,mkRenamer:()=>()=>n,mkTimer:()=>r,nodes:{get:e,set:e}})()})(),rl=!0,D.getConfig($c,e=>{rl=!!e[$c]}),il=(()=>{let e=Jc();return function(){return rl?e():nl}})(),al=Qc(`requestBids.`,e=>e.metrics),ol=Qc(`addBidResponse.`,(e,t)=>t.metrics)}));function cl(e,t,n,r){let i=e==null?void 0:e.adapterCode,a=(e==null?void 0:e.bidderCode)||(r==null?void 0:r.bidder),o=t.get(e==null?void 0:e.adapterCode,`adjustAlternateBids`);return t.getOwn(a,n)||t.get(o?i:a,n)}function ll(e,t,n,{index:r=Z.index,bs:i=rc}={}){n=n||r.getBidRequest(t);let a=cl(t,i,`bidCpmAdjustment`,n);if(a&&typeof a==`function`)try{return a(e,Object.assign({},t),n)}catch(e){W(`Error during bid adjustment`,e)}return e}var ul=o((()=>{gu(),ic(),K()}));function dl(e){return e.ttl-(e.hasOwnProperty(`ttlBuffer`)?e.ttlBuffer:vl)}function fl(){return yl}function pl(e){let t=yl;return t==null&&bl==null?null:(e==null?void 0:e.status)===Fn.BID_TARGETING_SET&&typeof bl==`number`?bl:t}function ml(){xl.forEach(e=>e(yl))}function hl(e){xl.push(e)}var gl,_l,vl,yl,bl,xl,Sl=o((()=>{O(),K(),Un(),gl=`minBidCacheTTL`,_l=`minTargetedBidCacheTTL`,vl=1,yl=null,bl=null,xl=[],D.getConfig(`ttlBuffer`,e=>{typeof e.ttlBuffer==`number`?vl=e.ttlBuffer:W(`Invalid value for ttlBuffer`,e.ttlBuffer)}),D.getConfig(gl,e=>{let t=yl;yl=e==null?void 0:e[gl],yl=typeof yl==`number`?yl:null,t!==yl&&ml()}),D.getConfig(_l,e=>{let t=bl;bl=e==null?void 0:e[_l],bl=typeof bl==`number`?bl:null,t!==bl&&ml()})}));function Cl(e){let t=e.slice();return t.bids=t,t}var wl=o((()=>{}));function Tl(e,t,n={}){var r;let i=(r=n.bs)==null?rc:r,a=Object.assign({},e),o=e.cpm,s=cl(e,i,`bidDesirabilityAdjustment`,t);if(typeof s!=`function`)return o;try{return s(o,a,t)}catch(e){return W(`Error during bid desirability adjustment`,e),o}}function El(e,t){return t.desirability&&e.desirability?t.desirability-e.desirability:t.cpm-e.cpm}var Dl=o((()=>{ic(),K(),ul()}));function Ol({adUnits:e,adUnitCodes:t,callback:n,cbTimeout:r,labels:i,auctionId:a,ortb2Fragments:o,metrics:s}){s=Zc(s);let c=e,l=i,u=t,d=a||ci(),f=r,p=new Set,m=vr(),h=vr(),g=[],_=n,v=[],y=Oc({startTime:e=>e.responseTimestamp,ttl:e=>{let t=pl(e);return t==null?null:Math.max(t,e.ttl)*1e3}}),ee=[],b=[],te,x,ne,S,re=[];function ie(e){v=v.concat(e)}function ae(e){y.add(e)}function oe(e){g=g.concat(e)}function se(e){ee=ee.concat(e)}function ce(e){re=re.concat(e)}function le(){return{auctionId:d,timestamp:te,auctionEnd:x,auctionStatus:S,adUnits:c,adUnitCodes:u,labels:l,bidderRequests:v,noBids:ee,bidsReceived:y.toArray(),bidsRejected:g,winningBids:b,timeout:f,metrics:s,seatNonBids:re}}function ue(){ne=setTimeout(()=>de(!0),f)}function de(t){if(t?Hc(T.AUCTION_TIMEOUT,le()):clearTimeout(ne),x===void 0){let n=[];t&&(G(`Auction ${d} timedOut`),n=v.filter(e=>!p.has(e.bidderRequestId)).flatMap(e=>e.bids),n.length&&Hc(T.BID_TIMEOUT,n)),S=Jl,x=Date.now(),s.checkpoint(`auctionEnd`),s.timeBetween(`requestBids`,`auctionEnd`,`requestBids.total`),s.timeBetween(`callBids`,`auctionEnd`,`requestBids.callBids`),m.resolve(),Hc(T.AUCTION_END,le()),iu(c,a,function(){try{if(_!=null){let e=y.toArray().filter(e=>u.includes(e.adUnitCode)).reduce(Ul,{});_.apply($l,[e,t,d]),_=null}}catch(e){W(`Error executing bidsBackHandler`,null,e)}finally{var r;n.length&&Q.callTimedOutBidders(e,n,f);let t=(r=D.getConfig(`userSync`))==null?{}:r;t.enableOverride||Gl(t.syncDelay)}})}}function fe(){D.resetBidder(),H(`Bids Received for Auction with id: ${d}`,y.toArray()),S=Jl,de(!1)}function pe(e){p.add(e)}function me(){S=Kl,te=Date.now();let e=s.measureTime(`requestBids.makeRequests`,()=>Q.makeBidRequests(c,te,d,f,l,o,s));H(`Bids Requested for Auction with id: ${d}`,e),s.checkpoint(`callBids`),e.length<1?(U(`No valid bid requests returned for auction`),fe()):ru.call({dispatch:he,context:this},e)}function he(e){e.forEach(e=>{ie(e)});let t={},n={bidRequests:e,run:()=>{eu(this),ue(),S=ql,Hc(T.AUCTION_INIT,le());let n=kl(fe,this);Q.callBids(c,e,n.addBidResponse,n.adapterDone,{request(e,n){i(Xl,n),i(t,e),Zl[e]||(Zl[e]={SRA:!0,origin:n}),t[e]>1&&(Zl[e].SRA=!1)},done(e){Xl[e]--,Ql[0]&&r(Ql[0])&&Ql.shift()}},f,pe,o),h.resolve()}};r(n)||(U(`queueing auction due to limited endpoint capacity`),Ql.push(n));function r(e){let t=!0,n=D.getConfig(`maxRequestsPerOrigin`)||Yl;return e.bidRequests.some(e=>{let r=1,i=e.src!==void 0&&e.src===Pn.SRC?`s2s`:e.bidderCode;return e.alwaysHasCapacity&&!D.getConfig(`forceMaxRequestsPerOrigin`)?!1:(Zl[i]&&(Zl[i].SRA===!1&&(r=Math.min(e.bids.length,n)),Xl[Zl[i].origin]+r>n&&(t=!1)),!t)}),t&&e.run(),t}function i(e,t){e[t]===void 0?e[t]=1:e[t]++}}function ge(t){b=b.concat(t),Q.callBidWonBidder(t.adapterCode||t.bidder,t,e),t.deferBilling||Q.triggerBilling(t)}function _e(e){Q.callSetTargetingBidder(e.adapterCode||e.bidder,e),y.refresh()}return{addBidReceived:ae,addBidRejected:oe,addNoBid:se,addSeatNonBids:ce,callBids:me,addWinningBid:ge,setBidTargeting:_e,getWinningBids:()=>b,getAuctionStart:()=>te,getAuctionEnd:()=>x,getTimeout:()=>f,getAuctionId:()=>d,getAuctionStatus:()=>S,getAdUnits:()=>c,getAdUnitCodes:()=>u,getBidRequests:()=>v,getBidsReceived:()=>y.toArray(),getNoBids:()=>ee,getNonBids:()=>re,getFPD:()=>o,getMetrics:()=>s,refreshBidTTLs:()=>y.refresh(),end:m.promise,requestsDone:h.promise,getProperties:le}}function kl(e,t,{index:n=Z.index}={}){let r=0,i=!1,a=new Set,o={};function s(){r--,i&&r===0&&e()}function c(e,t,n){return o[t.requestId]=!0,Nl(t,e),r++,n(s)}function l(e,r){c(e,r,e=>{let i=Pl(r);Hc(T.BID_ACCEPTED,i),i.mediaType===`video`||i.mediaType===`audio`?jl(t,i,e):(Ad(i)&&Hd(i,n.getAdUnit(i)),Al(t,i),e())})}function u(e,n,r){return c(e,n,e=>{n.rejectionReason=r,U(`Bid from ${n.bidder||`unknown bidder`} was rejected: ${r}`,n),Hc(T.BID_REJECTED,n),t.addBidRejected(n),e()})}function d(){let n=this,s=t.getBidRequests(),c=D.getConfig(`auctionOptions`);if(a.add(n),c&&!Oi(c)){let e=c.secondaryBidders;e&&!s.every(t=>e.includes(t.bidderCode))&&(s=s.filter(t=>!e.includes(t.bidderCode)))}i=s.every(e=>a.has(e)),n.bids.forEach(e=>{o[e.bidId]||(Ml(e),t.addNoBid(e),Hc(T.NO_BID,e))}),i&&r===0&&e()}return{addBidResponse:function(){function e(e,t){tu.call({dispatch:l},e,t,(()=>{let n=!1;return r=>{n||(u(e,t,r),n=!0)}})())}return e.reject=u,e}(),adapterDone:function(){nu(j.resolve()).finally(()=>d.call(this))}}}function Al(e,t){Fl(t),Zc(t.metrics).timeSince(`addBidResponse`,`addBidResponse.total`),e.addBidReceived(t),Hc(T.BID_RESPONSE,t)}function jl(e,t,n,{index:r=Z.index}={}){var i;cs({bidResponse:t,auctionInstance:e,afterBidAdded:n,videoMediaType:(i=r.getMediaTypes({requestId:t.originalRequestId||t.requestId,adUnitId:t.adUnitId}))==null?void 0:i.video})}function Ml(e,{index:t=Z.index}={}){let n=t.getBidderRequest(e),r=n&&n.start||e.requestTimestamp;Object.assign(e,{responseTimestamp:e.responseTimestamp||sa(),requestTimestamp:e.requestTimestamp||r}),e.timeToRespond=e.responseTimestamp-e.requestTimestamp}function Nl(e,t,{index:n=Z.index}={}){let r=n.getAdUnit(e);Ml(e,{index:n}),Object.assign(e,{cpm:parseFloat(e.cpm)||0,bidder:e.bidder||e.bidderCode,adUnitCode:t}),(r==null?void 0:r.ttlBuffer)!=null&&(e.ttlBuffer=r.ttlBuffer)}function Pl(e,{index:t=Z.index}={}){var n,r;Hc(T.BID_ADJUSTMENT,e);let i=t.getAdUnit(e);e.instl=(i==null||(n=i.ortb2Imp)==null?void 0:n.instl)===1,e.element=i==null?void 0:i.element;let a=t.getBidRequest(e),o=(a==null?void 0:a.renderer)||(i==null?void 0:i.renderer),s=(a==null?void 0:a.safeRenderer)||(i==null?void 0:i.safeRenderer),c=e.mediaType,l=t.getMediaTypes(e),u=l&&l[c],d=u&&u.renderer,f=u&&u.safeRenderer,p=null;d&&d.render&&!(d.backupOnly===!0&&e.renderer)?p=d:o&&o.render&&!(o.backupOnly===!0&&e.renderer)&&(p=o);let m=null;f&&f!=null&&f.url&&!((d==null?void 0:d.backupOnly)===!0&&e.safeRenderer)?m=f:s&&s!=null&&s.url&&!((d==null?void 0:d.backupOnly)===!0&&e.safeRenderer)&&(m=s),m!=null&&(e.safeRenderer=m),(r=D.getConfig(`allowTopWindowRenderers`))==null||r?p&&(e.renderer=Qs.install({url:p.url,config:p.options,renderNow:p.url==null,requiresVastUrl:p.requiresVastUrl}),e.renderer.setRender(p.render)):e.renderer=null;let h=Il(e.mediaType,l,D.getConfig(`mediaTypePriceGranularity`)),g=gn(e.cpm,typeof h==`object`?h:D.getConfig(`customPriceBucket`),D.getConfig(`currency.granularityMultiplier`));return e.pbLg=g.low,e.pbMg=g.med,e.pbHg=g.high,e.pbAg=g.auto,e.pbDg=g.dense,e.pbCg=g.custom,e}function Fl(e){let t,n=rc.get(e.bidderCode,`allowZeroCpmBids`)===!0?e.cpm>=0:e.cpm>0;e.bidderCode&&(n||e.dealId)&&(t=Bl(e.bidderCode,e)),e.adserverTargeting=Object.assign(e.adserverTargeting||{},t)}function Il(e,t,n){if(e&&n){if(e===`video`){var r,i;let e=(r=t==null||(i=t.video)==null?void 0:i.context)==null?`instream`:r;if(n[`video-${e}`])return n[`${J}-${e}`]}return n[e]}}function Ll(e,t){return{key:e,val:typeof t==`function`?function(e,n){return t(e,n)}:function(e){return e[t]}}}function Rl(){return[Ll(E.BIDDER,`bidderCode`),Ll(E.AD_ID,`adId`),Ll(E.PRICE_BUCKET,ou()),Ll(E.SIZE,`size`),Ll(E.DEAL,`dealId`),Ll(E.SOURCE,`source`),Ll(E.FORMAT,`mediaType`),Ll(E.ADOMAIN,cu()),Ll(E.ACAT,uu()),Ll(E.DSP,lu()),Ll(E.CRID,su())]}function zl(e,t){let n=Object.assign({},rc.settingsFor(null));if(n[Dn.ADSERVER_TARGETING]||(n[Dn.ADSERVER_TARGETING]=Rl()),e===`video`){let e=n[Dn.ADSERVER_TARGETING].slice();n[Dn.ADSERVER_TARGETING]=e,[E.UUID,E.CACHE_ID].forEach(t=>{e.find(e=>e.key===t)===void 0&&e.push(Ll(t,`videoCacheKey`))}),D.getConfig(`cache.url`)&&(!t||rc.get(t,`sendStandardTargeting`)!==!1)&&e.find(e=>e.key===E.CACHE_HOST)===void 0&&e.push(Ll(E.CACHE_HOST,function(e){var t;return e.cacheUrl?Sa(e.cacheUrl).hostname:(t=e.adserverTargeting)==null?void 0:t[E.CACHE_HOST]}))}return n}function Bl(e,t,{index:n=Z.index}={}){if(!t)return{};let r=n.getBidRequest(t);var i={};return Vl(i,zl(t.mediaType,e),t,r),e&&rc.getOwn(e,Dn.ADSERVER_TARGETING)&&(Vl(i,rc.ownSettingsFor(e),t,r),t.sendStandardTargeting=rc.get(e,`sendStandardTargeting`)),i}function Vl(e,t,n,r){var i=t[Dn.ADSERVER_TARGETING];return n.size=n.getSize(),(i||[]).forEach(function(i){var a=i.key,o=i.val;if(e[a]&&U(`The key: `+a+` is being overwritten`),P(o))try{o=o(n,r)}catch(e){W(`bidmanager`,`ERROR`,e)}(t.suppressEmptyKeys!==void 0&&t.suppressEmptyKeys===!0||a===E.DEAL||a===E.ACAT||a===E.DSP||a===E.CRID)&&(ki(o)||o==null)?H(`suppressing empty key '`+a+`' from adserver targeting`):e[a]=o}),e}function Hl(e){let t=Z.index.getBidRequest(e),n=ll(e.cpm,e,t);n>=0&&(e.cpm=n),e.desirability=Tl(e,t)}function Ul(e,t){return e[t.adUnitCode]||(e[t.adUnitCode]=Cl([])),e[t.adUnitCode].push(t),e}function Wl(e){let t=D.getConfig(`maxBid`);return!t||!e.cpm||t>=Number(e.cpm)}var Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du=o((()=>{K(),En(),uf(),Ss(),$s(),O(),xc(),Ho(),go(),gu(),ic(),Kc(),Xp(),Un(),Sr(),sl(),ul(),A(),kc(),Sl(),zs(),Oo(),ns(),wl(),Dl(),{syncUsers:Gl}=bc,Kl=`started`,ql=`inProgress`,Jl=`completed`,Rc(T.BID_ADJUSTMENT,function(e){Hl(e)}),Yl=4,Xl={},Zl={},Ql=[],$l=pr(),eu=X(`sync`,e=>{}),tu=Io(X(`async`,function(e,t,n){Wl(t)?Rs(`acceptBid`,Gp(`bidder`,t.bidder||t.bidderCode,{bid:t,ortb2:Z.index.getOrtb2(t),adUnit:Z.index.getAdUnit(t)}))?this.dispatch.call(null,e,t):n(In.BIDDER_DISALLOWED):n(In.PRICE_TOO_HIGH)},`addBidResponse`)),nu=X(`sync`,e=>e,`responsesReady`),ru=X(`sync`,function(e){this.dispatch.call(this.context,e)},`addBidderRequests`),iu=X(`async`,function(e,t,n){n&&n()},`bidsBackCallback`),au=(e,{index:t=Z.index}={})=>{let n=Il(e.mediaType,t.getMediaTypes(e),D.getConfig(`mediaTypePriceGranularity`));return typeof e.mediaType==`string`&&n?typeof n==`string`?n:`custom`:D.getConfig(`priceGranularity`)},ou=e=>t=>{let n=e||au(t);if(n===jn.AUTO)return t.pbAg;if(n===jn.DENSE)return t.pbDg;if(n===jn.LOW)return t.pbLg;if(n===jn.MEDIUM)return t.pbMg;if(n===jn.HIGH)return t.pbHg;if(n===jn.CUSTOM)return t.pbCg},su=()=>e=>e.creativeId?e.creativeId:``,cu=()=>e=>e.meta&&e.meta.advertiserDomains&&e.meta.advertiserDomains.length>0?[e.meta.advertiserDomains].flat()[0]:``,lu=()=>e=>{var t,n;return e.meta&&(e.meta.networkId||e.meta.networkName)?(e==null||(t=e.meta)==null?void 0:t.networkName)||(e==null||(n=e.meta)==null?void 0:n.networkId):``},uu=()=>e=>{var t;let n=e==null||(t=e.meta)==null?void 0:t.primaryCatId;return Array.isArray(n)?n[0]||``:n||``}})),fu,pu,mu=o((()=>{ee(),ne(),re(),fu=new WeakMap,pu=class{constructor(e){y(this,fu,void 0),x(fu,this,e)}getAuction({auctionId:e}){if(e!=null)return S(fu,this).call(this).find(t=>t.getAuctionId()===e)}getAdUnit({adUnitId:e}){if(e!=null)return S(fu,this).call(this).flatMap(e=>e.getAdUnits()).find(t=>t.adUnitId===e)}getMediaTypes({adUnitId:e,requestId:t}){if(t!=null){let n=this.getBidRequest({requestId:t});if(n!=null&&(e==null||n.adUnitId===e))return n.mediaTypes}else if(e!=null){let t=this.getAdUnit({adUnitId:e});if(t!=null)return t.mediaTypes}}getBidderRequest({requestId:e,bidderRequestId:t}){if(e!=null||t!=null){let n=S(fu,this).call(this).flatMap(e=>e.getBidRequests());return t!=null&&(n=n.filter(e=>e.bidderRequestId===t)),e==null?n[0]:n.find(t=>t.bids&&t.bids.find(t=>t.bidId===e)!=null)}}getBidRequest({requestId:e}){if(e!=null)return S(fu,this).call(this).flatMap(e=>e.getBidRequests()).flatMap(e=>e.bids).find(t=>t&&t.bidId===e)}getOrtb2(e){var t,n;return((t=this.getBidderRequest(e))==null?void 0:t.ortb2)||((n=this.getAuction(e))==null||(n=n.getFPD())==null?void 0:n.global)}}}));function hu(){let e=Oc({startTime:e=>e.end.then(()=>e.getAuctionEnd()),ttl:e=>e.end.then(()=>{let t=e.getBidsReceived();if(t.length===0){let e=fl();return e==null?null:e*1e3}let n=t.map(e=>{let t=pl(e);return t==null?null:Math.max(t,e.ttl)});return n.some(e=>e==null)?null:Math.max(...n)*1e3})});hl(()=>{for(let t of e)t.refreshBidTTLs();e.refresh()});let t={onExpiry:e.onExpiry};function n(t){for(let n of e)if(n.getAuctionId()===t)return n}let r=new Map;Rc(T.PBS_ANALYTICS,t=>{if(t.seatnonbid!=null){let n=new Set(r.get(t.auctionId));for(let r of e)r.getAuctionId()===t.auctionId&&n.add(r);n.forEach(e=>e.addSeatNonBids(t.seatnonbid))}}),t.addWinningBid=function(e){let t=Zc(e.metrics);t.checkpoint(`bidWon`),t.timeBetween(`auctionEnd`,`bidWon`,`adserver.pending`),t.timeBetween(`requestBids`,`bidWon`,`adserver.e2e`);let r=n(e.auctionId);r?r.addWinningBid(e):U(`Auction not found when adding winning bid`)},Object.entries({getAllWinningBids:{name:`getWinningBids`},getBidsRequested:{name:`getBidRequests`},getNoBids:{},getAdUnits:{},getBidsReceived:{pre(e){return e.getAuctionStatus()===Jl}},getAdUnitCodes:{post:Wi}}).forEach(([n,{name:r=n,pre:i,post:a}])=>{let o=i==null?e=>e[r]():e=>i(e)?e[r]():[],s=a==null?e=>e:e=>e.filter(a);t[n]=()=>s(e.toArray().flatMap(o))});function i(){return e.toArray().flatMap(e=>e.getBidsReceived())}t.getAllBidsForAdUnitCode=function(e){return i().filter(t=>t&&t.adUnitCode===e)},t.createAuction=function(e){let t=Ol(e);a(t);let n=t.getAuctionId();return r.has(n)||r.set(n,new Set),r.get(n).add(t),t.end.then(()=>{let e=r.get(n);e!=null&&(e.delete(t),e.size===0&&r.delete(n))}),t},t.findBidByAdId=function(e){return i().find(t=>t.adId===e)},t.getStandardBidderAdServerTargeting=function(){return zl()[Dn.ADSERVER_TARGETING]},t.setStatusForBids=function(r,i){let a=t.findBidByAdId(r);if(a&&(a.status=i),a&&i===Fn.BID_TARGETING_SET){let t=n(a.auctionId);t&&(t.setBidTargeting(a),e.refresh())}},t.getLastAuctionId=function(){let t=e.toArray();return t.length&&t[t.length-1].getAuctionId()},t.clearAllAuctions=function(){e.clear()},t.getAuctions=function(){return e.toArray()};function a(t){e.add(t)}return t.index=new pu(()=>e.toArray()),t}var Z,gu=o((()=>{K(),du(),mu(),Un(),Kc(),sl(),kc(),Sl(),Z=hu()})),_u,vu=o((()=>{_u='(()=>{const e="Prebid Event",t="browserIntervention",n="noAd";window.render=function({ad:r,adUrl:o,width:i,height:s,instl:d},{mkFrame:a,sendMessage:l},c){if(function(e,t,n){const r=n?.defaultView||window;if("ReportingObserver"in r)try{new r.ReportingObserver(t=>{e(t[0])},{buffered:!0,types:t}).observe()}catch(e){}}(n=>{l(e,{event:t,intervention:n})},["intervention"]),!r&&!o){const e=new Error("Missing ad markup or URL");throw e.reason=n,e}{if(null==s){const e=c.document?.body;[e,e?.parentElement].filter(e=>null!=e?.style).forEach(e=>{e.style.height="100%"})}const e=c.document,t={width:i??"100%",height:s??"100%"};if(o&&!r?t.src=o:t.srcdoc=r,e.body.appendChild(a(e,t)),d&&c.frameElement){const e=c.frameElement.style;e.width=i?`${i}px`:"100vw",e.height=s?`${s}px`:"100vh";const t=c.parent?.document?.querySelector("div#creative"),n=c.parent?.document?.querySelector("div#ad_position_box"),r=t&&c.parent?.getComputedStyle?.(t),o=n&&c.parent?.getComputedStyle?.(n);t?.parentElement===n&&r?.marginTop&&"0px"!==r?.marginTop&&o&&"flex-start"===o?.alignItems&&(t.style.marginTop="0px",n.style.alignItems="center")}}}})();'})),yu,bu=o((()=>{yu=`window.render=function(e,{mkFrame:n},r){const{safeRenderer:t,...o}=e,i=e.width,d=e.height,c=e.instl;if(null==d){const e=r.document&&r.document.body,n=e&&e.parentElement;e&&e.style&&(e.style.height="100%"),n&&n.style&&(n.style.height="100%")}const a=r.document,l={width:null!=i?i:"100%",height:null!=d?d:"100%"};if(c&&r.frameElement){const e=r.frameElement.style;e.width=i?String(i)+"px":"100vw",e.height=d?String(d)+"px":"100vh"}return"string"!=typeof t.url||""===t.url?Promise.reject(new Error("Prebid SafeRenderer: missing data.safeRenderer.url")):new Promise(function(e,r){const i=n(a,{width:l.width,height:l.height});i.onload=function(){try{const n=i.contentWindow,d=n.document,c=d.createElement("script");c.src=t.url,c.onload=function(){try{const r=n.pbRenderInFrame;if("function"!=typeof r)throw new Error("Prebid SafeRenderer: safeRenderer.url script must define window.pbRenderInFrame as a function.");r.call(n,{config:t.config,...o}),e()}catch(e){r(e)}},c.onerror=function(){r(new Error("Prebid SafeRenderer: failed to load script from safeRenderer.url"))},(d.head||d.body).appendChild(c)}catch(e){r(e)}},i.onerror=function(){r(new Error("Prebid SafeRenderer: iframe failed to load"))},a.body.appendChild(i)})};`})),xu,Su,Cu,wu=o((()=>{Sr(),K(),vu(),bu(),Ho(),kd(),xu=X(`sync`,function(e){return _u}),Su=function(e){return md(e)?yu:xu(e)},Cu=function(){let e={};return function(t){let n=Su(t);return e.hasOwnProperty(n)||(e[n]=new j(e=>{let r=Ei();r.srcdoc=`