function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isBoolean(e){return"boolean"==typeof e}function isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function mathAbs(e){return Math.abs(e)}function mathSign(e){return Math.sign(e)}function deltaAbs(e,t){return mathAbs(e-t)}function factorAbs(e,t){if(0===e||0===t)return 0;if(mathAbs(e)<=mathAbs(t))return 0;const n=deltaAbs(mathAbs(e),mathAbs(t));return mathAbs(n/e)}function arrayKeys(e){return objectKeys(e).map(Number)}function arrayLast(e){return e[arrayLastIndex(e)]}function arrayLastIndex(e){return Math.max(0,e.length-1)}function arrayIsLastIndex(e,t){return t===arrayLastIndex(e)}function arrayFromNumber(e,t=0){return Array.from(Array(e),((e,n)=>t+n))}function objectKeys(e){return Object.keys(e)}function objectsMergeDeep(e,t){return[e,t].reduce(((e,t)=>(objectKeys(t).forEach((n=>{const r=e[n],i=t[n],o=isObject(r)&&isObject(i);e[n]=o?objectsMergeDeep(r,i):i})),e)),{})}function isMouseEvent(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function Alignment(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}return{measure:function(r,i){return isString(e)?n[e](r):e(t,r,i)}}}function EventStore(){let e=[];const t={add:function(n,r,i,o={passive:!0}){let s;if("addEventListener"in n)n.addEventListener(r,i,o),s=()=>n.removeEventListener(r,i,o);else{const e=n;e.addListener(i),s=()=>e.removeListener(i)}return e.push(s),t},clear:function(){e=e.filter((e=>e()))}};return t}function Animations(e,t,n,r){const i=EventStore(),o=1e3/60;let s=null,a=0,c=0;function l(e){if(!c)return;s||(s=e);const i=e-s;for(s=e,a+=i;a>=o;)n(),a-=o;const u=mathAbs(a/o);r(u),c&&t.requestAnimationFrame(l)}function u(){t.cancelAnimationFrame(c),s=null,a=0,c=0}return{init:function(){i.add(e,"visibilitychange",(()=>{e.hidden&&(s=null,a=0)}))},destroy:function(){u(),i.clear()},start:function(){c||(c=t.requestAnimationFrame(l))},stop:u,update:n,render:r}}function Axis(e,t){const n="rtl"===t,r="y"===e,i=!r&&n?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":n?"right":"left",endEdge:r?"bottom":n?"left":"right",measureSize:function(e){const{height:t,width:n}=e;return r?t:n},direction:function(e){return e*i}}}function Limit(e=0,t=0){const n=mathAbs(e-t);function r(t){return tt}function o(e){return r(e)||i(e)}return{length:n,max:t,min:e,constrain:function(n){return o(n)?r(n)?e:t:n},reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function Counter(e,t,n){const{constrain:r}=Limit(0,e),i=e+1;let o=s(t);function s(e){return n?mathAbs((i+e)%i):r(e)}function a(){return o}function c(){return Counter(e,a(),n)}const l={get:a,set:function(e){return o=s(e),l},add:function(e){return c().set(a()+e)},clone:c};return l}function DragHandler(e,t,n,r,i,o,s,a,c,l,u,d,f,m,p,h,g,y,v){const{cross:b,direction:E}=e,S=["INPUT","SELECT","TEXTAREA"],w={passive:!1},A=EventStore(),x=EventStore(),L=Limit(50,225).constrain(m.measure(20)),O={mouse:300,touch:400},T={mouse:500,touch:600},D=p?43:25;let I=!1,M=0,N=0,z=!1,H=!1,C=!1,P=!1;function V(e){if(!isMouseEvent(e,r)&&e.touches.length>=2)return k(e);const t=o.readPoint(e),n=o.readPoint(e,b),s=deltaAbs(t,M),c=deltaAbs(n,N);if(!H&&!P){if(!e.cancelable)return k(e);if(H=s>c,!H)return k(e)}const u=o.pointerMove(e);s>h&&(C=!0),l.useFriction(.3).useDuration(.75),a.start(),i.add(E(u)),e.preventDefault()}function k(e){const t=u.byDistance(0,!1).index!==d.get(),n=o.pointerUp(e)*(p?T:O)[P?"mouse":"touch"],r=function(e,t){const n=d.add(-1*mathSign(e)),r=u.byDistance(e,!p).distance;return p||mathAbs(e)=2,a&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return S.includes(t)}(e.target))return;z=!0,o.pointerDown(e),l.useFriction(0).useDuration(0),i.set(s),function(){const e=P?n:t;x.add(e,"touchmove",V,w).add(e,"touchend",k).add(e,"mousemove",V,w).add(e,"mouseup",k)}(),M=o.readPoint(e),N=o.readPoint(e,b),f.emit("pointerDown")}(a)}const c=t;A.add(c,"dragstart",(e=>e.preventDefault()),w).add(c,"touchmove",(()=>{}),w).add(c,"touchend",(()=>{})).add(c,"touchstart",a).add(c,"mousedown",a).add(c,"touchcancel",k).add(c,"contextmenu",k).add(c,"click",R,!0)},destroy:function(){A.clear(),x.clear()},pointerDown:function(){return z}}}function DragTracker(e,t){let n,r;function i(e){return e.timeStamp}function o(n,r){const i="client"+("x"===(r||e.scroll)?"X":"Y");return(isMouseEvent(n,t)?n:n.touches[0])[i]}return{pointerDown:function(e){return n=e,r=e,o(e)},pointerMove:function(e){const t=o(e)-o(r),s=i(e)-i(n)>170;return r=e,s&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=o(r)-o(n),s=i(e)-i(n),a=i(e)-i(r)>170,c=t/s;return s&&!a&&mathAbs(c)>.1?c:0},readPoint:o}}function NodeRects(){return{measure:function(e){const{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}}}function PercentOfView(e){return{measure:function(t){return e*(t/100)}}}function ResizeHandler(e,t,n,r,i,o,s){let a,c,l=[],u=!1;function d(e){return i.measureSize(s.measure(e))}return{init:function(i){if(!o)return;c=d(e),l=r.map(d),a=new ResizeObserver((s=>{u||(isBoolean(o)||o(i,s))&&function(o){for(const s of o){const o=s.target===e,a=r.indexOf(s.target),u=o?c:l[a];if(mathAbs(d(o?e:r[a])-u)>=.5){n.requestAnimationFrame((()=>{i.reInit(),t.emit("resize")}));break}}}(s)})),[e].concat(r).forEach((e=>a.observe(e)))},destroy:function(){a&&a.disconnect(),u=!0}}}function ScrollBody(e,t,n,r,i){let o=0,s=0,a=r,c=i,l=e.get(),u=0;function d(e){return a=e,m}function f(e){return c=e,m}const m={direction:function(){return s},duration:function(){return a},velocity:function(){return o},seek:function(){const t=n.get()-e.get();let r=0;return!a?(o=0,e.set(n),r=t):(o+=t/a,o*=c,l+=o,e.add(o),r=l-u),s=mathSign(r),u=l,m},settled:function(){return mathAbs(n.get()-t.get())<.001},useBaseFriction:function(){return f(i)},useBaseDuration:function(){return d(r)},useFriction:f,useDuration:d};return m}function ScrollBounds(e,t,n,r,i){const o=i.measure(10),s=i.measure(50),a=Limit(.1,.99);let c=!1;function l(){return!c&&(!!e.reachedAny(n.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:l,constrain:function(i){if(!l())return;const c=e.reachedMin(t.get())?"min":"max",u=mathAbs(e[c]-t.get()),d=n.get()-t.get(),f=a.constrain(u/s);n.subtract(d*f),!i&&mathAbs(d){const{min:r,max:i}=o,s=o.constrain(e),a=!t,l=arrayIsLastIndex(n,t);return a?i:l||c(r,s)?r:c(i,s)?i:s})).map((e=>parseFloat(e.toFixed(3)))),a=function(){const e=s[0],t=arrayLast(s),n=s.lastIndexOf(e),r=s.indexOf(t)+1;return Limit(n,r)}();function c(e,t){return deltaAbs(e,t)<1}return{snapsContained:function(){if(t<=e+i)return[o.max];if("keepSnaps"===r)return s;const{min:n,max:c}=a;return s.slice(n,c)}(),scrollContainLimit:a}}function ScrollLimit(e,t,n){const r=t[0];return{limit:Limit(n?r-e:arrayLast(t),r)}}function ScrollLooper(e,t,n,r){const i=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:a}=Limit(i,o);return{loop:function(t){if(!function(e){return 1===e?a(n.get()):-1===e&&s(n.get())}(t))return;const i=e*(-1*t);r.forEach((e=>e.add(i)))}}}function ScrollProgress(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}function ScrollSnaps(e,t,n,r,i){const{startEdge:o,endEdge:s}=e,{groupSlides:a}=i,c=a(r).map((e=>arrayLast(e)[s]-e[0][o])).map(mathAbs).map(t.measure),l=r.map((e=>n[o]-e[o])).map((e=>-mathAbs(e))),u=a(l).map((e=>e[0])).map(((e,t)=>e+c[t]));return{snaps:l,snapsAligned:u}}function SlideRegistry(e,t,n,r,i,o){const{groupSlides:s}=i,{min:a,max:c}=r;return{slideRegistry:function(){const r=s(o),i=!e||"keepSnaps"===t;return 1===n.length?[o]:i?r:r.slice(a,c).map(((e,t,n)=>{const r=!t,i=arrayIsLastIndex(n,t);if(r){return arrayFromNumber(arrayLast(n[0])+1)}if(i){return arrayFromNumber(arrayLastIndex(o)-arrayLast(n)[0]+1,arrayLast(n)[0])}return e}))}()}}function ScrollTarget(e,t,n,r,i){const{reachedAny:o,removeOffset:s,constrain:a}=r;function c(e){return e.concat().sort(((e,t)=>mathAbs(e)-mathAbs(t)))[0]}function l(t,r){const i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);const o=i.filter((e=>mathSign(e)===r));return o.length?c(o):arrayLast(i)-n}return{byDistance:function(n,r){const c=i.get()+n,{index:u,distance:d}=function(n){const r=e?s(n):a(n),i=t.map(((e,t)=>({diff:l(e-r,0),index:t}))).sort(((e,t)=>mathAbs(e.diff)-mathAbs(t.diff))),{index:o}=i[0];return{index:o,distance:r}}(c),f=!e&&o(c);return!r||f?{index:u,distance:n}:{index:u,distance:n+l(t[u]-d,0)}},byIndex:function(e,n){return{index:e,distance:l(t[e]-i.get(),n)}},shortcut:l}}function ScrollTo(e,t,n,r,i,o,s){function a(i){const a=i.distance,c=i.index!==t.get();o.add(a),a&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),s.emit("select"))}return{distance:function(e,t){a(i.byDistance(e,t))},index:function(e,n){const r=t.clone().set(e);a(i.byIndex(r.get(),n))}}}function SlideFocus(e,t,n,r,i,o,s){let a=0;function c(e){"Tab"===e.code&&(a=(new Date).getTime())}function l(c){o.add(c,"focus",(()=>{if((new Date).getTime()-a>10)return;e.scrollLeft=0;const o=t.indexOf(c),l=n.findIndex((e=>e.includes(o)));isNumber(l)&&(i.useDuration(0),r.index(l,0),s.emit("slideFocus"))}),{passive:!0,capture:!0})}return{init:function(){o.add(document,"keydown",c,!1),t.forEach(l)}}}function Vector1D(e){let t=e;function n(e){return isNumber(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function Translate(e,t){const n="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},r=t.style;let i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){i||(r.transform=n(e.direction(t)))},toggleActive:function(e){i=!e}}}function SlideLooper(e,t,n,r,i,o,s,a,c){const l=.5,u=arrayKeys(i),d=arrayKeys(i).reverse(),f=function(){const e=s[0];return h(p(d,e),n,!1)}().concat(function(){const e=t-s[0]-1;return h(p(u,e),-n,!0)}());function m(e,t){return e.reduce(((e,t)=>e-i[t]),t)}function p(e,t){return e.reduce(((e,n)=>m(e,t)>0?e.concat([n]):e),[])}function h(i,s,u){const d=function(e){return o.map(((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e})))}(s);return i.map((t=>{const r=u?0:-n,i=u?n:0,o=u?"end":"start",s=d[t][o];return{index:t,loopPoint:s,slideLocation:Vector1D(-1),translate:Translate(e,c[t]),target:()=>a.get()>s?r:i}}))}return{canLoop:function(){return f.every((({index:e})=>m(u.filter((t=>t!==e)),t)<=.1))},clear:function(){f.forEach((e=>e.translate.clear()))},loop:function(){f.forEach((e=>{const{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))}))},loopPoints:f}}function SlidesHandler(e,t,n){let r,i=!1;return{init:function(o){n&&(r=new MutationObserver((e=>{i||(isBoolean(n)||n(o,e))&&function(e){for(const n of e)if("childList"===n.type){o.reInit(),t.emit("slidesChanged");break}}(e)})),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),i=!0}}}function SlidesInView(e,t,n,r){const i={};let o,s=null,a=null,c=!1;const l={init:function(){o=new IntersectionObserver((e=>{c||(e.forEach((e=>{const n=t.indexOf(e.target);i[n]=e})),s=null,a=null,n.emit("slidesInView"))}),{root:e.parentElement,threshold:r}),t.forEach((e=>o.observe(e)))},destroy:function(){o&&o.disconnect(),c=!0},get:function(e=!0){if(e&&s)return s;if(!e&&a)return a;const t=function(e){return objectKeys(i).reduce(((t,n)=>{const r=parseInt(n),{isIntersecting:o}=i[r];return(e&&o||!e&&!o)&&t.push(r),t}),[])}(e);return e&&(s=t),e||(a=t),t}};return l}function SlideSizes(e,t,n,r,i,o){const{measureSize:s,startEdge:a,endEdge:c}=e,l=n[0]&&i,u=function(){if(!l)return 0;const e=n[0];return mathAbs(t[a]-e[a])}(),d=function(){if(!l)return 0;const e=o.getComputedStyle(arrayLast(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}(),f=n.map(s),m=n.map(((e,t,n)=>{const r=!t,i=arrayIsLastIndex(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][a]-e[a]})).map(mathAbs);return{slideSizes:f,slideSizesWithGaps:m,startGap:u,endGap:d}}function SlidesToScroll(e,t,n,r,i,o,s,a,c){const{startEdge:l,endEdge:u,direction:d}=e,f=isNumber(n);return{groupSlides:function(e){return f?function(e,t){return arrayKeys(e).filter((e=>e%t==0)).map((n=>e.slice(n,n+t)))}(e,n):function(e){return e.length?arrayKeys(e).reduce(((n,f,m)=>{const p=arrayLast(n)||0,h=0===p,g=f===arrayLastIndex(e),y=i[l]-o[p][l],v=i[l]-o[f][u],b=!r&&h?d(s):0,E=mathAbs(v-(!r&&g?d(a):0)-(y+b));return m&&E>t+c&&n.push(f),g&&n.push(e.length),n}),[]).map(((t,n,r)=>{const i=Math.max(r[n-1]||0);return e.slice(i,t)})):[]}(e)}}}function Engine(e,t,n,r,i,o,s){const{align:a,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:m,dragThreshold:p,inViewThreshold:h,slidesToScroll:g,skipSnaps:y,containScroll:v,watchResize:b,watchSlides:E,watchDrag:S}=o,w=NodeRects(),A=w.measure(t),x=n.map(w.measure),L=Axis(c,l),O=L.measureSize(A),T=PercentOfView(O),D=Alignment(a,O),I=!d&&!!v,M=d||!!v,{slideSizes:N,slideSizesWithGaps:z,startGap:H,endGap:C}=SlideSizes(L,A,x,n,M,i),P=SlidesToScroll(L,O,g,d,A,x,H,C,2),{snaps:V,snapsAligned:k}=ScrollSnaps(L,D,A,x,P),R=-arrayLast(V)+arrayLast(z),{snapsContained:F,scrollContainLimit:B}=ScrollContain(O,R,k,v,2),$=I?F:k,{limit:j}=ScrollLimit(R,$,d),W=Counter(arrayLastIndex($),u,d),U=W.clone(),q=arrayKeys(n),_=Animations(r,i,(()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()})(oe)),(e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,scrollLooper:i,slideLooper:o,dragHandler:s,animation:a,eventHandler:c,scrollBounds:l,options:{loop:u}},d)=>{const f=e.velocity(),m=e.settled(),p=!l.shouldConstrain(),h=u?m:m&&p;h&&!s.pointerDown()&&(a.stop(),c.emit("settle")),h||c.emit("scroll"),r.set(n.get()-f+f*d),u&&(i.loop(e.direction()),o.loop()),t.to(r.get())})(oe,e))),K=$[W.get()],G=Vector1D(K),X=Vector1D(K),Y=Vector1D(K),Q=ScrollBody(G,X,Y,f,.68),Z=ScrollTarget(d,$,R,j,Y),J=ScrollTo(_,W,U,Q,Z,Y,s),ee=ScrollProgress(j),te=EventStore(),ne=SlidesInView(t,n,s,h),{slideRegistry:re}=SlideRegistry(I,v,$,B,P,q),ie=SlideFocus(e,n,re,J,Q,te,s),oe={ownerDocument:r,ownerWindow:i,eventHandler:s,containerRect:A,slideRects:x,animation:_,axis:L,dragHandler:DragHandler(L,e,r,i,Y,DragTracker(L,i),G,_,J,Q,Z,W,s,T,m,p,y,.68,S),eventStore:te,percentOfView:T,index:W,indexPrevious:U,limit:j,location:G,offsetLocation:X,options:o,resizeHandler:ResizeHandler(t,s,i,n,L,b,w),scrollBody:Q,scrollBounds:ScrollBounds(j,X,Y,Q,T),scrollLooper:ScrollLooper(R,j,X,[G,X,Y]),scrollProgress:ee,scrollSnapList:$.map(ee.get),scrollSnaps:$,scrollTarget:Z,scrollTo:J,slideLooper:SlideLooper(L,O,R,N,z,V,$,X,n),slideFocus:ie,slidesHandler:SlidesHandler(t,s,E),slidesInView:ne,slideIndexes:q,slideRegistry:re,slidesToScroll:P,target:Y,translate:Translate(L,t)};return oe}function EventHandler(){let e,t={};function n(e){return t[e]||[]}const r={init:function(t){e=t},emit:function(t){return n(t).forEach((n=>n(e,t))),r},off:function(e,i){return t[e]=n(e).filter((e=>e!==i)),r},on:function(e,i){return t[e]=n(e).concat([i]),r},clear:function(){t={}}};return r}const defaultOptions={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,snapped:"is-selected",inView:"",draggable:"is-draggable",dragging:"is-dragging",destroyHeight:"auto",max:!0,useNavH:!1,delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function OptionsHandler(e){function t(e,t){return objectsMergeDeep(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},i=objectKeys(r).filter((t=>e.matchMedia(t).matches)).map((e=>r[e])).reduce(((e,n)=>t(e,n)),{});return t(n,i)},optionsMediaQueries:function(t){return t.map((e=>objectKeys(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return n}function PluginsHandler(e){let t=[];return{init:function(n,r){return t=r.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(n,e))),r.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}}}function HdtCarousel(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=OptionsHandler(i),s=PluginsHandler(o),a=EventStore(),c=EventHandler(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=o,{on:f,off:m,emit:p}=c,h=O;let g,y,v,b,E=!1,S=l(defaultOptions,HdtCarousel.globalOptions),w=l(S),A=[];function x(t){const n=Engine(e,v,b,r,i,t,c);if(t.loop&&!n.slideLooper.canLoop()){return x(Object.assign({},t,{loop:!1}))}return n}function L(t,n){E||(S=l(S,t),w=u(S),A=n||A,function(){const{container:t,slides:n}=w,r=isString(t)?e.querySelector(t):t;v=r||e.children[0];const i=isString(n)?v.querySelectorAll(n):n;b=[].slice.call(i||v.children)}(),g=x(w),d([S,...A.map((({options:e})=>e))]).forEach((e=>a.add(e,"change",O))),w.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(),g.eventHandler.init(M),g.resizeHandler.init(M),g.slidesHandler.init(M),g.options.loop&&g.slideLooper.loop(),v.offsetParent&&b.length&&g.dragHandler.init(M),y=s.init(M,A)))}function O(e,t){const n=I();T(),L(l({startIndex:n},e),t),c.emit("reInit")}function T(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),s.destroy(),a.clear()}function D(e,t,n){w.active&&!E&&(g.scrollBody.useBaseFriction().useDuration(!0===t?0:w.duration),g.scrollTo.index(e,n||0))}function I(){return g.index.get()}const M={canScrollNext:function(){return g.index.add(1).get()!==I()},canScrollPrev:function(){return g.index.add(-1).get()!==I()},containerNode:function(){return v},internalEngine:function(){return g},destroy:function(){E||(E=!0,a.clear(),T(),c.emit("destroy"),c.clear())},off:m,on:f,emit:p,plugins:function(){return y},previousScrollSnap:function(){return g.indexPrevious.get()},reInit:h,rootNode:function(){return e},scrollNext:function(e){D(g.index.add(1).get(),e,-1)},scrollPrev:function(e){D(g.index.add(-1).get(),e,1)},scrollProgress:function(){return g.scrollProgress.get(g.location.get())},scrollSnapList:function(){return g.scrollSnapList},scrollTo:D,selectedScrollSnap:I,slideNodes:function(){return b},slidesInView:function(){return g.slidesInView.get()},slidesNotInView:function(){return g.slidesInView.get(!1)}};return L(t,n),setTimeout((()=>c.emit("init")),0),M}function removeClass(e,t){if(!e||!t)return;const{classList:n}=e;n.contains(t)&&n.remove(t)}function addClass(e,t){if(!e||!t)return;const{classList:n}=e;n.contains(t)||n.add(t)}function nodeListToArray(e){return Array.from(e)}function ClassNames(e={}){let t,n,r,i;const o=["select"],s=["pointerDown","pointerUp"],a=["slidesInView"];function c(e,n){"pointerDown"===n?addClass(r,t.dragging):removeClass(r,t.dragging)}function l(e,t){nodeListToArray(n.containerNode().querySelectorAll(`.${t}`)).forEach((e=>removeClass(e,t))),e.forEach((e=>addClass(i[e],t)))}function u(){const{slideRegistry:e}=n.internalEngine();l(e[n.selectedScrollSnap()],t.snapped)}function d(){l(n.slidesInView(),t.inView)}return{name:"classNames",options:e,init:function(l,f){n=l;const{mergeOptions:m,optionsAtMedia:p}=f,h=m(defaultOptions,ClassNames.globalOptions),g=m(h,e);t=p(g),r=n.rootNode(),i=n.slideNodes(),!!n.internalEngine().options.watchDrag&&addClass(r,t.draggable),t.dragging&&s.forEach((e=>n.on(e,c))),t.snapped&&(o.forEach((e=>n.on(e,u))),u()),t.inView&&(a.forEach((e=>n.on(e,d))),d())},destroy:function(){removeClass(r,t.draggable),s.forEach((e=>n.off(e,c))),o.forEach((e=>n.off(e,u))),a.forEach((e=>n.off(e,d))),i.forEach((e=>removeClass(e,t.snapped)))}}}function AutoHeight(e={}){let t,n,r=[];const i="select",o="slidesInView";let s=0,a=0;function c(){s=n.slidesInView().map((e=>r[e])).reduce(((e,t)=>Math.max(e,t)),0)||0,s>=a&&u(s)}function l(e,t){a=function(){const{slideRegistry:e}=n.internalEngine();return e[n.selectedScrollSnap()].map((e=>r[e])).reduce(((e,t)=>Math.max(e,t)),0)}()||0,u("destroy"===t?"destroy":Math.max(a,s))}function u(e){n.containerNode().style.height="destroy"===e?t.destroyHeight:`${e}px`}return{name:"autoHeight",options:e,init:function(s,a){n=s;const{mergeOptions:u,optionsAtMedia:d}=a,f=u(defaultOptions,AutoHeight.globalOptions),m=u(f,e);t=d(m);const{options:{axis:p},slideRects:h}=n.internalEngine();"y"!==p&&(r=h.map((e=>e.height)),n.on(i,l),n.on(o,c),l())},destroy:function(){n.off(i,l),n.off(o,c),u("destroy")}}}function navUICenter(e={}){let t,n,r,i,o,s,a=[],c=9999,l="min";const u="select",d="slidesInView";let f=0,m=0;function p(){f=n.slidesInView().map((e=>a[e])).reduce(((e,t)=>Math[l](e,t)),c)||0,f>=m&&g(f)}function h(e,t){m=function(){const{slideRegistry:e}=n.internalEngine();return e[n.selectedScrollSnap()].map((e=>a[e])).reduce(((e,t)=>Math[l](e,t)),c)}()||0,g(Math.max(m,f))}function g(e){i.style.setProperty("--gap-arrow",e/2-s+"px")}return{name:"navUICenter",options:e,init:function(f,m){n=f;const{mergeOptions:g,optionsAtMedia:y}=m,v=g(defaultOptions,navUICenter.globalOptions),b=g(v,e);t=y(b);const{options:{axis:E}}=n.internalEngine();i=n.rootNode().parentNode,o=i.querySelector('button[name="next"]'),"y"!==E&&o&&(t.max&&(c=0,l="max"),r=n.slideNodes(),a=[],r.forEach((e=>{a.push(e.querySelector("[calc-nav]")?e.querySelector("[calc-nav]").offsetHeight:c)})),n.on(u,h),n.on(d,p),s=t.useNavH?o.offsetHeight/2:0,h())},destroy:function(){n.off(u,h),n.off(d,p),a=[],i.style.removeProperty("--gap-arrow")}}}function Autoplay(e={}){let t,n,r,i=!1,o=!0,s=!1,a=0;function c(){if(r)return;if(!o)return;i||n.emit("autoplay:play");const{ownerWindow:e}=n.internalEngine();e.clearInterval(a),a=e.setInterval(m,t.delay),i=!0}function l(){if(r)return;i&&n.emit("autoplay:stop");const{ownerWindow:e}=n.internalEngine();e.clearInterval(a),a=0,i=!1}function u(){if(d())return o=i,l();o&&c()}function d(){const{ownerDocument:e}=n.internalEngine();return"hidden"===e.visibilityState}function f(e){void 0!==e&&(s=e),o=!0,c()}function m(){const{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1;t.stopOnLastSnap&&r===i&&l(),n.canScrollNext()?n.scrollNext(s):n.scrollTo(0,s)}return{name:"autoplay",options:e,init:function(i,a){n=i;const{mergeOptions:f,optionsAtMedia:m}=a,p=f(defaultOptions,Autoplay.globalOptions),h=f(p,e);if(t=m(h),n.scrollSnapList().length<=1)return;s=t.jump,r=!1;const{eventStore:g,ownerDocument:y}=n.internalEngine(),v=n.rootNode(),b=t.rootNode&&t.rootNode(v)||v,E=n.containerNode();n.on("pointerDown",l),t.stopOnInteraction||n.on("pointerUp",c),t.stopOnMouseEnter&&(g.add(b,"mouseenter",(()=>{o=!1,l()})),t.stopOnInteraction||g.add(b,"mouseleave",(()=>{o=!0,c()}))),t.stopOnFocusIn&&(g.add(E,"focusin",l),t.stopOnInteraction||g.add(E,"focusout",c)),g.add(y,"visibilitychange",u),t.playOnInit&&!d()&&c()},destroy:function(){n.off("pointerDown",l).off("pointerUp",c),l(),r=!0,i=!1},play:f,stop:function(){i&&l()},reset:function(){i&&f()},isPlaying:function(){return i}}}HdtCarousel.globalOptions=void 0,ClassNames.globalOptions=void 0,AutoHeight.globalOptions=void 0,navUICenter.globalOptions=void 0,Autoplay.globalOptions=void 0;const addTogglePrevNextBtnsActive=(e,t,n)=>{let r=t.parentNode.classList,i=e.rootNode().parentNode,o="hidden",s="hdt-hidden-slider-nav";const a=()=>{e.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled"),e.canScrollNext()?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled"),e.canScrollPrev()||e.canScrollNext()?(t.removeAttribute(o),n.removeAttribute(o),r.remove(s),i.classList.remove(s)):(t.setAttribute(o,""),n.setAttribute(o,""),r.add(s),i.classList.add(s))};return e.on("select",a).on("init",a).on("reInit",a),()=>{t.removeAttribute("disabled"),n.removeAttribute("disabled")}},navHandlers=(e,t,n)=>{const r=()=>e.scrollPrev(),i=()=>e.scrollNext();t.addEventListener("click",r,!1),n.addEventListener("click",i,!1);const o=addTogglePrevNextBtnsActive(e,t,n);return()=>{o(),t.removeEventListener("click",r,!1),n.removeEventListener("click",i,!1)}},dotHandlers=(e,t)=>{let n=[],r=t.parentNode.classList,i=e.rootNode().parentNode,o="hdt-hidden-slider-dots",s=document.getElementById("hdt-dot-tmp")?.innerHTML||'';const a=()=>{t.innerHTML=e.scrollSnapList().map(((e,t)=>s.replace("hdt__index",t+1))).join(""),n=Array.from(t.querySelectorAll(".hdt-slider__dot")),n.forEach(((t,n)=>{t.addEventListener("click",(()=>e.scrollTo(n)),!1)}))},c=()=>{const s=e.previousScrollSnap(),a=e.selectedScrollSnap();n[s].classList.remove("hdt-slider__dot--selected"),n[a].classList.add("hdt-slider__dot--selected"),e.canScrollPrev()||e.canScrollNext()?(t.removeAttribute("hidden"),r.remove(o),i.classList.remove(o)):(t.setAttribute("hidden",""),r.add(o),i.classList.add(o))};return e.on("init",a).on("reInit",a).on("init",c).on("reInit",c).on("select",c),()=>{t.innerHTML=""}};function Delegate(e){this.listenerMap=[{},{}],e&&this.root(e),this.handle=Delegate.prototype.handle.bind(this),this._removedListeners=[]}function matchesTag(e,t){return e.toLowerCase()===t.tagName.toLowerCase()}function matchesRoot(e,t){return this.rootElement===window?t===document||t===document.documentElement||t===window:this.rootElement===t}function matchesId(e,t){return e===t.id}function addUniqueItem(e,t){-1===e.indexOf(t)&&e.push(t)}function removeItem(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}Delegate.prototype.root=function(e){const t=this.listenerMap;let n;if(this.rootElement){for(n in t[1])t[1].hasOwnProperty(n)&&this.rootElement.removeEventListener(n,this.handle,!0);for(n in t[0])t[0].hasOwnProperty(n)&&this.rootElement.removeEventListener(n,this.handle,!1)}if(!e||!e.addEventListener)return this.rootElement&&delete this.rootElement,this;for(n in this.rootElement=e,t[1])t[1].hasOwnProperty(n)&&this.rootElement.addEventListener(n,this.handle,!0);for(n in t[0])t[0].hasOwnProperty(n)&&this.rootElement.addEventListener(n,this.handle,!1);return this},Delegate.prototype.captureForType=function(e){return-1!==["blur","error","focus","load","resize","scroll"].indexOf(e)},Delegate.prototype.on=function(e,t,n,r){let i,o,s,a;if(!e)throw new TypeError("Invalid event type: "+e);if("function"==typeof t&&(r=n,n=t,t=null),void 0===r&&(r=this.captureForType(e)),"function"!=typeof n)throw new TypeError("Handler must be a type of Function");return i=this.rootElement,o=this.listenerMap[r?1:0],o[e]||(i&&i.addEventListener(e,this.handle,r),o[e]=[]),t?/^[a-z]+$/i.test(t)?(a=t,s=matchesTag):/^#[a-z0-9\-_]+$/i.test(t)?(a=t.slice(1),s=matchesId):(a=t,s=Element.prototype.matches):(a=null,s=matchesRoot.bind(this)),o[e].push({selector:t,handler:n,matcher:s,matcherParam:a}),this},Delegate.prototype.off=function(e,t,n,r){let i,o,s,a,c;if("function"==typeof t&&(r=n,n=t,t=null),void 0===r)return this.off(e,t,n,!0),this.off(e,t,n,!1),this;if(s=this.listenerMap[r?1:0],!e){for(c in s)s.hasOwnProperty(c)&&this.off(c,t,n);return this}if(a=s[e],!a||!a.length)return this;for(i=a.length-1;i>=0;i--)o=a[i],t&&t!==o.selector||n&&n!==o.handler||(this._removedListeners.push(o),a.splice(i,1));return a.length||(delete s[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,r)),this},Delegate.prototype.handle=function(e){let t,n;const r=e.type;let i,o,s,a,c,l=[];const u="ftLabsDelegateIgnore";if(!0===e[u])return;switch(c=e.target,3===c.nodeType&&(c=c.parentNode),c.correspondingUseElement&&(c=c.correspondingUseElement),i=this.rootElement,o=e.eventPhase||(e.target!==e.currentTarget?3:2),o){case 1:l=this.listenerMap[1][r];break;case 2:this.listenerMap[0]&&this.listenerMap[0][r]&&(l=l.concat(this.listenerMap[0][r])),this.listenerMap[1]&&this.listenerMap[1][r]&&(l=l.concat(this.listenerMap[1][r]));break;case 3:l=this.listenerMap[0][r]}let d,f=[];for(n=l.length;c&&n;){for(t=0;t-1&&c.hasAttribute("disabled")?f=[]:s.matcher.call(c,s.matcherParam,c)&&f.push([e,c,s]);if(c===i)break;if(n=l.length,c=c.parentElement||c.parentNode,c instanceof HTMLDocument)break}for(t=0;t-1)&&(a=this.fire.apply(this,f[t]),!1===a)){f[t][0][u]=!0,f[t][0].preventDefault(),d=!1;break}return d},Delegate.prototype.fire=function(e,t,n){return n.handler.call(t,e,t)},Delegate.prototype.destroy=function(){this.off(),this.root()};const clamp=(e,t,n)=>Math.min(Math.max(n,e),t),defaults$1={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},isNumber2=e=>"number"==typeof e,isEasingList=e=>Array.isArray(e)&&!isNumber2(e[0]),wrap=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function getEasingForSegment(e,t){return isEasingList(e)?e[wrap(0,e.length,t)]:e}const mix=(e,t,n)=>-n*e+n*t+e,noop=()=>{},noopReturn=e=>e,progress=(e,t,n)=>t-e==0?1:(n-e)/(t-e);function fillOffset(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=progress(0,t,r);e.push(mix(n,1,i))}}function defaultOffset$1(e){const t=[0];return fillOffset(t,e-1),t}function interpolate(e,t=defaultOffset$1(e.length),n=noopReturn){const r=e.length,i=r-t.length;return i>0&&fillOffset(t,i),i=>{let o=0;for(;oArray.isArray(e)&&isNumber2(e[0]),isEasingGenerator=e=>"object"==typeof e&&Boolean(e.createAnimation),isFunction=e=>"function"==typeof e,isString2=e=>"string"==typeof e,time={ms:e=>1e3*e,s:e=>e/1e3};function velocityPerSecond(e,t){return t?e*(1e3/t):0}const calcBezier=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=calcBezier(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>subdivisionPrecision&&++a0===i||1===i?i:calcBezier(binarySubdivide(i,0,1,e,n),t,r)}const steps=(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,i="end"===t?Math.floor(r):Math.ceil(r);return clamp(0,1,i/e)},namedEasings={ease:cubicBezier(.25,.1,.25,1),"ease-in":cubicBezier(.42,0,1,1),"ease-in-out":cubicBezier(.42,0,.58,1),"ease-out":cubicBezier(0,0,.58,1)},functionArgsRegex=/\((.*?)\)/;function getEasingFunction(e){if(isFunction(e))return e;if(isCubicBezier(e))return cubicBezier(...e);if(namedEasings[e])return namedEasings[e];if(e.startsWith("steps")){const t=functionArgsRegex.exec(e);if(t){const e=t[1].split(",");return steps(parseFloat(e[0]),e[1].trim())}}return noopReturn}class Animation{constructor(e,t=[0,1],{easing:n,duration:r=defaults$1.duration,delay:i=defaults$1.delay,endDelay:o=defaults$1.endDelay,repeat:s=defaults$1.repeat,offset:a,direction:c="normal",autoplay:l=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=noopReturn,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),n=n||defaults$1.easing,isEasingGenerator(n)){const e=n.createAnimation(t);n=e.easing,t=e.keyframes||t,r=e.duration||r}this.repeat=s,this.easing=isEasingList(n)?noopReturn:getEasingFunction(n),this.updateDuration(r);const u=interpolate(t,a,isEasingList(n)?n.map(getEasingFunction):noopReturn);this.tick=t=>{var n;let r=0;r=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=r,r/=1e3,r=Math.max(r-i,0),"finished"===this.playState&&void 0===this.pauseTime&&(r=this.totalDuration);const s=r/this.duration;let a=Math.floor(s),l=s%1;!l&&s>=1&&(l=1),1===l&&a--;const d=a%2;("reverse"===c||"alternate"===c&&d||"alternate-reverse"===c&&!d)&&(l=1-l);const f=r>=this.totalDuration?1:Math.min(l,1),m=u(this.easing(f));e(m);void 0===this.pauseTime&&("finished"===this.playState||r>=this.totalDuration+o)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,m)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},l&&this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var invariant=function(){};invariant=function(e,t){if(!e)throw new Error(t)};class MotionValue{setAnimation(e){this.animation=e,null==e||e.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const data=new WeakMap;function getAnimationData(e){return data.has(e)||data.set(e,{transforms:[],values:new Map}),data.get(e)}function getMotionValue(e,t){return e.has(t)||e.set(t,new MotionValue),e.get(t)}const axes=["","X","Y","Z"],order=["translate","scale","rotate","skew"],transformAlias={x:"translateX",y:"translateY",z:"translateZ"},rotation={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},baseTransformProperties={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:rotation,scale:{syntax:"",initialValue:1,toDefaultUnit:noopReturn},skew:rotation},transformDefinitions=new Map,asTransformCssVar=e=>`--motion-${e}`,transforms=["x","y","z"];order.forEach((e=>{axes.forEach((t=>{transforms.push(e+t),transformDefinitions.set(asTransformCssVar(e+t),baseTransformProperties[e])}))}));const compareTransformOrder=(e,t)=>transforms.indexOf(e)-transforms.indexOf(t),transformLookup=new Set(transforms),isTransform=e=>transformLookup.has(e),addTransformToElement=(e,t)=>{transformAlias[t]&&(t=transformAlias[t]);const{transforms:n}=getAnimationData(e);addUniqueItem(n,t),e.style.transform=buildTransformTemplate(n)},buildTransformTemplate=e=>e.sort(compareTransformOrder).reduce(transformListToString,"").trim(),transformListToString=(e,t)=>`${e} ${t}(var(${asTransformCssVar(t)}))`,isCssVar=e=>e.startsWith("--"),registeredProperties=new Set;function registerCssVariable(e){if(!registeredProperties.has(e)){registeredProperties.add(e);try{const{syntax:t,initialValue:n}=transformDefinitions.has(e)?transformDefinitions.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch(e){}}}const testAnimation=(e,t)=>document.createElement("div").animate(e,t),featureTests={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{testAnimation({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(testAnimation({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{testAnimation({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},results={},supports={};for(const e in featureTests)supports[e]=()=>(void 0===results[e]&&(results[e]=featureTests[e]()),results[e]);const resolution=.015,generateLinearEasingPoints=(e,t)=>{let n="";const r=Math.round(t/.015);for(let t=0;tisFunction(e)?supports.linearEasing()?`linear(${generateLinearEasingPoints(e,t)})`:defaults$1.easing:isCubicBezier(e)?cubicBezierAsString(e):e,cubicBezierAsString=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`;function hydrateKeyframes(e,t){for(let n=0;nArray.isArray(e)?e:[e];function getStyleName(e){return transformAlias[e]&&(e=transformAlias[e]),isTransform(e)?asTransformCssVar(e):e}const style={get:(e,t)=>{t=getStyleName(t);let n=isCssVar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){const e=transformDefinitions.get(t);e&&(n=e.initialValue)}return n},set:(e,t,n)=>{t=getStyleName(t),isCssVar(t)?e.style.setProperty(t,n):e.style[t]=n}};function stopAnimation(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}function getUnitConverter(e,t){var n;let r=(null==t?void 0:t.toDefaultUnit)||noopReturn;const i=e[e.length-1];if(isString2(i)){const e=(null===(n=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";e&&(r=t=>t+e)}return r}function getDevToolsRecord(){return window.__MOTION_DEV_TOOLS_RECORD}function animateStyle(e,t,n,r={},i){const o=getDevToolsRecord(),s=!1!==r.record&&o;let a,{duration:c=defaults$1.duration,delay:l=defaults$1.delay,endDelay:u=defaults$1.endDelay,repeat:d=defaults$1.repeat,easing:f=defaults$1.easing,persist:m=!1,direction:p,offset:h,allowWebkitAcceleration:g=!1,autoplay:y=!0}=r;const v=getAnimationData(e),b=isTransform(t);let E=supports.waapi();b&&addTransformToElement(e,t);const S=getStyleName(t),w=getMotionValue(v.values,S),A=transformDefinitions.get(S);return stopAnimation(w.animation,!(isEasingGenerator(f)&&w.generator)&&!1!==r.record),()=>{const v=()=>{var t,n;return null!==(n=null!==(t=style.get(e,S))&&void 0!==t?t:null==A?void 0:A.initialValue)&&void 0!==n?n:0};let x=hydrateKeyframes(keyframesList(n),v);const L=getUnitConverter(x,A);if(isEasingGenerator(f)){const e=f.createAnimation(x,"opacity"!==t,v,S,w);f=e.easing,x=e.keyframes||x,c=e.duration||c}if(isCssVar(S)&&(supports.cssRegisterProperty()?registerCssVariable(S):E=!1),b&&!supports.linearEasing()&&(isFunction(f)||isEasingList(f)&&f.some(isFunction))&&(E=!1),E){A&&(x=x.map((e=>isNumber2(e)?A.toDefaultUnit(e):e))),1!==x.length||supports.partialKeyframes()&&!s||x.unshift(v());const t={delay:time.ms(l),duration:time.ms(c),endDelay:time.ms(u),easing:isEasingList(f)?void 0:convertEasing(f,c),direction:p,iterations:d+1,fill:"both"};a=e.animate({[S]:x,offset:h,easing:isEasingList(f)?f.map((e=>convertEasing(e,c))):void 0},t),a.finished||(a.finished=new Promise(((e,t)=>{a.onfinish=e,a.oncancel=t})));const n=x[x.length-1];a.finished.then((()=>{m||(style.set(e,S,n),a.cancel())})).catch(noop),g||(a.playbackRate=1.000001)}else if(i&&b)x=x.map((e=>"string"==typeof e?parseFloat(e):e)),1===x.length&&x.unshift(parseFloat(v())),a=new i((t=>{style.set(e,S,L?L(t):t)}),x,Object.assign(Object.assign({},r),{duration:c,easing:f}));else{const t=x[x.length-1];style.set(e,S,A&&isNumber2(t)?A.toDefaultUnit(t):t)}return s&&o(e,t,x,{duration:c,delay:l,easing:f,repeat:d,offset:h},"motion-one"),w.setAnimation(a),a&&!y&&a.pause(),a}}const getOptions=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function resolveElements(e,t){var n;return"string"==typeof e?t?(null!==(n=t[e])&&void 0!==n||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const createAnimation=e=>e(),withControls=(e,t,n=defaults$1.duration)=>new Proxy({animations:e.map(createAnimation).filter(Boolean),duration:n,options:t},controls),getActiveAnimation=e=>e.animations[0],controls={get:(e,t)=>{const n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return time.s((null==n?void 0:n[t])||0);case"playbackRate":case"playState":return null==n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(selectFinished)).catch(noop)),e.finished;case"stop":return()=>{e.animations.forEach((e=>stopAnimation(e)))};case"forEachNative":return t=>{e.animations.forEach((n=>t(n,e)))};default:return void 0===(null==n?void 0:n[t])?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,t,n)=>{switch(t){case"currentTime":n=time.ms(n);case"playbackRate":for(let r=0;re.finished;function stagger(e=.1,{start:t=0,from:n=0,easing:r}={}){return(i,o)=>{const s=isNumber2(n)?n:getFromIndex(n,o),a=Math.abs(s-i);let c=e*a;if(r){const t=o*e;c=getEasingFunction(r)(c/t)*t}return t+c}}function getFromIndex(e,t){if("first"===e)return 0;{const n=t-1;return"last"===e?n:n/2}}function resolveOption(e,t,n){return isFunction(e)?e(t,n):e}function createAnimate(e){return function(t,n,r={}){const i=(t=resolveElements(t)).length;invariant(Boolean(i),"No valid element provided."),invariant(Boolean(n),"No keyframes defined.");const o=[];for(let s=0;st&&i.atanimateStyle(...e,Animation))).filter(Boolean);return withControls(i,t,null===(n=r[0])||void 0===n?void 0:n[3].duration)}function createAnimationsFromTimeline(e,t={}){var{defaultOptions:n={}}=t,r=__rest(t,["defaultOptions"]);const i=[],o=new Map,s={},a=new Map;let c=0,l=0,u=0;for(let t=0;t1,"spring must be provided 2 keyframes within timeline()");const e=c.createAnimation(o,"opacity"!==r,(()=>0),r);c=e.easing,o=e.keyframes||o,a=e.duration||a}const p=resolveOption(f.delay,e,h)||0,g=l+p,y=g+a;let{offset:v=defaultOffset$1(o.length)}=s;1===v.length&&0===v[0]&&(v[1]=1);const b=v.length-o.length;b>0&&fillOffset(v,b),1===o.length&&o.unshift(null),addKeyframes(i,o,c,v,g,y),m=Math.max(p+a,m),u=Math.max(y,u)}}c=l,l+=m}return o.forEach(((e,t)=>{for(const o in e){const s=e[o];s.sort(compareByTime);const a=[],c=[],l=[];for(let e=0;et/(2*Math.sqrt(e*n));function hasReachedTarget(e,t,n){return e=t||e>t&&n<=t}const timeStep=10,maxDuration=1e4;function pregenerateKeyframes(e,t=noopReturn){let n,r=timeStep,i=e(0);const o=[t(i.current)];for(;!i.done&&r{const r=new Map,i=(t=0,i=100,o=0,s=!1)=>{const a=`${t}-${i}-${o}-${s}`;return r.has(a)||r.set(a,e(Object.assign({from:t,to:i,velocity:o},n))),r.get(a)},o=(e,n)=>(t.has(e)||t.set(e,pregenerateKeyframes(e,n)),t.get(e));return{createAnimation:(e,t=!0,n,r,s)=>{let a,c,l,u=0,d=noopReturn;const f=e.length;if(t){d=getUnitConverter(e,r?transformDefinitions.get(getStyleName(r)):void 0);if(l=getAsNumber(e[f-1]),f>1&&null!==e[0])c=getAsNumber(e[0]);else{const e=null==s?void 0:s.generator;if(e){const{animation:t,generatorStartTime:n}=s,r=(null==t?void 0:t.startTime)||n||0,i=(null==t?void 0:t.currentTime)||performance.now()-r,o=e(i).current;c=o,u=calcGeneratorVelocity((t=>e(t).current),i,o)}else n&&(c=getAsNumber(n()))}}if(canGenerate(c)&&canGenerate(l)){const e=i(c,l,u,null==r?void 0:r.includes("scale"));a=Object.assign(Object.assign({},o(e,d)),{easing:"linear"}),s&&(s.generator=e,s.generatorStartTime=performance.now())}if(!a){a={easing:"ease",duration:o(i(0,100)).overshootDuration}}return a}}}}const thresholds={any:0,all:1};function inView$1(e,t,{root:n,margin:r,amount:i="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const o=resolveElements(e),s=new WeakMap,a=new IntersectionObserver((e=>{e.forEach((e=>{const n=s.get(e.target);if(e.isIntersecting!==Boolean(n))if(e.isIntersecting){const n=t(e);isFunction(n)?s.set(e.target,n):a.unobserve(e.target)}else n&&(n(e),s.delete(e.target))}))}),{root:n,rootMargin:r,threshold:"number"==typeof i?i:thresholds[i]});return o.forEach((e=>a.observe(e))),()=>a.disconnect()}const resizeHandlers=new WeakMap;let observer;function getElementSize(e,t){if(t){const{inlineSize:e,blockSize:n}=t[0];return{width:e,height:n}}return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function notifyTarget({target:e,contentRect:t,borderBoxSize:n}){var r;null===(r=resizeHandlers.get(e))||void 0===r||r.forEach((r=>{r({target:e,contentSize:t,get size(){return getElementSize(e,n)}})}))}function notifyAll(e){e.forEach(notifyTarget)}function createResizeObserver(){"undefined"!=typeof ResizeObserver&&(observer=new ResizeObserver(notifyAll))}function resizeElement(e,t){observer||createResizeObserver();const n=resolveElements(e);return n.forEach((e=>{let n=resizeHandlers.get(e);n||(n=new Set,resizeHandlers.set(e,n)),n.add(t),null==observer||observer.observe(e)})),()=>{n.forEach((e=>{const n=resizeHandlers.get(e);null==n||n.delete(t),(null==n?void 0:n.size)||null==observer||observer.unobserve(e)}))}}const windowCallbacks=new Set;let windowResizeHandler;function createWindowResizeHandler(){windowResizeHandler=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};windowCallbacks.forEach((e=>e(t)))},window.addEventListener("resize",windowResizeHandler)}function resizeWindow(e){return windowCallbacks.add(e),windowResizeHandler||createWindowResizeHandler(),()=>{windowCallbacks.delete(e),!windowCallbacks.size&&windowResizeHandler&&(windowResizeHandler=void 0)}}function resize(e,t){return isFunction(e)?resizeWindow(e):resizeElement(e,t)}const maxElapsed=50,createAxisInfo=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),createScrollInfo=()=>({time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}}),keys={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function updateAxisInfo(e,t,n,r){const i=n[t],{length:o,position:s}=keys[t],a=i.current,c=n.time;i.current=e["scroll"+s],i.scrollLength=e["scroll"+o]-e["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=progress(0,i.scrollLength,i.current);const l=r-c;i.velocity=l>maxElapsed?0:velocityPerSecond(i.current-a,l)}function updateScrollInfo(e,t,n){updateAxisInfo(e,"x",t,n),updateAxisInfo(e,"y",t,n),t.time=n}function calcInset(e,t){let n={x:0,y:0},r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r instanceof SVGGraphicsElement&&"getBBox"in r){const{top:e,left:t}=r.getBBox();for(n.x+=t,n.y+=e;r&&"svg"!==r.tagName;)r=r.parentNode}return n}const ScrollOffset={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},namedEdges={start:0,center:.5,end:1};function resolveEdge(e,t,n=0){let r=0;if(void 0!==namedEdges[e]&&(e=namedEdges[e]),isString2(e)){const t=parseFloat(e);e.endsWith("px")?r=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?r=t/100*document.documentElement.clientWidth:e.endsWith("vh")?r=t/100*document.documentElement.clientHeight:e=t}return isNumber2(e)&&(r=t*e),n+r}const defaultOffset=[0,0];function resolveOffset(e,t,n,r){let i=Array.isArray(e)?e:defaultOffset,o=0,s=0;return isNumber2(e)?i=[e,e]:isString2(e)&&(i=(e=e.trim()).includes(" ")?e.split(" "):[e,namedEdges[e]?e:"0"]),o=resolveEdge(i[0],n,r),s=resolveEdge(i[1],t),o-s}const point={x:0,y:0};function resolveOffsets(e,t,n){let{offset:r=ScrollOffset.All}=n;const{target:i=e,axis:o="y"}=n,s="y"===o?"height":"width",a=i!==e?calcInset(i,e):point,c=i===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},l={width:e.clientWidth,height:e.clientHeight};t[o].offset.length=0;let u=!t[o].interpolate;const d=r.length;for(let e=0;emeasure(e,r.target,n),update:t=>{updateScrollInfo(e,n,t),(r.offset||r.target)&&resolveOffsets(e,n,r)},notify:isFunction(t)?()=>t(n):scrubAnimation(t,n[i])}}function scrubAnimation(e,t){return e.pause(),e.forEachNative(((e,{easing:t})=>{var n,r;if(e.updateDuration)t||(e.easing=noopReturn),e.updateDuration(1);else{const i={duration:1e3};t||(i.easing="linear"),null===(r=null===(n=e.effect)||void 0===n?void 0:n.updateTiming)||void 0===r||r.call(n,i)}})),()=>{e.currentTime=t.progress}}const scrollListeners=new WeakMap,resizeListeners=new WeakMap,onScrollHandlers=new WeakMap,getEventTarget=e=>e===document.documentElement?window:e;function scroll(e,t={}){var{container:n=document.documentElement}=t,r=__rest(t,["container"]);let i=onScrollHandlers.get(n);i||(i=new Set,onScrollHandlers.set(n,i));const o=createOnScrollHandler(n,e,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},r);if(i.add(o),!scrollListeners.has(n)){const e=()=>{const e=performance.now();for(const e of i)e.measure();for(const t of i)t.update(e);for(const e of i)e.notify()};scrollListeners.set(n,e);const t=getEventTarget(n);window.addEventListener("resize",e,{passive:!0}),n!==document.documentElement&&resizeListeners.set(n,resize(n,e)),t.addEventListener("scroll",e,{passive:!0})}const s=scrollListeners.get(n),a=requestAnimationFrame(s);return()=>{var t;"function"!=typeof e&&e.stop(),cancelAnimationFrame(a);const r=onScrollHandlers.get(n);if(!r)return;if(r.delete(o),r.size)return;const i=scrollListeners.get(n);scrollListeners.delete(n),i&&(getEventTarget(n).removeEventListener("scroll",i),null===(t=resizeListeners.get(n))||void 0===t||t(),window.removeEventListener("resize",i))}}function hasChanged(e,t){return typeof e!=typeof t||(Array.isArray(e)&&Array.isArray(t)?!shallowCompare(e,t):e!==t)}function shallowCompare(e,t){const n=t.length;if(n!==e.length)return!1;for(let r=0;re.getDepth()-t.getDepth(),fireAnimateUpdates=e=>e.animateUpdates(),fireNext=e=>e.next(),motionEvent=(e,t)=>new CustomEvent(e,{detail:{target:t}});function dispatchPointerEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:n}}))}function dispatchViewEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEntry:n}}))}const inView={isActive:e=>Boolean(e.inView),subscribe:(e,{enable:t,disable:n},{inViewOptions:r={}})=>{const{once:i}=r,o=__rest(r,["once"]);return inView$1(e,(r=>{if(t(),dispatchViewEvent(e,"viewenter",r),!i)return t=>{n(),dispatchViewEvent(e,"viewleave",t)}}),o)}},mouseEvent=(e,t,n)=>r=>{r.pointerType&&"mouse"!==r.pointerType||(n(),dispatchPointerEvent(e,t,r))},hover={isActive:e=>Boolean(e.hover),subscribe:(e,{enable:t,disable:n})=>{const r=mouseEvent(e,"hoverstart",t),i=mouseEvent(e,"hoverend",n);return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",i),()=>{e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",i)}}},press={isActive:e=>Boolean(e.press),subscribe:(e,{enable:t,disable:n})=>{const r=t=>{n(),dispatchPointerEvent(e,"pressend",t),window.removeEventListener("pointerup",r)},i=n=>{t(),dispatchPointerEvent(e,"pressstart",n),window.addEventListener("pointerup",r)};return e.addEventListener("pointerdown",i),()=>{e.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",r)}}},gestures={inView,hover,press},stateTypes=["initial","animate",...Object.keys(gestures),"exit"];function animateProgress(e,t={}){return withControls([()=>{const n=new Animation(e,[0,1],t);return n.finished.catch((()=>{})),n}],t,t.duration)}function animate(e,t,n){return(isFunction(e)?animateProgress:animate$1)(e,t,n)}export{HdtCarousel as Carousel,ClassNames,AutoHeight,navUICenter,Autoplay,navHandlers,dotHandlers,Delegate,ScrollOffset,animate,inView$1 as inView,scroll,stagger,timeline};