"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[891],{557:function(e,t,r){var s=r(5893);r(7294);var o=r(4428);t.Z=()=>(0,s.jsx)("div",{className:"header-description",children:(0,s.jsx)(o.Z,{id:"header-intro-bottom",className:"header-intro__bottom",section:"rich-text",maxSections:"1",tooltip:"Zone d'\xe9dition : Introduction"})})},2321:function(e,t,r){var s=r(5893);r(7294);var o=r(4428),n=r(4794),a=r(4753),l=r(8921);t.Z=e=>{let{withBreadcrumb:t}=e,{breadcrumb:r}=(0,n.W9)();return(0,s.jsxs)("div",{className:"header-intro__top",children:[t&&(0,s.jsx)(a.Z,{breadcrumb:r,exclusions:l.Ug}),(0,s.jsx)(o.Z,{id:"header-intro-title",className:"header-intro__title",section:t?"title-1-seo,title-2":"title-1-seo,rich-text",maxSections:"2",tooltip:"Zone d'\xe9dition : Texte d'introduction"})]})}},1978:function(e,t,r){var s=r(5893),o=r(7294),n=r(5059),a=r.n(n),l=r(4794),i=r(4428),c=r(4753),u=r(8921);let d=e=>{let{lite:t,breadcrumb:r,title:o,shortTitle:n,page:a}=e;return(0,s.jsxs)("div",{className:"header-title",children:[(0,s.jsx)(c.Z,{breadcrumb:r,exclusions:u.Ug}),(0,s.jsx)("div",{className:"header-title__name",children:(0,s.jsx)("h2",{dangerouslySetInnerHTML:{__html:n||o}})}),!t&&"/page"===a&&(0,s.jsx)(i.Z,{id:"header-title",className:"header-title__content",section:"rich-text",maxSections:"1",tooltip:"Zone d'\xe9dition : Description"})]})};t.Z=(0,o.memo)(e=>{let{compact:t,medium:r,overlay:o,noLogo:n,withTitle:i,lite:c,children:u}=e,{breadcrumb:m,menuPath:f}=(0,l.W9)(),{title:h,shortTitle:v,page:x}=f,p=a()("header",{"header--compact":t,"header--medium":r,"header--with-overlay":o,"header--lite":c});return(0,s.jsxs)("header",{className:p,children:[u,(i||c)&&(0,s.jsx)(d,{breadcrumb:m,title:h,shortTitle:v,page:x}),!n&&(0,s.jsx)("img",{className:"header__logo",src:"/static/images/logos/logo-station.png",alt:"logo Bonneval sur Arc"})]})})},8572:function(e,t,r){var s=r(5893);r(7294);var o=r(4794),n=r(5059),a=r.n(n),l=r(4428),i=r(4168),c=r(3159),u=r(1803),d=r(8260),m=r(8921);let f=(e,t)=>e?"button":t?i.Z:"div";t.Z=e=>{let{tools:t}=e,{lang:r}=(0,o.W9)(),{setPopupContent:n}=(0,d.A)();return(0,s.jsxs)("div",{className:"tools",children:[(0,s.jsx)(l.Z,{id:"tools-title",className:"tools__title",section:"generic-titles",maxSections:"1",tooltip:"Zone d'\xe9dition : Titre des outils",fixed:!0}),(0,s.jsx)("div",{className:"tools__inner",children:t.map(e=>{if(!e)return null;let{name:t,path:o,page:l,subs:d}=e,h="evaluez-mon-niveau"===t,v=!d,x=f(h,v),p=a()("tool",{"tool--direct-link":v,"tool--with-subs":!v}),b=h?{onClick:()=>n({content:(0,s.jsx)(c.Z,{})})}:v?{page:l,href:o}:{},_=m.EQ[t];return(0,s.jsxs)(x,{className:p,...b,children:[(0,s.jsxs)("div",{className:"tool__front",children:[(0,s.jsx)("div",{className:"tool__icon-container",children:_&&(0,s.jsx)(_,{className:"tool__icon"})}),(0,s.jsx)("span",{className:"tool__title",dangerouslySetInnerHTML:{__html:(0,u.yw)(r,t)}})]}),!v&&(0,s.jsxs)("div",{className:"tool__back",children:[(0,s.jsx)("span",{className:"tool__title",dangerouslySetInnerHTML:{__html:(0,u.yw)(r,t)}}),(0,s.jsx)("span",{className:"tool__subs",children:d.map((e,t)=>{let{path:r,page:o,title:n,shortTitle:a}=e;return(0,s.jsx)(i.Z,{className:"tool__sub",href:r,page:o,title:a||n},t)})})]})]},t)})})]})}},8891:function(e,t,r){r.r(t),r.d(t,{default:function(){return w},getProps:function(){return C}});var s=r(5893),o=r(7294),n=r(4794),a=r(4428),l=r(7899),i=r(1978),c=r(2321),u=r(557),d=r(5059),m=r.n(d),f=r(86);let h="img, a, button";var v=o.memo(function(e){let{delay:t=4e3,fade:r=!1,controls:a,dots:l,thumbnails:i,alwaysShowControls:c,allowDragOnDesktop:u,children:d,onChange:v,currentSlide:y}=e,N=o.useRef(),{cmsMode:Z,lang:E,path:S}=(0,n.W9)(),[C,w]=o.useState([]),[A,k]=o.useState(null!=y?y:0),[P,T]=o.useState(),[L,M]=o.useState(0),I="editing"===Z,X=!I&&u,q=C.length,D=A<q-1,W=0!==A,H=o.useCallback(e=>{null==e||e.stopPropagation(),k(b(A+1,q))},[A,q]),O=o.useCallback(e=>{null==e||e.stopPropagation(),k(b(A-1,q))},[A,q]),R=e=>{var t;if(r)return;let{type:s}=e,o="mousedown"===s;if(!X&&o||P||!o&&!(null===(t=e.targetTouches)||void 0===t?void 0:t.length)){let e=N.current.firstElementChild;e.style.transform="translateX(".concat(-(100*A),"%)"),e.style.removeProperty("transition"),M(void 0),T(void 0);return}let{clientX:n,clientY:a}=o?e:e.targetTouches[0];T({startX:n,startY:a})},U=e=>{var t;if(r)return;let{type:s}=e,o="mousemove"===s;if(!P||!X&&o||!o&&!(null===(t=e.targetTouches)||void 0===t?void 0:t.length)){T(void 0);return}let{startX:n}=P,{clientX:a}=o?e:e.targetTouches[0],l=n-a,i=l>0?"-":"+",c=N.current.firstElementChild,u="translateX(calc(".concat(-(100*A),"% ").concat(i," ").concat(Math.abs(l),"px))");Object.assign(c.style,{transform:u,transition:"none"}),M(l)},Y=e=>{var t;if(r)return;let{type:s}=e,o="mouseup"===s;M(void 0);let n=N.current.firstElementChild;if(!P||!X&&o||!o&&!(null===(t=e.changedTouches)||void 0===t?void 0:t.length)){n.style.transform="translateX(".concat(-(100*A),"%)"),n.style.removeProperty("transition"),T(void 0);return}n.style.transform="translateX(".concat(-(100*A),"%)"),n.style.removeProperty("transition");let{startX:a,startY:l}=P,{clientX:i,clientY:c}=o?e:e.changedTouches[0],u=Math.abs(a-i);if(u<80&&u<Math.abs(l-c)){n.style.transform="translateX(".concat(-(100*A),"%)"),n.style.removeProperty("transition"),T(void 0);return}a<i&&A>0&&O(),a>i&&A<q-1&&H(),T(void 0)},B=o.useCallback(()=>Array.from(N.current.querySelectorAll("section[data-class]")).filter(e=>"none"!==window.getComputedStyle(e).display),[]),V=o.useCallback(()=>{w(B())},[B]);o.useEffect(()=>{t||void 0===y||k(y)},[y,t]),o.useEffect(()=>{var e;let t=null===(e=N.current)||void 0===e?void 0:e.querySelector(".cms");if(t)return t.addEventListener("ublo-section-created",V),t.addEventListener("ublo-section-pasted",V),t.addEventListener("ublo-section-removed",V),()=>{t.removeEventListener("ublo-section-removed",V),t.removeEventListener("ublo-section-pasted",V),t.removeEventListener("ublo-section-created",V)}},[V]),o.useEffect(()=>{let e=N.current,t=e.firstElementChild,s=B(),o=Array.from(e.querySelectorAll(h));w(s),I||(s.forEach((e,t)=>{Array.from(e.querySelectorAll("a")).forEach(e=>{e.setAttribute("tabindex",A===t?"0":"-1")})}),o.forEach(_)),!r||I?(s.forEach((e,t)=>{g(e),I||A!==t?e.removeAttribute("data-current"):e.setAttribute("data-current","")}),t.style.transform="translateX(".concat(-(100*A),"%)"),t.style.removeProperty("transition")):(o.forEach(j),s.forEach((e,t)=>{A===t?(g(e),e.setAttribute("data-current","")):(e.removeAttribute("data-current"),Object.assign(e.style,{opacity:0,pointerEvents:"none",touchAction:"none"}))}),r&&t.style.removeProperty("transform"))},[A,I,r,B,E,S]);let z=o.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);o.useEffect(()=>{"function"==typeof v&&v(A)},[A,v]),o.useEffect(()=>{let e=Array.from(N.current.firstElementChild.querySelectorAll(h));L?e.forEach(e=>e.addEventListener("click",z)):e.forEach(e=>setTimeout(()=>e.removeEventListener("click",z),100))},[L,z]),function(e,t,r,s){let n=o.useRef();o.useEffect(()=>{n.current=e},[e]),o.useEffect(()=>{if(!s&&null!==t&&0!==t){let e=setInterval(function(){n.current()},t);return()=>clearInterval(e)}},[r,t,s])}(()=>{I||H()},t,A,L);let F=m()("carousel",{carousel__fade:r&&!I,carousel__editing:I});return(0,s.jsxs)("div",{ref:N,className:F,onMouseDown:R,onTouchStart:R,onMouseMove:U,onTouchMove:U,onMouseUp:Y,onTouchEnd:Y,onMouseLeave:Y,children:[d,(I||a&&W||c)&&(0,s.jsx)("button",{className:"carousel--prev",onClick:O,disabled:c&&!W,"aria-label":"Pr\xe9cedent / Previous",children:(0,s.jsx)(f.ArrowLeft,{className:"carousel--icon"})}),(I||a&&D||c)&&(0,s.jsx)("button",{className:"carousel--next",onClick:H,disabled:c&&!D,"aria-label":"Suivant / Next",children:(0,s.jsx)(f.ArrowRight,{className:"carousel--icon"})}),l&&(0,s.jsx)(x,{count:q,current:A,setCurrent:k,sections:C}),i&&q>1&&(0,s.jsx)(p,{carouselRef:N,count:q,current:A,setCurrent:k,sections:C})]})});function x(e){let{count:t,current:r,setCurrent:o}=e,n=[...Array(t)];return(0,s.jsx)("div",{className:"carousel__dots",children:n.map((e,t)=>{let n=m()("carousel__dot",{"carousel__dot--current":t===r});return(0,s.jsx)("button",{className:n,onClick:e=>{e.stopPropagation(),o(t)},"aria-label":t},t)})})}function p(e){let{carouselRef:t,current:r,setCurrent:n,sections:a}=e,[l,i]=o.useState([]);return(o.useEffect(()=>{t.current&&a.length&&i(Array.from(a).reduce((e,t)=>{let r=t.querySelector("img");return(null==r?void 0:r.src)?[...e,r.src]:e},[]))},[t,a]),l.length)?(0,s.jsx)("div",{className:"carousel__thumbnails",children:l.map((e,t)=>{let o=m()("carousel__thumbnail",{"carousel__thumbnail--current":t===r});return(0,s.jsx)("input",{type:"image",className:o,src:e,onClick:e=>{e.stopPropagation(),n(t)}},t)})}):null}function b(e,t){let r=e%t;return r<0?t<0?r-t:r+t:r}function _(e){e.setAttribute("draggable",!1)}function j(e){e.removeAttribute("draggable")}function g(e){["opacity","pointer-events","touch-action"].forEach(t=>e.style.removeProperty(t))}var y=r(7956),N=r(8572),Z=r(9193),E=r(5747),S=r(1171);let C=async e=>{let{ubloApi:t,site:r,lang:s,breadcrumb:o}=e,n=(0,E.Y)(o),[a,l,i,c,u,d]=await Promise.all([(0,S.ap)(t,r,s),(0,S.$G)(t,r,s),(0,S.Ve)(t,r,s),(0,S.cm)(t,r,s),(0,S.x7)(t,r,s),(0,S.NJ)(t,r,s)]);return{navigation:a,account:l,tools:i,footer:c,cart:u,contact:d,facet:n}};var w=e=>{let{navigation:t,account:r,tools:o,footer:d,cart:m,contact:f}=e,{breadcrumb:h}=(0,n.W9)();return(0,s.jsxs)(l.Z,{pageName:"index",cart:m,children:[(0,s.jsx)(y.Z,{navigation:t,account:r,breadcrumb:h,cart:m,withVillagesMap:!0,withBg:!0}),(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(v,{id:"carousel",section:"banner",tooltip:"Zone d'\xe9dition : Slides de carousel",delay:5e3,controls:!0,alwaysShowControls:!0,dots:!0,allowDragOnDesktop:!0,children:(0,s.jsx)(a.Z,{id:"home-carousel",className:"home-carousel",section:"banner",maxSections:"10",tooltip:"Zone d'\xe9dition : Images"})}),(0,s.jsx)(c.Z,{})]}),(0,s.jsx)(u.Z,{}),(0,s.jsxs)("main",{children:[(0,s.jsx)(a.Z,{id:"category-offers",className:"home-category-offers",section:"generic-titles,category-offers,multiple-offer",maxSections:"4",tooltip:"Zone d'\xe9dition : Pr\xe9sentation des rubriques"}),(0,s.jsx)("div",{className:"carousel-offers",children:(0,s.jsxs)("div",{className:"content-offers",children:[(0,s.jsx)(a.Z,{id:"slide-offers-title",className:"slide-offers-title",maxSections:"1",tooltip:"Zone d'\xe9dition : Titre pour les offres du carousel"}),(0,s.jsx)(v,{delay:0,controls:!0,dots:!0,alwaysShowControls:!0,children:(0,s.jsx)(a.Z,{id:"slide-offers",className:"slide-offers",section:"slide-offer",maxSections:"6",tooltip:"Zone d'\xe9dition : Offres \xe0 mettre en avant"})})]})}),(0,s.jsx)(a.Z,{id:"offers",className:"home-offers",maxSections:"10",tooltip:"Zone d'\xe9dition : Mises en avant vers les produits"}),(0,s.jsx)(N.Z,{tools:o})]}),(0,s.jsx)(Z.Z,{navigation:t,footer:d,contact:f,dark:!0})]})}},4753:function(e,t,r){r.d(t,{Z:function(){return n}});var s=r(5893),o=r(4168);function n(e){let{breadcrumb:t,exclusions:r=[]}=e;return(0,s.jsx)("div",{className:"breadcrumb",children:(0,s.jsx)(a,{rawItem:t,exclusions:r})})}function a(e){let{rawItem:t,exclusions:r}=e;if(!t)return null;let{next:o,name:n,title:i,path:c,page:u}=t,d=void 0===o,m=!d&&r.includes(o.name)?o.next:o,f=d?null:(0,s.jsx)(a,{rawItem:m,exclusions:r});return(0,s.jsx)(l,{name:n,page:u,path:c,itemTitle:i,nextItem:f,isCurrent:d,exclusions:r})}function l(e){var t;let{name:r,page:n,path:a,itemTitle:l,nextItem:i,isCurrent:c,exclusions:u}=e,d=void 0!==n,m=/^((http|https):\/\/)/.test(a),f=c||!d,h=!c&&u.includes(r);m||f||o.Z;let v={dangerouslySetInnerHTML:{__html:l}},x={...v,href:a};return(0,s.jsxs)(s.Fragment,{children:[!h&&(t={title:l,page:n,href:a},m?(0,s.jsx)("a",{className:"breadcrumb__item",...x}):f?(0,s.jsx)("span",{className:"breadcrumb__item",...v}):(0,s.jsx)(o.Z,{className:"breadcrumb__item",...t})),i]})}}}]);