1function w(p){let u="/wp-json/woody/campaigns";u+=globals.is_mobile?"/mobile":"/desktop",fetch(u).then(i=>i.json()).then(i=>{g(i)}).catch(function(i){console.error("Campaigns fetch: "+i.message)});function g(i){p.forEach(function(t){const l=[];if(t.dataset.sponsor!==void 0){let n=h('<div class="woody_campaigns_sponsor">'+t.dataset.sponsor+"</div>");t.append(n)}let d=!1;t.querySelectorAll(".campaign-wrapper").forEach(function(n){let e=_(i,n.dataset.place,n.dataset.tpl);if(e!==void 0&&e.id!==void 0&&e.content!==void 0){t.dataset.campaingIds==null?t.dataset.campaingIds=e.id:t.dataset.campaingIds+=e.id,l.push(e.id);let o=e.analytics&&e.analytics.label?e.analytics.label:"",c=h(e.content),y=c.classList,m;if(n.append(c.firstChild),y.forEach(function(a){n.classList.contains(a)||(n.classList.add(a),m=a.indexOf("ratio_free")>-1)}),v(n,o),d=!0,d&&(m&&document.addEventListener("lazyloaded",()=>{let a=n.closest(".swiper-slide-active");if(a){const f=a.querySelector("img.lazyloaded").getBoundingClientRect().height;a.closest(".swiper-container").style.height=f?`${f}px`:"auto"}}),l.length>1&&[...new Set(l)].length==1)){const r=n.closest(".swiper-container");document.addEventListener("lazyloaded",()=>{r&&r.swiper&&(r.swiper.destroy(),r.closest(".woody-component").querySelector(".swiper-nav").style.display="none")})}}}),t.classList.contains("campaign_hide_section")&&!d&&t.closest("section").remove()})}function _(i,t,l){let d=[],s=[],n;return i!==void 0&&i.length&&(i.forEach(e=>{e.linked_pages!==void 0&&e.linked_pages.includes(window.globals.post_id)?d.push(e):e.linked_urls!==void 0&&e.linked_urls.forEach(o=>{window.location.href.indexOf(o)>=0&&d.push(e)})}),t!==void 0&&l!==void 0&&d.forEach(e=>{e.places!==void 0&&e.places.includes(t)&&e.templates!==void 0&&e.templates[l]!==void 0&&(e.content=e.templates[l],s.push(e))}),s.length&&(s=s.map(e=>({value:e,sort:Math.random()})).sort((e,o)=>e.sort-o.sort).map(({value:e})=>e),n=s.slice(0,1).shift())),n}function h(i){let t=document.createElement("div");return t.innerHTML=i.trim(),t.firstChild}function v(i,t){let l="woody_page_",d=globals.current_lang.toUpperCase()+"|PAGE|"+globals.post_title.trim()+"|"+globals.post_id,s=[],n=i.getElementsByClassName("card-title"),e=i.getElementsByClassName("card-link");t?s.push(t.trim()):n.length&&(n=Object.values(n).shift(),s.push(n.innerText.trim())),e.length&&(e=Object.values(e).shift(),s.push(e.getAttribute("href"))),s=s.join(" - ");let o="Vue sur bloc de publicit\xE9";window.eskalad.pushEvent({event:l+"show_claim",ga4:{name:o,label:s},matomo:{category:d,action:o,name:s}}),i.addEventListener("click",function(){let c="Clic sur bloc de publicit\xE9";window.eskalad.pushEvent({event:l+"click_claim",ga4:{name:c,label:s},matomo:{category:d,action:c,name:s},at:{name:"Bloc de publicit\xE9 - "+s,type:"action"}})})}}export{w as init};
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.