uikit 3.12.1 → 3.12.3-dev.3c9ee4dfd
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 +30 -2
- package/build/scss.js +9 -17
- package/dist/css/uikit-core-rtl.css +15 -81
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +15 -81
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +15 -81
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +15 -81
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +3 -3
- 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 +13 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +15 -4
- 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 +65 -8
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +30 -13
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +14 -3
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +30 -13
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +13 -2
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +12 -20
- 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 +281 -224
- 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 +296 -237
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/hooks.js +3 -3
- package/src/js/api/state.js +14 -39
- package/src/js/components/countdown.js +2 -2
- package/src/js/components/lightbox.js +1 -1
- package/src/js/components/parallax.js +3 -1
- package/src/js/components/slider-parallax.js +6 -4
- package/src/js/components/slider.js +1 -1
- package/src/js/core/core.js +2 -17
- package/src/js/core/cover.js +3 -6
- package/src/js/core/drop.js +5 -10
- package/src/js/core/form-custom.js +6 -7
- package/src/js/core/gif.js +5 -3
- package/src/js/core/grid.js +2 -1
- package/src/js/core/height-match.js +21 -1
- package/src/js/core/height-viewport.js +10 -7
- package/src/js/core/img.js +1 -2
- package/src/js/core/leader.js +7 -13
- package/src/js/core/margin.js +18 -1
- package/src/js/core/overflow-auto.js +8 -7
- package/src/js/core/scroll.js +6 -2
- package/src/js/core/scrollspy-nav.js +19 -16
- package/src/js/core/scrollspy.js +12 -15
- package/src/js/core/sticky.js +8 -3
- package/src/js/core/svg.js +16 -14
- package/src/js/core/toggle.js +16 -13
- package/src/js/core/video.js +2 -8
- package/src/js/mixin/media.js +29 -5
- package/src/js/mixin/position.js +10 -18
- package/src/js/mixin/resize.js +13 -0
- package/src/js/mixin/scroll.js +32 -0
- package/src/js/mixin/slider.js +2 -1
- package/src/js/util/class.js +1 -6
- package/src/js/util/mouse.js +1 -1
- package/src/js/util/observer.js +57 -20
- package/src/js/util/style.js +1 -1
- package/src/less/components/base.less +0 -19
- package/src/less/components/form.less +1 -9
- package/src/less/components/icon.less +6 -0
- package/src/less/components/list.less +1 -0
- package/src/less/components/search.less +0 -3
- package/src/less/components/slider.less +3 -0
- package/src/less/components/slideshow.less +3 -0
- package/src/less/components/utility.less +0 -9
- package/src/scss/components/base.scss +0 -19
- package/src/scss/components/form.scss +1 -7
- package/src/scss/components/icon.scss +6 -0
- package/src/scss/components/list.scss +1 -0
- package/src/scss/components/search.scss +0 -1
- package/src/scss/components/slider.scss +3 -0
- package/src/scss/components/slideshow.scss +3 -0
- package/src/scss/components/utility.scss +0 -9
- package/src/scss/mixins-theme.scss +0 -4
- package/src/scss/mixins.scss +0 -4
- package/tests/js/index.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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')) :
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
connected() {
|
|
30
|
-
this.date = Date.parse(this.date);
|
|
30
|
+
this.date = Date.parse(this.$props.date);
|
|
31
31
|
this.start();
|
|
32
32
|
},
|
|
33
33
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
continue;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
let digits = String(Math.
|
|
83
|
+
let digits = String(Math.trunc(timespan[unit]));
|
|
84
84
|
|
|
85
85
|
digits = digits.length < 2 ? "0" + digits : digits;
|
|
86
86
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=i(e.UIkit.util))})(this,function(e){"use strict";var i={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}};const a=["days","hours","minutes","seconds"];var d={mixins:[i],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const s of a){const o=e.$(this.clsWrapper.replace("%unit%",s),this.$el);if(!o)continue;let t=String(Math.trunc(n[s]));t=t.length<2?"0"+t:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((h,u)=>o.children[u].textContent=h))}}}};function r(n){const s=n-Date.now();return{total:s,seconds:s/1e3%60,minutes:s/1e3/60%60,hours:s/1e3/60/60%24,days:s/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],l):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=l(n.UIkit.util))})(this,function(n){"use strict";function l(s){return A(s,"top","bottom")}function A(s,e,o){const r=[[]];for(const t of s){if(!n.isVisible(t))continue;let c=u(t);for(let a=r.length-1;a>=0;a--){const f=r[a];if(!f[0]){f.push(t);break}let d;if(f[0].offsetParent===t.offsetParent?d=u(f[0]):(c=u(t,!0),d=u(f[0],!0)),c[e]>=d[o]-1&&c[e]!==d[e]){r.push([t]);break}if(c[o]-1>d[e]||c[e]===d[e]){f.push(t);break}if(a===0){r.unshift([t]);break}}}return r}function u(s,e){e===void 0&&(e=!1);let{offsetTop:o,offsetLeft:r,offsetHeight:t,offsetWidth:c}=s;return e&&([o,r]=n.offsetPosition(s)),{top:o,left:r,bottom:o+t,right:r+c}}const g="uk-transition-leave",v="uk-transition-enter";function w(s,e,o,r){r===void 0&&(r=0);const t=y(e,!0),c={opacity:1},a={opacity:0},f=i=>()=>t===y(e)?i():Promise.reject(),d=f(()=>(n.addClass(e,g),Promise.all(I(e).map((i,h)=>new Promise(m=>setTimeout(()=>n.Transition.start(i,a,o/2,"ease").then(m),h*r)))).then(()=>n.removeClass(e,g)))),p=f(()=>{const i=n.height(e);return n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),new Promise(h=>requestAnimationFrame(()=>{const m=n.children(e),x=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const C=I(e);n.css(m,a);const q=C.map((W,M)=>new Promise(R=>setTimeout(()=>n.Transition.start(W,c,o/2,"ease").then(R),M*r)));i!==x&&q.push(n.Transition.start(e,{height:x},o/2+C.length*r,"ease")),Promise.all(q).then(()=>{n.removeClass(e,v),t===y(e)&&(n.css(e,{height:"",alignContent:""}),n.css(m,{opacity:""}),delete e.dataset.transition),h()})}))});return n.hasClass(e,g)?T(e).then(p):n.hasClass(e,v)?T(e).then(d).then(p):d().then(p)}function y(s,e){return e&&(s.dataset.transition=1+y(s)),n.toNumber(s.dataset.transition)||0}function T(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return l(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(r=>n.isInView(r)),"offsetLeft")),[])}function L(s,e,o){return new Promise(r=>requestAnimationFrame(()=>{let t=n.children(e);const c=t.map(f=>F(f,!0)),a=n.css(e,["height","padding"]);n.Transition.cancel(e),t.forEach(n.Transition.cancel),S(e),s(),t=t.concat(n.children(e).filter(f=>!n.includes(t,f))),Promise.resolve().then(()=>{n.fastdom.flush();const f=n.css(e,["height","padding"]),[d,p]=z(e,t,c);t.forEach((i,h)=>p[h]&&n.css(i,p[h])),n.css(e,{display:"block",...a}),requestAnimationFrame(()=>{const i=t.map((h,m)=>n.parent(h)===e&&n.Transition.start(h,d[m],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));Promise.all(i).then(()=>{t.forEach((h,m)=>n.parent(h)===e&&n.css(h,"display",d[m].opacity===0?"none":"")),S(e)},n.noop).then(r)})})}))}function F(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...$(s)}:!1}function z(s,e,o){const r=e.map((c,a)=>n.parent(c)&&a in o?o[a]?n.isVisible(c)?$(c):{opacity:0}:{opacity:n.isVisible(c)?1:0}:!1),t=r.map((c,a)=>{const f=n.parent(e[a])===s&&(o[a]||F(e[a]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:d}=f;d%1?c.opacity=1:delete f.opacity}return f});return[r,t]}function S(s){n.css(s.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),n.css(s,{height:"",display:"",padding:""})}function $(s){const{height:e,width:o}=n.offset(s),{top:r,left:t}=n.position(s),{marginLeft:c,marginTop:a}=n.css(s,["marginTop","marginLeft"]);return{top:r,left:t,height:e,width:o,marginLeft:c,marginTop:a,transform:""}}var B={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const o=this.animation;return(o==="fade"?w:o==="delayed-fade"?function(){for(var t=arguments.length,c=new Array(t),a=0;a<t;a++)c[a]=arguments[a];return w(...c,40)}:o?L:()=>(s(),Promise.resolve()))(s,e,this.duration).then(()=>this.$update(e,"resize"),n.noop)}}},b={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(s,e){let{attrItem:o}=s;return n.$$("["+o+"],[data-"+o+"]",e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get(s,e){let{target:o}=s;return n.$$(o+" > *",e)},watch(s,e){e&&!H(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());O(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},setState(s,e){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!N(o,this.attrItem,s))),Promise.all(n.$$(this.target,this.$el).map(o=>{const r=()=>{V(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(r,o):r()})).then(()=>n.trigger(this.$el,"afterFilter",[this]))},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function P(s,e){return n.parseOptions(n.data(s,e),["filter"])}function O(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function V(s,e,o){const r=j(s);o.forEach(a=>n.css(a,"display",r&&!n.matches(a,r)?"none":""));const[t,c]=s.sort;if(t){const a=D(o,t,c);n.isEqual(a,o)||n.append(e,a)}}function E(s,e,o){const r=P(s,e),{filter:t,group:c,sort:a,order:f="asc"}=r;return(t||n.isUndefined(a))&&(c?t?(delete o.filter[""],o.filter[c]=t):(delete o.filter[c],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,f]),o}function N(s,e,o){let{filter:r={"":""},sort:[t,c]}=o;const{filter:a="",group:f="",sort:d,order:p="asc"}=P(s,e);return n.isUndefined(d)?f in r&&a===r[f]||!a&&f&&!(f in r)&&!r[""]:t===d&&c===p}function H(s,e){return s.length===e.length&&s.every(o=>~e.indexOf(o))}function j(s){let{filter:e}=s,o="";return n.each(e,r=>o+=r||""),o}function D(s,e,o){return[...s].sort((r,t)=>n.data(r,e).localeCompare(n.data(t,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",b),b});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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')) :
|
|
@@ -592,6 +592,17 @@
|
|
|
592
592
|
uikitUtil.trigger(el, uikitUtil.createEvent(type, false, false, data));
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
var Resize = {
|
|
596
|
+
computed: {
|
|
597
|
+
resizeTargets() {
|
|
598
|
+
return this.$el;
|
|
599
|
+
} },
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
connected() {
|
|
603
|
+
this.registerObserver(uikitUtil.observeResize(this.resizeTargets, () => this.$emit('resize')));
|
|
604
|
+
} };
|
|
605
|
+
|
|
595
606
|
var SliderAutoplay = {
|
|
596
607
|
props: {
|
|
597
608
|
autoplay: Boolean,
|
|
@@ -930,7 +941,7 @@
|
|
|
930
941
|
} } };
|
|
931
942
|
|
|
932
943
|
var Slider = {
|
|
933
|
-
mixins: [SliderAutoplay, SliderDrag, SliderNav],
|
|
944
|
+
mixins: [SliderAutoplay, SliderDrag, SliderNav, Resize],
|
|
934
945
|
|
|
935
946
|
props: {
|
|
936
947
|
clsActivated: Boolean,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.12.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=p(s.UIkit.util))})(this,function(s){"use strict";var p={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return A(e)},translate(e,t){return[{transform:v(t*-100*e)},{transform:v(t*100*(1-e))}]}}};function A(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I={...p,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}},y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},_={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},C={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(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(e,t,n){return new Promise(o=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?P(this):E(this))(h,a),r=a?this.clsEnter:this.clsLeave;s.addClass(h,r),s.trigger(h,a?"show":"hide",[this]);const l=()=>{s.removeClass(h,r),s.trigger(h,a?"shown":"hidden",[this]),this.$update(h)};return i?i.then(l,()=>(s.removeClass(h,r),Promise.reject())):l()})).then(o,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(o=>s.isVisible(o)?o.focus()||!0:o.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function P(e){let{isToggled:t,duration:n,initProps:o,hideProps:h,transition:a,_toggle:i}=e;return(r,l)=>{const d=s.Transition.inProgress(r),m=r.hasChildNodes()?s.toFloat(s.css(r.firstElementChild,"marginTop"))+s.toFloat(s.css(r.lastElementChild,"marginBottom")):0,c=s.isVisible(r)?s.height(r)+(d?0:m):0;s.Transition.cancel(r),t(r)||i(r,!0),s.height(r,""),s.fastdom.flush();const g=s.height(r)+(d?0:m);return s.height(r,c),(l?s.Transition.start(r,{...o,overflow:"hidden",height:g},Math.round(n*(1-c/g)),a):s.Transition.start(r,h,Math.round(n*(c/g)),a).then(()=>i(r,!1))).then(()=>s.css(r,o))}}function E(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:h,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,o[0],h,e.origin)):s.Animation.out(t,o[1]||o[0],h,e.origin).then(()=>a(t,!1))}}const f=[];var S={mixins:[_,y,C],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;s.width(window)>e.clientWidth&&this.overlay&&s.css(document.body,"overflowY","scroll"),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(e,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,t=>{let{target:n}=t;s.last(f)!==this||this.overlay&&!s.within(n,this.$el)||s.within(n,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",o=>{let{defaultPrevented:h,type:a,target:i}=o;!h&&a===s.pointerUp&&n===i&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",t=>{t.keyCode===27&&s.last(f)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(f,this)&&f.splice(f.indexOf(this),1),f.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),f.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,$(this))},hide(){return this.toggleElement(this.$el,!1,$(this))}}};function $(e){let{transitionElement:t,_toggle:n}=e;return(o,h)=>new Promise((a,i)=>s.once(o,"show hide",()=>{o._reject&&o._reject(),o._reject=i,n(o,h);const r=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{r(),a()},s.toMs(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function N(e,t,n,o){let{animation:h,easing:a}=o;const{percent:i,translate:r,show:l=s.noop}=h,d=l(n),m=new s.Deferred;return{dir:n,show(c,g,W){g===void 0&&(g=0);const x=W?"linear":a;return c-=Math.round(c*s.clamp(g,-1,1)),this.translate(g),b(t,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([s.Transition.start(t,d[1],c,x),s.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const c in d[0])s.css([t,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(c,g,!0)},translate(c){this.reset();const g=r(c,n);s.css(t,g[1]),s.css(e,g[0]),b(t,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var D={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},B={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const o=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&M(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,h=Math.abs(t),a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;for(;a!==o&&h>i;)this.drag-=i*this.dir,o=a,h-=i,a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;this.percent=h/i;const r=n[o],l=n[a],d=this.index!==a,m=o===a;let c;[this.index,this.prevIndex].filter(g=>!s.includes([a,o],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||c)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=o,this.index=a,!m&&s.trigger(r,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&l),d&&(!m&&s.trigger(r,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.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{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function M(e){return!e.children.length&&e.childNodes.length}var j={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},O={mixins:[D,B,j],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return H(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,o=t?0:n.length,h=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],r=this.getIndex(e,this.index),l=this.slides[r];if(i===l){h();return}if(this.dir=z(e,a),this.prevIndex=a,this.index=r,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}const d=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(t!==n?t:!1,n);return o.translate(e),o},_getTransitioner(e,t,n,o){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),o)}}};function z(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function H(e){return .5*e+300}var L={mixins:[O],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:N},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},T={mixins:[y,S,C,L],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:o,alt:h="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let r;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,u("img",{src:n,width:d,height:m,alt:h,...i}))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(d,"loadedmetadata",()=>{s.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(t,d)}),s.on(d,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,u("iframe",{src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080,...l,...i}));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,u("iframe",{src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:d,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",T),T});
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=p(s.UIkit.util))})(this,function(s){"use strict";var p={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return A(e)},translate(e,t){return[{transform:v(t*-100*e)},{transform:v(t*100*(1-e))}]}}};function A(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I={...p,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}},y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},_={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},$={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(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?P(this):E(this))(h,a),o=a?this.clsEnter:this.clsLeave;s.addClass(h,o),s.trigger(h,a?"show":"hide",[this]);const l=()=>{s.removeClass(h,o),s.trigger(h,a?"shown":"hidden",[this]),this.$update(h)};return i?i.then(l,()=>(s.removeClass(h,o),Promise.reject())):l()})).then(r,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function P(e){let{isToggled:t,duration:n,initProps:r,hideProps:h,transition:a,_toggle:i}=e;return(o,l)=>{const d=s.Transition.inProgress(o),m=o.hasChildNodes()?s.toFloat(s.css(o.firstElementChild,"marginTop"))+s.toFloat(s.css(o.lastElementChild,"marginBottom")):0,c=s.isVisible(o)?s.height(o)+(d?0:m):0;s.Transition.cancel(o),t(o)||i(o,!0),s.height(o,""),s.fastdom.flush();const g=s.height(o)+(d?0:m);return s.height(o,c),(l?s.Transition.start(o,{...r,overflow:"hidden",height:g},Math.round(n*(1-c/g)),a):s.Transition.start(o,h,Math.round(n*(c/g)),a).then(()=>i(o,!1))).then(()=>s.css(o,r))}}function E(e){return(t,n)=>{s.Animation.cancel(t);const{animation:r,duration:h,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,r[0],h,e.origin)):s.Animation.out(t,r[1]||r[0],h,e.origin).then(()=>a(t,!1))}}const f=[];var S={mixins:[_,y,$],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;s.width(window)>e.clientWidth&&this.overlay&&s.css(document.body,"overflowY","scroll"),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(e,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,t=>{let{target:n}=t;s.last(f)!==this||this.overlay&&!s.within(n,this.$el)||s.within(n,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",r=>{let{defaultPrevented:h,type:a,target:i}=r;!h&&a===s.pointerUp&&n===i&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",t=>{t.keyCode===27&&s.last(f)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(f,this)&&f.splice(f.indexOf(this),1),f.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),f.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,C(this))},hide(){return this.toggleElement(this.$el,!1,C(this))}}};function C(e){let{transitionElement:t,_toggle:n}=e;return(r,h)=>new Promise((a,i)=>s.once(r,"show hide",()=>{r._reject&&r._reject(),r._reject=i,n(r,h);const o=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{o(),a()},s.toMs(s.css(t,"transitionDuration")))})).then(()=>delete r._reject)}function N(e,t,n,r){let{animation:h,easing:a}=r;const{percent:i,translate:o,show:l=s.noop}=h,d=l(n),m=new s.Deferred;return{dir:n,show(c,g,R){g===void 0&&(g=0);const x=R?"linear":a;return c-=Math.round(c*s.clamp(g,-1,1)),this.translate(g),b(t,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([s.Transition.start(t,d[1],c,x),s.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const c in d[0])s.css([t,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(c,g,!0)},translate(c){this.reset();const g=o(c,n);s.css(t,g[1]),s.css(e,g[0]),b(t,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var D={computed:{resizeTargets(){return this.$el}},connected(){this.registerObserver(s.observeResize(this.resizeTargets,()=>this.$emit("resize")))}},B={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},z={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&M(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,h=Math.abs(t),a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&h>i;)this.drag-=i*this.dir,r=a,h-=i,a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;this.percent=h/i;const o=n[r],l=n[a],d=this.index!==a,m=r===a;let c;[this.index,this.prevIndex].filter(g=>!s.includes([a,r],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||c)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=r,this.index=a,!m&&s.trigger(o,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!m&&l),d&&(!m&&s.trigger(o,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.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{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function M(e){return!e.children.length&&e.childNodes.length}var j={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},O={mixins:[B,z,j,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return L(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,h=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],o=this.getIndex(e,this.index),l=this.slides[o];if(i===l){h();return}if(this.dir=H(e,a),this.prevIndex=a,this.index=o,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}const d=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e,t,n,r){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function H(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function L(e){return .5*e+300}var W={mixins:[O],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:p,Transitioner:N},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},T={mixins:[y,S,$,W],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:r,alt:h="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let o;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(r==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,u("img",{src:n,width:d,height:m,alt:h,...i}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(d,"loadedmetadata",()=>{s.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(t,d)}),s.on(d,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(o=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,u("iframe",{src:"https://www.youtube"+(o[1]||"")+".com/embed/"+o[2]+(o[3]?"?"+o[3]:""),width:1920,height:1080,...l,...i}));else if(o=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,u("iframe",{src:"https://player.vimeo.com/video/"+o[1]+(o[2]?"?"+o[2]:""),width:m,height:d,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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')) :
|
|
@@ -592,6 +592,17 @@
|
|
|
592
592
|
uikitUtil.trigger(el, uikitUtil.createEvent(type, false, false, data));
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
var Resize = {
|
|
596
|
+
computed: {
|
|
597
|
+
resizeTargets() {
|
|
598
|
+
return this.$el;
|
|
599
|
+
} },
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
connected() {
|
|
603
|
+
this.registerObserver(uikitUtil.observeResize(this.resizeTargets, () => this.$emit('resize')));
|
|
604
|
+
} };
|
|
605
|
+
|
|
595
606
|
var SliderAutoplay = {
|
|
596
607
|
props: {
|
|
597
608
|
autoplay: Boolean,
|
|
@@ -930,7 +941,7 @@
|
|
|
930
941
|
} } };
|
|
931
942
|
|
|
932
943
|
var Slider = {
|
|
933
|
-
mixins: [SliderAutoplay, SliderDrag, SliderNav],
|
|
944
|
+
mixins: [SliderAutoplay, SliderDrag, SliderNav, Resize],
|
|
934
945
|
|
|
935
946
|
props: {
|
|
936
947
|
clsActivated: Boolean,
|
|
@@ -1554,8 +1565,8 @@
|
|
|
1554
1565
|
return this.panel.show(index);
|
|
1555
1566
|
},
|
|
1556
1567
|
|
|
1557
|
-
hide() {
|
|
1558
|
-
return
|
|
1568
|
+
hide() {var _this$panel;
|
|
1569
|
+
return (_this$panel = this.panel) == null ? void 0 : _this$panel.hide();
|
|
1559
1570
|
} } };
|
|
1560
1571
|
|
|
1561
1572
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.12.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],f):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox=f(t.UIkit.util))})(this,function(t){"use strict";var f={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return P(e)},translate(e,s){return[{transform:v(s*-100*e)},{transform:v(s*100*(1-e))}]}}};function P(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I={...f,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}},y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:s}=e;return s===!0&&this.$container||s&&t.$(s)}}},_={connected(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},$={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(e){let{animation:s}=e;return!!s[0]},hasTransition(e){let{animation:s}=e;return this.hasAnimation&&s[0]===!0}},methods:{toggleElement(e,s,n){return new Promise(o=>Promise.all(t.toNodes(e).map(h=>{const a=t.isBoolean(s)?s:!this.isToggled(h);if(!t.trigger(h,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(t.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?E(this):S(this))(h,a),r=a?this.clsEnter:this.clsLeave;t.addClass(h,r),t.trigger(h,a?"show":"hide",[this]);const l=()=>{t.removeClass(h,r),t.trigger(h,a?"shown":"hidden",[this]),this.$update(h)};return i?i.then(l,()=>(t.removeClass(h,r),Promise.reject())):l()})).then(o,t.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=t.toNodes(e),t.hasClass(e,this.clsEnter)?!0:t.hasClass(e,this.clsLeave)?!1:this.cls?t.hasClass(e,this.cls.split(" ")[0]):t.isVisible(e)},_toggle(e,s){if(!e)return;s=Boolean(s);let n;this.cls?(n=t.includes(this.cls," ")||s!==t.hasClass(e,this.cls),n&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:s)):(n=s===e.hidden,n&&(e.hidden=!s)),t.$$("[autofocus]",e).some(o=>t.isVisible(o)?o.focus()||!0:o.blur()),n&&(t.trigger(e,"toggled",[s,this]),this.$update(e))}}};function E(e){let{isToggled:s,duration:n,initProps:o,hideProps:h,transition:a,_toggle:i}=e;return(r,l)=>{const d=t.Transition.inProgress(r),m=r.hasChildNodes()?t.toFloat(t.css(r.firstElementChild,"marginTop"))+t.toFloat(t.css(r.lastElementChild,"marginBottom")):0,c=t.isVisible(r)?t.height(r)+(d?0:m):0;t.Transition.cancel(r),s(r)||i(r,!0),t.height(r,""),t.fastdom.flush();const g=t.height(r)+(d?0:m);return t.height(r,c),(l?t.Transition.start(r,{...o,overflow:"hidden",height:g},Math.round(n*(1-c/g)),a):t.Transition.start(r,h,Math.round(n*(c/g)),a).then(()=>i(r,!1))).then(()=>t.css(r,o))}}function S(e){return(s,n)=>{t.Animation.cancel(s);const{animation:o,duration:h,_toggle:a}=e;return n?(a(s,!0),t.Animation.in(s,o[0],h,e.origin)):t.Animation.out(s,o[1]||o[0],h,e.origin).then(()=>a(s,!1))}}const p=[];var N={mixins:[_,y,$],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,s){let{selPanel:n}=e;return t.$(n,s)},transitionElement(){return this.panel},bgClose(e){let{bgClose:s}=e;return s&&this.panel}},beforeDisconnect(){t.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(t.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(s=>s.hide())).then(this.show),e.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;t.width(window)>e.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+p.length),t.addClass(e,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,s=>{let{target:n}=s;t.last(p)!==this||this.overlay&&!t.within(n,this.$el)||t.within(n,this.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",o=>{let{defaultPrevented:h,type:a,target:i}=o;!h&&a===t.pointerUp&&n===i&&this.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",s=>{s.keyCode===27&&t.last(p)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){t.includes(p,this)&&p.splice(p.indexOf(this),1),p.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),p.some(e=>e.clsPage===this.clsPage)||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,C(this))},hide(){return this.toggleElement(this.$el,!1,C(this))}}};function C(e){let{transitionElement:s,_toggle:n}=e;return(o,h)=>new Promise((a,i)=>t.once(o,"show hide",()=>{o._reject&&o._reject(),o._reject=i,n(o,h);const r=t.once(s,"transitionstart",()=>{t.once(s,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{r(),a()},t.toMs(t.css(s,"transitionDuration")))})).then(()=>delete o._reject)}function D(e,s,n,o){let{animation:h,easing:a}=o;const{percent:i,translate:r,show:l=t.noop}=h,d=l(n),m=new t.Deferred;return{dir:n,show(c,g,V){g===void 0&&(g=0);const x=V?"linear":a;return c-=Math.round(c*t.clamp(g,-1,1)),this.translate(g),b(s,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([t.Transition.start(s,d[1],c,x),t.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},t.noop),m.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const c in d[0])t.css([s,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),t.Transition.cancel([s,e]),this.show(c,g,!0)},translate(c){this.reset();const g=r(c,n);t.css(s,g[1]),t.css(e,g[0]),b(s,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return i(e||s,s,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var B={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!t.$(":focus",this.$el))&&(!this.pauseOnHover||!t.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},M={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=n=>{const o=t.getEventPos(n).x*(t.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,s(n)}}},events:[{name:t.pointerDown,delegate(){return this.selSlides},handler(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(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,h=Math.abs(s),a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;for(;a!==o&&h>i;)this.drag-=i*this.dir,o=a,h-=i,a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;this.percent=h/i;const r=n[o],l=n[a],d=this.index!==a,m=o===a;let c;[this.index,this.prevIndex].filter(g=>!t.includes([a,o],g)).forEach(g=>{t.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||c)&&t.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=o,this.index=a,!m&&t.trigger(r,"beforeitemhide",[this]),t.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&l),d&&(!m&&t.trigger(r,"itemhide",[this]),t.trigger(l,"itemshow",[this]))},end(){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{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function j(e){return!e.children.length&&e.childNodes.length}var O={data:{selNav:!1},computed:{nav(e,s){let{selNav:n}=e;return t.$(n,s)},selNavItem(e){let{attrItem:s}=e;return"["+s+"],[data-"+s+"]"},navItems(e,s){return t.$$(this.selNavItem,s)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map((e,s)=>"<li "+this.attrItem+'="'+s+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const s of this.navItems){const n=t.data(s,this.attrItem);t.toggleClass(s,this.clsActive,t.toNumber(n)===e),t.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},z={mixins:[B,M,O],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration(e,s){let{velocity:n}=e;return H(s.offsetWidth/n)},list(e,s){let{selList:n}=e;return t.$(n,s)},maxIndex(){return this.length-1},selSlides(e){let{selList:s,selSlides:n}=e;return s+" "+(n||"> *")},slides:{get(){return t.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,s){if(s===void 0&&(s=!1),this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,h=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],r=this.getIndex(e,this.index),l=this.slides[r];if(i===l){h();return}if(this.dir=L(e,a),this.prevIndex=a,this.index=r,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}const d=this._show(i,l,s).then(()=>(i&&t.trigger(i,"itemhidden",[this]),t.trigger(l,"itemshown",[this]),new Promise(m=>{t.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d},getIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.index),t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(s!==n?s:!1,n);return o.translate(e),o},_getTransitioner(e,s,n,o){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),o)}}};function L(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function H(e){return .5*e+300}var W={mixins:[z],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:f,Transitioner:D},computed:{animation(e){let{animation:s,Animations:n}=e;return{...n[s]||n.slide,name:s}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:s}=e;t.addClass(s,this.clsActive)},itemshown(e){let{target:s}=e;t.addClass(s,this.clsActivated)},itemhidden(e){let{target:s}=e;t.removeClass(s,this.clsActive,this.clsActivated)}}},q={mixins:[y,N,$,W],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=t.$(this.template),s=t.$(this.selList,e);this.items.forEach(()=>t.append(s,"<li>")),this.$mount(t.append(this.container,e))},computed:{caption(e,s){let{selCaption:n}=e;return t.$(n,s)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){t.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,s){const{source:n,type:o,alt:h="",poster:a,attrs:i={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!n)return;let r;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await t.getImage(n,i.srcset,i.size);this.setItem(s,u("img",{src:n,width:d,height:m,alt:h,...i}))}catch{this.setError(s)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});t.on(d,"loadedmetadata",()=>{t.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(s,d)}),t.on(d,"error",()=>this.setError(s))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(s,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,u("iframe",{src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080,...l,...i}));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(s,u("iframe",{src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:d,...l,...i}))}catch{this.setError(s)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const s=this.getItem(e);this.getSlide(s).childElementCount||t.trigger(this.$el,"itemload",[s])},getItem(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem(e,s){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),s)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,s){const n=t.fragment("<"+e+">");return t.attr(n,s),n}var T={install:F,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(e,s){let{toggle:n}=e;return t.$$(n,s)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const s=t.uniqueBy(this.toggles.map(A),"source");if(t.isElement(e)){const{source:n}=A(e);e=t.findIndex(s,o=>{let{source:h}=o;return n===h})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:s}),t.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){return this.panel&&this.panel.hide()}}};function F(e,s){e.lightboxPanel||e.component("lightboxPanel",q),t.assign(s.props,e.component("lightboxPanel").options.props)}function A(e){const s={};for(const n of["href","caption","type","poster","alt","attrs"])s[n==="href"?"source":n]=t.data(e,n);return s.attrs=t.parseOptions(s.attrs),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",T),T});
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],f):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox=f(s.UIkit.util))})(this,function(s){"use strict";var f={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return _(e)},translate(e,t){return[{transform:v(t*-100*e)},{transform:v(t*100*(1-e))}]}}};function _(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I={...f,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}},y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},P={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},$={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(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(e,t,n){return new Promise(o=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?E(this):S(this))(h,a),r=a?this.clsEnter:this.clsLeave;s.addClass(h,r),s.trigger(h,a?"show":"hide",[this]);const l=()=>{s.removeClass(h,r),s.trigger(h,a?"shown":"hidden",[this]),this.$update(h)};return i?i.then(l,()=>(s.removeClass(h,r),Promise.reject())):l()})).then(o,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(o=>s.isVisible(o)?o.focus()||!0:o.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function E(e){let{isToggled:t,duration:n,initProps:o,hideProps:h,transition:a,_toggle:i}=e;return(r,l)=>{const d=s.Transition.inProgress(r),m=r.hasChildNodes()?s.toFloat(s.css(r.firstElementChild,"marginTop"))+s.toFloat(s.css(r.lastElementChild,"marginBottom")):0,c=s.isVisible(r)?s.height(r)+(d?0:m):0;s.Transition.cancel(r),t(r)||i(r,!0),s.height(r,""),s.fastdom.flush();const g=s.height(r)+(d?0:m);return s.height(r,c),(l?s.Transition.start(r,{...o,overflow:"hidden",height:g},Math.round(n*(1-c/g)),a):s.Transition.start(r,h,Math.round(n*(c/g)),a).then(()=>i(r,!1))).then(()=>s.css(r,o))}}function S(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:h,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,o[0],h,e.origin)):s.Animation.out(t,o[1]||o[0],h,e.origin).then(()=>a(t,!1))}}const p=[];var N={mixins:[P,y,$],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(t=>t.hide())).then(this.show),e.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;s.width(window)>e.clientWidth&&this.overlay&&s.css(document.body,"overflowY","scroll"),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+p.length),s.addClass(e,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,t=>{let{target:n}=t;s.last(p)!==this||this.overlay&&!s.within(n,this.$el)||s.within(n,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",o=>{let{defaultPrevented:h,type:a,target:i}=o;!h&&a===s.pointerUp&&n===i&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",t=>{t.keyCode===27&&s.last(p)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(p,this)&&p.splice(p.indexOf(this),1),p.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),p.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,C(this))},hide(){return this.toggleElement(this.$el,!1,C(this))}}};function C(e){let{transitionElement:t,_toggle:n}=e;return(o,h)=>new Promise((a,i)=>s.once(o,"show hide",()=>{o._reject&&o._reject(),o._reject=i,n(o,h);const r=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{r(),a()},s.toMs(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function D(e,t,n,o){let{animation:h,easing:a}=o;const{percent:i,translate:r,show:l=s.noop}=h,d=l(n),m=new s.Deferred;return{dir:n,show(c,g,V){g===void 0&&(g=0);const x=V?"linear":a;return c-=Math.round(c*s.clamp(g,-1,1)),this.translate(g),b(t,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([s.Transition.start(t,d[1],c,x),s.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const c in d[0])s.css([t,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(c,g,!0)},translate(c){this.reset();const g=r(c,n);s.css(t,g[1]),s.css(e,g[0]),b(t,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var B={computed:{resizeTargets(){return this.$el}},connected(){this.registerObserver(s.observeResize(this.resizeTargets,()=>this.$emit("resize")))}},z={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},M={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const o=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&O(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,h=Math.abs(t),a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;for(;a!==o&&h>i;)this.drag-=i*this.dir,o=a,h-=i,a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;this.percent=h/i;const r=n[o],l=n[a],d=this.index!==a,m=o===a;let c;[this.index,this.prevIndex].filter(g=>!s.includes([a,o],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||c)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=o,this.index=a,!m&&s.trigger(r,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&l),d&&(!m&&s.trigger(r,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.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{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function O(e){return!e.children.length&&e.childNodes.length}var j={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},L={mixins:[z,M,j,B],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return W(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,o=t?0:n.length,h=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],r=this.getIndex(e,this.index),l=this.slides[r];if(i===l){h();return}if(this.dir=H(e,a),this.prevIndex=a,this.index=r,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}const d=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(t!==n?t:!1,n);return o.translate(e),o},_getTransitioner(e,t,n,o){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),o)}}};function H(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function W(e){return .5*e+300}var R={mixins:[L],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:f,Transitioner:D},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},q={mixins:[y,N,$,R],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:o,alt:h="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let r;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,u("img",{src:n,width:d,height:m,alt:h,...i}))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(d,"loadedmetadata",()=>{s.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(t,d)}),s.on(d,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,u("iframe",{src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080,...l,...i}));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,u("iframe",{src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:d,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}var T={install:F,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(e,t){let{toggle:n}=e;return s.$$(n,t)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const t=s.uniqueBy(this.toggles.map(A),"source");if(s.isElement(e)){const{source:n}=A(e);e=s.findIndex(t,o=>{let{source:h}=o;return n===h})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:t}),s.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){var e;return(e=this.panel)==null?void 0:e.hide()}}};function F(e,t){e.lightboxPanel||e.component("lightboxPanel",q),s.assign(t.props,e.component("lightboxPanel").options.props)}function A(e){const t={};for(const n of["href","caption","type","poster","alt","attrs"])t[n==="href"?"source":n]=s.data(e,n);return t.attrs=s.parseOptions(t.attrs),t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],o):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=o(t.UIkit.util))})(this,function(t){"use strict";var o={props:{container:Boolean},data:{container:!0},computed:{container(s){let{container:e}=s;return e===!0&&this.$container||e&&t.$(e)}}},r={mixins:[o],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:c,computed:{marginProp(s){let{pos:e}=s;return"margin"+(t.startsWith(e,"top")?"Top":"Bottom")},startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const s=t.$("."+this.clsContainer+"-"+this.pos,this.container)||t.append(this.container,'<div class="'+this.clsContainer+" "+this.clsContainer+"-"+this.pos+'" style="display: block"></div>');this.$mount(t.append(s,'<div class="'+this.clsMsg+(this.status?" "+this.clsMsg+"-"+this.status:"")+'"> <a href class="'+this.clsClose+'" data-uk-close></a> <div>'+this.message+"</div> </div>"))},async connected(){const s=t.toFloat(t.css(this.$el,this.marginProp));await t.Transition.start(t.css(this.$el,this.startProps),{opacity:1,[this.marginProp]:s}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(s){t.closest(s.target,'a[href="#"],a[href=""]')&&s.preventDefault(),this.close()},[t.pointerEnter](){this.timer&&clearTimeout(this.timer)},[t.pointerLeave](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(s){const e=i=>{const n=t.parent(i);t.trigger(i,"close",[this]),t.remove(i),n!=null&&n.hasChildNodes()||t.remove(n)};this.timer&&clearTimeout(this.timer),s||await t.Transition.start(this.$el,this.startProps),e(this.$el)}}};function c(s){s.notification.closeAll=function(e,i){t.apply(document.body,n=>{const a=s.getComponent(n,"notification");a&&(!e||e===a.group)&&a.close(i)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | 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')) :
|
|
@@ -6,6 +6,48 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitParallax = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
+
var Resize = {
|
|
10
|
+
computed: {
|
|
11
|
+
resizeTargets() {
|
|
12
|
+
return this.$el;
|
|
13
|
+
} },
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
connected() {
|
|
17
|
+
this.registerObserver(uikitUtil.observeResize(this.resizeTargets, () => this.$emit('resize')));
|
|
18
|
+
} };
|
|
19
|
+
|
|
20
|
+
var Scroll = {
|
|
21
|
+
connected() {
|
|
22
|
+
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
disconnected() {
|
|
26
|
+
unregisterScrollListener(this._uid);
|
|
27
|
+
} };
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
const scrollListeners = new Map();
|
|
31
|
+
let unbindScrollListener;
|
|
32
|
+
function registerScrollListener(id, listener) {
|
|
33
|
+
unbindScrollListener =
|
|
34
|
+
unbindScrollListener ||
|
|
35
|
+
uikitUtil.on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
36
|
+
passive: true,
|
|
37
|
+
capture: true });
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
scrollListeners.set(id, listener);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function unregisterScrollListener(id) {
|
|
44
|
+
scrollListeners.delete(id);
|
|
45
|
+
if (unbindScrollListener && !scrollListeners.size) {
|
|
46
|
+
unbindScrollListener();
|
|
47
|
+
unbindScrollListener = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
9
51
|
var Media = {
|
|
10
52
|
props: {
|
|
11
53
|
media: Boolean },
|
|
@@ -16,16 +58,31 @@
|
|
|
16
58
|
|
|
17
59
|
|
|
18
60
|
computed: {
|
|
19
|
-
matchMedia() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
61
|
+
matchMedia() {var _this$mediaObj;
|
|
62
|
+
return (_this$mediaObj = this.mediaObj) == null ? void 0 : _this$mediaObj.matches;
|
|
63
|
+
} },
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
connected() {
|
|
67
|
+
const media = toMedia(this.media);
|
|
68
|
+
this.mediaObj = window.matchMedia(media);
|
|
69
|
+
const handler = () =>
|
|
70
|
+
uikitUtil.trigger(this.$el, uikitUtil.createEvent('mediachange', false, true, [this.mediaObj]));
|
|
71
|
+
this.offMediaObj = uikitUtil.on(this.mediaObj, 'change', () => {
|
|
72
|
+
handler();
|
|
73
|
+
this.$emit('resize');
|
|
74
|
+
});
|
|
75
|
+
handler();
|
|
76
|
+
},
|
|
23
77
|
|
|
78
|
+
disconnected() {var _this$offMediaObj;
|
|
79
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
80
|
+
} };
|
|
24
81
|
|
|
25
82
|
|
|
26
83
|
function toMedia(value) {
|
|
27
84
|
if (uikitUtil.isString(value)) {
|
|
28
|
-
if (value
|
|
85
|
+
if (uikitUtil.startsWith(value, '@')) {
|
|
29
86
|
const name = "breakpoint-" + value.substr(1);
|
|
30
87
|
value = uikitUtil.toFloat(uikitUtil.getCssVar(name));
|
|
31
88
|
} else if (isNaN(value)) {
|
|
@@ -33,7 +90,7 @@
|
|
|
33
90
|
}
|
|
34
91
|
}
|
|
35
92
|
|
|
36
|
-
return value &&
|
|
93
|
+
return value && uikitUtil.isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
37
94
|
}
|
|
38
95
|
|
|
39
96
|
uikitUtil.memoize(async (src) => {
|
|
@@ -401,7 +458,7 @@
|
|
|
401
458
|
}
|
|
402
459
|
|
|
403
460
|
var Component = {
|
|
404
|
-
mixins: [Parallax],
|
|
461
|
+
mixins: [Parallax, Resize, Scroll],
|
|
405
462
|
|
|
406
463
|
props: {
|
|
407
464
|
target: String,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.12.
|
|
1
|
+
/*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={computed:{resizeTargets(){return this.$el}},connected(){this.registerObserver(r.observeResize(this.resizeTargets,()=>this.$emit("resize")))}},B={connected(){V(this._uid,()=>this.$emit("scroll"))},disconnected(){q(this._uid)}};const y=new Map;let b;function V(e,t){b=b||r.on(window,"scroll",()=>y.forEach(n=>n()),{passive:!0,capture:!0}),y.set(e,t)}function q(e){y.delete(e),b&&!y.size&&(b(),b=null)}var H={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){var e;return(e=this.mediaObj)==null?void 0:e.matches}},connected(){const e=p(this.media);this.mediaObj=window.matchMedia(e);const t=()=>r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]));this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function p(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function A(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const F={x:M,y:M,rotate:M,scale:M,color:S,backgroundColor:S,borderColor:S,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:K,stroke:Q,bgx:C,bgy:C},{keys:P}=Object;var G={mixins:[H],props:N(P(F),"list"),data:N(P(F),void 0),computed:{props(e,t){return P(F).reduce((n,s)=>(r.isUndefined(e[s])||(n[s]=F[s](s,t,e[s].slice())),n),{})}},events:{load(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(e,t)=>r.css(this.$el,t,""))},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function M(e,t,n){const s=I(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";let o;return(e==="x"||e==="y")&&(e="translate"+r.ucfirst(e),o=a=>r.toFloat(r.toFloat(a).toFixed(s==="px"?0:6))),n.length===1&&n.unshift(e==="scale"?1:0),n=g(n,o),(a,c)=>{a.transform+=" "+e+"("+x(n,c)+s+")"}}function S(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n,s=>J(t,s)),(s,o)=>{const[a,c,i]=L(n,o),u=a.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");s[e]="rgba("+u+")"}}function J(e,t){return v(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const s=I(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=g(n),(o,a)=>{const c=x(n,a);o.filter+=" "+e+"("+(c+s)+")"}}function K(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n),(s,o)=>{s[e]=x(n,o)}}function Q(e,t,n){n.length===1&&n.unshift(0);const s=I(n),o=A(t);return n=g(n.reverse(),a=>(a=r.toFloat(a),s==="%"?a*o/100:a)),n.some(a=>{let[c]=a;return c})?(r.css(t,"strokeDasharray",o),(a,c)=>{a.strokeDashoffset=x(n,c)}):r.noop}function C(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const s=e==="y"?"height":"width";n=g(n,a=>r.toPx(a,s,t));const o=v(t,"background-position-"+e,"");return v(t,"backgroundSize","")==="cover"?X(e,t,n,o,s):D(e,n,o)}function X(e,t,n,s,o){const a=Y(t);if(!a.width)return r.noop;const c=n.map(h=>{let[z]=h;return z}),i=Math.min(...c),u=Math.max(...c),d=c.indexOf(i)<c.indexOf(u),f=u-i;let R=(d?-f:0)-(d?i:u);const w={width:t.offsetWidth,height:t.offsetHeight},W=r.Dimensions.cover(a,w),j=W[o]-w[o];if(j<f)w[o]=W[o]+f-j;else if(j>f){const h=w[o]/r.toPx(s,o,t,!0);h&&(R-=(j-f)/h)}const _=r.Dimensions.cover(a,w),U=D(e,n,R+"px");return(h,z)=>{U(h,z),h.backgroundSize=_.width+"px "+_.height+"px",h.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(s,o){s["background-position-"+e]="calc("+n+" + "+x(t,o)+"px)"}}const O={};function Y(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(O[t])return O[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{O[t]=$(n),r.trigger(e,"load")},$(n)):O[t]=$(n)}function $(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:s}=e;let o=0;for(let a=0;a<s;a++){let[c,i]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(c=t(c),i=i?r.toFloat(i)/100:null,a===0?i===null?i=0:i&&n.push([c,0]):a===s-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)o++;else if(o){const u=n[a-o-1][1],d=(i-u)/(o+1);for(let f=o;f>0;f--)n[a-f][1]=u+d*(o-f+1);o=0}}return n}function L(e,t){const n=r.findIndex(e.slice(1),s=>{let[,o]=s;return t<=o})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function x(e,t){const[n,s,o]=L(e,t);return r.isNumber(n)?n+Math.abs(n-s)*o*(n<s?1:-1):+s}const Z=/^-?\d+([^\s]*)/;function I(e,t){for(const n of e){const s=n.match==null?void 0:n.match(Z);if(s)return s[1]}return t}function v(e,t,n){const s=e.style[t],o=r.css(r.css(e,t,n),t);return e.style[t]=s,o}function N(e,t){return e.reduce((n,s)=>(n[s]=t,n),{})}var T={mixins:[G,m,B],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(e,t){let{target:n}=e;return E(n&&r.query(n,t)||t)},start(e){let{start:t}=e;return r.toPx(t,"height",this.target,!0)},end(e){let{end:t,viewport:n}=e;return r.toPx(t||(n=(1-n)*100)&&n+"vh+"+n+"%","height",this.target,!0)}},update:{read(e,t){let{percent:n}=e;if(t.has("scroll")||(n=!1),!this.matchMedia)return;const s=n;return n=k(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:s===n?!1:this.getCss(n)}},write(e){let{style:t}=e;if(!this.matchMedia){this.reset();return}t&&r.css(this.$el,t)},events:["scroll","resize"]}};function k(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,-t+1)}function E(e){return e?"offsetTop"in e?e:E(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",T),T});
|