uikit 3.15.17 → 3.15.18-dev.014d8e608
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 +9 -0
- package/build/util.js +2 -3
- 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 +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +15 -15
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +77 -84
- package/dist/js/components/lightbox-panel.min.js +9 -1
- package/dist/js/components/lightbox.js +80 -87
- package/dist/js/components/lightbox.min.js +9 -1
- package/dist/js/components/notification.js +14 -14
- package/dist/js/components/notification.min.js +4 -1
- package/dist/js/components/parallax.js +22 -22
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +18 -18
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +93 -45
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +18 -18
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +33 -38
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +7 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +24 -24
- package/dist/js/components/tooltip.min.js +3 -1
- package/dist/js/components/upload.js +7 -7
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +303 -282
- package/dist/js/uikit-core.min.js +21 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +499 -432
- package/dist/js/uikit.min.js +34 -1
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +3 -5
- package/src/js/components/slider.js +62 -7
- package/src/js/core/sticky.js +26 -9
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider.js +2 -7
- package/src/js/util/viewport.js +4 -0
- package/tests/tooltip.html +1 -1
|
@@ -1 +1,9 @@
|
|
|
1
|
-
/*! UIkit 3.15.17 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],u):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox=u(t.UIkit.util))})(this,function(t){"use strict";var u={slide:{show(e){return[{transform:I(e*-100)},{transform:I()}]},percent(e){return V(e)},translate(e,s){return[{transform:I(s*-100*e)},{transform:I(s*100*(1-e))}]}}};function V(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function I(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"","translate3d("+e+", 0, 0)"}function $(e){return"scale3d("+e+", "+e+", 1)"}var B={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:$(1-.2)},{opacity:1,transform:$(1)}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:$(1-.2*e)},{opacity:e,transform:$(1-.2+.2*e)}]}}},O={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:s}=e;return s===!0&&this.$container||s&&t.$(s)}}},X={connected(){t.addClass(this.$el,this.$options.id)}},z={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(e){let{animation:s}=e;return!!s[0]},hasTransition(e){let{animation:s}=e;return["slide","reveal"].some(n=>t.startsWith(s[0],n))}},methods:{toggleElement(e,s,n){return new Promise(o=>Promise.all(t.toNodes(e).map(a=>{const r=t.isBoolean(s)?s:!this.isToggled(a);if(!t.trigger(a,"before"+(r?"show":"hide"),[this]))return Promise.reject();const i=(t.isFunction(n)?n:n===!1||!this.hasAnimation?G:this.hasTransition?J:K)(a,r,this),h=r?this.clsEnter:this.clsLeave;t.addClass(a,h),t.trigger(a,r?"show":"hide",[this]);const d=()=>{t.removeClass(a,h),t.trigger(a,r?"shown":"hidden",[this])};return i?i.then(d,()=>(t.removeClass(a,h),Promise.reject())):d()})).then(o,t.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=t.toNodes(e),t.hasClass(e,this.clsEnter)?!0:t.hasClass(e,this.clsLeave)?!1:this.cls?t.hasClass(e,this.cls.split(" ")[0]):t.isVisible(e)},_toggle(e,s){if(!e)return;s=Boolean(s);let n;this.cls?(n=t.includes(this.cls," ")||s!==t.hasClass(e,this.cls),n&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:s)):(n=s===e.hidden,n&&(e.hidden=!s)),t.$$("[autofocus]",e).some(o=>t.isVisible(o)?o.focus()||!0:o.blur()),n&&t.trigger(e,"toggled",[s,this])}}};function G(e,s,n){let{_toggle:o}=n;return t.Animation.cancel(e),t.Transition.cancel(e),o(e,s)}async function J(e,s,n){var o;let{animation:a,duration:r,velocity:i,transition:h,_toggle:d}=n;const[c="reveal",m="top"]=((o=a[0])==null?void 0:o.split("-"))||[],l=[["left","right"],["top","bottom"]],g=l[t.includes(l[0],m)?0:1],T=g[1]===m,A=["width","height"][l.indexOf(g)],v="margin-"+g[0],P="margin-"+m;let x=t.dimensions(e)[A];const fe=t.Transition.inProgress(e);await t.Transition.cancel(e),s&&d(e,!0);const ue=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",v,P].map(Y=>[Y,e.style[Y]])),y=t.dimensions(e),N=t.toFloat(t.css(e,v)),F=t.toFloat(t.css(e,P)),f=y[A]+F;!fe&&!s&&(x+=F);const[_]=t.wrapInner(e,"<div>");t.css(_,{boxSizing:"border-box",height:y.height,width:y.width,...t.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",P])}),t.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[P]:0,width:y.width,height:y.height,overflow:"hidden",[A]:x});const H=x/f;r=(i*f+r)*(s?1-H:H);const q={[A]:s?f:0};T&&(t.css(e,v,f-x+N),q[v]=s?N:f+N),!T^c==="reveal"&&(t.css(_,v,-f+x),t.Transition.start(_,{[v]:s?0:-f},r,h));try{await t.Transition.start(e,q,r,h)}finally{t.css(e,ue),t.unwrap(_.firstChild),s||d(e,!1)}}function K(e,s,n){t.Animation.cancel(e);const{animation:o,duration:a,_toggle:r}=n;return s?(r(e,!0),t.Animation.in(e,o[0],a,n.origin)):t.Animation.out(e,o[1]||o[0],a,n.origin).then(()=>r(e,!1))}const p=[];var Q={mixins:[X,O,z],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,s){let{selPanel:n}=e;return t.$(n,s)},transitionElement(){return this.panel},bgClose(e){let{bgClose:s}=e;return s&&this.panel}},beforeDisconnect(){t.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose+',a[href*="#"]'},handler(e){const{current:s,defaultPrevented:n}=e,{hash:o}=s;!n&&o&&te(s)&&!t.within(o,this.$el)&&t.$(o,document.body)?this.hide():t.matches(s,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(t.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(s=>s.hide())).then(this.show),e.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){t.once(this.$el,"hide",t.on(document,"focusin",e=>{t.last(p)===this&&!t.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(t.once(this.$el,"hidden",k(this.$el),{self:!0}),t.once(this.$el,"hidden",U(),{self:!0})),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+p.length),t.addClass(document.documentElement,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,e=>{let{target:s}=e;t.last(p)!==this||this.overlay&&!t.within(s,this.$el)||t.within(s,this.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",n=>{let{defaultPrevented:o,type:a,target:r}=n;!o&&a===t.pointerUp&&s===r&&this.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",e=>{e.keyCode===27&&t.last(p)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){t.includes(p,this)&&p.splice(p.indexOf(this),1),t.css(this.$el,"zIndex",""),p.some(e=>e.clsPage===this.clsPage)||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,j)},hide(){return this.toggleElement(this.$el,!1,j)}}};function j(e,s,n){let{transitionElement:o,_toggle:a}=n;return new Promise((r,i)=>t.once(e,"show hide",()=>{e._reject==null||e._reject(),e._reject=i,a(e,s);const h=t.once(o,"transitionstart",()=>{t.once(o,"transitionend transitioncancel",r,{self:!0}),clearTimeout(d)},{self:!0}),d=setTimeout(()=>{h(),r()},Z(t.css(o,"transitionDuration")))})).then(()=>delete e._reject)}function Z(e){return e?t.endsWith(e,"ms")?t.toFloat(e):t.toFloat(e)*1e3:0}function k(e){if(CSS.supports("overscroll-behavior","contain")){const o=[e,...ee(e,a=>/auto|scroll/.test(t.css(a,"overflow")))];return t.css(o,"overscrollBehavior","contain"),()=>t.css(o,"overscrollBehavior","")}let s;const n=[t.on(e,"touchstart",o=>{let{targetTouches:a}=o;a.length===1&&(s=a[0].clientY)},{passive:!0}),t.on(e,"touchmove",o=>{if(o.targetTouches.length!==1)return;let[a]=t.scrollParents(o.target,/auto|scroll/);t.within(a,e)||(a=e);const r=o.targetTouches[0].clientY-s,{scrollTop:i,scrollHeight:h,clientHeight:d}=a;(d>=h||i===0&&r>0||h-i<=d&&r<0)&&o.cancelable&&o.preventDefault()},{passive:!1})];return()=>n.forEach(o=>o())}let S;function U(){if(S)return t.noop;S=!0;const{scrollingElement:e}=document;return t.css(e,{overflowY:"hidden",touchAction:"none",paddingRight:t.width(window)-e.clientWidth}),()=>{S=!1,t.css(e,{overflowY:"",touchAction:"",paddingRight:""})}}function ee(e,s){const n=[];return t.apply(e,o=>{s(o)&&n.push(o)}),n}function te(e){return["origin","pathname","search"].every(s=>e[s]===location[s])}function se(e,s,n,o){let{animation:a,easing:r}=o;const{percent:i,translate:h,show:d=t.noop}=a,c=d(n),m=new t.Deferred;return{dir:n,show(l,g,T){g===void 0&&(g=0);const w=T?"linear":r;return l-=Math.round(l*t.clamp(g,-1,1)),this.translate(g),C(s,"itemin",{percent:g,duration:l,timing:w,dir:n}),C(e,"itemout",{percent:1-g,duration:l,timing:w,dir:n}),Promise.all([t.Transition.start(s,c[1],l,w),t.Transition.start(e,c[0],l,w)]).then(()=>{this.reset(),m.resolve()},t.noop),m.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const l in c[0])t.css([s,e],l,"")},forward(l,g){return g===void 0&&(g=this.percent()),t.Transition.cancel([s,e]),this.show(l,g,!0)},translate(l){this.reset();const g=h(l,n);t.css(s,g[1]),t.css(e,g[0]),C(s,"itemtranslatein",{percent:l,dir:n}),C(e,"itemtranslateout",{percent:1-l,dir:n})},percent(){return i(e||s,s,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function C(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var ne={connected(){var e;this.registerObserver(t.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},oe={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!t.$(":focus",this.$el))&&(!this.pauseOnHover||!t.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const E={passive:!1,capture:!0},M={passive:!0,capture:!0},re="touchstart mousedown",D="touchmove mousemove",W="touchend touchcancel mouseup click input scroll";var ae={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=n=>{const o=t.getEventPos(n).x*(t.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,s(n)}}},events:[{name:re,passive:!0,delegate(){return this.selSlides},handler(e){!this.draggable||!t.isTouch(e)&&ie(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:D,el(){return this.list},handler:t.noop,...E}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,D,this.move,E),t.on(document,W,this.end,M),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,a=Math.abs(s),r=this.getIndex(o+this.dir,o),i=this._getDistance(o,r)||n[o].offsetWidth;for(;r!==o&&a>i;)this.drag-=i*this.dir,o=r,a-=i,r=this.getIndex(o+this.dir,o),i=this._getDistance(o,r)||n[o].offsetWidth;this.percent=a/i;const h=n[o],d=n[r],c=this.index!==r,m=o===r;let l;[this.index,this.prevIndex].filter(g=>!t.includes([r,o],g)).forEach(g=>{t.trigger(n[g],"itemhidden",[this]),m&&(l=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||l)&&t.trigger(n[this.index],"itemshown",[this]),c&&(this.prevIndex=o,this.index=r,!m&&t.trigger(h,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!m&&d),c&&(!m&&t.trigger(h,"itemhide",[this]),t.trigger(d,"itemshow",[this]))},end(){if(t.off(document,D,this.move,E),t.off(document,W,this.end,M),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ie(e){return t.css(e,"userSelect")!=="none"&&t.toNodes(e.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var he={data:{selNav:!1},computed:{nav(e,s){let{selNav:n}=e;return t.$(n,s)},selNavItem(e){let{attrItem:s}=e;return"["+s+"],[data-"+s+"]"},navItems(e,s){return t.$$(this.selNavItem,s)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map((e,s)=>"<li "+this.attrItem+'="'+s+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const s of this.navItems){const n=t.data(s,this.attrItem);t.toggleClass(s,this.clsActive,t.toNumber(n)===e),t.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},de={mixins:[oe,ae,he,ne],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration(e,s){let{velocity:n}=e;return le(s.offsetWidth/n)},list(e,s){let{selList:n}=e;return t.$(n,s)},maxIndex(){return this.length-1},selSlides(e){let{selList:s,selSlides:n}=e;return s+" "+(n||"> *")},slides:{get(){return t.$$(this.selSlides,this.$el)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,s){if(s===void 0&&(s=!1),this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,a=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[r],h=this.getIndex(e,this.index),d=this.slides[h];if(i===d){a();return}if(this.dir=ce(e,r),this.prevIndex=r,this.index=h,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(d,"beforeitemshow",[this,i])){this.index=this.prevIndex,a();return}const c=this._show(i,d,s).then(()=>(i&&t.trigger(i,"itemhidden",[this]),t.trigger(d,"itemshown",[this]),new Promise(m=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&t.trigger(i,"itemhide",[this]),t.trigger(d,"itemshow",[this]),c},getIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.index),t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show(e,s,n){if(this._transitioner=this._getTransitioner(e,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&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(s!==n?s:!1,n);return o.translate(e),o},_getTransitioner(e,s,n,o){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),o)}}};function ce(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function le(e){return .5*e+300}var ge={mixins:[de],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:se},computed:{animation(e){let{animation:s,Animations:n}=e;return{...n[s]||n.slide,name:s}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:s}=e;t.addClass(s,this.clsActive)},itemshown(e){let{target:s}=e;t.addClass(s,this.clsActivated)},itemhidden(e){let{target:s}=e;t.removeClass(s,this.clsActive,this.clsActivated)}}},me={mixins:[O,Q,z,ge],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:B,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=t.$(this.template),s=t.$(this.selList,e);this.items.forEach(()=>t.append(s,"<li>")),this.$mount(t.append(this.container,e))},computed:{caption(e,s){let{selCaption:n}=e;return t.$(n,s)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=B.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){t.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,s){const{source:n,type:o,alt:a="",poster:r,attrs:i={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!n)return;let h;const d={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:c,height:m}=await t.getImage(n,i.srcset,i.size);this.setItem(s,b("img",{src:n,width:c,height:m,alt:a,...i}))}catch{this.setError(s)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=b("video",{src:n,poster:r,controls:"",playsinline:"","uk-video":""+this.videoAutoplay});t.on(c,"loadedmetadata",()=>{t.attr(c,{width:c.videoWidth,height:c.videoHeight,...i}),this.setItem(s,c)}),t.on(c,"error",()=>this.setError(s))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(s,b("iframe",{src:n,allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(h=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,b("iframe",{src:"https://www.youtube"+(h[1]||"")+".com/embed/"+h[2]+(h[3]?"?"+h[3]:""),width:1920,height:1080,...d,...i}));else if(h=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(s,b("iframe",{src:"https://player.vimeo.com/video/"+h[1]+(h[2]?"?"+h[2]:""),width:m,height:c,...d,...i}))}catch{this.setError(s)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const s=this.getItem(e);this.getSlide(s).childElementCount||t.trigger(this.$el,"itemload",[s])},getItem(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem(e,s){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),s)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,s){const n=t.fragment("<"+e+">");return t.attr(n,s),n}var L={install:pe,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(e,s){let{toggle:n}=e;return t.$$(n,s)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const s=t.uniqueBy(this.toggles.map(R),"source");if(t.isElement(e)){const{source:n}=R(e);e=t.findIndex(s,o=>{let{source:a}=o;return n===a})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:s}),t.on(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(e)},hide(){var e;return(e=this.panel)==null?void 0:e.hide()}}};function pe(e,s){e.lightboxPanel||e.component("lightboxPanel",me),t.assign(s.props,e.component("lightboxPanel").options.props)}function R(e){const s={};for(const n of["href","caption","type","poster","alt","attrs"])s[n==="href"?"source":n]=t.data(e,n);return s.attrs=t.parseOptions(s.attrs),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",L),L});
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:I(e*-100)},{transform:I()}]},percent(e){return Y(e)},translate(e,t){return[{transform:I(t*-100*e)},{transform:I(t*100*(1-e))}]}}};function Y(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function I(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function y(e){return`scale3d(${e}, ${e}, 1)`}var N={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:y(1-.2)},{opacity:1,transform:y(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:y(1-.2*e)},{opacity:e,transform:y(1-.2+.2*e)}]}}},B={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return e===!0&&this.$container||e&&s.$(e)}}},V={connected(){s.addClass(this.$el,this.$options.id)}},O={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:e}){return!!e[0]},hasTransition({animation:e}){return["slide","reveal"].some(t=>s.startsWith(e[0],t))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,`before${a?"show":"hide"}`,[this]))return Promise.reject();const o=(s.isFunction(n)?n:n===!1||!this.hasAnimation?X:this.hasTransition?G:J)(h,a,this),i=a?this.clsEnter:this.clsLeave;s.addClass(h,i),s.trigger(h,a?"show":"hide",[this]);const d=()=>{s.removeClass(h,i),s.trigger(h,a?"shown":"hidden",[this])};return o?o.then(d,()=>(s.removeClass(h,i),Promise.reject())):d()})).then(r,s.noop))},isToggled(e=this.$el){return[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),n&&s.trigger(e,"toggled",[t,this])}}};function X(e,t,{_toggle:n}){return s.Animation.cancel(e),s.Transition.cancel(e),n(e,t)}async function G(e,t,{animation:n,duration:r,velocity:h,transition:a,_toggle:o}){var i;const[d="reveal",l="top"]=((i=n[0])==null?void 0:i.split("-"))||[],c=[["left","right"],["top","bottom"]],p=c[s.includes(c[0],l)?0:1],m=p[1]===l,T=["width","height"][c.indexOf(p)],v=`margin-${p[0]}`,A=`margin-${l}`;let x=s.dimensions(e)[T];const me=s.Transition.inProgress(e);await s.Transition.cancel(e),t&&o(e,!0);const fe=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",v,A].map(q=>[q,e.style[q]])),$=s.dimensions(e),D=s.toFloat(s.css(e,v)),R=s.toFloat(s.css(e,A)),f=$[T]+R;!me&&!t&&(x+=R);const[P]=s.wrapInner(e,"<div>");s.css(P,{boxSizing:"border-box",height:$.height,width:$.width,...s.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),s.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:$.width,height:$.height,overflow:"hidden",[T]:x});const F=x/f;r=(h*f+r)*(t?1-F:F);const H={[T]:t?f:0};m&&(s.css(e,v,f-x+D),H[v]=t?D:f+D),!m^d==="reveal"&&(s.css(P,v,-f+x),s.Transition.start(P,{[v]:t?0:-f},r,a));try{await s.Transition.start(e,H,r,a)}finally{s.css(e,fe),s.unwrap(P.firstChild),t||o(e,!1)}}function J(e,t,n){s.Animation.cancel(e);const{animation:r,duration:h,_toggle:a}=n;return t?(a(e,!0),s.Animation.in(e,r[0],h,n.origin)):s.Animation.out(e,r[1]||r[0],h,n.origin).then(()=>a(e,!1))}const g=[];var K={mixins:[V,B,O],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel({selPanel:e},t){return s.$(e,t)},transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},beforeDisconnect(){s.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:t,defaultPrevented:n}=e,{hash:r}=t;!n&&r&&ee(t)&&!s.within(r,this.$el)&&s.$(r,document.body)?this.hide():s.matches(t,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(g,this))return!1;!this.stack&&g.length?(Promise.all(g.map(t=>t.hide())).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(g)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(s.once(this.$el,"hidden",Z(this.$el),{self:!0}),s.once(this.$el,"hidden",k(),{self:!0})),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+g.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,({target:e})=>{s.last(g)!==this||this.overlay&&!s.within(e,this.$el)||s.within(e,this.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:t,type:n,target:r})=>{!t&&n===s.pointerUp&&e===r&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(g)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(g,this)&&g.splice(g.indexOf(this),1),s.css(this.$el,"zIndex",""),g.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,z)},hide(){return this.toggleElement(this.$el,!1,z)}}};function z(e,t,{transitionElement:n,_toggle:r}){return new Promise((h,a)=>s.once(e,"show hide",()=>{e._reject==null||e._reject(),e._reject=a,r(e,t);const o=s.once(n,"transitionstart",()=>{s.once(n,"transitionend transitioncancel",h,{self:!0}),clearTimeout(i)},{self:!0}),i=setTimeout(()=>{o(),h()},Q(s.css(n,"transitionDuration")))})).then(()=>delete e._reject)}function Q(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function Z(e){if(CSS.supports("overscroll-behavior","contain")){const r=[e,...U(e,h=>/auto|scroll/.test(s.css(h,"overflow")))];return s.css(r,"overscrollBehavior","contain"),()=>s.css(r,"overscrollBehavior","")}let t;const n=[s.on(e,"touchstart",({targetTouches:r})=>{r.length===1&&(t=r[0].clientY)},{passive:!0}),s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[h]=s.scrollParents(r.target,/auto|scroll/);s.within(h,e)||(h=e);const a=r.targetTouches[0].clientY-t,{scrollTop:o,scrollHeight:i,clientHeight:d}=h;(d>=i||o===0&&a>0||i-o<=d&&a<0)&&r.cancelable&&r.preventDefault()},{passive:!1})];return()=>n.forEach(r=>r())}let _;function k(){if(_)return s.noop;_=!0;const{scrollingElement:e}=document;return s.css(e,{overflowY:"hidden",touchAction:"none",paddingRight:s.width(window)-e.clientWidth}),()=>{_=!1,s.css(e,{overflowY:"",touchAction:"",paddingRight:""})}}function U(e,t){const n=[];return s.apply(e,r=>{t(r)&&n.push(r)}),n}function ee(e){return["origin","pathname","search"].every(t=>e[t]===location[t])}function se(e,t,n,{animation:r,easing:h}){const{percent:a,translate:o,show:i=s.noop}=r,d=i(n),l=new s.Deferred;return{dir:n,show(c,p=0,m){const w=m?"linear":h;return c-=Math.round(c*s.clamp(p,-1,1)),this.translate(p),C(t,"itemin",{percent:p,duration:c,timing:w,dir:n}),C(e,"itemout",{percent:1-p,duration:c,timing:w,dir:n}),Promise.all([s.Transition.start(t,d[1],c,w),s.Transition.start(e,d[0],c,w)]).then(()=>{this.reset(),l.resolve()},s.noop),l.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const c in d[0])s.css([t,e],c,"")},forward(c,p=this.percent()){return s.Transition.cancel([t,e]),this.show(c,p,!0)},translate(c){this.reset();const p=o(c,n);s.css(t,p[1]),s.css(e,p[0]),C(t,"itemtranslatein",{percent:c,dir:n}),C(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function C(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var te={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},ne={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){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.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const S={passive:!1,capture:!0},j={passive:!0,capture:!0},re="touchstart mousedown",E="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var oe={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:re,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&ae(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:E,el(){return this.list},handler:s.noop,...S}],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,E,this.move,S),s.on(document,M,this.end,j),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,h=Math.abs(t),a=this.getIndex(r+this.dir,r),o=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&h>o;)this.drag-=o*this.dir,r=a,h-=o,a=this.getIndex(r+this.dir,r),o=this._getDistance(r,a)||n[r].offsetWidth;this.percent=h/o;const i=n[r],d=n[a],l=this.index!==a,c=r===a;let p;[this.index,this.prevIndex].filter(m=>!s.includes([a,r],m)).forEach(m=>{s.trigger(n[m],"itemhidden",[this]),c&&(p=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||p)&&s.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=r,this.index=a,!c&&s.trigger(i,"beforeitemhide",[this]),s.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),i,!c&&d),l&&(!c&&s.trigger(i,"itemhide",[this]),s.trigger(d,"itemshow",[this]))},end(){if(s.off(document,E,this.move,S),s.off(document,M,this.end,j),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ae(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var he={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>`<li ${this.attrItem}="${t}"><a href></a></li>`).join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},ie={mixins:[ne,oe,he,te],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},t){return de(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,h=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[a],i=this.getIndex(e,this.index),d=this.slides[i];if(o===d){h();return}if(this.dir=ce(e,a),this.prevIndex=a,this.index=i,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(d,"beforeitemshow",[this,o])){this.index=this.prevIndex,h();return}const l=this._show(o,d,t).then(()=>(o&&s.trigger(o,"itemhidden",[this]),s.trigger(d,"itemshown",[this]),new Promise(c=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,c()})})));return o&&s.trigger(o,"itemhide",[this]),s.trigger(d,"itemshow",[this]),l},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function ce(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function de(e){return .5*e+300}var le={mixins:[ie],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:se},computed:{animation({animation:e,Animations:t}){return{...t[e]||t.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){s.addClass(e,this.clsActive)},itemshown({target:e}){s.addClass(e,this.clsActivated)},itemhidden({target:e}){s.removeClass(e,this.clsActive,this.clsActivated)}}},pe={mixins:[B,K,O,le],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:N,template:`<div class="uk-lightbox uk-overflow-hidden">
|
|
2
|
+
<ul class="uk-lightbox-items"></ul>
|
|
3
|
+
<div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque">
|
|
4
|
+
<button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button>
|
|
5
|
+
</div>
|
|
6
|
+
<a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a>
|
|
7
|
+
<a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a>
|
|
8
|
+
<div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div>
|
|
9
|
+
</div>`}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption({selCaption:e},t){return s.$(e,t)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=N.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:r,alt:h="",poster:a,attrs:o={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let i;const d={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(r==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:l,height:c}=await s.getImage(n,o.srcset,o.size);this.setItem(t,b("img",{src:n,width:l,height:c,alt:h,...o}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const l=b("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`});s.on(l,"loadedmetadata",()=>{s.attr(l,{width:l.videoWidth,height:l.videoHeight,...o}),this.setItem(t,l)}),s.on(l,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,b("iframe",{src:n,allowfullscreen:"",class:"uk-lightbox-iframe",...o}));else if(i=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,b("iframe",{src:`https://www.youtube${i[1]||""}.com/embed/${i[2]}${i[3]?`?${i[3]}`:""}`,width:1920,height:1080,...d,...o}));else if(i=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:l,width:c}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(n)}`,{credentials:"omit"})).json();this.setItem(t,b("iframe",{src:`https://player.vimeo.com/video/${i[1]}${i[2]?`?${i[2]}`:""}`,width:c,height:l,...d,...o}))}catch{this.setError(t)}}}],methods:{loadItem(e=this.index){const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e=this.index){return this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,t){const n=s.fragment(`<${e}>`);return s.attr(n,t),n}var W={install:ge,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get({toggle:e},t){return s.$$(e,t)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return`${this.toggle}:not(.uk-disabled)`},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const t=s.uniqueBy(this.toggles.map(L),"source");if(s.isElement(e)){const{source:n}=L(e);e=s.findIndex(t,({source:r})=>n===r)}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:t}),s.on(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(e)},hide(){var e;return(e=this.panel)==null?void 0:e.hide()}}};function ge(e,t){e.lightboxPanel||e.component("lightboxPanel",pe),s.assign(t.props,e.component("lightboxPanel").options.props)}function L(e){const t={};for(const n of["href","caption","type","poster","alt","attrs"])t[n==="href"?"source":n]=s.data(e,n);return t.attrs=s.parseOptions(t.attrs),t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",W),W});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
computed: {
|
|
19
|
-
container(
|
|
19
|
+
container({ container }) {
|
|
20
20
|
return container === true && this.$container || container && uikitUtil.$(container);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
install,
|
|
44
44
|
|
|
45
45
|
computed: {
|
|
46
|
-
marginProp(
|
|
47
|
-
return
|
|
46
|
+
marginProp({ pos }) {
|
|
47
|
+
return `margin${uikitUtil.startsWith(pos, 'top') ? 'Top' : 'Bottom'}`;
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
startProps() {
|
|
@@ -54,21 +54,21 @@
|
|
|
54
54
|
|
|
55
55
|
created() {
|
|
56
56
|
const container =
|
|
57
|
-
uikitUtil.$(
|
|
57
|
+
uikitUtil.$(`.${this.clsContainer}-${this.pos}`, this.container) ||
|
|
58
58
|
uikitUtil.append(
|
|
59
|
-
this.container,
|
|
60
|
-
this.clsContainer
|
|
59
|
+
this.container,
|
|
60
|
+
`<div class="${this.clsContainer} ${this.clsContainer}-${this.pos}" style="display: block"></div>`);
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
this.$mount(
|
|
64
64
|
uikitUtil.append(
|
|
65
|
-
container,
|
|
66
|
-
this.clsMsg
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
container,
|
|
66
|
+
`<div class="${this.clsMsg}${
|
|
67
|
+
this.status ? ` ${this.clsMsg}-${this.status}` : ''
|
|
68
|
+
}" role="alert">
|
|
69
|
+
<a href class="${this.clsClose}" data-uk-close></a>
|
|
70
|
+
<div>${this.message}</div>
|
|
71
|
+
</div>`));
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
},
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],e):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=e(t.UIkit.util))})(this,function(t){"use strict";var e={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},r={mixins:[e],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:c,computed:{marginProp({pos:s}){return`margin${t.startsWith(s,"top")?"Top":"Bottom"}`},startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const s=t.$(`.${this.clsContainer}-${this.pos}`,this.container)||t.append(this.container,`<div class="${this.clsContainer} ${this.clsContainer}-${this.pos}" style="display: block"></div>`);this.$mount(t.append(s,`<div class="${this.clsMsg}${this.status?` ${this.clsMsg}-${this.status}`:""}" role="alert">
|
|
2
|
+
<a href class="${this.clsClose}" data-uk-close></a>
|
|
3
|
+
<div>${this.message}</div>
|
|
4
|
+
</div>`))},async connected(){const s=t.toFloat(t.css(this.$el,this.marginProp));await t.Transition.start(t.css(this.$el,this.startProps),{opacity:1,[this.marginProp]:s}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(s){t.closest(s.target,'a[href="#"],a[href=""]')&&s.preventDefault(),this.close()},[t.pointerEnter](){this.timer&&clearTimeout(this.timer)},[t.pointerLeave](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(s){const n=o=>{const i=t.parent(o);t.trigger(o,"close",[this]),t.remove(o),i!=null&&i.hasChildNodes()||t.remove(i)};this.timer&&clearTimeout(this.timer),s||await t.Transition.start(this.$el,this.startProps),n(this.$el)}}};function c(s){s.notification.closeAll=function(n,o){t.apply(document.body,i=>{const a=s.getComponent(i,"notification");a&&(!n||n===a.group)&&a.close(o)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
function toMedia(value, element) {
|
|
82
82
|
if (uikitUtil.isString(value)) {
|
|
83
83
|
if (uikitUtil.startsWith(value, '@')) {
|
|
84
|
-
value = uikitUtil.toFloat(uikitUtil.css(element,
|
|
84
|
+
value = uikitUtil.toFloat(uikitUtil.css(element, `--uk-breakpoint-${value.substr(1)}`));
|
|
85
85
|
} else if (isNaN(value)) {
|
|
86
86
|
return value;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
return value && uikitUtil.isNumeric(value) ?
|
|
90
|
+
return value && uikitUtil.isNumeric(value) ? `(min-width: ${value}px)` : '';
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
uikitUtil.memoize(async (src) => {
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
let transformFn;
|
|
195
195
|
|
|
196
196
|
if (prop === 'x' || prop === 'y') {
|
|
197
|
-
prop =
|
|
197
|
+
prop = `translate${uikitUtil.ucfirst(prop)}`;
|
|
198
198
|
transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
199
199
|
} else if (prop === 'scale') {
|
|
200
200
|
unit = '';
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
stops = parseStops(stops, transformFn);
|
|
210
210
|
|
|
211
211
|
return (css, percent) => {
|
|
212
|
-
css.transform +=
|
|
212
|
+
css.transform += ` ${prop}(${getValue(stops, percent)}${unit})`;
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
return i === 3 ? uikitUtil.toFloat(value) : parseInt(value, 10);
|
|
229
229
|
}).
|
|
230
230
|
join(',');
|
|
231
|
-
css[prop] =
|
|
231
|
+
css[prop] = `rgba(${value})`;
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
|
|
253
253
|
return (css, percent) => {
|
|
254
254
|
const value = getValue(stops, percent);
|
|
255
|
-
css.filter +=
|
|
255
|
+
css.filter += ` ${prop}(${value + unit})`;
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
return unit === '%' ? stop * length / 100 : stop;
|
|
281
281
|
});
|
|
282
282
|
|
|
283
|
-
if (!stops.some((
|
|
283
|
+
if (!stops.some(([value]) => value)) {
|
|
284
284
|
return uikitUtil.noop;
|
|
285
285
|
}
|
|
286
286
|
|
|
@@ -332,13 +332,13 @@
|
|
|
332
332
|
|
|
333
333
|
const positions = {};
|
|
334
334
|
for (const prop of bgProps) {
|
|
335
|
-
const values = props[prop].map((
|
|
335
|
+
const values = props[prop].map(([value]) => value);
|
|
336
336
|
const min = Math.min(...values);
|
|
337
337
|
const max = Math.max(...values);
|
|
338
338
|
const down = values.indexOf(min) < values.indexOf(max);
|
|
339
339
|
const diff = max - min;
|
|
340
340
|
|
|
341
|
-
positions[prop] = (down ? -diff : 0) - (down ? min : max)
|
|
341
|
+
positions[prop] = `${(down ? -diff : 0) - (down ? min : max)}px`;
|
|
342
342
|
dimEl[prop === 'bgy' ? 'height' : 'width'] += diff;
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -347,26 +347,26 @@
|
|
|
347
347
|
for (const prop of bgProps) {
|
|
348
348
|
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
349
349
|
const overflow = dim[attr] - dimEl[attr];
|
|
350
|
-
positions[prop] =
|
|
350
|
+
positions[prop] = `max(${getBackgroundPos(el, prop)},-${overflow}px) + ${positions[prop]}`;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
const fn = setBackgroundPosFn(bgProps, positions, props);
|
|
354
354
|
return (css, percent) => {
|
|
355
355
|
fn(css, percent);
|
|
356
|
-
css.backgroundSize = dim.width
|
|
356
|
+
css.backgroundSize = `${dim.width}px ${dim.height}px`;
|
|
357
357
|
css.backgroundRepeat = 'no-repeat';
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
function getBackgroundPos(el, prop) {
|
|
362
|
-
return getCssValue(el,
|
|
362
|
+
return getCssValue(el, `background-position-${prop.substr(-1)}`, '');
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
function setBackgroundPosFn(bgProps, positions, props) {
|
|
366
366
|
return function (css, percent) {
|
|
367
367
|
for (const prop of bgProps) {
|
|
368
368
|
const value = getValue(props[prop], percent);
|
|
369
|
-
css[
|
|
369
|
+
css[`background-position-${prop.substr(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
372
|
}
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
function parseStops(stops, fn
|
|
405
|
+
function parseStops(stops, fn = uikitUtil.toFloat) {
|
|
406
406
|
const result = [];
|
|
407
407
|
const { length } = stops;
|
|
408
408
|
let nullIndex = 0;
|
|
@@ -445,7 +445,7 @@
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
function getStop(stops, percent) {
|
|
448
|
-
const index = uikitUtil.findIndex(stops.slice(1), (
|
|
448
|
+
const index = uikitUtil.findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
|
|
449
449
|
return [
|
|
450
450
|
stops[index - 1][0],
|
|
451
451
|
stops[index][0],
|
|
@@ -503,17 +503,17 @@
|
|
|
503
503
|
},
|
|
504
504
|
|
|
505
505
|
computed: {
|
|
506
|
-
target(
|
|
506
|
+
target({ target }, $el) {
|
|
507
507
|
return getOffsetElement(target && uikitUtil.query(target, $el) || $el);
|
|
508
508
|
},
|
|
509
509
|
|
|
510
|
-
start(
|
|
510
|
+
start({ start }) {
|
|
511
511
|
return uikitUtil.toPx(start, 'height', this.target, true);
|
|
512
512
|
},
|
|
513
513
|
|
|
514
|
-
end(
|
|
514
|
+
end({ end, viewport }) {
|
|
515
515
|
return uikitUtil.toPx(
|
|
516
|
-
end || (viewport = (1 - viewport) * 100) && viewport
|
|
516
|
+
end || (viewport = (1 - viewport) * 100) && `${viewport}vh+${viewport}%`,
|
|
517
517
|
'height',
|
|
518
518
|
this.target,
|
|
519
519
|
true);
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
},
|
|
527
527
|
|
|
528
528
|
update: {
|
|
529
|
-
read(
|
|
529
|
+
read({ percent }, types) {
|
|
530
530
|
if (!types.has('scroll')) {
|
|
531
531
|
percent = false;
|
|
532
532
|
}
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
};
|
|
549
549
|
},
|
|
550
550
|
|
|
551
|
-
write(
|
|
551
|
+
write({ style }) {
|
|
552
552
|
if (!this.matchMedia) {
|
|
553
553
|
this.reset();
|
|
554
554
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={connected(){var e;this.registerObserver(r.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},R={connected(){B(this._uid,()=>this.$emit("scroll"))},disconnected(){_(this._uid)}};const y=new Map;let b;function B(e,t){b=b||r.on(window,"scroll",()=>y.forEach(n=>n()),{passive:!0,capture:!0}),y.set(e,t)}function _(e){y.delete(e),b&&!y.size&&(b(),b=null)}var V={props:{media:Boolean},data:{media:!1},connected(){const e=q(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function q(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function H(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const v={x:M,y:M,rotate:M,scale:M,color:O,backgroundColor:O,borderColor:O,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:J,stroke:K,bgx:I,bgy:I},{keys:z}=Object;var A={mixins:[V],props:L(z(v),"list"),data:L(z(v),void 0),computed:{props(e,t){const n={};for(const a in e)a in v&&!r.isUndefined(e[a])&&(n[a]=e[a].slice());const o={};for(const a in n)o[a]=v[a](a,t,n[a],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function M(e,t,n){let o=j(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",a;return e==="x"||e==="y"?(e=`translate${r.ucfirst(e)}`,a=s=>r.toFloat(r.toFloat(s).toFixed(o==="px"?0:6))):e==="scale"&&(o="",a=s=>j([s])?r.toPx(s,"width",t,!0)/t.offsetWidth:s),n.length===1&&n.unshift(e==="scale"?1:0),n=g(n,a),(s,c)=>{s.transform+=` ${e}(${x(n,c)}${o})`}}function O(e,t,n){return n.length===1&&n.unshift($(t,e,"")),n=g(n,o=>G(t,o)),(o,a)=>{const[s,c,i]=E(n,a),d=s.map((u,f)=>(u+=i*(c[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function G(e,t){return $(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=j(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=g(n),(a,s)=>{const c=x(n,s);a.filter+=` ${e}(${c+o})`}}function J(e,t,n){return n.length===1&&n.unshift($(t,e,"")),n=g(n),(o,a)=>{o[e]=x(n,a)}}function K(e,t,n){n.length===1&&n.unshift(0);const o=j(n),a=H(t);return n=g(n.reverse(),s=>(s=r.toFloat(s),o==="%"?s*a/100:s)),n.some(([s])=>s)?(r.css(t,"strokeDasharray",a),(s,c)=>{s.strokeDashoffset=x(n,c)}):r.noop}function I(e,t,n,o){n.length===1&&n.unshift(0);const a=e==="bgy"?"height":"width";o[e]=g(n,i=>r.toPx(i,a,t));const s=["bgx","bgy"].filter(i=>i in o);if(s.length===2&&e==="bgx")return r.noop;if($(t,"backgroundSize","")==="cover")return Q(e,t,n,o);const c={};for(const i of s)c[i]=p(t,i);return C(s,c,o)}function Q(e,t,n,o){const a=X(t);if(!a.width)return r.noop;const s={width:t.offsetWidth,height:t.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),i={};for(const f of c){const h=o[f].map(([k])=>k),w=Math.min(...h),S=Math.max(...h),W=h.indexOf(w)<h.indexOf(S),D=S-w;i[f]=`${(W?-D:0)-(W?w:S)}px`,s[f==="bgy"?"height":"width"]+=D}const d=r.Dimensions.cover(a,s);for(const f of c){const h=f==="bgy"?"height":"width",w=d[h]-s[h];i[f]=`max(${p(t,f)},-${w}px) + ${i[f]}`}const u=C(c,i,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function p(e,t){return $(e,`background-position-${t.substr(-1)}`,"")}function C(e,t,n){return function(o,a){for(const s of e){const c=x(n[s],a);o[`background-position-${s.substr(-1)}`]=`calc(${t[s]} + ${c}px)`}}}const F={};function X(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{F[t]=P(n),r.trigger(e,r.createEvent("load",!1))},P(n)):F[t]=P(n)}function P(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,t=r.toFloat){const n=[],{length:o}=e;let a=0;for(let s=0;s<o;s++){let[c,i]=r.isString(e[s])?e[s].trim().split(" "):[e[s]];if(c=t(c),i=i?r.toFloat(i)/100:null,s===0?i===null?i=0:i&&n.push([c,0]):s===o-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)a++;else if(a){const d=n[s-a-1][1],u=(i-d)/(a+1);for(let f=a;f>0;f--)n[s-f][1]=d+u*(a-f+1);a=0}}return n}function E(e,t){const n=r.findIndex(e.slice(1),([,o])=>t<=o)+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function x(e,t){const[n,o,a]=E(e,t);return r.isNumber(n)?n+Math.abs(n-o)*a*(n<o?1:-1):+o}const Y=/^-?\d+(\S+)?/;function j(e,t){for(const n of e){const o=n.match==null?void 0:n.match(Y);if(o)return o[1]}return t}function $(e,t,n){const o=e.style[t],a=r.css(r.css(e,t,n),t);return e.style[t]=o,a}function L(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var N={mixins:[A,m,R],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target({target:e},t){return T(e&&r.query(e,t)||t)},start({start:e}){return r.toPx(e,"height",this.target,!0)},end({end:e,viewport:t}){return r.toPx(e||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},resizeTargets(){return[this.$el,this.target]},update:{read({percent:e},t){if(t.has("scroll")||(e=!1),!r.isVisible(this.$el))return!1;if(!this.matchMedia)return;const n=e;return e=Z(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:e,style:n===e?!1:this.getCss(e)}},write({style:e}){if(!this.matchMedia){this.reset();return}e&&r.css(this.$el,e)},events:["scroll","resize"]}};function Z(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,1-t)}function T(e){return e?"offsetTop"in e?e:T(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",N),N});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
function toMedia(value, element) {
|
|
41
41
|
if (uikitUtil.isString(value)) {
|
|
42
42
|
if (uikitUtil.startsWith(value, '@')) {
|
|
43
|
-
value = uikitUtil.toFloat(uikitUtil.css(element,
|
|
43
|
+
value = uikitUtil.toFloat(uikitUtil.css(element, `--uk-breakpoint-${value.substr(1)}`));
|
|
44
44
|
} else if (isNaN(value)) {
|
|
45
45
|
return value;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
return value && uikitUtil.isNumeric(value) ?
|
|
49
|
+
return value && uikitUtil.isNumeric(value) ? `(min-width: ${value}px)` : '';
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
uikitUtil.memoize(async (src) => {
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
let transformFn;
|
|
154
154
|
|
|
155
155
|
if (prop === 'x' || prop === 'y') {
|
|
156
|
-
prop =
|
|
156
|
+
prop = `translate${uikitUtil.ucfirst(prop)}`;
|
|
157
157
|
transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
158
158
|
} else if (prop === 'scale') {
|
|
159
159
|
unit = '';
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
stops = parseStops(stops, transformFn);
|
|
169
169
|
|
|
170
170
|
return (css, percent) => {
|
|
171
|
-
css.transform +=
|
|
171
|
+
css.transform += ` ${prop}(${getValue(stops, percent)}${unit})`;
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
return i === 3 ? uikitUtil.toFloat(value) : parseInt(value, 10);
|
|
188
188
|
}).
|
|
189
189
|
join(',');
|
|
190
|
-
css[prop] =
|
|
190
|
+
css[prop] = `rgba(${value})`;
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
|
|
212
212
|
return (css, percent) => {
|
|
213
213
|
const value = getValue(stops, percent);
|
|
214
|
-
css.filter +=
|
|
214
|
+
css.filter += ` ${prop}(${value + unit})`;
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
return unit === '%' ? stop * length / 100 : stop;
|
|
240
240
|
});
|
|
241
241
|
|
|
242
|
-
if (!stops.some((
|
|
242
|
+
if (!stops.some(([value]) => value)) {
|
|
243
243
|
return uikitUtil.noop;
|
|
244
244
|
}
|
|
245
245
|
|
|
@@ -291,13 +291,13 @@
|
|
|
291
291
|
|
|
292
292
|
const positions = {};
|
|
293
293
|
for (const prop of bgProps) {
|
|
294
|
-
const values = props[prop].map((
|
|
294
|
+
const values = props[prop].map(([value]) => value);
|
|
295
295
|
const min = Math.min(...values);
|
|
296
296
|
const max = Math.max(...values);
|
|
297
297
|
const down = values.indexOf(min) < values.indexOf(max);
|
|
298
298
|
const diff = max - min;
|
|
299
299
|
|
|
300
|
-
positions[prop] = (down ? -diff : 0) - (down ? min : max)
|
|
300
|
+
positions[prop] = `${(down ? -diff : 0) - (down ? min : max)}px`;
|
|
301
301
|
dimEl[prop === 'bgy' ? 'height' : 'width'] += diff;
|
|
302
302
|
}
|
|
303
303
|
|
|
@@ -306,26 +306,26 @@
|
|
|
306
306
|
for (const prop of bgProps) {
|
|
307
307
|
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
308
308
|
const overflow = dim[attr] - dimEl[attr];
|
|
309
|
-
positions[prop] =
|
|
309
|
+
positions[prop] = `max(${getBackgroundPos(el, prop)},-${overflow}px) + ${positions[prop]}`;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
const fn = setBackgroundPosFn(bgProps, positions, props);
|
|
313
313
|
return (css, percent) => {
|
|
314
314
|
fn(css, percent);
|
|
315
|
-
css.backgroundSize = dim.width
|
|
315
|
+
css.backgroundSize = `${dim.width}px ${dim.height}px`;
|
|
316
316
|
css.backgroundRepeat = 'no-repeat';
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
function getBackgroundPos(el, prop) {
|
|
321
|
-
return getCssValue(el,
|
|
321
|
+
return getCssValue(el, `background-position-${prop.substr(-1)}`, '');
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
function setBackgroundPosFn(bgProps, positions, props) {
|
|
325
325
|
return function (css, percent) {
|
|
326
326
|
for (const prop of bgProps) {
|
|
327
327
|
const value = getValue(props[prop], percent);
|
|
328
|
-
css[
|
|
328
|
+
css[`background-position-${prop.substr(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
331
|
}
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
function parseStops(stops, fn
|
|
364
|
+
function parseStops(stops, fn = uikitUtil.toFloat) {
|
|
365
365
|
const result = [];
|
|
366
366
|
const { length } = stops;
|
|
367
367
|
let nullIndex = 0;
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
function getStop(stops, percent) {
|
|
407
|
-
const index = uikitUtil.findIndex(stops.slice(1), (
|
|
407
|
+
const index = uikitUtil.findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
|
|
408
408
|
return [
|
|
409
409
|
stops[index - 1][0],
|
|
410
410
|
stops[index][0],
|
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
return this.item;
|
|
468
468
|
},
|
|
469
469
|
|
|
470
|
-
handler(
|
|
470
|
+
handler({ type, detail: { percent, duration, timing, dir } }) {
|
|
471
471
|
uikitUtil.fastdom.read(() => {
|
|
472
472
|
if (!this.matchMedia) {
|
|
473
473
|
return;
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
return this.item;
|
|
507
507
|
},
|
|
508
508
|
|
|
509
|
-
handler(
|
|
509
|
+
handler({ type, detail: { percent, dir } }) {
|
|
510
510
|
uikitUtil.fastdom.read(() => {
|
|
511
511
|
if (!this.matchMedia) {
|
|
512
512
|
this.reset();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlider_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:v,bgy:v},{keys:P}=Object;var _={mixins:[g],props:W(P(w),"list"),data:W(P(w),void 0),computed:{props(e,t){const n={};for(const s in e)s in w&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=w[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function y(e,t,n){let o=M(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e=`translate${r.ucfirst(e)}`,s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>M([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=` ${e}(${b(n,i)}${o})`}}function j(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=M(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=` ${e}(${i+o})`}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=M(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(([a])=>a)?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function v(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=O(t,c);return p(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(([J])=>J),$=Math.min(...h),I=Math.max(...h),B=h.indexOf($)<h.indexOf(I),N=I-$;c[f]=`${(B?-N:0)-(B?$:I)}px`,a[f==="bgy"?"height":"width"]+=N}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",$=d[h]-a[h];c[f]=`max(${O(t,f)},-${$}px) + ${c[f]}`}const u=p(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function O(e,t){return x(e,`background-position-${t.substr(-1)}`,"")}function p(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o[`background-position-${a.substr(-1)}`]=`calc(${t[a]} + ${i}px)`}}}const F={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{F[t]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):F[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t=r.toFloat){const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const d=n[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=d+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),([,o])=>t<=o)+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function M(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,duration:n,timing:o,dir:s}}){r.fastdom.read(()=>{if(!this.matchMedia)return;const a=this.getCss(z(e,s,t)),i=this.getCss(D(e)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,a),r.Transition.start(this.$el,i,n,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,dir:n}}){r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(z(e,n,t));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",T),T});
|