summaryrefslogtreecommitdiff
path: root/miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/publishertag.standalone.js
blob: 5b912a0e1612852d26999f35864ba49caa768f3c (plain)
1
2
// Hash: NGifC5iZyGE7Vn84z+hdgLs4vLdR5WpKuYfkBrlOVbty2p5ESk3E1gdVCHwGlsi+3GwOZo00k5JZDV21ZGtxZlkJ6hrlTK9dMlLxsfySIDcGYl8eKTfwd+f5Vet2hXwfhKd/k1LZlOv0LvrHxNOMsH5d1dB0TSfALABCyMn627g=
!function(e){"use strict";var d,t;t=d=d||{},t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Debug=2]="Debug";var r=["color: #fff;","background: #ff8f1c;","display: inline-block;","padding: 1px 4px;","border-radius: 3px;"].join(" "),f=(a.Log=function(e,t){if(!(a.LOGLEVEL<e)){var n=d[e].toUpperCase(),i=window.navigator.userAgent,o=0<i.indexOf("MSIE ")||0<i.indexOf("Trident/");window.console&&(o?console.log("[PubTag] "+n+": "+t):console.log("%cPubTag",r,n+": "+t))}},a.Debug=function(e){a.Log(d.Debug,e)},a.Warning=function(e){a.Log(d.Warning,e)},a.Error=function(e){a.Log(d.Error,e)},a.LOGLEVEL=d.Error,a);function a(){}function u(e){f.LOGLEVEL=e}function s(e){function t(){try{return n.apply(this,arguments)}catch(e){f.Error("Exception caught: "+e.toString())}}var n=e;for(var i in t.prototype=n.prototype,n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t}function o(e){for(var t in e)if(t in e){var n=e[t];"function"==typeof n?e[t]=s(n):"object"==typeof n&&(e[t]=o(n))}return e}function c(e){var t={push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(void 0!==e)for(var n=0,i=e;n<i.length;n++){var o=i[n];"function"==typeof o&&s(o)()}}};return e&&Array.isArray(e)&&t.push.apply(t,e),t}function l(e,t,n){return typeof e[t]===n?e[t]:void 0}var h=(n.prototype.isAdBlocked=function(e){var t=this;this.createPixel(n.allowedPixelUrl,function(){(t.allowedPixelLoaded=!0)===t.blockedPixelFailed&&e(!0)},function(){}),this.createPixel(n.blockedPixelUrl,function(){e(!1)},function(){(t.blockedPixelFailed=!0)===t.allowedPixelLoaded&&e(!0)})},n.prototype.createPixel=function(e,t,n){var i=document.createElement("img");i.src=e,i.height=1,i.width=1,i.style.display="none",i.onload=t,i.onerror=n},n.allowedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=1",n.blockedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=2",n);function n(){this.allowedPixelLoaded=!1,this.blockedPixelFailed=!1}var v=(i.create=function(e){return new i(e)},i.prototype.adBlockFlagEnabled=function(){var e=i.ADBLOCK_FLAG_KEY;return null!==this.localStorageHelper.getItem(e)},i.prototype.enableAdBlockFlag=function(){var e=i.ADBLOCK_FLAG_KEY;this.localStorageHelper.setItem(e,"1",i.ADBLOCK_FLAG_LIFETIME)},i.prototype.disableAdBlockFlag=function(){var e=i.ADBLOCK_FLAG_KEY;this.localStorageHelper.removeItem(e)},i.prototype.setAdBlockFlagTimer=function(e){var t=this;this.adBlockFlagEnabled()||!this.timerEnabled||this.timerStarted||(this.timerStarted=!0,setTimeout(function(){t.timerEnabled&&(t.refreshAdblockFlag(),t.timerEnabled=!1)},e))},i.prototype.disableAdBlockFlagTimer=function(){this.timerEnabled=!1,this.adBlockFlagEnabled()&&this.refreshAdblockFlag()},i.prototype.refreshAdblockFlag=function(){var t=this;(new h).isAdBlocked(function(e){e?t.enableAdBlockFlag():t.disableAdBlockFlag()})},i.ADBLOCK_FLAG_KEY="criteo_adblock_flag",i.ADBLOCK_FLAG_LIFETIME=864e5,i);function i(e){this.timerEnabled=!0,this.timerStarted=!1,this.localStorageHelper=e}var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function g(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var m=function(){return(m=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function w(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;0<=s;s--)(o=e[s])&&(a=(r<3?o(a):3<r?o(t,n,a):o(t,n))||a);return 3<r&&a&&Object.defineProperty(t,n,a),a}function b(n,i){return function(e,t){i(e,t,n)}}function C(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function I(e,a,s,c){return new(s=s||Promise)(function(n,t){function i(e){try{r(c.next(e))}catch(e){t(e)}}function o(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,o)}r((c=c.apply(e,a||[])).next())})}function _(n,i){var o,r,a,e,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=i.call(n,s)}catch(e){t=[6,e],r=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function E(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function S(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function T(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(P(arguments[t]));return e}function A(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function R(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),a=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(i){r[i]&&(o[i]=function(n){return new Promise(function(e,t){1<a.push([i,n,e,t])||s(i,n)})})}function s(e,t){try{(n=r[e](t)).value instanceof x?Promise.resolve(n.value.v).then(c,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function c(e){s("next",e)}function d(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function k(i){var e,o;return e={},t("next"),t("throw",function(e){throw e}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(t,n){e[t]=i[t]?function(e){return(o=!o)?{value:x(i[t](e)),done:"return"===t}:n?n(e):e}:n}}function D(c){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=c[Symbol.asyncIterator];return t?t.call(c):(c="function"==typeof S?S(c):c[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=c[s]&&function(a){return new Promise(function(e,t){var n,i,o,r;a=c[s](a),n=e,i=t,o=a.done,r=a.value,Promise.resolve(r).then(function(e){n({value:e,done:o})},i)})}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function U(e){return e&&e.__esModule?e:{default:e}}function L(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var B=(W.prototype.send=function(e,t,n,i){var o=void 0!==this.data?"POST":"GET",r=this.getXMLHttpRequest(o,e,t,n,i);if(void 0!==r)r.send(this.data);else{var a=this.getXDomainRequest(o,e,t,n,i);void 0!==a&&a.send(this.data)}},W.prototype.getXMLHttpRequest=function(e,t,n,i,o){var r=new XMLHttpRequest;if("withCredentials"in r)return r.open(e,this.url,!0),r.timeout=o||W.LOCAL_PASSBACK_TIMEOUT,this.contentType?r.setRequestHeader("Content-type",this.contentType):"POST"===e&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.withCredentials=this.withCredentials,r.onload=function(){4===r.readyState&&200===r.status?t(r.responseText):n(r.readyState,r.status)},r.onerror=function(){n(void 0,void 0)},i&&(r.ontimeout=i),r},W.prototype.getXDomainRequest=function(e,t,n,i,o){if("undefined"!=typeof XDomainRequest){var r=new XDomainRequest;return r.timeout=o||W.LOCAL_PASSBACK_TIMEOUT,r.open(e,this.url),r.onload=function(){void 0!==r.responseText?t(r.responseText):n(void 0,void 0)},r.onerror&&(r.onerror=function(){n(void 0,void 0)}),r.ontimeout&&i&&(r.ontimeout=i),r}},W.LOCAL_PASSBACK_TIMEOUT=3e4,W);function W(e,t,n,i){void 0===i&&(i=!0),this.url=e,this.data=t,this.contentType=n,this.withCredentials=i}var N=function(){},H=function(o){function e(e,t){var n=o.call(this)||this;n.containerId=t;var i=e.getElementById(t);return i?n.element=i:f.Error("Target element '"+t+"' not found in the document"),n}return g(e,o),e.prototype.ResizeFrame=function(e,t){},e.prototype.Write=function(e){this.element&&(this.element.innerHTML=e)},e.prototype.LoadScript=function(e){e+=-1===e.indexOf("?")?"?":"&",e+="containerid="+encodeURIComponent(this.containerId);var t=new B(e);t.send(function(e){eval(e)},function(){},function(){})},e}(N);function z(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var G=(q=N,g(V,q),V.prototype.ResizeFrame=function(e,t){if(this.document.defaultView&&this.document.defaultView.frameElement){var n=this.document.defaultView.frameElement;n.width=e.toString(),n.height=t.toString()}},V.prototype.Write=function(e){this.document.open(),this.document.write(e),this.document.close()},V.prototype.LoadScript=function(e){this.Write("<script type='text/javascript' src='"+z(e)+"'><\/script>")},V),q;function V(e){var t=q.call(this)||this;return t.document=e,t}var j=(K.prototype.eval=function(e){},K);function K(e){this.name=e}function X(e){try{return JSON.parse(e)}catch(e){return}}function J(e){var t="number"==typeof window.PREBID_TIMEOUT?window.PREBID_TIMEOUT:void 0;return e&&t?Math.min(e,t):e||t||void 0}var Y=(Q.prototype.getMetricsManager=function(){return this.metricsManager},Q.prototype.withElapsed=function(e){return this.elapsed=Math.round(e),this},Q.prototype.withIsTimeout=function(e){return(this.isTimeout=e)&&this.events.push({eventId:"CdbCallTimeout"}),this},Q.prototype.withAdapterStartElapsed=function(e){return this.adapterStartElapsed=Math.round(e),this.events.push({eventId:"AdapterBidStart",elapsed:this.adapterStartElapsed}),this},Q.prototype.withCdbCallStartElapsed=function(e){return this.cdbCallStartElapsed=Math.round(e),this.events.push({eventId:"CdbCallStart",elapsed:this.cdbCallStartElapsed}),this},Q.prototype.withCdbCallEndElapsed=function(e){return this.cdbCallEndElapsed=Math.round(e),this.events.push({eventId:"CdbCallEnd",elapsed:this.cdbCallEndElapsed}),this},Q.prototype.withAdapterEndElapsed=function(e){return this.adapterEndElapsed=Math.round(e),this.events.push({eventId:"AdapterBidEnd",elapsed:this.adapterEndElapsed}),this},Q.prototype.withAdapterTimeout=function(e){return this.adapterTimeout=e&&Math.round(e),this},Q.prototype.withTimeToFirstByte=function(e){return this.timeToFirstByte=e&&Math.round(e),this.timeToFirstByte&&this.events.push({eventId:"TimeToFirstByte",elapsed:this.timeToFirstByte}),this},Q.prototype.withConnectionEstablishmentTime=function(e){return this.connectionEstablishmentTime=e&&Math.round(e),this.connectionEstablishmentTime&&this.events.push({eventId:"TcpConnectionElapsedTime",elapsed:this.connectionEstablishmentTime}),this},Q.prototype.withDomainLookupTime=function(e){return this.domainLookupTime=e&&Math.round(e),this.domainLookupTime&&this.events.push({eventId:"DomainLookupElapsedTime",elapsed:this.domainLookupTime}),this},Q.prototype.buildEvents=function(e){if(this.events.length){var t={requestId:e,events:this.events};return void 0!==this.adapterTimeout&&this.adapterEndElapsed>this.adapterTimeout&&t.events.push({eventId:"AdapterTimeout"}),t}},Q.prototype.clear=function(){this.events=[]},Q);function Q(e){this.elapsed=0,this.isTimeout=!1,this.adapterStartElapsed=0,this.cdbCallStartElapsed=0,this.cdbCallEndElapsed=0,this.adapterEndElapsed=0,this.slotIdsMatchedByCache=[],this.events=[],this.metricsManager=e}var $=(te.generateCacheBuster=function(){return Math.floor(99999999999*Math.random())},te),Z,ee;function te(){}function ne(e){switch(e.toLowerCase()){case"amp":return Z.AMP;default:return Z.Unspecified}}ee=Z=Z||{},ee[ee.Unspecified=0]="Unspecified",ee[ee.AMP=1]="AMP";var ie=147,oe=184,re=275,ae=334,se=(ce.prototype.buildUrl=function(e,t,n,i,o){void 0===n&&(n=Z.Unspecified);var r=ce.CRITEO_BIDDER_URL+this.getHandlerPath(e,t);return r+="?ptv="+ie,!0===t.isAdBlocked&&(r+="&abp=1"),r=this.appendCommonParameters(r,e,i,o),r+=t.isOptOut?"&optout=1":"",r+=t.bundle?"&bundle="+t.bundle:"",n!==Z.Unspecified&&(r+="&im="+n),r+="&cb="+String($.generateCacheBuster()),r+=t.getContextFlags()},ce.prototype.buildErrorUrl=function(){return ce.CRITEO_BIDDER_URL+ce.CRITEO_ERROR_HANDLER},ce.prototype.buildCsmEventsUrl=function(){return ce.CRITEO_BIDDER_URL+ce.CRITEO_CSM_EVENTS_HANDLER},ce.prototype.buildCsmCountersUrl=function(){return ce.CRITEO_BIDDER_URL+ce.CRITEO_CSM_COUNTERS_HANDLER},ce.prototype.appendCommonParameters=function(e,t,n,i){return e+="&profileId="+String(t),void 0!==n&&(e+="&av="+String(n)),void 0!==i&&(e+="&wv="+encodeURIComponent(i)),e},ce.prototype.getHandlerPath=function(e,t){var n,i;if(this.auditMode)return ce.CRITEO_BIDDER_AUDIT_HANDLER;if(e==ae&&void 0!==t.slotsExt)for(var o in t.slotsExt){var r=t.slotsExt[o];if(void 0!==(null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.gtin))return ce.CRITEO_COMMERCE_EXPERIENCE_3_HANDLER;if(void 0!==(null===(i=null==r?void 0:r.data)||void 0===i?void 0:i.keyword))return ce.CRITEO_COMMERCE_EXPERIENCE_4_HANDLER}return ce.CRITEO_BIDDER_HANDLER},ce.CRITEO_BIDDER_URL="https://bidder.criteo.com/",ce.CRITEO_BIDDER_HANDLER="cdb",ce.CRITEO_COMMERCE_EXPERIENCE_3_HANDLER="experiences/2023-10/dynamic-buttons",ce.CRITEO_COMMERCE_EXPERIENCE_4_HANDLER="experiences/2023-10/product-recommendation",ce.CRITEO_CSM_EVENTS_HANDLER="csm/events",ce.CRITEO_CSM_COUNTERS_HANDLER="csm/counters",ce.CRITEO_ERROR_HANDLER="error",ce.CRITEO_BIDDER_AUDIT_HANDLER="prebid/audit",ce);function ce(e){void 0===e&&(e=!1),this.auditMode=e}var de=(ue.prototype.sendEventsToBeacon=function(e,t){navigator.sendBeacon&&e&&navigator.sendBeacon(t,JSON.stringify(e))},ue);function ue(){this.urlBuilder=new se}var le=(pe=de,g(he,pe),he.prototype.getLocalStorageKeyCount=function(){return this.localStorageHelper.getAllItemsByPrefix("criteo_").length+this.localStorageHelper.getAllItemsByPrefix("cto_").length},he.prototype.sendEvents=function(e,t){this.sendEventsToBeacon(e.buildEvents(t),this.urlBuilder.buildCsmEventsUrl()),e.clear()},he),pe;function he(e){var t=pe.call(this)||this;return t.localStorageHelper=e,t}var ve=(fe.prototype.isValid=function(){return 0<this.slots.length},fe.prototype.getRequest=function(){for(var e,t=[],n=0,i=this.slots;n<i.length;n++){var o=i[n],r={slotid:o.slotId,impid:o.impId};if(void 0!==o.zoneId&&(r.zoneid=o.zoneId),void 0===o.nativeCallback&&!o.native||(r.native=!0),void 0!==o.transactionId&&(r.transactionid=o.transactionId),void 0!==o.publisherSubId&&(r.publishersubid=o.publisherSubId),void 0!==o.sizes){for(var a=[],s=0,c=o.sizes;s<c.length;s++){var d=c[s];a.push(d.width+"x"+d.height)}r.sizes=a}if(void 0!==o.video){var u={context:o.video.context,playersizes:this.parsePlayerSizes(o.video.playersize),mimes:o.video.mimes,protocols:o.video.protocols,maxduration:o.video.maxduration,api:o.video.api,skip:o.video.skip,placement:o.video.placement,playbackmethod:o.video.playbackmethod,minduration:o.video.minduration,startdelay:o.video.startdelay,plcmt:o.video.plcmt,w:o.video.w,h:o.video.h,linearity:o.video.linearity,skipmin:o.video.skipmin,skipafter:o.video.skipafter,minbitrate:o.video.minbitrate,maxbitrate:o.video.maxbitrate,delivery:o.video.delivery,pos:o.video.pos,playbackend:o.video.playbackend,adPodDurationSec:o.video.adPodDurationSec,durationRangeSec:o.video.durationRangeSec};r.video=u}if(void 0!==this.viewportComputer){var l=this.viewportComputer.getSlotPosition(o);void 0!==l&&(r.position={top:l.top,left:l.left})}void 0!==o.ext&&(r.ext=o.ext),void 0!==o.rwdd&&(r.rwdd=o.rwdd),!this.fledgeEnabled&&(null===(e=r.ext)||void 0===e?void 0:e.ae)&&delete r.ext.ae,t.push(r)}var p=m(m({},this.context.getUser()),{ceh:this.context.ceh,uspOptout:this.context.ccpaOptout}),h=this.context.getSite(),v=this.context.getApp();void 0!==this.publisherId&&(void 0!==h?(h.publisher=h.publisher||{},h.publisher.id=this.publisherId):void 0!==v?(v.publisher=v.publisher||{},v.publisher.id=this.publisherId):h={publisher:{id:this.publisherId}}),this.context.getUserExtWithContextualData(),this.context.getPublisherExt();var f={publisher:{url:this.context.highestAccessibleUrl},slots:t,user:p,site:h,bcat:this.bcat,badv:this.badv,bapp:this.bapp,app:v};if(void 0!==this.networkId&&(f.publisher.networkid=this.networkId),void 0!==this.accountId&&(f.publisher.id=this.accountId),this.privacyWrapper&&(this.privacyWrapper.gdprConsent&&(f.gdprConsent=this.privacyWrapper.gdprConsent),this.privacyWrapper.ccpaIabConsent&&(p.uspIab=this.privacyWrapper.ccpaIabConsent.uspString),this.privacyWrapper.gppConsent&&(void 0===this.regs&&(this.regs={}),this.regs.gpp=this.privacyWrapper.gppConsent.gpp,this.regs.gpp_sid=this.privacyWrapper.gppConsent.gppSid)),void 0!==this.viewportComputer){var g=this.viewportComputer.getViewport();f.viewport={width:g.width,height:g.height,scrollTop:g.scrollTop,scrollLeft:g.scrollLeft}}return void 0!==this.adapterTimeout&&(f.tmax=this.adapterTimeout),void 0!==this.auctionStart&&(f.auctionStart=this.auctionStart),void 0!==this.clientRequestId&&(f.id=this.clientRequestId),void 0!==this.userIds&&(f.eids=this.userIds),void 0!==this.source&&(f.source=this.source),void 0===this.regs||void 0===this.regs.coppa&&void 0===this.regs.gpp&&void 0===this.regs.gpp_sid||(f.regs={coppa:this.regs.coppa,gpp:this.regs.gpp,gpp_sid:this.regs.gpp_sid}),f},fe.parsePlayerSize=function(e){return e[0]+"x"+e[1]},fe.prototype.parsePlayerSizes=function(e){return e?Array.isArray(e[0])?e.map(function(e){return fe.parsePlayerSize(e)}):[fe.parsePlayerSize(e)]:e},fe.prototype.getUrl=function(){return this.urlBuilder.buildUrl(this.profileId,this.context,this.integrationMode,this.adapterVersion,this.wrapperVersion)},fe);function fe(e,t,n,i,o,r,a,s,c,d,u,l,p,h,v,f,g,m,y,w,b,C){this.slots=e,this.context=t,this.urlBuilder=n,this.profileId=i,this.integrationMode=o||Z.Unspecified,this.networkId=r,this.adapterVersion=a,this.privacyWrapper=s,this.wrapperVersion=c,this.viewportComputer=d,this.adapterTimeout=u,this.clientRequestId=l,this.userIds=p,this.auctionStart=h,this.source=v,this.regs=f,this.bcat=g,this.badv=m,this.bapp=y,this.fledgeEnabled=w||!1,this.publisherId=b,this.accountId=C}function ge(e){var t={slots:void 0,time_to_next_call:0};return void 0!==e.exd&&(void 0!==e.exd.time_to_next_call&&(t.time_to_next_call=e.exd.time_to_next_call),t.slots=e.exd.slots,delete e.exd),t}var me=(ye.CreateRunning=function(){var e=new ye;return e.start(),e},ye.CreateWithStartTime=function(e){var t=new ye(!1);return t.startTime=e,t},ye.TimeSincePageLoad=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.timing&&window.performance.timing.navigationStart)return(new Date).getTime()-performance.timing.navigationStart}return 0},ye.prototype.start=function(){this.startTime=this.now()},ye.prototype.elapsed=function(){return this.now()-this.startTime},ye);function ye(e){void 0===e&&(e=!0),e&&window.performance&&window.performance.now?this.now=window.performance.now.bind(window.performance):Date.now?this.now=Date.now:this.now=function(){return(new Date).getTime()}}function we(e){if(window.performance&&window.performance.getEntries)for(var t=window.performance.getEntries(),n=t.length-1;0<=n;--n){var i=t[n];if(i.name===e&&i.duration)return Math.round(i.duration)}}var be=(Ce.prototype.sendRequest=function(e){this.url=e,this.sendTime=me.CreateRunning(),this.builder.withCdbCallStartElapsed(this.timer.elapsed())},Ce.prototype.requestReceived=function(e){void 0===e&&(e=!1),this.builder.withElapsed(we(this.url)||this.sendTime.elapsed()),this.builder.withCdbCallEndElapsed(this.timer.elapsed()),this.builder.withIsTimeout(e)},Ce.prototype.finish=function(){this.builder.withAdapterEndElapsed(this.timer.elapsed());var e=Ce.getLastCdbTiming();void 0!==e&&(this.builder.withTimeToFirstByte(Ce.computeTimeToFirstByte(e)),this.builder.withConnectionEstablishmentTime(Ce.computeConnectionEstablishmentTime(e)),this.builder.withDomainLookupTime(Ce.computeDomainLookupTime(e)))},Ce.getLastCdbTiming=function(){if(void 0!==window.performance&&void 0!==window.performance.getEntriesByType&&"function"==typeof window.performance.getEntriesByType){var e=window.performance.getEntriesByType("resource");if(void 0!==e){var t=e.filter(function(e){return 0<=e.name.indexOf("cdb")});return void 0!==t&&0<t.length?t[t.length-1]:void 0}}},Ce.computeTimeToFirstByte=function(e){var t=e.responseStart,n=e.requestStart;if(void 0!==t&&void 0!==n)return t-n},Ce.computeConnectionEstablishmentTime=function(e){var t=e.connectEnd-e.connectStart;return isNaN(t)?void 0:t},Ce.computeDomainLookupTime=function(e){var t=e.domainLookupEnd-e.domainLookupStart;return isNaN(t)?void 0:t},Ce);function Ce(e,t,n){this.builder=e,this.timer=void 0!==t?me.CreateWithStartTime(t):me.CreateRunning();var i=this.timer.elapsed();this.builder.withAdapterStartElapsed(i),void 0!==n&&this.builder.withAdapterTimeout(n)}function Ie(e){try{return JSON.parse(e)}catch(e){return}}var _e=1,Ee=(Se.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,n=0;n<10;++n){try{t.frames.__uspapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},Se.prototype.hasCallerFunctionInWindow=function(){return"function"==typeof this.currentWindow.__uspapi},Se.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInWindow()||void 0!==this.getCMPFrame()},Se.prototype.retrieveConsent=function(n){var i=this,o=!1,r=window.setTimeout(function(){o=!0,i.logger("Timeout: Unable to resolve CCPA consent after "+i.timeout+"ms"),n(void 0)},this.timeout);this.executeCommand("getUSPData",_e,function(e,t){o||(clearTimeout(r),t?(i.logger("CCPA consent retrieved"),i.processResponseData(e,n)):(i.logger("Error retrieving CCPA consent data from CMP"),n(void 0)))})},Se.prototype.processResponseData=function(e,t){e?t(e):(this.logger("Unable to read CCPA consent data from CMP"),t(void 0))},Se.prototype.executeCommand=function(e,t,n){var r=this;if(!this.hasCallerFunctionInWindow()){this.logger("No CCPA CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__uspapi=function(e,t,n){if(!a)return r.logger("CCPA CMP not found in any frame"),void n({msg:"CCPA CMP not found in any frame"},!1);var i=Math.random().toString(10),o={__uspapiCall:{command:e,parameter:t,callId:i}};r.uspapiCallbacks[i]=n,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?Ie(e.data):e.data;if(t&&t.__uspapiReturn&&t.__uspapiReturn.callId&&t.__uspapiReturn.returnValue){var n=t.__uspapiReturn;r.uspapiCallbacks&&r.uspapiCallbacks[n.callId]&&(r.uspapiCallbacks[n.callId](n.returnValue,n.success),delete r.uspapiCallbacks[n.callId])}},!1)}this.currentWindow.__uspapi(e,t,n)},Se.prototype.hasUserOptOut=function(e){return!(!e||!e.uspString||"1YNY"===e.uspString.toUpperCase()||"1YNN"===e.uspString.toUpperCase()||"1YN-"===e.uspString.toUpperCase()||"1-N-"===e.uspString.toUpperCase()||"1---"===e.uspString)},Se);function Se(e,t,n){void 0===n&&(n=function(e){}),this.uspapiCallbacks={},this.currentWindow=e,this.timeout=t.uspApiTimeout,this.logger=n}var Pe=(Te.prototype.getReadyToRetrieveProvider=function(){return this.tcfv2ConsentProvider.hasCallerFunctionInFrame()?this.tcfv2ConsentProvider:this.tcfv1ConsentProvider.hasCallerFunctionInFrame()?this.tcfv1ConsentProvider:void 0!==this.tcfv2ConsentProvider.getCMPFrame()?this.tcfv2ConsentProvider:void 0!==this.tcfv1ConsentProvider.getCMPFrame()?this.tcfv1ConsentProvider:void 0},Te.prototype.retrieveConsentForPassback=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),t===this.tcfv1ConsentProvider?this.tcfv1ConsentProvider.retrieveConsentForPassback(e):t===this.tcfv2ConsentProvider&&this.tcfv2ConsentProvider.retrieveConsent(e)},Te.prototype.retrieveConsent=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),null==t||t.retrieveConsent(e)},Te.prototype.readyToRetrieve=function(){return this.tcfv2ConsentProvider.readyToRetrieve()||this.tcfv1ConsentProvider.readyToRetrieve()},Te);function Te(e,t,n){void 0===n&&(n=function(e){}),this.tcfv1ConsentProvider=e,this.tcfv2ConsentProvider=t,this.logger=n}var Ae=91,xe=(Re.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,n=0;n<10;++n){try{t.frames.__cmpLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},Re.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__cmp},Re.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},Re.prototype.pingWithTimeout=function(i,e,t,n){function o(e,t){r.logger(t),clearTimeout(e),n()}var r=this;return window.setTimeout(function(){var n=window.setTimeout(function(){o(i,"Timeout: Unable to get ping return after "+e+"ms")},e);r.executeCommand("ping",null,function(e,t){clearTimeout(n),t?(r.logger("GDPR CMP ping returned"),!0!==e.cmpLoaded&&o(i,"GDPR ping returned cmpLoaded which is not true"),r.logger("GDPR ping returned cmpLoaded which is true")):o(i,"Error sending ping to GDPR CMP")})},t)},Re.prototype.retrieveConsent=function(e){this.executeRetrieveConsent("getConsentData",null,e)},Re.prototype.retrieveConsentForPassback=function(e){this.executeRetrieveConsent("getVendorConsents",[Ae],e)},Re.prototype.executeRetrieveConsent=function(e,t,n){var i=this,o=!1,r=window.setTimeout(function(){o=!0,i.logger("Timeout: Unable to resolve GDPR consent after "+i.timeout+"ms"),n(void 0)},this.timeout),a=!1!==this.cmpAutoDetect?this.pingWithTimeout(r,this.pingTimeout,this.pingDelay,function(){o=!0,i.logger("Timeout: Unable to ping GDPR API after "+i.pingTimeout+"ms"),n(void 0)}):void 0;this.executeCommand(e,t,function(e,t){clearTimeout(a),o||(clearTimeout(r),t?(i.logger("GDPR consent retrieved"),i.processConsentData(e,n)):(i.logger("Error retrieving GDPR consent data from CMP"),n(void 0)))})},Re.prototype.processConsentData=function(e,t){if(e){var n={};void 0!==e.consentData&&(n.consentData=e.consentData),void 0!==e.gdprApplies&&(n.gdprApplies=!!e.gdprApplies),t(n)}else this.logger("Unable to read GDPR consent data from CMP"),t(void 0)},Re.prototype.executeCommand=function(e,t,n){var r=this;if(!this.hasCallerFunctionInFrame()){this.logger("No GDPR CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__cmp=function(e,t,n){if(!a)return r.logger("GDPR CMP not found in any frame"),void n({msg:"GDPR CMP not found in any frame"},!1);var i=Math.random().toString(10),o={__cmpCall:{command:e,parameter:t,callId:i}};r.cmpCallbacks[i]=n,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?Ie(e.data):e.data;if(t&&t.__cmpReturn&&t.__cmpReturn.callId&&t.__cmpReturn.returnValue){var n=t.__cmpReturn;r.cmpCallbacks&&r.cmpCallbacks[n.callId]&&(r.cmpCallbacks[n.callId](n.returnValue,n.success),delete r.cmpCallbacks[n.callId])}},!1)}this.currentWindow.__cmp(e,t,n)},Re);function Re(e,t,n){void 0===n&&(n=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=n}var ke=2,De,Oe;Oe=De=De||{},Oe.LOADED="tcloaded",Oe.UI_SHOWN="cmpuishown",Oe.USER_ACTION_COMPLETE="useractioncomplete";var Me=(Ue.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,n=0;n<10;++n){try{t.frames.__tcfapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},Ue.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__tcfapi},Ue.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},Ue.prototype.pingWithTimeout=function(n,e,t,i){function o(e,t){r.logger(t),clearTimeout(e),i()}var r=this;return window.setTimeout(function(){var t=window.setTimeout(function(){o(n,"Timeout: Unable to get TCFv2 ping return after "+e+"ms")},e);r.executeCommand("ping",ke,function(e){clearTimeout(t),r.logger("TCFv2 CMP ping returned in ms"),"error"===e.cmpStatus?o(n,"Error status on ping to TCFv2 CMP"):!0!==e.cmpLoaded?o(n,"TCFv2 ping returned cmpLoaded = false"):r.logger("TCFv2 ping returned cmpLoaded = true")})},t)},Ue.prototype.retrieveConsent=function(n){var i,o,r=this,a=!1,s=window.setTimeout(function(){a=!0,o===De.UI_SHOWN?(r.logger("Timeout: User hasn't confirm their consent settings after "+r.timeout+"ms"),n(i)):(r.logger("Timeout: Unable to resolve TCFv2 consent after "+r.timeout+"ms"),n(void 0))},this.timeout),c=!1!==this.cmpAutoDetect?this.pingWithTimeout(s,this.pingTimeout,this.pingDelay,function(){a=!0,r.logger("Timeout: Unable to ping TCFv2 API after "+r.pingTimeout+"ms"),n(void 0)}):void 0;this.executeCommand("addEventListener",ke,function(e,t){clearTimeout(c),a||((o=e.eventStatus)!==De.UI_SHOWN&&clearTimeout(s),t?(r.logger("TCFv2 consent retrieved in ms"),e||(r.logger("Unable to read GDPR consent data from CMP"),n(void 0)),i=r.processResponseData(e),o!==De.LOADED&&o!==De.USER_ACTION_COMPLETE||n(i)):(r.logger("Error retrieving TCFv2 consent data from CMP"),n(void 0)))})},Ue.prototype.processResponseData=function(e){var t,n,i={};return void 0!==e.tcString&&(i.consentData=e.tcString),void 0!==e.gdprApplies&&(i.gdprApplies=!!e.gdprApplies),i.version=e.tcfPolicyVersion?e.tcfPolicyVersion:ke,i.purposes=null===(t=null==e?void 0:e.purpose)||void 0===t?void 0:t.consents,i.vendorConsents=null===(n=null==e?void 0:e.vendor)||void 0===n?void 0:n.consents,i},Ue.prototype.executeCommand=function(e,t,n,i){var a=this;if(!this.hasCallerFunctionInFrame()){this.logger("No TCFv2 CMP defined on current frame");var s=this.getCMPFrame();this.currentWindow.__tcfapi=function(e,t,n,i){if(!s)return a.logger("TCFv2 CMP not found in any frame"),void n({msg:"TCFv2 CMP not found in any frame"},!1);var o=Math.random().toString(10),r={__tcfapiCall:{command:e,version:t,parameter:i,callId:o}};a.cmpCallbacks[o]=n,s.postMessage(r,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?Ie(e.data):e.data;if(t&&t.__tcfapiReturn&&t.__tcfapiReturn.callId&&t.__tcfapiReturn.returnValue){var n=t.__tcfapiReturn;a.cmpCallbacks&&a.cmpCallbacks[n.callId]&&"function"==typeof a.cmpCallbacks[n.callId]&&(a.cmpCallbacks[n.callId](n.returnValue,n.success),n.returnValue.eventStatus!==De.UI_SHOWN&&delete a.cmpCallbacks[n.callId])}},!1)}this.currentWindow.__tcfapi(e,t,n,i)},Ue);function Ue(e,t,n){void 0===n&&(n=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=n}var Le="1.0",Fe="1.1",Be=(We.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,n=0;n<10;++n){try{void 0!==t&&t.frames.__gppLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},We.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__gpp},We.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},We.prototype.retrieveConsent=function(n){function i(e,t){o.logger(t),clearTimeout(e),r=!0,o.logger("Timeout: Unable to ping GPP after "+o.pingTimeout+"ms"),n(void 0)}var o=this,r=!1,a=window.setTimeout(function(){r=!0,o.logger("Timeout: Unable to resolve GPP consent after "+o.timeout+"ms"),n(void 0)},this.timeout);window.setTimeout(function(){var t=window.setTimeout(function(){i(a,"Timeout: Unable to get GPP ping return after "+o.pingTimeout+"ms")},o.pingTimeout);o.executeCommand("ping",function(e){clearTimeout(t),o.logger("GPP CMP ping has responsed"),e.gppVersion===Le?(o.logger("Detected GPP CMP 1.0"),"error"===e.cmpStatus?i(a,"Error status on ping to GPP CMP"):"loaded"===e.cmpStatus?(o.logger("GPP ping returned cmpStatus = loaded"),o.executeCommand("getGPPData",function(e,t){r||(clearTimeout(a),t?(o.logger("GPP consent retrieved"),o.processResponseData(e,n)):(o.logger("Error retrieving GPP consent data from CMP"),n(void 0)))})):i(a,"GPP ping returned cmpStatus != loaded")):e.gppVersion===Fe?(o.logger("Detected GPP CMP 1.1"),"ready"===e.signalStatus?(clearTimeout(a),o.logger("GPP consent retrieved"),o.processResponseData(e,n)):o.executeCommand("addEventListener",function(e,t){r||"signalStatus"===e.eventName&&"ready"===e.pingData.signalStatus&&(clearTimeout(a),o.logger("GPP consent retrieved"),o.processResponseData(e.pingData,n))})):i(a,"Unknown GPP version "+e.gppVersion)})},this.pingDelay)},We.prototype.processResponseData=function(e,t){if(e){var n={};void 0!==e.gppString&&(n.gpp=e.gppString),void 0!==e.applicableSections&&(n.gppSid=e.applicableSections),t(n)}else this.logger("Unable to read GPP consent data from CMP"),t(void 0)},We.prototype.executeCommand=function(e,t,n){var r=this;if(!this.hasCallerFunctionInFrame()){this.logger("No GPP CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__gpp=function(e,t,n){if(!a)return r.logger("GPP CMP not found in any frame"),void t({msg:"GPP CMP not found in any frame"},!1);var i=Math.random().toString(10),o={__gppCall:{command:e,parameter:n,callId:i}};r.cmpCallbacks[i]=t,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?Ie(e.data):e.data;if(t&&t.__gppReturn&&t.__gppReturn.callId&&t.__gppReturn.returnValue){var n=t.__gppReturn;r.cmpCallbacks&&r.cmpCallbacks[n.callId]&&"function"==typeof r.cmpCallbacks[n.callId]&&(r.cmpCallbacks[n.callId](n.returnValue,n.success),delete r.cmpCallbacks[n.callId])}},!1)}this.currentWindow.__gpp(e,t,n)},We);function We(e,t,n){void 0===n&&(n=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.gppTimeout,this.pingTimeout=t.gppPingTimeout,this.pingDelay=t.gppPingDelay,this.logger=n}function Ne(e){return{uspApiTimeout:parseInt("50",10),tcfTimeout:parseInt("10000",10),tcfPingTimeout:Math.min(parseInt("10000",10),parseInt("50",10)),tcfPingDelay:Math.min(parseInt("10000",10),parseInt("1000",10)),gppTimeout:parseInt("10000",10),gppPingTimeout:Math.min(parseInt("10000",10),parseInt("50",10)),gppPingDelay:Math.min(parseInt("10000",10),parseInt("1000",10)),cmpAutoDetect:null==e?void 0:e.cmpAutoDetect}}function He(e){try{return e.localStorage}catch(e){return}}var ze=(Ge.prototype.checkLocalStorage=function(e){if(!this.localStorage)return!1;var t=this.CHECK_STORAGE_KEY;try{return this.checkTcfPurposeOne(e)?(this.localStorage.setItem(t,t),this.localStorage.removeItem(t),!0):(f.Debug("Purpose One not granted"),!1)}catch(e){return!1}},Ge.prototype.checkTcfPurposeOne=function(e){return!(e&&e.gdprConsent&&e.gdprConsent.purposes)||!0===e.gdprConsent.purposes[1]},Ge.prototype.removeItem=function(e){this.localStorageEnabled&&(this.localStorage.removeItem(e),this.localStorage.removeItem(e+this.EXPIRE_SUFFIX))},Ge.prototype.getItem=function(e,t){if(!this.localStorageEnabled)return null;var n=(new Date).getTime(),i=this.localStorage.getItem(e+this.EXPIRE_SUFFIX),o=i?parseInt(i,10):-1;return-1!==o&&o<n||t&&(-1===o||t<o-n)?(this.removeItem(e),null):this.localStorage.getItem(e)},Ge.prototype.setItem=function(e,t,n){if(this.localStorageEnabled)try{if(this.localStorage.setItem(e,t),n){var i=(new Date).getTime()+n;this.localStorage.setItem(e+this.EXPIRE_SUFFIX,i.toString())}}catch(e){}},Ge.prototype.getAllItemsByPrefix=function(e){var t=[];if(this.localStorageEnabled)for(var n in localStorage)0===n.indexOf(e)&&t.push(n);return t},Ge);function Ge(e,t){this.EXPIRE_SUFFIX="_expires",this.CHECK_STORAGE_KEY="criteo_localstorage_check",this.localStorage=He(e||window),this.localStorageEnabled=this.checkLocalStorage(t)}var qe=(Ve.prototype.checkTcfPurposeOne=function(e){return!(e&&(null==e?void 0:e.gdprConsent)&&e.gdprConsent.purposes)||!0===e.gdprConsent.purposes[1]},Ve.prototype.setCookie=function(e,t,n,i,o){void 0===o&&(o=!1);var r=i||document,a=r.location.hostname,s=new Date;s.setTime(s.getTime()+60*n*60*1e3);var c="expires="+s.toUTCString();if(!o)return this.setCookieString(e,t,c,void 0,r),a;for(var d=a.split("."),u=1;u<d.length;++u){var l=d.slice(d.length-u-1,d.length).join(".");if(!(-1<this.publicTopTlds.indexOf(l)))try{this.setCookieString(e,t,c,l,r);var p=this.getCookie(e,i);if(p&&p===t)return l}catch(e){}}return a},Ve.prototype.deleteCookie=function(e,t,n){void 0===n&&(n=!1),this.setCookie(e,"",0,t,n)},Ve.prototype.getCookie=function(e,t){if(this.cookiesEnabled)for(var n=0,i=(t||document).cookie.split(";");n<i.length;n++){var o=i[n],r=o.substr(0,o.indexOf("=")).replace(/^\s+|\s+$/g,""),a=o.substr(o.indexOf("=")+1);if(r===e)return decodeURIComponent(a)}},Ve.prototype.setCookieString=function(e,t,n,i,o){if(this.cookiesEnabled){var r=e+"="+encodeURIComponent(t)+";"+n+";";i&&""!==i&&(r+="domain=."+i+";"),o.cookie=r+"path=/"}},Ve);function Ve(e){this.publicTopTlds=["co.id","co.il","co.jp","co.kr","co.nz","co.th","co.uk","com.au","com.br","com.mx","com.my","com.pl","com.sg","com.tr","com.vn"],this.cookiesEnabled=this.checkTcfPurposeOne(e)}var je=(Ke.prototype.initializeServices=function(){var n=this;this.initializing=!0,this.retrievePrivacyConsent(function(e){var t={localStorageHelper:new ze(n.topFrame,e),privacies:e,ccpaConsentProvider:n.ccpaConsentProvider,gppConsentProvider:n.gppConsentProvider,cookieHelper:new qe(e)};n.services=t,n.initialized=!0,n.initializing=!1,n.postInitiliazeServicesCallbacks.forEach(function(e){e(t)})})},Ke.prototype.getServicesAsync=function(e){this.initialized?e(this.services):(this.postInitiliazeServicesCallbacks.push(e),this.initializing||this.initializeServices())},Ke.prototype.retrievePrivacyConsent=function(t){var e=this.tcfCompatibleConsentProvider.readyToRetrieve(),n=this.ccpaConsentProvider.readyToRetrieve(),i=this.gppConsentProvider.readyToRetrieve();e||n||i||t(void 0);var o=[];e&&o.push(Pe),n&&o.push(Ee),i&&o.push(Be);var r={};e&&this.tcfCompatibleConsentProvider.retrieveConsent(function(e){r.gdprConsent=e,o.splice(o.indexOf(Pe),1),0===o.length&&t(r)}),n&&this.ccpaConsentProvider.retrieveConsent(function(e){r.ccpaIabConsent=e,o.splice(o.indexOf(Ee),1),0===o.length&&t(r)}),i&&this.gppConsentProvider.retrieveConsent(function(e){r.gppConsent=e,o.splice(o.indexOf(Be),1),0===o.length&&t(r)})},Ke);function Ke(e,t,n,i,o){this.initializing=!1,this.initialized=!1,this.postInitiliazeServicesCallbacks=[],this.topFrame=e||window;var r=Ne(o);this.ccpaConsentProvider=t||new Ee(window,r,f.Warning);var a=new xe(window,r,f.Warning),s=new Me(window,r,f.Warning);this.tcfCompatibleConsentProvider=n||new Pe(a,s,f.Warning),this.gppConsentProvider=i||new Be(window,r,f.Warning),this.initializeServices()}var Xe=(Je.prototype.retrievePixels=function(e,t){var n=this;new B(this.getUserSyncUrl(e,t)).send(function(e){if(e){var t=Je.parseUserSyncResponse(e);t?n.onPixelsRetrieved(t):n.errorReporter.log("Error","Unable to parse response from user sync")}},function(e,t){f.Warning("User Sync Pixel endpoint error; readyState "+e+"; requestStatus "+t)},function(){f.Warning("User Sync Pixel endpoint timeout")},this.pixelSyncTimeout)},Je.prototype.getUserSyncUrl=function(e,t){var n=null==e?void 0:e.gdprConsent,i=null==e?void 0:e.ccpaIabConsent,o=null==e?void 0:e.gppConsent,r=[];return(null==n?void 0:n.consentData)&&r.push("gdpr="+n.consentData),(null==n?void 0:n.gdprApplies)&&r.push("gdprapplies="+n.gdprApplies),(null==i?void 0:i.uspString)&&r.push("ccpa="+i.uspString),(null==o?void 0:o.gpp)&&r.push("gpp="+o.gpp),(null==o?void 0:o.gppSid)&&o.gppSid.forEach(function(e){r.push("gpp_sid="+e)}),(null==t?void 0:t.country_code)&&r.push("countrycode="+t.country_code),this.debug&&r.push("debug=1"),this.pixelSyncEndpoint+(r.length?"?"+r.join("&"):"")},Je.parseUserSyncResponse=function(e){var t=X(e);return t?("pixels"in t?Array.isArray(t.pixels)?t.pixels=t.pixels.filter(function(t){try{return new URL(t),!0}catch(e){return f.Warning("Failed to parse User Sync Pixel URL: "+t),!1}}):(f.Warning("pixels field in user sync response is not an array: "+t.pixels),t.pixels=[]):t.pixels=[],t):void f.Warning("Failed to parse user sync pixel JSON payload")},Je);function Je(e,t,n){void 0===n&&(n=!1),this.pixelSyncEndpoint="https://ssp-sync.criteo.com/user-sync/pixels",this.pixelSyncTimeout=2e3,this.errorReporter=t,this.onPixelsRetrieved=e,this.debug=n}var Ye=(Qe.execUserSync=function(e,t,n,i){void 0===i&&(i=!1),new Xe(Qe.appendUserSyncPixels,e,i).retrievePixels(t,n)},Qe.getOrCreateTagContainer=function(){var e=document.getElementById(Qe.tagElementName);if(e)return e;var t=document.createElement("div");return t.setAttribute("id",Qe.tagElementName),t.style.display="none",document.body.appendChild(t),t},Qe.appendUserSyncPixels=function(e){if(e.pixels.length)for(var t=Qe.getOrCreateTagContainer(),n=0,i=e.pixels;n<i.length;n++){var o=i[n],r=new Image;r.src=o,r.alt="",t.appendChild(r)}},Qe.tagElementName="criteoUserSyncTagsContainer",Qe);function Qe(){}function $e(){var n=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(n+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})}var Ze=(et=j,g(tt,et),tt.prototype.getMetricBuilder=function(){return this.metricBuilder},tt.prototype.eval=function(e){this.evalWithTimeout(e,void 0)},tt.prototype.evalWithTimeout=function(t,n){var i=this;(this.serviceProvider||new je).getServicesAsync(function(e){i.metricsManager||(i.metricsManager=new le(e.localStorageHelper)),i.metricBuilder||(i.metricBuilder=new Y(i.metricsManager)),i.innerEval(t,i.metricBuilder,e.privacies,n)})},tt.prototype.innerEval=function(i,o,r,e){var a=this,s=$e(),t=tt.getCriteoAdapterBidRequest(),n=tt.getRequestAuctionStart(t),c=e||J(t&&t.timeout),d=new be(o,n,c),u=new ve(this.slots,i.context,this.urlBuilder,this.profileId,this.integrationMode,this.networkId,this.adapterVersion,r,void 0,this.viewportComputer,c,s,i.context.userIds,Math.round(new Date/1e3),void 0,void 0,void 0,void 0,void 0,void 0,this.publisherId,this.accountId);if(!u.isValid()||"undefined"==typeof JSON)return f.Debug("Request ignored because it doesnt contain any slot"),void this.callbackError(void 0,void 0);var l=u.getRequest(),p=JSON.stringify(l),h=u.getUrl(),v=new B(h,p,"application/x-www-form-urlencoded");d.sendRequest(h),v.send(function(e){try{d.requestReceived();var t=X(e)||{},n=ge(t);void 0!==a.callbackSuccess&&a.callbackSuccess(JSON.stringify(t),n),d.finish(),!0===t.user_sync&&Ye.execUserSync(i.context.remoteLogging,r,t),o.getMetricsManager().sendEvents(o,s)}catch(e){a.reportAsyncRequestException(i,"onSuccess",e)}i.context.remoteLogging.sendErrorReport(a.urlBuilder,s),a.metricBuilder=void 0},function(e,t){try{d.requestReceived(),void 0!==a.callbackError&&a.callbackError(e,t),d.finish(),o.getMetricsManager().sendEvents(o,s)}catch(e){a.reportAsyncRequestException(i,"onError",e)}i.context.remoteLogging.sendErrorReport(a.urlBuilder,s),a.metricBuilder=void 0},function(){try{d.requestReceived(!0),void 0!==a.callbackTimeout&&a.callbackTimeout(),d.finish(),o.getMetricsManager().sendEvents(o,s)}catch(e){a.reportAsyncRequestException(i,"onTimeout",e)}i.context.remoteLogging.sendErrorReport(a.urlBuilder,s),a.metricBuilder=void 0},this.timeout)},tt.prototype.reportAsyncRequestException=function(e,t,n){var i=n.stack?n.stack:n.toString();e.context.remoteLogging.log("Exception","Exception caught in AsyncRequest "+t+" callback:\n"+i),f.Error("Error "+t+":\n\t"+i)},tt.getCriteoAdapterBidRequest=function(){try{return window.pbjs._bidsRequested.find(function(e){return"criteo"===e.bidderCode})}catch(e){return}},tt.getRequestAuctionStart=function(e){return e&&e.auctionStart},tt.NAME="directbidding",tt),et;function tt(e,t,n,i,o,r,a,s,c,d,u,l,p,h,v){var f=et.call(this,tt.NAME)||this;return f.profileId=e,f.urlBuilder=t,f.slots=n,f.callbackSuccess=i,f.callbackError=o,f.callbackTimeout=r,f.serviceProvider=a,f.timeout=c,f.networkId=d,f.integrationMode=u,f.adapterVersion=l,f.viewportComputer=p,f.metricsManager=s,f.publisherId=h,f.accountId=v,f.metricsManager&&(f.metricBuilder=new Y(f.metricsManager)),f}var nt=(it=j,g(ot,it),ot.prototype.eval=function(e){var t=this;setTimeout(function(){return t.onTimeout()},this.timeout),this.directBiddingEvent.evalWithTimeout(e,this.timeout)},ot.prototype.onSuccess=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackSuccess(e,t)},ot.prototype.onError=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackError(e,t)},ot.prototype.onHttpTimeout=function(){this.hasResponded=!0,this.hasTimeouted||this.callbackTimeout()},ot.prototype.onTimeout=function(){this.hasResponded||(this.hasTimeouted=!0,this.callbackTimeout())},ot.prototype.getMetricBuilder=function(){return this.directBiddingEvent.getMetricBuilder()},ot.NAME="directbidding",ot),it;function ot(e,t,n,i,o,r,a,s,c,d,u,l,p,h,v){var f=it.call(this,ot.NAME)||this,g=Math.max(10*(c||3e3),3e3);return f.directBiddingEvent=new Ze(e,t,n,function(e,t){return f.onSuccess(e,t)},function(e,t){return f.onError(e,t)},function(){return f.onHttpTimeout()},s,a,g,d,u,l,p,h,v),f.slots=n,f.callbackSuccess=i,f.callbackError=o,f.callbackTimeout=r,f.timeout=0===c?0:c||3e3,f.hasTimeouted=!1,f.hasResponded=!1,f}var rt=(at=j,g(st,at),st.prototype.eval=function(e){this.callback&&this.callback.apply(this)},st.NAME="genericEvent",st),at;function st(e){var t=at.call(this,st.NAME)||this;return t.callback=e,t}var ct=(dt.prototype.generateRandomId=function(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,6)},dt);function dt(e,t,n,i,o,r,a,s){this.id=this.generateRandomId(),this.slotId=e,this.impressionId=t,this.cpm=n,this.width=i,this.height=o,this.zoneId=r,this.dealCode=a,this.useSafeframe=null!=s&&s}var ut=(lt=ct,g(pt,lt),pt.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new rt(function(){return e.LoadScript(t.displayUrl)})},pt.prototype.GenerateMessage=function(){return{displayUrl:this.displayUrl}},pt),lt;function pt(e,t,n,i,o,r,a,s,c){var d=lt.call(this,e,t,n,i,o,r,s,c)||this;return d.displayUrl=a,d}var ht=(vt=ct,g(ft,vt),ft.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new rt(function(){return e.Write(t.creative)})},ft.prototype.GenerateMessage=function(){return{creative:this.creative}},ft),vt;function ft(e,t,n,i,o,r,a,s,c){var d=vt.call(this,e,t,n,i,o,r,s,c)||this;return d.creative=a,d}var gt=(mt=ct,g(yt,mt),yt.prototype.GenerateEvent=function(e){var t=this;return"function"!=typeof this.nativeCallback?(f.Error("'nativeCallback' parameter is not a function in placements object"),new rt(void 0)):"object"!=typeof this.nativePayload?(f.Error("'nativePayload' parameter is not an object in placements object"),new rt(void 0)):new rt(function(){return t.nativeCallback(t.nativePayload)})},yt.prototype.GenerateMessage=function(){return{nativePayload:this.nativePayload}},yt),mt;function yt(e,t,n,i,o,r,a,s,c){var d=mt.call(this,e,t,n,i,o,r,c)||this;return d.nativeCallback=a,d.nativePayload=s,d}function wt(e,t){if(e){var n;try{n=eval("(function(){return "+e+"})()")}catch(e){return void f.Error("Error evaluating the function: "+e)}if("function"==typeof n)return n.apply(n,t);f.Error("The passed value is not a function")}else f.Error("Cannot execute an empty function")}var bt=(Ct=ct,g(It,Ct),It.prototype.GenerateEvent=function(e){var t=this;return void 0!==this.videoCallback?"function"!=typeof this.videoCallback?(f.Error("'videoCallback' parameter is not a function in video object"),new rt(void 0)):new rt(function(){return t.videoCallback(t.GenerateMessage())}):(wt(this.videoPlayerFunction,[{slotid:this.impressionId,vastUrl:this.vastUrl,vastXml:this.vastXml}]),new rt(void 0))},It.prototype.GenerateMessage=function(){return{vastUrl:this.vastUrl,vastXml:this.vastXml,slotid:this.impressionId,cpm:this.cpm}},It),Ct;function It(e,t,n,i,o,r,a,s,c,d,u){var l=Ct.call(this,e,t,n,i,o,r,s)||this;return l.videoCallback=a,l.vastUrl=c,l.vastXml=d,l.videoPlayerFunction=u,l}function _t(e,t,n,i,o,r,a,s,c,d,u,l,p,h,v){if(l)return new bt(e,t,n,i,o,r,p,u,c,d,v);if(void 0!==a&&void 0!==s)return new gt(e,t,n,i,o,r,a,s,u);if(void 0!==d&&0!==d.indexOf("<script"))return new ht(e,t,n,i,o,r,d,u,h);if(void 0!==d&&0===d.indexOf("<script")){var f=new RegExp("(?<=src='|\")(.*)(?='|\")"),g=d.match(f);if(null!==g&&0<g.length)return new ut(e,t,n,i,o,r,g[0],u,h)}return void 0!==c?new ut(e,t,n,i,o,r,c,u,h):void 0}var Et=(St.tryInsertPlaceholder=function(e,t,n){var i=document.getElementById(e);if(null===i)return f.Warning("Unable to insert ad placeholder : impression id "+e+" not found."),!1;if(i.appendChild(this.createPlaceholder()),!t&&this.isVisible(i))return!0;this.removePlaceholder(e,n);var o=i.parentElement;if(null===o)return!1;var r=this.createClone(i);return o.insertBefore(r,i),r.appendChild(this.createPlaceholder()),this.isVisible(r)?(n[e]=r,!0):(f.Warning("Ad placeholder created but not visible : can't render."),o.removeChild(r),!1)},St.isVisible=function(e){return 0!==e.offsetWidth&&0!==e.offsetHeight&&0!==e.getClientRects().length},St.createClone=function(e){var t=e.cloneNode(!1);return t.id=this.generateRandomId(),t.className="","none"===t.style.display&&t.style.removeProperty("display"),"SPAN"===t.tagName&&(t.style.display="block"),e.style.display="none",t},St.generateRandomId=function(){for(var e="1234567890abcdefghijklmnopqrstuvwxyz",t="",n=0;n<20;n++){var i=Math.floor(Math.random()*e.length);t+=e.charAt(i)}return t},St.createPlaceholder=function(){var e=document.createElement("div");return e.style.width="1px",e.style.height="1px",e.style.display="block",e.className=St.PLACEHOLDER_NAME,e},St.removePlaceholder=function(e,t){var n=t[e];void 0!==n&&null!==n.parentNode&&n.parentNode.removeChild(n);var i=document.getElementById(e);if(null!==i)for(var o=0,r=i.getElementsByClassName(St.PLACEHOLDER_NAME);o<r.length;o++){var a=r[o];null!==a.parentNode&&a.parentNode.removeChild(a)}},St.insertAdIFrame=function(e,t){var n,i=t[e];if(void 0!==i)n=i;else{var o=document.getElementById(e);if(null===o)return null;n=o}for(var r=0,a=n.getElementsByClassName(St.PLACEHOLDER_NAME);r<a.length;r++){for(var s=a[r],c=0,d=s.childNodes;c<d.length;c++){var u=d[c];null!==u.parentNode&&u.parentNode.removeChild(u)}var l=this.createAdIFrame();return s.appendChild(l),s.style.width="",s.style.height="",s.style.display="",l}return null},St.createAdIFrame=function(){var e=document.createElement("iframe");return e.scrolling="no",e.marginWidth="0",e.marginHeight="0",e.frameBorder="0",e.style.border="0",e.style.verticalAlign="bottom",e},St.removePlaceholders=function(e,t,n){for(var i=0,o=e;i<o.length;i++){var r=o[i].impId;-1===t.indexOf(r)&&St.removePlaceholder(r,n)}},St.tryInsertPlaceholders=function(e,t,n){for(var i=[],o=0,r=e;o<r.length;o++){var a=r[o],s=a.impId;St.tryInsertPlaceholder(s,t,n)&&i.push(a)}return i},St.PLACEHOLDER_NAME="criteo_placeholder",St);function St(){}function Pt(e){window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push(e)}function Tt(t){Pt(function(){var e=At(window.googletag.pubads().getSlots());t(e)})}function At(e){for(var t=[],n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=0,r=e;o<r.length;o++){for(var a=r[o],s=a.getSlotElementId(),c=[],d=0,u=a.getSizes(n,i)||a.getSizes();d<u.length;d++){var l=u[d];"function"==typeof l.getWidth&&l.getWidth()&&"function"==typeof l.getHeight&&l.getHeight()&&c.push(l.getWidth()+"x"+l.getHeight())}s&&0<c.length&&t.push({slotId:s,sizes:c})}return t}function xt(e,t,n){Pt(function(){window.googletag.encryptedSignalProviders||(window.googletag.encryptedSignalProviders=[]),f.Debug("Promise set for GPT ESP"),window.googletag.encryptedSignalProviders.push({id:"esp.criteo.com",collectorFunction:function(){return f.Debug("Returning Promise to GPT"),t(),e}}),n()})}function Rt(){return kt(null,null)}function kt(e,t,n){var i={crt_pb:[e],crt_bidid:[t]};return void 0!==n&&(i=m(m({},i),{crt_deal:[n]})),i}var Dt=(Ot.prototype.setKeyValuesForAllSlots=function(t){var n=this;this.googletag.cmd.push(function(){for(var e in t)t.hasOwnProperty(e)&&(n.googletag.pubads().clearTargeting(e),n.googletag.pubads().setTargeting(e,t[e]+""))})},Ot.prototype.setKeyValuePerSlot=function(t,n){var i=this.googletag.pubads().getSlots().filter(function(e){return e.getSlotElementId()===t});0===i.length?f.Warning("No googletag slot found for slotId: "+t):1<i.length?f.Warning("More than one googletag slot found for slotId: "+t):this.googletag.cmd.push(function(){for(var e in n)n.hasOwnProperty(e)&&(i[0].clearTargeting(e),i[0].setTargeting(e,n[e]+""))})},Ot.prototype.resetKeyValuesForSlots=function(t){var e=this,n=Rt();this.googletag.pubads().getSlots().filter(function(e){return-1!==t.indexOf(e.getSlotElementId())}).forEach(function(t){e.googletag.cmd.push(function(){for(var e in n)n.hasOwnProperty(e)&&t.clearTargeting(e)})})},Ot);function Ot(){void 0===window.googletag&&(window.googletag={}),this.googletag=window.googletag,this.googletag.cmd=this.googletag.cmd||[]}function Mt(t,n){try{return decodeURIComponent(t)}catch(e){return void 0!==n?n:t}}function Ut(e){var t=document.createElement("a");return t.href=e,{protocol:t.protocol,host:t.host,hostname:t.hostname,pathname:"/"===t.pathname[0]?t.pathname.slice(1):t.pathname,search:t.search,href:t.href}}function Lt(e,t){var n=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);var 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:Wt(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host||window.location.host}}function Ft(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")}function Bt(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":"+e.port:""))+(e.pathname||"")+(e.search?"?"+Ft(e.search||""):"")+(e.hash?"#"+e.hash:"")}function Wt(e){return e?e.replace(/^\?/,"").split("&").reduce(function(e,t){var n=t.split("="),i=n[0],o=n[1];return/\[\]$/.test(i)||(e[i]=o||""),e},{}):{}}function Nt(e){var t={},n=e.split("?");if(1<n.length)for(var i=0,o=n[1].split("&");i<o.length;i++){var r=o[i].split("=");t[Mt(r[0])]=Mt(r[1])}return t}function Ht(e){try{return Boolean(new URL(e))}catch(e){return!1}}var zt=function(e,t){this.top=e,this.left=t},Gt=function(e,t,n,i){this.width=e,this.height=t,this.scrollTop=n,this.scrollLeft=i},qt=(Vt.getHighestAccessibleWindow=function(e){var t=e,n=!1;try{for(;t.parent.document!==t.document;){if(!t.parent.document){n=!0;break}t=t.parent}}catch(e){n=!0}return{topFrame:t,err:n}},Vt.getHighestAccessibleUrl=function(e){var t=e.topFrame;if(!e.err)return t.location.href;try{var n=t.top.location.href;if(n)return n}catch(e){}try{var i=t.location.ancestorOrigins;if(i)return i[i.length-1]}catch(e){}return t.document.referrer},Vt.inIframe=function(){try{return window.self!==window.top}catch(e){return!0}},Vt);function Vt(){}var jt=(Kt.prototype.getViewport=function(){var e=qt.getHighestAccessibleWindow(window).topFrame,t=e.document,n=e.innerWidth||t.documentElement.clientWidth,i=e.innerHeight||t.documentElement.clientHeight,o=t.documentElement.scrollTop||t.body&&t.body.scrollTop||0,r=t.documentElement.scrollLeft||t.body&&t.body.scrollLeft||0;return new Gt(n,i,o,r)},Kt.prototype.getSlotPosition=function(e){var t=e.impId,n=document.getElementById(t);if(null!==n){var i=n.getBoundingClientRect();return new zt(i.top,i.left)}},Kt);function Kt(){}var Xt=(Jt.createLineItemRangesFromString=function(e){for(var t=[],n=0,i=e.split(";");n<i.length;n++){var o=i[n],r=o.split(".."),a=Jt.roundToDecimal(r[0],2),s=r[1].split(":"),c=Jt.roundToDecimal(s[0],2),d=Jt.roundToDecimal(s[1],2);if(isNaN(a)||isNaN(c)||isNaN(d)||0===d){f.Warning("Could not parse range parameter: "+o);break}if(a<0||c<0||d<0){f.Warning("Positive values must be set for range bounds: "+o);break}var u=c-a,l=100*u/(100*d),p=l===Math.floor(l);c<a?f.Warning("Lower bound ("+a+") greater than upper bound ("+c+")"):p?t.push(new Jt(a,c,d)):f.Warning("Range ("+u+") is not divisible by increment ("+d+")")}return t.sort(function(e,t){return e.upperBound>t.upperBound?1:t.upperBound>e.upperBound?-1:0}),t},Jt.getDefaultDenseLineItemRanges=function(){return[new Jt(0,3,.01),new Jt(3,8,.05),new Jt(8,20,.5)]},Jt.computeLineItemPricebandValue=function(e,t){0===t.length&&(t=Jt.getDefaultDenseLineItemRanges());for(var n=0,i=t;n<i.length;n++){var o=i[n];if(e<=o.upperBound&&e>o.lowerBound){var r=Math.floor(e/o.increment+1e-4)*o.increment;return Jt.formatPriceBand(r)}}return e<t[0].lowerBound?void 0:e===t[0].lowerBound?Jt.formatPriceBand(t[0].lowerBound):Jt.formatPriceBand(t[t.length-1].upperBound)},Jt.formatPriceBand=function(e){return e.toFixed(2)},Jt.roundToDecimal=function(e,t){var n=parseFloat(e),i=Math.pow(10,t);return Math.round(n*i)/i},Jt);function Jt(e,t,n){this.lowerBound=e,this.upperBound=t,this.increment=n}var Yt=(Qt.prototype.addParameter=function(e,t){this.paramParser[e.toLowerCase()]=t},Qt.prototype.tryFillParameters=function(e){for(var t in e)if(void 0!==e[t]){var n=t.toLowerCase();this.paramParser[n]?this.paramParser[n](e[t]):f.Warning("Unknown parameter: "+t)}},Qt);function Qt(){var t=this;this.integrationMode=Z.Unspecified,this.paramParser={},this.addParameter("integrationMode",function(e){t.integrationMode=ne(e)})}var $t=(Zt=Yt,g(en,Zt),en),Zt;function en(e){var t=Zt.call(this)||this;return t.bidId=void 0,t.document=window.document,t.containerId=void 0,t.addParameter("bidId",function(e){t.bidId=e}),t.addParameter("document",function(e){t.document=e}),t.addParameter("containerId",function(e){t.containerId=e}),Zt.prototype.tryFillParameters.call(t,e),t}var tn=function(e,t,n,i,o,r,a,s,c,d,u,l){this.slotId=null!=l?l:$e().replace(/-/g,""),this.impId=e,this.zoneId=t,this.native=n,this.nativeCallback=i,this.transactionId=o,this.sizes=r,this.publisherSubId=a,this.mediaTypes=s,this.video=c,this.ext=d,this.rwdd=u},nn=(on.prototype.toString=function(){return this.width+"x"+this.height},on);function on(e,t){this.width=e,this.height=t}var rn=function(e,t,n,i,o,r,a,s,c,d,u,l,p,h,v,f,g,m,y,w,b,C,I,_,E){this.context=e,this.playersize=t,this.mimes=n,this.protocols=i,this.maxduration=o,this.api=r,this.skip=a,this.placement=s,this.playbackmethod=c,this.minduration=d,this.startdelay=u,this.videoCallback=l,this.plcmt=p,this.w=h,this.h=v,this.linearity=f,this.skipmin=g,this.skipafter=m,this.minbitrate=y,this.maxbitrate=w,this.delivery=b,this.pos=C,this.playbackend=I,this.adPodDurationSec=_,this.durationRangeSec=E},an=(sn=Yt,g(cn,sn),cn.getSizesFromRawSizes=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n].split("x");t.push(new nn(parseInt(o[0],10),parseInt(o[1],10)))}return t},cn.placementFromContext=function(e){return"instream"===e?1:"outstream"===e?2:void 0},cn),sn;function cn(e){var i=sn.call(this)||this;return i.slotId=void 0,i.zoneId=void 0,i.sizes=[],i.nativeCallback=void 0,i.publisherSubId=void 0,i.ext=void 0,i.video=void 0,i.addParameter("slotid",function(e){i.slotId=e}),i.addParameter("zoneid",function(e){i.zoneId=e}),i.addParameter("sizes",function(e){0==i.sizes.length&&(i.sizes=cn.getSizesFromRawSizes(e))}),i.addParameter("mediaTypes",function(e){var t;(null===(t=null==e?void 0:e.banner)||void 0===t?void 0:t.sizes)&&(i.sizes=cn.getSizesFromRawSizes(null==e?void 0:e.banner.sizes)),(null==e?void 0:e.video)&&(i.video=new rn(e.video.context,e.video.playerSize,e.video.mimes,e.video.protocols,e.video.maxduration,e.video.api,e.video.skip,e.video.placement||cn.placementFromContext(e.video.context),e.video.playbackmethod||[],e.video.minduration,e.video.startdelay,e.video.videoCallback,e.video.plcmt,e.video.w,e.video.h,e.video.linearity,e.video.skipmin,e.video.skipafter,e.video.minbitrate,e.video.maxbitrate,e.video.delivery,e.video.pos,e.video.playbackend,e.video.adPodDurationSec,e.video.durationRangeSec))}),i.addParameter("nativecallback",function(e){i.nativeCallback=e}),i.addParameter("publisherSubId",function(e){i.publisherSubId=e}),i.addParameter("ext",function(e){var t=i.ext;(null==t?void 0:t.data)&&e.data&&(t.data=m(m({},e.data),t.data)),i.ext=t?m(m({},e),t):e}),i.addParameter("ortb2Imp",function(e){var t,n=i.ext;(null==n?void 0:n.data)&&(null===(t=e.ext)||void 0===t?void 0:t.data)&&(n.data=m(m({},e.ext.data),n.data)),i.ext=n?m(m({},e.ext),n):e.ext}),sn.prototype.tryFillParameters.call(i,e),i}var dn=(un=Yt,g(ln,un),ln.prototype.deserializePlacementInput=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n],r=new an(o);t.push(new tn(r.slotId,r.zoneId,void 0!==r.nativeCallback,r.nativeCallback,void 0,r.sizes,r.publisherSubId,void 0,r.video,r.ext))}return t},ln),un;function ln(e){var t=un.call(this)||this;return t.placements=void 0,t.networkId=void 0,t.publisherId=void 0,t.accountId=void 0,t.addParameter("networkId",function(e){t.networkId=e}),t.addParameter("accountId",function(e){t.accountId=e}),t.addParameter("publisherId",function(e){t.publisherId=e}),t.addParameter("placements",function(e){t.placements=t.deserializePlacementInput(e)}),un.prototype.tryFillParameters.call(t,e),t}var pn=(hn=N,g(vn,hn),vn.prototype.ResizeFrame=function(e,t){this.width=e,this.height=t},vn.prototype.Write=function(e){var t={id:this.id,width:this.width,height:this.height,html:e};this.LoadSafeframe(t)},vn.prototype.LoadScript=function(e){var t={id:this.id,width:this.width,height:this.height,url:z(e)};this.LoadSafeframe(t)},vn.prototype.LoadSafeframe=function(e){var t=this.document.getElementById(this.containerId);if(t){var n=this.CreateSafeframe(vn.IFRAME_URL+"#"+encodeURIComponent(JSON.stringify(e)));t.appendChild(n)}},vn.prototype.CreateSafeframe=function(e){var t=this.document.createElement("iframe");return t.scrolling="no",t.marginWidth="0",t.marginHeight="0",t.frameBorder="0",t.style.border="0",t.width=this.width.toString(),t.height=this.height.toString(),t.src=e,t},vn.IFRAME_URL="https://static.criteo.net/js/ld/safeframe/html/safeframe.html",vn),hn;function vn(e,t,n){var i=hn.call(this)||this;return i.document=e,i.containerId=t,i.id=n,i.width=0,i.height=0,i}function fn(e,t,n){wn(e,oe,t,n)}function gn(t,n,i){Tt(function(e){e.length<=0?f.Warning("No Google tag placements have been retrieved, no bid will be requested."):wn({networkId:t,placements:e},oe,n,i)})}function mn(e,t,n){if("number"==typeof e)gn(e,t,n);else{var i=l(e,"networkId","number"),o=l(e,"placements","object"),r=l(e,"callback","function"),a=l(e,"timeout","function");void 0===o?gn(i,r,a):wn({networkId:i,placements:At(o)},oe,r,a)}}function yn(e,t,n,i,o){var r;if(void 0!==n||void 0!==i){var a=$e();Ln(((r={})[a]={data:{gtin:n,keyword:i}},r));wn({accountId:e,placements:[{slotId:a,nativeCallback:t}]},ae,function(e){e.forEach(function(e){En(e.id,document)})},o)}}function wn(e,u,I,l){var _=new dn(e);if(xn(_)){var p=new jt,E=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).context;E.serviceProvider.getServicesAsync(function(e){var t=v.create(e.localStorageHelper);if(t.adBlockFlagEnabled()){u=re,E.isAdBlocked=!0;var n=Et.tryInsertPlaceholders(_.placements,!0,E.cloneByImpressionId);if(0===n.length)return;_.placements=n;var i=I;I=function(e){void 0!==i&&i(e),e.forEach(function(e){var t=Et.insertAdIFrame(e.impressionId,E.cloneByImpressionId);null!==t&&En(e.id,t.contentDocument)})}}for(var o=function(){Et.removePlaceholders(_.placements,[],E.cloneByImpressionId),(new h).isAdBlocked(function(e){e?t.enableAdBlockFlag():t.disableAdBlockFlag()}),void 0!==I&&I([])},r=new nt(u,new se(!1),_.placements,function(e,t){var s=[],n=X(e);if(void 0!==n&&void 0!==n.slots){var c={};if(void 0!==(null==t?void 0:t.slots))for(var i=0,o=t.slots;i<o.length;i++){var r=o[i];c[r.imp_id]=r}var d={};if(n.invocation_codes)for(var a=0,u=n.invocation_codes;a<u.length;a++)for(var l=u[a],p=0,h=l.slot_ids;p<h.length;p++){var v=h[p];d[v]=l.invocation_code}for(var f=function(t){for(var e=void 0,n=void 0,i=0,o=_.placements;i<o.length;i++){var r=o[i];if(r.nativeCallback&&r.impId===t.impid){e=r.nativeCallback;break}if(r.video&&r.video.videoCallback&&r.impId===t.impid){n=r.video.videoCallback;break}}!e&&t.slotid in d&&(e=function(e){wt(d[t.slotid],[e])});var a=_t(t.slotid,t.impid,t.cpm,t.width,t.height,t.zoneid,e,t.native,t.displayurl,t.creative,t.deal,t.video,n,null===(o=c[t.slotid])||void 0===o?void 0:o.enable_safeframe,t.video_callback);void 0!==a&&((window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.bids[a.id]=a,s.push(a.impressionId))},g=0,m=n.slots;g<m.length;g++){f(r=m[g])}n.granularity&&bn(n.granularity)}if(Et.removePlaceholders(_.placements,s,E.cloneByImpressionId),void 0!==I){for(var y=[],w=0,b=_.placements;w<b.length;w++){var C=b[w];y.push(C.impId)}I(Tn({impressionIds:y}))}},o,o,new le(e.localStorageHelper),E.serviceProvider,0===l?0:l||3e3,_.networkId,_.integrationMode,void 0,p,_.publisherId,_.accountId),a=[],s=0,c=_.placements;s<c.length;s++){var d=c[s];a.push(d.impId),void 0===d.ext&&void 0!==E.slotsExt&&void 0!==E.slotsExt[d.impId]&&(d.ext=E.slotsExt[d.impId])}(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.impIds=a,(window.criteo_pubtag_standalone_147||window.criteo_pubtag).push(r)})}}function bn(e){(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.lineItemRanges=Xt.createLineItemRangesFromString(e)}function Cn(){var e=new Dt;e.resetKeyValuesForSlots((window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.impIds);var t=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.lineItemRanges,n=Rn();for(var i in n)if(n.hasOwnProperty(i)){var o=_n(n[i],t);void 0!==o&&e.setKeyValuePerSlot(i,o)}}function In(e,t){return _n(e,Xt.createLineItemRangesFromString(t))}function _n(e,t){var n=Xt.computeLineItemPricebandValue(e.cpm,t);return void 0===n?void 0:kt(n,e.id,e.dealCode)}function En(e,t){var n=new $t("string"==typeof e?{bidId:e,document:t}:e);if(n.bidId){var i=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.bids;if(i.hasOwnProperty(n.bidId)){var o=i[n.bidId];Sn(o,void 0===n.containerId?new G(n.document):!Pn()&&o.useSafeframe?new pn(n.document,n.containerId,o.impressionId):new H(n.document,n.containerId)),delete i[o.id]}else f.Error("Could not render bid with id: "+n.bidId)}else f.Error("You must provide a bidId to the RenderAd call")}function Sn(e,t){var n=e.GenerateEvent(t);(window.criteo_pubtag_standalone_147||window.criteo_pubtag).push(n)}function Pn(){var e;return void 0!==(null===(e=window.googletag)||void 0===e?void 0:e.cmd)}function Tn(e){var t=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.bids;if(null===t)return[];var n=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.lineItemRanges,i=[];for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];e&&e.impressionIds&&-1===e.impressionIds.indexOf(r.impressionId)||(0<n.length&&(r.cpm_bucket=Xt.computeLineItemPricebandValue(r.cpm,n)),i.push(r))}return i}function An(e,t){void 0===t&&(t=1);var n=Tn({impressionIds:[e]});return n.sort(function(e,t){return t.cpm-e.cpm}).slice(0,Math.min(Math.max(t,0),n.length))}function xn(e){var t;if(void 0===e.placements)return f.Error("Missing 'placements' parameter"),!1;if(0===e.placements.length)return f.Error("'placements' parameter is empty"),!1;for(var n=0,i=e.placements;n<i.length;n++){var o=i[n];if(kn(o.impId))return f.Error("Missing 'slotId' parameter in placements object"),!1;if(kn(o.video)){if(kn(o.zoneId)&&(kn(o.sizes)||kn(e.networkId)&&kn(e.publisherId))&&kn(e.accountId))return f.Error("Missing zone information: specify either a zoneId or a networkId and a zone size"),!1}else{if(kn(o.zoneId)&&kn(e.networkId)&&kn(e.publisherId)&&kn(e.accountId))return f.Error("Missing zone information: specify either a zoneId or a networkId (size is only recommended for video"),!1;if(null!=(null===(t=o.video)||void 0===t?void 0:t.videoCallback)&&"function"!=typeof o.video.videoCallback)return f.Error("'videoCallback' parameter is not a function in video object"),!1}if(void 0!==o.nativeCallback&&"function"!=typeof o.nativeCallback)return f.Error("'nativeCallback' parameter is not a function in placements object"),!1}return!0}function Rn(){var e={},t=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.bids;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(e.hasOwnProperty(i.impressionId))e[i.impressionId].cpm<i.cpm&&(e[i.impressionId]=i);else e[i.impressionId]=i}return e}function kn(e){return void 0===e||e+""==""}function Dn(e){(window.criteo_pubtag_standalone_147||window.criteo_pubtag).context.ceh=e}function On(e){(window.criteo_pubtag_standalone_147||window.criteo_pubtag).context.ccpaOptout=e}function Mn(e){}function Un(e){}function Ln(e){(window.criteo_pubtag_standalone_147||window.criteo_pubtag).context.slotsExt=e}function Fn(e){(window.criteo_pubtag_standalone_147||window.criteo_pubtag).context.userIds=e}function Bn(e,t,n,i){if(void 0===i&&(i=null),!n&&!t)return f.Error("A params object or a gamVastUrl is required"),null;var o,r,a=(window.criteo_pubtag_standalone_147||window.criteo_pubtag).standaloneBidder.lineItemRanges;if(t){var s=Lt(t,{noDecodeWholeURL:!0});if(!n)return o=s,r=p(e,a,i),o.search.cust_params=o.search.cust_params?o.search.cust_params+"%26"+r:r,Bt(o)}var c,d,u,l={};return d=e,(c=l).correlator=Date.now().toFixed(),c.sz=d.width+"x"+d.height,(u=l=c).env="vp",u.gdfp_req="1",u.output="vast",u.unviewed_position_start="1",(l=function(e,t){for(var n in t)e[n]=t[n];return e}(l=u,n)).cust_params=p(e,a),Bt({protocol:"https",host:"securepubads.g.doubleclick.net",pathname:"/gampad/ads",search:l});function p(e,t,n){void 0===n&&(n=null);var i=encodeURIComponent(encodeURIComponent(e.vastUrl));n&&(i=encodeURIComponent(i));var o={crt_displayurl:i,crt_format:"video"},r=Xt.computeLineItemPricebandValue(e.cpm,t);return o.crt_pb=void 0!==r?r:e.cpm.toFixed(2),encodeURIComponent(Ft(o))}}var Wn=206;function Nn(){(window.Criteo_standalone_147||window.Criteo).passbackEvents=c((window.Criteo_standalone_147||window.Criteo).passbackEvents)}function Hn(e,t){wn(e,Wn,Nn,t)}function zn(e,t,n,i){var o;"string"==typeof e?o=e:(o=l(e,"adUnit","string"),t=l(e,"passback","function"),n=l(e,"customRenderFunction","function"),i=l(e,"minimumBidPrice","number")),void 0!==o?void 0!==t?("function"!=typeof n&&(n=function(e){En({bidId:e.id,containerId:o})}),(window.Criteo_standalone_147||window.Criteo).passbackEvents=(window.Criteo_standalone_147||window.Criteo).passbackEvents||[],(window.Criteo_standalone_147||window.Criteo).passbackEvents.push(function(){var e=An(o)[0];e&&(void 0===i||e.cpm>i)?n(e):t(o)})):f.Error("A passback callback should be provided"):f.Error("An adUnit string parameter should be provided")}var Gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qn(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jn(e,t){return e(t={exports:{}},t.exports),t.exports}function Kn(e){return e&&e.default||e}var Xn=jn(function(e,t){var n;n=function(){function c(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,t=void 0,o=void 0,a=function(e,t){p[i]=e,p[i+1]=t,2===(i+=2)&&(o?o(h):y())};var e="undefined"!=typeof window?window:void 0,r=e||{},s=r.MutationObserver||r.WebKitMutationObserver,d="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function l(){var e=setTimeout;return function(){return e(h,1)}}var p=new Array(1e3);function h(){for(var e=0;e<i;e+=2){(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0}i=0}var v,f,g,m,y=void 0;function w(e,t){var n=this,i=new this.constructor(I);void 0===i[C]&&L(i);var o=n._state;if(o){var r=arguments[o-1];a(function(){return M(o,i,r,n._result)})}else D(n,i,e,t);return i}function b(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(I);return A(t,e),t}y=d?function(){return process.nextTick(h)}:s?(f=0,g=new s(h),m=document.createTextNode(""),g.observe(m,{characterData:!0}),function(){m.data=f=++f%2}):u?((v=new MessageChannel).port1.onmessage=h,function(){return v.port2.postMessage(0)}):(void 0===e&&"function"==typeof qn?function(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(h)}:l()}catch(e){return l()}}:l)();var C=Math.random().toString(36).substring(2);function I(){}var _=void 0,E=1,S=2;function P(e,i,o){a(function(t){var n=!1,e=function(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}(o,i,function(e){n||(n=!0,(i!==e?A:R)(t,e))},function(e){n||(n=!0,k(t,e))},t._label);!n&&e&&(n=!0,k(t,e))},e)}function T(e,t,n){var i,o;t.constructor===e.constructor&&n===w&&t.constructor.resolve===b?(i=e,(o=t)._state===E?R(i,o._result):o._state===S?k(i,o._result):D(o,void 0,function(e){return A(i,e)},function(e){return k(i,e)})):void 0===n?R(e,t):c(n)?P(e,t,n):R(e,t)}function A(t,e){if(t===e)k(t,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(i=e),null===i||"object"!=o&&"function"!=o)R(t,e);else{var n=void 0;try{n=e.then}catch(e){return void k(t,e)}T(t,e,n)}var i,o}function x(e){e._onerror&&e._onerror(e._result),O(e)}function R(e,t){e._state===_&&(e._result=t,e._state=E,0!==e._subscribers.length&&a(O,e))}function k(e,t){e._state===_&&(e._state=S,e._result=t,a(x,e))}function D(e,t,n,i){var o=e._subscribers,r=o.length;e._onerror=null,o[r]=t,o[r+E]=n,o[r+S]=i,0===r&&e._state&&a(O,e)}function O(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,o=void 0,r=e._result,a=0;a<t.length;a+=3)i=t[a],o=t[a+n],i?M(n,i,o,r):o(r);e._subscribers.length=0}}function M(e,t,n,i){var o=c(n),r=void 0,a=void 0,s=!0;if(o){try{r=n(i)}catch(e){s=!1,a=e}if(t===r)return void k(t,new TypeError("A promises callback cannot return that same promise."))}else r=i;t._state!==_||(o&&s?A(t,r):!1===s?k(t,a):e===E?R(t,r):e===S&&k(t,r))}var U=0;function L(e){e[C]=U++,e._state=void 0,e._result=void 0,e._subscribers=[]}var F=(B.prototype._enumerate=function(e){for(var t=0;this._state===_&&t<e.length;t++)this._eachEntry(e[t],t)},B.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,i=n.resolve;if(i===b){var o=void 0,r=void 0,a=!1;try{o=t.then}catch(e){a=!0,r=e}if(o===w&&t._state!==_)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===W){var s=new n(I);a?k(s,r):T(s,t,o),this._willSettleAt(s,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(i(t),e)},B.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===_&&(this._remaining--,e===S?k(i,n):this._result[t]=n),0===this._remaining&&R(i,this._result)},B.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,function(e){return n._settledAt(E,t,e)},function(e){return n._settledAt(S,t,e)})},B);function B(e,t){this._instanceConstructor=e,this.promise=new e(I),this.promise[C]||L(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?R(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&R(this.promise,this._result))):k(this.promise,new Error("Array Methods must be provided an Array"))}var W=(N.prototype.catch=function(e){return this.then(null,e)},N.prototype.finally=function(t){var n=this.constructor;return c(t)?this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})}):this.then(t,t)},N);function N(e){this[C]=U++,this._result=this._state=void 0,this._subscribers=[],I!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof N?function(t,e){try{e(function(e){A(t,e)},function(e){k(t,e)})}catch(e){k(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return W.prototype.then=w,W.all=function(e){return new F(this,e).promise},W.race=function(o){var r=this;return n(o)?new r(function(e,t){for(var n=o.length,i=0;i<n;i++)r.resolve(o[i]).then(e,t)}):new r(function(e,t){return t(new TypeError("You must pass an array to race."))})},W.resolve=b,W.reject=function(e){var t=new this(I);return k(t,e),t},W._setScheduler=function(e){o=e},W._setAsap=function(e){a=e},W._asap=a,W.polyfill=function(){var e=void 0;if(void 0!==Gn)e=Gn;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=W},W.Promise=W},e.exports=n()}),Jn=Xn.polyfill,Yn=(Qn.LoadPolyfills=function(){Qn.DefineIsArray(),Qn.DefineIndexOf(),Qn.DefineFilter(),Qn.DefinePromise()},Qn.DefinePromise=function(){window.Promise||Jn()},Qn.DefineIsArray=function(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)})},Qn.DefineIndexOf=function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){if(void 0===t&&(t=0),void 0===this)throw new TypeError("'this' is null or not defined");var n=this.length;if(0===n)return-1;if(n<=t)return-1;for(var i=Math.max(0<=t?t:n-Math.abs(t),0);i<n;){if(i in this&&this[i]===e)return i;i++}return-1})},Qn.DefineFilter=function(){Array.prototype.filter||(Array.prototype.filter=function(e){if(void 0===this||void 0===this)throw new TypeError;var t=this.length;if("function"!=typeof e)throw new TypeError;for(var n=[],i=2<=arguments.length?arguments[1]:void 0,o=0;o<t;o++)if(o in this){var r=this[o];e.call(i,r,o,this)&&n.push(r)}return n})},Qn);function Qn(){}var $n=function(e,t){this.errorType=e,this.messages=t},Zn=function(e,t,n){this.environment=e,this.errors=t,this.requestId=n},ei=(ti.prototype.withMessage=function(e,t){return e in this.messages||(this.messages[e]=new Array),this.messages[e].push(t),this},ti.prototype.withRequestId=function(e){return this.requestId=e,this},ti.prototype.build=function(){var e=Array();for(var t in this.messages)null!=t&&e.push(new $n(t,this.messages[t]));return new Zn(this.environment,e,this.requestId)},ti);function ti(e){this.messages={},this.environment=e}var ni=(ri.prototype.reportPending=function(){return this.shouldSend},ri.prototype.sendErrorReport=function(e,t){if(this.shouldSend){void 0!==t&&this.builder.withRequestId(t);var n=this.builder.build(),i=e.buildErrorUrl();i+=this.debug?"?debug=1":"";var o=JSON.stringify(n);navigator.sendBeacon&&navigator.sendBeacon(i,o),this.shouldSend=!1,this.builder=new ei(ri.environment)}},ri.prototype.log=function(e,t){this.shouldSend=!0,this.builder.withMessage(e,t)},ri.environment="PublisherTag Version "+ie,ri),ii,oi;function ri(e){void 0===e&&(e=!1),this.builder=new ei(ri.environment),this.shouldSend=!1,this.debug=e}oi=ii=ii||{},oi[oi.InFriendlyIframe=1]="InFriendlyIframe",oi[oi.InUnfriendlyIframe=2]="InUnfriendlyIframe",oi[oi.DirectIntegration=3]="DirectIntegration";var ai=(si.prototype.getUserContextualData=function(){var e,t,n,i,o,r,a,s,c,d,u,l,p,h;return{data:{contentLanguage:this.getContentLanguage(),navigatorLanguage:null===(t=null===(e=this.window)||void 0===e?void 0:e.navigator)||void 0===t?void 0:t.language,orientation:this.getOrientation(),windowInnerWidth:null===(n=this.window)||void 0===n?void 0:n.innerWidth,windowInnerHeight:null===(i=this.window)||void 0===i?void 0:i.innerHeight,pageWidth:null===(a=null===(r=null===(o=this.window)||void 0===o?void 0:o.document)||void 0===r?void 0:r.documentElement)||void 0===a?void 0:a.scrollWidth,pageHeight:null===(d=null===(c=null===(s=this.window)||void 0===s?void 0:s.document)||void 0===c?void 0:c.documentElement)||void 0===d?void 0:d.scrollHeight,sessionDuration:me.TimeSincePageLoad()},device:{w:null===(l=null===(u=this.window)||void 0===u?void 0:u.screen)||void 0===l?void 0:l.width,h:null===(h=null===(p=this.window)||void 0===p?void 0:p.screen)||void 0===h?void 0:h.height}}},si.prototype.getOrientation=function(){var e,t,n,i,o,r;return((null===(t=null===(e=this.window)||void 0===e?void 0:e.screen)||void 0===t?void 0:t.orientation)||{}).type||(null===(i=null===(n=this.window)||void 0===n?void 0:n.screen)||void 0===i?void 0:i.mozOrientation)||(null===(r=null===(o=this.window)||void 0===o?void 0:o.screen)||void 0===r?void 0:r.msOrientation)},si.prototype.getContentLanguage=function(){var e,t,n,i,o,r=null===(n=null===(t=null===(e=this.window)||void 0===e?void 0:e.document)||void 0===t?void 0:t.documentElement)||void 0===n?void 0:n.lang;if(!r&&"function"==typeof(null===(o=null===(i=this.window)||void 0===i?void 0:i.document)||void 0===o?void 0:o.querySelector)){var a=this.window.document.querySelector('meta[http-equiv="Content-Language"]');r=null==a?void 0:a.content}return r},si);function si(e){this.window=e}var ci=(di=de,g(vi,di),vi.prototype.sendEvents=function(e){var t={requestId:this.context.getClientSessionId(),events:[e]};this.context.isEligibleForCsmEvents()&&this.sendEventsToBeacon(t,this.urlBuilder.buildCsmEventsUrl())},vi),di,ui,li,pi,hi;function vi(e){var t=di.call(this)||this;return t.context=e,t}li=ui=ui||{},li[li.None=0]="None",li[li.Cookie=1]="Cookie",li[li.LocalStorage=2]="LocalStorage",li[li.Delegation=4]="Delegation",hi=pi=pi||{},hi[hi.Unknown=0]="Unknown",hi[hi.Deactivated=1]="Deactivated",hi[hi.Activated=2]="Activated";var fi=(gi.prototype.getIdCpy=function(){return this.userDataHandlers.idCpy().fromAllStorages()},gi.prototype.getLocalWebId=function(){return this.userDataHandlers.localWebId().fromAllStorages()},gi.prototype.getOptOut=function(){return this.userDataHandlers.optOut().fromAllStorages()},gi.prototype.getBundle=function(){return this.userDataHandlers.bundle().fromAllStorages()},gi);function gi(e){this.userDataHandlers=e}var mi=(yi.fromUserIdentificationData=function(e){return new yi(e.value,e.origin)},yi.fromValue=function(e){return new yi(e,ui.None)},yi.prototype.hasValue=function(){return""!==String(this.value)&&null!==this.value&&void 0!==this.value},yi);function yi(e,t){this.value=e,this.origin=t}var wi=(bi=mi,g(Ci,bi),Ci.prototype.hasValue=function(){return""!==String(this.value)&&null!==this.value&&void 0!==this.value},Ci.prototype.saveOnAllStorages=function(){if(this.hasValue()){var e="boolean"==typeof this.value?this.value?"1":"0":String(this.value);this.storageAdapter.writeToAllStorages(this.storageKey,e,this.expirationTimeHours)}},Ci.prototype.toJSON=function(){return{value:this.value,origin:this.origin}},Ci),bi;function Ci(e,t,n,i,o){var r=bi.call(this,n,i)||this;return r.storageKey=e,r.expirationTimeHours=t,r.storageAdapter=o,r}var Ii=(_i.prototype.idCpy=function(){return this.createGuid(_i.IDCPY_COOKIE_NAME)},_i.prototype.localWebId=function(){return this.createGuid(_i.LWID_COOKIE_NAME)},_i.prototype.optOut=function(){return new Ei(Boolean,_i.OPTOUT_COOKIE_NAME,_i.OPTOUT_RETENTION_TIME_HOUR,this.storageAdapter)},_i.prototype.bundle=function(){return this.createGuid(_i.BUNDLE_COOKIE_NAME)},_i.prototype.createGuid=function(e){return new Ei(String,e,_i.GUID_RETENTION_TIME_HOUR,this.storageAdapter)},_i.IDCPY_COOKIE_NAME="cto_idcpy",_i.LWID_COOKIE_NAME="cto_lwid",_i.OPTOUT_COOKIE_NAME="cto_optout",_i.BUNDLE_COOKIE_NAME="cto_bundle",_i.GUID_RETENTION_TIME_HOUR=9360,_i.OPTOUT_RETENTION_TIME_HOUR=43200,_i);function _i(e){this.storageAdapter=e}var Ei=(Si.prototype.fromAllStorages=function(){var e=this.storageAdapter.readFromAllStorages(this.storageKey),t="boolean"==typeof(new this.type).valueOf()?"1"===e.value:e.value;return this.create(t,e.origin)},Si.prototype.fromValue=function(e){return this.create(e,ui.None)},Si.prototype.removeFromAllStorages=function(){this.storageAdapter.removeFromAllStorages(this.storageKey)},Si.prototype.create=function(e,t){return new wi(this.storageKey,this.expirationTimeHours,e,t,this.storageAdapter)},Si);function Si(e,t,n,i){this.type=e,this.storageKey=t,this.expirationTimeHours=n,this.storageAdapter=i}var Pi=(Ti.prototype.getSyncframeListener=function(n,i){var o=this;return function(e){if(!o.discardMessageFromOtherFrames(e)||o.window.criteo_syncframe_state.ForceSyncframeMessageHandling){var t=e.data;(null==t?void 0:t.requestId)===n&&(e.stopImmediatePropagation(),o.handleSyncframeResponse(t,i),o.window.criteo_syncframe_state.firstSyncframeCompleted=!0,o.window.criteo_syncframe_state.syncframeRequested=!1,o.tryUnqueueAppendSyncframeRequests())}}},Ti.prototype.userBundleHasAlreadyBeenRetrieved=function(){return this.userDataHandlers.bundle().fromAllStorages().hasValue()},Ti.prototype.canDropSyncframe=function(){return!this.window.criteo_syncframe_state.syncframeRequested},Ti.prototype.discardMessageFromOtherFrames=function(e){return!e.data||e.origin!=this.syncframeOrigin},Ti.prototype.appendGumIframeIfDoesNotExist=function(e,t,n){var i,o=this;!0===(null===(i=this.window.criteo_syncframe_state)||void 0===i?void 0:i.firstSyncframeCompleted)||this.userBundleHasAlreadyBeenRetrieved()||this.canDropSyncframe()?this.appendGumIframe(e,t,n):this.queueAppendSyncframeRequest(function(){return o.appendGumIframeIfDoesNotExist(e,t,n)})},Ti.prototype.doOnCompletedDom=function(e){var t=this;if(this.window.addEventListener)if("complete"===this.document.readyState)e();else{var n=function(){t.window.removeEventListener("load",n),t.document.removeEventListener("DOMContentLoaded",n),e()};this.window.addEventListener("load",n,!1),this.document.addEventListener("DOMContentLoaded",n,!1)}},Ti.prototype.appendGumIframe=function(e,t,n){t();var i=e();if(this.consentAllowsSyncframeToBeDropped(i.consent)){this.window.addEventListener("message",this.getSyncframeListener(i.requestId,n),!0);var o=this.createIFrame(i);this.document.body.appendChild(o),this.window.criteo_syncframe_state.syncframeRequested=!0}else this.handleSyncframeResponse({},n)},Ti.prototype.consentAllowsSyncframeToBeDropped=function(e){var t;return 2!==(null==e?void 0:e.gdprVersion)||!0!==(null==e?void 0:e.gdprApplies)||!0===(null===(t=null==e?void 0:e.vendorConsents)||void 0===t?void 0:t[this.criteoGlobalVendorListId])},Ti.prototype.queueAppendSyncframeRequest=function(e){void 0!==this.window.criteo_syncframe_state.appendSyncframeRequestQueue&&this.window.criteo_syncframe_state.appendSyncframeRequestQueue.push(e)},Ti.prototype.tryUnqueueAppendSyncframeRequests=function(){for(var e,t,n=null===(e=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)||void 0===e?void 0:e.shift();void 0!==n;)n(),n=null===(t=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)||void 0===t?void 0:t.shift()},Ti.prototype.createIFrame=function(e){var t,n=this.document.createElement("iframe"),i={uid:e.uid,lwid:e.localWebId,bundle:e.bundle,optout:e.optoutCookie,tld:e.topLevelDomain,topUrl:e.topUrl,version:"string"==typeof e.version?null===(t=e.version)||void 0===t?void 0:t.replace(/\./g,"_"):e.version,cw:e.canWriteCookie,lsw:e.canWriteLocalStorage,origin:e.origin,pm:e.privateMode,rtusCallerId:e.rtusCallerId,requestId:e.requestId},o=[];return o.push("origin="+e.origin),o.push("topUrl="+e.topUrl),e.consent&&(void 0!==e.consent.gdprApplies&&o.push("gdpr="+(e.consent.gdprApplies?1:0)),void 0!==e.consent.consentData&&o.push("gdpr_consent="+e.consent.consentData),void 0!==e.consent.uspString&&o.push("us_privacy="+e.consent.uspString),void 0!==e.consent.gppString&&o.push("gpp="+e.consent.gppString),void 0!==e.consent.gppSectionIds&&o.push("gpp_sid="+e.consent.gppSectionIds)),e.isDebug&&o.push("debug=1"),n.src=this.syncframeEndpoint+"?"+o.join("&")+"#"+JSON.stringify(i),n.width="0",n.height="0",n.frameBorder="0",n.style.borderWidth="0px",n.style.margin="0px",n.style.display="none",n.title="Criteo GUM iframe",n},Ti);function Ti(e,t,n){this.criteoGlobalVendorListId=91,this.window=e,this.document=e.document,this.userDataHandlers=new Ii(t),n=null!=n?n:"gum.criteo.com",this.syncframeOrigin="https://"+n,this.syncframeEndpoint="https://"+n+"/syncframe",this.window.criteo_syncframe_state||(this.window.criteo_syncframe_state={syncframeRequested:!1}),this.window.criteo_syncframe_state.appendSyncframeRequestQueue||(this.window.criteo_syncframe_state.appendSyncframeRequestQueue=[])}var Ai=(xi=Pi,g(Ri,xi),Ri.prototype.handleSyncframeResponse=function(e,t){var n;if(e.optout)this.deleteUserData(),this.userDataHandlers.optOut().fromValue(!0).saveOnAllStorages(),null===(n=null==t?void 0:t.resolve)||void 0===n||n.call(t,"");else{if(e.uid&&this.userDataHandlers.idCpy().fromValue(e.uid).saveOnAllStorages(),e.callbacks)for(var i=0,o="string"==typeof e.callbacks?[e.callbacks]:e.callbacks;i<o.length;i++){var r=o[i],a=this.document.createElement("img");a.style.display="none",a.width=1,a.height=1,a.setAttribute("data-owner","criteo-tag"),a.src=r}else e.bundle&&this.userDataHandlers.bundle().fromValue(e.bundle).saveOnAllStorages();(null==t?void 0:t.resolve)&&t.resolve(e.bundle?e.bundle:"")}},Ri.prototype.appendGumIFrameOnCompletedDomIfItDoesNotExist=function(e,t){function n(){return i.appendGumIframeIfDoesNotExist(function(){return i.createSyncframeRequest(e(),o)},function(){},{resolve:t})}var i=this,o=Math.random().toString();this.adapter.isPubTagIds?n():this.doOnCompletedDom(n)},Ri.prototype.createSyncframeRequest=function(e,t){return{uid:this.userDataHandlers.idCpy().fromAllStorages().toJSON(),localWebId:this.userDataHandlers.localWebId().fromAllStorages().toJSON(),bundle:this.userDataHandlers.bundle().fromAllStorages().toJSON(),optoutCookie:this.userDataHandlers.optOut().fromAllStorages().toJSON(),topLevelDomain:e.topLevelDomain,topUrl:e.topUrl,version:e.version,canWriteCookie:e.canWriteCookie,canWriteLocalStorage:e.canWriteLocalStorage,origin:this.adapter.isPubTagIds?"publishertagids":"publishertag",privateMode:void 0,consent:e.consent,rtusCallerId:void 0,isDebug:this.adapter.isDebug,requestId:t}},Ri.prototype.fetchUserData=function(){return new fi(this.userDataHandlers)},Ri.prototype.deleteUserData=function(){this.userDataHandlers.idCpy().removeFromAllStorages(),this.userDataHandlers.bundle().removeFromAllStorages()},Ri),xi;function Ri(e,t,n){void 0===n&&(n=!1);var i=xi.call(this,t,e.storageAdapter,n?"gumi.criteo.com":"gum.criteo.com")||this;return i.adapter=e,i}var ki=(Di.prototype.synchronizeCriteoUid=function(e,t){var n=this,i=null==e?void 0:e.gdprConsent,o=null==e?void 0:e.ccpaIabConsent,r=null==e?void 0:e.gppConsent;this.syncframe.appendGumIFrameOnCompletedDomIfItDoesNotExist(function(){var e;return{topLevelDomain:n.getTld(),topUrl:encodeURIComponent(Ut(n.topUrl).hostname),version:ie,canWriteCookie:n.canWriteCookies,canWriteLocalStorage:n.localStorageHelper.localStorageEnabled,consent:{gdprApplies:null==i?void 0:i.gdprApplies,consentData:null==i?void 0:i.consentData||"",gdprVersion:null==i?void 0:i.version,vendorConsents:null==i?void 0:i.vendorConsents,uspString:null==o?void 0:o.uspString,ccpaVersion:null==o?void 0:o.version,gppString:null==r?void 0:r.gpp,gppSectionIds:null===(e=null==r?void 0:r.gppSid)||void 0===e?void 0:e.join(",")}}},t)},Di.prototype.checkCookiesAreWriteable=function(){var e="cto_writeable";this.cookieHelper.setCookie(e,"1",1,this.topDoc,!0);var t="1"===this.cookieHelper.getCookie(e,this.topDoc);return this.cookieHelper.deleteCookie(e,this.topDoc,!0),t},Di.prototype.writeOnAllStorages=function(e,t,n){this.localStorageHelper.setItem(e,t),this.cookieHelper.setCookie(e,t,n,this.topDoc,!0)},Di.prototype.getFromAllStorages=function(e){var t=this.cookieHelper.getCookie(e,this.topDoc),n=this.localStorageHelper.getItem(e)||void 0;return{value:t||n,origin:(t&&ui.Cookie)|(n&&ui.LocalStorage)}},Di.prototype.deleteFromAllStorage=function(e){this.cookieHelper.deleteCookie(e,this.topDoc,!0),this.localStorageHelper.removeItem(e)},Di.prototype.getTld=function(){var e=this.cookieHelper.setCookie(Di.TLD_TEST_COOKIE_NAME,"test",1,this.topDoc,!0);return this.cookieHelper.deleteCookie(Di.TLD_TEST_COOKIE_NAME,this.topDoc,!0),e},Di.prototype.fetchUserData=function(){return this.syncframe.fetchUserData()},Di.prototype.deleteUserData=function(){this.syncframe.deleteUserData()},Di.TLD_TEST_COOKIE_NAME="cto_pub_test_tld",Di);function Di(e,t,n,i,o,r){var a=this;this.topDoc=n.document,this.cookieHelper=e,this.localStorageHelper=t,this.canWriteCookies=this.checkCookiesAreWriteable(),this.topUrl=o;var s=!1;try{s=JSON.parse("false")}catch(e){}this.syncframe=new Ai({storageAdapter:{readFromAllStorages:function(e){var t=a.getFromAllStorages(e);return{value:t.value,origin:t.origin}},writeToAllStorages:function(e,t,n){a.writeOnAllStorages(e,t,n)},removeFromAllStorages:function(e){a.deleteFromAllStorage(e)}},isPubTagIds:null!=r&&r,isDebug:i},n,s)}var Oi=(Mi.prototype.synchronizeCriteoUid=function(e,t,n,i){var o,r=(null===(o=this.cookieSynchronizerFactory)||void 0===o?void 0:o.call(this))||new ki(t,e,this.highestAccessibleWindowStruct.topFrame,this.debugMode,this.highestAccessibleUrl,!1),a=r.fetchUserData();n("",a.getOptOut().value,"",a.getBundle().value),r.synchronizeCriteoUid(i)},Mi.prototype.getServicesAndSyncCriteoUid=function(i){var o=this;void 0===i&&(i=function(e,t,n,i){}),this.serviceProvider.getServicesAsync(function(e){var t,n;(null===(t=e.ccpaConsentProvider)||void 0===t?void 0:t.hasUserOptOut(null===(n=e.privacies)||void 0===n?void 0:n.ccpaIabConsent))||o.synchronizeCriteoUid(e.localStorageHelper,e.cookieHelper,i,e.privacies)})},Mi.prototype.deleteCriteoUid=function(){var n=this;this.serviceProvider.getServicesAsync(function(e){var t;((null===(t=n.cookieSynchronizerFactory)||void 0===t?void 0:t.call(n))||new ki(e.cookieHelper,e.localStorageHelper,n.highestAccessibleWindowStruct.topFrame,n.debugMode,n.highestAccessibleUrl,!1)).deleteUserData()})},Mi);function Mi(e,t,n,i){this.highestAccessibleWindowStruct=qt.getHighestAccessibleWindow(e),this.highestAccessibleUrl=qt.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);var o=Nt(this.highestAccessibleUrl);this.debugMode="1"===o.pbt_debug||!1,this.debugMode&&u(d.Debug),this.cookieSynchronizerFactory=t,this.serviceProvider=n||new je(this.highestAccessibleWindowStruct.topFrame,void 0,void 0,void 0,i)}var Ui=(Li.prototype.getContextFlags=function(){var e="";return e+=this.debugMode?"&debug=1":"",e+=this.noLog?"&nolog=1":""},Li.prototype.isEligibleForCsmEvents=function(){return this.sessionRandomId%100==0},Li.prototype.getClientSessionId=function(){return this.clientSessionId},Li.prototype.getMetricsManager=function(){return this.contextMetricsManager},Li.prototype.getDisplayContext=function(e){return qt.inIframe()?e.err?ii.InUnfriendlyIframe:ii.InFriendlyIframe:ii.DirectIntegration},Li.prototype.synchronizeCriteoUid=function(){var o=this;this.identityHelper.getServicesAndSyncCriteoUid(function(e,t,n,i){o.isOptOut=t,o.bundle=i})},Li.prototype.getIdfs=function(){return""},Li.prototype.setIdfs=function(e){},Li.prototype.setSite=function(e){this.site=e},Li.prototype.getSite=function(){return this.site},Li.prototype.setApp=function(e){this.app=e},Li.prototype.getApp=function(){return this.app},Li.prototype.setDevice=function(e){this.device=e},Li.prototype.getDevice=function(){return this.device},Li.prototype.setUser=function(e){this.user=e},Li.prototype.getPublisherExt=function(){return{}},Li.prototype.getUserExtWithContextualData=function(){return{}},Li.prototype.getUser=function(){var e,t,n,i=this.user||{},o=this.userContextualDataManager.getUserContextualData();if(null==o?void 0:o.data){var r=m(m({},null===(e=i.ext)||void 0===e?void 0:e.data),o.data);i.ext=m(m({},i.ext),{data:r})}if(null==o?void 0:o.device){var a=m(m({},null===(t=i.ext)||void 0===t?void 0:t.device),o.device);i.ext=m(m({},i.ext),{device:a})}return(null===(n=this.device)||void 0===n?void 0:n.sua)&&(i.ext=m(m({},i.ext),{sua:this.device.sua})),i},Li);function Li(e,t,n,i,o,r,a,s){void 0===a&&(a=(new Date).getUTCMilliseconds()),void 0===s&&(s=$e()),this.cloneByImpressionId={},this.sessionRandomId=a,this.clientSessionId=s,this.contextMetricsManager=new ci(this),this.charset=e.charset||e.characterSet||"",this.highestAccessibleWindowStruct=qt.getHighestAccessibleWindow(t),this.displayContext=this.getDisplayContext(this.highestAccessibleWindowStruct),this.highestAccessibleUrl=qt.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);var c=Nt(this.highestAccessibleUrl);this.debugMode="1"===c.pbt_debug||!1,this.noLog="1"===c.pbt_nolog||!1,this.remoteLogging=new ni(this.debugMode),this.debugMode&&u(d.Debug),this.location=t.location,this.dising=!1,this.ct0=void 0,this.wpdt0=void 0,this.isAdBlocked=void 0,this.rtaVarNames=[],this.identityHelper=new Oi(t,n,i,o),this.serviceProvider=this.identityHelper.serviceProvider,this.synchronizeCriteoUid(),this.userContextualDataManager=r||new ai(t)}var Fi=function(){this.bids={},this.lineItemRanges=[],this.impIds=[]};function Bi(e){return"conditionalEvent"===e.name}var Wi=(Ni.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var o=i[n];this.events.push(o)}this.evalEvents()},Ni.prototype.evalEvents=function(){for(var e=0;e<this.events.length;){var t=this.events[e];if(Bi(t)&&!t.canEval())e++;else{var n=this.events.splice(e,1);try{n[0].eval(this)}catch(e){f.Error("An exception occurred processing an event: "+e.toString())}}}},Ni.VERSION=ie,Ni);function Ni(e){var t;void 0===e&&(e=null===(t=window.Criteo_standalone_147||window.Criteo)||void 0===t?void 0:t.config),this.standaloneBidder=new Fi,this.events=[],this.context=new Ui(document,window,void 0,void 0,e),f.Debug("Publisher Tag loaded")}function Hi(e){window.criteo_pubtag&&window.criteo_pubtag.context&&"serviceProvider"in window.criteo_pubtag.context||(Yn.LoadPolyfills(),window.criteo_pubtag=new Wi,window.criteo_pubtag_standalone_147=window.criteo_pubtag),window.Criteo=zi(window.Criteo||{},e),window.Criteo_standalone_147=window.Criteo,f.Debug("Publisher Tag initialized with window.criteo_pubtag|criteo_pubtag_standalone_147, window.Criteo|Criteo_standalone_147")}function zi(e,t){if(Gi(e)&&Gi(t))for(var n in t)if(Gi(t[n])){if(!Gi(e[n])&&void 0!==e[n])continue;Gi(e[n])||(e[n]={}),zi(e[n],t[n])}else void 0===e[n]&&(e[n]=t[n]);return e}function Gi(e){return e&&"object"==typeof e&&!Array.isArray(e)}function qi(){var e,t,n,i;Hi(o({ComputeStandaloneDFPTargeting:In,GetBids:Tn,GetBidsForAdUnit:An,RenderAd:En,RequestBids:fn,RequestBidsOnGoogleTagSlots:mn,SetDFPKeyValueTargeting:Cn,SetLineItemRanges:bn,SetCeh:Dn,SetCCPAExplicitOptOut:On,SetPublisherExt:Mn,SetUserExt:Un,SetSlotsExt:Ln,SetIdentities:Fn,SetDFPVideoKeyValueTargeting:Bn,Passback:{RequestBids:Hn,RenderAd:zn},events:null!==(t=null===(e=window.Criteo)||void 0===e?void 0:e.events)&&void 0!==t?t:[],passbackEvents:null!==(i=null===(n=window.Criteo)||void 0===n?void 0:n.passbackEvents)&&void 0!==i?i:[]})),window.Criteo.events=c(window.Criteo.events)}qi(),e.DeclareStandalone=qi}({});