uikit 3.11.2-dev.f2970ffaa → 3.11.2-dev.fb043abc2
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 +5 -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 +6 -17
- 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 +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +68 -34
- 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 +73 -50
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/parallax.js +5 -16
- package/src/js/core/sticky.js +38 -19
- package/src/js/util/dimensions.js +28 -12
- package/tests/sticky-parallax.html +43 -40
- package/tests/sticky.html +45 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=r(e.UIkit.util))})(this,function(e){"use strict";var r={connected:function(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},a={mixins:[r],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(n){var t=n.date;return Date.parse(t)},days:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","days"),t)},hours:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","hours"),t)},minutes:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","minutes"),t)},seconds:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","seconds"),t)},units:function(){var n=this;return["days","hours","minutes","seconds"].filter(function(t){return n[t]})}},connected:function(){this.start()},disconnected:function(){var n=this;this.stop(),this.units.forEach(function(t){return e.empty(n[t])})},events:[{name:"visibilitychange",el:function(){return document},handler:function(){document.hidden?this.stop():this.start()}}],update:{write:function(){var n=this,t=u(this.date);t.total<=0&&(this.stop(),t.days=t.hours=t.minutes=t.seconds=0),this.units.forEach(function(s){var i=String(Math.floor(t[s]));i=i.length<2?"0"+i:i;var o=n[s];o.textContent!==i&&(i=i.split(""),i.length!==o.children.length&&e.html(o,i.map(function(){return"<span></span>"}).join("")),i.forEach(function(c,d){return o.children[d].textContent=c}))})}},methods:{start:function(){this.stop(),this.date&&this.units.length&&(this.$update(),this.timer=setInterval(this.$update,1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}};function u(n){var t=n-Date.now();return{total:t,seconds:t/1e3%60,minutes:t/1e3/60%60,hours:t/1e3/60/60%24,days:t/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",a),a});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],m):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=m(n.UIkit.util))})(this,function(n){"use strict";function m(r){return q(r,"top","bottom")}function q(r,e,o){for(var a=[[]],s=0;s<r.length;s++){var t=r[s];if(!!n.isVisible(t))for(var c=g(t),f=a.length-1;f>=0;f--){var h=a[f];if(!h[0]){h.push(t);break}var d=void 0;if(h[0].offsetParent===t.offsetParent?d=g(h[0]):(c=g(t,!0),d=g(h[0],!0)),c[e]>=d[o]-1&&c[e]!==d[e]){a.push([t]);break}if(c[o]-1>d[e]||c[e]===d[e]){h.push(t);break}if(f===0){a.unshift([t]);break}}}return a}function g(r,e){var o;e===void 0&&(e=!1);var a=r.offsetTop,s=r.offsetLeft,t=r.offsetHeight,c=r.offsetWidth;return e&&(o=n.offsetPosition(r),a=o[0],s=o[1]),{top:a,left:s,bottom:a+t,right:s+c}}var y="uk-transition-leave",$="uk-transition-enter";function w(r,e,o,a){a===void 0&&(a=0);var s=l(e,!0),t={opacity:1},c={opacity:0},f=function(v){return function(){return s===l(e)?v():n.Promise.reject()}},h=f(function(){return n.addClass(e,y),n.Promise.all(I(e).map(function(v,u){return new n.Promise(function(i){return setTimeout(function(){return n.Transition.start(v,c,o/2,"ease").then(i)},u*a)})})).then(function(){return n.removeClass(e,y)})}),d=f(function(){var v=n.height(e);return n.addClass(e,$),r(),n.css(n.children(e),{opacity:0}),new n.Promise(function(u){return requestAnimationFrame(function(){var i=n.children(e),p=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,v);var C=I(e);n.css(i,c);var L=C.map(function(R,_){return new n.Promise(function(G){return setTimeout(function(){return n.Transition.start(R,t,o/2,"ease").then(G)},_*a)})});v!==p&&L.push(n.Transition.start(e,{height:p},o/2+C.length*a,"ease")),n.Promise.all(L).then(function(){n.removeClass(e,$),s===l(e)&&(n.css(e,{height:"",alignContent:""}),n.css(i,{opacity:""}),delete e.dataset.transition),u()})})})});return n.hasClass(e,y)?T(e).then(d):n.hasClass(e,$)?T(e).then(h).then(d):h().then(d)}function l(r,e){return e&&(r.dataset.transition=1+l(r)),n.toNumber(r.dataset.transition)||0}function T(r){return n.Promise.all(n.children(r).filter(n.Transition.inProgress).map(function(e){return new n.Promise(function(o){return n.once(e,"transitionend transitioncanceled",o)})}))}function I(r){return m(n.children(r)).reduce(function(e,o){return e.concat(n.sortBy(o.filter(function(a){return n.isInView(a)}),"offsetLeft"))},[])}function A(r,e,o){return new n.Promise(function(a){return requestAnimationFrame(function(){var s=n.children(e),t=s.map(function(f){return S(f,!0)}),c=n.css(e,["height","padding"]);n.Transition.cancel(e),s.forEach(n.Transition.cancel),F(e),r(),s=s.concat(n.children(e).filter(function(f){return!n.includes(s,f)})),n.Promise.resolve().then(function(){n.fastdom.flush();var f=n.css(e,["height","padding"]),h=z(e,s,t),d=h[0],v=h[1];s.forEach(function(u,i){return v[i]&&n.css(u,v[i])}),n.css(e,n.assign({display:"block"},c)),requestAnimationFrame(function(){var u=s.map(function(i,p){return n.parent(i)===e&&n.Transition.start(i,d[p],o,"ease")}).concat(n.Transition.start(e,f,o,"ease"));n.Promise.all(u).then(function(){s.forEach(function(i,p){return n.parent(i)===e&&n.css(i,"display",d[p].opacity===0?"none":"")}),F(e)},n.noop).then(a)})})})})}function S(r,e){var o=n.css(r,"zIndex");return n.isVisible(r)?n.assign({display:"",opacity:e?n.css(r,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(r):o},b(r)):!1}function z(r,e,o){var a=e.map(function(t,c){return n.parent(t)&&c in o?o[c]?n.isVisible(t)?b(t):{opacity:0}:{opacity:n.isVisible(t)?1:0}:!1}),s=a.map(function(t,c){var f=n.parent(e[c])===r&&(o[c]||S(e[c]));if(!f)return!1;if(!t)delete f.opacity;else if(!("opacity"in t)){var h=f.opacity;h%1?t.opacity=1:delete f.opacity}return f});return[a,s]}function F(r){n.css(r.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),n.css(r,{height:"",display:"",padding:""})}function b(r){var e=n.offset(r),o=e.height,a=e.width,s=n.position(r),t=s.top,c=s.left,f=n.css(r,["marginTop","marginLeft"]),h=f.marginLeft,d=f.marginTop;return{top:t,left:c,height:o,width:a,marginLeft:h,marginTop:d,transform:""}}var B={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate:function(r,e){var o=this;e===void 0&&(e=this.$el);var a=this.animation,s=a==="fade"?w:a==="delayed-fade"?function(){for(var t=[],c=arguments.length;c--;)t[c]=arguments[c];return w.apply(void 0,t.concat([40]))}:a?A:function(){return r(),n.Promise.resolve()};return s(r,e,this.duration).then(function(){return o.$update(e,"resize")},n.noop)}}},P={mixins:[B],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get:function(r,e){var o=r.attrItem;return n.$$("["+o+"],[data-"+o+"]",e)},watch:function(){var r=this;if(this.updateState(),this.selActive!==!1){var e=n.$$(this.selActive,this.$el);this.toggles.forEach(function(o){return n.toggleClass(o,r.cls,n.includes(e,o))})}},immediate:!0},children:{get:function(r,e){var o=r.target;return n.$$(o+" > *",e)},watch:function(r,e){e&&!N(r,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(r){r.preventDefault(),this.apply(r.current)}}],methods:{apply:function(r){var e=this.getState(),o=x(r,this.attrItem,this.getState());O(e,o)||this.setState(o)},getState:function(){var r=this;return this.toggles.filter(function(e){return n.hasClass(e,r.cls)}).reduce(function(e,o){return x(o,r.attrItem,e)},{filter:{"":""},sort:[]})},setState:function(r,e){var o=this;e===void 0&&(e=!0),r=n.assign({filter:{"":""},sort:[]},r),n.trigger(this.$el,"beforeFilter",[this,r]),this.toggles.forEach(function(a){return n.toggleClass(a,o.cls,!!H(a,o.attrItem,r))}),n.Promise.all(n.$$(this.target,this.$el).map(function(a){var s=function(){V(r,a,n.children(a)),o.$update(o.$el)};return e?o.animate(s,a):s()})).then(function(){return n.trigger(o.$el,"afterFilter",[o])})},updateState:function(){var r=this;n.fastdom.write(function(){return r.setState(r.getState(),!1)})}}};function E(r,e){return n.parseOptions(n.data(r,e),["filter"])}function O(r,e){return["filter","sort"].every(function(o){return n.isEqual(r[o],e[o])})}function V(r,e,o){var a=W(r);o.forEach(function(h){return n.css(h,"display",a&&!n.matches(h,a)?"none":"")});var s=r.sort,t=s[0],c=s[1];if(t){var f=M(o,t,c);n.isEqual(f,o)||n.append(e,f)}}function x(r,e,o){var a=E(r,e),s=a.filter,t=a.group,c=a.sort,f=a.order;return f===void 0&&(f="asc"),(s||n.isUndefined(c))&&(t?s?(delete o.filter[""],o.filter[t]=s):(delete o.filter[t],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":s||""})):o.filter={"":s||""}),n.isUndefined(c)||(o.sort=[c,f]),o}function H(r,e,o){var a=o.filter;a===void 0&&(a={"":""});var s=o.sort,t=s[0],c=s[1],f=E(r,e),h=f.filter;h===void 0&&(h="");var d=f.group;d===void 0&&(d="");var v=f.sort,u=f.order;return u===void 0&&(u="asc"),n.isUndefined(v)?d in a&&h===a[d]||!h&&d&&!(d in a)&&!a[""]:t===v&&c===u}function N(r,e){return r.length===e.length&&r.every(function(o){return~e.indexOf(o)})}function W(r){var e=r.filter,o="";return n.each(e,function(a){return o+=a||""}),o}function M(r,e,o){return n.assign([],r).sort(function(a,s){return n.data(a,e).localeCompare(n.data(s,e),void 0,{numeric:!0})*(o==="asc"||-1)})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox_panel=p(t.UIkit.util))})(this,function(t){"use strict";var p={slide:{show:function(e){return[{transform:x(e*-100)},{transform:x()}]},percent:function(e){return P(e)},translate:function(e,n){return[{transform:x(n*-100*e)},{transform:x(n*100*(1-e))}]}}};function P(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function x(e,n){return e===void 0&&(e=0),n===void 0&&(n="%"),e+=e?n:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function $(e){return"scale3d("+e+", "+e+", 1)"}var y=t.assign({},p,{fade:{show:function(){return[{opacity:0},{opacity:1}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e},{opacity:e}]}},scale:{show:function(){return[{opacity:0,transform:$(1-.2)},{opacity:1,transform:$(1)}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e,transform:$(1-.2*e)},{opacity:e,transform:$(1-.2+.2*e)}]}}}),C={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},E={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(e){var n=e.animation;return!!n[0]},hasTransition:function(e){var n=e.animation;return this.hasAnimation&&n[0]===!0}},methods:{toggleElement:function(e,n,s){var r=this;return new t.Promise(function(o){return t.Promise.all(t.toNodes(e).map(function(c){var h=t.isBoolean(n)?n:!r.isToggled(c);if(!t.trigger(c,"before"+(h?"show":"hide"),[r]))return t.Promise.reject();var a=(t.isFunction(s)?s:s===!1||!r.hasAnimation?r._toggle:r.hasTransition?S(r):N(r))(c,h),i=h?r.clsEnter:r.clsLeave;t.addClass(c,i),t.trigger(c,h?"show":"hide",[r]);var u=function(){t.removeClass(c,i),t.trigger(c,h?"shown":"hidden",[r]),r.$update(c)};return a?a.then(u,function(){return t.removeClass(c,i),t.Promise.reject()}):u()})).then(o,t.noop)})},isToggled:function(e){var n;return e===void 0&&(e=this.$el),n=t.toNodes(e),e=n[0],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:function(e,n){if(!!e){n=Boolean(n);var s;this.cls?(s=t.includes(this.cls," ")||n!==t.hasClass(e,this.cls),s&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:n)):(s=n===e.hidden,s&&(e.hidden=!n)),t.$$("[autofocus]",e).some(function(r){return t.isVisible(r)?r.focus()||!0:r.blur()}),s&&(t.trigger(e,"toggled",[n,this]),this.$update(e))}}}};function S(e){var n=e.isToggled,s=e.duration,r=e.initProps,o=e.hideProps,c=e.transition,h=e._toggle;return function(a,i){var u=t.Transition.inProgress(a),l=a.hasChildNodes?t.toFloat(t.css(a.firstElementChild,"marginTop"))+t.toFloat(t.css(a.lastElementChild,"marginBottom")):0,d=t.isVisible(a)?t.height(a)+(u?0:l):0;t.Transition.cancel(a),n(a)||h(a,!0),t.height(a,""),t.fastdom.flush();var f=t.height(a)+(u?0:l);return t.height(a,d),(i?t.Transition.start(a,t.assign({},r,{overflow:"hidden",height:f}),Math.round(s*(1-d/f)),c):t.Transition.start(a,o,Math.round(s*(d/f)),c).then(function(){return h(a,!1)})).then(function(){return t.css(a,r)})}}function N(e){return function(n,s){t.Animation.cancel(n);var r=e.animation,o=e.duration,c=e._toggle;return s?(c(n,!0),t.Animation.in(n,r[0],o,e.origin)):t.Animation.out(n,r[1]||r[0],o,e.origin).then(function(){return c(n,!1)})}}var g=[],D={mixins:[E,C,T],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:function(e,n){var s=e.selPanel;return t.$(s,n)},transitionElement:function(){return this.panel},bgClose:function(e){var n=e.bgClose;return n&&this.panel}},beforeDisconnect:function(){t.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler:function(e,n){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler:function(e){if(t.includes(g,this))return!1;!this.stack&&g.length?(t.Promise.all(g.map(function(n){return n.hide()})).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler:function(){var e=this,n=document.documentElement;t.width(window)>n.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+g.length),t.addClass(n,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,function(s){var r=s.target;t.last(g)!==e||e.overlay&&!t.within(r,e.$el)||t.within(r,e.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",function(o){var c=o.defaultPrevented,h=o.type,a=o.target;!c&&h===t.pointerUp&&r===a&&e.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",function(s){s.keyCode===27&&t.last(g)===e&&e.hide()}),{self:!0})}},{name:"shown",self:!0,handler:function(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler:function(){var e=this;t.includes(g,this)&&g.splice(g.indexOf(this),1),g.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),g.some(function(n){return n.clsPage===e.clsPage})||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var e=this;return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new t.Promise(function(n){return requestAnimationFrame(function(){return e.show().then(n)})})):this.toggleElement(this.$el,!0,_(this))},hide:function(){return this.toggleElement(this.$el,!1,_(this))}}};function _(e){var n=e.transitionElement,s=e._toggle;return function(r,o){return new t.Promise(function(c,h){return t.once(r,"show hide",function(){r._reject&&r._reject(),r._reject=h,s(r,o);var a=t.once(n,"transitionstart",function(){t.once(n,"transitionend transitioncancel",c,{self:!0}),clearTimeout(i)},{self:!0}),i=setTimeout(function(){a(),c()},t.toMs(t.css(n,"transitionDuration")))})}).then(function(){return delete r._reject})}}function B(e,n,s,r){var o=r.animation,c=r.easing,h=o.percent,a=o.translate,i=o.show;i===void 0&&(i=t.noop);var u=i(s),l=new t.Deferred;return{dir:s,show:function(d,f,v){var w=this;f===void 0&&(f=0);var m=v?"linear":c;return d-=Math.round(d*t.clamp(f,-1,1)),this.translate(f),I(n,"itemin",{percent:f,duration:d,timing:m,dir:s}),I(e,"itemout",{percent:1-f,duration:d,timing:m,dir:s}),t.Promise.all([t.Transition.start(n,u[1],d,m),t.Transition.start(e,u[0],d,m)]).then(function(){w.reset(),l.resolve()},t.noop),l.promise},cancel:function(){t.Transition.cancel([n,e])},reset:function(){for(var d in u[0])t.css([n,e],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),t.Transition.cancel([n,e]),this.show(d,f,!0)},translate:function(d){this.reset();var f=a(d,s);t.css(n,f[1]),t.css(e,f[0]),I(n,"itemtranslatein",{percent:d,dir:s}),I(e,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return h(e||n,n,s)},getDistance:function(){return e&&e.offsetWidth}}}function I(e,n,s){t.trigger(e,t.createEvent(n,!1,!1,s))}var M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},O={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(n){var s=e[n];e[n]=function(r){var o=t.getEventPos(r).x*(t.isRtl?-1:1);e.prevPos=o!==e.pos?e.pos:e.prevPos,e.pos=o,s(r)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&j(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var n=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var r=this,o=r.slides,c=this,h=c.prevIndex,a=Math.abs(s),i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;i!==h&&a>u;)this.drag-=u*this.dir,h=i,a-=u,i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;this.percent=a/u;var l=o[h],d=o[i],f=this.index!==i,v=h===i,w;[this.index,this.prevIndex].filter(function(m){return!t.includes([i,h],m)}).forEach(function(m){t.trigger(o[m],"itemhidden",[n]),v&&(w=!0,n.prevIndex=h)}),(this.index===h&&this.prevIndex!==h||w)&&t.trigger(o[this.index],"itemshown",[this]),f&&(this.prevIndex=h,this.index=i,!v&&t.trigger(l,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!v&&d),f&&(!v&&t.trigger(l,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 j(e){return!e.children.length&&e.childNodes.length}var L={data:{selNav:!1},computed:{nav:function(e,n){var s=e.selNav;return t.$(s,n)},selNavItem:function(e){var n=e.attrItem;return"["+n+"],[data-"+n+"]"},navItems:function(e,n){return t.$$(this.selNavItem,n)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(n,s){return"<li "+e.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(n){return n&&(n.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,n=this.getValidIndex();this.navItems.forEach(function(s){var r=t.data(s,e.attrItem);t.toggleClass(s,e.clsActive,t.toNumber(r)===n),t.toggleClass(s,"uk-invisible",e.finite&&(r==="previous"&&n===0||r==="next"&&n>=e.maxIndex))})}}},z={mixins:[M,O,L],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,n){var s=e.velocity;return W(n.offsetWidth/s)},list:function(e,n){var s=e.selList;return t.$(s,n)},maxIndex:function(){return this.length-1},selSlides:function(e){var n=e.selList,s=e.selSlides;return n+" "+(s||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,n){var s=this;if(n===void 0&&(n=!1),!(this.dragging||!this.length)){var r=this,o=r.stack,c=n?0:o.length,h=function(){o.splice(c,1),o.length&&s.show(o.shift(),!0)};if(o[n?"unshift":"push"](e),!n&&o.length>1){o.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],u=this.getIndex(e,this.index),l=this.slides[u];if(i===l){h();return}if(this.dir=H(e,a),this.prevIndex=a,this.index=u,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}var d=this._show(i,l,n).then(function(){return i&&t.trigger(i,"itemhidden",[s]),t.trigger(l,"itemshown",[s]),new t.Promise(function(f){t.fastdom.write(function(){o.shift(),o.length?s.show(o.shift(),!0):s._transitioner=null,f()})})});return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d}},getIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.index),t.clamp(t.getIndex(e,this.slides,n,this.finite),0,this.maxIndex)},getValidIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.prevIndex),this.getIndex(e,n)},_show:function(e,n,s){if(this._transitioner=this._getTransitioner(e,n,this.dir,t.assign({easing:s?n.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)),!s&&!e)return this._translate(1),t.Promise.resolve();var r=this.stack,o=r.length;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance:function(e,n){return this._getTransitioner(e,e!==n&&n).getDistance()},_translate:function(e,n,s){n===void 0&&(n=this.prevIndex),s===void 0&&(s=this.index);var r=this._getTransitioner(n!==s?n:!1,s);return r.translate(e),r},_getTransitioner:function(e,n,s,r){return e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index),s===void 0&&(s=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(n)?this.slides[n]:n,s*(t.isRtl?-1:1),r)}}};function H(e,n){return e==="next"?1:e==="previous"||e<n?-1:1}function W(e){return .5*e+300}var F={mixins:[z],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:B},computed:{animation:function(e){var n=e.animation,s=e.Animations;return t.assign(s[n]||s.slide,{name:n})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(e){var n=e.target;this.$update(n)},beforeitemshow:function(e){var n=e.target;t.addClass(n,this.clsActive)},itemshown:function(e){var n=e.target;t.addClass(n,this.clsActivated)},itemhidden:function(e){var n=e.target;t.removeClass(n,this.clsActive,this.clsActivated)}}},A={mixins:[C,D,T,F],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:function(){return{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:y,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:function(){var e=t.$(this.template),n=t.$(this.selList,e);this.items.forEach(function(){return t.append(n,"<li>")}),this.$mount(t.append(this.container,e))},computed:{caption:function(e,n){var s=e.selCaption;return t.$(s,n)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate:function(){return this.selSlides},handler:function(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler:function(){this.showControls()}},{name:"hide",self:!0,handler:function(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler:function(){this.$destroy(!0)}},{name:"keyup",el:function(){return document},handler:function(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:function(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=y.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler:function(){t.html(this.caption,this.getItem().caption||"");for(var e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler:function(){this.draggable=this.$props.draggable}},{name:"itemload",handler:function(e,n){var s=this,r=n.source,o=n.type,c=n.alt;c===void 0&&(c="");var h=n.poster,a=n.attrs;if(a===void 0&&(a={}),this.setItem(n,"<span uk-spinner></span>"),!!r){var i,u={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||r.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))t.getImage(r,a.srcset,a.size).then(function(d){var f=d.width,v=d.height;return s.setItem(n,b("img",t.assign({src:r,width:f,height:v,alt:c},a)))},function(){return s.setError(n)});else if(o==="video"||r.match(/\.(mp4|webm|ogv)($|\?)/i)){var l=b("video",t.assign({src:r,poster:h,controls:"",playsinline:"","uk-video":""+this.videoAutoplay},a));t.on(l,"loadedmetadata",function(){t.attr(l,{width:l.videoWidth,height:l.videoHeight}),s.setItem(n,l)}),t.on(l,"error",function(){return s.setError(n)})}else o==="iframe"||r.match(/\.(html|php)($|\?)/i)?this.setItem(n,b("iframe",t.assign({src:r,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe"},a))):(i=r.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))?this.setItem(n,b("iframe",t.assign({src:"https://www.youtube"+(i[1]||"")+".com/embed/"+i[2]+(i[3]?"?"+i[3]:""),width:1920,height:1080},u,a))):(i=r.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))&&t.ajax("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(r),{responseType:"json",withCredentials:!1}).then(function(d){var f=d.response,v=f.height,w=f.width;return s.setItem(n,b("iframe",t.assign({src:"https://player.vimeo.com/video/"+i[1]+(i[2]?"?"+i[2]:""),width:w,height:v},u,a)))},function(){return s.setError(n)})}}}],methods:{loadItem:function(e){e===void 0&&(e=this.index);var n=this.getItem(e);this.getSlide(n).childElementCount||t.trigger(this.$el,"itemload",[n])},getItem:function(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem:function(e,n){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),n)])},getSlide:function(e){return this.slides[this.items.indexOf(e)]},setError:function(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls:function(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls:function(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,n){var s=t.fragment("<"+e+">");return t.attr(s,n),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",A),A});
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox_panel=p(t.UIkit.util))})(this,function(t){"use strict";var p={slide:{show:function(e){return[{transform:x(e*-100)},{transform:x()}]},percent:function(e){return P(e)},translate:function(e,n){return[{transform:x(n*-100*e)},{transform:x(n*100*(1-e))}]}}};function P(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function x(e,n){return e===void 0&&(e=0),n===void 0&&(n="%"),e+=e?n:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function $(e){return"scale3d("+e+", "+e+", 1)"}var y=t.assign({},p,{fade:{show:function(){return[{opacity:0},{opacity:1}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e},{opacity:e}]}},scale:{show:function(){return[{opacity:0,transform:$(1-.2)},{opacity:1,transform:$(1)}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e,transform:$(1-.2*e)},{opacity:e,transform:$(1-.2+.2*e)}]}}}),C={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},E={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(e){var n=e.animation;return!!n[0]},hasTransition:function(e){var n=e.animation;return this.hasAnimation&&n[0]===!0}},methods:{toggleElement:function(e,n,s){var r=this;return new t.Promise(function(o){return t.Promise.all(t.toNodes(e).map(function(c){var h=t.isBoolean(n)?n:!r.isToggled(c);if(!t.trigger(c,"before"+(h?"show":"hide"),[r]))return t.Promise.reject();var a=(t.isFunction(s)?s:s===!1||!r.hasAnimation?r._toggle:r.hasTransition?S(r):N(r))(c,h),i=h?r.clsEnter:r.clsLeave;t.addClass(c,i),t.trigger(c,h?"show":"hide",[r]);var u=function(){t.removeClass(c,i),t.trigger(c,h?"shown":"hidden",[r]),r.$update(c)};return a?a.then(u,function(){return t.removeClass(c,i),t.Promise.reject()}):u()})).then(o,t.noop)})},isToggled:function(e){var n;return e===void 0&&(e=this.$el),n=t.toNodes(e),e=n[0],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:function(e,n){if(!!e){n=Boolean(n);var s;this.cls?(s=t.includes(this.cls," ")||n!==t.hasClass(e,this.cls),s&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:n)):(s=n===e.hidden,s&&(e.hidden=!n)),t.$$("[autofocus]",e).some(function(r){return t.isVisible(r)?r.focus()||!0:r.blur()}),s&&(t.trigger(e,"toggled",[n,this]),this.$update(e))}}}};function S(e){var n=e.isToggled,s=e.duration,r=e.initProps,o=e.hideProps,c=e.transition,h=e._toggle;return function(a,i){var u=t.Transition.inProgress(a),l=a.hasChildNodes?t.toFloat(t.css(a.firstElementChild,"marginTop"))+t.toFloat(t.css(a.lastElementChild,"marginBottom")):0,d=t.isVisible(a)?t.height(a)+(u?0:l):0;t.Transition.cancel(a),n(a)||h(a,!0),t.height(a,""),t.fastdom.flush();var f=t.height(a)+(u?0:l);return t.height(a,d),(i?t.Transition.start(a,t.assign({},r,{overflow:"hidden",height:f}),Math.round(s*(1-d/f)),c):t.Transition.start(a,o,Math.round(s*(d/f)),c).then(function(){return h(a,!1)})).then(function(){return t.css(a,r)})}}function N(e){return function(n,s){t.Animation.cancel(n);var r=e.animation,o=e.duration,c=e._toggle;return s?(c(n,!0),t.Animation.in(n,r[0],o,e.origin)):t.Animation.out(n,r[1]||r[0],o,e.origin).then(function(){return c(n,!1)})}}var g=[],D={mixins:[E,C,T],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:function(e,n){var s=e.selPanel;return t.$(s,n)},transitionElement:function(){return this.panel},bgClose:function(e){var n=e.bgClose;return n&&this.panel}},beforeDisconnect:function(){t.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler:function(e,n){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler:function(e){if(t.includes(g,this))return!1;!this.stack&&g.length?(t.Promise.all(g.map(function(n){return n.hide()})).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler:function(){var e=this,n=document.documentElement;t.width(window)>n.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+g.length),t.addClass(n,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,function(s){var r=s.target;t.last(g)!==e||e.overlay&&!t.within(r,e.$el)||t.within(r,e.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",function(o){var c=o.defaultPrevented,h=o.type,a=o.target;!c&&h===t.pointerUp&&r===a&&e.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",function(s){s.keyCode===27&&t.last(g)===e&&e.hide()}),{self:!0})}},{name:"shown",self:!0,handler:function(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler:function(){var e=this;t.includes(g,this)&&g.splice(g.indexOf(this),1),g.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),g.some(function(n){return n.clsPage===e.clsPage})||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var e=this;return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new t.Promise(function(n){return requestAnimationFrame(function(){return e.show().then(n)})})):this.toggleElement(this.$el,!0,_(this))},hide:function(){return this.toggleElement(this.$el,!1,_(this))}}};function _(e){var n=e.transitionElement,s=e._toggle;return function(r,o){return new t.Promise(function(c,h){return t.once(r,"show hide",function(){r._reject&&r._reject(),r._reject=h,s(r,o);var a=t.once(n,"transitionstart",function(){t.once(n,"transitionend transitioncancel",c,{self:!0}),clearTimeout(i)},{self:!0}),i=setTimeout(function(){a(),c()},t.toMs(t.css(n,"transitionDuration")))})}).then(function(){return delete r._reject})}}function B(e,n,s,r){var o=r.animation,c=r.easing,h=o.percent,a=o.translate,i=o.show;i===void 0&&(i=t.noop);var u=i(s),l=new t.Deferred;return{dir:s,show:function(d,f,v){var w=this;f===void 0&&(f=0);var m=v?"linear":c;return d-=Math.round(d*t.clamp(f,-1,1)),this.translate(f),I(n,"itemin",{percent:f,duration:d,timing:m,dir:s}),I(e,"itemout",{percent:1-f,duration:d,timing:m,dir:s}),t.Promise.all([t.Transition.start(n,u[1],d,m),t.Transition.start(e,u[0],d,m)]).then(function(){w.reset(),l.resolve()},t.noop),l.promise},cancel:function(){t.Transition.cancel([n,e])},reset:function(){for(var d in u[0])t.css([n,e],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),t.Transition.cancel([n,e]),this.show(d,f,!0)},translate:function(d){this.reset();var f=a(d,s);t.css(n,f[1]),t.css(e,f[0]),I(n,"itemtranslatein",{percent:d,dir:s}),I(e,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return h(e||n,n,s)},getDistance:function(){return e&&e.offsetWidth}}}function I(e,n,s){t.trigger(e,t.createEvent(n,!1,!1,s))}var M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},O={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(n){var s=e[n];e[n]=function(r){var o=t.getEventPos(r).x*(t.isRtl?-1:1);e.prevPos=o!==e.pos?e.pos:e.prevPos,e.pos=o,s(r)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&j(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var n=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var r=this,o=r.slides,c=this,h=c.prevIndex,a=Math.abs(s),i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;i!==h&&a>u;)this.drag-=u*this.dir,h=i,a-=u,i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;this.percent=a/u;var l=o[h],d=o[i],f=this.index!==i,v=h===i,w;[this.index,this.prevIndex].filter(function(m){return!t.includes([i,h],m)}).forEach(function(m){t.trigger(o[m],"itemhidden",[n]),v&&(w=!0,n.prevIndex=h)}),(this.index===h&&this.prevIndex!==h||w)&&t.trigger(o[this.index],"itemshown",[this]),f&&(this.prevIndex=h,this.index=i,!v&&t.trigger(l,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!v&&d),f&&(!v&&t.trigger(l,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 j(e){return!e.children.length&&e.childNodes.length}var L={data:{selNav:!1},computed:{nav:function(e,n){var s=e.selNav;return t.$(s,n)},selNavItem:function(e){var n=e.attrItem;return"["+n+"],[data-"+n+"]"},navItems:function(e,n){return t.$$(this.selNavItem,n)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(n,s){return"<li "+e.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(n){return n&&(n.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,n=this.getValidIndex();this.navItems.forEach(function(s){var r=t.data(s,e.attrItem);t.toggleClass(s,e.clsActive,t.toNumber(r)===n),t.toggleClass(s,"uk-invisible",e.finite&&(r==="previous"&&n===0||r==="next"&&n>=e.maxIndex))})}}},z={mixins:[M,O,L],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,n){var s=e.velocity;return W(n.offsetWidth/s)},list:function(e,n){var s=e.selList;return t.$(s,n)},maxIndex:function(){return this.length-1},selSlides:function(e){var n=e.selList,s=e.selSlides;return n+" "+(s||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,n){var s=this;if(n===void 0&&(n=!1),!(this.dragging||!this.length)){var r=this,o=r.stack,c=n?0:o.length,h=function(){o.splice(c,1),o.length&&s.show(o.shift(),!0)};if(o[n?"unshift":"push"](e),!n&&o.length>1){o.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],u=this.getIndex(e,this.index),l=this.slides[u];if(i===l){h();return}if(this.dir=H(e,a),this.prevIndex=a,this.index=u,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}var d=this._show(i,l,n).then(function(){return i&&t.trigger(i,"itemhidden",[s]),t.trigger(l,"itemshown",[s]),new t.Promise(function(f){t.fastdom.write(function(){o.shift(),o.length?s.show(o.shift(),!0):s._transitioner=null,f()})})});return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d}},getIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.index),t.clamp(t.getIndex(e,this.slides,n,this.finite),0,this.maxIndex)},getValidIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.prevIndex),this.getIndex(e,n)},_show:function(e,n,s){if(this._transitioner=this._getTransitioner(e,n,this.dir,t.assign({easing:s?n.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)),!s&&!e)return this._translate(1),t.Promise.resolve();var r=this.stack,o=r.length;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance:function(e,n){return this._getTransitioner(e,e!==n&&n).getDistance()},_translate:function(e,n,s){n===void 0&&(n=this.prevIndex),s===void 0&&(s=this.index);var r=this._getTransitioner(n!==s?n:!1,s);return r.translate(e),r},_getTransitioner:function(e,n,s,r){return e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index),s===void 0&&(s=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(n)?this.slides[n]:n,s*(t.isRtl?-1:1),r)}}};function H(e,n){return e==="next"?1:e==="previous"||e<n?-1:1}function W(e){return .5*e+300}var F={mixins:[z],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:B},computed:{animation:function(e){var n=e.animation,s=e.Animations;return t.assign(s[n]||s.slide,{name:n})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(e){var n=e.target;this.$update(n)},beforeitemshow:function(e){var n=e.target;t.addClass(n,this.clsActive)},itemshown:function(e){var n=e.target;t.addClass(n,this.clsActivated)},itemhidden:function(e){var n=e.target;t.removeClass(n,this.clsActive,this.clsActivated)}}},A={mixins:[C,D,T,F],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:function(){return{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:y,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:function(){var e=t.$(this.template),n=t.$(this.selList,e);this.items.forEach(function(){return t.append(n,"<li>")}),this.$mount(t.append(this.container,e))},computed:{caption:function(e,n){var s=e.selCaption;return t.$(s,n)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate:function(){return this.selSlides},handler:function(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler:function(){this.showControls()}},{name:"hide",self:!0,handler:function(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler:function(){this.$destroy(!0)}},{name:"keyup",el:function(){return document},handler:function(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:function(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=y.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler:function(){t.html(this.caption,this.getItem().caption||"");for(var e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler:function(){this.draggable=this.$props.draggable}},{name:"itemload",handler:function(e,n){var s=this,r=n.source,o=n.type,c=n.alt;c===void 0&&(c="");var h=n.poster,a=n.attrs;if(a===void 0&&(a={}),this.setItem(n,"<span uk-spinner></span>"),!!r){var i,u={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||r.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))t.getImage(r,a.srcset,a.size).then(function(d){var f=d.width,v=d.height;return s.setItem(n,b("img",t.assign({src:r,width:f,height:v,alt:c},a)))},function(){return s.setError(n)});else if(o==="video"||r.match(/\.(mp4|webm|ogv)($|\?)/i)){var l=b("video",t.assign({src:r,poster:h,controls:"",playsinline:"","uk-video":""+this.videoAutoplay},a));t.on(l,"loadedmetadata",function(){t.attr(l,{width:l.videoWidth,height:l.videoHeight}),s.setItem(n,l)}),t.on(l,"error",function(){return s.setError(n)})}else o==="iframe"||r.match(/\.(html|php)($|\?)/i)?this.setItem(n,b("iframe",t.assign({src:r,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe"},a))):(i=r.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))?this.setItem(n,b("iframe",t.assign({src:"https://www.youtube"+(i[1]||"")+".com/embed/"+i[2]+(i[3]?"?"+i[3]:""),width:1920,height:1080},u,a))):(i=r.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))&&t.ajax("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(r),{responseType:"json",withCredentials:!1}).then(function(d){var f=d.response,v=f.height,w=f.width;return s.setItem(n,b("iframe",t.assign({src:"https://player.vimeo.com/video/"+i[1]+(i[2]?"?"+i[2]:""),width:w,height:v},u,a)))},function(){return s.setError(n)})}}}],methods:{loadItem:function(e){e===void 0&&(e=this.index);var n=this.getItem(e);this.getSlide(n).childElementCount||t.trigger(this.$el,"itemload",[n])},getItem:function(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem:function(e,n){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),n)])},getSlide:function(e){return this.slides[this.items.indexOf(e)]},setError:function(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls:function(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls:function(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,n){var s=t.fragment("<"+e+">");return t.attr(s,n),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",A),A});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox=p(t.UIkit.util))})(this,function(t){"use strict";var p={slide:{show:function(e){return[{transform:$(e*-100)},{transform:$()}]},percent:function(e){return E(e)},translate:function(e,n){return[{transform:$(n*-100*e)},{transform:$(n*100*(1-e))}]}}};function E(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function $(e,n){return e===void 0&&(e=0),n===void 0&&(n="%"),e+=e?n:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function x(e){return"scale3d("+e+", "+e+", 1)"}var y=t.assign({},p,{fade:{show:function(){return[{opacity:0},{opacity:1}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e},{opacity:e}]}},scale:{show:function(){return[{opacity:0,transform:x(1-.2)},{opacity:1,transform:x(1)}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e,transform:x(1-.2*e)},{opacity:e,transform:x(1-.2+.2*e)}]}}}),C={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},S={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(e){var n=e.animation;return!!n[0]},hasTransition:function(e){var n=e.animation;return this.hasAnimation&&n[0]===!0}},methods:{toggleElement:function(e,n,s){var r=this;return new t.Promise(function(o){return t.Promise.all(t.toNodes(e).map(function(c){var h=t.isBoolean(n)?n:!r.isToggled(c);if(!t.trigger(c,"before"+(h?"show":"hide"),[r]))return t.Promise.reject();var a=(t.isFunction(s)?s:s===!1||!r.hasAnimation?r._toggle:r.hasTransition?N(r):D(r))(c,h),i=h?r.clsEnter:r.clsLeave;t.addClass(c,i),t.trigger(c,h?"show":"hide",[r]);var u=function(){t.removeClass(c,i),t.trigger(c,h?"shown":"hidden",[r]),r.$update(c)};return a?a.then(u,function(){return t.removeClass(c,i),t.Promise.reject()}):u()})).then(o,t.noop)})},isToggled:function(e){var n;return e===void 0&&(e=this.$el),n=t.toNodes(e),e=n[0],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:function(e,n){if(!!e){n=Boolean(n);var s;this.cls?(s=t.includes(this.cls," ")||n!==t.hasClass(e,this.cls),s&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:n)):(s=n===e.hidden,s&&(e.hidden=!n)),t.$$("[autofocus]",e).some(function(r){return t.isVisible(r)?r.focus()||!0:r.blur()}),s&&(t.trigger(e,"toggled",[n,this]),this.$update(e))}}}};function N(e){var n=e.isToggled,s=e.duration,r=e.initProps,o=e.hideProps,c=e.transition,h=e._toggle;return function(a,i){var u=t.Transition.inProgress(a),l=a.hasChildNodes?t.toFloat(t.css(a.firstElementChild,"marginTop"))+t.toFloat(t.css(a.lastElementChild,"marginBottom")):0,d=t.isVisible(a)?t.height(a)+(u?0:l):0;t.Transition.cancel(a),n(a)||h(a,!0),t.height(a,""),t.fastdom.flush();var f=t.height(a)+(u?0:l);return t.height(a,d),(i?t.Transition.start(a,t.assign({},r,{overflow:"hidden",height:f}),Math.round(s*(1-d/f)),c):t.Transition.start(a,o,Math.round(s*(d/f)),c).then(function(){return h(a,!1)})).then(function(){return t.css(a,r)})}}function D(e){return function(n,s){t.Animation.cancel(n);var r=e.animation,o=e.duration,c=e._toggle;return s?(c(n,!0),t.Animation.in(n,r[0],o,e.origin)):t.Animation.out(n,r[1]||r[0],o,e.origin).then(function(){return c(n,!1)})}}var g=[],B={mixins:[S,C,T],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:function(e,n){var s=e.selPanel;return t.$(s,n)},transitionElement:function(){return this.panel},bgClose:function(e){var n=e.bgClose;return n&&this.panel}},beforeDisconnect:function(){t.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler:function(e,n){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler:function(e){if(t.includes(g,this))return!1;!this.stack&&g.length?(t.Promise.all(g.map(function(n){return n.hide()})).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler:function(){var e=this,n=document.documentElement;t.width(window)>n.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+g.length),t.addClass(n,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,function(s){var r=s.target;t.last(g)!==e||e.overlay&&!t.within(r,e.$el)||t.within(r,e.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",function(o){var c=o.defaultPrevented,h=o.type,a=o.target;!c&&h===t.pointerUp&&r===a&&e.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",function(s){s.keyCode===27&&t.last(g)===e&&e.hide()}),{self:!0})}},{name:"shown",self:!0,handler:function(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler:function(){var e=this;t.includes(g,this)&&g.splice(g.indexOf(this),1),g.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),g.some(function(n){return n.clsPage===e.clsPage})||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var e=this;return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new t.Promise(function(n){return requestAnimationFrame(function(){return e.show().then(n)})})):this.toggleElement(this.$el,!0,A(this))},hide:function(){return this.toggleElement(this.$el,!1,A(this))}}};function A(e){var n=e.transitionElement,s=e._toggle;return function(r,o){return new t.Promise(function(c,h){return t.once(r,"show hide",function(){r._reject&&r._reject(),r._reject=h,s(r,o);var a=t.once(n,"transitionstart",function(){t.once(n,"transitionend transitioncancel",c,{self:!0}),clearTimeout(i)},{self:!0}),i=setTimeout(function(){a(),c()},t.toMs(t.css(n,"transitionDuration")))})}).then(function(){return delete r._reject})}}function M(e,n,s,r){var o=r.animation,c=r.easing,h=o.percent,a=o.translate,i=o.show;i===void 0&&(i=t.noop);var u=i(s),l=new t.Deferred;return{dir:s,show:function(d,f,m){var w=this;f===void 0&&(f=0);var v=m?"linear":c;return d-=Math.round(d*t.clamp(f,-1,1)),this.translate(f),I(n,"itemin",{percent:f,duration:d,timing:v,dir:s}),I(e,"itemout",{percent:1-f,duration:d,timing:v,dir:s}),t.Promise.all([t.Transition.start(n,u[1],d,v),t.Transition.start(e,u[0],d,v)]).then(function(){w.reset(),l.resolve()},t.noop),l.promise},cancel:function(){t.Transition.cancel([n,e])},reset:function(){for(var d in u[0])t.css([n,e],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),t.Transition.cancel([n,e]),this.show(d,f,!0)},translate:function(d){this.reset();var f=a(d,s);t.css(n,f[1]),t.css(e,f[0]),I(n,"itemtranslatein",{percent:d,dir:s}),I(e,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return h(e||n,n,s)},getDistance:function(){return e&&e.offsetWidth}}}function I(e,n,s){t.trigger(e,t.createEvent(n,!1,!1,s))}var O={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},L={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(n){var s=e[n];e[n]=function(r){var o=t.getEventPos(r).x*(t.isRtl?-1:1);e.prevPos=o!==e.pos?e.pos:e.prevPos,e.pos=o,s(r)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&j(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var n=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var r=this,o=r.slides,c=this,h=c.prevIndex,a=Math.abs(s),i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;i!==h&&a>u;)this.drag-=u*this.dir,h=i,a-=u,i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;this.percent=a/u;var l=o[h],d=o[i],f=this.index!==i,m=h===i,w;[this.index,this.prevIndex].filter(function(v){return!t.includes([i,h],v)}).forEach(function(v){t.trigger(o[v],"itemhidden",[n]),m&&(w=!0,n.prevIndex=h)}),(this.index===h&&this.prevIndex!==h||w)&&t.trigger(o[this.index],"itemshown",[this]),f&&(this.prevIndex=h,this.index=i,!m&&t.trigger(l,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!m&&d),f&&(!m&&t.trigger(l,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 j(e){return!e.children.length&&e.childNodes.length}var z={data:{selNav:!1},computed:{nav:function(e,n){var s=e.selNav;return t.$(s,n)},selNavItem:function(e){var n=e.attrItem;return"["+n+"],[data-"+n+"]"},navItems:function(e,n){return t.$$(this.selNavItem,n)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(n,s){return"<li "+e.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(n){return n&&(n.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,n=this.getValidIndex();this.navItems.forEach(function(s){var r=t.data(s,e.attrItem);t.toggleClass(s,e.clsActive,t.toNumber(r)===n),t.toggleClass(s,"uk-invisible",e.finite&&(r==="previous"&&n===0||r==="next"&&n>=e.maxIndex))})}}},H={mixins:[O,L,z],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,n){var s=e.velocity;return q(n.offsetWidth/s)},list:function(e,n){var s=e.selList;return t.$(s,n)},maxIndex:function(){return this.length-1},selSlides:function(e){var n=e.selList,s=e.selSlides;return n+" "+(s||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,n){var s=this;if(n===void 0&&(n=!1),!(this.dragging||!this.length)){var r=this,o=r.stack,c=n?0:o.length,h=function(){o.splice(c,1),o.length&&s.show(o.shift(),!0)};if(o[n?"unshift":"push"](e),!n&&o.length>1){o.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],u=this.getIndex(e,this.index),l=this.slides[u];if(i===l){h();return}if(this.dir=W(e,a),this.prevIndex=a,this.index=u,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}var d=this._show(i,l,n).then(function(){return i&&t.trigger(i,"itemhidden",[s]),t.trigger(l,"itemshown",[s]),new t.Promise(function(f){t.fastdom.write(function(){o.shift(),o.length?s.show(o.shift(),!0):s._transitioner=null,f()})})});return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d}},getIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.index),t.clamp(t.getIndex(e,this.slides,n,this.finite),0,this.maxIndex)},getValidIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.prevIndex),this.getIndex(e,n)},_show:function(e,n,s){if(this._transitioner=this._getTransitioner(e,n,this.dir,t.assign({easing:s?n.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)),!s&&!e)return this._translate(1),t.Promise.resolve();var r=this.stack,o=r.length;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance:function(e,n){return this._getTransitioner(e,e!==n&&n).getDistance()},_translate:function(e,n,s){n===void 0&&(n=this.prevIndex),s===void 0&&(s=this.index);var r=this._getTransitioner(n!==s?n:!1,s);return r.translate(e),r},_getTransitioner:function(e,n,s,r){return e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index),s===void 0&&(s=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(n)?this.slides[n]:n,s*(t.isRtl?-1:1),r)}}};function W(e,n){return e==="next"?1:e==="previous"||e<n?-1:1}function q(e){return .5*e+300}var F={mixins:[H],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:M},computed:{animation:function(e){var n=e.animation,s=e.Animations;return t.assign(s[n]||s.slide,{name:n})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(e){var n=e.target;this.$update(n)},beforeitemshow:function(e){var n=e.target;t.addClass(n,this.clsActive)},itemshown:function(e){var n=e.target;t.addClass(n,this.clsActivated)},itemhidden:function(e){var n=e.target;t.removeClass(n,this.clsActive,this.clsActivated)}}},V={mixins:[C,B,T,F],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:function(){return{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:y,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:function(){var e=t.$(this.template),n=t.$(this.selList,e);this.items.forEach(function(){return t.append(n,"<li>")}),this.$mount(t.append(this.container,e))},computed:{caption:function(e,n){var s=e.selCaption;return t.$(s,n)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate:function(){return this.selSlides},handler:function(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler:function(){this.showControls()}},{name:"hide",self:!0,handler:function(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler:function(){this.$destroy(!0)}},{name:"keyup",el:function(){return document},handler:function(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:function(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=y.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler:function(){t.html(this.caption,this.getItem().caption||"");for(var e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler:function(){this.draggable=this.$props.draggable}},{name:"itemload",handler:function(e,n){var s=this,r=n.source,o=n.type,c=n.alt;c===void 0&&(c="");var h=n.poster,a=n.attrs;if(a===void 0&&(a={}),this.setItem(n,"<span uk-spinner></span>"),!!r){var i,u={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||r.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))t.getImage(r,a.srcset,a.size).then(function(d){var f=d.width,m=d.height;return s.setItem(n,b("img",t.assign({src:r,width:f,height:m,alt:c},a)))},function(){return s.setError(n)});else if(o==="video"||r.match(/\.(mp4|webm|ogv)($|\?)/i)){var l=b("video",t.assign({src:r,poster:h,controls:"",playsinline:"","uk-video":""+this.videoAutoplay},a));t.on(l,"loadedmetadata",function(){t.attr(l,{width:l.videoWidth,height:l.videoHeight}),s.setItem(n,l)}),t.on(l,"error",function(){return s.setError(n)})}else o==="iframe"||r.match(/\.(html|php)($|\?)/i)?this.setItem(n,b("iframe",t.assign({src:r,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe"},a))):(i=r.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))?this.setItem(n,b("iframe",t.assign({src:"https://www.youtube"+(i[1]||"")+".com/embed/"+i[2]+(i[3]?"?"+i[3]:""),width:1920,height:1080},u,a))):(i=r.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))&&t.ajax("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(r),{responseType:"json",withCredentials:!1}).then(function(d){var f=d.response,m=f.height,w=f.width;return s.setItem(n,b("iframe",t.assign({src:"https://player.vimeo.com/video/"+i[1]+(i[2]?"?"+i[2]:""),width:w,height:m},u,a)))},function(){return s.setError(n)})}}}],methods:{loadItem:function(e){e===void 0&&(e=this.index);var n=this.getItem(e);this.getSlide(n).childElementCount||t.trigger(this.$el,"itemload",[n])},getItem:function(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem:function(e,n){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),n)])},getSlide:function(e){return this.slides[this.items.indexOf(e)]},setError:function(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls:function(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls:function(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,n){var s=t.fragment("<"+e+">");return t.attr(s,n),s}var P={install:R,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get:function(e,n){var s=e.toggle;return t.$$(s,n)},watch:function(){this.hide()}}},disconnected:function(){this.hide()},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(e){e.preventDefault(),this.show(e.current)}}],methods:{show:function(e){var n=this,s=t.uniqueBy(this.toggles.map(_),"source");if(t.isElement(e)){var r=_(e),o=r.source;e=t.findIndex(s,function(c){var h=c.source;return o===h})}return this.panel=this.panel||this.$create("lightboxPanel",t.assign({},this.$props,{items:s})),t.on(this.panel.$el,"hidden",function(){return n.panel=!1}),this.panel.show(e)},hide:function(){return this.panel&&this.panel.hide()}}};function R(e,n){e.lightboxPanel||e.component("lightboxPanel",V),t.assign(n.props,e.component("lightboxPanel").options.props)}function _(e){var n={};return["href","caption","type","poster","alt","attrs"].forEach(function(s){n[s==="href"?"source":s]=t.data(e,s)}),n.attrs=t.parseOptions(n.attrs),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",P),P});
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox=p(t.UIkit.util))})(this,function(t){"use strict";var p={slide:{show:function(e){return[{transform:$(e*-100)},{transform:$()}]},percent:function(e){return E(e)},translate:function(e,n){return[{transform:$(n*-100*e)},{transform:$(n*100*(1-e))}]}}};function E(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function $(e,n){return e===void 0&&(e=0),n===void 0&&(n="%"),e+=e?n:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function x(e){return"scale3d("+e+", "+e+", 1)"}var y=t.assign({},p,{fade:{show:function(){return[{opacity:0},{opacity:1}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e},{opacity:e}]}},scale:{show:function(){return[{opacity:0,transform:x(1-.2)},{opacity:1,transform:x(1)}]},percent:function(e){return 1-t.css(e,"opacity")},translate:function(e){return[{opacity:1-e,transform:x(1-.2*e)},{opacity:e,transform:x(1-.2+.2*e)}]}}}),C={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},S={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(e){var n=e.animation;return!!n[0]},hasTransition:function(e){var n=e.animation;return this.hasAnimation&&n[0]===!0}},methods:{toggleElement:function(e,n,s){var r=this;return new t.Promise(function(o){return t.Promise.all(t.toNodes(e).map(function(c){var h=t.isBoolean(n)?n:!r.isToggled(c);if(!t.trigger(c,"before"+(h?"show":"hide"),[r]))return t.Promise.reject();var a=(t.isFunction(s)?s:s===!1||!r.hasAnimation?r._toggle:r.hasTransition?N(r):D(r))(c,h),i=h?r.clsEnter:r.clsLeave;t.addClass(c,i),t.trigger(c,h?"show":"hide",[r]);var u=function(){t.removeClass(c,i),t.trigger(c,h?"shown":"hidden",[r]),r.$update(c)};return a?a.then(u,function(){return t.removeClass(c,i),t.Promise.reject()}):u()})).then(o,t.noop)})},isToggled:function(e){var n;return e===void 0&&(e=this.$el),n=t.toNodes(e),e=n[0],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:function(e,n){if(!!e){n=Boolean(n);var s;this.cls?(s=t.includes(this.cls," ")||n!==t.hasClass(e,this.cls),s&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:n)):(s=n===e.hidden,s&&(e.hidden=!n)),t.$$("[autofocus]",e).some(function(r){return t.isVisible(r)?r.focus()||!0:r.blur()}),s&&(t.trigger(e,"toggled",[n,this]),this.$update(e))}}}};function N(e){var n=e.isToggled,s=e.duration,r=e.initProps,o=e.hideProps,c=e.transition,h=e._toggle;return function(a,i){var u=t.Transition.inProgress(a),l=a.hasChildNodes?t.toFloat(t.css(a.firstElementChild,"marginTop"))+t.toFloat(t.css(a.lastElementChild,"marginBottom")):0,d=t.isVisible(a)?t.height(a)+(u?0:l):0;t.Transition.cancel(a),n(a)||h(a,!0),t.height(a,""),t.fastdom.flush();var f=t.height(a)+(u?0:l);return t.height(a,d),(i?t.Transition.start(a,t.assign({},r,{overflow:"hidden",height:f}),Math.round(s*(1-d/f)),c):t.Transition.start(a,o,Math.round(s*(d/f)),c).then(function(){return h(a,!1)})).then(function(){return t.css(a,r)})}}function D(e){return function(n,s){t.Animation.cancel(n);var r=e.animation,o=e.duration,c=e._toggle;return s?(c(n,!0),t.Animation.in(n,r[0],o,e.origin)):t.Animation.out(n,r[1]||r[0],o,e.origin).then(function(){return c(n,!1)})}}var g=[],B={mixins:[S,C,T],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:function(e,n){var s=e.selPanel;return t.$(s,n)},transitionElement:function(){return this.panel},bgClose:function(e){var n=e.bgClose;return n&&this.panel}},beforeDisconnect:function(){t.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler:function(e,n){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler:function(e){if(t.includes(g,this))return!1;!this.stack&&g.length?(t.Promise.all(g.map(function(n){return n.hide()})).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler:function(){var e=this,n=document.documentElement;t.width(window)>n.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+g.length),t.addClass(n,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,function(s){var r=s.target;t.last(g)!==e||e.overlay&&!t.within(r,e.$el)||t.within(r,e.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",function(o){var c=o.defaultPrevented,h=o.type,a=o.target;!c&&h===t.pointerUp&&r===a&&e.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",function(s){s.keyCode===27&&t.last(g)===e&&e.hide()}),{self:!0})}},{name:"shown",self:!0,handler:function(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler:function(){var e=this;t.includes(g,this)&&g.splice(g.indexOf(this),1),g.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),g.some(function(n){return n.clsPage===e.clsPage})||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var e=this;return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new t.Promise(function(n){return requestAnimationFrame(function(){return e.show().then(n)})})):this.toggleElement(this.$el,!0,A(this))},hide:function(){return this.toggleElement(this.$el,!1,A(this))}}};function A(e){var n=e.transitionElement,s=e._toggle;return function(r,o){return new t.Promise(function(c,h){return t.once(r,"show hide",function(){r._reject&&r._reject(),r._reject=h,s(r,o);var a=t.once(n,"transitionstart",function(){t.once(n,"transitionend transitioncancel",c,{self:!0}),clearTimeout(i)},{self:!0}),i=setTimeout(function(){a(),c()},t.toMs(t.css(n,"transitionDuration")))})}).then(function(){return delete r._reject})}}function M(e,n,s,r){var o=r.animation,c=r.easing,h=o.percent,a=o.translate,i=o.show;i===void 0&&(i=t.noop);var u=i(s),l=new t.Deferred;return{dir:s,show:function(d,f,m){var w=this;f===void 0&&(f=0);var v=m?"linear":c;return d-=Math.round(d*t.clamp(f,-1,1)),this.translate(f),I(n,"itemin",{percent:f,duration:d,timing:v,dir:s}),I(e,"itemout",{percent:1-f,duration:d,timing:v,dir:s}),t.Promise.all([t.Transition.start(n,u[1],d,v),t.Transition.start(e,u[0],d,v)]).then(function(){w.reset(),l.resolve()},t.noop),l.promise},cancel:function(){t.Transition.cancel([n,e])},reset:function(){for(var d in u[0])t.css([n,e],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),t.Transition.cancel([n,e]),this.show(d,f,!0)},translate:function(d){this.reset();var f=a(d,s);t.css(n,f[1]),t.css(e,f[0]),I(n,"itemtranslatein",{percent:d,dir:s}),I(e,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return h(e||n,n,s)},getDistance:function(){return e&&e.offsetWidth}}}function I(e,n,s){t.trigger(e,t.createEvent(n,!1,!1,s))}var O={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},L={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(n){var s=e[n];e[n]=function(r){var o=t.getEventPos(r).x*(t.isRtl?-1:1);e.prevPos=o!==e.pos?e.pos:e.prevPos,e.pos=o,s(r)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&j(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var n=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var r=this,o=r.slides,c=this,h=c.prevIndex,a=Math.abs(s),i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;i!==h&&a>u;)this.drag-=u*this.dir,h=i,a-=u,i=this.getIndex(h+this.dir,h),u=this._getDistance(h,i)||o[h].offsetWidth;this.percent=a/u;var l=o[h],d=o[i],f=this.index!==i,m=h===i,w;[this.index,this.prevIndex].filter(function(v){return!t.includes([i,h],v)}).forEach(function(v){t.trigger(o[v],"itemhidden",[n]),m&&(w=!0,n.prevIndex=h)}),(this.index===h&&this.prevIndex!==h||w)&&t.trigger(o[this.index],"itemshown",[this]),f&&(this.prevIndex=h,this.index=i,!m&&t.trigger(l,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!m&&d),f&&(!m&&t.trigger(l,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 j(e){return!e.children.length&&e.childNodes.length}var z={data:{selNav:!1},computed:{nav:function(e,n){var s=e.selNav;return t.$(s,n)},selNavItem:function(e){var n=e.attrItem;return"["+n+"],[data-"+n+"]"},navItems:function(e,n){return t.$$(this.selNavItem,n)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(n,s){return"<li "+e.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(n){return n&&(n.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,n=this.getValidIndex();this.navItems.forEach(function(s){var r=t.data(s,e.attrItem);t.toggleClass(s,e.clsActive,t.toNumber(r)===n),t.toggleClass(s,"uk-invisible",e.finite&&(r==="previous"&&n===0||r==="next"&&n>=e.maxIndex))})}}},H={mixins:[O,L,z],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,n){var s=e.velocity;return q(n.offsetWidth/s)},list:function(e,n){var s=e.selList;return t.$(s,n)},maxIndex:function(){return this.length-1},selSlides:function(e){var n=e.selList,s=e.selSlides;return n+" "+(s||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,n){var s=this;if(n===void 0&&(n=!1),!(this.dragging||!this.length)){var r=this,o=r.stack,c=n?0:o.length,h=function(){o.splice(c,1),o.length&&s.show(o.shift(),!0)};if(o[n?"unshift":"push"](e),!n&&o.length>1){o.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],u=this.getIndex(e,this.index),l=this.slides[u];if(i===l){h();return}if(this.dir=W(e,a),this.prevIndex=a,this.index=u,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}var d=this._show(i,l,n).then(function(){return i&&t.trigger(i,"itemhidden",[s]),t.trigger(l,"itemshown",[s]),new t.Promise(function(f){t.fastdom.write(function(){o.shift(),o.length?s.show(o.shift(),!0):s._transitioner=null,f()})})});return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d}},getIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.index),t.clamp(t.getIndex(e,this.slides,n,this.finite),0,this.maxIndex)},getValidIndex:function(e,n){return e===void 0&&(e=this.index),n===void 0&&(n=this.prevIndex),this.getIndex(e,n)},_show:function(e,n,s){if(this._transitioner=this._getTransitioner(e,n,this.dir,t.assign({easing:s?n.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)),!s&&!e)return this._translate(1),t.Promise.resolve();var r=this.stack,o=r.length;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance:function(e,n){return this._getTransitioner(e,e!==n&&n).getDistance()},_translate:function(e,n,s){n===void 0&&(n=this.prevIndex),s===void 0&&(s=this.index);var r=this._getTransitioner(n!==s?n:!1,s);return r.translate(e),r},_getTransitioner:function(e,n,s,r){return e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index),s===void 0&&(s=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(n)?this.slides[n]:n,s*(t.isRtl?-1:1),r)}}};function W(e,n){return e==="next"?1:e==="previous"||e<n?-1:1}function q(e){return .5*e+300}var F={mixins:[H],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:M},computed:{animation:function(e){var n=e.animation,s=e.Animations;return t.assign(s[n]||s.slide,{name:n})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(e){var n=e.target;this.$update(n)},beforeitemshow:function(e){var n=e.target;t.addClass(n,this.clsActive)},itemshown:function(e){var n=e.target;t.addClass(n,this.clsActivated)},itemhidden:function(e){var n=e.target;t.removeClass(n,this.clsActive,this.clsActivated)}}},V={mixins:[C,B,T,F],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:function(){return{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:y,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:function(){var e=t.$(this.template),n=t.$(this.selList,e);this.items.forEach(function(){return t.append(n,"<li>")}),this.$mount(t.append(this.container,e))},computed:{caption:function(e,n){var s=e.selCaption;return t.$(s,n)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate:function(){return this.selSlides},handler:function(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler:function(){this.showControls()}},{name:"hide",self:!0,handler:function(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler:function(){this.$destroy(!0)}},{name:"keyup",el:function(){return document},handler:function(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:function(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=y.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler:function(){t.html(this.caption,this.getItem().caption||"");for(var e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler:function(){this.draggable=this.$props.draggable}},{name:"itemload",handler:function(e,n){var s=this,r=n.source,o=n.type,c=n.alt;c===void 0&&(c="");var h=n.poster,a=n.attrs;if(a===void 0&&(a={}),this.setItem(n,"<span uk-spinner></span>"),!!r){var i,u={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||r.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))t.getImage(r,a.srcset,a.size).then(function(d){var f=d.width,m=d.height;return s.setItem(n,b("img",t.assign({src:r,width:f,height:m,alt:c},a)))},function(){return s.setError(n)});else if(o==="video"||r.match(/\.(mp4|webm|ogv)($|\?)/i)){var l=b("video",t.assign({src:r,poster:h,controls:"",playsinline:"","uk-video":""+this.videoAutoplay},a));t.on(l,"loadedmetadata",function(){t.attr(l,{width:l.videoWidth,height:l.videoHeight}),s.setItem(n,l)}),t.on(l,"error",function(){return s.setError(n)})}else o==="iframe"||r.match(/\.(html|php)($|\?)/i)?this.setItem(n,b("iframe",t.assign({src:r,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe"},a))):(i=r.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))?this.setItem(n,b("iframe",t.assign({src:"https://www.youtube"+(i[1]||"")+".com/embed/"+i[2]+(i[3]?"?"+i[3]:""),width:1920,height:1080},u,a))):(i=r.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))&&t.ajax("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(r),{responseType:"json",withCredentials:!1}).then(function(d){var f=d.response,m=f.height,w=f.width;return s.setItem(n,b("iframe",t.assign({src:"https://player.vimeo.com/video/"+i[1]+(i[2]?"?"+i[2]:""),width:w,height:m},u,a)))},function(){return s.setError(n)})}}}],methods:{loadItem:function(e){e===void 0&&(e=this.index);var n=this.getItem(e);this.getSlide(n).childElementCount||t.trigger(this.$el,"itemload",[n])},getItem:function(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem:function(e,n){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),n)])},getSlide:function(e){return this.slides[this.items.indexOf(e)]},setError:function(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls:function(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls:function(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,n){var s=t.fragment("<"+e+">");return t.attr(s,n),s}var P={install:R,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get:function(e,n){var s=e.toggle;return t.$$(s,n)},watch:function(){this.hide()}}},disconnected:function(){this.hide()},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(e){e.preventDefault(),this.show(e.current)}}],methods:{show:function(e){var n=this,s=t.uniqueBy(this.toggles.map(_),"source");if(t.isElement(e)){var r=_(e),o=r.source;e=t.findIndex(s,function(c){var h=c.source;return o===h})}return this.panel=this.panel||this.$create("lightboxPanel",t.assign({},this.$props,{items:s})),t.on(this.panel.$el,"hidden",function(){return n.panel=!1}),this.panel.show(e)},hide:function(){return this.panel&&this.panel.hide()}}};function R(e,n){e.lightboxPanel||e.component("lightboxPanel",V),t.assign(n.props,e.component("lightboxPanel").options.props)}function _(e){var n={};return["href","caption","type","poster","alt","attrs"].forEach(function(s){n[s==="href"?"source":s]=t.data(e,s)}),n.attrs=t.parseOptions(n.attrs),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],i):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=i(t.UIkit.util))})(this,function(t){"use strict";var i={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},r,c={mixins:[i],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:f,computed:{marginProp:function(e){var n=e.pos;return"margin"+(t.startsWith(n,"top")?"Top":"Bottom")},startProps:function(){var e;return e={opacity:0},e[this.marginProp]=-this.$el.offsetHeight,e}},created:function(){var e=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(e,'<div class="'+this.clsMsg+(this.status?" "+this.clsMsg+"-"+this.status:"")+'"> <a href class="'+this.clsClose+'" data-uk-close></a> <div>'+this.message+"</div> </div>"))},connected:function(){var e=this,n,s=t.toFloat(t.css(this.$el,this.marginProp));t.Transition.start(t.css(this.$el,this.startProps),(n={opacity:1},n[this.marginProp]=s,n)).then(function(){e.timeout&&(e.timer=setTimeout(e.close,e.timeout))})},events:(r={click:function(e){t.closest(e.target,'a[href="#"],a[href=""]')&&e.preventDefault(),this.close()}},r[t.pointerEnter]=function(){this.timer&&clearTimeout(this.timer)},r[t.pointerLeave]=function(){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},r),methods:{close:function(e){var n=this,s=function(a){var o=t.parent(a);t.trigger(a,"close",[n]),t.remove(a),o&&!o.hasChildNodes()&&t.remove(o)};this.timer&&clearTimeout(this.timer),e?s(this.$el):t.Transition.start(this.$el,this.startProps).then(s)}}};function f(e){e.notification.closeAll=function(n,s){t.apply(document.body,function(a){var o=e.getComponent(a,"notification");o&&(!n||n===o.group)&&o.close(s)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",c),c});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -420,16 +420,18 @@
|
|
|
420
420
|
start: function(ref) {
|
|
421
421
|
var start = ref.start;
|
|
422
422
|
|
|
423
|
-
return
|
|
423
|
+
return uikitUtil.toPx(start, 'height', this.target, true);
|
|
424
424
|
},
|
|
425
425
|
|
|
426
426
|
end: function(ref) {
|
|
427
427
|
var end = ref.end;
|
|
428
428
|
var viewport = ref.viewport;
|
|
429
429
|
|
|
430
|
-
return
|
|
430
|
+
return uikitUtil.toPx(
|
|
431
431
|
end || (viewport = (1 - viewport) * 100) && (viewport + "vh+" + viewport + "%"),
|
|
432
|
-
|
|
432
|
+
'height',
|
|
433
|
+
this.target,
|
|
434
|
+
true
|
|
433
435
|
);
|
|
434
436
|
}
|
|
435
437
|
|
|
@@ -476,19 +478,6 @@
|
|
|
476
478
|
|
|
477
479
|
};
|
|
478
480
|
|
|
479
|
-
var calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
480
|
-
function parseCalc(calc, el) {
|
|
481
|
-
var match;
|
|
482
|
-
var result = 0;
|
|
483
|
-
calc = calc.toString().replace(/\s/g, '');
|
|
484
|
-
calcRe.lastIndex = 0;
|
|
485
|
-
while ((match = calcRe.exec(calc)) !== null) {
|
|
486
|
-
result += uikitUtil.toPx(match[0], 'height', el, true);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return result;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
481
|
function ease(percent, easing) {
|
|
493
482
|
return easing >= 0
|
|
494
483
|
? Math.pow(percent, easing + 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitParallax=s(e.UIkit.util))})(this,function(e){"use strict";var s={props:{media:Boolean},data:{media:!1},computed:{matchMedia:function(){var r=V(this.media);return!r||window.matchMedia(r).matches}}};function V(r){if(e.isString(r)){if(r[0]==="@"){var t="breakpoint-"+r.substr(1);r=e.toFloat(e.getCssVar(t))}else if(isNaN(r))return r}return r&&!isNaN(r)?"(min-width: "+r+"px)":!1}e.memoize(function(r){return new e.Promise(function(t,n){if(!r){n();return}e.startsWith(r,"data:")?t(decodeURIComponent(r.split(",")[1])):e.ajax(r).then(function(a){return t(a.response)},function(){return n("SVG not found.")})})});function B(r){return Math.ceil(Math.max.apply(Math,[0].concat(e.$$("[stroke]",r).map(function(t){try{return t.getTotalLength()}catch{return 0}}))))}var v={x:l,y:l,rotate:l,scale:l,color:F,backgroundColor:F,borderColor:F,blur:c,hue:c,fopacity:c,grayscale:c,invert:c,saturate:c,sepia:c,opacity:H,stroke:L,bgx:I,bgy:I},x=Object.keys,E={mixins:[s],props:N(x(v),"list"),data:N(x(v),void 0),computed:{props:function(r,t){return x(v).reduce(function(n,a){return e.isUndefined(r[a])||(n[a]=v[a](a,t,r[a].slice())),n},{})}},events:{bgimageload:function(){this.$emit()}},methods:{reset:function(){var r=this;e.each(this.getCss(0),function(t,n){return e.css(r.$el,n,"")})},getCss:function(r){var t=this;return x(this.props).reduce(function(n,a){return t.props[a](n,r),n},{transform:"",filter:""})}}};function l(r,t,n){var a=C(n)||{x:"px",y:"px",rotate:"deg"}[r]||"";return(r==="x"||r==="y")&&(r="translate"+e.ucfirst(r)),n=n.map(e.toFloat),n.length===1&&n.unshift(r==="scale"?1:0),function(o,f){var i=g(n,f);e.startsWith(r,"translate")&&(i=e.toFloat(i).toFixed(a==="px"?0:6)),o.transform+=" "+r+"("+i+a+")"}}function F(r,t,n){return n.length===1&&n.unshift(y(t,r,"")),n=n.map(function(a){return q(t,a)}),function(a,o){var f=D(n,o),i=f[0],m=f[1],w=f[2],d=i.map(function(h,u){return h+=w*(m[u]-h),u===3?e.toFloat(h):parseInt(h,10)}).join(",");a[r]="rgba("+d+")"}}function q(r,t){return y(r,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(e.toFloat)}function c(r,t,n){n.length===1&&n.unshift(0);var a=C(n)||{blur:"px",hue:"deg"}[r]||"%";return r={fopacity:"opacity",hue:"hue-rotate"}[r]||r,n=n.map(e.toFloat),function(o,f){var i=g(n,f);o.filter+=" "+r+"("+(i+a)+")"}}function H(r,t,n){return n.length===1&&n.unshift(y(t,r,"")),n=n.map(e.toFloat),function(a,o){a[r]=g(n,o)}}function L(r,t,n){n.length===1&&n.unshift(0);var a=C(n);if(n=n.map(e.toFloat),!n.some(function(f){return f}))return e.noop;var o=B(t);return e.css(t,"strokeDasharray",o),a==="%"&&(n=n.map(function(f){return f*o/100})),n=n.reverse(),function(f,i){f.strokeDashoffset=g(n,i)}}function I(r,t,n){n.length===1&&n.unshift(0),r=r.substr(-1);var a=r==="y"?"height":"width";n=n.map(function(f){return e.toPx(f,a,t)}),e.css(t,"background-position-"+r,"");var o=e.css(t,"backgroundPosition").split(" ")[r==="x"?0:1];return y(t,"backgroundSize","")==="cover"?R(r,t,n,o,a):$(r,n,o)}function R(r,t,n,a,o){var f=G(t);if(!f.width)return e.noop;var i=Math.min.apply(Math,n),m=Math.max.apply(Math,n),w=n.indexOf(i)<n.indexOf(m),d=m-i,h=(w?-d:0)-(w?i:m),u={width:t.offsetWidth,height:t.offsetHeight},j=e.Dimensions.cover(f,u),M=j[o]-u[o];if(M<d)u[o]=j[o]+d-M;else if(M>d){var z=u[o]/e.toPx(a,o,t,!0);z&&(h-=(M-d)/z)}var T=e.Dimensions.cover(f,u),A=$(r,n,h+"px");return function(P,J){A(P,J),P.backgroundSize=T.width+"px "+T.height+"px",P.backgroundRepeat="no-repeat"}}function $(r,t,n){return function(a,o){a["background-position-"+r]="calc("+n+" + "+g(t,o)+"px)"}}var b={};function G(r){var t=e.css(r,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(b[t])return b[t];var n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=function(){b[t]=S(n),e.trigger(r,"bgimageload")})),b[t]=S(n)}function S(r){return{width:r.naturalWidth,height:r.naturalHeight}}function D(r,t){var n=r.length-1,a=Math.min(Math.floor(n*t),n-1);return r.slice(a,a+2).concat(t===1?1:t%(1/n)*n)}function g(r,t){var n=D(r,t),a=n[0],o=n[1],f=n[2];return e.isNumber(a)?a+Math.abs(a-o)*f*(a<o?1:-1):+o}function C(r,t){return r.reduce(function(n,a){return n||e.isString(a)&&a.replace(/[\d-]/g,"").trim()},"")||t}function y(r,t,n){var a=r.style[t],o=e.css(e.css(r,t,n),t);return r.style[t]=a,o}function N(r,t){return r.reduce(function(n,a){return n[a]=t,n},{})}var O={mixins:[E],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:function(r,t){var n=r.target;return W(n&&e.query(n,t)||t)},start:function(r){var t=r.start;return e.toPx(t,"height",this.target,!0)},end:function(r){var t=r.end,n=r.viewport;return e.toPx(t||(n=(1-n)*100)&&n+"vh+"+n+"%","height",this.target,!0)}},update:{read:function(r,t){var n=r.percent;if(t.has("scroll")||(n=!1),!!this.matchMedia){var a=n;return n=_(e.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:a===n?!1:this.getCss(n)}}},write:function(r){var t=r.style;if(!this.matchMedia){this.reset();return}t&&e.css(this.$el,t)},events:["scroll","resize"]}};function _(r,t){return t>=0?Math.pow(r,t+1):1-Math.pow(1-r,-t+1)}function W(r){return r?"offsetTop"in r?r:W(e.parent(r)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",O),O});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(a,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(a=typeof globalThis<"u"?globalThis:a||self,a.UIkitSlider_parallax=g(a.UIkit.util))})(this,function(a){"use strict";var g={props:{media:Boolean},data:{media:!1},computed:{matchMedia:function(){var r=z(this.media);return!r||window.matchMedia(r).matches}}};function z(r){if(a.isString(r)){if(r[0]==="@"){var e="breakpoint-"+r.substr(1);r=a.toFloat(a.getCssVar(e))}else if(isNaN(r))return r}return r&&!isNaN(r)?"(min-width: "+r+"px)":!1}a.memoize(function(r){return new a.Promise(function(e,n){if(!r){n();return}a.startsWith(r,"data:")?e(decodeURIComponent(r.split(",")[1])):a.ajax(r).then(function(t){return e(t.response)},function(){return n("SVG not found.")})})});function B(r){return Math.ceil(Math.max.apply(Math,[0].concat(a.$$("[stroke]",r).map(function(e){try{return e.getTotalLength()}catch{return 0}}))))}var l={x:b,y:b,rotate:b,scale:b,color:$,backgroundColor:$,borderColor:$,blur:s,hue:s,fopacity:s,grayscale:s,invert:s,saturate:s,sepia:s,opacity:L,stroke:R,bgx:I,bgy:I},x=Object.keys,q={mixins:[g],props:T(x(l),"list"),data:T(x(l),void 0),computed:{props:function(r,e){return x(l).reduce(function(n,t){return a.isUndefined(r[t])||(n[t]=l[t](t,e,r[t].slice())),n},{})}},events:{bgimageload:function(){this.$emit()}},methods:{reset:function(){var r=this;a.each(this.getCss(0),function(e,n){return a.css(r.$el,n,"")})},getCss:function(r){var e=this;return x(this.props).reduce(function(n,t){return e.props[t](n,r),n},{transform:"",filter:""})}}};function b(r,e,n){var t=M(n)||{x:"px",y:"px",rotate:"deg"}[r]||"";return(r==="x"||r==="y")&&(r="translate"+a.ucfirst(r)),n=n.map(a.toFloat),n.length===1&&n.unshift(r==="scale"?1:0),function(o,i){var f=v(n,i);a.startsWith(r,"translate")&&(f=a.toFloat(f).toFixed(t==="px"?0:6)),o.transform+=" "+r+"("+f+t+")"}}function $(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(function(t){return H(e,t)}),function(t,o){var i=S(n,o),f=i[0],u=i[1],m=i[2],c=f.map(function(h,d){return h+=m*(u[d]-h),d===3?a.toFloat(h):parseInt(h,10)}).join(",");t[r]="rgba("+c+")"}}function H(r,e){return w(r,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(a.toFloat)}function s(r,e,n){n.length===1&&n.unshift(0);var t=M(n)||{blur:"px",hue:"deg"}[r]||"%";return r={fopacity:"opacity",hue:"hue-rotate"}[r]||r,n=n.map(a.toFloat),function(o,i){var f=v(n,i);o.filter+=" "+r+"("+(f+t)+")"}}function L(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(a.toFloat),function(t,o){t[r]=v(n,o)}}function R(r,e,n){n.length===1&&n.unshift(0);var t=M(n);if(n=n.map(a.toFloat),!n.some(function(i){return i}))return a.noop;var o=B(e);return a.css(e,"strokeDasharray",o),t==="%"&&(n=n.map(function(i){return i*o/100})),n=n.reverse(),function(i,f){i.strokeDashoffset=v(n,f)}}function I(r,e,n){n.length===1&&n.unshift(0),r=r.substr(-1);var t=r==="y"?"height":"width";n=n.map(function(i){return a.toPx(i,t,e)}),a.css(e,"background-position-"+r,"");var o=a.css(e,"backgroundPosition").split(" ")[r==="x"?0:1];return w(e,"backgroundSize","")==="cover"?E(r,e,n,o,t):P(r,n,o)}function E(r,e,n,t,o){var i=G(e);if(!i.width)return a.noop;var f=Math.min.apply(Math,n),u=Math.max.apply(Math,n),m=n.indexOf(f)<n.indexOf(u),c=u-f,h=(m?-c:0)-(m?f:u),d={width:e.offsetWidth,height:e.offsetHeight},j=a.Dimensions.cover(i,d),F=j[o]-d[o];if(F<c)d[o]=j[o]+c-F;else if(F>c){var O=d[o]/a.toPx(t,o,e,!0);O&&(h-=(F-c)/O)}var V=a.Dimensions.cover(i,d),A=P(r,n,h+"px");return function(C,J){A(C,J),C.backgroundSize=V.width+"px "+V.height+"px",C.backgroundRepeat="no-repeat"}}function P(r,e,n){return function(t,o){t["background-position-"+r]="calc("+n+" + "+v(e,o)+"px)"}}var y={};function G(r){var e=a.css(r,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(y[e])return y[e];var n=new Image;return e&&(n.src=e,n.naturalWidth||(n.onload=function(){y[e]=D(n),a.trigger(r,"bgimageload")})),y[e]=D(n)}function D(r){return{width:r.naturalWidth,height:r.naturalHeight}}function S(r,e){var n=r.length-1,t=Math.min(Math.floor(n*e),n-1);return r.slice(t,t+2).concat(e===1?1:e%(1/n)*n)}function v(r,e){var n=S(r,e),t=n[0],o=n[1],i=n[2];return a.isNumber(t)?t+Math.abs(t-o)*i*(t<o?1:-1):+o}function M(r,e){return r.reduce(function(n,t){return n||a.isString(t)&&t.replace(/[\d-]/g,"").trim()},"")||e}function w(r,e,n){var t=r.style[e],o=a.css(a.css(r,e,n),e);return r.style[e]=t,o}function T(r,e){return r.reduce(function(n,t){return n[t]=e,n},{})}var W={mixins:[q],data:{selItem:"!li"},computed:{item:function(r,e){var n=r.selItem;return a.query(n,e)}},events:[{name:"itemin itemout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.duration,f=t.timing,u=t.dir;a.fastdom.read(function(){var m=e.getCss(_(n,u,o)),c=e.getCss(N(n)?.5:u>0?1:0);a.fastdom.write(function(){a.css(e.$el,m),a.Transition.start(e.$el,c,i,f).catch(a.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:function(){return this.item},handler:function(){a.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.dir;a.fastdom.read(function(){var f=e.getCss(_(n,i,o));a.fastdom.write(function(){return a.css(e.$el,f)})})}}]};function N(r){return a.endsWith(r,"in")}function _(r,e,n){return n/=2,N(r)^e<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",W),W});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlider=p(t.UIkit.util))})(this,function(t){"use strict";var p={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},R={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(s){var n=e[s];e[s]=function(i){var h=t.getEventPos(i).x*(t.isRtl?-1:1);e.prevPos=h!==e.pos?e.pos:e.prevPos,e.pos=h,n(i)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&C(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var s=this,n=this.pos-this.drag;if(!(n===0||this.prevPos===this.pos||!this.dragging&&Math.abs(n)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=n<0?1:-1;for(var i=this,h=i.slides,g=this,r=g.prevIndex,f=Math.abs(n),o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;o!==r&&f>c;)this.drag-=c*this.dir,r=o,f-=c,o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;this.percent=f/c;var a=h[r],d=h[o],v=this.index!==o,l=r===o,m;[this.index,this.prevIndex].filter(function(u){return!t.includes([o,r],u)}).forEach(function(u){t.trigger(h[u],"itemhidden",[s]),l&&(m=!0,s.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&t.trigger(h[this.index],"itemshown",[this]),v&&(this.prevIndex=r,this.index=o,!l&&t.trigger(a,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!l&&d),v&&(!l&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 C(e){return!e.children.length&&e.childNodes.length}var D={data:{selNav:!1},computed:{nav:function(e,s){var n=e.selNav;return t.$(n,s)},selNavItem:function(e){var s=e.attrItem;return"["+s+"],[data-"+s+"]"},navItems:function(e,s){return t.$$(this.selNavItem,s)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(s,n){return"<li "+e.attrItem+'="'+n+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(s){return s&&(s.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,s=this.getValidIndex();this.navItems.forEach(function(n){var i=t.data(n,e.attrItem);t.toggleClass(n,e.clsActive,t.toNumber(i)===s),t.toggleClass(n,"uk-invisible",e.finite&&(i==="previous"&&s===0||i==="next"&&s>=e.maxIndex))})}}},W={mixins:[T,R,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,s){var n=e.velocity;return b(s.offsetWidth/n)},list:function(e,s){var n=e.selList;return t.$(n,s)},maxIndex:function(){return this.length-1},selSlides:function(e){var s=e.selList,n=e.selSlides;return s+" "+(n||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,s){var n=this;if(s===void 0&&(s=!1),!(this.dragging||!this.length)){var i=this,h=i.stack,g=s?0:h.length,r=function(){h.splice(g,1),h.length&&n.show(h.shift(),!0)};if(h[s?"unshift":"push"](e),!s&&h.length>1){h.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var f=this.getIndex(this.index),o=t.hasClass(this.slides,this.clsActive)&&this.slides[f],c=this.getIndex(e,this.index),a=this.slides[c];if(o===a){r();return}if(this.dir=O(e,f),this.prevIndex=f,this.index=c,o&&!t.trigger(o,"beforeitemhide",[this])||!t.trigger(a,"beforeitemshow",[this,o])){this.index=this.prevIndex,r();return}var d=this._show(o,a,s).then(function(){return o&&t.trigger(o,"itemhidden",[n]),t.trigger(a,"itemshown",[n]),new t.Promise(function(v){t.fastdom.write(function(){h.shift(),h.length?n.show(h.shift(),!0):n._transitioner=null,v()})})});return o&&t.trigger(o,"itemhide",[this]),t.trigger(a,"itemshow",[this]),d}},getIndex:function(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:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show:function(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,t.assign({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),t.Promise.resolve();var i=this.stack,h=i.length;return this._transitioner[h>1?"forward":"show"](h>1?Math.min(this.duration,75+75/(h-1)):this.duration,this.percent)},_getDistance:function(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate:function(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);var i=this._getTransitioner(s!==n?s:!1,n);return i.translate(e),i},_getTransitioner:function(e,s,n,i){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),i)}}};function O(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function b(e){return .5*e+300}var B={update:{write:function(){if(!(this.stack.length||this.dragging)){var e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)}},events:["resize"]}};function _(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function L(e,s,n,i){var h=i.center,g=i.easing,r=i.list,f=new t.Deferred,o=e?x(e,r,h):x(s,r,h)+t.dimensions(s).width*n,c=s?x(s,r,h):o+t.dimensions(e).width*n*(t.isRtl?-1:1);return{dir:n,show:function(a,d,v){d===void 0&&(d=0);var l=v?"linear":g;return a-=Math.round(a*t.clamp(d,-1,1)),this.translate(d),d=e?d:t.clamp(d,0,1),$(this.getItemIn(),"itemin",{percent:d,duration:a,timing:l,dir:n}),e&&$(this.getItemIn(!0),"itemout",{percent:1-d,duration:a,timing:l,dir:n}),t.Transition.start(r,{transform:_(-c*(t.isRtl?-1:1),"px")},a,l).then(f.resolve,t.noop),f.promise},cancel:function(){t.Transition.cancel(r)},reset:function(){t.css(r,"transform","")},forward:function(a,d){return d===void 0&&(d=this.percent()),t.Transition.cancel(r),this.show(a,d,!0)},translate:function(a){var d=this.getDistance()*n*(t.isRtl?-1:1);t.css(r,"transform",_(t.clamp(-c+(d-d*a),-I(r),t.dimensions(r).width)*(t.isRtl?-1:1),"px"));var v=this.getActives(),l=this.getItemIn(),m=this.getItemIn(!0);a=e?t.clamp(a,-1,1):0,t.children(r).forEach(function(u){var N=t.includes(v,u),E=u===l,S=u===m,z=E||!S&&(N||n*(t.isRtl?-1:1)===-1^w(u,r)>w(e||s));$(u,"itemtranslate"+(z?"in":"out"),{dir:n,percent:S?1-a:E?a:N?1:0})})},percent:function(){return Math.abs((t.css(r,"transform").split(",")[4]*(t.isRtl?-1:1)+o)/(c-o))},getDistance:function(){return Math.abs(c-o)},getItemIn:function(a){a===void 0&&(a=!1);var d=this.getActives(),v=A(r,x(s||e,r,h));if(a){var l=d;d=v,v=l}return v[t.findIndex(v,function(m){return!t.includes(d,m)})]},getActives:function(){return A(r,x(e||s,r,h))}}}function x(e,s,n){var i=w(e,s);return n?i-P(e,s):Math.min(i,y(s))}function y(e){return Math.max(0,I(e)-t.dimensions(e).width)}function I(e){return t.children(e).reduce(function(s,n){return t.dimensions(n).width+s},0)}function P(e,s){return t.dimensions(s).width/2-t.dimensions(e).width/2}function w(e,s){return e&&(t.position(e).left+(t.isRtl?t.dimensions(e).width-t.dimensions(s).width:0))*(t.isRtl?-1:1)||0}function A(e,s){s-=1;var n=t.dimensions(e).width,i=s+n+2;return t.children(e).filter(function(h){var g=w(h,e),r=g+Math.min(t.dimensions(h).width,n);return g>=s&&r<=i})}function $(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var M={mixins:[p,W,B],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:L},computed:{avgWidth:function(){return I(this.list)/this.length},finite:function(e){var s=e.finite;return s||Math.ceil(I(this.list))<Math.floor(t.dimensions(this.list).width+V(this.list)+this.center)},maxIndex:function(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return t.last(this.sets);var e=0,s=y(this.list),n=t.findIndex(this.slides,function(i){if(e>=s)return!0;e+=t.dimensions(i).width});return~n?n:this.length-1},sets:function(e){var s=this,n=e.sets;if(!!n){var i=t.dimensions(this.list).width/(this.center?2:1),h=0,g=i,r=0;return n=t.sortBy(this.slides,"offsetLeft").reduce(function(f,o,c){var a=t.dimensions(o).width,d=r+a;if(d>h&&(!s.center&&c>s.maxIndex&&(c=s.maxIndex),!t.includes(f,c))){var v=s.slides[c+1];s.center&&v&&a<g-t.dimensions(v).width/2?g-=a:(g=i,f.push(c),h=r+i+(s.center?a/2:0))}return r+=a,f},[]),!t.isEmpty(n)&&n}},transitionOptions:function(){return{center:this.center,list:this.list}}},connected:function(){t.toggleClass(this.$el,this.clsContainer,!t.$("."+this.clsContainer,this.$el))},update:{write:function(){var e=this;this.navItems.forEach(function(n){var i=t.toNumber(t.data(n,e.attrItem));i!==!1&&(n.hidden=!e.maxIndex||i>e.maxIndex||e.sets&&!t.includes(e.sets,i))}),this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));var s=this._getTransitioner(this.index).getActives();this.slides.forEach(function(n){return t.toggleClass(n,e.clsActive,t.includes(s,n))}),this.clsActivated&&(!this.sets||t.includes(this.sets,t.toFloat(this.index)))&&this.slides.forEach(function(n){return t.toggleClass(n,e.clsActivated||"",t.includes(s,n))})},events:["resize"]},events:{beforeitemshow:function(e){!this.dragging&&this.sets&&this.stack.length<2&&!t.includes(this.sets,this.index)&&(this.index=this.getValidIndex());var 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(var n=0;n<s;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}var i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(t.dimensions(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow:function(){~this.prevIndex&&t.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder:function(){var e=this;if(this.finite){t.css(this.slides,"order","");return}var s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach(function(f,o){return t.css(f,"order",e.dir>0&&o<s?1:e.dir<0&&o>=e.index?-1:"")}),!!this.center)for(var n=this.slides[s],i=t.dimensions(this.list).width/2-t.dimensions(n).width/2,h=0;i>0;){var g=this.getIndex(--h+s,s),r=this.slides[g];t.css(r,"order",g>s?-2:-1),i-=t.dimensions(r).width}},getValidIndex:function(e,s){if(e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),e=this.getIndex(e,s),!this.sets)return e;var n;do{if(t.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,s)}while(e!==n);return e}}};function V(e){return Math.max.apply(Math,[0].concat(t.children(e).map(function(s){return t.dimensions(s).width})))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlider=p(t.UIkit.util))})(this,function(t){"use strict";var p={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},R={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(s){var n=e[s];e[s]=function(i){var h=t.getEventPos(i).x*(t.isRtl?-1:1);e.prevPos=h!==e.pos?e.pos:e.prevPos,e.pos=h,n(i)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&C(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){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,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var s=this,n=this.pos-this.drag;if(!(n===0||this.prevPos===this.pos||!this.dragging&&Math.abs(n)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=n<0?1:-1;for(var i=this,h=i.slides,g=this,r=g.prevIndex,f=Math.abs(n),o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;o!==r&&f>c;)this.drag-=c*this.dir,r=o,f-=c,o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;this.percent=f/c;var a=h[r],d=h[o],v=this.index!==o,l=r===o,m;[this.index,this.prevIndex].filter(function(u){return!t.includes([o,r],u)}).forEach(function(u){t.trigger(h[u],"itemhidden",[s]),l&&(m=!0,s.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&t.trigger(h[this.index],"itemshown",[this]),v&&(this.prevIndex=r,this.index=o,!l&&t.trigger(a,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!l&&d),v&&(!l&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),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{var 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 C(e){return!e.children.length&&e.childNodes.length}var D={data:{selNav:!1},computed:{nav:function(e,s){var n=e.selNav;return t.$(n,s)},selNavItem:function(e){var s=e.attrItem;return"["+s+"],[data-"+s+"]"},navItems:function(e,s){return t.$$(this.selNavItem,s)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(s,n){return"<li "+e.attrItem+'="'+n+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(s){return s&&(s.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,s=this.getValidIndex();this.navItems.forEach(function(n){var i=t.data(n,e.attrItem);t.toggleClass(n,e.clsActive,t.toNumber(i)===s),t.toggleClass(n,"uk-invisible",e.finite&&(i==="previous"&&s===0||i==="next"&&s>=e.maxIndex))})}}},W={mixins:[T,R,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,s){var n=e.velocity;return b(s.offsetWidth/n)},list:function(e,s){var n=e.selList;return t.$(n,s)},maxIndex:function(){return this.length-1},selSlides:function(e){var s=e.selList,n=e.selSlides;return s+" "+(n||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,s){var n=this;if(s===void 0&&(s=!1),!(this.dragging||!this.length)){var i=this,h=i.stack,g=s?0:h.length,r=function(){h.splice(g,1),h.length&&n.show(h.shift(),!0)};if(h[s?"unshift":"push"](e),!s&&h.length>1){h.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var f=this.getIndex(this.index),o=t.hasClass(this.slides,this.clsActive)&&this.slides[f],c=this.getIndex(e,this.index),a=this.slides[c];if(o===a){r();return}if(this.dir=O(e,f),this.prevIndex=f,this.index=c,o&&!t.trigger(o,"beforeitemhide",[this])||!t.trigger(a,"beforeitemshow",[this,o])){this.index=this.prevIndex,r();return}var d=this._show(o,a,s).then(function(){return o&&t.trigger(o,"itemhidden",[n]),t.trigger(a,"itemshown",[n]),new t.Promise(function(v){t.fastdom.write(function(){h.shift(),h.length?n.show(h.shift(),!0):n._transitioner=null,v()})})});return o&&t.trigger(o,"itemhide",[this]),t.trigger(a,"itemshow",[this]),d}},getIndex:function(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:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show:function(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,t.assign({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),t.Promise.resolve();var i=this.stack,h=i.length;return this._transitioner[h>1?"forward":"show"](h>1?Math.min(this.duration,75+75/(h-1)):this.duration,this.percent)},_getDistance:function(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate:function(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);var i=this._getTransitioner(s!==n?s:!1,n);return i.translate(e),i},_getTransitioner:function(e,s,n,i){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),i)}}};function O(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function b(e){return .5*e+300}var B={update:{write:function(){if(!(this.stack.length||this.dragging)){var e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)}},events:["resize"]}};function _(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function L(e,s,n,i){var h=i.center,g=i.easing,r=i.list,f=new t.Deferred,o=e?x(e,r,h):x(s,r,h)+t.dimensions(s).width*n,c=s?x(s,r,h):o+t.dimensions(e).width*n*(t.isRtl?-1:1);return{dir:n,show:function(a,d,v){d===void 0&&(d=0);var l=v?"linear":g;return a-=Math.round(a*t.clamp(d,-1,1)),this.translate(d),d=e?d:t.clamp(d,0,1),$(this.getItemIn(),"itemin",{percent:d,duration:a,timing:l,dir:n}),e&&$(this.getItemIn(!0),"itemout",{percent:1-d,duration:a,timing:l,dir:n}),t.Transition.start(r,{transform:_(-c*(t.isRtl?-1:1),"px")},a,l).then(f.resolve,t.noop),f.promise},cancel:function(){t.Transition.cancel(r)},reset:function(){t.css(r,"transform","")},forward:function(a,d){return d===void 0&&(d=this.percent()),t.Transition.cancel(r),this.show(a,d,!0)},translate:function(a){var d=this.getDistance()*n*(t.isRtl?-1:1);t.css(r,"transform",_(t.clamp(-c+(d-d*a),-I(r),t.dimensions(r).width)*(t.isRtl?-1:1),"px"));var v=this.getActives(),l=this.getItemIn(),m=this.getItemIn(!0);a=e?t.clamp(a,-1,1):0,t.children(r).forEach(function(u){var N=t.includes(v,u),E=u===l,S=u===m,z=E||!S&&(N||n*(t.isRtl?-1:1)===-1^w(u,r)>w(e||s));$(u,"itemtranslate"+(z?"in":"out"),{dir:n,percent:S?1-a:E?a:N?1:0})})},percent:function(){return Math.abs((t.css(r,"transform").split(",")[4]*(t.isRtl?-1:1)+o)/(c-o))},getDistance:function(){return Math.abs(c-o)},getItemIn:function(a){a===void 0&&(a=!1);var d=this.getActives(),v=A(r,x(s||e,r,h));if(a){var l=d;d=v,v=l}return v[t.findIndex(v,function(m){return!t.includes(d,m)})]},getActives:function(){return A(r,x(e||s,r,h))}}}function x(e,s,n){var i=w(e,s);return n?i-P(e,s):Math.min(i,y(s))}function y(e){return Math.max(0,I(e)-t.dimensions(e).width)}function I(e){return t.children(e).reduce(function(s,n){return t.dimensions(n).width+s},0)}function P(e,s){return t.dimensions(s).width/2-t.dimensions(e).width/2}function w(e,s){return e&&(t.position(e).left+(t.isRtl?t.dimensions(e).width-t.dimensions(s).width:0))*(t.isRtl?-1:1)||0}function A(e,s){s-=1;var n=t.dimensions(e).width,i=s+n+2;return t.children(e).filter(function(h){var g=w(h,e),r=g+Math.min(t.dimensions(h).width,n);return g>=s&&r<=i})}function $(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var M={mixins:[p,W,B],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:L},computed:{avgWidth:function(){return I(this.list)/this.length},finite:function(e){var s=e.finite;return s||Math.ceil(I(this.list))<Math.floor(t.dimensions(this.list).width+V(this.list)+this.center)},maxIndex:function(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return t.last(this.sets);var e=0,s=y(this.list),n=t.findIndex(this.slides,function(i){if(e>=s)return!0;e+=t.dimensions(i).width});return~n?n:this.length-1},sets:function(e){var s=this,n=e.sets;if(!!n){var i=t.dimensions(this.list).width/(this.center?2:1),h=0,g=i,r=0;return n=t.sortBy(this.slides,"offsetLeft").reduce(function(f,o,c){var a=t.dimensions(o).width,d=r+a;if(d>h&&(!s.center&&c>s.maxIndex&&(c=s.maxIndex),!t.includes(f,c))){var v=s.slides[c+1];s.center&&v&&a<g-t.dimensions(v).width/2?g-=a:(g=i,f.push(c),h=r+i+(s.center?a/2:0))}return r+=a,f},[]),!t.isEmpty(n)&&n}},transitionOptions:function(){return{center:this.center,list:this.list}}},connected:function(){t.toggleClass(this.$el,this.clsContainer,!t.$("."+this.clsContainer,this.$el))},update:{write:function(){var e=this;this.navItems.forEach(function(n){var i=t.toNumber(t.data(n,e.attrItem));i!==!1&&(n.hidden=!e.maxIndex||i>e.maxIndex||e.sets&&!t.includes(e.sets,i))}),this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));var s=this._getTransitioner(this.index).getActives();this.slides.forEach(function(n){return t.toggleClass(n,e.clsActive,t.includes(s,n))}),this.clsActivated&&(!this.sets||t.includes(this.sets,t.toFloat(this.index)))&&this.slides.forEach(function(n){return t.toggleClass(n,e.clsActivated||"",t.includes(s,n))})},events:["resize"]},events:{beforeitemshow:function(e){!this.dragging&&this.sets&&this.stack.length<2&&!t.includes(this.sets,this.index)&&(this.index=this.getValidIndex());var 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(var n=0;n<s;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}var i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(t.dimensions(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow:function(){~this.prevIndex&&t.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder:function(){var e=this;if(this.finite){t.css(this.slides,"order","");return}var s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach(function(f,o){return t.css(f,"order",e.dir>0&&o<s?1:e.dir<0&&o>=e.index?-1:"")}),!!this.center)for(var n=this.slides[s],i=t.dimensions(this.list).width/2-t.dimensions(n).width/2,h=0;i>0;){var g=this.getIndex(--h+s,s),r=this.slides[g];t.css(r,"order",g>s?-2:-1),i-=t.dimensions(r).width}},getValidIndex:function(e,s){if(e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),e=this.getIndex(e,s),!this.sets)return e;var n;do{if(t.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,s)}while(e!==n);return e}}};function V(e){return Math.max.apply(Math,[0].concat(t.children(e).map(function(s){return t.dimensions(s).width})))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.fb043abc2 | 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')) :
|