/*! * * Copyright (C) Yolla Media 2026 * https://portal.yollamedia.com * Version: 3.18.1 / 9.53.5 / prod / newpreroll * Release: 2026-05-14T06:50:06.098Z * */(()=>{var e={56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,i,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(i)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},323:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(601),r=n.n(i),s=n(314),o=n.n(s)()(r());o.push([e.id,'@keyframes l2{to{transform:rotate(1turn)}}.ympb_target,.ympb_target_multi,.ympb_target_multiformat,.ympb_target_companion,.ympb_target_fullscreen,.ympb_target_delay{min-width:120px}.ympb_target_multi,.ympb_target_companion{position:relative}.ympb_target{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;align-content:center;font-size:12px !important}.ympb_target[data-type*=gmi]{position:fixed;top:-90px;right:0;bottom:0;left:0;background-color:rgba(1,1,1,.5) !important;z-index:2147483640}.ympb_target[data-type*=gmi] ::after{content:" ";width:6em;height:6em;position:absolute;top:45%;left:49%;border-radius:50%;border:.5em solid #a4a4a4;border-right-color:#ff3c04;animation:l2 1s infinite linear;z-index:3}.ympb_target[data-type*=gmi][data-status=dfp_impressed]::after{display:none}.ympb_target[data-type*=adhesion]{bottom:0;width:100%;height:auto;position:fixed;background:rgba(0,0,0,0)}.ympb_target[data-type*=adhesion].ympb_target_no_bg{width:auto;display:inline-block;width:auto;left:50%;transform:translateX(-50%)}.ympb_target[data-type*=oop] .ympb_instanse{min-width:120px;min-height:0px}.ympb_target[data-type*=preroll] .ympb_target_sizer{background-color:rgba(0,0,0,.8)}.ympb_target[data-status=closed],.ympb_target[data-status=destroyed]{visibility:hidden;margin-bottom:0 !important}.ympb_target[data-status=disabled]{margin-bottom:0 !important;border:none !important}.ympb_target .ympb_loader_container{width:6em;height:6em;position:absolute;top:50%;left:50%;transform:translate(-3em, -3em)}.ympb_target .ympb_loader{width:5em;height:5em;border-radius:50%;border:.5em solid #a4a4a4;border-right-color:#ff3c04;animation:l2 1s infinite linear;z-index:3}.ympb_target .ympb_video_header{color:#eee;background:rgba(0,0,0,.8);font-size:12px !important;font-weight:700;padding:.25em .5em !important;text-transform:uppercase;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;align-content:center;height:2em;overflow:hidden;position:relative;z-index:3}.ympb_target .ympb_video_header>a,.ympb_target .ympb_video_header>span{display:inline-block}.ympb_target .ympb_video_header--gap{flex-grow:1}.ympb_target .ympb_video_header .ympb-logo{margin-left:.25em}.ympb_target .ympb_video_header svg{fill:#fff;width:auto;height:1rem;display:inline}.ympb_target .ympb_video_header .ympb_video_skip_btn{text-decoration:none;cursor:pointer;color:#fff;font-weight:700;padding:0 .25em;min-width:6em;text-align:center}.ympb_target .ympb_video_header .ympb_video_mute_btn{text-decoration:none;margin:0 .5em;padding:0 .25em;width:auto}.ympb_target .ympb_video_header .ympb_video_mute_btn--muted{display:none}.ympb_target .ympb_video_header .ympb_video_mute_btn.muted .ympb_video_mute_btn--unmuted{display:none}.ympb_target .ympb_video_header .ympb_video_mute_btn.muted .ympb_video_mute_btn--muted{display:block}.ympb_target .ympb_video_header .ympb_video_duration{margin-left:.5em}.ympb_target[data-type*=-preroll] .ympb_instanse_ima{margin-top:-2.5em;padding-top:2.5em}.ympb_target .ympb_video_container{width:100%;margin:0 auto}.ympb_target .ympb_video_body{width:100%;position:relative;height:0;padding-bottom:56.25%;background-color:rgba(0,0,0,.5)}.ympb_target .ympb_video_body>video,.ympb_target .ympb_video_body>iframe,.ympb_target .ympb_video_body .ympb_video_slot,.ympb_target .ympb_video_body .ympb_video_play_btn{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0}.ympb_target .ympb_video_body .ympb_video_slot{overflow:visible}.ympb_target .ympb_video_body .ympb_video_play_btn{display:flex;align-content:center;justify-content:center;align-items:center;cursor:pointer;flex-direction:column;font:400 11px/16px "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell !important;opacity:.8;color:#fff}.ympb_target .ympb_video_body .ympb_video_play_btn:hover{opacity:1}.ympb_target .ympb_video_body .ympb_video_play_btn--text{font-size:3em;margin-top:1em}.ympb_target .ympb_video_body .ympb_video_play_btn>svg{width:50%;min-height:8em;max-width:10em;display:block;fill:#fff}.ympb_target .ympb_target_close{position:absolute;top:.25em;right:.5em;bottom:auto;left:auto;border-radius:50%;background:hsla(0,0%,100%,.25);width:1em;height:1em;text-align:center;line-height:1em;font-size:20px;color:#a4a4a4;cursor:pointer;opacity:.75}.ympb_target .ympb_target_close svg{width:20px;height:20px;fill:#666}.ympb_target .ympb_target_close:hover{opacity:1}.ympb_anchor,.ympb_hide{display:none !important}.ympb_target_wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;width:100%;flex-direction:column}.ympb_target_wrapper .ympb_instanse{min-width:120px;min-height:30px}.ympb_copyright{margin:0 !important;padding:0 !important;text-align:left !important;text-decoration:none !important;font:400 11px/16px "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell !important;width:100%}.ympb_copyright a{transition:all .1s ease-in-out;text-decoration:none !important;display:inline-block;margin-top:1px !important}.ympb_copyright a:hover{opacity:.7}.ympb_copyright a b{font-weight:700 !important}.ympb_copyright a .ympb-logo{margin-right:.25em}.ympb_copyright a>span{display:inline-block;vertical-align:middle}.ympb_copyright a svg{width:auto;height:16px}.ympb_copyright_text{float:right}.ympb_sticky_element,.ympb_target[data-type*=sticky]{position:-webkit-sticky;position:sticky;top:2em;z-index:9999}.ympb_usp{clear:both;padding:.5em 0 100px;color:#b2b2b2;background-color:#fafafa;text-align:center;line-height:2.5;font-size:13px}.ympb_usp .ympb__usp-toggle{cursor:pointer}.ympb_flex{display:flex;flex-wrap:wrap;align-content:space-evenly;justify-content:center;align-items:center}.ympb_flex.ympb_space-around{justify-content:space-around;gap:20px}.ympb_flex>.ympb_target{flex:0 1 auto}.ympb_target_group{position:relative}.ympb_target_group .ympb_target[data-group-type=dynamic_overlay]{position:absolute;top:0;left:0;z-index:10}.ympb_target_group.ympb_blur>.ympb_target:not([data-position=overlay]){filter:blur(6px)}.qc-cmp2-close{display:none !important}',""]);const a=o},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},659:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},864:e=>{ /* * @license MIT * Fun Hooks v1.1.0 * (c) @snapwich */ s.SYNC=1,s.ASYNC=2,s.QUEUE=4;var t="fun-hooks",n=Object.freeze({ready:0}),i=new WeakMap;function r(e,t){return Array.prototype.slice.call(e,t)}function s(e){var o,a={},d=[];function l(e,t){return"function"==typeof e?h.call(null,"sync",e,t):"string"==typeof e&&"function"==typeof t?h.apply(null,arguments):"object"==typeof e?c.apply(null,arguments):void 0}function c(e,t,n){var i=!0;void 0===t&&(t=Object.getOwnPropertyNames(e).filter(e=>!e.match(/^_/)),i=!1);var r={},s=["constructor"];do{t.forEach(function(t){var i=t.match(/(?:(sync|async):)?(.+)/),o=i[1]||"sync",a=i[2];if(!r[a]&&"function"==typeof e[a]&&-1===s.indexOf(a)){var d=e[a];r[a]=e[a]=h(o,d,n?[n,a]:void 0)}}),e=Object.getPrototypeOf(e)}while(i&&e);return r}function u(e){var t=Array.isArray(e)?e:e.split(".");return t.reduce(function(e,n,i){var r=e[n];return r||(i===t.length-1?(o||d.push(function(){}),e[n]=p(function(t){e[n]=t})):e[n]={})},a)}function p(e){var t=[],n=[],r=function(){},s={before:function(e,n){return a.call(this,t,"before",e,n)},after:function(e,t){return a.call(this,n,"after",e,t)},getHooks:function(e){var i=t.concat(n);"object"==typeof e&&(i=i.filter(function(t){return Object.keys(e).every(function(n){return t[n]===e[n]})}));try{Object.assign(i,{remove:function(){return i.forEach(function(e){e.remove()}),this}})}catch(e){}return i},removeAll:function(){return this.getHooks().remove()}},o={install:function(i,s,o){this.type=i,r=o,o(t,n),e&&e(s)}};return i.set(s.after,o),s;function a(e,i,s,o){var a={hook:s,type:i,priority:o||10,remove:function(){var i=e.indexOf(a);-1!==i&&(e.splice(i,1),r(t,n))}};return e.push(a),e.sort(function(e,t){return t.priority-e.priority}),r(t,n),this}}function h(n,a,l){var c=a.after&&i.get(a.after);if(c){if(c.type!==n)throw t+": recreated hookable with different type";return a}var h,f=l?u(l):p(),g={get:function(e,t){return f[t]||Reflect.get.apply(Reflect,arguments)}};o||d.push(v);var m=new Proxy(a,g);return i.get(m.after).install(n,m,function(e,t){var i,s=[];e.length||t.length?(e.forEach(o),i=s.push(void 0)-1,t.forEach(o),h=function(e,t,o){var a,d=s.slice(),l=0,c="async"===n&&"function"==typeof o[o.length-1]&&o.pop();function u(e){"sync"===n?a=e:c&&c.apply(null,arguments)}function p(e){if(d[l]){var i=r(arguments);return p.bail=u,i.unshift(p),d[l++].apply(t,i)}"sync"===n?a=e:c&&c.apply(null,arguments)}return d[i]=function(){var i=r(arguments,1);"async"===n&&c&&(delete p.bail,i.push(p));var s=e.apply(t,i);"sync"===n&&p(s)},p.apply(null,o),a}):h=void 0;function o(e){s.push(e.hook)}v()}),m;function v(){!o&&("sync"!==n||e.ready&s.SYNC)&&("async"!==n||e.ready&s.ASYNC)?"sync"!==n&&e.ready&s.QUEUE?g.apply=function(){var e=arguments;d.push(function(){m.apply(e[1],e[2])})}:g.apply=function(){throw t+": hooked function not ready"}:g.apply=h}}return(e=Object.assign({},n,e)).ready?l.ready=function(){o=!0,function(e){for(var t;t=e.shift();)t()}(d)}:o=!0,l.get=u,l}e.exports=s}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,exports:{}};return e[i](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0,(()=>{"use strict";var e={};n.r(e),n.d(e,{addEvents:()=>lr,clearEvents:()=>ur,emit:()=>dr,get:()=>or,getEvents:()=>ar,has:()=>cr,off:()=>sr,on:()=>rr});var t=n(72),i=n.n(t),r=n(825),s=n.n(r),o=n(659),a=n.n(o),d=n(56),l=n.n(d),c=n(540),u=n.n(c),p=n(113),h=n.n(p),f=n(323),g={};g.styleTagTransform=h(),g.setAttributes=l(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u();i()(f.A,g);f.A&&f.A.locals&&f.A.locals;window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.dataLayer=window.dataLayer||[],window._qevents=window._qevents||[],window.yevents=window.yevents||[],window.YMPB_DATA=window.YMPB_DATA||{},window.YMPB_OPTIONS=window.YMPB_OPTIONS||{};var m=window.YMPB||m||{};m.que=m.que||[],m.cmd=m.cmd||[],window.YMPB||(window.YMPB=m),m.pub=m.pub||{},m.const=m.const||{},m.ycmd=m.ycmd||m.command||[],m.command=m.ycmd||[],m.prePromises=m.prePromises||[],window.yaqData=window.yaqData||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)},window.yaq=window.yaq||function(){window.yaqData.push(arguments)},m.pub=m.pub||{},m.const=m.const||{},m.__durationStart=m.__durationStart||Date.now(),m.__pvflag=m.__pvflag||{},m.__yeventsParams=m.__yeventsParams||{};const v=window,y=v.YMPB=v.YMPB||{};function b(){return y}function _(e){y.installedModules.push(e)}function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function w(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==A(t)?t:t+""}function E(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}y.cmd=y.cmd||[],y.que=y.que||[],v===window&&(v._pbjsGlobals=v._pbjsGlobals||[],v._pbjsGlobals.push("YMPB"));const I={buckets:[{max:5,increment:.5}]},S={buckets:[{max:20,increment:.1}]},C={buckets:[{max:20,increment:.01}]},T={buckets:[{max:3,increment:.01},{max:8,increment:.05},{max:20,increment:.5}]},O={buckets:[{max:5,increment:.05},{max:10,increment:.1},{max:20,increment:.5}]};function x(e,t,n){let i="";if(!R(t))return i;const r=t.buckets.reduce((e,t)=>e.max>t.max?e:t,{max:0});let s=0,o=t.buckets.find(t=>{if(e>r.max*n){let e=t.precision;void 0===e&&(e=2),i=(t.max*n).toFixed(e)}else{if(e<=t.max*n&&e>=s*n)return t.min=s,t;s=t.max}});return o&&(i=function(e,t,n){const i=void 0!==t.precision?t.precision:2,r=t.increment*n,s=t.min*n;let o=Math.floor,a=me.getConfig("cpmRoundingFunction");"function"==typeof a&&(o=a);let d,l,c=Math.pow(10,i+2),u=(e*c-s*c)/(r*c);try{d=o(u)*r+s}catch(e){l=!0}(l||"number"!=typeof d)&&(at("Invalid rounding function passed in config"),d=Math.floor(u)*r+s);return d=Number(d.toFixed(10)),d.toFixed(i)}(e,o,n)),i}function R(e){if(At(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 D(e,t,n,i,r){for(t=t.split?t.split("."):t,i=0;i1&&void 0!==arguments[1])||arguments[1]?{priceGranularity:fe.MEDIUM,customPriceBucket:{},mediaTypePriceGranularity:{},bidderSequence:he,auctionOptions:{}}:{};function n(e){return t[e]}function i(n,i){t.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0}),t[n]=i}const r={publisherDomain:{set(e){null!=e&&at("publisherDomain is deprecated and has no effect since v7 - use pageUrl instead"),i("publisherDomain",e)}},priceGranularity:{set(e){o(e)&&("string"==typeof e?i("priceGranularity",s(e)?e:fe.MEDIUM):bt(e)&&(i("customPriceBucket",e),i("priceGranularity",fe.CUSTOM),st("Using custom price granularity")))}},customPriceBucket:{},mediaTypePriceGranularity:{set(e){null!=e&&i("mediaTypePriceGranularity",Object.keys(e).reduce((t,i)=>(o(e[i])?"string"==typeof e?t[i]=s(e[i])?e[i]:n("priceGranularity"):bt(e)&&(t[i]=e[i],st("Using custom price granularity for ".concat(i))):at("Invalid price granularity for media type: ".concat(i)),t),{}))}},bidderSequence:{set(e){pe[e]?i("bidderSequence",e):at("Invalid order: ".concat(e,". Bidder Sequence was not set."))}},auctionOptions:{set(e){(function(e){if(!bt(e))return at("Auction Options must be an object"),!1;for(let t of Object.keys(e)){if("secondaryBidders"!==t&&"suppressStaleRender"!==t&&"suppressExpiredRender"!==t)return at("Auction Options given an incorrect param: ".concat(t)),!1;if("secondaryBidders"===t){if(!vt(e[t]))return at("Auction Options ".concat(t," must be of type Array")),!1;if(!e[t].every(mt))return at("Auction Options ".concat(t," must be only string")),!1}else if(("suppressStaleRender"===t||"suppressExpiredRender"===t)&&!_t(e[t]))return at("Auction Options ".concat(t," must be of type boolean")),!1}return!0})(e)&&i("auctionOptions",e)}}};return Object.defineProperties(e,Object.fromEntries(Object.entries(r).map(e=>{let[r,s]=e;return[r,Object.assign({get:n.bind(null,r),set:i.bind(null,r),enumerable:t.hasOwnProperty(r),configurable:!t.hasOwnProperty(r)},s)]}))),e;function s(e){return Object.keys(fe).find(t=>e===fe[t])}function o(e){if(!e)return dt("Prebid Error: no value passed to `setPriceGranularity()`"),!1;if("string"==typeof e)s(e)||at("Prebid Warning: setPriceGranularity was called with invalid setting, using `medium` as default.");else if(bt(e)&&!R(e))return dt("Invalid custom price value passed to `setPriceGranularity()`"),!1;return!0}}const me=function(){let e,t,n,i=[],r=null;function s(){e={};let i=ge({debug:le,bidderTimeout:3e3,enableSendAllBids:true,useBidCache:false,deviceAccess:true,disableAjaxTimeout:false,maxNestedIframes:10,maxBid:5e3,userSync:{topics:ce}});t&&h(Object.keys(t).reduce((e,n)=>(t[n]!==i[n]&&(e[n]=i[n]||{}),e),{})),t=i,n={}}function o(){if(r&&n&&bt(n[r])){const e=n[r],i=new Set([...Object.keys(t),...Object.keys(e)]),s={};for(const n of i){const i=t[n],r=e[n];s[n]=void 0===r?i:void 0===i?r:bt(r)?on({},i,r):r}return s}return de({},t)}const[a,d]=[o,function(){const e=o();return Object.defineProperty(e,"ortb2",{get:function(){throw new Error("invalid access to 'orbt2' config - use request parameters instead")}}),e}].map(e=>function(){if(arguments.length<=1&&"function"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0];return t?D(e(),t):o()}return p(...arguments)}),[l,c]=[d,a].map(e=>function(){let t=e(...arguments);return t&&"object"==typeof t&&(t=jt(t)),t});function u(n){if(!bt(n))return void dt("setConfig options must be an object");let i=Object.keys(n),r={};i.forEach(i=>{let s=n[i];bt(e[i])&&bt(s)&&(s=Object.assign({},e[i],s));try{r[i]=t[i]=s}catch(e){at("Cannot set config for property ".concat(i," : "),e)}}),h(r)}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t;if("string"!=typeof e&&(r=e,e="*",n=t||{}),"function"!=typeof r)return void dt("listener must be a function");const s={topic:e,callback:r};return i.push(s),n.init&&r("*"===e?d():{[e]:d(e)}),function(){i.splice(i.indexOf(s),1)}}function h(e){const t=Object.keys(e);i.filter(e=>t.includes(e.topic)).forEach(t=>{t.callback({[t.topic]:e[t.topic]})}),i.filter(e=>"*"===e.topic).forEach(t=>t.callback(e))}function f(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{!function(e){if(!bt(e))throw"setBidderConfig bidder options must be an object";if(!Array.isArray(e.bidders)||!e.bidders.length)throw"setBidderConfig bidder options must contain a bidders list with at least 1 bidder";if(!bt(e.config))throw"setBidderConfig bidder options must contain a config object"}(e),e.bidders.forEach(i=>{n[i]||(n[i]=ge({},!1)),Object.keys(e.config).forEach(r=>{let s=e.config[r];const o=n[i][r];if(bt(s)&&(null==o||bt(o))){const e=t?on:Object.assign;n[i][r]=e({},o||{},s)}else n[i][r]=s})})}catch(e){dt(e)}}function g(e,t){r=e;try{return t()}finally{m()}}function m(){r=null}return s(),{getCurrentBidder:function(){return r},resetBidder:m,getConfig:d,getAnyConfig:a,readConfig:l,readAnyConfig:c,setConfig:u,mergeConfig:function(e){if(!bt(e))return void dt("mergeConfig input must be an object");const t=on(o(),e);return u(de({},t)),t},setDefaults:function(n){bt(e)?(Object.assign(e,n),Object.assign(t,n)):dt("defaults must be an object")},resetConfig:s,runWithBidder:g,callbackWithBidder:function(e){return function(t){return function(){if("function"==typeof t){for(var n=arguments.length,i=new Array(n),r=0;rfunction(s){if(e===we&&"function"==typeof(null==s?void 0:s.then))s.then(i,r);else if(!t.length)for(t.push(e,s);n.length;)n.shift()()});try{e(i,r)}catch(e){r(e)}_e(Ce,this,t),_e(Te,this,n)}then(e,t){const n=be(Ce,this);return new this.constructor((i,r)=>{const s=()=>{let s=n[1],[o,a]=n[0]===we?[e,i]:[t,r];if("function"==typeof o){try{s=o(s)}catch(e){return void r(e)}a=i}a(s)};n.length?s():be(Te,this).push(s)})}catch(e){return this.then(null,e)}finally(e){let t;return this.then(n=>(t=n,e()),n=>(t=this.constructor.reject(n),e())).then(()=>t)}static race(e){return new this((t,n)=>{Ae(Oe,this,xe).call(this,e,(e,i)=>e?t(i):n(i))})}static all(e){return new this((t,n)=>{let i=[];Ae(Oe,this,xe).call(this,e,(e,t,r)=>e?i[r]=t:n(t),()=>t(i))})}static allSettled(e){return new this(t=>{let n=[];Ae(Oe,this,xe).call(this,e,(e,t,i)=>n[i]=e?{status:"fulfilled",value:t}:{status:"rejected",reason:t},()=>t(n))})}static resolve(e){return new this(t=>t(e))}static reject(e){return new this((t,n)=>n(e))}}function xe(e,t,n){let i=e.length;function r(){t.apply(this,arguments),--i<=0&&n&&n()}0===e.length&&n?n():e.forEach((e,t)=>this.resolve(e).then(e=>r(!0,e,t),e=>r(!1,e,t)))}const Re=null!==(Ie=b().setTimeout)&&void 0!==Ie?Ie:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>0)return setTimeout(e,t);e()},De=null!==(Se=b().Promise)&&void 0!==Se?Se:Oe;function Be(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new De(t=>{Re(t,e)})}function Ue(){let e,t,{promiseFactory:n=e=>new De(e)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function i(e){return t=>e(t)}return{promise:n((n,i)=>{e=n,t=i}),resolve:i(e),reject:i(t)}}var Pe="String",ke="Object",Me="Boolean",$e=Object.prototype.toString;let Le,je,Ne=Boolean(window.console);Boolean(Ne&&window.console.log),Boolean(Ne&&window.console.info),Boolean(Ne&&window.console.warn),Boolean(Ne&&window.console.error);const Fe=b();function ze(){null!=Le&&Le(...arguments)}const qe=function(){let e;return()=>((!je||!e||Date.now()-e>20)&&(Ve.resetWinDimensions(),e=Date.now()),je)}();const Ve={checkCookieSupport:Vt,createTrackPixelIframeHtml:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return"";t&&(e=encodeURI(e));n&&(n='sandbox="'.concat(n,'"'));return"')},getWindowSelf:nt,getWindowTop:tt,canAccessWindowTop:rt,getWindowLocation:it,insertUserSyncIframe:xt,insertElement:St,isFn:gt,triggerPixel:Tt,logError:dt,logWarn:at,logMessage:st,logInfo:ot,parseQS:en,formatQS:tn,deepEqual:sn,resetWinDimensions:function(){var e,t,n,i,r,s,o,a,d,l,c,u,p,h,f;const g=rt()?Ve.getWindowTop():Ve.getWindowSelf();je={screen:{width:null===(e=g.screen)||void 0===e?void 0:e.width,height:null===(t=g.screen)||void 0===t?void 0:t.height,availWidth:null===(n=g.screen)||void 0===n?void 0:n.availWidth,availHeight:null===(i=g.screen)||void 0===i?void 0:i.availHeight,colorDepth:null===(r=g.screen)||void 0===r?void 0:r.colorDepth},innerHeight:g.innerHeight,innerWidth:g.innerWidth,outerWidth:g.outerWidth,outerHeight:g.outerHeight,visualViewport:{height:null===(s=g.visualViewport)||void 0===s?void 0:s.height,width:null===(o=g.visualViewport)||void 0===o?void 0:o.width},document:{documentElement:{clientWidth:null===(a=g.document)||void 0===a||null===(a=a.documentElement)||void 0===a?void 0:a.clientWidth,clientHeight:null===(d=g.document)||void 0===d||null===(d=d.documentElement)||void 0===d?void 0:d.clientHeight,scrollTop:null===(l=g.document)||void 0===l||null===(l=l.documentElement)||void 0===l?void 0:l.scrollTop,scrollLeft:null===(c=g.document)||void 0===c||null===(c=c.documentElement)||void 0===c?void 0:c.scrollLeft},body:{scrollTop:null===(u=document.body)||void 0===u?void 0:u.scrollTop,scrollLeft:null===(p=document.body)||void 0===p?void 0:p.scrollLeft,clientWidth:null===(h=document.body)||void 0===h?void 0:h.clientWidth,clientHeight:null===(f=document.body)||void 0===f?void 0:f.clientHeight}}}}};var Ge,He=(Ge=0,function(){return++Ge});function Ye(){return He()+Math.random().toString(16).substr(2)}function We(e){return e?(e^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,We)}function Xe(e,t){return(null==t?void 0:t[e])||""}function Je(e){return"string"==typeof e?e.split(/\s*,\s*/).map(e=>e.match(/^(\d+)x(\d+)$/i)).filter(e=>e).map(e=>{let[t,n,i]=e;return[parseInt(n,10),parseInt(i,10)]}):Array.isArray(e)?et(e)?[e]:e.filter(et):[]}function Ke(e){return Je(e).map(Qe)}function Qe(e){return e[0]+"x"+e[1]}function Ze(e){return{w:e[0],h:e[1]}}function et(e){return vt(e)&&2===e.length&&!isNaN(e[0])&&!isNaN(e[1])}function tt(){return window.top}function nt(){return window.self}function it(){return window.location}function rt(){try{if(Ve.getWindowTop().location.href)return!0}catch(e){return!1}}function st(){ct()}function ot(){ct()}function at(){ct(),ze(M.AUCTION_DEBUG,{type:"WARNING",arguments})}function dt(){ct(),ze(M.AUCTION_DEBUG,{type:"ERROR",arguments})}function lt(e){function t(t){return function(){for(var n=arguments.length,i=new Array(n),r=0;r{const e={border:"0px",hspace:"0",vspace:"0",marginWidth:"0",marginHeight:"0",scrolling:"no",frameBorder:"0",allowtransparency:"true"};return function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.createElement("iframe");return Object.assign(r,Object.assign({},e,n)),Object.assign(r.style,i),r}})();function pt(){return ut(document,{id:Ye(),width:0,height:0,src:"about:blank"},{display:"none",height:"0px",width:"0px",border:"0px"})}function ht(e){return en(it().search)[e]||""}function ft(e,t){return $e.call(e)==="[object "+t+"]"}function gt(e){return ft(e,"Function")}function mt(e){return ft(e,Pe)}const vt=Array.isArray.bind(Array);function yt(e){return ft(e,"Number")}function bt(e){return ft(e,ke)}function _t(e){return ft(e,Me)}function At(e){return!e||(vt(e)||mt(e)?!(e.length>0):Object.keys(e).length<=0)}function wt(e){return mt(e)&&(!e||0===e.length)}function Et(e,t){if(gt(null==e?void 0:e.forEach))return e.forEach(t,this);Object.entries(e||{}).forEach(e=>{let[n,i]=e;return t.call(this,i,n)})}function It(e,t){return gt(null==e?void 0:e.includes)&&e.includes(t)}function St(e,t,n,i){let r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{if(r=r.length?r:t.getElementsByTagName("body"),r.length){r=r[0];let t=i?null:r.firstChild;return r.insertBefore(e,t)}}catch(e){}}function Ct(e,t){let n=null;return new De(i=>{const r=function(){e.removeEventListener("load",r),e.removeEventListener("error",r),null!=n&&window.clearTimeout(n),i()};e.addEventListener("load",r),e.addEventListener("error",r),null!=t&&(n=window.setTimeout(r,t))})}function Tt(e,t,n){const i=new Image;t&&Ve.isFn(t)&&Ct(i,n).then(t),i.src=e}function Ot(e){if(!e)return;const t=pt();var n;Ve.insertElement(t,document,"body"),(n=t.contentWindow.document).open(),n.write(e),n.close()}function xt(e,t,n){let i=Ve.createTrackPixelIframeHtml(e,!1,"allow-scripts allow-same-origin"),r=document.createElement("div");r.innerHTML=i;let s=r.firstChild;t&&Ve.isFn(t)&&Ct(s,n).then(t),Ve.insertElement(s,document,"html",!0)}function Rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:encodeURI;if(!e)return"";let n='
';return n+='
',n}function Dt(e){return Array.from(e.matchAll(/\$({[^}]+})/g)).map(e=>e[1]).reduce((e,t)=>e.replace("$"+encodeURIComponent(t),"$"+t),encodeURI(e))}function Bt(e,t,n){return n.indexOf(e)===t}function Ut(e,t){return e.concat(t)}function Pt(e,t){if(e)return t.flatMap(e=>e.bids).find(t=>["bidId","adId","bid_id"].some(n=>t[n]===e))}function kt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fe.adUnits).map(e=>e.bids.map(e=>e.bidder).reduce(Ut,[])).reduce(Ut,[]).filter(e=>void 0!==e).filter(Bt)}function Mt(){if(window.googletag&>(window.googletag.pubads)&>(window.googletag.pubads().getSlots))return!0}const $t=(e,t)=>t.cpm-e.cpm;function Lt(e){let t=e.length;for(;t>0;){let n=Math.floor(Math.random()*t);t--;let i=e[t];e[t]=e[n],e[n]=i}return e}function jt(e){return ve(e)||{}}function Nt(){try{return Ve.getWindowSelf()!==Ve.getWindowTop()}catch(e){return!0}}function Ft(e,t){if(e)return Object.entries(t).reduce((e,t)=>{let[n,i]=t;return e.replace(new RegExp("\\$\\{"+n+"\\}","g"),i||"")},e)}function zt(){return(new Date).getTime()}function qt(){return!1!==me.getConfig("deviceAccess")}function Vt(){if(window.navigator.cookieEnabled||document.cookie.length)return!0}function Gt(e,t){if(t<1)throw new Error("numRequiredCalls must be a positive number. Got ".concat(t));let n=0;return function(){n++,n===t&&e.apply(this,arguments)}}function Ht(e,t){return e.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function Yt(e,t){return t.filter(t=>e[t]).reduce((t,n)=>Object.assign(t,{[n]:e[n]}),{})}function Wt(e,t,n){return e.filter(e=>e.code===t).flatMap(e=>e.bids).filter(e=>e.bidder===n).map(e=>e.params||{})}const Xt=(e,t)=>e.getAdUnitPath()===t||e.getSlotElementId()===t;function Jt(e){return t=>Xt(e,t)}const Kt=Number.isInteger.bind(Number);function Qt(e,t){return"object"!=typeof e?{}:t.reduce((n,i,r)=>{if("function"==typeof i)return n;let s=i,o=i.match(/^(.+?)\sas\s(.+?)$/i);o&&(i=o[1],s=o[2]);let a=e[i];return"function"==typeof t[r+1]&&(a=t[r+1](a,n)),void 0!==a&&(n[s]=a),n},{})}function Zt(e,t){return vt(e)&&(!t||e.length===t)&&e.every(e=>Kt(e))}function en(e){return e?e.replace(/^\?/,"").split("&").reduce((e,t)=>{let[n,i]=t.split("=");return/\[\]$/.test(n)?(n=n.replace("[]",""),e[n]=e[n]||[],e[n].push(i)):e[n]=i||"",e},{}):{}}function tn(e){return Object.keys(e).map(t=>Array.isArray(e[t])?e[t].map(e=>"".concat(t,"[]=").concat(e)).join("&"):"".concat(t,"=").concat(e[t])).join("&")}function nn(e,t){let n=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);let i=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:i?n.search:Ve.parseQS(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host||window.location.host}}function rn(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":".concat(e.port):""))+(e.pathname||"")+(e.search?"?".concat(Ve.formatQS(e.search||"")):"")+(e.hash?"#".concat(e.hash):"")}function sn(e,t){let{checkTypes:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const i=Array.isArray(e),r=Array.isArray(t);if(i&&r){if(e.length!==t.length)return!1;for(let i=0;i{e[r].some(e=>sn(e,t))||e[r].push(t)}):e[r]=[...s]:e[r]=s}}function dn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=function(e,t){if(gt(Math.imul))return Math.imul(e,t);var n=(4194303&e)*(t|=0);return 4290772992&e&&(n+=(4290772992&e)*t|0),0|n},i=3735928559^t,r=1103547991^t;for(let t,s=0;s>>16,2246822507)^n(r^r>>>13,3266489909),r=n(r^r>>>16,2246822507)^n(i^i>>>13,3266489909),(4294967296*(2097151&r)+(i>>>0)).toString()}function ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};const n=new Map,i=function(){const i=t.apply(this,arguments);return n.has(i)||n.set(i,e.apply(this,arguments)),n.get(i)};return i.clear=n.clear.bind(n),i}const cn=function(){let e;return function(){if(void 0!==e)return e;try{void 0===window.CompressionStream?e=!1:(new window.CompressionStream("gzip"),e=!0)}catch(t){e=!1}return e}}();async function un(e){"string"!=typeof e&&(e=JSON.stringify(e));const t=(new TextEncoder).encode(e),n=new Blob([t]).stream().pipeThrough(new window.CompressionStream("gzip")),i=await new Response(n).blob(),r=await i.arrayBuffer();return new Uint8Array(r)}function pn(e,t,n){t.split&&(t=t.split("."));for(var i,r,s=0,o=t.length,a=e;snew Request(e,t),timeout(e,t){const n=new AbortController;let i=setTimeout(()=>{n.abort(),dt("Request timeout after ".concat(e,"ms"),t),i=null},e);return{signal:n.signal,done(){i&&clearTimeout(i)}}}},fn="GET",gn="Content-Type";function mn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,{request:t,done:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(t,n)=>{var i,r;let s;null==e||null!=(null===(i=n)||void 0===i?void 0:i.signal)||me.getConfig("disableAjaxTimeout")||(s=hn.timeout(e,t),n=Object.assign({signal:s.signal},n));let o=hn.fetch(t,n);return null!=(null===(r=s)||void 0===r?void 0:r.done)&&(o=o.finally(s.done)),o};return null==t&&null==n||(i=(e=>function(i,r){const s=new URL(null==(null==i?void 0:i.url)?i:i.url,document.location).origin;let o=e(i,r);return t&&t(s),n&&(o=o.finally(()=>n(s))),o})(i)),i}function vn(e,t){let{status:n,statusText:i="",headers:r,url:s}=e,o=0;function a(e){if(0===o)try{var n;o=(new DOMParser).parseFromString(t,null==r||null===(n=r.get(gn))||void 0===n||null===(n=n.split(";"))||void 0===n?void 0:n[0])}catch(t){o=null,e&&e(t)}return o}return{readyState:XMLHttpRequest.DONE,status:n,statusText:i,responseText:t,response:t,responseType:"",responseURL:s,get responseXML(){return a(dt)},getResponseHeader:e=>null!=r&&r.has(e)?r.get(e):null,toJSON(){return Object.assign({responseXML:a()},this)},timedOut:!1}}function yn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,{request:t,done:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=mn(e,{request:t,done:n});return function(e,t,n){!function(e,t){const{success:n,error:i}="object"==typeof t&&null!=t?t:{success:"function"==typeof t?t:()=>null,error:(e,t)=>dt("Network error",e,t)};e.then(e=>e.text().then(t=>[e,t])).then(e=>{let[t,r]=e;const s=vn(t,r);t.ok||304===t.status?n(r,s):i(t.statusText,s)},e=>i("",Object.assign(vn({status:0},""),{reason:e,timedOut:"AbortError"===(null==e?void 0:e.name)})))}(i(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n.method||(t?"POST":fn);if(i===fn&&t){const i=nn(e,n);Object.assign(i.search,t),e=rn(i)}const r=new Headers(n.customHeaders);r.set(gn,n.contentType||"text/plain");const s={method:i,headers:r};return i!==fn&&t&&(s.body=t),n.withCredentials&&(s.credentials="include"),isSecureContext&&(["browsingTopics","adAuctionHeaders"].forEach(e=>{n[e]&&(s[e]=!0)}),null!=n.suppressTopicsEnrollmentWarning&&(s.suppressTopicsEnrollmentWarning=n.suppressTopicsEnrollmentWarning)),n.keepalive&&(s.keepalive=!0),hn.makeRequest(e,s)}(e,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})),t)}}const bn=yn(),_n=mn(),An=b();function wn(e){return An.getOption(e)}function En(e){let t=[0,0];try{if(An.getMaxSizeByUnitCode)t=An.getMaxSizeByUnitCode(e);else{const n=function(e){return document.getElementById(e)}(e);t=[n.offsetWidth,n.offsetHeight]}}catch(e){t=[0,0]}return t}function In(){const e=An.getConfig("cache.url")||"";return e.indexOf("yolla")>-1?"yolla":e.indexOf("rubicon")>-1?"rubicon":e.indexOf("adnxs")>-1?"adnxs":"unknown"}const Sn="pb_uuid",Cn=new Map;function Tn(e){if(e.trackingId)return e.trackingId;let t="".concat("pb_").concat(e.adId);if(e.vastUrl)return t;let n=e.vastXml&&e.vastXml.match(/]*>/i);return n&&(t=n[2]),t}function On(e){let{index:t=Vo.index}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=xn(e),i=t.getAuction(e);let r={type:"xml",value:n,ttlseconds:Number(e.ttl)+15};return me.getConfig("cache.vasttrack")&&(r.bidder=e.bidder,r.bidid=e.requestId,r.aid=e.auctionId),null!=i&&(r.timestamp=i.getAuctionStart()),"string"==typeof e.customCacheKey&&""!==e.customCacheKey&&(r.key=e.customCacheKey),r}function xn(e){let t="",n=Tn(e);if(e.trackingId=n,e.vastUrl){t=function(e,t){t=t&&(Array.isArray(t)?t:[t]);const n=new RegExp("[?&]".concat(Sn,"(=([^&#]*)|&|#|$)")).exec(e);let i=n?' id="'.concat(n[2],'"'):"",r=t?t.map(e=>"")).join(""):"";return'\n \n \n prebid.org wrapper\n \n ").concat(r,"\n \n \n \n ")}(e.vastUrl+"&".concat(Sn,"=").concat(n),e.vastImpUrl)}else t=function(e,t){if(!e||!t)return e;const n=/^\s*id=/.test(t)?" "+t:' id="'.concat(t,'"');return e.replace(/]*>/i,""))}(e.vastXml,n);return t}const Rn=e=>{const t=xn(e),n=URL.createObjectURL(new Blob([t],{type:"text/xml"}));Dn(e,n,e.videoCacheKey),Cn.set(e.videoCacheKey,n)},Dn=(e,t,n)=>{e.vastUrl&&e.videoCacheKey||(e.videoCacheKey=n||We(),e.vastUrl=t)},Bn={store:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:yn;const i={puts:e.map(On)};n(me.getConfig("cache.timeout"))(me.getConfig("cache.url"),function(e){return{success:function(t){let n;try{n=JSON.parse(t).responses}catch(t){return void e(t,[])}n?e(null,n):e(new Error("The cache server didn't respond with a responses property."),[])},error:function(t,n){e(new Error("Error storing video ad in the cache: ".concat(t,": ").concat(JSON.stringify(n))),[])}}}(t),JSON.stringify(i),{contentType:"text/plain",withCredentials:!0})}};function Un(e){const t=Date.now(),n=e.map(e=>e.bidResponse);Bn.store(n,function(i,r){const s=Date.now()-t,o={eventCatogory:"Debug",eventAction:"onCacheServerResponse",eventLabel:In(),cm1:n.length,cm2:r.length,cm6:0,cm7:s};i?(o.cd6=i||"error",o.cm6=n.length||1,dt("Failed to save to the video cache: ".concat(i,". Video bids will be discarded:"),n)):e.length!==r.length?(o.cd6="cache IDs mismatched",o.cm6=n.length||1,dt("expected ".concat(e.length," cache IDs, got ").concat(r.length," instead"))):r.forEach((t,n)=>{const{auctionInstance:i,bidResponse:r,afterBidAdded:s}=e[n];var o;""===t.uuid?at("Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded."):(Dn(r,(o=t.uuid,"".concat(me.getConfig("cache.url"),"?uuid=").concat(o)),t.uuid),Do(i,r),s())}),void 0!==window.yaq&&window.yaq("event.debug","onCacheServerResponse",o)})}let Pn,kn,Mn;me.getConfig("cache",e=>{let{cache:t}=e;Pn="number"==typeof t.batchSize&&t.batchSize>0?t.batchSize:1,kn="number"==typeof t.batchTimeout&&t.batchTimeout>0?t.batchTimeout:0,t.useLocal&&!Mn&&(Mn=Vo.onExpiry(e=>{e.getBidsReceived().forEach(e=>{const t=Cn.get(e.videoCacheKey);t&&t.startsWith("blob")&&URL.revokeObjectURL(t),Cn.delete(e.videoCacheKey)})}))});const $n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:setTimeout,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Un,n=[[]],i=!1;const r=e=>e();return function(s,o,a){const d=kn>0?e:r;n[n.length-1].length>=Pn&&n.push([]),n[n.length-1].push({auctionInstance:s,bidResponse:o,afterBidAdded:a}),i||(i=!0,d(()=>{n.forEach(t),n=[[]],i=!1},kn))}}(),Ln="accessDevice",jn="syncUser",Nn="enrichUfpd",Fn="enrichEids",zn="fetchBids",qn="transmitEids",Vn="transmitUfpd",Gn="transmitPreciseGeo",Hn="transmitTid";function Yn(e){var t=e;return{callBids:function(){},setBidderCode:function(e){t=e},getBidderCode:function(){return t}}}function Wn(e){let{src:t="client",bidder:n="",bidId:i,transactionId:r,adUnitId:s,auctionId:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var a=t,d=e||0;Object.assign(this,{bidderCode:n,width:0,height:0,statusMessage:function(){switch(d){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}(),adId:Ye(),requestId:i,transactionId:r,adUnitId:s,auctionId:o,mediaType:"banner",source:a}),this.getStatusCode=function(){return d},this.getSize=function(){return this.width+"x"+this.height},this.getIdentifiers=function(){return{src:this.source,bidder:this.bidderCode,bidId:this.requestId,transactionId:this.transactionId,adUnitId:this.adUnitId,auctionId:this.auctionId}}}function Xn(e,t){return new Wn(e,t)}function Jn(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function Kn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Qn=new WeakSet;function Zn(e){return null==e?this.defaultScope:e}const ei=new class{constructor(e,t){Jn(this,Qn),this.getSettings=e,this.defaultScope=t}get(e,t){let n=this.getOwn(e,t);return void 0===n&&(n=this.getOwn(null,t)),n}getOwn(e,t){return e=Kn(Qn,this,Zn).call(this,e),D(this.getSettings(),"".concat(e,".").concat(t))}getScopes(){return Object.keys(this.getSettings()).filter(e=>e!==this.defaultScope)}settingsFor(e){return on({},this.ownSettingsFor(null),this.ownSettingsFor(e))}ownSettingsFor(e){return e=Kn(Qn,this,Zn).call(this,e),this.getSettings()[e]||{}}}(()=>b().bidderSettings||{},U),ti="prebid",ni="bidder",ii="userId",ri="analytics";var si=n(864),oi=n.n(si);let ai=oi()({ready:oi().SYNC|oi().ASYNC|oi().QUEUE});const di=Ue();ai.ready=(()=>{const e=ai.ready;return function(){try{return e.apply(ai,arguments)}finally{di.resolve()}}})();const li=di.promise,ci=ai.get;const ui={};function pi(e,t){let{postInstallAllowed:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ai("async",function(i){i.forEach(e=>t(...e)),n&&(ui[e]=t)},e)([])}function hi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{t.push(n),e(t)})}function fi(e,t){return Object.defineProperties(t,Object.fromEntries(["before","after","getHooks","removeAll"].map(t=>[t,{get:()=>e[t]}]))),t}const gi="component",mi=gi+"Type",vi=gi+"Name",yi="adapterCode",bi="storageType",_i="configName",Ai="syncType",wi="syncUrl",Ei="_config";function Ii(e){return function(t,n,i){const r={[mi]:t,[vi]:n,[gi]:"".concat(t,".").concat(n)};return t===ni&&(r[yi]=e(n)),Si(Object.assign(r,i))}}const Si=ai("sync",e=>e);const[Ci,Ti]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lt("Activity control:");const t={};function n(e){return t[e]=t[e]||[]}function i(t,n,i,r){let s;try{s=i(r)}catch(i){e.logError("Exception in rule ".concat(n," for '").concat(t,"'"),i),s={allow:!1,reason:i}}return s&&Object.assign({activity:t,name:n,component:r[gi]},s)}const r={};function s(t){let{activity:n,name:i,allow:s,reason:o,component:a}=t;const d="".concat(i," ").concat(s?"allowed":"denied"," '").concat(n,"' for '").concat(a,"'").concat(o?":":""),l=r.hasOwnProperty(d);if(l&&clearTimeout(r[d]),r[d]=setTimeout(()=>delete r[d],1e3),!l){const t=[d];o&&t.push(o),(s?e.logInfo:e.logWarn).apply(e,t)}}return[function(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;const s=n(e),o=s.findIndex(e=>{let[t]=e;return r=0&&s.splice(e,1)}},function(e,t){let r,o;for(const[a,d,l]of n(e)){if(r!==a&&o)break;r=a;const n=i(e,d,l,t);if(n){if(!n.allow)return s(n),!1;o=n}}return o&&s(o),!0}]}();function Oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function xi(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},{isAllowed:n=Ti}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function i(i,r){let s=e;const o=me.getCurrentBidder();o&&t===ni&&Zs.aliasRegistry[o]===e&&(s=o);return i({valid:n(Ln,eo(t,s,{[bi]:r}))})}function r(e,t,n){if(!n||"function"!=typeof n)return i(e,t);Bi.push(function(){let r=i(e,t);n(r)})}function s(e){const t=e.charAt(0).toUpperCase()+e.substring(1),n=()=>window[e],i=function(t){return r(function(t){if(t&&t.valid)try{return!!n()}catch(t){dt("".concat(e," api disabled"))}return!1},Ri,t)};return{["has".concat(t)]:i,["".concat(e,"IsEnabled")]:e=>r(function(e){if(e&&e.valid)try{return n().setItem("prebid.cookieTest","1"),"1"===n().getItem("prebid.cookieTest")}catch(e){}finally{try{n().removeItem("prebid.cookieTest")}catch(e){}}return!1},Ri,e),["setDataIn".concat(t)]:(e,t,s)=>r(function(r){r&&r.valid&&i()&&n().setItem(e,t)},Ri,s),["getDataFrom".concat(t)]:(e,t)=>r(function(t){return t&&t.valid&&i()?n().getItem(e):null},Ri,t),["removeDataFrom".concat(t)]:(e,t)=>r(function(t){t&&t.valid&&i()&&n().removeItem(e)},Ri,t)}}return xi(xi(xi({setCookie:function(e,t,n,i,s,o){return r(function(r){if(r&&r.valid){const r=s&&""!==s?" ;domain=".concat(encodeURIComponent(s)):"",o=n&&""!==n?" ;expires=".concat(n):"",a=null!=i&&"none"==i.toLowerCase()?"; Secure":"";document.cookie="".concat(e,"=").concat(encodeURIComponent(t)).concat(o,"; path=/").concat(r).concat(i?"; SameSite=".concat(i):"").concat(a)}},Di,o)},getCookie:function(e,t){return r(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},Di,t)},cookiesAreEnabled:function(e){return r(function(e){return!(!e||!e.valid)&&Vt()},Di,e)}},s("localStorage")),s("sessionStorage")),{},{findSimilarCookies:function(e,t){return r(function(t){if(t&&t.valid){const t=[];if(qt()){const n=document.cookie.split(";");for(;n.length;){const i=n.pop();let r=i.indexOf("=");r=r<0?i.length:r;decodeURIComponent(i.slice(0,r).replace(/^\s+/,"")).indexOf(e)>=0&&t.push(decodeURIComponent(i.slice(r+1)))}}return t}},Di,t)}})}function Pi(){let{moduleType:e,moduleName:t,bidderCode:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function i(){throw new Error("Invalid invocation for getStorageManager: must set either bidderCode, or moduleType + moduleName")}return n?((e&&e!==ni||t)&&i(),e=ni,t=n):t&&e||i(),Ui({moduleType:e,moduleName:t})}function ki(e){return Ui({moduleName:e,moduleType:ti})}Ci(Ln,"deviceAccess config",function(){if(!qt())return{allow:!1}}),Ci(Ln,"bidderSettings.*.storageAllowed",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ei;if(e[mi]!==ni)return;let n=t.get(e[yi],"storageAllowed");if(n&&!0!==n){const t=e[bi];n=Array.isArray(n)?n.some(e=>e===t):n===t}else n=!!n;return n?void 0:{allow:n}});const Mi={syncEnabled:!0,filterSettings:{image:{bidders:"*",filter:"include"}},syncsPerBidder:5,syncDelay:3e3,auctionDelay:500};me.setDefaults({userSync:jt(Mi)});const $i=ki("usersync");const Li=function(e){let t={},n={image:[],iframe:[]},i=new Set,r={},s={image:!0,iframe:!1},o=e.config;function a(){if(o.syncEnabled&&e.browserSupportsCookies){try{!function(){if(!s.iframe)return;d(n.iframe,e=>{let[t,i]=e;st("Invoking iframe user sync for bidder: ".concat(t)),xt(i),function(e,t){e.image=e.image.filter(e=>e[0]!==t)}(n,t)})}(),function(){if(!s.image)return;d(n.image,e=>{let[t,n]=e;st("Invoking image pixel user sync for bidder: ".concat(t)),Tt(n)})}()}catch(e){return dt("Error firing user syncs",e)}n={image:[],iframe:[]}}}function d(e,t){Lt(e).forEach(t)}function l(e,t){let n=o.filterSettings;if(function(e,t){if(e.all&&e[t])return at('Detected presence of the "filterSettings.all" and "filterSettings.'.concat(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],i=e.all?"all":t;if(!n)return!1;let r=n.filter,s=n.bidders;if(r&&"include"!==r&&"exclude"!==r)return at('UserSync "filterSettings.'.concat(i,".filter\" setting '").concat(r,"' is not a valid option; use either 'include' or 'exclude'.")),!1;if("*"!==s&&!(Array.isArray(s)&&s.length>0&&s.every(e=>mt(e)&&"*"!==e)))return at('Detected an invalid setup in userSync "filterSettings.'.concat(i,".bidders\"; use either '*' (to represent all bidders) or an array of bidders.")),!1;return!0}(n,e)){s[e]=!0;let i=n.all?n.all:n[e],r="*"===i.bidders?[t]:i.bidders;const o={include:(e,t)=>!e.includes(t),exclude:(e,t)=>e.includes(t)};return o[i.filter||"include"](r,t)}return!s[e]}return me.getConfig("userSync",e=>{if(e.userSync){let t=e.userSync.filterSettings;bt(t)&&(t.image||t.all||(e.userSync.filterSettings.image={bidders:"*",filter:"include"}))}o=Object.assign(o,e.userSync)}),e.regRule(jn,"userSync config",e=>{if(!o.syncEnabled)return{allow:!1,reason:"syncs are disabled"};if(e[mi]===ni){const n=e[Ai],i=e[vi];if(!t.canBidderRegisterSync(n,i))return{allow:!1,reason:"".concat(n," syncs are not enabled for ").concat(i)}}}),t.registerSync=(t,s,a)=>i.has(s)?st('already fired syncs for "'.concat(s,'", ignoring registerSync call')):o.syncEnabled&&vt(n[t])?s?0!==o.syncsPerBidder&&Number(r[s])>=o.syncsPerBidder?at('Number of user syncs exceeded for "'.concat(s,'"')):void(e.isAllowed(jn,eo(ni,s,{[Ai]:t,[wi]:a}))&&(n[t].push([s,a]),r=function(e,t){return e[t]?e[t]+=1:e[t]=1,e}(r,s))):at("Bidder is required for registering sync"):at('User sync type "'.concat(t,'" not supported')),t.bidderDone=i.add.bind(i),t.syncUsers=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e)return setTimeout(a,Number(e));a()},t.triggerUserSyncs=()=>{o.enableOverride&&t.syncUsers()},t.canBidderRegisterSync=(e,t)=>!o.filterSettings||!l(e,t),t}(Object.defineProperties({config:me.getConfig("userSync"),isAllowed:Ti,regRule:Ci},{browserSupportsCookies:{get:function(){return!/^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent)&&$i.cookiesAreEnabled()}}})),ji="outstream",Ni="instream",Fi=new Map([["mimes",e=>Array.isArray(e)&&e.length>0&&e.every(e=>"string"==typeof e)],["minduration",Kt],["maxduration",Kt],["startdelay",Kt],["maxseq",Kt],["poddur",Kt],["protocols",Zt],["w",Kt],["h",Kt],["podid",mt],["podseq",Kt],["rqddurs",Zt],["placement",Kt],["plcmt",Kt],["linearity",Kt],["skip",e=>[1,0].includes(e)],["skipmin",Kt],["skipafter",Kt],["sequence",Kt],["slotinpod",Kt],["mincpmpersec",yt],["battr",Zt],["maxextended",Kt],["minbitrate",Kt],["maxbitrate",Kt],["boxingallowed",Kt],["playbackmethod",Zt],["playbackend",Kt],["delivery",Zt],["pos",Kt],["api",Zt],["companiontype",Zt],["poddedupe",Zt]]);const zi=ai("sync",function(e,t,n,i,r){if(n&&(r||i!==ji)){const{url:t,useLocal:n}=me.getConfig("cache")||{};return t||n||!e.vastXml||e.vastUrl?!(!e.vastUrl&&!e.vastXml):(dt('\n This bid contains only vastXml and will not work when a prebid cache url is not specified.\n Try enabling either prebid cache with YMPB.setConfig({ cache: {url: "..."} });\n or local cache with YMPB.setConfig({ cache: { useLocal: true }});\n '),!1)}return!(i===ji&&!r)||!!(e.renderer||t&&t.renderer||n.renderer)},"checkVideoBidSetup");let qi=null,Vi=0,Gi=[];function Hi(){document.hidden?qi=Date.now():(Vi+=Date.now()-(null!=qi?qi:0),qi=null,Gi.forEach(e=>{let{callback:t,startTime:n,setTimerId:i}=e;return i(Yi(t,Vi-n)())}),Gi=[])}function Yi(e,t){const n=Vi;let i=setTimeout(()=>{Vi===n&&null==qi?e():null!=qi?Gi.push({callback:e,startTime:n,setTimerId(e){i=e}}):i=Yi(e,Vi-n)()},t);return()=>i}function Wi(){let{startTime:e=zt,ttl:t=()=>null,monotonic:n=!1,slack:i=5e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map,s=[],o=[],a=n?e=>o.push(e):e=>o.splice(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,i=0,r=e.length&&e.length-1;const s=n(t);for(;r-i>1;){const t=i+Math.round((r-i)/2);s>n(e[t])?i=t:r=t}for(;e.length>i&&s>n(e[i]);)i++;return i}(o,e,e=>e.expiry),0,e);let d,l;function c(){if(l&&clearTimeout(l),o.length>0){const e=zt();d=Math.max(e,o[0].expiry+i),l=Yi(()=>{const e=zt();let t=0;for(const n of o){if(n.expiry>e)break;s.forEach(e=>{try{e(n.item)}catch(e){dt(e)}}),r.delete(n.item),t++}o.splice(0,t),l=null,c()},d-e)}else l=null}function u(n){const r={},s=p;let o;const[u,h]=Object.entries({start:e,delta:t}).map(e=>{let t,[u,h]=e;return function(){const e=t={};De.resolve(h(n)).then(n=>{e===t&&(r[u]=n,s===p&&null!=r.start&&null!=r.delta&&(o=r.start+r.delta,a(f),(null==l||d>o+i)&&c()))})}}),f={item:n,refresh:h,get expiry(){return o}};return u(),h(),f}let p={};return{[Symbol.iterator]:()=>r.keys(),add(e){!r.has(e)&&r.set(e,u(e))},remove(e){r.delete(e)},clear(){o.length=0,c(),r.clear(),p={}},toArray:()=>Array.from(r.keys()),refresh(){o.length=0,c();for(const e of r.values())e.refresh()},onExpiry:e=>(s.push(e),()=>{const t=s.indexOf(e);t>=0&&s.splice(t,1)})}}document.addEventListener("visibilitychange",Hi);const Xi="eventHistoryTTL";let Ji=null;const Ki=Wi({monotonic:!0,ttl:()=>Ji});me.getConfig(Xi,e=>{var t;const n=Ji;e=null===(t=e)||void 0===t?void 0:t[Xi],Ji="number"==typeof e?1e3*e:null,n!==Ji&&Ki.refresh()});let Qi=Array.prototype.slice,Zi=Array.prototype.push,er=Object.values(M);const tr={bidWon:"adUnitCode"},nr=function(){let e={},t={};function n(e){return er.includes(e)}return t.has=n,t.on=function(t,i,r){if(n(t)){let n=e[t]||{que:[]};r?(n[r]=n[r]||{que:[]},n[r].que.push(i)):n.que.push(i),e[t]=n}else dt("Wrong event name : "+t+" Valid event names :"+er)},t.emit=function(t){!function(t,n){st("Emitting event for: "+t);let i=n[0]||{},r=i[tr[t]],s=e[t]||{que:[]};var o=Object.keys(s);let a=[];Ki.add({eventType:t,args:i,id:r,elapsedTime:window.performance&&window.performance.now&&window.performance.now()||0}),r&&o.includes(r)&&Zi.apply(a,s[r].que),Zi.apply(a,s.que),(a||[]).forEach(function(e){if(e)try{e.apply(null,n)}catch(e){dt("Error executing handler:","events.js",e,t)}})}(t,Qi.call(arguments,1))},t.off=function(t,n,i){let r=e[t];At(r)||At(r.que)&&At(r[i])||i&&(At(r[i])||At(r[i].que))||(i?(r[i].que||[]).forEach(function(e){let t=r[i].que;e===n&&t.splice(t.indexOf(e),1)}):(r.que||[]).forEach(function(e){let t=r.que;e===n&&t.splice(t.indexOf(e),1)}),e[t]=r)},t.get=function(){return e},t.addEvents=function(e){er=er.concat(e)},t.getEvents=function(){return Ki.toArray().map(e=>Object.assign({},e))},t}();var ir;nr.addEvents(["videoAdLoaded","videoAdError","videoAdComplete"]),ir=nr.emit.bind(nr),Le=ir;const{on:rr,off:sr,get:or,getEvents:ar,emit:dr,addEvents:lr,has:cr}=nr;function ur(){Ki.clear()}const pr="performanceMetrics",hr=window.performance&&window.performance.now?()=>window.performance.now():()=>Date.now(),fr=new WeakMap;function gr(){let{now:e=hr,mkNode:t=yr,mkTimer:n=vr,mkRenamer:i=e=>e,nodes:r=fr}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){return function s(o){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>({forEach(t){t(e)}});a=i(a);const d=(l="timestamps",function(e){return o.dfWalk({visit(t,n){const i=n[l];if(i.hasOwnProperty(e))return i[e]}})});var l;function c(e,t){const n=a(e);o.dfWalk({follow:(e,t)=>t.propagate&&(!e||!e.stopPropagation),visit(e,i){n.forEach(n=>{null==e?i.metrics[n]=t:(i.groups.hasOwnProperty(n)||(i.groups[n]=[]),i.groups[n].push(t))})}})}function u(t){return n(e,e=>c(t,e))}function p(){let e={};return o.dfWalk({visit(t,n){e=Object.assign({},!t||t.includeGroups?n.groups:null,n.metrics,e)}}),e}const h={startTiming:u,measureTime:function(e,t){return u(e).stopAfter(t)()},measureHookTime:function(e,t,n){const i=u(e);return n(function(e){const t=i.stopBefore(e);return t.bail=e.bail&&i.stopBefore(e.bail),t.stopTiming=i,t.untimed=e,t}(t))},checkpoint:function(t){o.timestamps[t]=e()},timeSince:function(t,n){const i=d(t),r=null!=i?e()-i:null;return null!=n&&c(n,r),r},timeBetween:function(e,t,n){const i=d(e),r=d(t),s=null!=i&&null!=r?r-i:null;return null!=n&&c(n,s),s},setMetric:c,getMetrics:p,fork:function(){let{propagate:e=!0,stopPropagation:n=!1,includeGroups:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(t([[o,{propagate:e,stopPropagation:n,includeGroups:i}]]),a)},join:function(e){let{propagate:t=!0,stopPropagation:n=!1,includeGroups:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=r.get(e);null!=s&&s.addParent(o,{propagate:t,stopPropagation:n,includeGroups:i})},newMetrics:function(){return s(o.newSibling(),a)},renameWith:function(e){return s(o,e)},toJSON:()=>p()};return r.set(h,o),h}(t([]))}}function mr(e,t,n){return function(){t&&t();try{return e.apply(this,arguments)}finally{n&&n()}}}function vr(e,t){const n=e();let i=!1;function r(){i||(t(e()-n),i=!0)}return r.stopBefore=e=>mr(e,r),r.stopAfter=e=>mr(e,null,r),r}function yr(e){return{metrics:{},timestamps:{},groups:{},addParent(t,n){e.push([t,n])},newSibling:()=>yr(e.slice()),dfWalk(){let t,{visit:n,follow:i=()=>!0,visited:r=new Set,inEdge:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!r.has(this)){if(r.add(this),t=n(s,this),null!=t)return t;for(const[o,a]of e)if(i(s,a)&&(t=o.dfWalk({visit:n,follow:i,visited:r,inEdge:a}),null!=t))return t}}}}const br=(()=>{const e=function(){},t=()=>({}),n={forEach:e},i=()=>null;i.stopBefore=e=>e,i.stopAfter=e=>e;const r=Object.defineProperties({dfWalk:e,newSibling:()=>r,addParent:e},Object.fromEntries(["metrics","timestamps","groups"].map(e=>[e,{get:t}])));return gr({now:()=>0,mkNode:()=>r,mkRenamer:()=>()=>n,mkTimer:()=>i,nodes:{get:e,set:e}})()})();let _r=!0;function Ar(e){return _r&&e||br}me.getConfig(pr,e=>{_r=!!e[pr]});const wr=(()=>{const e=gr();return function(){return _r?e():br}})();function Er(e,t){return function(n,i){return function(r){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;ae.metrics),Sr=Er("addBidResponse.",(e,t)=>t.metrics),Cr=["cpm","ttl","creativeId","netRevenue","currency"],Tr=["auctionId","transactionId"];function Or(e){const t=Array.isArray(e.supportedMediaTypes)?{supportedMediaTypes:e.supportedMediaTypes}:void 0;function n(e){const n=Rr(e);Zs.registerBidAdapter(n,e.code,t)}n(e),Array.isArray(e.aliases)&&e.aliases.forEach(t=>{let i,r,s=t;bt(t)&&(s=t.code,i=t.gvlid,r=t.skipPbsAliasing),Zs.aliasRegistry[s]=e.code,n(Object.assign({},e,{code:s,gvlid:i,skipPbsAliasing:r}))})}const xr=ln(e=>{let{bidderCode:t}=e;if(Ti(Hn,eo(ni,t)))return{bidRequest:e=>e,bidderRequest:e=>e};function n(e,t,n){return Tr.includes(t)?null:Reflect.get(e,t,n)}function i(e,t){const n=new Proxy(e,t);return Object.entries(e).filter(e=>{let[t,n]=e;return"function"==typeof n}).forEach(t=>{let[i,r]=t;return n[i]=r.bind(e)}),n}const r=ln(e=>i(e,{get:n}),e=>e.bidId);return{bidRequest:r,bidderRequest:e=>i(e,{get:(t,i,s)=>"bids"===i?e.bids.map(r):n(t,i,s)})}});function Rr(e){return Object.assign(new Yn(e.code),{getSpec:function(){return Object.freeze(Object.assign({},e))},registerSyncs:t,callBids:function(n,i,r,s,o,a){if(!Array.isArray(n.bids))return;const d=xr(n),l={};const c=[];function u(){r(),me.runWithBidder(e.code,()=>{dr(M.BIDDER_DONE,n),t(c,n.gdprConsent,n.uspConsent,n.gppConsent)})}const p=Mr(n).measureTime("validate",()=>n.bids.filter(t=>function(t){if(!e.isBidRequestValid(t))return at("Invalid bid sent to bidder ".concat(e.code,": ").concat(JSON.stringify(t))),!1;return!0}(d.bidRequest(t))));if(0===p.length)return void u();const h={};p.forEach(e=>{h[e.bidId]=e,e.adUnitCode||(e.adUnitCode=e.placementCode)}),Br(e,p,n,s,a,{onRequest:e=>dr(M.BEFORE_BIDDER_HTTP,n,e),onResponse:t=>{o(e.code),c.push(t)},onPaapi:e=>{const t=h[e.bidId];t?Pr(t,e):at("Received fledge auction configuration for an unknown bidId",e)},onError:(t,i)=>{i.timedOut||o(e.code),Zs.callBidderError(e.code,i,n),dr(M.BIDDER_ERROR,{error:i,bidderRequest:n}),dt("Server call for ".concat(e.code," failed: ").concat(t," ").concat(i.status,". Continuing without bids."),{bidRequests:p})},onBid:t=>{const n=h[t.requestId];if(n){var r;if(t.adapterCode=n.bidder,function(e,t){let n=ei.get(t,"allowAlternateBidderCodes")||!1,i=ei.get(t,"allowedAlternateBidderCodes");if(e&&t&&t!==e&&(i=vt(i)?i.map(e=>e.trim().toLowerCase()).filter(e=>!!e).filter(Bt):i,!n||vt(i)&&"*"!==i[0]&&!i.includes(e)))return!0;return!1}(t.bidderCode,n.bidder))return at("".concat(t.bidderCode," is not a registered partner or known bidder of ").concat(n.bidder,", hence continuing without bid. If you wish to support this bidder, please mark allowAlternateBidderCodes as true in bidderSettings.")),void i.reject(n.adUnitCode,t,K);t.originalCpm=t.cpm,t.originalCurrency=t.currency,t.meta=t.meta||Object.assign({},t[n.bidder]),t.deferBilling=n.deferBilling,t.deferRendering=t.deferBilling&&(null!==(r=t.deferRendering)&&void 0!==r?r:"function"!=typeof e.onBidBillable);const s=Object.assign(Xn(k,n),t,Qt(n,Tr));!function(e,t){const n=Ar(t.metrics);n.checkpoint("addBidResponse"),l[e]=!0,n.measureTime("addBidResponse.validate",()=>kr(e,t))?i(e,t):i.reject(e,t,X)}(n.adUnitCode,s)}else at("Bidder ".concat(e.code," made bid for unknown request ID: ").concat(t.requestId,". Ignoring.")),i.reject(null,t,J)},onCompletion:u})}});function t(t,n,i,r){Ur(e,t,n,i,r)}}const Dr=["bids","paapi"],Br=ai("async",function(e,t,n,i,r,s){let{onRequest:o,onResponse:a,onPaapi:d,onError:l,onBid:c,onCompletion:u}=s;const p=Mr(n);u=p.startTiming("total").stopBefore(u);const h=xr(n);let f=p.measureTime("buildRequests",()=>e.buildRequests(t.map(h.bidRequest),h.bidderRequest(n)));if(!f||0===f.length)return void u();Array.isArray(f)||(f=[f]);const g=Gt(u,f.length);f.forEach(t=>{var n;const s=p.fork();function u(e){null!=e&&(e.metrics=s.fork().renameWith()),c(e)}const h=r(function(n,i){m();try{n=JSON.parse(n)}catch(e){}n={body:n,headers:{get:i.getResponseHeader.bind(i)}},a(n);try{n=s.measureTime("interpretResponse",()=>e.interpretResponse(n,t))}catch(t){return dt("Bidder ".concat(e.code," failed to interpret the server's response. Continuing without bids"),null,t),void g()}let r,o;n&&!Object.keys(n).some(e=>!Dr.includes(e))?(r=n.bids,o=n.paapi):r=n,vt(o)&&o.forEach(d),r&&(vt(r)?r.forEach(u):u(r)),g()}),f=r(function(e,t){m(),l(e,t),g()});o(t);const m=s.startTiming("net"),v="TRUE"===ht(P).toUpperCase()||ct();function y(n){var i;const r=t.options;return Object.assign(n,r,{browsingTopics:!(null!=r&&r.hasOwnProperty("browsingTopics")&&!r.browsingTopics)&&((null===(i=ei.get(e.code,"topicsHeader"))||void 0===i||i)&&Ti(Vn,eo(ni,e.code))),suppressTopicsEnrollmentWarning:null!=r&&r.hasOwnProperty("suppressTopicsEnrollmentWarning")?r.suppressTopicsEnrollmentWarning:!v})}switch(t.method){case"GET":i("".concat(t.url).concat(function(e){if(e)return"?".concat("object"==typeof e?function(e){let t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+"="+encodeURIComponent(e[n])+"&");return t=t.replace(/&$/,""),t}(e):e);return""}(t.data)),{success:h,error:f},void 0,y({method:"GET",withCredentials:!0}));break;case"POST":const r=null===(n=t.options)||void 0===n?void 0:n.endpointCompression,s=e=>{let{url:t,payload:n}=e;i(t,{success:h,error:f},n,y({method:"POST",contentType:"text/plain",withCredentials:!0}))};r&&v&&at("Skipping GZIP compression for ".concat(e.code," as debug mode is enabled")),r&&!v&&cn()?un(t.data).then(e=>{const n=new URL(t.url,window.location.origin);n.searchParams.has("gzip")||n.searchParams.set("gzip","1"),s({url:n.href,payload:e})}):s({url:t.url,payload:"string"==typeof t.data?t.data:JSON.stringify(t.data)});break;default:at("Skipping invalid request from ".concat(e.code,". Request type ").concat(t.type," must be GET or POST")),g()}})},"processBidderRequests"),Ur=ai("async",function(e,t,n,i,r){const s=me.getConfig("userSync.aliasSyncEnabled");if(e.getUserSyncs&&(s||!Zs.aliasRegistry[e.code])){let s=e.getUserSyncs({iframeEnabled:Li.canBidderRegisterSync("iframe",e.code),pixelEnabled:Li.canBidderRegisterSync("image",e.code)},t,n,i,r);s&&(Array.isArray(s)||(s=[s]),s.forEach(t=>{Li.registerSync(t.type,e.code,t.url)}),Li.bidderDone(e.code))}},"registerSyncs"),Pr=ai("sync",(e,t)=>{},"addPaapiConfig");function kr(e,t){let{index:n=Vo.index}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function i(e){return"Invalid bid from ".concat(t.bidderCode,". Ignoring bid: ").concat(e)}return e?t?function(){let e=Object.keys(t);return Cr.every(n=>e.includes(n)&&![void 0,null].includes(t[n]))}()?"native"!==t.mediaType||function(e){var t;let{index:n=Vo.index}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=n.getAdUnit(e);if(!i)return!1;let r=i.nativeOrtbRequest,s=(null===(t=e.native)||void 0===t?void 0:t.ortb)||nd(e.native,r);return function(e,t){var n;if(null==e||null===(n=e.link)||void 0===n||!n.url)return dt("native response doesn't have 'link' property. Ortb response: ",e),!1;let i=t.assets.filter(e=>1===e.required).map(e=>e.id),r=e.assets.map(e=>e.id);const s=i.every(e=>r.includes(e));s||dt("didn't receive a bid with all required assets. Required ids: ".concat(i,", but received ids in response: ").concat(r));return s}(s,r)}(t,{index:n})?"video"!==t.mediaType||function(e){var t;let{index:n=Vo.index}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=null===(t=n.getMediaTypes(e))||void 0===t?void 0:t.video,r=i&&(null==i?void 0:i.context),s=i&&(null==i?void 0:i.useCacheKey),o=n.getAdUnit(e);return zi(e,o,i,r,s)}(t,{index:n})?!("banner"===t.mediaType&&!function(e,t){let{index:n=Vo.index}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if((t.width||0===parseInt(t.width,10))&&(t.height||0===parseInt(t.height,10)))return t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),!0;if(null!=t.wratio&&null!=t.hratio)return t.wratio=parseInt(t.wratio,10),t.hratio=parseInt(t.hratio,10),!0;const i=n.getBidRequest(t),r=n.getMediaTypes(t),s=Ke(i&&i.sizes||r&&r.banner&&r.banner.sizes);if(1===s.length){const[e,n]=s[0].split("x");return t.width=parseInt(e,10),t.height=parseInt(n,10),!0}return!1}(e,t,{index:n}))||(dt(i("Banner bids require a width and height")),!1):(dt(i("Video bid does not have required vastUrl or renderer property")),!1):(dt(i("Native bid missing some required properties.")),!1):(dt(i("Bidder ".concat(t.bidderCode," is missing required params. Check http://prebid.org/dev-docs/bidder-adapter-1.html for list of params."))),!1):(at("Some adapter tried to add an undefined bid for ".concat(e,".")),!1):(at("No adUnitCode was supplied to addBidResponse."),!1)}function Mr(e){return Ar(e.metrics).renameWith(t=>["adapter.client.".concat(t),"adapters.client.".concat(e.bidderCode,".").concat(t)])}let $r={};function Lr(e,t,n){let i=function(e,t){let n=$r[e]=$r[e]||{bidders:{}};return t?n.bidders[t]=n.bidders[t]||{}:n}(e,n);return i[t]=(i[t]||0)+1,i[t]}function jr(e){return Lr(e,"auctionsCounter")}function Nr(e){var t;return(null===(t=$r)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.requestsCounter)||0}function Fr(e,t){var n;return(null===(n=$r)||void 0===n||null===(n=n[e])||void 0===n||null===(n=n.bidders)||void 0===n||null===(n=n[t])||void 0===n?void 0:n.requestsCounter)||0}function zr(e,t){var n;return(null===(n=$r)||void 0===n||null===(n=n[e])||void 0===n||null===(n=n.bidders)||void 0===n||null===(n=n[t])||void 0===n?void 0:n.winsCounter)||0}function qr(e){var t;return(null===(t=$r)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.auctionsCounter)||0}function Vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(!e)return e;if(/\w+:\/\//.exec(e))return e;let n=t.location.protocol;try{n=t.top.location.protocol}catch(e){}return/^\/\//.exec(e)?n+e:"".concat(n,"//").concat(e)}function Gr(e){let{noLeadingWww:t=!1,noPort:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{e=new URL(Vr(e))}catch(e){return}return e=n?e.hostname:e.host,t&&e.startsWith("www.")&&(e=e.substring(4)),e}function Hr(e){try{const t=e.querySelector("link[rel='canonical']");if(null!==t)return t.href}catch(e){}return null}const Yr=function(e){let t,n,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return r.top!==r?e:function(){const s=Hr(r.document),o=r.location.href;return t===s&&o===n||(t=s,n=o,i=e()),i}}((Wr=window,function(){const e=[],t=function(e){try{if(!e.location.ancestorOrigins)return;return e.location.ancestorOrigins}catch(e){}}(Wr),n=me.getConfig("maxNestedIframes");let i,r,s,o,a=!1,d=0,l=!1,c=!1,u=!1;do{const n=i,o=c;let p,h=!1,f=null;c=!1,i=i?i.parent:Wr;try{p=i.location.href||null}catch(e){h=!0}if(h)if(o){const e=n.context;try{f=e.sourceUrl,r=f,u=!0,l=!0,i===Wr.top&&(a=!0),e.canonicalUrl&&(s=e.canonicalUrl)}catch(e){}}else{at("Trying to access cross domain iframe. Continuing without referrer and location");try{const e=n.document.referrer;e&&(f=e,i===Wr.top&&(a=!0))}catch(e){}!f&&t&&t[d-1]&&(f=t[d-1],i===Wr.top&&(u=!0)),f&&!l&&(r=f)}else{if(p&&(f=p,r=f,l=!1,i===Wr.top)){a=!0;const e=Hr(i.document);e&&(s=e)}i.context&&i.context.sourceUrl&&(c=!0)}e.push(f),d++}while(i!==Wr.top&&d-1&&-1===f.indexOf("?")&&(f="".concat(f).concat(p.substring(p.indexOf("?")))),{reachedTop:a,isAmp:l,numIframes:d-1,stack:e,topmostLocation:r||null,location:p,canonicalUrl:h,page:f,domain:Gr(f)||null,ref:o||null,legacy:{reachedTop:a,isAmp:l,numIframes:d-1,stack:e,referer:r||null,canonicalUrl:h}}}));var Wr;function Xr(e,t,n){Jr(e,t),t.set(e,n)}function Jr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Kr(e,t){return e.get(Zr(e,t))}function Qr(e,t,n){return e.set(Zr(e,t),n),n}function Zr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const es=Object.freeze({});var ts=new WeakMap,ns=new WeakMap,is=new WeakMap,rs=new WeakMap,ss=new WeakMap,os=new WeakMap,as=new WeakSet;class ds{constructor(){var e,t;Jr(e=this,t=as),t.add(e),Xr(this,ts,void 0),Xr(this,ns,void 0),Xr(this,is,void 0),Xr(this,rs,void 0),Xr(this,ss,!0),Xr(this,os,void 0),E(this,"generatedTime",void 0),E(this,"hashFields",void 0),this.reset()}reset(){Qr(is,this,Ue()),Qr(ts,this,!1),Qr(ns,this,null),Qr(rs,this,!1),this.generatedTime=null}enable(){Qr(ts,this,!0)}get enabled(){return Kr(ts,this)}get ready(){return Kr(rs,this)}get promise(){return Kr(rs,this)?De.resolve(Kr(ns,this)):(Kr(ts,this)||Zr(as,this,ls).call(this,null),Kr(is,this).promise)}setConsentData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt();this.generatedTime=t,Qr(ss,this,!0),Zr(as,this,ls).call(this,e)}getConsentData(){return Kr(ns,this)}get hash(){return Kr(ss,this)&&(Qr(os,this,dn(JSON.stringify(Kr(ns,this)&&this.hashFields?this.hashFields.map(e=>Kr(ns,this)[e]):Kr(ns,this)))),Qr(ss,this,!1)),Kr(os,this)}}function ls(e){Qr(rs,this,!0),Qr(ns,this,e),Kr(is,this).resolve(e)}const cs=new class extends ds{constructor(){super(...arguments),E(this,"hashFields",["gdprApplies","consentString"])}getConsentMeta(){const e=this.getConsentData();if(e&&e.vendorData&&this.generatedTime)return{gdprApplies:e.gdprApplies,consentStringSize:mt(e.vendorData.tcString)?e.vendorData.tcString.length:0,generatedAt:this.generatedTime,apiVersion:e.apiVersion}}},us=new class extends ds{getConsentMeta(){if(this.getConsentData()&&this.generatedTime)return{generatedAt:this.generatedTime}}},ps=new class extends ds{constructor(){super(...arguments),E(this,"hashFields",["applicableSections","gppString"])}getConsentMeta(){if(this.getConsentData()&&this.generatedTime)return{generatedAt:this.generatedTime}}},hs=(()=>{function e(){return!!me.getConfig("coppa")}return{getCoppa:e,getConsentData:e,getConsentMeta:e,reset(){},get promise(){return De.resolve(e())},get hash(){return e()?"1":"0"}}})(),fs=function(){const e={},t={},n={};return{register(i,r,s){s&&((e[r]=e[r]||{})[i]=s,t.hasOwnProperty(r)?t[r]!==s&&(t[r]=n):t[r]=s)},get(i){const r={modules:e[i]||{}};return t.hasOwnProperty(i)&&t[i]!==n&&(r.gvlid=t[i]),r}}}(),gs={gdpr:cs,usp:us,gpp:ps,coppa:hs};const ms=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gs;return e=Object.entries(e),Object.assign({get promise(){return De.all(e.map(e=>{let[t,n]=e;return n.promise.then(e=>[t,e])})).then(e=>Object.fromEntries(e))},get hash(){return dn(e.map(e=>{let[t,n]=e;return n.hash}).join(":"))}},Object.fromEntries(["getConsentData","getConsentMeta","reset"].map(t=>{return[t,(n=t,function(){return Object.fromEntries(e.map(e=>{let[t,i]=e;return[t,i[n]()]}))})];var n})))}();const vs=["data","ext.data","yob","gender","keywords","kwarray","id","buyeruid","customdata"].map(e=>"user.".concat(e)).concat("device.ext.cdep"),ys=["user.eids","user.ext.eids"],bs=["user.geo.lat","user.geo.lon","device.geo.lat","device.geo.lon"],_s=["device.ip"],As=["device.ipv6"];function ws(e){return Object.assign({get(){},run(e,t,n,i,r){const s=n&&n[i];if(function(e){return null!=e&&("object"!=typeof e||Object.keys(e).length>0)}(s)&&r()){const e=this.get(s);void 0===e?delete n[i]:n[i]=e}}},e)}function Es(e){return e.forEach(e=>{e.paths=e.paths.map(e=>{const t=e.split("."),n=t.pop();return[t.length>0?t.join("."):null,n]})}),function(t,n){const i=[];for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o1?t-1:0),i=1;i{if(!1!==t[e.name])for(const[r,s]of e.paths){const o=null==r?n:D(n,r);if(i.push(e.run(n,r,o,s,a.bind(null,e))),!1===t[e.name])return}}),i.filter(e=>null!=e)}}function Is(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ti;return function(n){return!t(e,n)}}function Ss(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ti;return[{name:Vn,paths:vs,applies:Is(Vn,e)},{name:qn,paths:ys,applies:Is(qn,e)},{name:Gn,paths:bs,applies:Is(Gn,e),get:e=>Math.round(100*(e+Number.EPSILON))/100},{name:Gn,paths:_s,applies:Is(Gn,e),get:e=>function(e){if(!e)return null;let t=e.split(".").map(Number);if(4!=t.length)return null;let n=[];for(let e=0;e<4;e++){let t=Math.max(0,Math.min(8,24-8*e));n.push(255<<8-t&255)}return t.map((e,t)=>e&n[t]).join(".")}(e)},{name:Gn,paths:As,applies:Is(Gn,e),get:e=>function(e){if(!e)return null;let t=e.split(":").map(e=>parseInt(e,16));for(t=t.map(e=>isNaN(e)?0:e);t.length<8;)t.push(0);if(8!=t.length)return null;let n=[];for(let e=0;e<8;e++){let t=Math.max(0,Math.min(16,64-16*e));n.push(65535<<16-t&65535)}return t.map((e,t)=>e&n[t]).map(e=>e.toString(16)).join(":")}(e)},{name:Hn,paths:["source.tid"],applies:Is(Hn,e)}].map(ws)}const Cs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ti;const t=Es(Ss(e)),n=Es(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ti;return[{name:qn,paths:["userId","userIdAsEids"],applies:Is(qn,e)},{name:Hn,paths:["ortb2Imp.ext.tid"],applies:Is(Hn,e)}].map(ws)}(e));return function(e){const i={};return{ortb2:n=>(t(i,n,e),n),bidRequest:t=>(n(i,t,e),t)}}}();Ci(Hn,"enableTIDs config",()=>{if(!me.getConfig("enableTIDs"))return{allow:!1,reason:"TIDs are disabled"}});const Ts=1,Os=2,xs=1,Rs=500;function Ds(e){return(null!=e?e:[]).reduce((e,t)=>{var n,i;let{event:r,method:s,url:o}=t;const a=e[r]=null!==(n=e[r])&&void 0!==n?n:{};return(a[s]=null!==(i=a[s])&&void 0!==i?i:[]).push(o),e},{})}function Bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Us(e){for(var t=1;t{e&&e.s2sConfig&&(Ns=vt(e.s2sConfig)?e.s2sConfig:[e.s2sConfig])});var Fs={};const zs=Ii(e=>$s.resolveAlias(e));function qs(e){var t;return null!==(t=e.configName)&&void 0!==t?t:e.name}function Vs(e){return zs(ti,Ps,{[_i]:qs(e)})}const Gs=ai("sync",function(e){let{bidderCode:t,auctionId:n,bidderRequestId:i,adUnits:r,src:s,metrics:o}=e;return r.reduce((e,r)=>{const a=r.bids.filter(e=>e.bidder===t);return null==t&&0===a.length&&null!=r.s2sBid&&a.push({bidder:null}),e.push(a.reduce((e,a)=>{var d,l;const c=null==(a=Object.assign({},a,{ortb2Imp:on({},r.ortb2Imp,a.ortb2Imp)},Yt(r,["nativeParams","nativeOrtbRequest","mediaType","renderer"]))).mediaTypes?r.mediaTypes:a.mediaTypes;return!function(e){const t=["banner","native","video"],n=["instream","outstream","adpod"];return!!Object.keys(e).every(e=>t.includes(e))&&(!e.video||!e.video.context||n.includes(e.video.context))}(c)?dt("mediaTypes is not correctly configured for adunit ".concat(r.code)):a=Object.assign({},a,{mediaTypes:c}),"client"===s&&function(e,t){Lr(e,"requestsCounter",t)}(r.code,t),e.push(Object.assign({},a,{adUnitCode:r.code,transactionId:r.transactionId,adUnitId:r.adUnitId,sizes:(null==c||null===(d=c.banner)||void 0===d?void 0:d.sizes)||(null==c||null===(l=c.video)||void 0===l?void 0:l.playerSize)||[],bidId:a.bid_id||Ye(),bidderRequestId:i,auctionId:n,src:s,metrics:o,auctionsCount:qr(r.code),bidRequestsCount:Nr(r.code),bidderRequestsCount:Fr(r.code,a.bidder),bidderWinsCount:zr(r.code,a.bidder),deferBilling:!!r.deferBilling})),e},[])),e},[]).reduce(Ut,[]).filter(e=>""!==e)},"getBids");const Hs=ai("sync",function(e,t){let{getS2SBidders:n=Ws}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==t)return e;{const i=n(t);return e.filter(e=>{if(!i.has(e.bidder))return!1;if(null==e.s2sConfigName)return!0;const n=qs(t);return(Array.isArray(e.s2sConfigName)?e.s2sConfigName:[e.s2sConfigName]).includes(n)})}},"filterBidsForAdUnit");const Ys=ai("sync",(e,t)=>e,"setupAdUnitMediaTypes");function Ws(e){vt(e)||(e=[e]);const t=new Set([null]);return e.filter(e=>e&&e.enabled).flatMap(e=>e.bidders).forEach(e=>t.add(e)),t}const Xs=ai("sync",function(e,t){let{getS2SBidders:n=Ws}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n(t);return kt(e).reduce((e,t)=>(e[i.has(t)?ks.SERVER:ks.CLIENT].push(t),e),{[ks.CLIENT]:[],[ks.SERVER]:[]})},"partitionBidders");function Js(e,t){const n=Ls[e],i=(null==n?void 0:n.getSpec)&&n.getSpec();if(i&&i[t]&&"function"==typeof i[t])return[i,i[t]]}function Ks(e,t,n,i){try{ot("Invoking ".concat(e,".").concat(t));for(var r=arguments.length,s=new Array(r>4?r-4:0),o=4;o5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6?arguments[6]:void 0;o=Ar(o),dr(M.BEFORE_REQUEST_BIDS,e),function(e){e.forEach(e=>{var t;const n=e.nativeParams||(null==e||null===(t=e.mediaTypes)||void 0===t?void 0:t.native);n&&(e.nativeParams=Ha(n)),e.nativeParams&&(e.nativeOrtbRequest=e.nativeParams.ortb||function(e){if(!e&&!bt(e))return void dt("Native assets object is empty or not an object: ",e);const t={ver:"1.2",assets:[]};for(let n in e){if(re.includes(n))continue;if(!H.hasOwnProperty(n)){dt("Unrecognized native asset code: ".concat(n,". Asset will be ignored."));continue}if("privacyLink"===n){t.privacy=1;continue}const i=e[n];let r=0;i.required&&_t(i.required)&&(r=Number(i.required));const s={id:t.assets.length,required:r};if(n in ee)s.data={type:te[ee[n]]},i.len&&(s.data.len=i.len);else if("icon"===n||"image"===n){if(s.img={type:"icon"===n?ne:ie},i.aspect_ratios)if(vt(i.aspect_ratios))if(i.aspect_ratios.length){const{min_width:e,min_height:t}=i.aspect_ratios[0];Kt(e)&&Kt(t)?(s.img.wmin=e,s.img.hmin=t):dt("image.aspect_ratios min_width or min_height are invalid: ",e,t);const n=i.aspect_ratios.filter(e=>e.ratio_width&&e.ratio_height).map(e=>"".concat(e.ratio_width,":").concat(e.ratio_height));n.length>0&&(s.img.ext={aspectratios:n})}else dt("image.aspect_ratios was passed, but it's empty:",i.aspect_ratios);else dt("image.aspect_ratios was passed, but it's not a an array:",i.aspect_ratios);i.sizes&&(2===i.sizes.length&&Kt(i.sizes[0])&&Kt(i.sizes[1])?(s.img.w=i.sizes[0],s.img.h=i.sizes[1],delete s.img.hmin,delete s.img.wmin):dt("image.sizes was passed, but its value is not an array of integers:",i.sizes))}else"title"===n?s.title={len:i.len||140}:"ext"===n&&(s.ext=i,delete s.required);t.assets.push(s)}return t}(e.nativeParams))})}(e),e.map(e=>e.code).filter(Bt).forEach(jr),e.forEach(e=>{bt(e.mediaTypes)||(e.mediaTypes={}),e.bids=e.bids.filter(e=>!e.bidder||Ms.isAllowed(zn,zs(ni,e.bidder))),YMPB.checkBidderTimeout&&(e.bids=e.bids.filter(t=>!YMPB.checkBidderTimeout(e.code,t))),Lr(e.code,"requestsCounter")}),e=Ys(e,r);let{[ks.CLIENT]:a,[ks.SERVER]:d}=Xs(e,Ns);me.getConfig("bidderSequence")===ue&&(a=Lt(a));const l=Yr();let c=[];const u=s.global||{},p=s.bidder||{};function h(e,t){const i=Ms.redact(null!=t?t:zs(ni,e.bidderCode)),r=on({source:{tid:n}},u,p[e.bidderCode]);!function(e){var t;const n=null===(t=e.user)||void 0===t?void 0:t.eids;Array.isArray(n)&&n.length&&(e.user.ext=e.user.ext||{},e.user.ext.eids=[...e.user.ext.eids||[],...n],delete e.user.eids)}(r);const s=Object.freeze(i.ortb2(r));return e.ortb2=s,e.bids=e.bids.map(e=>(e.ortb2=s,i.bidRequest(e))),e}Ns.forEach(i=>{const r=Vs(i);if(i&&i.enabled&&Ms.isAllowed(zn,r)){let{adUnits:s,hasModuleBids:a}=function(e,t){let n=jt(e),i=!1;return n.forEach(e=>{const n=e.bids.filter(e=>{var n;return e.module===Ps&&(null===(n=e.params)||void 0===n?void 0:n.configName)===qs(t)});1===n.length?(e.s2sBid=n[0],i=!0,e.ortb2Imp=on({},e.s2sBid.ortb2Imp,e.ortb2Imp)):n.length>1&&at('Multiple "module" bids for the same s2s configuration; all will be ignored',n),e.bids=Hs(e.bids,t).map(e=>(e.bid_id=Ye(),e))}),n=n.filter(e=>!(t.filterBidderlessCalls&&1===e.bids.length&&null==e.bids[0].bidder||0===e.bids.length&&null==e.s2sBid)),{adUnits:n,hasModuleBids:i}}(e,i),u=We();(0===d.length&&a?[null]:d).forEach(e=>{const a=Ye(),d=o.fork(),p=h({bidderCode:e,auctionId:n,bidderRequestId:a,uniquePbsTid:u,bids:Gs({bidderCode:e,auctionId:n,bidderRequestId:a,adUnits:jt(s),src:Y,metrics:d}),auctionStart:t,timeout:i.timeout,src:Y,refererInfo:l,metrics:d},r);0!==p.bids.length&&c.push(p)}),s.forEach(e=>{let t=e.bids.filter(e=>c.find(t=>t.bids.find(t=>t.bidId===e.bid_id)));e.bids=t}),c.forEach(e=>{void 0===e.adUnitsS2SCopy&&(e.adUnitsS2SCopy=s.filter(e=>e.bids.length>0||null!=e.s2sBid))})}});let f=function(e){let t=jt(e);return t.forEach(e=>{e.bids=Hs(e.bids,null)}),t=t.filter(e=>0!==e.bids.length),t}(e);return a.forEach(e=>{const s=Ye(),a=o.fork(),d=h({bidderCode:e,auctionId:n,bidderRequestId:s,bids:Gs({bidderCode:e,auctionId:n,bidderRequestId:s,adUnits:jt(f),labels:r,src:"client",metrics:a}),auctionStart:t,timeout:i,refererInfo:l,metrics:a}),u=Ls[e];u||dt("Trying to make a request for bidder that does not exist: ".concat(e)),u&&d.bids&&0!==d.bids.length&&c.push(d)}),c.forEach(e=>{cs.getConsentData()&&(e.gdprConsent=cs.getConsentData()),us.getConsentData()&&(e.uspConsent=us.getConsentData()),ps.getConsentData()&&(e.gppConsent=ps.getConsentData())}),c},"makeBidRequests"),$s.callBids=function(e,t,n,i,r,s,o){let a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};if(!t.length)return void at("callBids executed with no bidRequests. Were they filtered by labels or sizing?");let[d,l]=t.reduce((e,t)=>(e[Number(void 0!==t.src&&t.src===Y)].push(t),e),[[],[]]);var c=[];l.forEach(e=>{for(var t=-1,n=0;n{if(e&&c[u]&&Ws(e).has(c[u].bidderCode)){const t=yn(s,r?{request:r.request.bind(null,"s2s"),done:r.done}:void 0);let d=e.bidders;const p=Ls[e.adapter];let h=c[u].uniquePbsTid,f=c[u].adUnitsS2SCopy,g=l.filter(e=>e.uniquePbsTid===h);if(p){let r={ad_units:f,s2sConfig:e,ortb2Fragments:a,requestBidsTimeout:s};if(r.ad_units.length){let e=g.map(e=>(e.start=zt(),function(t){t||o(e.bidderRequestId),i.apply(e,arguments)}));const s=kt(r.ad_units).filter(e=>d.includes(e));st("CALLING S2S HEADER BIDDERS ==== ".concat(s.length>0?s.join(", "):'No bidder specified, using "ortb2Imp" definition(s) only')),g.forEach(e=>{dr(M.BID_REQUESTED,Us(Us({},e),{},{tid:e.auctionId}))}),p.callBids(r,l,n,t=>e.forEach(e=>e(t)),t)}}else dt("missing "+e.adapter);u++}}),d.forEach(e=>{e.start=zt();const t=Ls[e.bidderCode];me.runWithBidder(e.bidderCode,()=>{st("CALLING BIDDER"),dr(M.BID_REQUESTED,e)});let a=yn(s,r?{request:r.request.bind(null,e.bidderCode),done:r.done}:void 0);const d=i.bind(e);try{me.runWithBidder(e.bidderCode,t.callBids.bind(t,e,n,d,a,()=>o(e.bidderRequestId),me.callbackWithBidder(e.bidderCode)))}catch(t){dt("".concat(e.bidderCode," Bid Adapter emitted an uncaught error when parsing their bidRequest"),{e:t,bidRequest:e}),d()}})},$s.videoAdapters=[],$s.registerBidAdapter=function(e,t){let{supportedMediaTypes:n=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i;e&&t?"function"==typeof e.callBids?(Ls[t]=e,fs.register(ni,t,null===(i=e.getSpec)||void 0===i?void 0:i.call(e).gvlid),n.includes("video")&&$s.videoAdapters.push(t),n.includes("native")&&Fa.push(t)):dt("Bidder adaptor error for bidder code: "+t+"bidder must implement a callBids() function"):dt("bidAdapter or bidderCode not specified")},$s.aliasBidAdapter=function(e,t,n){if(void 0===Ls[t]){let i=Ls[e];if(void 0===i){const n=[];Ns.forEach(i=>{if(i.bidders&&i.bidders.length){const r=i&&i.bidders;i&&r.includes(t)?js[t]=e:n.push(e)}}),n.forEach(e=>{dt('bidderCode "'+e+'" is not an existing bidder.',"adapterManager.aliasBidAdapter")})}else try{let r,s=function(e){let t=[];return $s.videoAdapters.includes(e)&&t.push("video"),Fa.includes(e)&&t.push("native"),t}(e);if(i.constructor.prototype!=Object.prototype)r=new i.constructor,r.setBidderCode(t);else{const{useBaseGvlid:s=!1}=n||{};let o=i.getSpec();const a=s?o.gvlid:null==n?void 0:n.gvlid;null==a&&null!=o.gvlid&&at("Alias '".concat(t,"' will NOT re-use the GVL ID of the original adapter ('").concat(o.code,"', gvlid: ").concat(o.gvlid,"). Functionality that requires TCF consent may not work as expected."));let d=n&&n.skipPbsAliasing;r=Rr(Object.assign({},o,{code:t,gvlid:a,skipPbsAliasing:d})),js[t]=e}$s.registerBidAdapter(r,t,{supportedMediaTypes:s})}catch(t){dt(e+" bidder does not currently support aliasing.","adapterManager.aliasBidAdapter")}}else st('alias name "'+t+'" has been already specified.')},$s.resolveAlias=function(e){let t,n=e;for(;js[n]&&(!t||!t.has(n));)n=js[n],(t=t||new Set).add(n);return n},$s.registerAnalyticsAdapter=function(e){let{adapter:t,code:n,gvlid:i}=e;t&&n?"function"==typeof t.enableAnalytics?(t.code=n,Fs[n]={adapter:t,gvlid:i},fs.register(ri,n,i)):dt('Prebid Error: Analytics adaptor error for analytics "'.concat(n,'"\n analytics adapter must implement an enableAnalytics() function')):dt("Prebid Error: analyticsAdapter or analyticsCode not specified")},$s.enableAnalytics=function(e){vt(e)||(e=[e]),e.forEach(e=>{const t=Fs[e.provider];t&&t.adapter?Ms.isAllowed("reportAnalytics",zs(ri,e.provider,{[Ei]:e}))&&t.adapter.enableAnalytics(e):dt("Prebid Error: no analytics adapter found in registry for '".concat(e.provider,"'."))})},$s.getBidAdapter=function(e){return Ls[e]},$s.getAnalyticsAdapter=function(e){return Fs[e]},$s.callTimedOutBidders=function(e,t,n){t=Ht(t=t.map(t=>(t.params=Wt(e,t.adUnitCode,t.bidder),t.timeout=n,t)),"bidder"),Object.keys(t).forEach(e=>{Qs(e,"onTimeout",t[e])})},$s.callBidWonBidder=function(e,t,n){t.params=Wt(n,t.adUnitCode,t.bidder),function(e,t){Lr(e,"winsCounter",t)}(t.adUnitCode,t.bidder),Qs(e,"onBidWon",t)},$s.triggerBilling=(()=>{const e=new WeakSet;return t=>{var n;e.has(t)||(e.add(t),((null===(n=Ds(t.eventtrackers)[xs])||void 0===n?void 0:n[Ts])||[]).forEach(e=>Ve.triggerPixel(e)),Qs(t.bidder,"onBidBillable",t))}})(),$s.callSetTargetingBidder=function(e,t){Qs(e,"onSetTargeting",t)},$s.callBidViewableBidder=function(e,t){Qs(e,"onBidViewable",t)},$s.callBidderError=function(e,t,n){Qs(e,"onBidderError",{error:t,bidderRequest:n})},$s.checkBidAdapter=function(e){let t=me.getConfig("s2sConfig"),n=t&&t.bidders;return void 0!==Ls[e]||n&&includes(n,e)},$s.callAdRenderSucceededBidder=function(e,t){Qs(e,"onAdRenderSucceeded",t)},$s.callDataDeletionRequest=ai("sync",function(){for(var e=arguments.length,t=new Array(e),n=0;n!js.hasOwnProperty(e)).forEach(e=>{const n=Js(e,i);if(null!=n){const r=Vo.getBidsRequested().filter(t=>function(e){const t=new Set;for(;js.hasOwnProperty(e)&&!t.has(e);)t.add(e),e=js[e];return e}(t.bidderCode)===e);Ks(e,i,...n,r,...t)}}),Object.entries(Fs).forEach(e=>{var n;let[r,s]=e;const o=null==s||null===(n=s.adapter)||void 0===n?void 0:n[i];if("function"==typeof o)try{o.apply(s.adapter,t)}catch(e){dt("error calling ".concat(i," of ").concat(r),e)}})});const Zs=$s,eo=Ii(e=>Zs.resolveAlias(e)),to=new WeakMap,no=["debugging","outstream","aaxBlockmeter","adagio","adloox","akamaidap","arcspan","airgrid","browsi","brandmetrics","clean.io","humansecurity","confiant","contxtful","hadron","mediafilter","medianet","azerionedge","a1Media","geoedge","qortex","dynamicAdBoost","51Degrees","symitridap","wurfl","nodalsAi","anonymised","optable","justtag","tncId","ftrackId","id5"];function io(e,t,n,i,r,s){if(!Ti("loadExternalScript",eo(t,n)))return;if(!n||!e)return void dt("cannot load external script without url and moduleCode");if(!no.includes(n))return void dt("".concat(n," not whitelisted for loading external JavaScript"));r||(r=document);const o=l(r,e);if(o)return i&&"function"==typeof i&&(o.loaded?i():o.callbacks.push(i)),o.tag;const a=to.get(r)||{},d={loaded:!1,tag:null,callbacks:[]};return a[e]=d,to.set(r,a),i&&"function"==typeof i&&d.callbacks.push(i),at("module ".concat(n," is loading external JavaScript")),function(t,n,i,r){i||(i=document);var s=i.createElement("script");s.type="text/javascript",s.async=!0;const o=l(i,e);o&&(o.tag=s);s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||(s.onreadystatechange=null,n())}:s.onload=function(){n()};s.src=t,r&&function(e,t){Object.entries(t).forEach(t=>{let[n,i]=t;return e.setAttribute(n,i)})}(s,r);return St(s,i),s}(e,function(){d.loaded=!0;try{for(let e=0;e{"function"==typeof e?this.loaded?e.call():this.cmd.push(e):dt("Commands given to Renderer.push must be wrapped in a function")},this.callback=r||(()=>{this.loaded=!0,this.process()}),this.render=function(){const e=arguments,n=()=>{this._render?this._render.apply(this,e):at("No render function was provided, please use .setRender on the renderer")};!function(e){var t;const n=ro.adUnits,i=n.find(t=>t.code===e);if(!i)return!1;const r=null==i?void 0:i.renderer,s=!!(r&&r.url&&r.render),o=null==i||null===(t=i.mediaTypes)||void 0===t||null===(t=t.video)||void 0===t?void 0:t.renderer,a=!!(o&&o.url&&o.render);return!!(s&&!0!==r.backupOnly||a&&!0!==o.backupOnly)}(o)?a?n():(this.cmd.unshift(n),io(t,ti,"outstream",this.callback,this.documentContext)):(at("External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ".concat(o)),n())}.bind(this)}so.install=function(e){let{url:t,config:n,id:i,callback:r,loaded:s,adUnitCode:o,renderNow:a}=e;return new so({url:t,config:n,id:i,callback:r,loaded:s,adUnitCode:o,renderNow:a})},so.prototype.getConfig=function(){return this.config},so.prototype.setRender=function(e){this._render=e},so.prototype.setEventHandlers=function(e){this.handlers=e},so.prototype.handleVideoEvent=function(e){let{id:t,eventName:n}=e;"function"==typeof this.handlers[n]&&this.handlers[n](),st("Prebid Renderer event for id ".concat(t," type ").concat(n))},so.prototype.process=function(){for(;this.cmd.length>0;)try{this.cmd.shift().call()}catch(e){dt("Error processing Renderer command on ad unit '".concat(this.adUnitCode,"':"),e)}};const oo="native",ao="video",lo="banner",co="adpod",uo=[oo,ao,lo];function po(e,t,n){var i;let{index:r=Vo.index,bs:s=ei}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n=n||r.getBidRequest(t);const o=null==t?void 0:t.adapterCode,a=(null==t?void 0:t.bidderCode)||(null===(i=n)||void 0===i?void 0:i.bidder),d=s.get(null==t?void 0:t.adapterCode,"adjustAlternateBids"),l=s.getOwn(a,"bidCpmAdjustment")||s.get(d?o:a,"bidCpmAdjustment");if(l&&"function"==typeof l)try{return l(e,Object.assign({},t),n)}catch(e){dt("Error during bid adjustment",e)}return e}const ho="minBidCacheTTL";let fo=1,go=null;const mo=[];function vo(){return go}function yo(e){mo.push(e)}me.getConfig("ttlBuffer",e=>{"number"==typeof e.ttlBuffer?fo=e.ttlBuffer:dt("Invalid value for ttlBuffer",e.ttlBuffer)}),me.getConfig(ho,e=>{const t=go;go=null==e?void 0:e[ho],go="number"==typeof go?go:null,t!==go&&mo.forEach(e=>e(go))});const{syncUsers:bo}=Li,_o="completed";rr(M.BID_ADJUSTMENT,function(e){!function(e){let t=po(e.cpm,e);t>=0&&(e.cpm=t)}(e)});const Ao={},wo={},Eo=[],Io=b();const So=ai("sync",e=>{});function Co(e){let{adUnits:t,adUnitCodes:n,callback:i,cbTimeout:r,labels:s,auctionId:o,ortb2Fragments:a,metrics:d}=e;d=Ar(d);const l=t,c=s,u=n,p=o||We(),h=r,f=new Set,g=Ue(),m=Ue();let v,y,b,_,A=[],w=i,E=[],R=Wi({startTime:e=>e.responseTimestamp,ttl:e=>null==vo()?null:1e3*Math.max(vo(),e.ttl)}),D=[],B=[],U=[];function P(){return{auctionId:p,timestamp:v,auctionEnd:y,auctionStatus:_,adUnits:l,adUnitCodes:u,labels:c,bidderRequests:E,noBids:D,bidsReceived:R.toArray(),bidsRejected:A,winningBids:B,timeout:h,metrics:d,seatNonBids:U}}function k(e){if(e?dr(M.AUCTION_TIMEOUT,P()):clearTimeout(b),void 0===y){let n=[];e&&(st("Auction ".concat(p," timedOut")),n=E.filter(e=>!f.has(e.bidderRequestId)).flatMap(e=>e.bids),n.length&&dr(M.BID_TIMEOUT,n)),_=_o,y=Date.now(),d.checkpoint("auctionEnd"),d.timeBetween("requestBids","auctionEnd","requestBids.total"),d.timeBetween("callBids","auctionEnd","requestBids.callBids"),g.resolve(),dr(M.AUCTION_END,P()),Ro(l,function(){try{if(null!=w){const t=R.toArray().filter(e=>u.includes(e.adUnitCode)).reduce(zo,{});w.apply(Io,[t,e,p]),w=null}}catch(e){dt("Error executing bidsBackHandler",null,e)}finally{n.length&&Zs.callTimedOutBidders(t,n,h);let e=me.getConfig("userSync")||{};e.enableOverride||bo(e.syncDelay)}})}}function $(){me.resetBidder(),ot("Bids Received for Auction with id: ".concat(p),R.toArray()),_=_o,k(!1)}function L(e){f.add(e)}function j(e){e.forEach(e=>{var t;t=e,E=E.concat(t)});let t={},n={bidRequests:e,run:()=>{So(this),b=setTimeout(()=>k(!0),h),_="inProgress",dr(M.AUCTION_INIT,P());let n=function(e,t){let{index:n=Vo.index}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=0,r=!1,s=new Set,o={};function a(){i--,r&&0===i&&e()}function d(e,t,n){return o[t.requestId]=!0,function(e,t){let{index:n=Vo.index}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n.getBidderRequest(e),r=n.getAdUnit(e),s=i&&i.start||e.requestTimestamp;Object.assign(e,{responseTimestamp:e.responseTimestamp||zt(),requestTimestamp:e.requestTimestamp||s,cpm:parseFloat(e.cpm)||0,bidder:e.bidder||e.bidderCode,adUnitCode:t}),null!=(null==r?void 0:r.ttlBuffer)&&(e.ttlBuffer=r.ttlBuffer);e.timeToRespond=e.responseTimestamp-e.requestTimestamp}(t,e),i++,n(a)}function l(e,i){let r=null;if(t.getBidRequests().forEach(e=>{if(e.bidderCode===i.bidderCode)return r=find(e.bids,e=>e.bidId===i.requestId),!r}),r&&(r.ymAlias&&(i.ymAlias=r.ymAlias),r.parentBidderCode&&(i.parentBidderCode=r.parentBidderCode)),i&&Io.getMaxSizeByUnitCode&&i.mediaType===lo){let n=Io.getMaxSizeByUnitCode(e);if(n&&n.length>0&&(i.width>n[0]||i.height>n[1]))return void d(e,i,e=>{at("Bid from ".concat(i.bidder||"unknown bidder"," was rejected: bid size mismatched"),i),t.addBidRejected(i),e()})}d(e,i,e=>{let r=function(e){var t,n;let{index:i=Vo.index}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};dr(M.BID_ADJUSTMENT,e);const r=i.getAdUnit(e);e.instl=1===(null==r||null===(t=r.ortb2Imp)||void 0===t?void 0:t.instl);const s=(null===(n=i.getBidRequest(e))||void 0===n?void 0:n.renderer)||r.renderer,o=e.mediaType,a=i.getMediaTypes(e),d=a&&a[o];var l=d&&d.renderer,c=null;!l||!l.render||!0===l.backupOnly&&e.renderer?!s||!s.render||!0===s.backupOnly&&e.renderer||(c=s):c=l;c&&(e.renderer=so.install({url:c.url,config:c.options,renderNow:null==c.url}),e.renderer.setRender(c.render));const u=Uo(e.mediaType,a,me.getConfig("mediaTypePriceGranularity")),p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=parseFloat(e);return isNaN(i)&&(i=""),{low:""===i?"":x(e,I,n),med:""===i?"":x(e,S,n),high:""===i?"":x(e,C,n),auto:""===i?"":x(e,O,n),dense:""===i?"":x(e,T,n),custom:""===i?"":x(e,t,n)}}(e.cpm,"object"==typeof u?u:me.getConfig("customPriceBucket"),me.getConfig("currency.granularityMultiplier"));return e.pbLg=p.low,e.pbMg=p.med,e.pbHg=p.high,e.pbAg=p.auto,e.pbDg=p.dense,e.pbCg=p.custom,e}(i);dr(M.BID_ACCEPTED,r),r.mediaType===ao?function(e,t,n){var i;let{index:r=Vo.index}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=!0;const o=null===(i=r.getMediaTypes({requestId:t.originalRequestId||t.requestId,adUnitId:t.adUnitId}))||void 0===i?void 0:i.video,a=o&&(null==o?void 0:o.context),d=o&&(null==o?void 0:o.useCacheKey),{useLocal:l,url:c,ignoreBidderCacheKey:u}=me.getConfig("cache")||{};l?Rn(t):c&&(d||a!==ji)&&(!t.videoCacheKey||u?(s=!1,Bo(e,t,n,o)):t.vastUrl||(dt("videoCacheKey specified but not required vastUrl for video bid"),s=!1));s&&(Do(e,t),n())}(t,r,e):(function(e){return e.native&&"object"==typeof e.native}(r)&&function(e,t){var n;const i=null==t?void 0:t.nativeOrtbRequest,r=null===(n=e.native)||void 0===n?void 0:n.ortb;if(i&&r){const t=function(e,t){var n;const i={},r=(null==t?void 0:t.assets)||[];i.clickUrl=null===(n=e.link)||void 0===n?void 0:n.url,i.privacyLink=e.privacy;for(const t of(null==e?void 0:e.assets)||[]){const e=r.find(e=>t.id===e.id);if(t.title)i.title=t.title.text;else if(t.img){var s;i[(null==e||null===(s=e.img)||void 0===s?void 0:s.type)===ie?"image":"icon"]={url:t.img.url,width:t.img.w,height:t.img.h}}else if(t.data){var o;i[Va[Ga[null==e||null===(o=e.data)||void 0===o?void 0:o.type]]]=t.data.value}}i.impressionTrackers=[];let a=[];e.imptrackers&&i.impressionTrackers.push(...e.imptrackers);for(const t of(null==e?void 0:e.eventtrackers)||[])t.event===xs&&t.method===Ts&&i.impressionTrackers.push(t.url),t.event===xs&&t.method===Os&&a.push(t.url);a=a.map(e=>'