"use strict";(self.webpackChunkconcretecms=self.webpackChunkconcretecms||[]).push([[264],{6883:function(e,t,n){function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,s=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw s}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var a={selectors:{menu:void 0,nav:void 0,parents:void 0,classeParent:void 0,classeFleche:void 0,classeBoutonRetour:void 0,bouton:void 0,sousMenu:void 0},options:{breakpoint:void 0}};function s(e,t){a.selectors=e,a.options=t,function(){var e,t=a.selectors,n=t.menu,r=t.parents,s=t.classeParent,c=t.classeFleche,i=t.classeBoutonRetour,l=o(document.querySelectorAll(r));try{for(l.s();!(e=l.n()).done;){var u,d,m=e.value;m.classList.add("sousMenu");var f=document.querySelector(n),v=m.closest("li");v.classList.add(s);var y=v.querySelector("ul"),p=document.createElement("span");p.classList.add(c),v.querySelector("a").append(p);var h=document.createElement("a");h.dataset.type="retour",h.title=null!==(u=f.dataset.texteTitle)&&void 0!==u?u:"Retour",h.textContent=null!==(d=f.dataset.texte)&&void 0!==d?d:"Retour",h.href="#";var S=document.createElement("li");S.classList.add(i),S.append(h),y.prepend(S),y.classList.display="none"}}catch(e){l.e(e)}finally{l.f()}}(),function(){var e,t=document.querySelector(a.selectors.menu),n=document.querySelector(a.selectors.nav),r=document.querySelectorAll(a.selectors.sousMenu),s=document.querySelectorAll(".".concat(a.selectors.classeBoutonRetour)),c=0,i=c-100,l=function(e){window.innerWidth>=a.options.breakpoint||(e.stopPropagation(),e.preventDefault(),"retour"===e.target.dataset.type?(i=c+100,setTimeout((function(){e.target.closest(".sousMenu").style.display="none"}),400)):e.target.closest(".parentLink").querySelector(".sousMenu").style.display="block",window.innerWidth<a.options.breakpoint&&(n.animate([{transform:"translateX(".concat(c,"%)")},{transform:"translateX(".concat(i,"%)")}],{duration:400,iterations:1,fill:"forwards",easing:"cubic-bezier(0.06, 0.29, 0.25, 1)"}),i=(c=i)-100))},u=o(r);try{for(u.s();!(e=u.n()).done;){e.value.addEventListener("click",(function(e){t.scrollTo(0,0),l(e)}))}}catch(e){u.e(e)}finally{u.f()}var d,m=o(s);try{for(m.s();!(d=m.n()).done;){d.value.addEventListener("click",(function(e){t.scrollTo(0,0),l(e)}))}}catch(e){m.e(e)}finally{m.f()}}(),document.querySelector(a.selectors.bouton).addEventListener("click",c),document.addEventListener("keydown",i)}function c(e){var t=document.querySelector(a.selectors.bouton),n=document.querySelector(a.selectors.menu);e.stopPropagation(),t.classList.toggle("active"),n.classList.toggle("active")}function i(e){var t=document.querySelector(a.selectors.bouton),n=document.querySelector(a.selectors.menu);"Escape"===e.key&&t.classList.contains("active")&&(t.classList.toggle("active"),n.classList.toggle("active"),n.classList.remove("show"),document.querySelector("html").classList.remove("noScroll"),document.querySelector("body").classList.remove("noScroll"),document.querySelector(".headerSite-recherche").classList.remove("menuActif"))}function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var d=function(e,t,n,o){new IntersectionObserver(o,{root:null,rootMargin:n,threshold:t/100}).observe(e)},m=function(e,t){var n,o=l(e);try{for(o.s();!(n=o.n()).done;){var r=n.value;r.isIntersecting&&(r.target.classList.add("visible"),r.target.dataset.visible="true",t.unobserve(r.target))}}catch(e){o.e(e)}finally{o.f()}},f=1200;document.addEventListener("DOMContentLoaded",(function(){!function(e,t,n){var o,r=l(document.querySelectorAll(e));try{for(r.s();!(o=r.n()).done;){var a=o.value;d(a,n,t,m)}}catch(e){r.e(e)}finally{r.f()}}("[data-scroll-interaction]","0px",0)}));var v=n(7757),y=n.n(v);function p(e,t,n,o,r,a,s){try{var c=e[a](s),i=c.value}catch(e){return void n(e)}c.done?t(i):Promise.resolve(i).then(o,r)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function s(e){p(a,o,r,s,c,"next",e)}function c(e){p(a,o,r,s,c,"throw",e)}s(void 0)}))}}function S(){return(S=h(y().mark((function e(){var t,n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/menu/".concat(5,"/").concat(CCM_CID));case 2:return t=e.sent,e.next=5,t.json();case 5:return n=e.sent,e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var b=n(7701);document.addEventListener("DOMContentLoaded",(function(){var e,t,n;e=".menuSite",t=200,n=document.querySelector(e),document.addEventListener("scroll",(function(){window.scrollY>=t?null==n||n.classList.add("sticky"):null==n||n.classList.remove("sticky")})),s({menu:".menuSite-interne",nav:".menuSite-interne .navbar-nav",parents:".menuSite-interne > ul li ul",classeParent:"parentLink",classeFleche:"niveauEnfant",classeBoutonRetour:"menuSite-retour",bouton:".menuSite-bouton",sousMenu:".parentLink > a"},{breakpoint:f}),document.querySelector(".menuSite-bouton").addEventListener("click",(function(e){document.querySelector("html").classList.toggle("noScroll"),$(".menuSite-interne").toggleClass("show"),$(".headerSite-recherche").toggleClass("menuActif"),$("body").toggleClass("noScroll")})),$(".menuSite-interne > ul > li > .dropdown-toggle").click((function(){$(".dropdown-menu").removeClass("show"),$(".menuSite-interne > ul > li > .dropdown-toggle").removeClass("active"),$(this).addClass("active"),$(this).siblings(".dropdown-menu").addClass("show")}))}),{once:!0}),document.addEventListener("DOMContentLoaded",(function(){var e=$("footer");(function(){return S.apply(this,arguments)})().then((function(t){e.after(t);var n=new Mmenu("#menuSite-mobile",{navbar:{title:" "},scrollBugFix:{fix:!1},offCanvas:{position:b.F2}},{classNames:{selected:"true"}});document.querySelectorAll(".mm-navbar__title > span").forEach((function(e){e.textContent="Retour"}));var o=n.API,r=document.querySelector(".menuSite-bouton"),a=document.querySelector(".close-menu");r.addEventListener("click",(function(){document.querySelector("#menuSite-mobile").className.indexOf("mm-menu--opened")>0?o.close(n):(o.open(n),window.innerWidth>f&&document.querySelector(".mm-page").removeAttribute("inert"))})),a.addEventListener("click",(function(){document.querySelector(".mm-menu").className.indexOf("mm-menu--opened")>0&&(o.close(n),document.querySelector(".menuSite-bouton").classList.remove("active"),document.querySelector(".menuSite-interne").classList.remove("active"),document.querySelector("body").classList.toggle("noScroll"),document.querySelector("html").classList.toggle("noScroll"))})),window.addEventListener("resize",(function(e){window.innerWidth>f&&document.querySelector(".mm-page").removeAttribute("inert")}))}))}),{once:!0}),document.addEventListener("DOMContentLoaded",(function(){$(".lienRapides-bouton").click((function(){$("html").hasClass("ccm-edit-mode")||($(".lienRapides-panel").addClass("show"),$(".bandeauInterne").addClass("openPanel"),$("#formCategorie").addClass("masquer"),$("#select-categorie").addClass("masquer"))})),$(".lienRapides-panel-close").click((function(){$(".lienRapides-panel").removeClass("show"),$(".bandeauInterne").removeClass("openPanel"),$("#formCategorie").removeClass("masquer"),$("#select-categorie").removeClass("masquer")})),$(document).on("keydown",(function(e){"Escape"===e.key&&$(".lienRapides-panel").hasClass("show")&&($(".lienRapides-panel").removeClass("show"),$(".bandeauInterne").removeClass("openPanel"),$("#formCategorie").removeClass("masquer"),$("#select-categorie").removeClass("masquer"))}))}),{once:!0})}},function(e){e.O(0,[396],(function(){return t=6883,e(e.s=t);var t}));e.O()}]);