PageSourceSearch

https://www.iliad.fr/assets/HomeCarousel-CMVCnetQ.js

js iliad.fr collected 2026-09-24 19:54:46 UTC 7,660 bytes, 2 lines download raw bytes

1import{H as e,U as t,X as n,j as r,n as i,t as a,tt as o,u as s}from"./jsx-runtime-BwYyIHDC.js";import{o as c}from"./react-markdown-DKMawxkv.js";import{O as l,R as u}from"./index-DuwoRVJQ.js";import{n as d}from"./Image-Ca6lt2LT.js";import{t as f}from"./hooks-32AxyvEQ.js";import{i as p,n as m,r as h,t as g}from"./navigation-DqMRHBSl.js";function _({swiper:e,extendParams:t,on:n,emit:r,params:i}){e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let a,o,s=i&&i.autoplay?i.autoplay.delay:3e3,c=i&&i.autoplay?i.autoplay.delay:3e3,l,u=new Date().getTime(),d,f,m,h,g,_;function v(t){!e||e.destroyed||!e.wrapperEl||t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener(`transitionend`,v),!(_||t.detail&&t.detail.bySwiperTouchMove)&&E())}let y=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?d=!0:d&&=(c=l,!1);let t=e.autoplay.paused?l:u+c-new Date().getTime();e.autoplay.timeLeft=t,r(`autoplayTimeLeft`,t,t/s),o=requestAnimationFrame(()=>{y()})},b=()=>{let t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains(`swiper-slide-active`)):e.slides[e.activeIndex],t)return parseInt(t.getAttribute(`data-swiper-autoplay`),10)},x=()=>{let t=e.params.autoplay.delay,n=b();return!Number.isNaN(n)&&n>0&&(t=n),t},S=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(o),y();let n=t;n===void 0&&(n=x(),s=n,c=n),l=n;let i=e.params.speed,d=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(i,!0,!0),r(`autoplay`)):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,i,!0,!0),r(`autoplay`)):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(i,!0,!0),r(`autoplay`)):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,i,!0,!0),r(`autoplay`)),e.params.cssMode&&(u=new Date().getTime(),requestAnimationFrame(()=>{S()})))};return n>0?(clearTimeout(a),a=setTimeout(()=>{d()},n)):requestAnimationFrame(()=>{d()}),n},C=()=>{u=new Date().getTime(),e.autoplay.running=!0,S(),r(`autoplayStart`)},w=()=>{e.autoplay.running=!1,clearTimeout(a),cancelAnimationFrame(o),r(`autoplayStop`)}
1,T=(t,n)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(a),t||(g=!0);let i=()=>{r(`autoplayPause`),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener(`transitionend`,v):E()};if(e.autoplay.paused=!0,n){i();return}l=(l||e.params.autoplay.delay)-(new Date().getTime()-u),!(e.isEnd&&l<0&&!e.params.loop)&&(l<0&&(l=0),i())},E=()=>{e.isEnd&&l<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(u=new Date().getTime(),g?(g=!1,S(l)):S(),e.autoplay.paused=!1,r(`autoplayResume`))},D=()=>{if(e.destroyed||!e.autoplay.running)return;let t=p();t.visibilityState===`hidden`&&(g=!0,T(!0)),t.visibilityState===`visible`&&E()},O=t=>{t.pointerType===`mouse`&&(g=!0,_=!0,!(e.animating||e.autoplay.paused)&&T(!0))},k=t=>{t.pointerType===`mouse`&&(_=!1,e.autoplay.paused&&E())},A=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener(`pointerenter`,O),e.el.addEventListener(`pointerleave`,k))},j=()=>{e.el&&typeof e.el!=`string`&&(e.el.removeEventListener(`pointerenter`,O),e.el.removeEventListener(`pointerleave`,k))},M=()=>{p().addEventListener(`visibilitychange`,D)},N=()=>{p().removeEventListener(`visibilitychange`,D)};n(`init`,()=>{e.params.autoplay.enabled&&(A(),M(),C())}),n(`destroy`,()=>{j(),N(),e.autoplay.running&&w()}),n(`_freeModeStaticRelease`,()=>{(m||g)&&E()}),n(`_freeModeNoMomentumRelease`,()=>{e.params.autoplay.disableOnInteraction?w():T(!0,!0)}),n(`beforeTransitionStart`,(t,n,r)=>{e.destroyed||!e.autoplay.running||(r||!e.params.autoplay.disableOnInteraction?T(!0,!0):w())}),n(`sliderFirstMove`,()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){w();return}f=!0,m=!1,g=!1,h=setTimeout(()=>{g=!0,m=!0,T(!0)},200)}}),n(`touchEnd`,()=>{if(!(e.destroyed||!e.autoplay.running||!f)){if(clearTimeout(h),clearTimeout(a),e.params.autoplay.disableOnInteraction){m=!1,f=!1;return}m&&e.params.cssMode&&E(),m=!1,f=!1}}),n(`slideChange`,()=>{e.destroyed||!e.autoplay.running||e.autoplay.paused&&(l=x(),s=x())}),Object.assign(e.autoplay,{start:C,stop:w,pause:T,resume:E})}var v=o(n()),y=l(),b=e=>{switch(!0){case e>=1&&e<2:return 1;case e>=2&&e<3:return 2;case e>=3&&e<4:return 3;case e>=4&&e<5:return 4;case e>=5&&e<6:return 5;default:return 6}};i();var x=s(e=>r({mainContainer:{position:`relative`,boxShadow:`0.06rem 0.06rem 0.2rem ${c.highlightable}`},mobileStretch:{width:`100vw`,position:`relative`,left:`calc(-50vw + 50%)`},description:{display:`flex`,justifyContent:`center`,flexDirection:`column`,position:`absolute`,bottom:`0%`,height:`50%`,width:`100%`,"& p.light":{color:`${c.white} !important`},"& p.dark":{color:`${c.black} !important`},"& p":{padding:`0 2rem`,margin:`0`}},title:{fontSize:`3rem`,fontWeight:`bold`,[e.breakpoints.down(`xs`)]:{fontSize:`1.8rem`}},text:{fontSize:`1.4rem`,[e.breakpoints.down(`xs`)]:{fontSize:`1rem`}},swiperButton:{position:`absolute`,top:0,width:`10%`,height:`100%`,zIndex:10,cursor:`pointer`,display:`flex`,alignItems:`center`,"&.nav-prev":{left:0,right:`auto`,justifyContent:`flex-start`,paddingLeft:`0.5rem`,"& img":{left:`0.375rem`}},"&.nav-next":{right:0,left:`auto`,justifyContent:`flex-end`,paddingRight:`0.5rem`,"& img":{left:`0.5rem`}}},arrow:{width:`1.875rem`,height:`1.875rem`,position:`relative`,background:c.white,boxShadow:`0.08rem 0.08rem 0.2rem ${c.black}`,opacity:`0.25`,borderRadius:`50%`,"& img":{width:`0.9375rem`,position:`absolute`,top:`0.5rem`}},slide:{cursor:`pointer`,height:`auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},slideWithoutLink:{cursor:`default`},swiperPagination:{display:`flex`,justifyContent:`center`,width:`80%`,margin:`0 10%`,height:`0.5rem`,position:`absolute`,bottom:`3%`,zIndex:2},pagination:{margin:`0 0.25rem`,height:`0.3rem`,background:c.light,borderRadius:`0.1875rem`,zIndex:3},paginationActive:{background:c.primary}}));t();var S=a(),C=({slides:t})=>{let n=x(),{isMobile:r}=f(),[i,a]=(0,v.useState)(0),o=t.size;return(0,S.jsx)(`div`,{className:e(n.mainContainer,{[n.mobileStretch]:r}),children:(0,S.jsxs)(m,{modules:[_,g],spaceBetween:50,slidesPerView:1,onSlideChange:({realIndex:e})=>a(e),loop:!0,autoplay:{delay:4e3,disableOnInteraction:!1},navigation:{nextEl:`.nav-next`,prevEl:`.nav-prev`},children:[t.map((t,i)=>(0,S.jsxs)(h,{className:e(n.slide,{[n.slideWithoutLink]:!t.link}),onClick:()=>t.link&&(0,y.navigate)(t.link),children:[(0,S.jsx)(d,{backgroundUrl:r?t.imageUrl.mobile:t.imageUrl.desktop,backgroundSize:`crop`,height:`26.5rem`,className:e({[n.slideWithoutLink]:!t.link})}),(0,S.jsxs)(`div`,{className:n.description,children:[(0,S.jsx)(`p`,{className:e(n.title,t.theme&&t.theme),children:t.title}),(0,S.jsx)(`p`,{className:e(n.text,t.theme&&t.theme),children:t.text})]})]},`slide-${i}`)),(0,S.jsx)(u,{container:!0,direction:`row`,className:n.swiperPagination,children:[...Array(t.size)].map((t,a)=>(0,S.jsx)(u,{xs:b(r?12/o:o*2/o),item:!0,children:(0,S.jsx)(`div`,{className:e(n.pagination,{[n.paginationActive]:a===i})})},`pagination-${a}`))}),!r&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:e(`nav-prev`,n.swiperButton),children:(0,S.jsx)(`div`,{className:n.arrow,children:(0,S.jsx)(`img`,{src:`/assets/pictos/arrow-left.svg`,alt:`left arrow`})})}),(0,S.jsx)(`div`,{className:e(`nav-next`,n.swiperButton),children:(0,S.jsx)(`div`,{className:n.arrow,children:(0,S.jsx)(`img`,{src:`/assets/pictos/arrow-right.svg`,alt:`right arrow`})})})]})]})})};export{C as default};
2//# sourceMappingURL=HomeCarousel-CMVCnetQ.js.map

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.