"use strict";(self.webpackChunk_bike24_spock=self.webpackChunk_bike24_spock||[]).push([[7328],{47328:(n,t,e)=>{e.d(t,{A:()=>z});var r=e(96540);function o(n){return"number"==typeof n}function i(n){return"string"==typeof n}function u(n){return"[object Object]"===Object.prototype.toString.call(n)}function c(n){return u(n)||function(n){return Array.isArray(n)}(n)}function a(n){return Math.abs(n)}function s(n){return n?n/a(n):0}function f(n,t){return a(n-t)}function d(n){return v(n).map(Number)}function l(n){return n[p(n)]}function p(n){return Math.max(0,n.length-1)}function v(n){return Object.keys(n)}function m(n,t){return[n,t].reduce((function(n,t){return v(t).forEach((function(e){var r=n[e],o=t[e],i=u(r)&&u(o);n[e]=i?m(r,o):o})),n}),{})}function g(n,t){var e=v(n),r=v(t);return e.length===r.length&&e.every((function(e){var r=n[e],o=t[e];return"function"==typeof r?"".concat(r)==="".concat(o):c(r)&&c(o)?g(r,o):r===o}))}function h(n,t){var e=a(n-t);function r(t){return tt}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function x(n,t,e){var r=h(0,n),o=r.min,i=r.constrain,u=n+1,c=s(t);function s(n){return e?a((u+n)%u):i(n)}function f(){return c}function d(n){return c=s(n),l}var l={add:function(n){return d(f()+n)},clone:function(){return x(n,f(),e)},get:f,set:d,min:o,max:n};return l}function y(){var n=[],t={add:function(e,r,o,i){return void 0===i&&(i={passive:!0}),e.addEventListener(r,o,i),n.push((function(){return e.removeEventListener(r,o,i)})),t},removeAll:function(){return n=n.filter((function(n){return n()})),t}};return t}function S(n){var t=n;function e(n){return t/=n,i}function r(n){return o(n)?n:n.get()}var i={add:function(n){return t+=r(n),i},divide:e,get:function(){return t},multiply:function(n){return t*=n,i},normalize:function(){return 0!==t&&e(t),i},set:function(n){return t=r(n),i},subtract:function(n){return t-=r(n),i}};return i}function b(n,t,e,r,o){var i=o.measure(10),u=o.measure(50),c=!1;return{constrain:function(o){if(!c&&n.reachedAny(e.get())&&n.reachedAny(t.get())){var s=n.reachedMin(t.get())?"min":"max",f=a(n[s]-t.get()),d=e.get()-t.get(),l=Math.min(f/u,.85);e.subtract(d*l),!o&&a(d)0?n.concat([e]):n}),[])}function g(e,o){var i="start"===o,s=i?-r:r,f=u.findSlideBounds([s]);return e.map((function(e){var o=i?0:-r,u=i?r:0,s=f.filter((function(n){return n.index===e}))[0][i?"end":"start"],d=S(-1),l=S(-1),p=k(n,t,a[e]);return{index:e,location:l,translate:p,target:function(){return d.set(c.get()>s?o:u)}}}))}return{canLoop:function(){return p.every((function(n){var t=n.index;return v(f.filter((function(n){return n!==t})),e)<=.1}))},clear:function(){p.forEach((function(n){return n.translate.clear()}))},loop:function(){p.forEach((function(n){var t=n.target,e=n.translate,r=n.location,o=t();o.get()!==r.get()&&(0===o.get()?e.clear():e.to(o),r.set(o))}))},loopPoints:p}}function O(n,t,e,r,i){var u=r.align,c=r.axis,v=r.direction,m=r.startIndex,g=r.inViewThreshold,O=r.loop,P=r.speed,T=r.dragFree,B=r.slidesToScroll,I=r.skipSnaps,z=r.containScroll,C=t.getBoundingClientRect(),D=e.map((function(n){return n.getBoundingClientRect()})),L=function(n){var t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(v),N=function(n,t){var e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){var t=n.width,r=n.height;return"x"===e?t:r}}}(c,v),R=N.measureSize(C),H=function(n){return{measure:function(t){return n*(t/100)}}}(R),q=function(n,t){var e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r){return o(n)?t*Number(n):e[n](r)}}}(u,R),V=!O&&""!==z,j=function(n,t,e,r,o){var i=n.measureSize,u=n.startEdge,c=n.endEdge,s=e[0]&&o,f=function(){if(!s)return 0;var n=e[0];return a(t[u]-n[u])}(),d=function(){if(!s)return 0;var n=window.getComputedStyle(l(r));return parseFloat(n.getPropertyValue("margin-".concat(c)))}(),v=e.map(i),m=e.map((function(n,t,e){var r=!t,o=t===p(e);return r?v[t]+f:o?v[t]+d:e[t+1][u]-n[u]})).map(a);return{slideSizes:v,slideSizesWithGaps:m}}(N,C,D,e,O||""!==z),F=j.slideSizes,U=j.slideSizesWithGaps,_=function(n,t,e){var r=o(e);return{groupSlides:function(o){return r?function(n,t){return d(n).filter((function(n){return n%t==0})).map((function(e){return n.slice(e,e+t)}))}(o,e):function(e){return d(e).reduce((function(e,r){var o=t.slice(l(e),r+1).reduce((function(n,t){return n+t}),0);return!r||o>n?e.concat(r):e}),[]).map((function(n,t,r){return e.slice(n,r[t+1])}))}(o)}}}(R,U,B),G=function(n,t,e,r,o,i,u){var c,s=n.startEdge,f=n.endEdge,d=i.groupSlides,v=d(r).map((function(n){return l(n)[f]-n[0][s]})).map(a).map(t.measure),m=r.map((function(n){return e[s]-n[s]})).map((function(n){return-a(n)})),g=(c=l(m)-l(o),d(m).map((function(n){return n[0]})).map((function(n,t,e){var r=!t,o=t===p(e);return u&&r?0:u&&o?c:n+v[t]})));return{snaps:m,snapsAligned:g}}(N,q,C,D,U,_,V),J=G.snaps,W=G.snapsAligned,X=-l(J)+l(U),Y=function(n,t,e,r){var o=h(-t+n,e[0]),i=e.map(o.constrain);return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;var e,u,c=(e=i[0],u=l(i),h(i.lastIndexOf(e),i.indexOf(u)+1)),a=c.min,s=c.max;return i.slice(a,s)}()}}(R,X,W,z).snapsContained,K=V?Y:W,Q=function(n,t,e){var r,o;return{limit:(r=t[0],o=l(t),h(e?r-n:o,r))}}(X,K,O).limit,Z=x(p(K),m,O),$=Z.clone(),nn=d(e),tn=function(n){var t=0;function e(n,e){return function(){n===!!t&&e()}}function r(){t=window.requestAnimationFrame(n)}return{proceed:e(!0,r),start:e(!1,r),stop:e(!0,(function(){window.cancelAnimationFrame(t),t=0}))}}((function(){O||dn.scrollBounds.constrain(dn.dragHandler.pointerDown()),dn.scrollBody.seek(on).update();var n=dn.scrollBody.settle(on);n&&!dn.dragHandler.pointerDown()&&(dn.animation.stop(),i.emit("settle")),n||i.emit("scroll"),O&&(dn.scrollLooper.loop(dn.scrollBody.direction()),dn.slideLooper.loop()),dn.translate.to(rn),dn.animation.proceed()})),en=K[Z.get()],rn=S(en),on=S(en),un=function(n,t,e){var r,o=(r=Math.pow(10,2),function(n){return Math.round(n*r)/r}),i=S(0),u=S(0),c=S(0),a=0,f=t,d=e;function l(n){return f=n,v}function p(n){return d=n,v}var v={direction:function(){return a},seek:function(t){c.set(t).subtract(n);var e,r=0+(c.get()-0)/100*(f-0);return a=s(c.get()),c.normalize().multiply(r).subtract(i),(e=c).divide(d),u.add(e),v},settle:function(t){var e=t.get()-n.get(),r=!o(e);return r&&n.set(t),r},update:function(){i.add(u),n.add(i),u.multiply(0)},useBaseMass:function(){return p(e)},useBaseSpeed:function(){return l(t)},useMass:p,useSpeed:l};return v}(rn,P,1),cn=A(O,K,X,Q,on),an=function(n,t,e,r,o,i){function u(r){var u=r.distance,c=r.index!==t.get();u&&(n.start(),o.add(u)),c&&(e.set(t.get()),t.set(r.index),i.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){var o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(tn,Z,$,cn,on,i),sn=function(n,t,e,r,o,i,u){var c=o.removeOffset,a=o.constrain,s=i?[0,t,-t]:[0],f=d(s,u);function d(t,o){var i=t||s,u=function(n){var t=n||0;return e.map((function(n){return h(.5,n-.5).constrain(n*t)}))}(o);return i.reduce((function(t,o){var i=r.map((function(t,r){return{start:t-e[r]+u[r]+o,end:t+n-u[r]+o,index:r}}));return t.concat(i)}),[])}return{check:function(n,t){var e=i?c(n):a(n);return(t||f).reduce((function(n,t){var r=t.index,o=t.start,i=t.end;return-1===n.indexOf(r)&&oe?n.concat([r]):n}),[])},findSlideBounds:d}}(R,X,F,J,Q,O,g),fn=function(n,t,e,r,o,i,u,c,d,l,p,v,m,g,h,x){var b=n.cross,w=["INPUT","SELECT","TEXTAREA"],E={passive:!1},A=S(0),k=y(),M=y(),O=m.measure(20),P={mouse:300,touch:400},T={mouse:500,touch:600},B=h?5:16,I=1,z=0,C=0,D=!1,L=!1,N=!1,R=!1;function H(n){if(!((R=!o.isTouchEvent(n))&&0!==n.button||(t=n.target,u=t.nodeName||"",w.indexOf(u)>-1))){var t,u,c=f(r.get(),i.get())>=2,a=R||!c;D=!0,o.pointerDown(n),A.set(r),r.set(i),d.useBaseMass().useSpeed(80),function(){var n=R?document:e;M.add(n,"touchmove",q,E).add(n,"touchend",V).add(n,"mousemove",q,E).add(n,"mouseup",V)}(),z=o.readPoint(n),C=o.readPoint(n,b),v.emit("pointerDown"),a&&(N=!1)}}function q(n){if(!L&&!R){if(!n.cancelable)return V(n);var e=o.readPoint(n),i=o.readPoint(n,b),c=f(e,z),a=f(i,C);if(!(L=c>a)&&!N)return V(n)}var s=o.pointerMove(n);!N&&s&&(N=!0),u.start(),r.add(t.apply(s)),n.preventDefault()}function V(n){var e=l.byDistance(0,!1).index!==p.get(),i=o.pointerUp(n)*(h?T:P)[R?"mouse":"touch"],u=function(n,t){var e=p.clone().add(-1*s(n)),r=e.get()===p.min||e.get()===p.max,o=l.byDistance(n,!h).distance;return h||a(n)=.5,S=e&&m>.75,b=a(i)170;return e=n,u&&(t=n),r},pointerUp:function(n){if(!t||!e)return 0;var r=i(e)-i(t),u=o(n)-o(t),c=o(n)-o(e)>170,s=r/u;return u&&!c&&a(s)>.1?s:0},readPoint:i}}(N),rn,tn,an,un,cn,Z,i,H,O,T,I),dn={containerRect:C,slideRects:D,animation:tn,axis:N,direction:L,dragHandler:fn,eventStore:y(),percentOfView:H,index:Z,indexPrevious:$,limit:Q,location:rn,options:r,scrollBody:un,scrollBounds:b(Q,rn,on,un,H),scrollLooper:w(X,Q,rn,[rn,on]),scrollProgress:E(Q),scrollSnaps:K,scrollTarget:cn,scrollTo:an,slideLooper:M(N,L,R,X,U,K,sn,rn,e),slidesToScroll:_,slidesInView:sn,slideIndexes:nn,target:on,translate:k(N,L,t)};return dn}var P={align:"center",axis:"x",container:null,slides:null,containScroll:"",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,draggable:!0,inViewThreshold:0,loop:!1,skipSnaps:!1,speed:10,startIndex:0,active:!0};function T(){function n(n,t){return m(n,t||{})}return{merge:n,areEqual:function(n,t){return JSON.stringify(v(n.breakpoints||{}))===JSON.stringify(v(t.breakpoints||{}))&&g(n,t)},atMedia:function(t){var e=t.breakpoints||{},r=v(e).filter((function(n){return window.matchMedia(n).matches})).map((function(n){return e[n]})).reduce((function(t,e){return n(t,e)}),{});return n(t,r)}}}function B(n,t,e){var r,o,u,c,a=y(),s=T(),f=function(){var n=T(),t=n.atMedia,e=n.areEqual,r=[],o=[];function i(n){var r=t(n.options);return function(){return!e(r,t(n.options))}}var u={init:function(n,e){return o=n.map(i),(r=n.filter((function(n){return t(n.options).active}))).forEach((function(n){return n.init(e)})),n.reduce((function(n,t){var e;return Object.assign(n,((e={})[t.name]=t,e))}),{})},destroy:function(){r=r.filter((function(n){return n.destroy()}))},haveChanged:function(){return o.some((function(n){return n()}))}};return u}(),d=function(){var n={};function t(t){return n[t]||[]}var e={emit:function(n){return t(n).forEach((function(t){return t(n)})),e},off:function(r,o){return n[r]=t(r).filter((function(n){return n!==o})),e},on:function(r,o){return n[r]=t(r).concat([o]),e}};return e}(),l=d.on,p=d.off,v=w,m=!1,g=s.merge(P,B.globalOptions),h=s.merge(g),x=[],S=0;function b(t,e){if(!m){if(g=s.merge(g,t),h=s.atMedia(g),function(){var t=h.container,e=h.slides,r=i(t)?n.querySelector(t):t;u=r||n.children[0];var o=i(e)?u.querySelectorAll(e):e;c=[].slice.call(o||u.children)}(),r=O(n,u,c,h,d),S=r.axis.measureSize(n.getBoundingClientRect()),!h.active)return E();if(r.translate.to(r.location),x=e||x,o=f.init(x,I),h.loop){if(!r.slideLooper.canLoop())return E(),b({loop:!1},e),void(g=s.merge(g,{loop:!0}));r.slideLooper.loop()}h.draggable&&u.offsetParent&&c.length&&r.dragHandler.addActivationEvents()}}function w(n,t){var e=M();E(),b(s.merge({startIndex:e},n),t),d.emit("reInit")}function E(){r.dragHandler.removeAllEvents(),r.animation.stop(),r.eventStore.removeAll(),r.translate.clear(),r.slideLooper.clear(),f.destroy()}function A(n){var t=r[n?"target":"location"].get(),e=h.loop?"removeOffset":"constrain";return r.slidesInView.check(r.limit[e](t))}function k(n,t,e){h.active&&!m&&(r.scrollBody.useBaseMass().useSpeed(t?100:h.speed),r.scrollTo.index(n,e||0))}function M(){return r.index.get()}var I={canScrollNext:function(){return r.index.clone().add(1).get()!==M()},canScrollPrev:function(){return r.index.clone().add(-1).get()!==M()},clickAllowed:function(){return r.dragHandler.clickAllowed()},containerNode:function(){return u},internalEngine:function(){return r},destroy:function(){m||(m=!0,a.removeAll(),E(),d.emit("destroy"))},off:p,on:l,plugins:function(){return o},previousScrollSnap:function(){return r.indexPrevious.get()},reInit:v,rootNode:function(){return n},scrollNext:function(n){k(r.index.clone().add(1).get(),!0===n,-1)},scrollPrev:function(n){k(r.index.clone().add(-1).get(),!0===n,1)},scrollProgress:function(){return r.scrollProgress.get(r.location.get())},scrollSnapList:function(){return r.scrollSnaps.map(r.scrollProgress.get)},scrollTo:k,selectedScrollSnap:M,slideNodes:function(){return c},slidesInView:A,slidesNotInView:function(n){var t=A(n);return r.slideIndexes.filter((function(n){return-1===t.indexOf(n)}))}};return b(t,e),a.add(window,"resize",(function(){var t=s.atMedia(g),e=!s.areEqual(t,h),o=r.axis.measureSize(n.getBoundingClientRect()),i=S!==o,u=f.haveChanged();(i||e||u)&&w(),d.emit("resize")})),setTimeout((function(){return d.emit("init")}),0),I}function I(n){return n.concat().sort((function(n,t){return n.name>t.name?1:-1})).map((function(n){return n.options}))}function z(n,t){void 0===n&&(n={}),void 0===t&&(t=[]);var e=(0,r.useRef)(B.optionsHandler()),o=(0,r.useRef)(n),i=(0,r.useRef)(t),u=(0,r.useState)(),c=u[0],a=u[1],s=(0,r.useState)(),f=s[0],d=s[1],l=(0,r.useCallback)((function(){c&&c.reInit(o.current,i.current)}),[c]);return(0,r.useEffect)((function(){if("undefined"!=typeof window&&window.document&&window.document.createElement&&f){B.globalOptions=z.globalOptions;var n=B(f,o.current,i.current);return a(n),function(){return n.destroy()}}a(void 0)}),[f,a]),(0,r.useEffect)((function(){e.current.areEqual(o.current,n)||(o.current=n,l())}),[n,l]),(0,r.useEffect)((function(){(function(n,t){if(n.length!==t.length)return!1;var e=B.optionsHandler().areEqual,r=I(n),o=I(t);return r.every((function(n,t){var r=o[t];return e(n,r)}))})(i.current,t)||(i.current=t,l())}),[t,l]),[d,c]}B.globalOptions=void 0,B.optionsHandler=T,z.globalOptions=void 0}}]);