embla-carousel-vue
Advanced tools
Comparing version 8.0.0-rc23 to 8.0.0
{ | ||
"name": "embla-carousel-vue", | ||
"version": "8.0.0-rc23", | ||
"version": "8.0.0", | ||
"author": "David Jerleke", | ||
@@ -52,4 +52,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision", | ||
"dependencies": { | ||
"embla-carousel": "8.0.0-rc23", | ||
"embla-carousel-reactive-utils": "8.0.0-rc23" | ||
"embla-carousel": "8.0.0", | ||
"embla-carousel-reactive-utils": "8.0.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "peerDependencies": { |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselVue=t(n.Vue)}(this,(function(n){"use strict";function t(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function e(n,r){const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=n[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:t(i)&&t(c)?e(i,c):i===c}))}function r(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function o(n){return"number"==typeof n}function i(n){return"string"==typeof n}function c(n){return"boolean"==typeof n}function u(n){return"[object Object]"===Object.prototype.toString.call(n)}function s(n){return Math.abs(n)}function a(n){return Math.sign(n)}function l(n,t){return s(n-t)}function f(n){return h(n).map(Number)}function d(n){return n[p(n)]}function p(n){return Math.max(0,n.length-1)}function m(n,t){return t===p(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function h(n){return Object.keys(n)}function y(n,t){return[n,t].reduce(((n,t)=>(h(t).forEach((e=>{const r=n[e],o=t[e],i=u(r)&&u(o);n[e]=i?y(r,o):o})),n)),{})}function v(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function x(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function b(n,t,e,r){const o=x(),i=1e3/60;let c=null,u=0,a=0;function l(n){if(!a)return;c||(c=n);const o=n-c;for(c=n,u+=o;u>=i;)e(),u-=i;const f=s(u/i);r(f),a&&t.requestAnimationFrame(l)}function f(){t.cancelAnimationFrame(a),c=null,u=0,a=0}return{init:function(){o.add(n,"visibilitychange",(()=>{n.hidden&&(c=null,u=0)}))},destroy:function(){f(),o.clear()},start:function(){a||(a=t.requestAnimationFrame(l))},stop:f,update:e,render:r}}function w(n=0,t=0){const e=s(n-t);function r(t){return t<n}function o(n){return n>t}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 S(n,t,e){const{constrain:r}=w(0,n),o=n+1;let i=c(t);function c(n){return e?s((o+n)%o):r(n)}function u(){return i}function a(){return S(n,u(),e)}const l={get:u,set:function(n){return i=c(n),l},add:function(n){return a().set(u()+n)},clone:a};return l}function E(n,t,e,r,o,i,u,f,d,p,m,g,h,y,b,S,E,O,L,D){const{cross:I}=n,A=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=x(),k=x(),F=w(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},H=S?43:25;let V=!1,j=0,R=0,B=!1,N=!1,C=!1,q=!1;function G(n){const e=u.readPoint(n),r=u.readPoint(n,I),o=l(e,j),c=l(r,R);if(!N&&!q){if(!n.cancelable)return U(n);if(N=o>c,!N)return U(n)}const s=u.pointerMove(n);o>E&&(C=!0),m.useFriction(.3).useDuration(1),d.start(),i.add(t.apply(s)),n.preventDefault()}function U(n){const e=g.byDistance(0,!1).index!==h.get(),r=u.pointerUp(n)*(S?z:P)[q?"mouse":"touch"],o=function(n,t){const e=h.add(-1*a(n)),r=g.byDistance(n,!S).distance;return S||s(n)<F?r:O&&t?.5*r:g.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(s(n)<=s(t))return 0;const e=l(s(n),s(t));return s(e/n)}(r,o),c=H-10*i,f=L+i/50;N=!1,B=!1,k.clear(),m.useDuration(c).useFriction(f),p.distance(o,!S),q=!1,y.emit("pointerUp")}function $(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!D)return;function t(t){(c(D)||D(n,t))&&function(n){const t=v(n,o);if(q=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t)}(n.target))return;C=S&&t&&!n.buttons&&V,V=l(i.get(),f.get())>=2,B=!0,u.pointerDown(n),m.useFriction(0).useDuration(0),i.set(f),function(){const n=q?r:e;k.add(n,"touchmove",G,M).add(n,"touchend",U).add(n,"mousemove",G,M).add(n,"mouseup",U)}(),j=u.readPoint(n),R=u.readPoint(n,I),y.emit("pointerDown")}(t)}const s=e;T.add(s,"dragstart",(n=>n.preventDefault()),M).add(s,"touchmove",(()=>{}),M).add(s,"touchend",(()=>{})).add(s,"touchstart",t).add(s,"mousedown",t).add(s,"touchcancel",U).add(s,"contextmenu",U).add(s,"click",$,!0)},pointerDown:function(){return B},destroy:function(){T.clear(),k.clear()}}}function O(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(v(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),u=o(n)-o(r)>170,a=t/c;return c&&!u&&s(a)>.1?a:0},readPoint:i}}function L(n,t,e,r,o,i,u){let a,l,f=[],d=!1;function p(n){return o.measureSize(u.measure(n))}return{init:function(o){if(!i)return;l=p(n),f=r.map(p),a=new ResizeObserver((u=>{d||(c(i)||i(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target),a=i?l:f[u];if(s(p(i?n:r[u])-a)>=.5){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>a.observe(n)))},destroy:function(){a&&a.disconnect(),d=!0}}}function D(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),u=w(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",f=s(n[l]-t.get()),d=e.get()-t.get(),p=u.constrain(f/c);e.subtract(d*p),!o&&s(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function I(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=w(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function A(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:u}=r;function l(n){return n.concat().sort(((n,t)=>s(n)-s(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>a(n)===r));return i.length?l(i):d(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?c(e):u(e),o=t.map((n=>n-r)).map((n=>f(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>s(n.diff)-s(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(a),p=!n&&i(a);return!r||p?{index:l,distance:e}:{index:l,distance:e+f(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-o.get(),e)}},shortcut:f}}function M(n){let t=n;function e(n){return o(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function T(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function k(n,t,e,r,o,i,c,u,s,a){const l=.5,d=f(i),p=f(i).reverse(),m=function(){const n=u[0];return y(h(p,n),r,!1)}().concat(function(){const n=e-u[0]-1;return y(h(d,n),-r,!0)}());function g(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function h(n,t){return n.reduce(((n,e)=>g(n,t)>0?n.concat([e]):n),[])}function y(i,u,f){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+l+n,end:t+e-l+n})))}(u);return i.map((e=>{const o=f?0:-r,i=f?r:0,c=f?"end":"start",u=d[e][c];return{index:e,loopPoint:u,slideLocation:M(-1),translate:T(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return m.every((({index:n})=>g(d.filter((t=>t!==n)),e)<=.1))},clear:function(){m.forEach((n=>n.translate.clear()))},loop:function(){m.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:m}}function F(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver((n=>{o||(c(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function P(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return h(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function z(n,t,e,r,i,c,u,a,l,m){const{startEdge:g,endEdge:h}=n,y=o(r);return{groupSlides:function(n){return y?function(n,t){return f(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return n.length?f(n).reduce(((r,o)=>{const f=d(r)||0,y=0===f,v=o===p(n),x=c[g]-u[f][g],b=c[g]-u[o][h],w=!i&&y?t.apply(a):0;return s(b-(!i&&v?t.apply(l):0)-(x+w))>e+m&&r.push(o),v&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function H(n,t,e,r,c,u,h){const{align:y,axis:v,direction:H,startIndex:V,loop:j,duration:R,dragFree:B,dragThreshold:N,inViewThreshold:C,slidesToScroll:q,skipSnaps:G,containScroll:U,watchResize:$,watchSlides:W,watchDrag:J}=u,Q={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},X=Q.measure(t),Y=e.map(Q.measure),K=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(H),Z=function(n,t){const 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){const{width:t,height:r}=n;return"x"===e?t:r}}}(v,H),_=Z.measureSize(X),nn=function(n){return{measure:function(t){return n*(t/100)}}}(_),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return i(n)?e[n](r):n(t,r,o)}}}(y,_),en=!j&&!!U,rn=j||!!U,{slideSizes:on,slideSizesWithGaps:cn,startGap:un,endGap:sn}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:u,endEdge:a}=n,l=e[0]&&o,f=function(){if(!l)return 0;const n=e[0];return s(t[u]-n[u])}(),p=function(){if(!l)return 0;const n=i.getComputedStyle(d(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),g=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g[t]+f:o?g[t]+p:e[t+1][u]-n[u]})).map(s);return{slideSizes:g,slideSizesWithGaps:h,startGap:f,endGap:p}}(Z,X,Y,e,rn,c),an=z(Z,K,_,q,j,X,Y,un,sn,2),{snaps:ln,snapsAligned:fn}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:u}=o,a=u(r).map((n=>d(n)[c]-n[0][i])).map(s).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-s(n))),f=u(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:f}}(Z,tn,X,Y,an),dn=-d(ln)+d(cn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=w(-t+n,0),c=e.map(((n,t)=>{const{min:r,max:o}=i,c=i.constrain(n),u=!t,a=m(e,t);return u?o:a||s(r,c)?r:s(o,c)?o:c})).map((n=>parseFloat(n.toFixed(3)))),u=function(){const n=c[0],t=d(c);return w(c.lastIndexOf(n),c.indexOf(t)+1)}();function s(n,t){return l(n,t)<1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return c;const{min:e,max:s}=u;return c.slice(e,s)}(),scrollContainLimit:u}}(_,dn,fn,U,2),gn=en?pn:fn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:w(e?r-n:d(t),r)}}(dn,gn,j),yn=S(p(gn),V,j),vn=yn.clone(),xn=f(e),bn=b(r,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Pn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,dragHandler:c,animation:u,eventHandler:s,options:{loop:a}},l)=>{const f=n.velocity(),d=n.settled();d&&!c.pointerDown()&&(u.stop(),s.emit("settle")),d||s.emit("scroll"),r.set(e.get()-f+f*l),a&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Pn,n))),wn=gn[yn.get()],Sn=M(wn),En=M(wn),On=M(wn),Ln=function(n,t,e,r,o){let i=0,c=0,u=r,l=o,f=n.get(),d=0;function p(n){return u=n,g}function m(n){return l=n,g}const g={direction:function(){return c},duration:function(){return u},velocity:function(){return i},seek:function(){const t=e.get()-n.get();let r=0;return u?(i+=t/u,i*=l,f+=i,n.add(i),r=f-d):(i=0,n.set(e),r=t),c=a(r),d=f,g},settled:function(){return s(e.get()-t.get())<.001},useBaseFriction:function(){return m(o)},useBaseDuration:function(){return p(r)},useFriction:m,useDuration:p};return g}(Sn,En,On,R,.68),Dn=A(j,gn,dn,hn,On),In=function(n,t,e,r,o,i,c){function u(o){const u=o.distance,s=o.index!==t.get();i.add(u),u&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(o.index),c.emit("select"))}return{distance:function(n,t){u(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);u(o.byIndex(r.get(),e))}}}(bn,yn,vn,Ln,Dn,On,h),An=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),Mn=x(),Tn=P(t,e,h,C),{slideRegistry:kn}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:s}=r;return{slideRegistry:function(){const r=c(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(u,s).map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g(d(e[0])+1):o?g(p(i)-d(e)[0]+1,d(e)[0]):n}))}()}}(en,U,gn,mn,an,xn),Fn=function(n,t,e,r,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));o(a)&&(i.useDuration(0),r.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,kn,In,Ln,Mn),Pn={ownerDocument:r,ownerWindow:c,eventHandler:h,containerRect:X,slideRects:Y,animation:bn,axis:Z,direction:K,dragHandler:E(Z,K,n,r,c,On,O(Z,c),Sn,bn,In,Ln,Dn,yn,h,nn,B,N,G,.68,J),eventStore:Mn,percentOfView:nn,index:yn,indexPrevious:vn,limit:hn,location:Sn,offsetLocation:En,options:u,resizeHandler:L(t,h,c,e,Z,$,Q),scrollBody:Ln,scrollBounds:D(hn,Sn,On,Ln,nn),scrollLooper:I(dn,hn,En,[Sn,En,On]),scrollProgress:An,scrollSnapList:gn.map(An.get),scrollSnaps:gn,scrollTarget:Dn,scrollTo:In,slideLooper:k(Z,K,_,dn,on,cn,ln,gn,En,e),slideFocus:Fn,slidesHandler:F(t,h,W),slidesInView:Tn,slideIndexes:xn,slideRegistry:kn,slidesToScroll:an,target:On,translate:T(Z,K,t)};return Pn}const V={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};function j(n){function t(n,t){return y(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=h(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>h(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function R(n,t,e){const r=n.ownerDocument,o=r.defaultView,c=j(o),u=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),s=x(),a=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{mergeOptions:l,optionsAtMedia:f,optionsMediaQueries:d}=c,{on:p,off:m,emit:g}=a,h=A;let y,v,b,w,S=!1,E=l(V,R.globalOptions),O=l(E),L=[];function D(t){const e=H(n,b,w,r,o,t,a);if(t.loop&&!e.slideLooper.canLoop()){return D(Object.assign({},t,{loop:!1}))}return e}function I(t,e){S||(E=l(E,t),O=f(E),L=e||L,function(){const{container:t,slides:e}=O,r=i(t)?n.querySelector(t):t;b=r||n.children[0];const o=i(e)?b.querySelectorAll(e):e;w=[].slice.call(o||b.children)}(),y=D(O),d([E,...L.map((({options:n})=>n))]).forEach((n=>s.add(n,"change",A))),O.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(),y.eventHandler.init(F),y.resizeHandler.init(F),y.slidesHandler.init(F),y.options.loop&&y.slideLooper.loop(),b.offsetParent&&w.length&&y.dragHandler.init(F),v=u.init(F,L)))}function A(n,t){const e=k();M(),I(l({startIndex:e},n),t),a.emit("reInit")}function M(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),u.destroy(),s.clear()}function T(n,t,e){O.active&&!S&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:O.duration),y.scrollTo.index(n,e||0))}function k(){return y.index.get()}const F={canScrollNext:function(){return y.index.add(1).get()!==k()},canScrollPrev:function(){return y.index.add(-1).get()!==k()},containerNode:function(){return b},internalEngine:function(){return y},destroy:function(){S||(S=!0,s.clear(),M(),a.emit("destroy"))},off:m,on:p,emit:g,plugins:function(){return v},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:h,rootNode:function(){return n},scrollNext:function(n){T(y.index.add(1).get(),n,-1)},scrollPrev:function(n){T(y.index.add(-1).get(),n,1)},scrollProgress:function(){return y.scrollProgress.get(y.location.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:T,selectedScrollSnap:k,slideNodes:function(){return w},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return I(t,e),setTimeout((()=>a.emit("init")),0),F}function B(t={},o=[]){const i=n.ref(n.isRef(t)?t.value:t),c=n.ref(n.isRef(o)?o.value:o),u=n.ref(),s=n.ref();function a(){s.value&&s.value.reInit(i.value,c.value)}return n.onMounted((()=>{"undefined"!=typeof window&&window.document&&window.document.createElement&&u.value&&(R.globalOptions=B.globalOptions,s.value=R(u.value,i.value,c.value))})),n.onBeforeUnmount((()=>{s.value&&s.value.destroy()})),n.isRef(t)&&n.watch(t,(n=>{e(i.value,n)||(i.value=n,a())})),n.isRef(o)&&n.watch(o,(n=>{(function(n,t){if(n.length!==t.length)return!1;const o=r(n),i=r(t);return o.every(((n,t)=>e(n,i[t])))})(c.value,n)||(c.value=n,a())})),[u,s]}return R.globalOptions=void 0,B.globalOptions=void 0,B})); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselVue=t(n.Vue)}(this,(function(n){"use strict";function t(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function e(n,r){const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=n[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:t(i)&&t(c)?e(i,c):i===c}))}function r(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function o(n){return"number"==typeof n}function i(n){return"string"==typeof n}function c(n){return"boolean"==typeof n}function u(n){return"[object Object]"===Object.prototype.toString.call(n)}function s(n){return Math.abs(n)}function a(n){return Math.sign(n)}function l(n,t){return s(n-t)}function f(n){return h(n).map(Number)}function d(n){return n[p(n)]}function p(n){return Math.max(0,n.length-1)}function m(n,t){return t===p(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function h(n){return Object.keys(n)}function y(n,t){return[n,t].reduce(((n,t)=>(h(t).forEach((e=>{const r=n[e],o=t[e],i=u(r)&&u(o);n[e]=i?y(r,o):o})),n)),{})}function v(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function x(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function b(n,t,e,r){const o=x(),i=1e3/60;let c=null,u=0,a=0;function l(n){if(!a)return;c||(c=n);const o=n-c;for(c=n,u+=o;u>=i;)e(),u-=i;const f=s(u/i);r(f),a&&t.requestAnimationFrame(l)}function f(){t.cancelAnimationFrame(a),c=null,u=0,a=0}return{init:function(){o.add(n,"visibilitychange",(()=>{n.hidden&&(c=null,u=0)}))},destroy:function(){f(),o.clear()},start:function(){a||(a=t.requestAnimationFrame(l))},stop:f,update:e,render:r}}function w(n=0,t=0){const e=s(n-t);function r(t){return t<n}function o(n){return n>t}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 S(n,t,e){const{constrain:r}=w(0,n),o=n+1;let i=c(t);function c(n){return e?s((o+n)%o):r(n)}function u(){return i}function a(){return S(n,u(),e)}const l={get:u,set:function(n){return i=c(n),l},add:function(n){return a().set(u()+n)},clone:a};return l}function E(n,t,e,r,o,i,u,f,d,p,m,g,h,y,b,S,E,O,L,D){const{cross:I}=n,A=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=x(),k=x(),F=w(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},H=S?43:25;let V=!1,j=0,R=0,B=!1,N=!1,C=!1,q=!1;function G(n){const e=u.readPoint(n),r=u.readPoint(n,I),o=l(e,j),c=l(r,R);if(!N&&!q){if(!n.cancelable)return U(n);if(N=o>c,!N)return U(n)}const s=u.pointerMove(n);o>E&&(C=!0),m.useFriction(.3).useDuration(1),d.start(),i.add(t.apply(s)),n.preventDefault()}function U(n){const e=g.byDistance(0,!1).index!==h.get(),r=u.pointerUp(n)*(S?z:P)[q?"mouse":"touch"],o=function(n,t){const e=h.add(-1*a(n)),r=g.byDistance(n,!S).distance;return S||s(n)<F?r:O&&t?.5*r:g.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(s(n)<=s(t))return 0;const e=l(s(n),s(t));return s(e/n)}(r,o),c=H-10*i,f=L+i/50;N=!1,B=!1,k.clear(),m.useDuration(c).useFriction(f),p.distance(o,!S),q=!1,y.emit("pointerUp")}function $(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!D)return;function t(t){(c(D)||D(n,t))&&function(n){const t=v(n,o);if(q=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t)}(n.target))return;C=S&&t&&!n.buttons&&V,V=l(i.get(),f.get())>=2,B=!0,u.pointerDown(n),m.useFriction(0).useDuration(0),i.set(f),function(){const n=q?r:e;k.add(n,"touchmove",G,M).add(n,"touchend",U).add(n,"mousemove",G,M).add(n,"mouseup",U)}(),j=u.readPoint(n),R=u.readPoint(n,I),y.emit("pointerDown")}(t)}const s=e;T.add(s,"dragstart",(n=>n.preventDefault()),M).add(s,"touchmove",(()=>{}),M).add(s,"touchend",(()=>{})).add(s,"touchstart",t).add(s,"mousedown",t).add(s,"touchcancel",U).add(s,"contextmenu",U).add(s,"click",$,!0)},pointerDown:function(){return B},destroy:function(){T.clear(),k.clear()}}}function O(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(v(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),u=o(n)-o(r)>170,a=t/c;return c&&!u&&s(a)>.1?a:0},readPoint:i}}function L(n,t,e,r,o,i,u){let a,l,f=[],d=!1;function p(n){return o.measureSize(u.measure(n))}return{init:function(o){if(!i)return;l=p(n),f=r.map(p),a=new ResizeObserver((u=>{d||(c(i)||i(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target),a=i?l:f[u];if(s(p(i?n:r[u])-a)>=.5){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>a.observe(n)))},destroy:function(){a&&a.disconnect(),d=!0}}}function D(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),u=w(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",f=s(n[l]-t.get()),d=e.get()-t.get(),p=u.constrain(f/c);e.subtract(d*p),!o&&s(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function I(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=w(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function A(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:u}=r;function l(n){return n.concat().sort(((n,t)=>s(n)-s(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>a(n)===r));return i.length?l(i):d(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?c(e):u(e),o=t.map((n=>n-r)).map((n=>f(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>s(n.diff)-s(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(a),p=!n&&i(a);return!r||p?{index:l,distance:e}:{index:l,distance:e+f(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-o.get(),e)}},shortcut:f}}function M(n){let t=n;function e(n){return o(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function T(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function k(n,t,e,r,o,i,c,u,s,a){const l=.5,d=f(i),p=f(i).reverse(),m=function(){const n=u[0];return y(h(p,n),r,!1)}().concat(function(){const n=e-u[0]-1;return y(h(d,n),-r,!0)}());function g(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function h(n,t){return n.reduce(((n,e)=>g(n,t)>0?n.concat([e]):n),[])}function y(i,u,f){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+l+n,end:t+e-l+n})))}(u);return i.map((e=>{const o=f?0:-r,i=f?r:0,c=f?"end":"start",u=d[e][c];return{index:e,loopPoint:u,slideLocation:M(-1),translate:T(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return m.every((({index:n})=>g(d.filter((t=>t!==n)),e)<=.1))},clear:function(){m.forEach((n=>n.translate.clear()))},loop:function(){m.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:m}}function F(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver((n=>{o||(c(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function P(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return h(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function z(n,t,e,r,i,c,u,a,l,m){const{startEdge:g,endEdge:h}=n,y=o(r);return{groupSlides:function(n){return y?function(n,t){return f(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return n.length?f(n).reduce(((r,o)=>{const f=d(r)||0,y=0===f,v=o===p(n),x=c[g]-u[f][g],b=c[g]-u[o][h],w=!i&&y?t.apply(a):0;return s(b-(!i&&v?t.apply(l):0)-(x+w))>e+m&&r.push(o),v&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function H(n,t,e,r,c,u,h){const{align:y,axis:v,direction:H,startIndex:V,loop:j,duration:R,dragFree:B,dragThreshold:N,inViewThreshold:C,slidesToScroll:q,skipSnaps:G,containScroll:U,watchResize:$,watchSlides:W,watchDrag:J}=u,Q={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},X=Q.measure(t),Y=e.map(Q.measure),K=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(H),Z=function(n,t){const 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){const{width:t,height:r}=n;return"x"===e?t:r}}}(v,H),_=Z.measureSize(X),nn=function(n){return{measure:function(t){return n*(t/100)}}}(_),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return i(n)?e[n](r):n(t,r,o)}}}(y,_),en=!j&&!!U,rn=j||!!U,{slideSizes:on,slideSizesWithGaps:cn,startGap:un,endGap:sn}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:u,endEdge:a}=n,l=e[0]&&o,f=function(){if(!l)return 0;const n=e[0];return s(t[u]-n[u])}(),p=function(){if(!l)return 0;const n=i.getComputedStyle(d(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),g=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g[t]+f:o?g[t]+p:e[t+1][u]-n[u]})).map(s);return{slideSizes:g,slideSizesWithGaps:h,startGap:f,endGap:p}}(Z,X,Y,e,rn,c),an=z(Z,K,_,q,j,X,Y,un,sn,2),{snaps:ln,snapsAligned:fn}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:u}=o,a=u(r).map((n=>d(n)[c]-n[0][i])).map(s).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-s(n))),f=u(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:f}}(Z,tn,X,Y,an),dn=-d(ln)+d(cn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=w(-t+n,0),c=e.map(((n,t)=>{const{min:r,max:o}=i,c=i.constrain(n),u=!t,a=m(e,t);return u?o:a||s(r,c)?r:s(o,c)?o:c})).map((n=>parseFloat(n.toFixed(3)))),u=function(){const n=c[0],t=d(c);return w(c.lastIndexOf(n),c.indexOf(t)+1)}();function s(n,t){return l(n,t)<1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return c;const{min:e,max:s}=u;return c.slice(e,s)}(),scrollContainLimit:u}}(_,dn,fn,U,2),gn=en?pn:fn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:w(e?r-n:d(t),r)}}(dn,gn,j),yn=S(p(gn),V,j),vn=yn.clone(),xn=f(e),bn=b(r,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Pn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,dragHandler:c,animation:u,eventHandler:s,options:{loop:a}},l)=>{const f=n.velocity(),d=n.settled();d&&!c.pointerDown()&&(u.stop(),s.emit("settle")),d||s.emit("scroll"),r.set(e.get()-f+f*l),a&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Pn,n))),wn=gn[yn.get()],Sn=M(wn),En=M(wn),On=M(wn),Ln=function(n,t,e,r,o){let i=0,c=0,u=r,l=o,f=n.get(),d=0;function p(n){return u=n,g}function m(n){return l=n,g}const g={direction:function(){return c},duration:function(){return u},velocity:function(){return i},seek:function(){const t=e.get()-n.get();let r=0;return u?(i+=t/u,i*=l,f+=i,n.add(i),r=f-d):(i=0,n.set(e),r=t),c=a(r),d=f,g},settled:function(){return s(e.get()-t.get())<.001},useBaseFriction:function(){return m(o)},useBaseDuration:function(){return p(r)},useFriction:m,useDuration:p};return g}(Sn,En,On,R,.68),Dn=A(j,gn,dn,hn,On),In=function(n,t,e,r,o,i,c){function u(o){const u=o.distance,s=o.index!==t.get();i.add(u),u&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(o.index),c.emit("select"))}return{distance:function(n,t){u(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);u(o.byIndex(r.get(),e))}}}(bn,yn,vn,Ln,Dn,On,h),An=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),Mn=x(),Tn=P(t,e,h,C),{slideRegistry:kn}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:s}=r;return{slideRegistry:function(){const r=c(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(u,s).map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g(d(e[0])+1):o?g(p(i)-d(e)[0]+1,d(e)[0]):n}))}()}}(en,U,gn,mn,an,xn),Fn=function(n,t,e,r,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));o(a)&&(i.useDuration(0),r.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,kn,In,Ln,Mn),Pn={ownerDocument:r,ownerWindow:c,eventHandler:h,containerRect:X,slideRects:Y,animation:bn,axis:Z,direction:K,dragHandler:E(Z,K,n,r,c,On,O(Z,c),Sn,bn,In,Ln,Dn,yn,h,nn,B,N,G,.68,J),eventStore:Mn,percentOfView:nn,index:yn,indexPrevious:vn,limit:hn,location:Sn,offsetLocation:En,options:u,resizeHandler:L(t,h,c,e,Z,$,Q),scrollBody:Ln,scrollBounds:D(hn,En,On,Ln,nn),scrollLooper:I(dn,hn,En,[Sn,En,On]),scrollProgress:An,scrollSnapList:gn.map(An.get),scrollSnaps:gn,scrollTarget:Dn,scrollTo:In,slideLooper:k(Z,K,_,dn,on,cn,ln,gn,En,e),slideFocus:Fn,slidesHandler:F(t,h,W),slidesInView:Tn,slideIndexes:xn,slideRegistry:kn,slidesToScroll:an,target:On,translate:T(Z,K,t)};return Pn}const V={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};function j(n){function t(n,t){return y(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=h(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>h(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function R(n,t,e){const r=n.ownerDocument,o=r.defaultView,c=j(o),u=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),s=x(),a=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{mergeOptions:l,optionsAtMedia:f,optionsMediaQueries:d}=c,{on:p,off:m,emit:g}=a,h=A;let y,v,b,w,S=!1,E=l(V,R.globalOptions),O=l(E),L=[];function D(t){const e=H(n,b,w,r,o,t,a);if(t.loop&&!e.slideLooper.canLoop()){return D(Object.assign({},t,{loop:!1}))}return e}function I(t,e){S||(E=l(E,t),O=f(E),L=e||L,function(){const{container:t,slides:e}=O,r=i(t)?n.querySelector(t):t;b=r||n.children[0];const o=i(e)?b.querySelectorAll(e):e;w=[].slice.call(o||b.children)}(),y=D(O),d([E,...L.map((({options:n})=>n))]).forEach((n=>s.add(n,"change",A))),O.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(),y.eventHandler.init(F),y.resizeHandler.init(F),y.slidesHandler.init(F),y.options.loop&&y.slideLooper.loop(),b.offsetParent&&w.length&&y.dragHandler.init(F),v=u.init(F,L)))}function A(n,t){const e=k();M(),I(l({startIndex:e},n),t),a.emit("reInit")}function M(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),u.destroy(),s.clear()}function T(n,t,e){O.active&&!S&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:O.duration),y.scrollTo.index(n,e||0))}function k(){return y.index.get()}const F={canScrollNext:function(){return y.index.add(1).get()!==k()},canScrollPrev:function(){return y.index.add(-1).get()!==k()},containerNode:function(){return b},internalEngine:function(){return y},destroy:function(){S||(S=!0,s.clear(),M(),a.emit("destroy"))},off:m,on:p,emit:g,plugins:function(){return v},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:h,rootNode:function(){return n},scrollNext:function(n){T(y.index.add(1).get(),n,-1)},scrollPrev:function(n){T(y.index.add(-1).get(),n,1)},scrollProgress:function(){return y.scrollProgress.get(y.location.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:T,selectedScrollSnap:k,slideNodes:function(){return w},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return I(t,e),setTimeout((()=>a.emit("init")),0),F}function B(t={},o=[]){const i=n.ref(n.isRef(t)?t.value:t),c=n.ref(n.isRef(o)?o.value:o),u=n.ref(),s=n.ref();function a(){s.value&&s.value.reInit(i.value,c.value)}return n.onMounted((()=>{"undefined"!=typeof window&&window.document&&window.document.createElement&&u.value&&(R.globalOptions=B.globalOptions,s.value=R(u.value,i.value,c.value))})),n.onBeforeUnmount((()=>{s.value&&s.value.destroy()})),n.isRef(t)&&n.watch(t,(n=>{e(i.value,n)||(i.value=n,a())})),n.isRef(o)&&n.watch(o,(n=>{(function(n,t){if(n.length!==t.length)return!1;const o=r(n),i=r(t);return o.every(((n,t)=>e(n,i[t])))})(c.value,n)||(c.value=n,a())})),[u,s]}return R.globalOptions=void 0,B.globalOptions=void 0,B})); |
{ | ||
"name": "embla-carousel-vue", | ||
"version": "8.0.0-rc23", | ||
"version": "8.0.0", | ||
"author": "David Jerleke", | ||
@@ -52,4 +52,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision", | ||
"dependencies": { | ||
"embla-carousel": "8.0.0-rc23", | ||
"embla-carousel-reactive-utils": "8.0.0-rc23" | ||
"embla-carousel": "8.0.0", | ||
"embla-carousel-reactive-utils": "8.0.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "peerDependencies": { |
{ | ||
"name": "embla-carousel-vue", | ||
"version": "8.0.0-rc23", | ||
"version": "8.0.0", | ||
"author": "David Jerleke", | ||
@@ -63,4 +63,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision", | ||
"dependencies": { | ||
"embla-carousel": "8.0.0-rc23", | ||
"embla-carousel-reactive-utils": "8.0.0-rc23" | ||
"embla-carousel": "8.0.0", | ||
"embla-carousel-reactive-utils": "8.0.0" | ||
}, | ||
@@ -67,0 +67,0 @@ "peerDependencies": { |
@@ -57,22 +57,20 @@ <br /> | ||
</a> | ||
| ||
<a href="https://www.embla-carousel.com/get-started/module/"> | ||
<img src="https://www.embla-carousel.com/typescript-logo.svg" width="40" height="40" /> | ||
</a> | ||
| ||
<a href="https://www.embla-carousel.com/get-started/react/"> | ||
<img src="https://www.embla-carousel.com/react-logo.svg" width="40" height="40" /> | ||
</a> | ||
| ||
<a href="https://www.embla-carousel.com/get-started/vue/"> | ||
<img src="https://www.embla-carousel.com/vue-logo.svg" width="40" height="40" /> | ||
</a> | ||
| ||
<a href="https://www.embla-carousel.com/get-started/svelte/"> | ||
<img src="https://www.embla-carousel.com/svelte-logo.svg" width="40" height="40" /> | ||
</a> | ||
| ||
<a href="https://www.embla-carousel.com/get-started/solid/"> | ||
<img src="https://www.embla-carousel.com/solid-logo.svg" width="40" height="40" /> | ||
</a> | ||
<a href="https://github.com/donaldxdonald/embla-carousel-angular?tab=readme-ov-file#installation"> | ||
<img src="https://www.embla-carousel.com/angular-logo.svg" width="40" height="40" /> | ||
</a> | ||
</p> | ||
@@ -145,4 +143,4 @@ </div> | ||
<img src="https://avatars2.githubusercontent.com/u/75290989?s=120&v=4" title="fcasibu" width="50" height="50" style="max-width: 100%" /> | ||
</a><a href="https://github.com/sedlukha"> | ||
<img src="https://avatars2.githubusercontent.com/u/14075940?s=120&v=4" title="sedlukha" width="50" height="50" style="max-width: 100%" /> | ||
</a><a href="https://github.com/cundd"> | ||
<img src="https://avatars2.githubusercontent.com/u/743122?s=120&v=4" title="cundd" width="50" height="50" style="max-width: 100%" /> | ||
</a> | ||
@@ -159,10 +157,22 @@ </p> | ||
<p align="center"> | ||
Special thanks to <a href="https://github.com/gunnarx2">gunnarx2</a> for creating the React wrapper <a href="https://www.embla-carousel.com/get-started/react/">useEmblaCarousel</a>, to <a href="https://github.com/xiel">xiel</a> for creating the <a href="https://github.com/xiel/embla-carousel-wheel-gestures">Embla Carousel Wheel Gestures</a> plugin, to <a href="https://github.com/LiamMartens">LiamMartens</a> for creating the Solid wrapper <a href="https://www.embla-carousel.com/get-started/solid/">createEmblaCarousel</a>, and to <a href="https://github.com/zaaakher">zaaakher</a> for your continuous and awesome contributions. | ||
<sup> | ||
<a href="https://github.com/gunnarx2">gunnarx2</a> - React wrapper <a href="https://www.embla-carousel.com/get-started/react/">useEmblaCarousel</a>. | ||
</sup> | ||
<br> | ||
<sup> | ||
<a href="https://github.com/LiamMartens">LiamMartens</a> - Solid wrapper <a href="https://www.embla-carousel.com/get-started/solid/">createEmblaCarousel</a>. | ||
</sup> | ||
<br> | ||
<sup> | ||
<a href="https://github.com/donaldxdonald">donaldxdonald</a>, <a href="https://github.com/zip-fa">zip-fa</a>, <a href="https://github.com/JeanMeche">JeanMeche</a> - Angular wrapper <a href="https://github.com/donaldxdonald/embla-carousel-angular?tab=readme-ov-file#installation">EmblaCarouselDirective</a>. | ||
</sup> | ||
<br> | ||
<sup> | ||
<a href="https://github.com/xiel">xiel</a> - Plugin <a href="https://github.com/xiel/embla-carousel-wheel-gestures">Embla Carousel Wheel Gestures</a>. | ||
</sup> | ||
<br> | ||
<sup> | ||
<a href="https://github.com/zaaakher">zaaakher</a> - Contributing <a href="https://github.com/davidjerleke/embla-carousel/blob/master/CONTRIBUTING.md">guidelines</a>. | ||
</sup> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/gunnarx2"><img src="https://avatars2.githubusercontent.com/u/10469652?s=120&v=4" title="gunnarx2" width="50" height="50" style="max-width:100%;"></a> | ||
<a href="https://github.com/xiel"><img src="https://avatars0.githubusercontent.com/u/615522?s=120&v=4" title="xiel" width="50" height="50" style="max-width:100%;"></a> | ||
<a href="https://github.com/LiamMartens"><img src="https://avatars0.githubusercontent.com/u/5265324?s=120&v=4" title="LiamMartens" width="50" height="50" style="max-width:100%;"></a> | ||
<a href="https://github.com/zaaakher"><img src="https://avatars0.githubusercontent.com/u/46135573?s=120&v=4" title="zaaakher" width="50" height="50" style="max-width:100%;"></a> | ||
</p> | ||
</div> | ||
@@ -175,4 +185,5 @@ | ||
<p align="center"> | ||
<sup>Copyright © 2019-present, David Jerleke.</sup><br> | ||
Embla is <a href="https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE">MIT licensed</a> 💖. | ||
Embla is <a href="https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE">MIT licensed</a> 💖.<br><br> | ||
<sup>Embla Carousel - Copyright © 2019-present.</sup><br /> | ||
<sup>Package created by David Jerleke.</sup> | ||
</p> | ||
@@ -179,0 +190,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
200
47336
+ Addedembla-carousel@8.0.0(transitive)
+ Addedembla-carousel-reactive-utils@8.0.0(transitive)
+ Addedmagic-string@0.30.14(transitive)
- Removedembla-carousel@8.0.0-rc23(transitive)
- Removedembla-carousel-reactive-utils@8.0.0-rc23(transitive)
- Removedmagic-string@0.30.13(transitive)
Updatedembla-carousel@8.0.0