PageSourceSearch

https://assets.allocine.fr/js/website/DfpHeaderBidding.0f55b28c93c2eec34406.js

js allocine.fr collected 2026-10-01 08:46:57 UTC 6,446 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkallocine_js=self.webpackChunkallocine_js||[]).push([[9185],{45764:function(e,t,a){a.r(t),a.d(t,{callHeaderBidding:function(){return _},callStandAlonePrebid:function(){return I}});var n=a(2434),i=a(6147),s=a.n(i);Object.defineProperty(d,"name",{value:"default",configurable:!0});const r="//c.amazon-adsystem.com/aax2/apstag.js";let o=!1;function d(e=null,t={}){return o&&"function"==typeof e?(e(),!1):!o&&void s()(r,t,(()=>{o=!0,"function"==typeof e&&e()}))}Object.defineProperty(c,"name",{value:"default",configurable:!0});let p=!1;function c(e,t=null,a={}){return p&&"function"==typeof t?(t(),!1):!p&&void s()(e,a,(()=>{p=!0,"function"==typeof t&&t()}))}var u=a(49501);let l=!1;function g(e,t){let a=null;const i="mobile"===(0,n.Gh)();return e.default?e.default[t]:(i&&e.mobile?a=e.mobile[t]:!i&&e.desktop&&(a=e.desktop[t]),a)}function b(e){switch((0,n.Gh)()){case"tablet":return e.tablet?e.tablet:e.mobile;case"desktop":return e.desktop;default:return e.mobile}}function w(e){const t=e["headerbid-bid-cache"]||!1,a=e["headerbid-timeout"]||1e3,n=e["headerbid-granularity"]||"high";return{PREBID_BID_CACHE:t,PREBID_USE_SIZE:e.prebidUseSize||null,PREBID_ALLOW_AUCTION_WO_CONSENT:e.prebidAllowAuctionWithoutConsent,BID_TIMEOUT:a,GRANULARITY:n,FAILSAFE_TIMEOUT:3e3}}function m(e,t){const a=[];return t.forEach((t=>{const n=e[t];if(!n||!n.headerBidding||!n.headerBidding.prebid)return!1;const i=n.headerBidding.prebid,s={code:t,mediaTypes:{banner:{sizes:b(i.banner.sizes)},...i.video?{video:i.video}:{}},bids:[],...i.targeting?{targeting:window.GPT_TARGETING_OBJ||e.targeting}:{}};i.bidders.forEach((t=>{const a={bidder:t.name,params:t.params?t.params:{}};switch(t.inventory&&(a.inventory={adunit:e["tag-id"]+e["tag-other-levels"],...n.targeting,...e.targeting}),t.ext&&(a.ext={adunit:e["tag-id"]+e["tag-other-levels"],...n.targeting,...e.targeting}),t.rpVisitor&&(a.visitor=function(e){let t={};const a=JSON.parse(window.localStorage.getItem(`nvgpersona${e.navEgg}`));if(a){let e;for(e in a)e&&(t[`nvg_${e}`]=a[e])}if(window._ttprofiles){const e=window._ttprofiles;t.tge=e.getEquipment,t.tgp=e.getProfiles,t.tgu=e.getMicrosegments,t.tgc=e.getSocialClass,t.tga=e.getAge,t.tgg=e.getGender,t.tgs=e.getSubjects,t.tgca=e.getCustomAudience}return Object.keys(t)?t:null}(e)),t.name){case"rubicon":a.params.siteId=g(t,"siteId"),a.params.zoneId=g(t,"zoneId"),a.params.accountId=t.accountId;break;case"openx":a.params.delDomain=t.delDomain,a.params.unit=g(t,"unit");break;case"smartadserver":a.params.domain=t.domain,a.params.siteId=t.siteId,a.params.pageId=t.pageId,a.params.formatId=g(t,"formatId");break;case"teads":a.params.placementId=t.placementId||g(t,"placementId"),a.params.pageId=g(t,"pageId");break;case"ix":a.params.siteId=g(t,"siteId"),a.params.size=g(t,"size");break;case"criteo":a.params.networkId=g(t,"networkId"),a.params.publisherSubId=g(t,"publisherSubId");break;case"triplelift":a.params.inventoryCode=g(t,"inventoryCode");break;case"onemobile":a.params.dcn=g(t,"dcn"),a.params.pos=g(t,"pos");break;case"seedtag":a.params.publisherId=g(t,"publisherId"),a.params.placement=g(t,"placement"),a.params.adUnitId=g(t,"adUnitId");break;case"richaudience":a.params.pid=g(t,"pid"),a.params.supplyType=t.supplyType;break;case"pubmatic":a.params.publisherId=t.publisherId,a.params.adSlot=g(t,"adSlot");break;default:a.params.placementId=g(t,"placementId")}s.bids.push(a)})),a.push(s)})),a}async function f(e){return new Promise((t=>{let a,n;c(e.prebidUrl,(()=>{a=Promise.resolve()})),d((()=>{n=Promise.resolve()})),Promise.all([a,n]).then((()=>{t()}))}))}function h(e){const t=/#pbjs_debug=true/.test(window.location.hash),a={...{useBidCache:e.PREBID_BID_CACHE,priceGranularity:e.GRANULARITY,enableSendAllBids:!0,debug:t,...e.PREBID_USE_SIZE?{improvedigital:{usePrebidSizes:!0}}:{}},consentManagement:{cmpApi:"iab",timeout:500,allowAuctionWithoutConsent:e.PREBID_ALLOW_AUCTION_WO_CONSENT}};return t&&console.log("prebid config : ",a),a}async function I(e,t){c(e.prebidUrl,(()=>{const a=w(e),n=h(a);window.pbjs.que.push((()=>{window.pbjs.setConfig(n),window.pbjs.addAdUnits(m(e,t)),window.pbjs.requestBids({bidsBackHandler:v,timeout:a.BID_TIMEOUT})})),setTimeout((()=>{v()}),a.FAILSAFE_TIMEOUT)}))}function v(){window.pbjs.initAdserverSet||(window.pbjs.initAdserverSet=!0,window.googletag.cmd.push((()=>{window.pbjs.que.push((()=>{window.pbjs.setTargetingForGPTAsync(),window.googletag.pubads().refresh()}))})))}async function _(e,t,a=[],n=()=>{}){try{await async function(e){return new Promise((t=>{if(!window.__tcfapi)return void f(e).then((()=>{t()}));const a=n=>{"useractioncomplete"!==n.eventStatus&&"tcloaded"!==n.eventStatus||(window.__tcfapi("removeEventListener",2,a),f(e).then((()=>{t()})))};window.__tcfapi("addEventListener",2,a)}))}(e)}catch(e){return console.warn("Prebid or Asptag wasn't load (error), header bidding isn't engaged. We trigger the refresh to load ads anyway"),window.googletag.cmd.push((()=>{a.length?window.googletag.pubads().refresh(a):window.googletag.pubads().refresh()})),!1}if(l)return(0,u.O)()||console.warn("header bidding  already running"),!1;l=!0,a.length&&window.pbjs.removeAdUnit();const i=["apstag","prebid"],s=w(e),r={adserverRequestSent:!1};function o(e){!0!==r.adserverRequestSent&&("apstag"===e?r.apstag=!0:"prebid"===e&&(r.prebid=!0),i.map((e=>
1r[e])).filter(Boolean).length===i.length&&d())}function d(){!0!==r.adserverRequestSent&&(r.adserverRequestSent=!0,window.pbjs.adserverRequestSent=!0,r.sendAdserverRequest=!0,window.googletag.cmd.push((()=>{window.apstag.setDisplayBids(),window.pbjs.setTargetingForGPTAsync?.(),a.length?window.googletag.pubads().refresh(a):window.googletag.pubads().refresh()})),n(),l=!1)}i.forEach((e=>{r[e]=!1})),window.apstag&&e.apstag&&!a.length&&window.apstag.init({pubID:e.apstag,adServer:"googletag",bidTimeout:s.BID_TIMEOUT}),await async function(){const a=m(e,t),n=function(e,t){const a=[];return t.forEach((t=>{const n=e[t];if(!n||!n.headerBidding||!n.headerBidding.apstag)return!1;const i=n.headerBidding.apstag,s={slotID:t,sizes:i.sizes,slotName:i.name};a.push(s)})),a}(e,t);window.apstag.fetchBids({slots:n,timeout:s.BID_TIMEOUT},(()=>{o("apstag")}));const i=h(s);window.pbjs.que.push((()=>{window.pbjs.setConfig(i),window.pbjs.addAdUnits(a),window.pbjs.requestBids({bidsBackHandler:()=>{o("prebid")}})}))}(),window.setTimeout((()=>{d()}),s.FAILSAFE_TIMEOUT)}}}]);
2//# sourceMappingURL=DfpHeaderBidding.0f55b28c93c2eec34406.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.