1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["www-chunks/index.D7-DqtWG6KzifqeG.js","www-chunks/_commonjsHelpers.gnU0ypJ3WcXM0xgO.js"])))=>i.map(i=>d[i]); 2import{_ as x}from"./preload-helper.BQ-aXi-3CslF71SJ.js";import{g as m,a as R,c as L,s as _}from"./index.DcHEdgR3vBX-lWAT.js";import{i as I}from"./inject.ByW7Ob8GtinfY2nd.js";import{t as z,d as G,b as k,a as B,c as M}from"./index.Bbge9u8LovNiH51l.js";import{f as O,A as q}from"./urls.CkUxZC76s8NHrPNB.js";import{g as P,k as C,B as T,w as N,x as j,y as F,z as A,C as b,D as H,u as U,E as $,c as W,H as V}from"./taboola.CNUKAzy59pWTrVwl.js";import"./show-logs.CpFkXIjNhoePrKiL.js";import{g as Z}from"./get-envelope.C6JwYZ5DJZGU64wi.js";import{i as K,a as J}from"./send-to-gam.BMSrWbEDFDpPDxi9.js";import{g as f,p as Q,K as X}from"./brands.jsaTI9KDqKVSpxI9.js";import{i as Y}from"./date.DxD9tJGNdeRRWaV5.js";import{g as tt}from"./formatDates.CpH7CTmV08HPcDVM.js";import{g as et}from"./getMarketingId.CzEcWn1hGNLGj0Zd.js";import"./device.8A-RpS8VgPVhE1uS.js";import"./secure-sections.DiGYiaWAqcyERGS9.js";import"./index.CkQTRQuGalxTbceH.js";import"./_commonjsHelpers.gnU0ypJ3WcXM0xgO.js";import"./index.C_YJSYVQxjjhG4Tu.js";import"./bowser.lJM5Ha0UZojVVefR.js";import"./package.aiO6ZH6VTDlkGbnW.js";import"./metrics.BdZzTj2pGOgsWHVv.js";import"./logger.BjoEyIxZ-05JAene.js";import"./timing.IdZW4oB_QSjfDcip.js";const ot=({slots:i})=>new Promise(e=>{window.googletag.cmd.push(async()=>{var g,u,h;const s=[],n=f("article:section")||"",o=((g=f("site-name"))==null?void 0:g.toLocaleLowerCase().replaceAll(" ",""))||"",t=f("tipo-pagina"),d=P(),a=((u=i==null?void 0:i.at(-1))==null?void 0:u.getSlotElementId())||"";let r="";t&&(r=t.toLocaleLowerCase()==="contenido"?"secciones":"home");const l=C((h=window.pagedata)==null?void 0:h.iab);if(l&&Object.keys(l).length>0)for(const[c,w]of Object.entries(l))window.googletag.pubads().setTargeting(c,w);let p="api.atresmedia.com";window.location.hostname.includes("antena3tv")&&(p="pre-mcs-public.atresmedia.dev"),p&&o&&r?await fetch(`https://${p}/cmsproperties/v1/find/${o}?key=headerBidding.${r}`).then(c=>{if(!c.ok)throw new Error("Api not found");return c.json()}).then(async c=>{const w=c,v=setTimeout(()=>{e("timeout")},T),E=await N(),D=!window.hasLoadedNextPage;window.raiInitWrapperFn?window.raiInitWrapperFn(i,d,n,w,s,D,E).then(()=>{clearTimeout(v),K(),e("ok")}):e("wrapper not available")}).catch(c=>{console.error(c),a&&window.googletag.display(a),e(c)}):e("ko")})}),it=i=>new Promise(e=>{var s,n,o;if(!j()){e("site disabled for amazon bidding");return}if(window.apstag){const{apstag:t}=window,d=Z();t.init({adServer:"googletag",deals:!0,pubID:F,signals:{ortb2:{site:{cat:((o=(n=(s=window.pagedata)==null?void 0:s.iab)==null?void 0:n.cat)==null?void 0:o.map(a=>`${a}`))||[],cattax:6},...d.rampId&&{user:{buyeruid:d.rampId,ext:{data:{liveramp:{...d.pairId&&{pairId:d.pairId}}}}}}}}}),window.googletag.cmd.push(()=>{const a=[];for(const r of i){const l=[],p=r.getSizes().filter(g=>!(g.width===1&&g.height===1));for(const g of p)g.height&&g.width?l.push([g.width,g.height]):l.push([g.width]);if(l.length>0){const g={sizes:l,slotID:r.getSlotElementId(),slotName:r.getAdUnitPath()};a.push(g)}}t.fetchBids({slots:a,timeout:T},()=>{t.setDisplayBids(),e("ok")})})}});window.slotsIdsRequested=window.slotsIdsRequested||[];const{slotsIdsRequested:y}=window,at=(i,e=!0)=>{window.googletag.cmd.push(()=>{const s=window.googletag.pubads().getSlots().filter(t=>i.some(d=>d===t.getSlotElementId())),n=s.find(t=>t.getSlotElementId().includes("div-gpt-ad-auxiliar")),o=s.filter(t=>!t.getSlotElementId().includes("div-gpt-ad-auxiliar"));if(!e){n&&A([n]),b(o),y.push(...o.map(t=>t.getSlotElementId())),m("Display slots (No HB)",o);return}Promise.allSettled([ot({slots:o}),it(o)]).then(([t,d])=>{var r;let a=o;t.status==="fulfilled"&&t.value&&typeof t.value=="object"&&"newSlotsScroll"in t.value&&((r=t.value.newSlotsScroll)!=null&&r.length)&&(a=t.value.newSlotsScroll),n&&A([n]),b(a),y.push(...a.map(l=>l.getSlotElementId())),m("Display slots",a),m("Auxiliar slot",[n]),m("HB ->",t),m("APS->",d)})})},st=(i,e=!0)=>{const s=[],n=P();for(const o of i)if(o!=null&&o.dataset){const{position:t}=o.dataset,d=H(o.dataset),a=t==="auxiliar";if(d){const r=Math.floor(Math.random()*1e3),l=a?`div-gpt-ad-auxiliar-${r}`:`gpt-${t}-${r}`,p=a?U(n):n;o.setAttribute("id",l),window.googletag.cmd.push(()=>
2{if(!window.googletag.pubads().getSlots().find(u=>u.getSlotElementId()===l)){const u=window.googletag.defineSlot(p,d,l);u&&(u.addService(window.googletag.pubads()).setTargeting("pos",t||"unknown").setTargeting("amp","false"),m("Define slot",t,p,d))}}),s.push(l)}}at(s,e)};window.isGoogleTagConfigSet=!1;const nt=()=>{if(window.isGoogleTagConfigSet){m("Google Tag config already set");return}window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push(()=>{window.googletag.pubads().collapseEmptyDivs(),window.googletag.pubads().disableInitialLoad(),window.googletag.pubads().enableSingleRequest(),window.googletag.enableServices();const i=z(),e=new Date,s=Y?e.getHours():tt(e);i!==void 0&&window.googletag.pubads().setTargeting("tipo_pagina",i),Q&&window.googletag.pubads().setTargeting("render_lazyload",$.toString()),window.googletag.pubads().setTargeting("gambling",(s>=1&&s<5).toString()),X()||window.googletag.pubads().setPublisherProvidedId(et()),J(),G(),window.isGoogleTagConfigSet=!0})},S=(i,e=document,s=[],n=!0)=>
2{if(i){k(e),R({el:e}),L(i,V.GAM);const o=B(),t=[...e.querySelectorAll("[data-position=auxiliar]")];let a=[...[...e.querySelectorAll("[data-mod=ads]")],...s];a.length>0&&M()&&(a=W([...a]));const r=[...t,...o?[o]:[],...a];st(r,n),_(e instanceof Document?e:document)}else m("AdUnit is Empty")},Lt=(i,e,s=[],n=!0)=>{if(i){const o=[I(O,!0)];n&&o.push(I(q,!0)),Promise.all(o).then(()=>{if(nt(),!n){S(i,e,s,!1);return}window.raiInitWrapperFn?S(i,e,s):x(()=>import("./index.D7-DqtWG6KzifqeG.js").then(t=>t.i),__vite__mapDeps([0,1])).then(t=>{window.raiInitWrapperFn=t.default,S(i,e,s)})})}};export{S as initGamSlots,Lt as loadGamDependencies};
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.