PageSourceSearch

https://www.dacia.sk/client/dacia-image-slider-4bf96a6f72e679b5.js

js dacia.sk collected 2026-09-25 06:17:33 UTC 5,976 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunkOne=self.rspackChunkOne||[]).push([[35829],{16344(e,t,r){r.r(t);var n=r(91987),i=r(71763),s=r(97500),l=r.n(s),o=r(16383),a=r(61124),c=r(93196),d=r(32464),u=r(22500);let h=({images:e})=>{let t=(0,i.useCallback)(t=>(0,u.iG)({totalItems:e.length,start:"center",end:"center"})(t),[e.length]),{ref:r,value:s}=(0,u.Ay)({transfo:t,defaultValue:0});return(0,n.jsx)("div",{ref:r,style:{height:`${100*e.length}vh`},children:(0,n.jsx)("ul",{className:l()("ImageSlider__slider",{"is-editMode":c.Q}),children:e.map(({src:e,alt:t},r)=>(0,n.jsx)("li",{className:l()("ImageSlider__slide",{"is-active":s===r}),id:`slide-${r}`,children:(0,n.jsx)("div",{className:l()("ImageSlider__image",{"is-editMode":!c.Q}),children:(0,n.jsx)(o._,{objectFit:"contain",width:"100%",height:"100%",src:e,alt:t,sizes:"100vw"})})},`slide-${r}`))})})};r.d(t,{},{default:({image:e,editContext:t})=>{let r=(0,i.useMemo)(()=>(0,d.Hj)(e),[e]);return(0,n.jsxs)(a.G,{isFullWidth:!0,padding:"padding-block",children:[r.length>1&&!(0,c.Q)(t)&&(0,n.jsx)(h,{images:r,isEditMode:(0,c.Q)(t)}),(1===r.length||(0,c.Q)(t))&&(0,n.jsx)("div",{className:"ImageSlider__single",children:(0,n.jsx)("div",{className:l()("ImageSlider__image",{"is-editMode":!(0,c.Q)(t)}),children:(0,n.jsx)(o._,{objectFit:"cover",width:"100%",height:"100%",src:r[0].src,alt:r[0]?.alt})})}),(0,n.jsx)(c.Cq,{editContext:t})]})}})},44496(e,t,r){var n=r(71763);let i="(prefers-reduced-motion: no-preference)";r.d(t,{},{A:()=>{let[e,t]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=window.matchMedia(i);t(!window.matchMedia(i)?.matches);let r=e=>{t(!e.matches)};return e?.addEventListener?.("change",r),()=>{e?.removeEventListener?.("change",r)}},[]),e}})},22500(e,t,r){var n=r(71763),i=r(20496),s=r(5839),l=r(3252),o=r(44496),a=r(20409);let c=({innerHeight:e,start:t,end:r,rect:n})=>{let i=e;"center"===t?i=e/2:"top"===t&&(i=0);let s=0;return"center"===r?s=e/2:"top"===r&&(s=e),{elapsed:Math.round(i-n.top),total:Math.round(n.bottom-n.top-(e-i)+s)||1}};r.d(t,{},{Ay:({transfo:e,defaultValue:t=-1,activateOnMobile:r=!0,activateOnPreferedReducedMotion:c=!0,activate:d=!0,ignoreVisibility:u=!1})=>{let[h,g]=(0,n.useState)(t),f=(0,i.d4)(({app:e})=>e.threshold||s.qN),p=(0,o.A)(),v=(0,n.useRef)(!1),m=(0,n.useRef)(null),{ref:x,isVisible:b}=(0,a.A)({role:"technical",stayVisible:!1}),w=u||b,y=(r||f!==s.qN)&&(c||!p)&&d,M=(0,n.useCallback)(e=>{m.current=e,x(e)},[x]),j=(0,n.useCallback)(()=>{y&&g(m.current?e({rect:m.current.getBoundingClientRect(),innerHeight:window.innerHeight,defaultValue:t}):t)},[e,g,m,t,y]);return(0,n.useEffect)(()=>(w&&!v.current&&(l.f.addListener(j),j(),v.current=!0),()=>{v.current&&(l.f.removeListener(j),v.current=!1)}),[j,w,y]),{ref:M,value:w&&y?h:t,isVisible:w,isActive:y}},N5:({start:e="bottom",end:t="bottom",unit:r="percent",floatPrecision:n=0,debug:i=!1})=>({rect:s,innerHeight:l,defaultValue:o})=>{let{elapsed:a,total:d}=c({innerHeight:l,start:e,end:t,rect:s});if(a<0)return o;if("px"===r)return i&&console.log(a),a;let u=100*Math.min(a/d,1);if(n>=0){let e=10**(0|n);u=(u*e|0)/e}return i&&console.log(a,d,u),u},iG:({totalItems:e,start:t="bottom",end:r="bottom",debug:n=!1})=>({rect:i,innerHeight:s,defaultValue:l})=>{let{elapsed:o,total:a}=c({innerHeight:s,start:t,end:r,rect:i}),d=o/a;if(d<0)return l;if(d>=1)return e-1;let u=(e-1)*d|0;return n&&console.log(o,a,u),u}})},20409(e,t,r){var n=r(71763),i=r(24948),s=r(5839);r.d(t,{},{A:e=>{let t=(0,n.useMemo)(()=>(e=>{let t="u">typeof window&&s.LO.large&&window.innerWidth>=s.LO.large,{role:r,options:n={},stayVisible:i=!0}=e;return"lazyload"===r?n.rootMargin=`0px -10px ${t?"200px":"30px"} 0px`:"animation"===r?n.rootMargin=`0px -10px ${t?"-140px":"-100px"} 0px`:"technical"===r&&(n.rootMargin="0px -10px 0px 0px"),{...n,triggerOnce:i}})(e),[e]),{ref:r,inView:l=!1,entry:o}=(0,i.Wx)(t);return{ref:r,isVisible:l,entry:o}}})},24948(e,t,r){var n,i,s=r(71763),l=Object.defineProperty,o=new Map,a=new WeakMap,c=0;function d({threshold:e,delay:t,trackVisibility:r,rootMargin:i,scrollMargin:l,root:u,triggerOnce:h,skip:g,initialInView:f,fallbackInView:p,onChange:v}={}){var m;let[x,b]=s.useState(null),w=s.useRef(v),y=s.useRef(f),[M,j]=s.useState({inView:!!f,entry:void 0});w.current=v,s.useEffect(()=>{let s;if(void 0===y.current&&(y.current=f),!g&&x)return s=function(e,t,r={},i=n){if(void 0===window.IntersectionObserver&&void 0!==i){let n=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:n,intersectionRect:n,rootBounds:n}
1),()=>{}}let{id:s,observer:l,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?!(r=e.root)?"0":(a.has(r)||(c+=1,a.set(r,c.toString())),a.get(r)):e[t]}`}).toString(),r=o.get(t);if(!r){let n,i=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var r;let s=t.isIntersecting&&n.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),[...null!=(r=i.get(t.target))?r:[]].forEach(e=>{e(s,t)})})},e);n=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:i},o.set(t,r)}return r}(r),u=d.get(e)||[];return d.has(e)||d.set(e,u),u.push(t),l.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(d.delete(e),l.unobserve(e)),0===d.size&&(l.disconnect(),o.delete(s))}}(x,(e,t)=>{let r=y.current;y.current=e,(void 0!==r||e)&&(j({inView:e,entry:t}),w.current&&w.current(e,t),t.isIntersecting&&h&&s&&(s(),s=void 0))},{root:u,rootMargin:i,scrollMargin:l,threshold:e,trackVisibility:r,delay:t},p),()=>{s&&s()}},[Array.isArray(e)?e.toString():e,x,u,i,l,h,g,r,p,t]);let _=null==(m=M.entry)?void 0:m.target,I=s.useRef(void 0);x||!_||h||g||I.current===_||(I.current=_,j({inView:!!f,entry:void 0}),y.current=f);let S=[b,M.inView,M.entry];return S.ref=S[0],S.inView=S[1],S.entry=S[2],S}s.Component,null!=(null!=(i=s.useInsertionEffect)?i:s.useLayoutEffect)||s.useEffect,r.d(t,{Wx:()=>d})}}]);

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.