uikit 3.16.4-dev.7435f34d2 → 3.16.4-dev.a8da41c36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +3 -6
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +6 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +6 -2
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +31 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +6 -2
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +24 -29
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +56 -35
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -2
- package/src/js/api/hooks.js +2 -6
- package/src/js/components/filter.js +2 -6
- package/src/js/components/slider.js +33 -0
- package/src/js/core/cover.js +4 -4
- package/src/js/core/drop.js +2 -1
- package/src/js/core/height-match.js +5 -10
- package/src/js/core/scrollspy.js +1 -2
- package/src/js/mixin/slider.js +5 -1
- package/src/js/util/lang.js +7 -7
- package/src/js/util/observer.js +3 -1
- package/src/js/util/viewport.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.7435f34d2 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],m):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=m(s.UIkit.util))})(this,function(s){"use strict";var m={connected(){s.addClass(this.$el,this.$options.id)}},W={props:{i18n:Object},data:{i18n:null},methods:{t(e,...t){var i,n,h;let r=0;return((h=((i=this.i18n)==null?void 0:i[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:h.replace(/%s/g,()=>t[r++]||""))||""}}},z={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}};function b(e,t=e.$el,i=""){if(t.id)return t.id;let n=`${e.$options.id}-${e._uid}${i}`;return s.$(`#${n}`)&&(n=b(e,t,`${i}-2`)),n}const p={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:e},t){return s.$(e,t)},watch(e,t){s.attr(e,"role","tablist"),t&&this.$emit()},immediate:!0},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems:{get(e,t){return s.$$(this.selNavItem,t)},watch(){this.$emit()}}},connected(){s.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((e,t)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",t+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>`<li ${this.attrItem}="${t}"><a href></a></li>`).join("")),s.attr(s.children(this.nav).concat(this.list),"role","presentation");for(const e of this.navItems){const t=s.data(e,this.attrItem),i=s.$("a,button",e)||e;let n,h=null;if(s.isNumeric(t)){const r=s.toNumber(t),c=this.slides[r];c&&(c.id||(c.id=b(this,c,`-item-${t}`)),h=c.id),n=this.t("slideX",s.toFloat(t)+1),s.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=b(this,this.list,"-items")),h=this.list.id),n=this.t(t);s.attr(i,{"aria-controls":h,"aria-label":s.attr(i,"aria-label")||n})}}},{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){s.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===p.SPACE)&&(e.preventDefault(),this.show(s.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:t,keyCode:i}=e,n=s.data(t,this.attrItem);if(!s.isNumeric(n))return;let h=i===p.HOME?0:i===p.END?"last":i===p.LEFT?"previous":i===p.RIGHT?"next":-1;~h&&(e.preventDefault(),this.show(h))}}],methods:{updateNav(){const e=this.getValidIndex();let t,i;for(const n of this.navItems){const h=s.data(n,this.attrItem),r=s.$("a,button",n)||n;if(s.isNumeric(h)){const d=s.toNumber(h)===e;s.toggleClass(n,this.clsActive,d),s.attr(r,{"aria-selected":d,tabindex:d?null:-1}),d&&(i=r),t=t||s.matches(r,":focus")}else s.toggleClass(n,"uk-invisible",this.finite&&(h==="previous"&&e===0||h==="next"&&e>=this.maxIndex));t&&i&&i.focus()}}}};const $={passive:!1,capture:!0},_={passive:!0,capture:!0},P="touchstart mousedown",y="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var B={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,t(i)}}},events:[{name:P,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&j(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:y,el(){return this.list},handler:s.noop,...$}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,y,this.move,$),s.on(document,N,this.end,_),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:i}=this;let{prevIndex:n}=this,h=Math.abs(t),r=this.getIndex(n+this.dir,n),c=this._getDistance(n,r)||i[n].offsetWidth;for(;r!==n&&h>c;)this.drag-=c*this.dir,n=r,h-=c,r=this.getIndex(n+this.dir,n),c=this._getDistance(n,r)||i[n].offsetWidth;this.percent=h/c;const d=i[n],l=i[r],a=this.index!==r,o=n===r;let f;[this.index,this.prevIndex].filter(g=>!s.includes([r,n],g)).forEach(g=>{s.trigger(i[g],"itemhidden",[this]),o&&(f=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),a&&(this.prevIndex=n,this.index=r,!o&&s.trigger(d,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!o&&l),a&&(!o&&s.trigger(d,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,y,this.move,$),s.off(document,N,this.end,_),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function j(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var F={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live","polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}},{name:`${s.pointerEnter} focusin`,filter(){return this.autoplay},handler:"stopAutoplay"},{name:`${s.pointerLeave} focusout`,filter(){return this.autoplay},handler:"startAutoplay"}],methods:{startAutoplay(){this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),s.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),s.attr(this.list,"aria-live","polite")}}},H={mixins:[F,B,L,z,W],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},t){return C(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},methods:{show(e,t=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,h=t?0:n.length,r=()=>{n.splice(h,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const c=this.getIndex(this.index),d=s.hasClass(this.slides,this.clsActive)&&this.slides[c],l=this.getIndex(e,this.index),a=this.slides[l];if(d===a){r();return}if(this.dir=V(e,c),this.prevIndex=c,this.index=l,d&&!s.trigger(d,"beforeitemhide",[this])||!s.trigger(a,"beforeitemshow",[this,d])){this.index=this.prevIndex,r();return}const o=this._show(d,a,t).then(()=>{d&&s.trigger(d,"itemhidden",[this]),s.trigger(a,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return d&&s.trigger(d,"itemhide",[this]),s.trigger(a,"itemshow",[this]),o},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,i){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:i?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,i=this.index){const n=this._getTransitioner(t===i?!1:t,i);return n.translate(e),n},_getTransitioner(e=this.prevIndex,t=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,i*(s.isRtl?-1:1),n)}}};function V(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function C(e){return .5*e+300}var q={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},G={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(i,n)=>{for(const h of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',h).slice(0,this.preload-1).forEach(r=>s.removeAttr(r,"loading"));for(const h of i.filter(({isIntersecting:r})=>r).map(({target:r})=>r))n.unobserve(h)}))}}},X={mixins:[G],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function M(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function J(e,t,i,{center:n,easing:h,list:r}){const c=new s.Deferred,d=e?v(e,r,n):v(t,r,n)+s.dimensions(t).width*i,l=t?v(t,r,n):d+s.dimensions(e).width*i*(s.isRtl?-1:1);return{dir:i,show(a,o=0,f){const g=f?"linear":h;return a-=Math.round(a*s.clamp(o,-1,1)),this.translate(o),o=e?o:s.clamp(o,0,1),A(this.getItemIn(),"itemin",{percent:o,duration:a,timing:g,dir:i}),e&&A(this.getItemIn(!0),"itemout",{percent:1-o,duration:a,timing:g,dir:i}),s.Transition.start(r,{transform:M(-l*(s.isRtl?-1:1),"px")},a,g).then(c.resolve,s.noop),c.promise},cancel(){s.Transition.cancel(r)},reset(){s.css(r,"transform","")},forward(a,o=this.percent()){return s.Transition.cancel(r),this.show(a,o,!0)},translate(a){const o=this.getDistance()*i*(s.isRtl?-1:1);s.css(r,"transform",M(s.clamp(-l+(o-o*a),-I(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),x=this.getItemIn(!0);a=e?s.clamp(a,-1,1):0;for(const u of s.children(r)){const D=s.includes(f,u),R=u===g,O=u===x,Z=R||!O&&(D||i*(s.isRtl?-1:1)===-1^w(u,r)>w(e||t));A(u,`itemtranslate${Z?"in":"out"}`,{dir:i,percent:O?1-a:R?a:D?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+d)/(l-d))},getDistance(){return Math.abs(l-d)},getItemIn(a=!1){let o=this.getActives(),f=T(r,v(t||e,r,n));if(a){const g=o;o=f,f=g}return f[s.findIndex(f,g=>!s.includes(o,g))]},getActives(){return T(r,v(e||t,r,n))}}}function v(e,t,i){const n=w(e,t);return i?n-K(e,t):Math.min(n,E(t))}function E(e){return Math.max(0,I(e)-s.dimensions(e).width)}function I(e){return s.sumBy(s.children(e),t=>s.dimensions(t).width)}function K(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function w(e,t){return e&&(s.position(e).left+(s.isRtl?s.dimensions(e).width-s.dimensions(t).width:0))*(s.isRtl?-1:1)||0}function T(e,t){t-=1;const i=s.dimensions(e).width,n=t+i+2;return s.children(e).filter(h=>{const r=w(h,e),c=r+Math.min(s.dimensions(h).width,i);return r>=t&&c<=n})}function A(e,t,i){s.trigger(e,s.createEvent(t,!1,!1,i))}var S={mixins:[m,H,q,X],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:J},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:e}){return e||Q(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return s.last(this.sets);let e=0;const t=E(this.list),i=s.findIndex(this.slides,n=>{if(e>=t)return!0;e+=s.dimensions(n).width});return~i?i:this.length-1},sets({sets:e}){if(!e)return;let t=0;const i=[],n=s.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=s.dimensions(this.slides[h]).width;t+r>n&&(t=0),this.center?t<n/2&&t+r+s.dimensions(this.slides[+h+1]).width/2>n/2&&(i.push(+h),t=n/2-r/2):t===0&&i.push(Math.min(+h,this.maxIndex)),t+=r}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},update:{write(){for(const e of this.navItems){const t=s.toNumber(s.data(e,this.attrItem));t!==!1&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!s.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(e){!this.dragging&&this.sets&&this.stack.length<2&&!s.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let n=0;n<t;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}const i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=C(this.avgWidth/this.velocity)*(s.dimensions(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const e=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>s.css(h,"order",this.dir>0&&r<e?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[e];let i=s.dimensions(this.list).width/2-s.dimensions(t).width/2,n=0;for(;i>0;){const h=this.getIndex(--n+e,e),r=this.slides[h];s.css(r,"order",h>e?-2:-1),i-=s.dimensions(r).width}},updateActiveClasses(){const e=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||s.includes(this.sets,s.toFloat(this.index)))&&this.clsActivated||""];for(const i of this.slides){const n=s.includes(e,i);s.toggleClass(i,t,n),s.attr(i,"aria-hidden",!n),s.attr(s.$$(s.selFocusable,i),"tabindex",n?null:-1)}},getValidIndex(e=this.index,t=this.prevIndex){if(e=this.getIndex(e,t),!this.sets)return e;let i;do{if(s.includes(this.sets,e))return e;i=e,e=this.getIndex(e+this.dir,t)}while(e!==i);return e},getAdjacentSlides(){const{width:e}=s.dimensions(this.list),t=-e,i=e*2,n=s.dimensions(this.slides[this.index]).width,h=this.center?e/2-n/2:0,r=new Set;for(const c of[-1,1]){let d=h+(c>0?n:0),l=0;do{const a=this.slides[this.getIndex(this.index+c+l++*c)];d+=s.dimensions(a).width*c,r.add(a)}while(this.length>l&&d>t&&d<i)}return Array.from(r)}}};function Q(e,t){if(!e||e.length<2)return!0;const{width:i}=s.dimensions(e);if(!t)return Math.ceil(I(e))<Math.trunc(i+Y(e));const n=s.children(e),h=Math.trunc(i/2);for(const r in n){const c=n[r],d=s.dimensions(c).width,l=new Set([c]);let a=0;for(const o of[-1,1]){let f=d/2,g=0;for(;f<h;){const x=n[s.getIndex(+r+o+g++*o,n)];if(l.has(x))return!0;f+=s.dimensions(x).width,l.add(x)}a=Math.max(a,d/2+s.dimensions(n[s.getIndex(+r+o,n)]).width/2-(f-h))}if(a>s.sumBy(n.filter(o=>!l.has(o)),o=>s.dimensions(o).width))return!0}return!1}function Y(e){return Math.max(0,...s.children(e).map(t=>s.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",S),S});
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=g(s.UIkit.util))})(this,function(s){"use strict";var g={connected(){s.addClass(this.$el,this.$options.id)}},z={props:{i18n:Object},data:{i18n:null},methods:{t(e,...t){var r,n,h;let i=0;return((h=((r=this.i18n)==null?void 0:r[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:h.replace(/%s/g,()=>t[i++]||""))||""}}},W={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}};function b(e,t=e.$el,r=""){if(t.id)return t.id;let n=`${e.$options.id}-${e._uid}${r}`;return s.$(`#${n}`)&&(n=b(e,t,`${r}-2`)),n}const p={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:e},t){return s.$(e,t)},watch(e,t){s.attr(e,"role","tablist"),t&&this.$emit()},immediate:!0},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems:{get(e,t){return s.$$(this.selNavItem,t)},watch(){this.$emit()}}},connected(){s.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((e,t)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",t+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>`<li ${this.attrItem}="${t}"><a href></a></li>`).join("")),s.attr(s.children(this.nav).concat(this.list),"role","presentation");for(const e of this.navItems){const t=s.data(e,this.attrItem),r=s.$("a,button",e)||e;let n,h=null;if(s.isNumeric(t)){const i=s.toNumber(t),c=this.slides[i];c&&(c.id||(c.id=b(this,c,`-item-${t}`)),h=c.id),n=this.t("slideX",s.toFloat(t)+1),s.attr(r,"role","tab")}else this.list&&(this.list.id||(this.list.id=b(this,this.list,"-items")),h=this.list.id),n=this.t(t);s.attr(r,{"aria-controls":h,"aria-label":s.attr(r,"aria-label")||n})}}},{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){s.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===p.SPACE)&&(e.preventDefault(),this.show(s.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:t,keyCode:r}=e,n=s.data(t,this.attrItem);if(!s.isNumeric(n))return;let h=r===p.HOME?0:r===p.END?"last":r===p.LEFT?"previous":r===p.RIGHT?"next":-1;~h&&(e.preventDefault(),this.show(h))}}],methods:{updateNav(){const e=this.getValidIndex();let t,r;for(const n of this.navItems){const h=s.data(n,this.attrItem),i=s.$("a,button",n)||n;if(s.isNumeric(h)){const d=s.toNumber(h)===e;s.toggleClass(n,this.clsActive,d),s.attr(i,{"aria-selected":d,tabindex:d?null:-1}),d&&(r=i),t=t||s.matches(i,":focus")}else s.toggleClass(n,"uk-invisible",this.finite&&(h==="previous"&&e===0||h==="next"&&e>=this.maxIndex));t&&r&&r.focus()}}}};const $={passive:!1,capture:!0},A={passive:!0,capture:!0},P="touchstart mousedown",y="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var B={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=r=>{const n=s.getEventPos(r).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,t(r)}}},events:[{name:P,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&V(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:y,el(){return this.list},handler:s.noop,...$}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,y,this.move,$),s.on(document,N,this.end,A),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:r}=this;let{prevIndex:n}=this,h=Math.abs(t),i=this.getIndex(n+this.dir,n),c=this._getDistance(n,i)||r[n].offsetWidth;for(;i!==n&&h>c;)this.drag-=c*this.dir,n=i,h-=c,i=this.getIndex(n+this.dir,n),c=this._getDistance(n,i)||r[n].offsetWidth;this.percent=h/c;const d=r[n],l=r[i],a=this.index!==i,o=n===i;let f;[this.index,this.prevIndex].filter(m=>!s.includes([i,n],m)).forEach(m=>{s.trigger(r[m],"itemhidden",[this]),o&&(f=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||f)&&s.trigger(r[this.index],"itemshown",[this]),a&&(this.prevIndex=n,this.index=i,!o&&s.trigger(d,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!o&&l),a&&(!o&&s.trigger(d,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,y,this.move,$),s.off(document,N,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function V(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var j={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live","polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}},{name:`${s.pointerEnter} focusin`,filter(){return this.autoplay},handler:"stopAutoplay"},{name:`${s.pointerLeave} focusout`,filter(){return this.autoplay},handler:"startAutoplay"}],methods:{startAutoplay(){this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),s.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),s.attr(this.list,"aria-live","polite")}}},F={mixins:[j,B,L,W,z],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},t){return C(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},methods:{show(e,t=!1){var r;if(this.dragging||!this.length)return;const{stack:n}=this,h=t?0:n.length,i=()=>{n.splice(h,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&((r=this._transitioner)==null||r.forward(Math.min(this.duration,200)));return}const c=this.getIndex(this.index),d=s.hasClass(this.slides,this.clsActive)&&this.slides[c],l=this.getIndex(e,this.index),a=this.slides[l];if(d===a){i();return}if(this.dir=H(e,c),this.prevIndex=c,this.index=l,d&&!s.trigger(d,"beforeitemhide",[this])||!s.trigger(a,"beforeitemshow",[this,d])){this.index=this.prevIndex,i();return}const o=this._show(d,a,t).then(()=>{d&&s.trigger(d,"itemhidden",[this]),s.trigger(a,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return d&&s.trigger(d,"itemhide",[this]),s.trigger(a,"itemshow",[this]),o},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,r){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:r?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!r&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,r=this.index){const n=this._getTransitioner(t===r?!1:t,r);return n.translate(e),n},_getTransitioner(e=this.prevIndex,t=this.index,r=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,r*(s.isRtl?-1:1),n)}}};function H(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function C(e){return .5*e+300}var q={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},G={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(r,n)=>{for(const h of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',h).slice(0,this.preload-1).forEach(i=>s.removeAttr(i,"loading"));for(const h of r.filter(({isIntersecting:i})=>i).map(({target:i})=>i))n.unobserve(h)}))}}},X={mixins:[G],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function E(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function J(e,t,r,{center:n,easing:h,list:i}){const c=new s.Deferred,d=e?v(e,i,n):v(t,i,n)+s.dimensions(t).width*r,l=t?v(t,i,n):d+s.dimensions(e).width*r*(s.isRtl?-1:1);return{dir:r,show(a,o=0,f){const m=f?"linear":h;return a-=Math.round(a*s.clamp(o,-1,1)),this.translate(o),o=e?o:s.clamp(o,0,1),_(this.getItemIn(),"itemin",{percent:o,duration:a,timing:m,dir:r}),e&&_(this.getItemIn(!0),"itemout",{percent:1-o,duration:a,timing:m,dir:r}),s.Transition.start(i,{transform:E(-l*(s.isRtl?-1:1),"px")},a,m).then(c.resolve,s.noop),c.promise},cancel(){s.Transition.cancel(i)},reset(){s.css(i,"transform","")},forward(a,o=this.percent()){return s.Transition.cancel(i),this.show(a,o,!0)},translate(a){const o=this.getDistance()*r*(s.isRtl?-1:1);s.css(i,"transform",E(s.clamp(-l+(o-o*a),-I(i),s.dimensions(i).width)*(s.isRtl?-1:1),"px"));const f=this.getActives(),m=this.getItemIn(),x=this.getItemIn(!0);a=e?s.clamp(a,-1,1):0;for(const u of s.children(i)){const O=s.includes(f,u),R=u===m,D=u===x,Z=R||!D&&(O||r*(s.isRtl?-1:1)===-1^w(u,i)>w(e||t));_(u,`itemtranslate${Z?"in":"out"}`,{dir:r,percent:D?1-a:R?a:O?1:0})}},percent(){return Math.abs((s.css(i,"transform").split(",")[4]*(s.isRtl?-1:1)+d)/(l-d))},getDistance(){return Math.abs(l-d)},getItemIn(a=!1){let o=this.getActives(),f=T(i,v(t||e,i,n));if(a){const m=o;o=f,f=m}return f[s.findIndex(f,m=>!s.includes(o,m))]},getActives(){return T(i,v(e||t,i,n))}}}function v(e,t,r){const n=w(e,t);return r?n-K(e,t):Math.min(n,M(t))}function M(e){return Math.max(0,I(e)-s.dimensions(e).width)}function I(e){return s.sumBy(s.children(e),t=>s.dimensions(t).width)}function K(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function w(e,t){return e&&(s.position(e).left+(s.isRtl?s.dimensions(e).width-s.dimensions(t).width:0))*(s.isRtl?-1:1)||0}function T(e,t){t-=1;const r=s.dimensions(e).width,n=t+r+2;return s.children(e).filter(h=>{const i=w(h,e),c=i+Math.min(s.dimensions(h).width,r);return i>=t&&c<=n})}function _(e,t,r){s.trigger(e,s.createEvent(t,!1,!1,r))}var S={mixins:[g,F,q,X],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:J},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:e}){return e||Q(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return s.last(this.sets);let e=0;const t=M(this.list),r=s.findIndex(this.slides,n=>{if(e>=t)return!0;e+=s.dimensions(n).width});return~r?r:this.length-1},sets({sets:e}){if(!e)return;let t=0;const r=[],n=s.dimensions(this.list).width;for(let h=0;h<this.length;h++){const i=s.dimensions(this.slides[h]).width;t+i>n&&(t=0),this.center?t<n/2&&t+i+s.dimensions(this.slides[+h+1]).width/2>n/2&&(r.push(+h),t=n/2-i/2):t===0&&r.push(Math.min(+h,this.maxIndex)),t+=i}if(r.length)return r},transitionOptions(){return{center:this.center,list:this.list}},children:{get(){return s.children(this.list)},watch(e,t){t||this.registerObserver(this._resizeObserver=s.observeResize(e,()=>this.$emit("resize"))),t&&(e.forEach(r=>!s.includes(t,r)&&this._resizeObserver.observe(r)),t.forEach(r=>!s.includes(e,r)&&this._resizeObserver.unobserve(r)),this.$emit())},immediate:!0},slides(){return this.children.filter(s.isVisible)}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},update:{write(){for(const e of this.navItems){const t=s.toNumber(s.data(e,this.attrItem));t!==!1&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!s.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(e){!this.dragging&&this.sets&&this.stack.length<2&&!s.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let n=0;n<t;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}const r=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=C(this.avgWidth/this.velocity)*(s.dimensions(this.slides[r]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const e=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,i)=>s.css(h,"order",this.dir>0&&i<e?1:this.dir<0&&i>=this.index?-1:"")),!this.center)return;const t=this.slides[e];let r=s.dimensions(this.list).width/2-s.dimensions(t).width/2,n=0;for(;r>0;){const h=this.getIndex(--n+e,e),i=this.slides[h];s.css(i,"order",h>e?-2:-1),r-=s.dimensions(i).width}},updateActiveClasses(){const e=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||s.includes(this.sets,s.toFloat(this.index)))&&this.clsActivated||""];for(const r of this.slides){const n=s.includes(e,r);s.toggleClass(r,t,n),s.attr(r,"aria-hidden",!n),s.attr(s.$$(s.selFocusable,r),"tabindex",n?null:-1)}},getValidIndex(e=this.index,t=this.prevIndex){if(e=this.getIndex(e,t),!this.sets)return e;let r;do{if(s.includes(this.sets,e))return e;r=e,e=this.getIndex(e+this.dir,t)}while(e!==r);return e},getAdjacentSlides(){const{width:e}=s.dimensions(this.list),t=-e,r=e*2,n=s.dimensions(this.slides[this.index]).width,h=this.center?e/2-n/2:0,i=new Set;for(const c of[-1,1]){let d=h+(c>0?n:0),l=0;do{const a=this.slides[this.getIndex(this.index+c+l++*c)];d+=s.dimensions(a).width*c,i.add(a)}while(this.length>l&&d>t&&d<r)}return Array.from(i)}}};function Q(e,t){if(!e||e.length<2)return!0;const{width:r}=s.dimensions(e);if(!t)return Math.ceil(I(e))<Math.trunc(r+Y(e));const n=s.children(e),h=Math.trunc(r/2);for(const i in n){const c=n[i],d=s.dimensions(c).width,l=new Set([c]);let a=0;for(const o of[-1,1]){let f=d/2,m=0;for(;f<h;){const x=n[s.getIndex(+i+o+m++*o,n)];if(l.has(x))return!0;f+=s.dimensions(x).width,l.add(x)}a=Math.max(a,d/2+s.dimensions(n[s.getIndex(+i+o,n)]).width/2-(f-h))}if(a>s.sumBy(n.filter(o=>!l.has(o)),o=>s.dimensions(o).width))return!0}return!1}function Y(e){return Math.max(0,...s.children(e).map(t=>s.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",S),S});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const n=z(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function z(n,t){if(r.isString(n)){if(r.startsWith(n,"@"))n=r.toFloat(r.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&r.isNumeric(n)?`(min-width: ${n}px)`:""}function E(n){return Math.ceil(Math.max(0,...r.$$("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:y,y,rotate:y,scale:y,color:v,backgroundColor:v,borderColor:v,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:L,stroke:R,bgx:P,bgy:P},{keys:j}=Object;var q={mixins:[g],props:T(j(w),"list"),data:T(j(w),void 0),computed:{props(n,t){const e={};for(const s in n)s in w&&!r.isUndefined(n[s])&&(e[s]=n[s].slice());const o={};for(const s in e)o[s]=w[s](s,t,e[s],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))r.css(this.$el,n,"")},getCss(n){const t={transform:"",filter:""};for(const e in this.props)this.props[e](t,n);return t.willChange=Object.keys(t).filter(e=>t[e]!=="").join(","),t}}};function y(n,t,e){let o=M(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",s;return n==="x"||n==="y"?(n=`translate${r.ucfirst(n)}`,s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):n==="scale"&&(o="",s=a=>M([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,s),(a,i)=>{a.transform+=` ${n}(${b(e,i)}${o})`}}function v(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e,o=>H(t,o)),(o,s)=>{const[a,i,c]=p(e,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[n]=`rgba(${d})`}}function H(n,t){return x(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(n,t,e){e.length===1&&e.unshift(0);const o=M(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(s,a)=>{const i=b(e,a);s.filter+=` ${n}(${i+o})`}}function L(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e),(o,s)=>{o[n]=b(e,s)}}function R(n,t,e){e.length===1&&e.unshift(0);const o=M(e),s=E(t);return e=m(e.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),e.some(([a])=>a)?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(e,i)}):r.noop}function P(n,t,e,o){e.length===1&&e.unshift(0);const s=n==="bgy"?"height":"width";o[n]=m(e,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&n==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(n,t,e,o);const i={};for(const c of a)i[c]=O(t,c);return S(a,i,o)}function V(n,t,e,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(([J])=>J),$=Math.min(...h),I=Math.max(...h),N=h.indexOf($)<h.indexOf(I),_=I-$;c[f]=`${(N?-_:0)-(N?$:I)}px`,a[f==="bgy"?"height":"width"]+=_}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",$=d[h]-a[h];c[f]=`max(${O(t,f)},-${$}px) + ${c[f]}`}const u=S(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function O(n,t){return x(n,`background-position-${t.substr(-1)}`,"")}function S(n,t,e){return function(o,s){for(const a of n){const i=b(e[a],s);o[`background-position-${a.substr(-1)}`]=`calc(${t[a]} + ${i}px)`}}}const F={};function A(n){const t=r.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth)?(e.onload=()=>{F[t]=C(e),r.trigger(n,r.createEvent("load",!1))},C(e)):F[t]=C(e)}function C(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=r.toFloat){const e=[],{length:o}=n;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(n[a])?n[a].trim().split(" "):[n[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&e.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(e.push([i,c]),c=1)),e.push([i,c]),c===null)s++;else if(s){const d=e[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)e[a-f][1]=d+u*(s-f+1);s=0}}return e}function p(n,t){const e=r.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function b(n,t){const[e,o,s]=p(n,t);return r.isNumber(e)?e+Math.abs(e-o)*s*(e<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function M(n,t){var e;for(const o of n){const s=(e=o.match)==null?void 0:e.call(o,G);if(s)return s[1]}return t}function x(n,t,e){const o=n.style[t],s=r.css(r.css(n,t,e),t);return n.style[t]=o,s}function T(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}var W={mixins:[q],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:t,duration:e,timing:o,dir:s}}){r.fastdom.read(()=>{if(!this.matchMedia)return;const a=this.getCss(B(n,s,t)),i=this.getCss(D(n)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,a),r.Transition.start(this.$el,i,e,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:t,dir:e}}){r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(B(n,e,t));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function D(n){return r.endsWith(n,"in")}function B(n,t,e){return e/=2,D(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",W),W});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -635,7 +635,11 @@
|
|
|
635
635
|
return promise;
|
|
636
636
|
},
|
|
637
637
|
getIndex(index = this.index, prev = this.index) {
|
|
638
|
-
return uikitUtil.clamp(
|
|
638
|
+
return uikitUtil.clamp(
|
|
639
|
+
uikitUtil.getIndex(index, this.slides, prev, this.finite),
|
|
640
|
+
0,
|
|
641
|
+
Math.max(0, this.maxIndex)
|
|
642
|
+
);
|
|
639
643
|
},
|
|
640
644
|
getValidIndex(index = this.index, prevIndex = this.prevIndex) {
|
|
641
645
|
return this.getIndex(index, prevIndex);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.7435f34d2 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],f):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlideshow=f(t.UIkit.util))})(this,function(t){"use strict";var f={connected(){t.addClass(this.$el,this.$options.id)}},y={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return g(e)},translate(e,s){return[{transform:h(s*-100*e)},{transform:h(s*100*(1-e))}]}}};function g(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e=0,s="%"){return e+=e?s:"",`translate3d(${e}, 0, 0)`}function z(e){return`scale3d(${e}, ${e}, 1)`}function S(e,s,r,{animation:n,easing:a}){const{percent:i,translate:l,show:d=t.noop}=n,p=d(r),m=new t.Deferred;return{dir:r,show(o,c=0,v){const I=v?"linear":a;return o-=Math.round(o*t.clamp(c,-1,1)),this.translate(c),x(s,"itemin",{percent:c,duration:o,timing:I,dir:r}),x(e,"itemout",{percent:1-c,duration:o,timing:I,dir:r}),Promise.all([t.Transition.start(s,p[1],o,I),t.Transition.start(e,p[0],o,I)]).then(()=>{this.reset(),m.resolve()},t.noop),m.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const o in p[0])t.css([s,e],o,"")},forward(o,c=this.percent()){return t.Transition.cancel([s,e]),this.show(o,c,!0)},translate(o){this.reset();const c=l(o,r);t.css(s,c[1]),t.css(e,c[0]),x(s,"itemtranslatein",{percent:o,dir:r}),x(e,"itemtranslateout",{percent:1-o,dir:r})},percent(){return i(e||s,s,r)},getDistance(){return e==null?void 0:e.offsetWidth}}}function x(e,s,r){t.trigger(e,t.createEvent(s,!1,!1,r))}var T={props:{i18n:Object},data:{i18n:null},methods:{t(e,...s){var r,n,a;let i=0;return((a=((r=this.i18n)==null?void 0:r[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:a.replace(/%s/g,()=>s[i++]||""))||""}}},E={connected(){var e;this.registerObserver(t.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}};function w(e,s=e.$el,r=""){if(s.id)return s.id;let n=`${e.$options.id}-${e._uid}${r}`;return t.$(`#${n}`)&&(n=w(e,s,`${r}-2`)),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var C={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:e},s){return t.$(e,s)},watch(e,s){t.attr(e,"role","tablist"),s&&this.$emit()},immediate:!0},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems:{get(e,s){return t.$$(this.selNavItem,s)},watch(){this.$emit()}}},connected(){t.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((e,s)=>t.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",s+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map((e,s)=>`<li ${this.attrItem}="${s}"><a href></a></li>`).join("")),t.attr(t.children(this.nav).concat(this.list),"role","presentation");for(const e of this.navItems){const s=t.data(e,this.attrItem),r=t.$("a,button",e)||e;let n,a=null;if(t.isNumeric(s)){const i=t.toNumber(s),l=this.slides[i];l&&(l.id||(l.id=w(this,l,`-item-${s}`)),a=l.id),n=this.t("slideX",t.toFloat(s)+1),t.attr(r,"role","tab")}else this.list&&(this.list.id||(this.list.id=w(this,this.list,"-items")),a=this.list.id),n=this.t(s);t.attr(r,{"aria-controls":a,"aria-label":t.attr(r,"aria-label")||n})}}},{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){t.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===u.SPACE)&&(e.preventDefault(),this.show(t.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:s,keyCode:r}=e,n=t.data(s,this.attrItem);if(!t.isNumeric(n))return;let a=r===u.HOME?0:r===u.END?"last":r===u.LEFT?"previous":r===u.RIGHT?"next":-1;~a&&(e.preventDefault(),this.show(a))}}],methods:{updateNav(){const e=this.getValidIndex();let s,r;for(const n of this.navItems){const a=t.data(n,this.attrItem),i=t.$("a,button",n)||n;if(t.isNumeric(a)){const d=t.toNumber(a)===e;t.toggleClass(n,this.clsActive,d),t.attr(i,{"aria-selected":d,tabindex:d?null:-1}),d&&(r=i),s=s||t.matches(i,":focus")}else t.toggleClass(n,"uk-invisible",this.finite&&(a==="previous"&&e===0||a==="next"&&e>=this.maxIndex));s&&r&&r.focus()}}}};const b={passive:!1,capture:!0},_={passive:!0,capture:!0},D="touchstart mousedown",$="touchmove mousemove",A="touchend touchcancel mouseup click input scroll";var H={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=r=>{const n=t.getEventPos(r).x*(t.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(r)}}},events:[{name:D,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!t.isTouch(e)&&O(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:$,el(){return this.list},handler:t.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,$,this.move,b),t.on(document,A,this.end,_),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:r}=this;let{prevIndex:n}=this,a=Math.abs(s),i=this.getIndex(n+this.dir,n),l=this._getDistance(n,i)||r[n].offsetWidth;for(;i!==n&&a>l;)this.drag-=l*this.dir,n=i,a-=l,i=this.getIndex(n+this.dir,n),l=this._getDistance(n,i)||r[n].offsetWidth;this.percent=a/l;const d=r[n],p=r[i],m=this.index!==i,o=n===i;let c;[this.index,this.prevIndex].filter(v=>!t.includes([i,n],v)).forEach(v=>{t.trigger(r[v],"itemhidden",[this]),o&&(c=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||c)&&t.trigger(r[this.index],"itemshown",[this]),m&&(this.prevIndex=n,this.index=i,!o&&t.trigger(d,"beforeitemhide",[this]),t.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!o&&p),m&&(!o&&t.trigger(d,"itemhide",[this]),t.trigger(p,"itemshow",[this]))},end(){if(t.off(document,$,this.move,b),t.off(document,A,this.end,_),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function O(e){return t.css(e,"userSelect")!=="none"&&t.toNodes(e.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){t.attr(this.list,"aria-live","polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}},{name:`${t.pointerEnter} focusin`,filter(){return this.autoplay},handler:"stopAutoplay"},{name:`${t.pointerLeave} focusout`,filter(){return this.autoplay},handler:"startAutoplay"}],methods:{startAutoplay(){this.draggable&&t.matches(this.$el,":focus-within")||this.pauseOnHover&&t.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),t.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),t.attr(this.list,"aria-live","polite")}}},P={mixins:[M,H,C,E,T],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},s){return R(s.offsetWidth/e)},list({selList:e},s){return t.$(e,s)},maxIndex(){return this.length-1},slides:{get(){return t.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},methods:{show(e,s=!1){var r;if(this.dragging||!this.length)return;const{stack:n}=this,a=s?0:n.length,i=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&((r=this._transitioner)==null||r.forward(Math.min(this.duration,200)));return}const l=this.getIndex(this.index),d=t.hasClass(this.slides,this.clsActive)&&this.slides[l],p=this.getIndex(e,this.index),m=this.slides[p];if(d===m){i();return}if(this.dir=L(e,l),this.prevIndex=l,this.index=p,d&&!t.trigger(d,"beforeitemhide",[this])||!t.trigger(m,"beforeitemshow",[this,d])){this.index=this.prevIndex,i();return}const o=this._show(d,m,s).then(()=>{d&&t.trigger(d,"itemhidden",[this]),t.trigger(m,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return d&&t.trigger(d,"itemhide",[this]),t.trigger(m,"itemshow",[this]),o},getIndex(e=this.index,s=this.index){return t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,s=this.prevIndex){return this.getIndex(e,s)},_show(e,s,r){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:r?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!r&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s=this.prevIndex,r=this.index){const n=this._getTransitioner(s===r?!1:s,r);return n.translate(e),n},_getTransitioner(e=this.prevIndex,s=this.index,r=this.dir||1,n=this.transitionOptions){return new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,r*(t.isRtl?-1:1),n)}}};function L(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function R(e){return .5*e+300}var W={mixins:[P],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:S},computed:{animation({animation:e,Animations:s}){return{...s[e]||s.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){t.addClass(e,this.clsActive)},itemshown({target:e}){t.addClass(e,this.clsActivated)},itemhidden({target:e}){t.removeClass(e,this.clsActive,this.clsActivated)}}},j={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:z(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,s,r){return r<0?1-g(s):g(e)},translate(e,s){return s<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,s,r){return r>0?1-g(s):g(e)},translate(e,s){return s<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},B={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},F={data:{preload:5},methods:{lazyload(e=this.$el,s=this.$el){this.registerObserver(t.observeIntersection(e,(r,n)=>{for(const a of t.toNodes(t.isFunction(s)?s():s))t.$$('[loading="lazy"]',a).slice(0,this.preload-1).forEach(i=>t.removeAttr(i,"loading"));for(const a of r.filter(({isIntersecting:i})=>i).map(({target:i})=>i))n.unobserve(a)}))}}},V={mixins:[F],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},N={mixins:[f,W,B,V],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:j},update:{read(){if(!this.list)return!1;let[e,s]=this.ratio.split(":").map(Number);return s=s*this.list.offsetWidth/e||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-t.boxModelAdjust(this.list,"height","content-box")}},write({height:e}){e>0&&t.css(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",N),N});
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],f):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlideshow=f(t.UIkit.util))})(this,function(t){"use strict";var f={connected(){t.addClass(this.$el,this.$options.id)}},y={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return g(e)},translate(e,s){return[{transform:h(s*-100*e)},{transform:h(s*100*(1-e))}]}}};function g(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e=0,s="%"){return e+=e?s:"",`translate3d(${e}, 0, 0)`}function z(e){return`scale3d(${e}, ${e}, 1)`}function S(e,s,r,{animation:n,easing:a}){const{percent:i,translate:l,show:d=t.noop}=n,p=d(r),m=new t.Deferred;return{dir:r,show(o,c=0,v){const I=v?"linear":a;return o-=Math.round(o*t.clamp(c,-1,1)),this.translate(c),x(s,"itemin",{percent:c,duration:o,timing:I,dir:r}),x(e,"itemout",{percent:1-c,duration:o,timing:I,dir:r}),Promise.all([t.Transition.start(s,p[1],o,I),t.Transition.start(e,p[0],o,I)]).then(()=>{this.reset(),m.resolve()},t.noop),m.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const o in p[0])t.css([s,e],o,"")},forward(o,c=this.percent()){return t.Transition.cancel([s,e]),this.show(o,c,!0)},translate(o){this.reset();const c=l(o,r);t.css(s,c[1]),t.css(e,c[0]),x(s,"itemtranslatein",{percent:o,dir:r}),x(e,"itemtranslateout",{percent:1-o,dir:r})},percent(){return i(e||s,s,r)},getDistance(){return e==null?void 0:e.offsetWidth}}}function x(e,s,r){t.trigger(e,t.createEvent(s,!1,!1,r))}var T={props:{i18n:Object},data:{i18n:null},methods:{t(e,...s){var r,n,a;let i=0;return((a=((r=this.i18n)==null?void 0:r[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:a.replace(/%s/g,()=>s[i++]||""))||""}}},E={connected(){var e;this.registerObserver(t.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}};function w(e,s=e.$el,r=""){if(s.id)return s.id;let n=`${e.$options.id}-${e._uid}${r}`;return t.$(`#${n}`)&&(n=w(e,s,`${r}-2`)),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var C={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:e},s){return t.$(e,s)},watch(e,s){t.attr(e,"role","tablist"),s&&this.$emit()},immediate:!0},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems:{get(e,s){return t.$$(this.selNavItem,s)},watch(){this.$emit()}}},connected(){t.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((e,s)=>t.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",s+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map((e,s)=>`<li ${this.attrItem}="${s}"><a href></a></li>`).join("")),t.attr(t.children(this.nav).concat(this.list),"role","presentation");for(const e of this.navItems){const s=t.data(e,this.attrItem),r=t.$("a,button",e)||e;let n,a=null;if(t.isNumeric(s)){const i=t.toNumber(s),l=this.slides[i];l&&(l.id||(l.id=w(this,l,`-item-${s}`)),a=l.id),n=this.t("slideX",t.toFloat(s)+1),t.attr(r,"role","tab")}else this.list&&(this.list.id||(this.list.id=w(this,this.list,"-items")),a=this.list.id),n=this.t(s);t.attr(r,{"aria-controls":a,"aria-label":t.attr(r,"aria-label")||n})}}},{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){t.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===u.SPACE)&&(e.preventDefault(),this.show(t.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:s,keyCode:r}=e,n=t.data(s,this.attrItem);if(!t.isNumeric(n))return;let a=r===u.HOME?0:r===u.END?"last":r===u.LEFT?"previous":r===u.RIGHT?"next":-1;~a&&(e.preventDefault(),this.show(a))}}],methods:{updateNav(){const e=this.getValidIndex();let s,r;for(const n of this.navItems){const a=t.data(n,this.attrItem),i=t.$("a,button",n)||n;if(t.isNumeric(a)){const d=t.toNumber(a)===e;t.toggleClass(n,this.clsActive,d),t.attr(i,{"aria-selected":d,tabindex:d?null:-1}),d&&(r=i),s=s||t.matches(i,":focus")}else t.toggleClass(n,"uk-invisible",this.finite&&(a==="previous"&&e===0||a==="next"&&e>=this.maxIndex));s&&r&&r.focus()}}}};const b={passive:!1,capture:!0},_={passive:!0,capture:!0},D="touchstart mousedown",$="touchmove mousemove",A="touchend touchcancel mouseup click input scroll";var H={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=r=>{const n=t.getEventPos(r).x*(t.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(r)}}},events:[{name:D,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!t.isTouch(e)&&M(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:$,el(){return this.list},handler:t.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,$,this.move,b),t.on(document,A,this.end,_),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:r}=this;let{prevIndex:n}=this,a=Math.abs(s),i=this.getIndex(n+this.dir,n),l=this._getDistance(n,i)||r[n].offsetWidth;for(;i!==n&&a>l;)this.drag-=l*this.dir,n=i,a-=l,i=this.getIndex(n+this.dir,n),l=this._getDistance(n,i)||r[n].offsetWidth;this.percent=a/l;const d=r[n],p=r[i],m=this.index!==i,o=n===i;let c;[this.index,this.prevIndex].filter(v=>!t.includes([i,n],v)).forEach(v=>{t.trigger(r[v],"itemhidden",[this]),o&&(c=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||c)&&t.trigger(r[this.index],"itemshown",[this]),m&&(this.prevIndex=n,this.index=i,!o&&t.trigger(d,"beforeitemhide",[this]),t.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!o&&p),m&&(!o&&t.trigger(d,"itemhide",[this]),t.trigger(p,"itemshow",[this]))},end(){if(t.off(document,$,this.move,b),t.off(document,A,this.end,_),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function M(e){return t.css(e,"userSelect")!=="none"&&t.toNodes(e.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var O={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){t.attr(this.list,"aria-live","polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}},{name:`${t.pointerEnter} focusin`,filter(){return this.autoplay},handler:"stopAutoplay"},{name:`${t.pointerLeave} focusout`,filter(){return this.autoplay},handler:"startAutoplay"}],methods:{startAutoplay(){this.draggable&&t.matches(this.$el,":focus-within")||this.pauseOnHover&&t.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),t.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),t.attr(this.list,"aria-live","polite")}}},P={mixins:[O,H,C,E,T],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},s){return R(s.offsetWidth/e)},list({selList:e},s){return t.$(e,s)},maxIndex(){return this.length-1},slides:{get(){return t.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},methods:{show(e,s=!1){var r;if(this.dragging||!this.length)return;const{stack:n}=this,a=s?0:n.length,i=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&((r=this._transitioner)==null||r.forward(Math.min(this.duration,200)));return}const l=this.getIndex(this.index),d=t.hasClass(this.slides,this.clsActive)&&this.slides[l],p=this.getIndex(e,this.index),m=this.slides[p];if(d===m){i();return}if(this.dir=L(e,l),this.prevIndex=l,this.index=p,d&&!t.trigger(d,"beforeitemhide",[this])||!t.trigger(m,"beforeitemshow",[this,d])){this.index=this.prevIndex,i();return}const o=this._show(d,m,s).then(()=>{d&&t.trigger(d,"itemhidden",[this]),t.trigger(m,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return d&&t.trigger(d,"itemhide",[this]),t.trigger(m,"itemshow",[this]),o},getIndex(e=this.index,s=this.index){return t.clamp(t.getIndex(e,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(e=this.index,s=this.prevIndex){return this.getIndex(e,s)},_show(e,s,r){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:r?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!r&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s=this.prevIndex,r=this.index){const n=this._getTransitioner(s===r?!1:s,r);return n.translate(e),n},_getTransitioner(e=this.prevIndex,s=this.index,r=this.dir||1,n=this.transitionOptions){return new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,r*(t.isRtl?-1:1),n)}}};function L(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function R(e){return .5*e+300}var W={mixins:[P],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:S},computed:{animation({animation:e,Animations:s}){return{...s[e]||s.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){t.addClass(e,this.clsActive)},itemshown({target:e}){t.addClass(e,this.clsActivated)},itemhidden({target:e}){t.removeClass(e,this.clsActive,this.clsActivated)}}},j={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:z(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,s,r){return r<0?1-g(s):g(e)},translate(e,s){return s<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,s,r){return r>0?1-g(s):g(e)},translate(e,s){return s<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},B={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},F={data:{preload:5},methods:{lazyload(e=this.$el,s=this.$el){this.registerObserver(t.observeIntersection(e,(r,n)=>{for(const a of t.toNodes(t.isFunction(s)?s():s))t.$$('[loading="lazy"]',a).slice(0,this.preload-1).forEach(i=>t.removeAttr(i,"loading"));for(const a of r.filter(({isIntersecting:i})=>i).map(({target:i})=>i))n.unobserve(a)}))}}},V={mixins:[F],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},N={mixins:[f,W,B,V],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:j},update:{read(){if(!this.list)return!1;let[e,s]=this.ratio.split(":").map(Number);return s=s*this.list.offsetWidth/e||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-t.boxModelAdjust(this.list,"height","content-box")}},write({height:e}){e>0&&t.css(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",N),N});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const t=[[]];for(const c of n){if(!e.isVisible(c))continue;let a=b(c);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(c);break}let d;if(h[0].offsetParent===c.offsetParent?d=b(h[0]):(a=b(c,!0),d=b(h[0],!0)),a[s]>=d[o]-1&&a[s]!==d[s]){t.push([c]);break}if(a[o]-1>d[s]||a[s]===d[s]){h.push(c);break}if(r===0){t.unshift([c]);break}}}return t}function b(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:c,offsetWidth:a}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+c,right:t+a}}const y="uk-transition-leave",u="uk-transition-enter";function v(n,s,o,t=0){const c=w(s,!0),a={opacity:1},r={opacity:0},h=p=>()=>c===w(s)?p():Promise.reject(),d=h(async()=>{e.addClass(s,y),await Promise.all(C(s).map((p,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(p,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,y)}),i=h(async()=>{const p=e.height(s);e.addClass(s,u),n(),e.css(e.children(s),{opacity:0}),await B();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,p);const m=C(s);e.css(l,r);const E=m.map(async(G,J)=>{await N(J*t),await e.Transition.start(G,a,o/2,"ease")});p!==f&&E.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(E).then(()=>{e.removeClass(s,u),c===w(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,y)?T(s).then(i):e.hasClass(s,u)?T(s).then(d).then(i):d().then(i)}function w(n,s){return s&&(n.dataset.transition=1+w(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(t=>e.isInView(t)),"offsetLeft")),[])}function B(){return new Promise(n=>requestAnimationFrame(n))}function N(n){return new Promise(s=>setTimeout(s,n))}async function R(n,s,o){await x();let t=e.children(s);const c=t.map(f=>P(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,i]=A(s,t,c),p=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>i[m]&&e.css(f,i[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await x();const l=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,m)=>{e.attr(f,p[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),H(s,a)}}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...S(n)}:!1}function A(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?S(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||P(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function H(n,s){for(const o in s)e.css(n,o,"")}function S(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function x(){return new Promise(n=>requestAnimationFrame(n))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?v:o==="delayed-fade"?(...c)=>v(...c,40):o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},L={connected(){e.addClass(this.$el,this.$options.id)}},I={mixins:[L,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get({handle:n},s){return n?e.$$(n,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:o-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:o});if(h.length&&(!d||d===a))return;const i=this.getSortable(a),p=j(r.target,d,a,s,o,r===i&&n.moved!==d);p!==!1&&(p&&a===p||(r!==i?(i.remove(a),n.moved=d):delete n.moved,r.insert(a,p),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[c]=this.items.filter(a=>e.within(s,a));!c||t||o>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=q(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),V(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;M();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){e.within(n,this.target)&&this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function V(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:i,height:p}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(i>t&&i-35<t)r+=c;else return;if(r>0&&r<h-p)return a.scrollTop=r,!0})},15)}function M(){clearInterval($)}function q(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function j(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return O(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([r.top,r.bottom],[h.top,h.bottom]),[i,p,l,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[p]<r[p]?r[p]-h[p]:0;return h[l]<r[l]?m&&i<r[l]+m?!1:s.nextElementSibling:m&&i>r[f]-m?!1:s}function O(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const i=d.getBoundingClientRect();return!D([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),c}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=p(s.UIkit.util))})(this,function(s){"use strict";var p={props:{container:Boolean},data:{container:!0},computed:{container({container:o}){return o===!0&&this.$container||o&&s.$(o)}}},O={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:o}){return!!o[0]},hasTransition({animation:o}){return["slide","reveal"].some(t=>s.startsWith(o[0],t))}},methods:{toggleElement(o,t,e){return new Promise(n=>Promise.all(s.toNodes(o).map(r=>{const i=s.isBoolean(t)?t:!this.isToggled(r);if(!s.trigger(r,`before${i?"show":"hide"}`,[this]))return Promise.reject();const h=(s.isFunction(e)?e:e===!1||!this.hasAnimation?B:this.hasTransition?I:D)(r,i,this),a=i?this.clsEnter:this.clsLeave;s.addClass(r,a),s.trigger(r,i?"show":"hide",[this]);const c=()=>{s.removeClass(r,a),s.trigger(r,i?"shown":"hidden",[this])};return h?h.then(c,()=>(s.removeClass(r,a),Promise.reject())):c()})).then(n,s.noop))},isToggled(o=this.$el){return[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let e;this.cls?(e=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),e&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(e=t===o.hidden,e&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),e&&s.trigger(o,"toggled",[t,this])}}};function B(o,t,{_toggle:e}){return s.Animation.cancel(o),s.Transition.cancel(o),e(o,t)}async function I(o,t,{animation:e,duration:n,velocity:r,transition:i,_toggle:h}){var a;const[c="reveal",v="top"]=((a=e[0])==null?void 0:a.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[s.includes(b[0],v)?0:1],E=T[1]===v,m=["width","height"][b.indexOf(T)],d=`margin-${T[0]}`,w=`margin-${v}`;let g=s.dimensions(o)[m];const H=s.Transition.inProgress(o);await s.Transition.cancel(o),t&&h(o,!0);const V=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",d,w].map(S=>[S,o.style[S]])),l=s.dimensions(o),P=s.toFloat(s.css(o,d)),x=s.toFloat(s.css(o,w)),f=l[m]+x;!H&&!t&&(g+=x);const[$]=s.wrapInner(o,"<div>");s.css($,{boxSizing:"border-box",height:l.height,width:l.width,...s.css(o,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",w])}),s.css(o,{padding:0,border:0,minWidth:0,minHeight:0,[w]:0,width:l.width,height:l.height,overflow:"hidden",[m]:g});const C=g/f;n=(r*f+n)*(t?1-C:C);const A={[m]:t?f:0};E&&(s.css(o,d,f-g+P),A[d]=t?P:f+P),!E^c==="reveal"&&(s.css($,d,-f+g),s.Transition.start($,{[d]:t?0:-f},n,i));try{await s.Transition.start(o,A,n,i)}finally{s.css(o,V),s.unwrap($.firstChild),t||h(o,!1)}}function D(o,t,e){s.Animation.cancel(o);const{animation:n,duration:r,_toggle:i}=e;return t?(i(o,!0),s.Animation.in(o,n[0],r,e.origin)):s.Animation.out(o,n[1]||n[0],r,e.origin).then(()=>i(o,!1))}var N={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${s.isRtl?"right":"left"}`,offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,e){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const r=[this.flip&&"flip",this.shift&&"shift"],i={element:[this.inset?this.dir:s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const c in i)i[c].reverse();n.reverse(),r.reverse()}const h=_(o),a=s.dimensions(o);s.css(o,{top:-a.height,left:-a.width}),s.positionAt(o,t,{attach:i,offset:n,boundary:e,placement:r,viewportOffset:this.getViewportOffset(o)}),h()},getPositionOffset(o){return s.toPx(this.offset===!1?s.css(o,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(o){return this.align==="center"?0:s.toPx(s.css(o,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.css(o,"--uk-position-viewport-offset"))}}};function _(o){const[t]=s.scrollParents(o),{scrollTop:e}=t;return()=>{e!==t.scrollTop&&(t.scrollTop=e)}}function y(o,t=o.$el,e=""){if(t.id)return t.id;let n=`${o.$options.id}-${o._uid}${e}`;return s.$(`#${n}`)&&(n=y(o,t,`${e}-2`)),n}const F={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var u={mixins:[p,O,N],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this.id=y(this),this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,{title:"","aria-describedby":this.id}),L(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title")||s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null))},_show(){this.tooltip=s.append(this.container,`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </div>`),s.on(this.tooltip,"toggled",(o,t)=>{if(!t)return;const e=()=>this.positionAt(this.tooltip,this.$el);e();const[n,r]=j(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${s.flipPosition(n)}-${r}`:`${r}-${s.flipPosition(n)}`;const i=[s.once(document,`keydown ${s.pointerDown}`,this.hide,!1,h=>h.type===s.pointerDown&&!s.within(h.target,this.$el)||h.type==="keydown"&&h.keyCode===F.ESC),s.on([document,...s.overflowParents(this.$el)],"scroll",e,{passive:!0})];s.once(this.tooltip,"hide",()=>i.forEach(h=>h()),{self:!0})}),this.toggleElement(this.tooltip,!0)}},events:{focus:"show",blur:"hide",[`${s.pointerEnter} ${s.pointerLeave}`](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function L(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function j(o,t,[e,n]){const r=s.offset(o),i=s.offset(t),h=[["left","right"],["top","bottom"]];for(const c of h){if(r[c[0]]>=i[c[1]]){e=c[1];break}if(r[c[1]]<=i[c[0]]){e=c[0];break}}const a=s.includes(h[0],e)?h[1]:h[0];return r[a[0]]===i[a[0]]?n=a[0]:r[a[1]]===i[a[1]]?n=a[1]:n="center",[e,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",u),u});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],i):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=i(o.UIkit.util))})(this,function(o){"use strict";var i={props:{i18n:Object},data:{i18n:null},methods:{t(e,...r){var a,s,t;let n=0;return((t=((a=this.i18n)==null?void 0:a[e])||((s=this.$options.i18n)==null?void 0:s[e]))==null?void 0:t.replace(/%s/g,()=>r[n++]||""))||""}}},d={mixins:[i],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){o.matches(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){l(e);const r=e.dataTransfer;r!=null&&r.files&&(o.removeClass(this.$el,this.clsDragover),this.upload(r.files))},dragenter(e){l(e)},dragover(e){l(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){l(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const s of e){if(this.maxSize&&this.maxSize*1e3<s.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!h(this.allow,s.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!h(this.mime,s.type)){this.fail(this.t("invalidMime",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const r=f(e,this.concurrent),a=async s=>{const t=new FormData;s.forEach(n=>t.append(this.name,n));for(const n in this.params)t.append(n,this.params[n]);try{const n=await u(this.url,{data:t,method:this.method,responseType:this.type,beforeSend:p=>{const{xhr:m}=p;o.on(m.upload,"progress",this.progress);for(const c of["loadStart","load","loadEnd","abort"])o.on(m,c.toLowerCase(),this[c]);return this.beforeSend(p)}});this.complete(n),r.length?await a(r.shift()):this.completeAll(n)}catch(n){this.error(n)}};await a(r.shift())}}};function h(e,r){return r.match(new RegExp(`^${e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function f(e,r){const a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}function l(e){e.preventDefault(),e.stopPropagation()}function u(e,r){const a={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:o.noop,responseType:"",...r};return Promise.resolve().then(()=>a.beforeSend(a)).then(()=>g(e,a))}function g(e,r){return new Promise((a,s)=>{const{xhr:t}=r;for(const n in r)if(n in t)try{t[n]=r[n]}catch{}t.open(r.method.toUpperCase(),e);for(const n in r.headers)t.setRequestHeader(n,r.headers[n]);o.on(t,"load",()=>{t.status===0||t.status>=200&&t.status<300||t.status===304?a(t):s(o.assign(Error(t.statusText),{xhr:t,status:t.status}))}),o.on(t,"error",()=>s(o.assign(Error("Network Error"),{xhr:t}))),o.on(t,"timeout",()=>s(o.assign(Error("Network Timeout"),{xhr:t}))),t.send(r.data)})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",d),d});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.
|
|
1
|
+
/*! UIkit 3.16.4-dev.a8da41c36 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -13,13 +13,10 @@
|
|
|
13
13
|
const hyphenateRe = /\B([A-Z])/g;
|
|
14
14
|
const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
|
|
15
15
|
const camelizeRe = /-(\w)/g;
|
|
16
|
-
const camelize = memoize(
|
|
17
|
-
|
|
18
|
-
(str) => str.length ? toUpper(null, str.charAt(0)) + str.slice(1) : ""
|
|
16
|
+
const camelize = memoize(
|
|
17
|
+
(str) => (str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase())
|
|
19
18
|
);
|
|
20
|
-
|
|
21
|
-
return c ? c.toUpperCase() : "";
|
|
22
|
-
}
|
|
19
|
+
const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
23
20
|
function startsWith(str, search) {
|
|
24
21
|
var _a;
|
|
25
22
|
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
@@ -136,6 +133,9 @@
|
|
|
136
133
|
const seen = /* @__PURE__ */ new Set();
|
|
137
134
|
return array.filter(({ [prop]: check }) => seen.has(check) ? false : seen.add(check));
|
|
138
135
|
}
|
|
136
|
+
function pick(obj, props) {
|
|
137
|
+
return props.reduce((res, prop) => ({ ...res, [prop]: obj[prop] }), {});
|
|
138
|
+
}
|
|
139
139
|
function clamp(number, min = 0, max = 1) {
|
|
140
140
|
return Math.min(Math.max(toNumber(number) || 0, min), max);
|
|
141
141
|
}
|
|
@@ -1084,6 +1084,8 @@
|
|
|
1084
1084
|
initResizeListener();
|
|
1085
1085
|
listeners.add(cb);
|
|
1086
1086
|
return {
|
|
1087
|
+
observe: noop,
|
|
1088
|
+
unobserve: noop,
|
|
1087
1089
|
disconnect() {
|
|
1088
1090
|
listeners.delete(cb);
|
|
1089
1091
|
}
|
|
@@ -1389,10 +1391,10 @@
|
|
|
1389
1391
|
function offsetViewport(scrollElement) {
|
|
1390
1392
|
const window = toWindow(scrollElement);
|
|
1391
1393
|
const {
|
|
1394
|
+
visualViewport,
|
|
1392
1395
|
document: { documentElement }
|
|
1393
1396
|
} = window;
|
|
1394
1397
|
let viewportElement = scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1395
|
-
const { visualViewport } = window;
|
|
1396
1398
|
if (isWindow(viewportElement) && visualViewport) {
|
|
1397
1399
|
let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
|
|
1398
1400
|
height = Math.round(height * scale);
|
|
@@ -1694,6 +1696,7 @@
|
|
|
1694
1696
|
parents: parents,
|
|
1695
1697
|
parseOptions: parseOptions,
|
|
1696
1698
|
pause: pause,
|
|
1699
|
+
pick: pick,
|
|
1697
1700
|
play: play,
|
|
1698
1701
|
pointInRect: pointInRect,
|
|
1699
1702
|
pointerCancel: pointerCancel,
|
|
@@ -1883,15 +1886,11 @@
|
|
|
1883
1886
|
}
|
|
1884
1887
|
}
|
|
1885
1888
|
function runWatches(initial) {
|
|
1886
|
-
const {
|
|
1887
|
-
$options: { computed }
|
|
1888
|
-
} = this;
|
|
1889
1889
|
const values = { ...this._computed };
|
|
1890
1890
|
this._computed = {};
|
|
1891
|
-
for (const key
|
|
1892
|
-
const { watch, immediate } = computed[key];
|
|
1891
|
+
for (const [key, { watch, immediate }] of Object.entries(this.$options.computed || {})) {
|
|
1893
1892
|
if (watch && (initial && immediate || hasOwn(values, key) && !isEqual(values[key], this[key]))) {
|
|
1894
|
-
watch.call(this, this[key], values[key]);
|
|
1893
|
+
watch.call(this, this[key], initial ? void 0 : values[key]);
|
|
1895
1894
|
}
|
|
1896
1895
|
}
|
|
1897
1896
|
}
|
|
@@ -2188,8 +2187,7 @@
|
|
|
2188
2187
|
const { data: DATA, prefix: PREFIX } = UIkit;
|
|
2189
2188
|
UIkit.component = function(name, options) {
|
|
2190
2189
|
var _a;
|
|
2191
|
-
|
|
2192
|
-
const id = PREFIX + name;
|
|
2190
|
+
const id = PREFIX + hyphenate(name);
|
|
2193
2191
|
if (!options) {
|
|
2194
2192
|
if (isPlainObject(components$2[id])) {
|
|
2195
2193
|
components$2[id] = components$2[`data-${id}`] = UIkit.extend(components$2[id]);
|
|
@@ -2252,7 +2250,7 @@
|
|
|
2252
2250
|
UIkit.data = "__uikit__";
|
|
2253
2251
|
UIkit.prefix = "uk-";
|
|
2254
2252
|
UIkit.options = {};
|
|
2255
|
-
UIkit.version = "3.16.4-dev.
|
|
2253
|
+
UIkit.version = "3.16.4-dev.a8da41c36";
|
|
2256
2254
|
globalAPI(UIkit);
|
|
2257
2255
|
hooksAPI(UIkit);
|
|
2258
2256
|
stateAPI(UIkit);
|
|
@@ -2907,15 +2905,15 @@
|
|
|
2907
2905
|
const { ratio, cover } = Dimensions;
|
|
2908
2906
|
const { $el, width, height } = this;
|
|
2909
2907
|
let dim = { width, height };
|
|
2910
|
-
if (!
|
|
2908
|
+
if (!width || !height) {
|
|
2911
2909
|
const intrinsic = {
|
|
2912
2910
|
width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
|
|
2913
2911
|
height: $el.naturalHeight || $el.videoHeight || $el.clientHeight
|
|
2914
2912
|
};
|
|
2915
|
-
if (
|
|
2916
|
-
dim = ratio(intrinsic, "width",
|
|
2913
|
+
if (width) {
|
|
2914
|
+
dim = ratio(intrinsic, "width", width);
|
|
2917
2915
|
} else if (height) {
|
|
2918
|
-
dim = ratio(intrinsic, "height",
|
|
2916
|
+
dim = ratio(intrinsic, "height", height);
|
|
2919
2917
|
} else {
|
|
2920
2918
|
dim = intrinsic;
|
|
2921
2919
|
}
|
|
@@ -3102,7 +3100,7 @@
|
|
|
3102
3100
|
if (this.toggle && !this.targetEl) {
|
|
3103
3101
|
this.targetEl = createToggleComponent(this);
|
|
3104
3102
|
}
|
|
3105
|
-
this._style = (
|
|
3103
|
+
this._style = pick(this.$el.style, ["width", "height"]);
|
|
3106
3104
|
},
|
|
3107
3105
|
disconnected() {
|
|
3108
3106
|
if (this.isActive()) {
|
|
@@ -4079,7 +4077,6 @@
|
|
|
4079
4077
|
if (elements.length < 2) {
|
|
4080
4078
|
return { heights: [""], elements };
|
|
4081
4079
|
}
|
|
4082
|
-
css(elements, "minHeight", "");
|
|
4083
4080
|
let heights = elements.map(getHeight);
|
|
4084
4081
|
const max = Math.max(...heights);
|
|
4085
4082
|
return {
|
|
@@ -4088,15 +4085,13 @@
|
|
|
4088
4085
|
};
|
|
4089
4086
|
}
|
|
4090
4087
|
function getHeight(element) {
|
|
4091
|
-
|
|
4088
|
+
const style = pick(element.style, ["display", "minHeight"]);
|
|
4092
4089
|
if (!isVisible(element)) {
|
|
4093
|
-
style = element.style.display;
|
|
4094
4090
|
css(element, "display", "block", "important");
|
|
4095
4091
|
}
|
|
4092
|
+
css(element, "minHeight", "");
|
|
4096
4093
|
const height = dimensions(element).height - boxModelAdjust(element, "height", "content-box");
|
|
4097
|
-
|
|
4098
|
-
css(element, "display", style);
|
|
4099
|
-
}
|
|
4094
|
+
css(element, style);
|
|
4100
4095
|
return height;
|
|
4101
4096
|
}
|
|
4102
4097
|
|
|
@@ -5414,7 +5409,7 @@
|
|
|
5414
5409
|
if (this.hidden) {
|
|
5415
5410
|
css(filter(elements, `:not(.${this.inViewClass})`), "opacity", 0);
|
|
5416
5411
|
}
|
|
5417
|
-
if (
|
|
5412
|
+
if (prev) {
|
|
5418
5413
|
this.$reset();
|
|
5419
5414
|
}
|
|
5420
5415
|
},
|