uikit 3.17.10-dev.3c5eac782 → 3.17.10-dev.fde49d8a0
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 +7 -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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +8 -8
- 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 +3 -3
- 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 +10 -10
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/tooltip.js +7 -8
- package/src/js/util/class.js +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.3c5eac782 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&z(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function z(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var j={connected(){e.addClass(this.$el,this.$options.id)}},B={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},q="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var F={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:q,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&H(t.target)||t.target.closest(e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.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,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),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 t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function H(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}e.memoize((t,s)=>{const n=Object.keys(s),i=n.concat(t).map(h=>[e.hyphenate(h),`data-${e.hyphenate(h)}`]).flat();return{attributes:n,filter:i}});const M=Object.create(null);function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return M[i]&&(i=$(t,s,`${n}-2`)),M[i]=!0,i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var G={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},X={mixins:[V,F,G,B],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(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>S(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=J(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?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}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function J(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function S(t){return .5*t+300}var K={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},Q={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function T(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Y(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:T(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",T(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),W=u===g,P=u===m,st=W||!P&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${st?"in":"out"}`,{dir:n,percent:P?1-d:W?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=O(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return O(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Z(t,s):Math.min(i,E(s))}function E(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Z(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function O(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var D={mixins:[j,X,K,Q],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:Y},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||tt(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=E(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const s=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&&s>1){for(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=S(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function tt(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+et(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function et(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",D),D});
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&z(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function z(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var j={connected(){e.addClass(this.$el,this.$options.id)}},B={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},q="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var F={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:q,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&H(t.target)||t.target.closest(e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.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,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),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 t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function H(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}e.memoize((t,s)=>{const n=Object.keys(s),i=n.concat(t).map(h=>[e.hyphenate(h),`data-${e.hyphenate(h)}`]).flat();return{attributes:n,filter:i}});const M=Object.create(null);function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return M[i]&&(i=$(t,s,`${n}-2`)),M[i]=!0,i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var G={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},X={mixins:[V,F,G,B],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(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>S(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=J(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?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}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function J(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function S(t){return .5*t+300}var K={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},Q={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function T(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Y(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:T(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",T(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),W=u===g,P=u===m,st=W||!P&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${st?"in":"out"}`,{dir:n,percent:P?1-d:W?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=O(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return O(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Z(t,s):Math.min(i,E(s))}function E(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Z(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function O(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var D={mixins:[j,X,K,Q],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:Y},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||tt(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=E(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const s=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&&s>1){for(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=S(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function tt(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+et(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function et(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",D),D});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow_parallax=b(s.UIkit.util))})(this,function(s){"use strict";var b={props:{media:Boolean},data:{media:!1},connected(){const n=J(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function J(n,e){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(e,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function K(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:jn,from:Q}=Array;function X(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function Y(n){return M(n)&&n===n.window}function T(n){return Z(n)>=1}function Z(n){return!Y(n)&&M(n)&&n.nodeType}function C(n){return typeof n=="string"}function k(n){return n===void 0}function $(n){return d(n)[0]}function d(n){return T(n)?[n]:Array.from(n||[]).filter(T)}function O(n){const e=Object.create(null);return(t,...o)=>e[t]||(e[t]=n(t,...o))}function j(n,e,t){var o;if(M(e)){for(const r in e)j(n,r,e[r]);return}if(k(t))return(o=$(n))==null?void 0:o.getAttribute(e);for(const r of d(n))X(t)&&(t=t.call(r,j(r,e))),t===null?U(r,e):r.setAttribute(e,t)}function U(n,e){d(n).forEach(t=>t.removeAttribute(e))}function A(n){var e;return(e=$(n))==null?void 0:e.parentElement}function nn(n,e){return d(n).filter(t=>W(t,e))}function W(n,e){return d(n).some(t=>t.matches(e))}function tn(n,e){n=$(n);const t=n?Q(n.children):[];return e?nn(t,e):t}function en(n,e){return e?d(n).indexOf($(e)):tn(A(n)).indexOf(n)}function rn(n,e){return d(fn(n,$(e),"querySelectorAll"))}const on=/(^|[^\\],)\s*[!>+~-]/,sn=O(n=>n.match(on)),cn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,an=O(n=>n.replace(cn,"$1 *"));function fn(n,e=document,t){if(!n||!C(n))return n;if(n=an(n),sn(n)){const o=dn(n);n="";for(let r of o){let i=e;if(r[0]==="!"){const c=r.substr(1).trim().split(" ");if(i=A(e).closest(c[0]),r=c.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const c=r.substr(1).trim().split(" "),a=(i||e).previousElementSibling;i=W(a,r.substr(1))?a:null,r=c.slice(1).join(" ")}i&&(n+=`${n?",":""}${hn(i)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const un=/.*?[^\\](?:,|$)/g,dn=O(n=>n.match(un).map(e=>e.replace(/,$/,"").trim()));function hn(n){const e=[];for(;n.parentNode;){const t=j(n,"id");if(t){e.unshift(`#${ln(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${en(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function ln(n){return C(n)?CSS.escape(n):""}const mn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function gn(n){const e=mn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),bn(t.content.childNodes)}function bn(n){return n.length>1?n:n[0]}function $n(n,e){return xn(n)?d(gn(n)):rn(n,e)}function xn(n){return C(n)&&K(n.trim(),"<")}function yn(n){return Math.ceil(Math.max(0,...$n("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const p={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:vn,stroke:Fn,bgx:E,bgy:E},{keys:_}=Object;var wn={mixins:[b],props:D(_(p),"list"),data:D(_(p),void 0),computed:{props(n,e){const t={};for(const r in n)r in p&&!s.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=p[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const e={};for(const t in this.props)this.props[t](e,s.clamp(n));return e.willChange=Object.keys(e).map(s.propName).join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,r=i=>s.toFloat(s.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>{var c;return S([i])?s.toPx(i,"width",e,!0)/e[`offset${(c=i.endsWith)!=null&&c.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),t.length===1&&t.unshift(n==="scale"?1:0),t=g(t,r),(i,c)=>{i.transform=`${i.transform||""} ${n}(${x(t,c)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t,o=>pn(e,o)),(o,r)=>{const[i,c,a]=R(t,r),h=i.map((l,f)=>(l+=a*(c[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function pn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function m(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=g(t),(r,i)=>{const c=x(t,i);r.filter=`${r.filter||""} ${n}(${c+o})`}}function vn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t),(o,r)=>{o[n]=x(t,r)}}function Fn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=yn(e);return t=g(t.reverse(),i=>(i=s.toFloat(i),o==="%"?i*r/100:i)),t.some(([i])=>i)?(s.css(e,"strokeDasharray",r),(i,c)=>{i.strokeDashoffset=x(t,c)}):s.noop}function E(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=g(t,a=>s.toPx(a,r,e));const i=["bgx","bgy"].filter(a=>a in o);if(i.length===2&&n==="bgx")return s.noop;if(y(e,"backgroundSize","")==="cover")return Sn(n,e,t,o);const c={};for(const a of i)c[a]=z(e,a);return H(i,c,o)}function Sn(n,e,t,o){const r=Mn(e);if(!r.width)return s.noop;const i={width:e.offsetWidth,height:e.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),a={};for(const f of c){const u=o[f].map(([On])=>On),w=Math.min(...u),N=Math.max(...u),V=u.indexOf(w)<u.indexOf(N),G=N-w;a[f]=`${(V?-G:0)-(V?w:N)}px`,i[f==="bgy"?"height":"width"]+=G}const h=s.Dimensions.cover(r,i);for(const f of c){const u=f==="bgy"?"height":"width",w=h[u]-i[u];a[f]=`max(${z(e,f)},-${w}px) + ${a[f]}`}const l=H(c,a,o);return(f,u)=>{l(f,u),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function z(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function H(n,e,t){return function(o,r){for(const i of n){const c=x(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${c}px)`}}}const F={};function Mn(n){const e=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),s.trigger(n,s.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function g(n,e=s.toFloat){const t=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[c,a]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(c=e(c),a=a?s.toFloat(a)/100:null,i===0?a===null?a=0:a&&t.push([c,0]):i===o-1&&(a===null?a=1:a!==1&&(t.push([c,a]),a=1)),t.push([c,a]),a===null)r++;else if(r){const h=t[i-r-1][1],l=(a-h)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=h+l*(r-f+1);r=0}}return t}function R(n,e){const t=s.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function x(n,e){const[t,o,r]=R(n,e);return t+Math.abs(t-o)*r*(t<o?1:-1)}const Cn=/^-?\d+(?:\.\d+)?(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,Cn);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=s.css(s.css(n,e,t),e);return n.style[e]=o,r}function D(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var q={mixins:[wn],data:{selItem:"!li"},beforeConnect(){this.item=s.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(L(n,r,e)),c=this.getCss(B(n)?.5:r>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,c,t,o).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(L(n,t,e));s.fastdom.write(()=>s.css(this.$el,o))})}}]};function B(n){return s.endsWith(n,"in")}function L(n,e,t){return t/=2,B(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",q),q});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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.17.10-dev.3c5eac782 | 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("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function T(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(K=>{l||(l=K),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function D(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&E(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function E(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function O(t){return $(s.observeResize,t,"resize")}function M(t){return $(s.observeIntersection,t)}function P(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function $(t,e,i){return{observe:t,handler(){D(this,i)},...e}}var U={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"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()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var j={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:W,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||t.target.closest(s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],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,b,this.move,w),s.on(document,N,this.end,A),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),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 t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(a=>[s.hyphenate(a),`data-${s.hyphenate(a)}`]).flat();return{attributes:i,filter:n}});const k=Object.create(null);function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return k[n]&&(n=_(t,e,`${i}-2`)),k[n]=!0,n}const u={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",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},B={mixins:[R,j,L,U],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:t},e)=>V(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:O(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=F(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.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&&!t)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)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function F(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function V(t){return .5*t+300}var G={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:T},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},X={observe:P({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},J={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const S=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var C={mixins:[p,G,H,X],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},watch:{list(t){t&&S&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||S)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",C),C});
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function T(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(K=>{l||(l=K),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function D(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&E(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function E(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function O(t){return $(s.observeResize,t,"resize")}function M(t){return $(s.observeIntersection,t)}function P(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function $(t,e,i){return{observe:t,handler(){D(this,i)},...e}}var U={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"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()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var j={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:W,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||t.target.closest(s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],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,b,this.move,w),s.on(document,N,this.end,A),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),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 t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(a=>[s.hyphenate(a),`data-${s.hyphenate(a)}`]).flat();return{attributes:i,filter:n}});const k=Object.create(null);function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return k[n]&&(n=_(t,e,`${i}-2`)),k[n]=!0,n}const u={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",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},B={mixins:[R,j,L,U],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:t},e)=>V(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:O(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=F(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.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&&!t)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)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function F(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function V(t){return .5*t+300}var G={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:T},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},X={observe:P({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},J={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const S=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var C={mixins:[p,G,H,X],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},watch:{list(t){t&&S&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||S)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",C),C});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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.17.10-dev.3c5eac782 | 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("uikitsortable",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSortable=g(s.UIkit.util))})(this,function(s){"use strict";function g(o,e="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,s.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(e.type||e))}function R(o,e){for(const{read:n,write:t,events:c=[]}of o._updates){if(!e.has("update")&&!c.some(r=>e.has(r)))continue;let a;n&&(a=n.call(o,o._data,e),a&&s.isPlainObject(a)&&s.assign(o._data,a)),t&&a!==!1&&s.fastdom.write(()=>{o._connected&&t.call(o,o._data,e)})}}function B(o){return y(s.observeResize,o,"resize")}function N(o){return y(s.observeMutation,o)}function y(o,e,n){return{observe:o,handler(){g(this,n)},...e}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...s.children(o)]});function C(o){const e=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!s.isVisible(t))continue;const c=b(t,n);for(let a=e.length-1;a>=0;a--){const r=e[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){e.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=b(r[d],n);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){e.unshift([t]);break}}}return e}function b(o,e=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return e&&([n,t]=s.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const v="uk-transition-leave",w="uk-transition-enter";function P(o,e,n,t=0){const c=u(e,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(e)?l():Promise.reject(),d=h(async()=>{s.addClass(e,v),await Promise.all(S(e).map((l,i)=>new Promise(f=>setTimeout(()=>s.Transition.start(l,r,n/2,"ease").then(f),i*t)))),s.removeClass(e,v)}),p=h(async()=>{const l=s.height(e);s.addClass(e,w),o(),s.css(s.children(e),{opacity:0}),await z();const i=s.children(e),f=s.height(e);s.css(e,"alignContent","flex-start"),s.height(e,l);const m=S(e);s.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await s.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(s.Transition.start(e,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{s.removeClass(e,w),c===u(e)&&(s.css(e,{height:"",alignContent:""}),s.css(i,{opacity:""}),delete e.dataset.transition)})});return s.hasClass(e,v)?T(e).then(p):s.hasClass(e,w)?T(e).then(d).then(p):d().then(p)}function u(o,e){return e&&(o.dataset.transition=1+u(o)),s.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(s.children(o).filter(s.Transition.inProgress).map(e=>new Promise(n=>s.once(e,"transitionend transitioncanceled",n))))}function S(o){return C(s.children(o)).flat().filter(e=>s.isVisible(e))}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(e=>setTimeout(e,o))}async function A(o,e,n){await D();let t=s.children(e);const c=t.map(f=>x(f,!0)),a={...s.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(s.Transition.cancel)),o(),t=t.concat(s.children(e).filter(f=>!s.includes(t,f))),await Promise.resolve(),s.fastdom.flush();const r=s.attr(e,"style"),h=s.css(e,["height","padding"]),[d,p]=H(e,t,c),l=t.map(f=>({style:s.attr(f,"style")}));t.forEach((f,m)=>p[m]&&s.css(f,p[m])),s.css(e,a),s.trigger(e,"scroll"),s.fastdom.flush(),await D();const i=t.map((f,m)=>s.parent(f)===e&&s.Transition.start(f,d[m],n,"ease")).concat(s.Transition.start(e,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{s.attr(f,l[m]),s.parent(f)===e&&s.css(f,"display",d[m].opacity===0?"none":"")}),s.attr(e,"style",r)}catch{s.attr(t,"style",""),L(e,a)}}function x(o,e){const n=s.css(o,"zIndex");return s.isVisible(o)?{display:"",opacity:e?s.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?s.index(o):n,...I(o)}:!1}function H(o,e,n){const t=e.map((a,r)=>s.parent(a)&&r in n?n[r]?s.isVisible(a)?I(a):{opacity:0}:{opacity:s.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=s.parent(e[r])===o&&(n[r]||x(e[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 L(o,e){for(const n in e)s.css(o,n,"")}function I(o){const{height:e,width:n}=s.offset(o);return{height:e,width:n,transform:"",...s.position(o),...s.css(o,["marginTop","marginLeft"])}}function D(){return new Promise(o=>requestAnimationFrame(o))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,e=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,e,this.duration).catch(s.noop)}}},V={connected(){s.addClass(this.$el,this.$options.id)}},E={mixins:[V,M],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 o of["init","start","move","end"]){const e=this[o];this[o]=n=>{s.assign(this.pos,s.getEventPos(n)),e(n)}}},events:{name:s.pointerDown,passive:!1,handler:"init"},computed:{target:(o,e)=>(e.tBodies||[e])[0],items(){return s.children(this.target)},isEmpty(){return s.isEmpty(this.items)},handles({handle:o},e){return o?s.$$(o,e):this.items}},watch:{isEmpty(o){s.toggleClass(this.target,this.clsEmpty,o)},handles(o,e){s.css(e,{touchAction:"",userSelect:""}),s.css(o,{touchAction:s.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!s.parent(this.placeholder))return;const{pos:{x:e,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;s.css(this.drag,{top:n-t,left:e-c});const r=this.getSortable(document.elementFromPoint(e,n));if(!r)return;const{items:h}=r;if(h.some(s.Transition.inProgress))return;const d=G(h,{x:e,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,e,n,r===p&&o.moved!==d);l!==!1&&(l&&a===l||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,l),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:e,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>a.contains(e));!c||t||n>0||s.isInput(e)||e.closest(`.${this.clsNoDrag}`)||this.handle&&!e.closest(this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:e,index:s.index(c),...this.pos},s.on(document,s.pointerMove,this.move),s.on(document,s.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:e,top:n}=this.placeholder.getBoundingClientRect();s.assign(this.origin,{offsetLeft:this.pos.x-e,offsetTop:this.pos.y-n}),s.addClass(this.drag,this.clsDrag,this.clsCustom),s.addClass(this.placeholder,this.clsPlaceholder),s.addClass(this.items,this.clsItem),s.addClass(document.documentElement,this.clsDragState),s.trigger(this.$el,"start",[this,this.placeholder]),j(this.pos),this.move(o)},move(o){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(o)},end(){if(s.off(document,s.pointerMove,this.move),s.off(document,s.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==s.index(this.placeholder)&&s.trigger(this.$el,"moved",[this,this.placeholder]):(s.trigger(o.$el,"added",[o,this.placeholder]),s.trigger(this.$el,"removed",[this,this.placeholder])),s.trigger(this.$el,"stop",[this,this.placeholder]),s.remove(this.drag),this.drag=null;for(const{clsPlaceholder:e,clsItem:n}of this.touched)for(const t of this.touched)s.removeClass(t.items,e,n);this.touched=null,s.removeClass(document.documentElement,this.clsDragState)},insert(o,e){s.addClass(this.items,this.clsItem);const n=()=>e?s.before(e,o):s.append(this.target,o);this.animate(n)},remove(o){this.target.contains(o)&&this.animate(()=>s.remove(o))},getSortable(o){do{const e=this.$getComponent(o,"sortable");if(e&&(e===this||this.group!==!1&&e.group===this.group))return e}while(o=s.parent(o))}}};let $;function j(o){let e=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-e)*.3;e=Date.now(),s.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=s.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-l)return a.scrollTop=r,!0})},15)}function O(){clearInterval($)}function W(o,e){let n;if(s.isTag(e,"li","tr")){n=s.$("<div>"),s.append(n,e.cloneNode(!0).children);for(const t of e.getAttributeNames())s.attr(n,t,e.getAttribute(t))}else n=e.cloneNode(!0);return s.append(o,n),s.css(n,"margin","0","important"),s.css(n,{boxSizing:"border-box",width:e.offsetWidth,height:e.offsetHeight,padding:s.css(e,"padding")}),s.height(n.firstElementChild,s.height(e.firstElementChild)),n}function G(o,e){return o[s.findIndex(o,n=>s.pointInRect(e,n.getBoundingClientRect()))]}function J(o,e,n,t,c,a){if(!s.children(o).length)return;const r=e.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?e:e.nextElementSibling;const h=n.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,l,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[l]<r[l]?r[l]-h[l]:0;return h[i]<r[i]?m&&p<r[i]+m?!1:e.nextElementSibling:m&&p>r[f]-m?!1:e}function K(o,e){const n=s.children(o).length===1;n&&s.append(o,e);const t=s.children(o),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return n&&s.remove(e),c}function F(o,e){return o[1]>e[0]&&e[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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("uikitsortable",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSortable=g(s.UIkit.util))})(this,function(s){"use strict";function g(o,e="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,s.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(e.type||e))}function R(o,e){for(const{read:n,write:t,events:c=[]}of o._updates){if(!e.has("update")&&!c.some(r=>e.has(r)))continue;let a;n&&(a=n.call(o,o._data,e),a&&s.isPlainObject(a)&&s.assign(o._data,a)),t&&a!==!1&&s.fastdom.write(()=>{o._connected&&t.call(o,o._data,e)})}}function B(o){return y(s.observeResize,o,"resize")}function N(o){return y(s.observeMutation,o)}function y(o,e,n){return{observe:o,handler(){g(this,n)},...e}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...s.children(o)]});function C(o){const e=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!s.isVisible(t))continue;const c=b(t,n);for(let a=e.length-1;a>=0;a--){const r=e[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){e.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=b(r[d],n);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){e.unshift([t]);break}}}return e}function b(o,e=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return e&&([n,t]=s.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const v="uk-transition-leave",w="uk-transition-enter";function P(o,e,n,t=0){const c=u(e,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(e)?l():Promise.reject(),d=h(async()=>{s.addClass(e,v),await Promise.all(S(e).map((l,i)=>new Promise(f=>setTimeout(()=>s.Transition.start(l,r,n/2,"ease").then(f),i*t)))),s.removeClass(e,v)}),p=h(async()=>{const l=s.height(e);s.addClass(e,w),o(),s.css(s.children(e),{opacity:0}),await z();const i=s.children(e),f=s.height(e);s.css(e,"alignContent","flex-start"),s.height(e,l);const m=S(e);s.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await s.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(s.Transition.start(e,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{s.removeClass(e,w),c===u(e)&&(s.css(e,{height:"",alignContent:""}),s.css(i,{opacity:""}),delete e.dataset.transition)})});return s.hasClass(e,v)?T(e).then(p):s.hasClass(e,w)?T(e).then(d).then(p):d().then(p)}function u(o,e){return e&&(o.dataset.transition=1+u(o)),s.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(s.children(o).filter(s.Transition.inProgress).map(e=>new Promise(n=>s.once(e,"transitionend transitioncanceled",n))))}function S(o){return C(s.children(o)).flat().filter(e=>s.isVisible(e))}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(e=>setTimeout(e,o))}async function A(o,e,n){await D();let t=s.children(e);const c=t.map(f=>x(f,!0)),a={...s.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(s.Transition.cancel)),o(),t=t.concat(s.children(e).filter(f=>!s.includes(t,f))),await Promise.resolve(),s.fastdom.flush();const r=s.attr(e,"style"),h=s.css(e,["height","padding"]),[d,p]=H(e,t,c),l=t.map(f=>({style:s.attr(f,"style")}));t.forEach((f,m)=>p[m]&&s.css(f,p[m])),s.css(e,a),s.trigger(e,"scroll"),s.fastdom.flush(),await D();const i=t.map((f,m)=>s.parent(f)===e&&s.Transition.start(f,d[m],n,"ease")).concat(s.Transition.start(e,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{s.attr(f,l[m]),s.parent(f)===e&&s.css(f,"display",d[m].opacity===0?"none":"")}),s.attr(e,"style",r)}catch{s.attr(t,"style",""),L(e,a)}}function x(o,e){const n=s.css(o,"zIndex");return s.isVisible(o)?{display:"",opacity:e?s.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?s.index(o):n,...I(o)}:!1}function H(o,e,n){const t=e.map((a,r)=>s.parent(a)&&r in n?n[r]?s.isVisible(a)?I(a):{opacity:0}:{opacity:s.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=s.parent(e[r])===o&&(n[r]||x(e[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 L(o,e){for(const n in e)s.css(o,n,"")}function I(o){const{height:e,width:n}=s.offset(o);return{height:e,width:n,transform:"",...s.position(o),...s.css(o,["marginTop","marginLeft"])}}function D(){return new Promise(o=>requestAnimationFrame(o))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,e=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,e,this.duration).catch(s.noop)}}},V={connected(){s.addClass(this.$el,this.$options.id)}},E={mixins:[V,M],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 o of["init","start","move","end"]){const e=this[o];this[o]=n=>{s.assign(this.pos,s.getEventPos(n)),e(n)}}},events:{name:s.pointerDown,passive:!1,handler:"init"},computed:{target:(o,e)=>(e.tBodies||[e])[0],items(){return s.children(this.target)},isEmpty(){return s.isEmpty(this.items)},handles({handle:o},e){return o?s.$$(o,e):this.items}},watch:{isEmpty(o){s.toggleClass(this.target,this.clsEmpty,o)},handles(o,e){s.css(e,{touchAction:"",userSelect:""}),s.css(o,{touchAction:s.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!s.parent(this.placeholder))return;const{pos:{x:e,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;s.css(this.drag,{top:n-t,left:e-c});const r=this.getSortable(document.elementFromPoint(e,n));if(!r)return;const{items:h}=r;if(h.some(s.Transition.inProgress))return;const d=G(h,{x:e,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,e,n,r===p&&o.moved!==d);l!==!1&&(l&&a===l||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,l),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:e,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>a.contains(e));!c||t||n>0||s.isInput(e)||e.closest(`.${this.clsNoDrag}`)||this.handle&&!e.closest(this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:e,index:s.index(c),...this.pos},s.on(document,s.pointerMove,this.move),s.on(document,s.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:e,top:n}=this.placeholder.getBoundingClientRect();s.assign(this.origin,{offsetLeft:this.pos.x-e,offsetTop:this.pos.y-n}),s.addClass(this.drag,this.clsDrag,this.clsCustom),s.addClass(this.placeholder,this.clsPlaceholder),s.addClass(this.items,this.clsItem),s.addClass(document.documentElement,this.clsDragState),s.trigger(this.$el,"start",[this,this.placeholder]),j(this.pos),this.move(o)},move(o){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(o)},end(){if(s.off(document,s.pointerMove,this.move),s.off(document,s.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==s.index(this.placeholder)&&s.trigger(this.$el,"moved",[this,this.placeholder]):(s.trigger(o.$el,"added",[o,this.placeholder]),s.trigger(this.$el,"removed",[this,this.placeholder])),s.trigger(this.$el,"stop",[this,this.placeholder]),s.remove(this.drag),this.drag=null;for(const{clsPlaceholder:e,clsItem:n}of this.touched)for(const t of this.touched)s.removeClass(t.items,e,n);this.touched=null,s.removeClass(document.documentElement,this.clsDragState)},insert(o,e){s.addClass(this.items,this.clsItem);const n=()=>e?s.before(e,o):s.append(this.target,o);this.animate(n)},remove(o){this.target.contains(o)&&this.animate(()=>s.remove(o))},getSortable(o){do{const e=this.$getComponent(o,"sortable");if(e&&(e===this||this.group!==!1&&e.group===this.group))return e}while(o=s.parent(o))}}};let $;function j(o){let e=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-e)*.3;e=Date.now(),s.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=s.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-l)return a.scrollTop=r,!0})},15)}function O(){clearInterval($)}function W(o,e){let n;if(s.isTag(e,"li","tr")){n=s.$("<div>"),s.append(n,e.cloneNode(!0).children);for(const t of e.getAttributeNames())s.attr(n,t,e.getAttribute(t))}else n=e.cloneNode(!0);return s.append(o,n),s.css(n,"margin","0","important"),s.css(n,{boxSizing:"border-box",width:e.offsetWidth,height:e.offsetHeight,padding:s.css(e,"padding")}),s.height(n.firstElementChild,s.height(e.firstElementChild)),n}function G(o,e){return o[s.findIndex(o,n=>s.pointInRect(e,n.getBoundingClientRect()))]}function J(o,e,n,t,c,a){if(!s.children(o).length)return;const r=e.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?e:e.nextElementSibling;const h=n.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,l,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[l]<r[l]?r[l]-h[l]:0;return h[i]<r[i]?m&&p<r[i]+m?!1:e.nextElementSibling:m&&p>r[f]-m?!1:e}function K(o,e){const n=s.children(o).length===1;n&&s.append(o,e);const t=s.children(o),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return n&&s.remove(e),c}function F(o,e){return o[1]>e[0]&&e[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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')) :
|
|
@@ -347,7 +347,6 @@
|
|
|
347
347
|
this.id || (this.id = generateId(this, {}));
|
|
348
348
|
this._hasTitle = util.hasAttr(this.$el, "title");
|
|
349
349
|
util.attr(this.$el, { title: null, "aria-describedby": this.id });
|
|
350
|
-
util.once(this.$el, ["blur", util.pointerLeave], (e) => !util.isTouch(e) && this.hide());
|
|
351
350
|
clearTimeout(this.showTimer);
|
|
352
351
|
this.showTimer = setTimeout(this._show, delay);
|
|
353
352
|
},
|
|
@@ -386,7 +385,8 @@
|
|
|
386
385
|
),
|
|
387
386
|
util.on([document, ...util.overflowParents(this.$el)], "scroll", update, {
|
|
388
387
|
passive: true
|
|
389
|
-
})
|
|
388
|
+
}),
|
|
389
|
+
util.on(this.$el, ["blur", util.pointerLeave], (e2) => !util.isTouch(e2) && this.hide())
|
|
390
390
|
];
|
|
391
391
|
util.once(this.tooltip, "hide", () => handlers.forEach((handler) => handler()), {
|
|
392
392
|
self: true
|
|
@@ -440,11 +440,11 @@
|
|
|
440
440
|
return [dir, align];
|
|
441
441
|
}
|
|
442
442
|
function parseProps(options) {
|
|
443
|
-
const { el, id } = options;
|
|
444
|
-
return ["delay", "title"].reduce(
|
|
445
|
-
(
|
|
446
|
-
|
|
447
|
-
);
|
|
443
|
+
const { el, id, data } = options;
|
|
444
|
+
return ["delay", "title"].reduce((obj, key) => ({ [key]: util.data(el, key), ...obj }), {
|
|
445
|
+
...parseOptions(util.data(el, id), ["title"]),
|
|
446
|
+
...data
|
|
447
|
+
});
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
if (typeof window !== "undefined" && window.UIkit) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitTooltip=p(t.UIkit.util))})(this,function(t){"use strict";function p(s,i=[]){try{return s?t.startsWith(s,"{")?JSON.parse(s):i.length&&!t.includes(s,":")?{[i[0]]:s}:s.split(";").reduce((o,e)=>{const[n,r]=e.split(/:(.*)/);return n&&!t.isUndefined(r)&&(o[n.trim()]=r.trim()),o},{}):{}}catch{return{}}}t.memoize((s,i)=>{const o=Object.keys(i),e=o.concat(s).map(n=>[t.hyphenate(n),`data-${t.hyphenate(n)}`]).flat();return{attributes:o,filter:e}});const y=Object.create(null);function P(s,i=s.$el,o=""){if(i.id)return i.id;let e=`${s.$options.id}-${s._uid}${o}`;return y[e]&&(e=P(s,i,`${o}-2`)),y[e]=!0,e}var A={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},B={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${t.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=t.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(s,i,o){let e=[this.getPositionOffset(s),this.getShiftOffset(s)];const n=[this.flip&&"flip",this.shift&&"shift"],r={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const c in r)r[c].reverse();e.reverse(),n.reverse()}const a=I(s),h=t.dimensions(s);t.css(s,{top:-h.height,left:-h.width}),t.positionAt(s,i,{attach:r,offset:e,boundary:o,placement:n,viewportOffset:this.getViewportOffset(s)}),a()},getPositionOffset(s){return t.toPx(this.offset===!1?t.css(s,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",s)*(t.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(s){return this.align==="center"?0:t.toPx(t.css(s,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",s)*(t.includes(["left","top"],this.align)?1:-1)},getViewportOffset(s){return t.toPx(t.css(s,"--uk-position-viewport-offset"))}}};function I(s){const i=t.scrollParent(s),{scrollTop:o}=i;return()=>{o!==i.scrollTop&&(i.scrollTop=o)}}var D={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:s})=>!!s[0],hasTransition:({animation:s})=>["slide","reveal"].some(i=>t.startsWith(s[0],i))},methods:{async toggleElement(s,i,o){try{return await Promise.all(t.toNodes(s).map(e=>{const n=t.isBoolean(i)?i:!this.isToggled(e);if(!t.trigger(e,`before${n?"show":"hide"}`,[this]))return Promise.reject();const r=(t.isFunction(o)?o:o===!1||!this.hasAnimation?N:this.hasTransition?_:j)(e,n,this),a=n?this.clsEnter:this.clsLeave;t.addClass(e,a),t.trigger(e,n?"show":"hide",[this]);const h=()=>{t.removeClass(e,a),t.trigger(e,n?"shown":"hidden",[this])};return r?r.then(h,()=>(t.removeClass(e,a),Promise.reject())):h()})),!0}catch{return!1}},isToggled(s=this.$el){return s=t.toNode(s),t.hasClass(s,this.clsEnter)?!0:t.hasClass(s,this.clsLeave)?!1:this.cls?t.hasClass(s,this.cls.split(" ")[0]):t.isVisible(s)},_toggle(s,i){if(!s)return;i=!!i;let o;this.cls?(o=t.includes(this.cls," ")||i!==t.hasClass(s,this.cls),o&&t.toggleClass(s,this.cls,t.includes(this.cls," ")?void 0:i)):(o=i===s.hidden,o&&(s.hidden=!i)),t.$$("[autofocus]",s).some(e=>t.isVisible(e)?e.focus()||!0:e.blur()),o&&t.trigger(s,"toggled",[i,this])}}};function N(s,i,{_toggle:o}){return t.Animation.cancel(s),t.Transition.cancel(s),o(s,i)}async function _(s,i,{animation:o,duration:e,velocity:n,transition:r,_toggle:a}){var h;const[c="reveal",v="top"]=((h=o[0])==null?void 0:h.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],v)?0:1],O=T[1]===v,m=["width","height"][b.indexOf(T)],f=`margin-${T[0]}`,w=`margin-${v}`;let l=t.dimensions(s)[m];const H=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&a(s,!0);const V=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",f,w].map(S=>[S,s.style[S]])),g=t.dimensions(s),u=t.toFloat(t.css(s,f)),x=t.toFloat(t.css(s,w)),d=g[m]+x;!H&&!i&&(l+=x);const[$]=t.wrapInner(s,"<div>");t.css($,{boxSizing:"border-box",height:g.height,width:g.width,...t.css(s,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",w])}),t.css(s,{padding:0,border:0,minWidth:0,minHeight:0,[w]:0,width:g.width,height:g.height,overflow:"hidden",[m]:l});const E=l/d;e=(n*d+e)*(i?1-E:E);const C={[m]:i?d:0};O&&(t.css(s,f,d-l+u),C[f]=i?u:d+u),!O^c==="reveal"&&(t.css($,f,-d+l),t.Transition.start($,{[f]:i?0:-d},e,r));try{await t.Transition.start(s,C,e,r)}finally{t.css(s,V),t.unwrap($.firstChild),i||a(s,!1)}}function j(s,i,o){const{animation:e,duration:n,_toggle:r}=o;return i?(r(s,!0),t.Animation.in(s,e[0],n,o.origin)):t.Animation.out(s,e[1]||e[0],n,o.origin).then(()=>r(s,!1))}const F={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var k={mixins:[A,D,B],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){L(this.$el)},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:s=0,title:i}=W(this.$options);i&&(this.title=i,this.id||(this.id=P(this,{})),this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,{title:null,"aria-describedby":this.id}),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,s))},async hide(){t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),t.attr(this.$el,{title:this._hasTitle?this.title:null,"aria-describedby":null}),t.remove(this.tooltip),this.tooltip=null)},async _show(){this.tooltip=t.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>`),t.on(this.tooltip,"toggled",(s,i)=>{if(!i)return;const o=()=>this.positionAt(this.tooltip,this.$el);o();const[e,n]=U(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(e)}-${n}`:`${n}-${t.flipPosition(e)}`;const r=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,a=>a.type===t.pointerDown&&!this.$el.contains(a.target)||a.type==="keydown"&&a.keyCode===F.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",o,{passive:!0}),t.on(this.$el,["blur",t.pointerLeave],a=>!t.isTouch(a)&&this.hide())];t.once(this.tooltip,"hide",()=>r.forEach(a=>a()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${t.pointerEnter} ${t.pointerDown}`](s){t.isTouch(s)||this.show()}}};function L(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function U(s,i,[o,e]){const n=t.offset(s),r=t.offset(i),a=[["left","right"],["top","bottom"]];for(const c of a){if(n[c[0]]>=r[c[1]]){o=c[1];break}if(n[c[1]]<=r[c[0]]){o=c[0];break}}const h=t.includes(a[0],o)?a[1]:a[0];return n[h[0]]===r[h[0]]?e=h[0]:n[h[1]]===r[h[1]]?e=h[1]:e="center",[o,e]}function W(s){const{el:i,id:o,data:e}=s;return["delay","title"].reduce((n,r)=>({[r]:t.data(i,r),...n}),{...p(t.data(i,o),["title"]),...e})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",k),k});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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.17.10-dev.
|
|
1
|
+
/*! UIkit 3.17.10-dev.fde49d8a0 | 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() :
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
function toClasses(str) {
|
|
276
|
-
return isArray(str) ? str.map(toClasses).flat() :
|
|
276
|
+
return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(/[ ,]/).filter(Boolean) : [];
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
const voidElements = {
|
|
@@ -2151,7 +2151,7 @@
|
|
|
2151
2151
|
};
|
|
2152
2152
|
App.util = util;
|
|
2153
2153
|
App.options = {};
|
|
2154
|
-
App.version = "3.17.10-dev.
|
|
2154
|
+
App.version = "3.17.10-dev.fde49d8a0";
|
|
2155
2155
|
|
|
2156
2156
|
const PREFIX = "uk-";
|
|
2157
2157
|
const DATA = "__uikit__";
|