PageSourceSearch

https://akt-cciwapi.be/wp-content/themes/storme/dist/assets/main-COLq5Vpl.js?ver=6.8.2

js akt-cciwapi.be collected 2026-10-09 17:10:33 UTC 9,729 bytes, 48 lines download raw bytes

1document.addEventListener("DOMContentLoaded",()=>{class s{constructor(a){if(this.container=document.querySelector(a.class),this.callbacks=a.callbacks||{},this.startingTab=a.startingTab||0,!this.container)return;const t=this.container.querySelector(".toggle");if(!t)return;this.buttons=Array.from(t.querySelectorAll("button")),this.values=this.buttons.map(i=>i.innerText);const o=this.container.dataset.sections;this.sections=o?o.split(",").map(i=>document.querySelectorAll(i)):[],this.init()}init(){setTimeout(()=>{this.renderSwitch(),this.handleInitialChange(),window.addEventListener("resize",()=>this.updateIndicator())},1e3)}renderSwitch(){const a=this.container.querySelector(".toggle");a.querySelector(".indicator")?this.indicator=a.querySelector(".indicator"):(this.indicator=document.createElement("div"),this.indicator.classList.add("indicator"),a.appendChild(this.indicator)),this.buttons.forEach((t,o)=>{t.addEventListener("click",()=>this.handleOnChange(o))}),this.updateIndicator()}handleOnChange(a){this.buttons.forEach((t,o)=>t.classList.toggle("active",o===a)),this.sections.forEach((t,o)=>{t.forEach(i=>{i&&(i.style.display=o===a?"block":"none")})}),this.updateIndicator(),this.callbacks.onChange&&this.callbacks.onChange({selectedIndex:a,selectedValue:this.values[a]})}handleInitialChange(){this.handleOnChange(this.startingTab)}updateIndicator(){const a=this.container.querySelector("button.active");a&&this.indicator&&(this.indicator.style.width=`${a.offsetWidth+3}px`,this.indicator.style.left=`${a.offsetLeft}px`)}}function l({selectedIndex:c,selectedValue:a}){console.log(`Selected team index: ${c}, value: ${a}`)}new s({class:".team-switch",startingTab:0,callbacks:{onChange:l}})});document.addEventListener("DOMContentLoaded",function(){const s=document.getElementById("teamToggle");if(!s)return;const l={ajax_url:s.dataset.ajaxUrl,nonce:s.dataset.nonce,post_type:s.dataset.postType,site_url:s.dataset.siteUrl,has_more:s.dataset.hasMore==="true"},c=s.querySelectorAll(".toggle button"),a=s.querySelector(".posts-container"),t=s.querySelector("form"),o=s.querySelector('input[name="s"]'),i=s.querySelector(".load-more-btn");let d=1,u="",g="",m=!1;function b(e){let n=s.querySelector(".posts-loader");e&&!n?(n=document.createElement("div"),n.className="posts-loader",n.innerHTML=`
2        <div class="flex items-center justify-center py-8">
3          <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-white"></div>
4          <span class="ml-2 text-white">Chargement...</span>
5        </div>
6      `,a.appendChild(n)):!e&&n&&n.remove()}function v(e=1,n="",f="",y=!1){if(console.log("load more"),m)return;m=!0,b(!0);const h=new FormData;h.append("action","filter_posts_list"),h.append("nonce",l.nonce),h.append("post_type",l.post_type),h.append("filter",n),h.append("search",f),h.append("page",e),fetch(l.ajax_url,{method:"POST",body:h}).then(r=>r.json()).then(r=>{if(r.success){const p=a.querySelector(".posts-grid");console.log("success"),y||(p.innerHTML=""),r.data.posts.forEach(x=>{const C=$(x);p.appendChild(C)}),S(p),r.data.has_more?w():L(),d=r.data.current_page}}).catch(r=>{console.error("Erreur AJAX:",r)}).finally(()=>{m=!1,b(!1)})}function $(e){const n=document.createElement("div");n.className="post",n.setAttribute("data-filter",e.terms.join(","));const f=l.post_type;if(f==="accompagnements")n.className="post bg-[#A731DD] rounded-[20px] overflow-hidden",n.innerHTML=`
7        <a href="${e.link}" class="relative inline-block hover:cursor-pointer">
8          <img src="${e.image}" alt="${e.title}" />
9          <div class="relative">
10            <h6 class="px-8 my-6 text-white uppercase">${e.title}</h6>
11            <div class="absolute top-[0.2rem] right-8 opacity-40 w-6 h-auto">
12            <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 23.2">
13                <path style="fill: #fff" d="M2.7,20.7h8l3.6-9-3.6-9.3H2.7l7,9.3-7,9Z"></path>
14            </svg>
15            </div>
16          </div>
17        </a>
18      `;else if(f==="locations-de-salles"){const y=e.localisation||"",h=e.image||"",r=p=>String(p).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");n.innerHTML=`
19          <a href="${r(e.link)}" class="flex justify-end w-full relative md:pl-[25%] hover:cursor-pointer">
20            <div class="absolute md:top-0 bottom-0 left-0 w-full h-[55%] md:h-auto p-6 md:w-3/4 md:p-12 bg-opacity-70 md:bg-opacity-90 bg-[#a730dc] infoCard">
21              ${y?`<h6 class="pr-20 mt-0 mb-0 text-sm text-white uppercase">${r(y)}</h6>`:""}
22              <h5 class="pr-20 text-white">${r(e.title||"")}</h5>
23              ${e.excerpt?`<p class="hidden pr-10 text-white md:inline-block">${r(e.excerpt)}</p>`:""}
24              <div class="flex items-center justify-center w-10 h-10 mt-0 p-3 border-2 border-white rounded-full fleche-infoCard">
25                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 23.2">
26                  <path style="fill: #fff" d="M2.7,20.7h8l3.6-9-3.6-9.3H2.7l7,9.3-7,9Z"></path>
27                </svg>
28              </div>
29            </div>
30            ${h?`<img src="${r(h)}" alt="${r(e.title||"")}" />`:""}
31          </a>
32        `}else e.date=e.date.replace(":","h"),e.date=e.date.replace("h00","h"),n.innerHTML=`
33        <a href="${e.link}" class="flex justify-end w-full relative md:pl-[25%] hover:cursor-pointer">
34          <div class="absolute md:top-0 bottom-0 left-0 w-full h-[55%] md:h-auto p-6 md:w-3/4 md:p-12 bg-opacity-70 md:bg-opacity-90 bg-[#a730dc] infoCard">
35            <h6 class="pr-20 mt-0 mb-0 text-sm text-white uppercase">${e.date}
36            </h6>
37            				
38            <h5 class="pr-20 text-white">${e.title}</h5>
39            ${e.excerpt?`<p class="hidden pr-10 text-white md:inline-block">${e.excerpt}</p>`:""}
40            <div class="flex items-center justify-center w-10 h-10 p-3 mt-0 border-2 border-white rounded-full fleche-infoCard">
41                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 23.2">
42                    <path style="fill: #fff" d="M2.7,20.7h8l3.6-9-3.6-9.3H2.7l7,9.3-7,9Z"></path>
43                </svg>
44            </div>
45          </div>
46          <img src="${e.image}" alt="${e.title}" />
47        </a>
48      `;return n}function S(e){l.post_type==="accompagnements"?e.className="relative z-10 grid grid-cols-1 gap-5 md:gap-10 md:grid-cols-3 posts-grid":e.className="relative z-10 grid grid-cols-1 gap-5 md:gap-10 md:grid-cols-2 posts-grid"}function w(){i&&(i.style.display="block")}function L(){i&&(i.style.display="none")}
48function E(){i&&(l.has_more?w():L())}E(),c.forEach(e=>{e.addEventListener("click",function(){u=this.getAttribute("data-filter")||"",d=1,g="",c.forEach(f=>f.classList.remove("active")),this.classList.add("active"),o&&(o.value=""),v(1,u,"",!1)})}),t&&t.addEventListener("submit",function(e){e.preventDefault(),g=o.value.trim(),d=1,u="",c.forEach(n=>n.classList.remove("active")),c[0].classList.add("active"),v(1,"",g,!1)}),i&&!i.dataset.listenerAttached&&(i.addEventListener("click",function(){m||(console.log("click bottom"),v(d+1,u,g,!0))}),i.dataset.listenerAttached="1")});document.addEventListener("DOMContentLoaded",function(){const s=document.querySelectorAll(".team-switch .plnt-toggle-switch button[data-filter]");s.length>0&&s.forEach(t=>{t.addEventListener("click",function(){const o=this.getAttribute("data-filter");console.log("Filtre sélectionné:",o),s.forEach(i=>i.classList.remove("active")),this.classList.add("active"),l(o)})});function l(t){const o=document.querySelectorAll(".team-1 .member-item");console.log("Nombre de membres trouvés:",o.length),o.forEach((i,d)=>{const u=i.getAttribute("data-categories");console.log(`Membre ${d+1}: categories = "${u}"`),t===""?(i.style.display="block",console.log(`Membre ${d+1}: affiché (tous)`)):t==="sans-categorie"?!u||u.trim()===""?(i.style.display="block",console.log(`Membre ${d+1}: affiché (sans catégorie)`)):(i.style.display="none",console.log(`Membre ${d+1}: masqué (a des catégories)`)):!u||u.trim()===""?(i.style.display="none",console.log(`Membre ${d+1}: masqué (pas de catégories pour le filtre ${t})`)):u.split(",").map(m=>m.trim()).includes(t)?(i.style.display="block",console.log(`Membre ${d+1}: affiché (correspond au filtre ${t})`)):(i.style.display="none",console.log(`Membre ${d+1}: masqué (ne correspond pas au filtre ${t})`))}),c()}function c(){const t=document.querySelector(".team-1 .members-grid");t&&(t.style.display="none",t.offsetHeight,t.style.display="grid")}const a=document.getElementById("teamToggle");if(a){const t=a.getAttribute("data-items"),o=a.getAttribute("data-sections");t&&o&&(t.split(","),o.split(","))}});document.addEventListener("DOMContentLoaded",function(){window.onload=()=>{const s=document.querySelector(".js-toggle-nav"),l=document.querySelector("body"),c=document.getElementById("main-menu");s.onclick=()=>{const t=s.getAttribute("aria-pressed");s.setAttribute("aria-pressed",t=="false"?"true":"false"),l.classList.toggle("menu-mobile-opened"),c.classList.toggle("menu-mobile-opened")};const a=document.querySelector(".js-close-nav");a&&(a.onclick=()=>{s.setAttribute("aria-pressed","false"),l.classList.toggle("menu-mobile-opened"),c.classList.toggle("menu-mobile-opened")})}});jQuery(document).on("click",'a[href^="#"]',function(s){s.preventDefault();var l=jQuery(jQuery(this).attr("href"));l.length&&jQuery("html, body").animate({scrollTop:l.offset().top},500)});jQuery(document).ready(function(){var s=jQuery(document.body),l=jQuery("svg.vbp-header-menu-button__svg");jQuery("line"),l.click(function(){if(jQuery(document.body).hasClass("menu-open")){s.removeClass("menu-open");return}s.addClass("menu-open")})});

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.