uikit 3.17.1 → 3.17.2-dev.a0d91caa0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +44 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +50 -26
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +51 -29
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -4
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +43 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +46 -14
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +46 -14
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +45 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +3 -7
- 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 +37 -83
- 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 +100 -168
- package/dist/js/uikit.min.js +1 -1
- package/package.json +4 -4
- package/src/js/api/observables.js +2 -1
- package/src/js/components/filter.js +2 -6
- package/src/js/components/lightbox-panel.js +1 -3
- package/src/js/components/lightbox.js +1 -3
- package/src/js/components/notification.js +1 -4
- package/src/js/components/parallax.js +1 -3
- package/src/js/components/sortable.js +3 -5
- package/src/js/core/accordion.js +1 -3
- package/src/js/core/cover.js +6 -6
- package/src/js/core/dropnav.js +1 -3
- package/src/js/core/form-custom.js +1 -3
- package/src/js/core/height-match.js +3 -4
- package/src/js/core/leader.js +1 -3
- package/src/js/core/navbar.js +4 -9
- package/src/js/core/offcanvas.js +7 -15
- package/src/js/core/overflow-auto.js +2 -6
- package/src/js/core/scrollspy-nav.js +2 -4
- package/src/js/core/scrollspy.js +1 -3
- package/src/js/core/sticky.js +1 -3
- package/src/js/core/switcher.js +4 -8
- package/src/js/core/toggle.js +1 -1
- package/src/js/mixin/modal.js +1 -3
- package/src/js/mixin/slider-nav.js +2 -6
- package/src/js/mixin/slider.js +2 -6
- package/src/js/mixin/togglable.js +3 -6
- package/src/js/util/viewport.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitCountdown=s(t.UIkit.util))})(this,function(t){"use strict";var s={connected(){t.addClass(this.$el,this.$options.id)}};const d=["days","hours","minutes","seconds"];var r={mixins:[s],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".uk-countdown-%unit%",role:"timer"},connected(){t.attr(this.$el,"role",this.role),this.date=t.toFloat(Date.parse(this.$props.date)),this.end=!1,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||(t.trigger(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),t.trigger(this.$el,"countdownstop"),this.timer=null)},update(){const o=a(this.date);o.total||(this.stop(),this.end||(t.trigger(this.$el,"countdownend"),this.end=!0));for(const n of d){const i=t.$(this.clsWrapper.replace("%unit%",n),this.$el);if(!i)continue;let e=String(Math.trunc(o[n]));e=e.length<2?`0${e}`:e,i.textContent!==e&&(e=e.split(""),e.length!==i.children.length&&t.html(i,e.map(()=>"<span></span>").join("")),e.forEach((h,u)=>i.children[u].textContent=h))}}}};function a(o){const n=Math.max(0,o-Date.now())/1e3;return{total:n,seconds:n%60,minutes:n/60%60,hours:n/60/60%24,days:n/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -20,6 +20,46 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function callUpdate(instance, e = "update") {
|
|
24
|
+
if (!instance._connected) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (!instance._updates.length) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (!instance._queued) {
|
|
31
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
32
|
+
uikitUtil.fastdom.read(() => {
|
|
33
|
+
if (instance._connected) {
|
|
34
|
+
runUpdates(instance, instance._queued);
|
|
35
|
+
}
|
|
36
|
+
delete instance._queued;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
instance._queued.add(e.type || e);
|
|
40
|
+
}
|
|
41
|
+
function runUpdates(instance, types) {
|
|
42
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
43
|
+
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
let result;
|
|
47
|
+
if (read) {
|
|
48
|
+
result = read.call(instance, instance._data, types);
|
|
49
|
+
if (result && uikitUtil.isPlainObject(result)) {
|
|
50
|
+
uikitUtil.assign(instance._data, result);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (write && result !== false) {
|
|
54
|
+
uikitUtil.fastdom.write(() => {
|
|
55
|
+
if (instance._connected) {
|
|
56
|
+
write.call(instance, instance._data, types);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
23
63
|
function resize(options) {
|
|
24
64
|
return observe(uikitUtil.observeResize, options, "resize");
|
|
25
65
|
}
|
|
@@ -30,7 +70,7 @@
|
|
|
30
70
|
return {
|
|
31
71
|
observe: observe2,
|
|
32
72
|
handler() {
|
|
33
|
-
this
|
|
73
|
+
callUpdate(this, emit);
|
|
34
74
|
},
|
|
35
75
|
...options
|
|
36
76
|
};
|
|
@@ -345,12 +385,8 @@
|
|
|
345
385
|
duration: 250
|
|
346
386
|
},
|
|
347
387
|
computed: {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
children({ target }, $el) {
|
|
352
|
-
return uikitUtil.$$(`${target} > *`, $el);
|
|
353
|
-
}
|
|
388
|
+
children: ({ target }, $el) => uikitUtil.$$(`${target} > *`, $el),
|
|
389
|
+
toggles: ({ attrItem }, $el) => uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el)
|
|
354
390
|
},
|
|
355
391
|
watch: {
|
|
356
392
|
toggles(toggles) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitFilter=u(s.UIkit.util))})(this,function(s){"use strict";function u(e,n=[]){try{return e?s.startsWith(e,"{")?JSON.parse(e):n.length&&!s.includes(e,":")?{[n[0]]:e}:e.split(";").reduce((o,t)=>{const[a,r]=t.split(/:(.*)/);return a&&!s.isUndefined(r)&&(o[a.trim()]=r.trim()),o},{}):{}}catch{return{}}}function A(e,n="update"){e._connected&&e._updates.length&&(e._queued||(e._queued=new Set,s.fastdom.read(()=>{e._connected&&O(e,e._queued),delete e._queued})),e._queued.add(n.type||n))}function O(e,n){for(const{read:o,write:t,events:a=[]}of e._updates){if(!n.has("update")&&!a.some(c=>n.has(c)))continue;let r;o&&(r=o.call(e,e._data,n),r&&s.isPlainObject(r)&&s.assign(e._data,r)),t&&r!==!1&&s.fastdom.write(()=>{e._connected&&t.call(e,e._data,n)})}}function z(e){return v(s.observeResize,e,"resize")}function N(e){return v(s.observeMutation,e)}function v(e,n,o){return{observe:e,handler(){A(this,o)},...n}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),z({target:({$el:e})=>[e,...s.children(e)]});function P(e){const n=[[]],o=e.some((t,a)=>a&&e[a-1].offsetParent!==t.offsetParent);for(const t of e){if(!s.isVisible(t))continue;const a=g(t,o);for(let r=n.length-1;r>=0;r--){const c=n[r];if(!c[0]){c.push(t);break}const d=g(c[0],o);if(a.top>=d.bottom-1&&a.top!==d.top){n.push([t]);break}if(a.bottom-1>d.top||a.top===d.top){let h=c.length-1;for(;h>=0;h--){const m=g(c[h],o);if(a.left>=m.left)break}c.splice(h+1,0,t);break}if(r===0){n.unshift([t]);break}}}return n}function g(e,n=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:a,offsetWidth:r}=e;return n&&([o,t]=s.offsetPosition(e)),{top:o,left:t,bottom:o+a,right:t+r}}const w="uk-transition-leave",b="uk-transition-enter";function T(e,n,o,t=0){const a=y(n,!0),r={opacity:1},c={opacity:0},d=l=>()=>a===y(n)?l():Promise.reject(),h=d(async()=>{s.addClass(n,w),await Promise.all(S(n).map((l,i)=>new Promise(f=>setTimeout(()=>s.Transition.start(l,c,o/2,"ease").then(f),i*t)))),s.removeClass(n,w)}),m=d(async()=>{const l=s.height(n);s.addClass(n,b),e(),s.css(s.children(n),{opacity:0}),await B();const i=s.children(n),f=s.height(n);s.css(n,"alignContent","flex-start"),s.height(n,l);const p=S(n);s.css(i,c);const x=p.map(async(X,Y)=>{await H(Y*t),await s.Transition.start(X,r,o/2,"ease")});l!==f&&x.push(s.Transition.start(n,{height:f},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{s.removeClass(n,b),a===y(n)&&(s.css(n,{height:"",alignContent:""}),s.css(i,{opacity:""}),delete n.dataset.transition)})});return s.hasClass(n,w)?C(n).then(m):s.hasClass(n,b)?C(n).then(h).then(m):h().then(m)}function y(e,n){return n&&(e.dataset.transition=1+y(e)),s.toNumber(e.dataset.transition)||0}function C(e){return Promise.all(s.children(e).filter(s.Transition.inProgress).map(n=>new Promise(o=>s.once(n,"transitionend transitioncanceled",o))))}function S(e){return P(s.children(e)).flat().filter(s.isInView)}function B(){return new Promise(e=>requestAnimationFrame(e))}function H(e){return new Promise(n=>setTimeout(n,e))}async function L(e,n,o){await F();let t=s.children(n);const a=t.map(f=>$(f,!0)),r={...s.css(n,["height","padding"]),display:"block"};await Promise.all(t.concat(n).map(s.Transition.cancel)),e(),t=t.concat(s.children(n).filter(f=>!s.includes(t,f))),await Promise.resolve(),s.fastdom.flush();const c=s.attr(n,"style"),d=s.css(n,["height","padding"]),[h,m]=V(n,t,a),l=t.map(f=>({style:s.attr(f,"style")}));t.forEach((f,p)=>m[p]&&s.css(f,m[p])),s.css(n,r),s.trigger(n,"scroll"),s.fastdom.flush(),await F();const i=t.map((f,p)=>s.parent(f)===n&&s.Transition.start(f,h[p],o,"ease")).concat(s.Transition.start(n,d,o,"ease"));try{await Promise.all(i),t.forEach((f,p)=>{s.attr(f,l[p]),s.parent(f)===n&&s.css(f,"display",h[p].opacity===0?"none":"")}),s.attr(n,"style",c)}catch{s.attr(t,"style",""),j(n,r)}}function $(e,n){const o=s.css(e,"zIndex");return s.isVisible(e)?{display:"",opacity:n?s.css(e,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?s.index(e):o,...I(e)}:!1}function V(e,n,o){const t=n.map((r,c)=>s.parent(r)&&c in o?o[c]?s.isVisible(r)?I(r):{opacity:0}:{opacity:s.isVisible(r)?1:0}:!1),a=t.map((r,c)=>{const d=s.parent(n[c])===e&&(o[c]||$(n[c]));if(!d)return!1;if(!r)delete d.opacity;else if(!("opacity"in r)){const{opacity:h}=d;h%1?r.opacity=1:delete d.opacity}return d});return[t,a]}function j(e,n){for(const o in n)s.css(e,o,"")}function I(e){const{height:n,width:o}=s.offset(e);return{height:n,width:o,transform:"",...s.position(e),...s.css(e,["marginTop","marginLeft"])}}function F(){return new Promise(e=>requestAnimationFrame(e))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(e,n=this.$el){const o=this.animation;return(o==="fade"?T:o==="delayed-fade"?(...a)=>T(...a,40):o?L:()=>(e(),Promise.resolve()))(e,n,this.duration).catch(s.noop)}}};const R={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var E={mixins:[M],args:"target",props:{target:String,selActive:Boolean},data:{target:"",selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{children:({target:e},n)=>s.$$(`${e} > *`,n),toggles:({attrItem:e},n)=>s.$$(`[${e}],[data-${e}]`,n)},watch:{toggles(e){this.updateState();const n=s.$$(this.selActive,this.$el);for(const o of e){this.selActive!==!1&&s.toggleClass(o,this.cls,s.includes(n,o));const t=Q(o);s.isTag(t,"a")&&s.attr(t,"role","button")}},children(e,n){n&&this.updateState()}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(e){e.type==="keydown"&&e.keyCode!==R.SPACE||s.closest(e.target,"a,button")&&(e.preventDefault(),this.apply(e.current))}},methods:{apply(e){const n=this.getState(),o=q(e,this.attrItem,this.getState());W(n,o)||this.setState(o)},getState(){return this.toggles.filter(e=>s.hasClass(e,this.cls)).reduce((e,n)=>q(n,this.attrItem,e),{filter:{"":""},sort:[]})},async setState(e,n=!0){e={filter:{"":""},sort:[],...e},s.trigger(this.$el,"beforeFilter",[this,e]);for(const o of this.toggles)s.toggleClass(o,this.cls,G(o,this.attrItem,e));await Promise.all(s.$$(this.target,this.$el).map(o=>{const t=()=>{D(e,o,s.children(o)),this.$update(this.$el)};return n?this.animate(t,o):t()})),s.trigger(this.$el,"afterFilter",[this])},updateState(){s.fastdom.write(()=>this.setState(this.getState(),!1))}}};function _(e,n){return u(s.data(e,n),["filter"])}function W(e,n){return["filter","sort"].every(o=>s.isEqual(e[o],n[o]))}function D(e,n,o){const t=J(e);o.forEach(c=>s.css(c,"display",t&&!s.matches(c,t)?"none":""));const[a,r]=e.sort;if(a){const c=K(o,a,r);s.isEqual(c,o)||s.append(n,c)}}function q(e,n,o){const{filter:t,group:a,sort:r,order:c="asc"}=_(e,n);return(t||s.isUndefined(r))&&(a?t?(delete o.filter[""],o.filter[a]=t):(delete o.filter[a],(s.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),s.isUndefined(r)||(o.sort=[r,c]),o}function G(e,n,{filter:o={"":""},sort:[t,a]}){const{filter:r="",group:c="",sort:d,order:h="asc"}=_(e,n);return s.isUndefined(d)?c in o&&r===o[c]||!r&&c&&!(c in o)&&!o[""]:t===d&&a===h}function J({filter:e}){let n="";return s.each(e,o=>n+=o||""),n}function K(e,n,o){return[...e].sort((t,a)=>s.data(t,n).localeCompare(s.data(a,n),void 0,{numeric:!0})*(o==="asc"||-1))}function Q(e){return s.$("a,button",e)||e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",E),E});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -79,12 +79,8 @@
|
|
|
79
79
|
clsLeave: "uk-togglabe-leave"
|
|
80
80
|
},
|
|
81
81
|
computed: {
|
|
82
|
-
hasAnimation({ animation })
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
hasTransition({ animation }) {
|
|
86
|
-
return ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition));
|
|
87
|
-
}
|
|
82
|
+
hasAnimation: ({ animation }) => !!animation[0],
|
|
83
|
+
hasTransition: ({ animation }) => ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition))
|
|
88
84
|
},
|
|
89
85
|
methods: {
|
|
90
86
|
async toggleElement(targets, toggle, animate) {
|
|
@@ -262,9 +258,7 @@
|
|
|
262
258
|
role: "dialog"
|
|
263
259
|
},
|
|
264
260
|
computed: {
|
|
265
|
-
panel({ selPanel }, $el)
|
|
266
|
-
return util.$(selPanel, $el);
|
|
267
|
-
},
|
|
261
|
+
panel: ({ selPanel }, $el) => util.$(selPanel, $el),
|
|
268
262
|
transitionElement() {
|
|
269
263
|
return this.panel;
|
|
270
264
|
},
|
|
@@ -539,6 +533,46 @@
|
|
|
539
533
|
util.trigger(el, util.createEvent(type, false, false, data));
|
|
540
534
|
}
|
|
541
535
|
|
|
536
|
+
function callUpdate(instance, e = "update") {
|
|
537
|
+
if (!instance._connected) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
if (!instance._updates.length) {
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
if (!instance._queued) {
|
|
544
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
545
|
+
util.fastdom.read(() => {
|
|
546
|
+
if (instance._connected) {
|
|
547
|
+
runUpdates(instance, instance._queued);
|
|
548
|
+
}
|
|
549
|
+
delete instance._queued;
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
instance._queued.add(e.type || e);
|
|
553
|
+
}
|
|
554
|
+
function runUpdates(instance, types) {
|
|
555
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
556
|
+
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
let result;
|
|
560
|
+
if (read) {
|
|
561
|
+
result = read.call(instance, instance._data, types);
|
|
562
|
+
if (result && util.isPlainObject(result)) {
|
|
563
|
+
util.assign(instance._data, result);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
if (write && result !== false) {
|
|
567
|
+
util.fastdom.write(() => {
|
|
568
|
+
if (instance._connected) {
|
|
569
|
+
write.call(instance, instance._data, types);
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
542
576
|
function resize(options) {
|
|
543
577
|
return observe(util.observeResize, options, "resize");
|
|
544
578
|
}
|
|
@@ -546,7 +580,7 @@
|
|
|
546
580
|
return {
|
|
547
581
|
observe: observe2,
|
|
548
582
|
handler() {
|
|
549
|
-
this
|
|
583
|
+
callUpdate(this, emit);
|
|
550
584
|
},
|
|
551
585
|
...options
|
|
552
586
|
};
|
|
@@ -816,15 +850,11 @@
|
|
|
816
850
|
role: "region"
|
|
817
851
|
},
|
|
818
852
|
computed: {
|
|
819
|
-
nav({ selNav }, $el)
|
|
820
|
-
return util.$(selNav, $el);
|
|
821
|
-
},
|
|
853
|
+
nav: ({ selNav }, $el) => util.$(selNav, $el),
|
|
822
854
|
navChildren() {
|
|
823
855
|
return util.children(this.nav);
|
|
824
856
|
},
|
|
825
|
-
selNavItem({ attrItem }) {
|
|
826
|
-
return `[${attrItem}],[data-${attrItem}]`;
|
|
827
|
-
},
|
|
857
|
+
selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
|
|
828
858
|
navItems(_, $el) {
|
|
829
859
|
return util.$$(this.selNavItem, $el);
|
|
830
860
|
}
|
|
@@ -1004,12 +1034,8 @@
|
|
|
1004
1034
|
util.removeClass(this.slides, this.clsActive);
|
|
1005
1035
|
},
|
|
1006
1036
|
computed: {
|
|
1007
|
-
duration({ velocity }, $el)
|
|
1008
|
-
|
|
1009
|
-
},
|
|
1010
|
-
list({ selList }, $el) {
|
|
1011
|
-
return util.$(selList, $el);
|
|
1012
|
-
},
|
|
1037
|
+
duration: ({ velocity }, $el) => speedUp($el.offsetWidth / velocity),
|
|
1038
|
+
list: ({ selList }, $el) => util.$(selList, $el),
|
|
1013
1039
|
maxIndex() {
|
|
1014
1040
|
return this.length - 1;
|
|
1015
1041
|
},
|
|
@@ -1224,9 +1250,7 @@
|
|
|
1224
1250
|
this.$mount(util.append(this.container, $el));
|
|
1225
1251
|
},
|
|
1226
1252
|
computed: {
|
|
1227
|
-
caption({ selCaption }, $el)
|
|
1228
|
-
return util.$(selCaption, $el);
|
|
1229
|
-
}
|
|
1253
|
+
caption: ({ selCaption }, $el) => util.$(selCaption, $el)
|
|
1230
1254
|
},
|
|
1231
1255
|
events: [
|
|
1232
1256
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.1 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],w):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitLightbox_panel=w(e.UIkit.util))})(this,function(e){"use strict";var w={connected(){e.addClass(this.$el,this.$options.id)}},W={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&e.$(t)}}};let E;function q(t){const s=e.on(t,"touchmove",n=>{if(n.targetTouches.length!==1||e.matches(n.target,'input[type="range"'))return;let{scrollHeight:a,clientHeight:r}=e.scrollParent(n.target);r>=a&&n.cancelable&&n.preventDefault()},{passive:!1});if(E)return s;E=!0;const{scrollingElement:i}=document;return e.css(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:e.width(window)-i.clientWidth||""}),()=>{E=!1,s(),e.css(i,{overflowY:"",touchAction:"",paddingRight:""})}}var V={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(s=>e.startsWith(t[0],s))}},methods:{async toggleElement(t,s,i){try{return await Promise.all(e.toNodes(t).map(n=>{const a=e.isBoolean(s)?s:!this.isToggled(n);if(!e.trigger(n,`before${a?"show":"hide"}`,[this]))return Promise.reject();const r=(e.isFunction(i)?i:i===!1||!this.hasAnimation?G:this.hasTransition?X:Y)(n,a,this),h=a?this.clsEnter:this.clsLeave;e.addClass(n,h),e.trigger(n,a?"show":"hide",[this]);const o=()=>{e.removeClass(n,h),e.trigger(n,a?"shown":"hidden",[this])};return r?r.then(o,()=>(e.removeClass(n,h),Promise.reject())):o()})),!0}catch{return!1}},isToggled(t=this.$el){return t=e.toNode(t),e.hasClass(t,this.clsEnter)?!0:e.hasClass(t,this.clsLeave)?!1:this.cls?e.hasClass(t,this.cls.split(" ")[0]):e.isVisible(t)},_toggle(t,s){if(!t)return;s=!!s;let i;this.cls?(i=e.includes(this.cls," ")||s!==e.hasClass(t,this.cls),i&&e.toggleClass(t,this.cls,e.includes(this.cls," ")?void 0:s)):(i=s===t.hidden,i&&(t.hidden=!s)),e.$$("[autofocus]",t).some(n=>e.isVisible(n)?n.focus()||!0:n.blur()),i&&e.trigger(t,"toggled",[s,this])}}};function G(t,s,{_toggle:i}){return e.Animation.cancel(t),e.Transition.cancel(t),i(t,s)}async function X(t,s,{animation:i,duration:n,velocity:a,transition:r,_toggle:h}){var o;const[l="reveal",d="top"]=((o=i[0])==null?void 0:o.split("-"))||[],c=[["left","right"],["top","bottom"]],p=c[e.includes(c[0],d)?0:1],g=p[1]===d,v=["width","height"][c.indexOf(p)],b=`margin-${p[0]}`,A=`margin-${d}`;let k=e.dimensions(t)[v];const gt=e.Transition.inProgress(t);await e.Transition.cancel(t),s&&h(t,!0);const ut=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",b,A].map(U=>[U,t.style[U]])),I=e.dimensions(t),D=e.toFloat(e.css(t,b)),j=e.toFloat(e.css(t,A)),u=I[v]+j;!gt&&!s&&(k+=j);const[_]=e.wrapInner(t,"<div>");e.css(_,{boxSizing:"border-box",height:I.height,width:I.width,...e.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),e.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:I.width,height:I.height,overflow:"hidden",[v]:k});const z=k/u;n=(a*u+n)*(s?1-z:z);const R={[v]:s?u:0};g&&(e.css(t,b,u-k+D),R[b]=s?D:u+D),!g^l==="reveal"&&(e.css(_,b,-u+k),e.Transition.start(_,{[b]:s?0:-u},n,r));try{await e.Transition.start(t,R,n,r)}finally{e.css(t,ut),e.unwrap(_.firstChild),s||h(t,!1)}}function Y(t,s,i){const{animation:n,duration:a,_toggle:r}=i;return s?(r(t,!0),e.Animation.in(t,n[0],a,i.origin)):e.Animation.out(t,n[1]||n[0],a,i.origin).then(()=>r(t,!1))}const m=[];var J={mixins:[w,W,V],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},s){return e.$(t,s)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){e.attr(this.panel||this.$el,"role",this.role),this.overlay&&e.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){e.includes(m,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(t){const{current:s,defaultPrevented:i}=t,{hash:n}=s;!i&&n&&e.isSameSiteAnchor(s)&&!e.within(n,this.$el)&&e.$(n,document.body)?this.hide():e.matches(s,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===e.includes(m,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(e.includes(m,this))return!1;!this.stack&&m.length?(Promise.all(m.map(s=>s.hide())).then(this.show),t.preventDefault()):m.push(this)}},{name:"show",self:!0,handler(){this.stack&&e.css(this.$el,"zIndex",e.toFloat(e.css(this.$el,"zIndex"))+m.length);const t=[this.overlay&&Q(this),this.overlay&&q(this.$el),this.bgClose&&Z(this),this.escClose&&tt(this)];e.once(this.$el,"hidden",()=>t.forEach(s=>s&&s()),{self:!0}),e.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){e.isFocusable(this.$el)||e.attr(this.$el,"tabindex","-1"),e.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){e.includes(m,this)&&m.splice(m.indexOf(this),1),e.css(this.$el,"zIndex",""),m.some(t=>t.clsPage===this.clsPage)||e.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&e.parent(this.$el)!==this.container?(e.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,O)},hide(){return this.toggleElement(this.$el,!1,O)}}};function O(t,s,{transitionElement:i,_toggle:n}){return new Promise((a,r)=>e.once(t,"show hide",()=>{var h;(h=t._reject)==null||h.call(t),t._reject=r,n(t,s);const o=e.once(i,"transitionstart",()=>{e.once(i,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{o(),a()},K(e.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function K(t){return t?e.endsWith(t,"ms")?e.toFloat(t):e.toFloat(t)*1e3:0}function Q(t){return e.on(document,"focusin",s=>{e.last(m)===t&&!e.within(s.target,t.$el)&&t.$el.focus()})}function Z(t){return e.on(document,e.pointerDown,({target:s})=>{e.last(m)!==t||t.overlay&&!e.within(s,t.$el)||e.within(s,t.panel)||e.once(document,`${e.pointerUp} ${e.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:a})=>{!i&&n===e.pointerUp&&s===a&&t.hide()},!0)})}function tt(t){return e.on(document,"keydown",s=>{s.keyCode===27&&e.last(m)===t&&t.hide()})}var B={slide:{show(t){return[{transform:y(t*-100)},{transform:y()}]},percent(t){return et(t)},translate(t,s){return[{transform:y(s*-100*t)},{transform:y(s*100*(1-t))}]}}};function et(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)}function y(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function C(t){return`scale3d(${t}, ${t}, 1)`}function st(t,s,i,{animation:n,easing:a}){const{percent:r,translate:h,show:o=e.noop}=n,l=o(i);let d;return{dir:i,show(c,p=0,g){const $=g?"linear":a;return c-=Math.round(c*e.clamp(p,-1,1)),this.translate(p),T(s,"itemin",{percent:p,duration:c,timing:$,dir:i}),T(t,"itemout",{percent:1-p,duration:c,timing:$,dir:i}),new Promise(v=>{d||(d=v),Promise.all([e.Transition.start(s,l[1],c,$),e.Transition.start(t,l[0],c,$)]).then(()=>{this.reset(),d()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const c in l[0])e.css([s,t],c,"")},async forward(c,p=this.percent()){return await this.cancel(),this.show(c,p,!0)},translate(c){this.reset();const p=h(c,i);e.css(s,p[1]),e.css(t,p[0]),T(s,"itemtranslatein",{percent:c,dir:i}),T(t,"itemtranslateout",{percent:1-c,dir:i})},percent(){return r(t||s,s,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function T(t,s,i){e.trigger(t,e.createEvent(s,!1,!1,i))}function it(t){return nt(e.observeResize,t,"resize")}function nt(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var rt={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>s[r++]||""))||""}}},ot={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const P={passive:!1,capture:!0},L={passive:!0,capture:!0},at="touchstart mousedown",S="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var ht={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=i=>{const n=e.getEventPos(i).x*(e.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:at,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&dt(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:S,el(){return this.list},handler:e.noop,...P}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,S,this.move,P),e.on(document,M,this.end,L),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(s),r=this.getIndex(n+this.dir),h=this._getDistance(n,r);for(;r!==n&&a>h;)this.drag-=h*this.dir,n=r,a-=h,r=this.getIndex(n+this.dir),h=this._getDistance(n,r);this.percent=a/h;const o=i[n],l=i[r],d=this.index!==r,c=n===r;let p;for(const g of[this.index,this.prevIndex])e.includes([r,n],g)||(e.trigger(i[g],"itemhidden",[this]),c&&(p=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||p)&&e.trigger(i[this.index],"itemshown",[this]),d&&(this.prevIndex=n,this.index=r,!c&&e.trigger(o,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!c&&l),d&&(!c&&e.trigger(o,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,S,this.move,P),e.off(document,M,this.end,L),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function dt(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function N(t,s=t.$el,i=""){if(s.id)return s.id;let n=`${t.$options.id}-${t._uid}${i}`;return e.$(`#${n}`)&&(n=N(t,s,`${i}-2`)),n}const f={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var ct={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},s){return e.$(t,s)},navChildren(){return e.children(this.nav)},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;let a,r=null;if(e.isNumeric(i)){const h=e.toNumber(i),o=this.slides[h];o&&(o.id||(o.id=N(this,o,`-item-${i}`)),r=o.id),a=this.t("slideX",e.toFloat(i)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=N(this,this.list,"-items")),r=this.list.id),a=this.t(i);e.attr(n,{"aria-controls":r,"aria-label":e.attr(n,"aria-label")||a})}},slides(t){t.forEach((s,i)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let i=0;i<t;i++)e.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===f.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:i}=t,n=e.data(s,this.attrItem);if(!e.isNumeric(n))return;let a=i===f.HOME?0:i===f.END?"last":i===f.LEFT?"previous":i===f.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;if(e.isNumeric(i)){const r=e.toNumber(i)===t;e.toggleClass(s,this.clsActive,r),e.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&e.matches(e.parent(s),":focus-within")&&n.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},lt={mixins:[ot,ht,ct,rt],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:t},s){return mt(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:it(),methods:{show(t,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=s?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](t),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),o=e.hasClass(this.slides,this.clsActive)&&this.slides[h],l=this.getIndex(t,this.index),d=this.slides[l];if(o===d){r();return}if(this.dir=pt(t,h),this.prevIndex=h,this.index=l,o&&!e.trigger(o,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,o])){this.index=this.prevIndex,r();return}const c=this._show(o,d,s).then(()=>{o&&e.trigger(o,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&e.trigger(o,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,i){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:i?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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,i*(e.isRtl?-1:1),n)}}};function pt(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function mt(t){return .5*t+300}var ft={mixins:[lt],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:B,Transitioner:st},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},F={...B,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:C(1-.2)},{opacity:1,transform:C(1)}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:C(1-.2*t)},{opacity:t,transform:C(1-.2+.2*t)}]}}},H={mixins:[J,ft],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:F,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 t=e.$(this.template),s=e.$(this.selList,t);this.items.forEach(()=>e.append(s,"<li>"));const i=e.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(e.append(this.container,t))},computed:{caption({selCaption:t},s){return e.$(t,s)}},events:[{name:`${e.pointerMove} ${e.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),e.removeClass(this.slides,this.clsActive),e.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let s=-1;t===f.LEFT?s="previous":t===f.RIGHT?s="next":t===f.HOME?s=0:t===f.END&&(s="last"),~s&&this.show(s)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=F.scale,e.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){e.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,s){const{source:i,type:n,alt:a="",poster:r,attrs:h={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!i)return;let o;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const d=x("img",{src:i,alt:a,...h});e.on(d,"load",()=>this.setItem(s,d)),e.on(d,"error",()=>this.setError(s))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=x("video",{src:i,poster:r,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...h});e.on(d,"loadedmetadata",()=>this.setItem(s,d)),e.on(d,"error",()=>this.setError(s))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(s,x("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...h}));else if(o=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,x("iframe",{src:`https://www.youtube${o[1]||""}.com/embed/${o[2]}${o[3]?`?${o[3]}`:""}`,width:1920,height:1080,...l,...h}));else if(o=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:c}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(s,x("iframe",{src:`https://player.vimeo.com/video/${o[1]}${o[2]?`?${o[2]}`:""}`,width:c,height:d,...l,...h}))}catch{this.setError(s)}}}],methods:{loadItem(t=this.index){const s=this.getItem(t);this.getSlide(s).childElementCount||e.trigger(this.$el,"itemload",[s])},getItem(t=this.index){return this.items[e.getIndex(t,this.slides)]},setItem(t,s){e.trigger(this.$el,"itemloaded",[this,e.html(this.getSlide(t),s)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),e.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){e.removeClass(this.$el,"uk-active","uk-transition-active")}}};function x(t,s){const i=e.fragment(`<${t}>`);return e.attr(i,s),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",H),H});
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],w):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox_panel=w(t.UIkit.util))})(this,function(t){"use strict";var w={connected(){t.addClass(this.$el,this.$options.id)}},q={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return e===!0&&this.$container||e&&t.$(e)}}};let E;function W(e){const s=t.on(e,"touchmove",n=>{if(n.targetTouches.length!==1||t.matches(n.target,'input[type="range"'))return;let{scrollHeight:o,clientHeight:r}=t.scrollParent(n.target);r>=o&&n.cancelable&&n.preventDefault()},{passive:!1});if(E)return s;E=!0;const{scrollingElement:i}=document;return t.css(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:t.width(window)-i.clientWidth||""}),()=>{E=!1,s(),t.css(i,{overflowY:"",touchAction:"",paddingRight:""})}}var V={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation:({animation:e})=>!!e[0],hasTransition:({animation:e})=>["slide","reveal"].some(s=>t.startsWith(e[0],s))},methods:{async toggleElement(e,s,i){try{return await Promise.all(t.toNodes(e).map(n=>{const o=t.isBoolean(s)?s:!this.isToggled(n);if(!t.trigger(n,`before${o?"show":"hide"}`,[this]))return Promise.reject();const r=(t.isFunction(i)?i:i===!1||!this.hasAnimation?G:this.hasTransition?X:Y)(n,o,this),h=o?this.clsEnter:this.clsLeave;t.addClass(n,h),t.trigger(n,o?"show":"hide",[this]);const a=()=>{t.removeClass(n,h),t.trigger(n,o?"shown":"hidden",[this])};return r?r.then(a,()=>(t.removeClass(n,h),Promise.reject())):a()})),!0}catch{return!1}},isToggled(e=this.$el){return e=t.toNode(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=!!s;let i;this.cls?(i=t.includes(this.cls," ")||s!==t.hasClass(e,this.cls),i&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:s)):(i=s===e.hidden,i&&(e.hidden=!s)),t.$$("[autofocus]",e).some(n=>t.isVisible(n)?n.focus()||!0:n.blur()),i&&t.trigger(e,"toggled",[s,this])}}};function G(e,s,{_toggle:i}){return t.Animation.cancel(e),t.Transition.cancel(e),i(e,s)}async function X(e,s,{animation:i,duration:n,velocity:o,transition:r,_toggle:h}){var a;const[l="reveal",d="top"]=((a=i[0])==null?void 0:a.split("-"))||[],c=[["left","right"],["top","bottom"]],p=c[t.includes(c[0],d)?0:1],g=p[1]===d,v=["width","height"][c.indexOf(p)],b=`margin-${p[0]}`,T=`margin-${d}`;let k=t.dimensions(e)[v];const ve=t.Transition.inProgress(e);await t.Transition.cancel(e),s&&h(e,!0);const be=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",b,T].map(R=>[R,e.style[R]])),I=t.dimensions(e),D=t.toFloat(t.css(e,b)),H=t.toFloat(t.css(e,T)),u=I[v]+H;!ve&&!s&&(k+=H);const[A]=t.wrapInner(e,"<div>");t.css(A,{boxSizing:"border-box",height:I.height,width:I.width,...t.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",T])}),t.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[T]:0,width:I.width,height:I.height,overflow:"hidden",[v]:k});const U=k/u;n=(o*u+n)*(s?1-U:U);const z={[v]:s?u:0};g&&(t.css(e,b,u-k+D),z[b]=s?D:u+D),!g^l==="reveal"&&(t.css(A,b,-u+k),t.Transition.start(A,{[b]:s?0:-u},n,r));try{await t.Transition.start(e,z,n,r)}finally{t.css(e,be),t.unwrap(A.firstChild),s||h(e,!1)}}function Y(e,s,i){const{animation:n,duration:o,_toggle:r}=i;return s?(r(e,!0),t.Animation.in(e,n[0],o,i.origin)):t.Animation.out(e,n[1]||n[0],o,i.origin).then(()=>r(e,!1))}const f=[];var J={mixins:[w,q,V],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel:({selPanel:e},s)=>t.$(e,s),transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},connected(){t.attr(this.panel||this.$el,"role",this.role),this.overlay&&t.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){t.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:s,defaultPrevented:i}=e,{hash:n}=s;!i&&n&&t.isSameSiteAnchor(s)&&!t.within(n,this.$el)&&t.$(n,document.body)?this.hide():t.matches(s,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(t.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(s=>s.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+f.length);const e=[this.overlay&&Q(this),this.overlay&&W(this.$el),this.bgClose&&Z(this),this.escClose&&ee(this)];t.once(this.$el,"hidden",()=>e.forEach(s=>s&&s()),{self:!0}),t.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){t.includes(f,this)&&f.splice(f.indexOf(this),1),t.css(this.$el,"zIndex",""),f.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,O)},hide(){return this.toggleElement(this.$el,!1,O)}}};function O(e,s,{transitionElement:i,_toggle:n}){return new Promise((o,r)=>t.once(e,"show hide",()=>{var h;(h=e._reject)==null||h.call(e),e._reject=r,n(e,s);const a=t.once(i,"transitionstart",()=>{t.once(i,"transitionend transitioncancel",o,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{a(),o()},K(t.css(i,"transitionDuration")))})).then(()=>delete e._reject)}function K(e){return e?t.endsWith(e,"ms")?t.toFloat(e):t.toFloat(e)*1e3:0}function Q(e){return t.on(document,"focusin",s=>{t.last(f)===e&&!t.within(s.target,e.$el)&&e.$el.focus()})}function Z(e){return t.on(document,t.pointerDown,({target:s})=>{t.last(f)!==e||e.overlay&&!t.within(s,e.$el)||t.within(s,e.panel)||t.once(document,`${t.pointerUp} ${t.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:o})=>{!i&&n===t.pointerUp&&s===o&&e.hide()},!0)})}function ee(e){return t.on(document,"keydown",s=>{s.keyCode===27&&t.last(f)===e&&e.hide()})}var B={slide:{show(e){return[{transform:y(e*-100)},{transform:y()}]},percent(e){return te(e)},translate(e,s){return[{transform:y(s*-100*e)},{transform:y(s*100*(1-e))}]}}};function te(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)}function y(e=0,s="%"){return e+=e?s:"",`translate3d(${e}, 0, 0)`}function C(e){return`scale3d(${e}, ${e}, 1)`}function se(e,s,i,{animation:n,easing:o}){const{percent:r,translate:h,show:a=t.noop}=n,l=a(i);let d;return{dir:i,show(c,p=0,g){const $=g?"linear":o;return c-=Math.round(c*t.clamp(p,-1,1)),this.translate(p),_(s,"itemin",{percent:p,duration:c,timing:$,dir:i}),_(e,"itemout",{percent:1-p,duration:c,timing:$,dir:i}),new Promise(v=>{d||(d=v),Promise.all([t.Transition.start(s,l[1],c,$),t.Transition.start(e,l[0],c,$)]).then(()=>{this.reset(),d()},t.noop)})},cancel(){return t.Transition.cancel([s,e])},reset(){for(const c in l[0])t.css([s,e],c,"")},async forward(c,p=this.percent()){return await this.cancel(),this.show(c,p,!0)},translate(c){this.reset();const p=h(c,i);t.css(s,p[1]),t.css(e,p[0]),_(s,"itemtranslatein",{percent:c,dir:i}),_(e,"itemtranslateout",{percent:1-c,dir:i})},percent(){return r(e||s,s,i)},getDistance(){return e==null?void 0:e.offsetWidth}}}function _(e,s,i){t.trigger(e,t.createEvent(s,!1,!1,i))}function ie(e,s="update"){e._connected&&e._updates.length&&(e._queued||(e._queued=new Set,t.fastdom.read(()=>{e._connected&&ne(e,e._queued),delete e._queued})),e._queued.add(s.type||s))}function ne(e,s){for(const{read:i,write:n,events:o=[]}of e._updates){if(!s.has("update")&&!o.some(h=>s.has(h)))continue;let r;i&&(r=i.call(e,e._data,s),r&&t.isPlainObject(r)&&t.assign(e._data,r)),n&&r!==!1&&t.fastdom.write(()=>{e._connected&&n.call(e,e._data,s)})}}function re(e){return oe(t.observeResize,e,"resize")}function oe(e,s,i){return{observe:e,handler(){ie(this,i)},...s}}var ae={props:{i18n:Object},data:{i18n:null},methods:{t(e,...s){var i,n,o;let r=0;return((o=((i=this.i18n)==null?void 0:i[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:o.replace(/%s/g,()=>s[r++]||""))||""}}},he={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){t.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&t.matches(this.$el,":focus-within")||this.pauseOnHover&&t.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const P={passive:!1,capture:!0},L={passive:!0,capture:!0},de="touchstart mousedown",S="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var ce={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=i=>{const n=t.getEventPos(i).x*(t.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:de,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!t.isTouch(e)&&le(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:S,el(){return this.list},handler:t.noop,...P}],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,S,this.move,P),t.on(document,M,this.end,L),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;let{slides:i,prevIndex:n}=this,o=Math.abs(s),r=this.getIndex(n+this.dir),h=this._getDistance(n,r);for(;r!==n&&o>h;)this.drag-=h*this.dir,n=r,o-=h,r=this.getIndex(n+this.dir),h=this._getDistance(n,r);this.percent=o/h;const a=i[n],l=i[r],d=this.index!==r,c=n===r;let p;for(const g of[this.index,this.prevIndex])t.includes([r,n],g)||(t.trigger(i[g],"itemhidden",[this]),c&&(p=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||p)&&t.trigger(i[this.index],"itemshown",[this]),d&&(this.prevIndex=n,this.index=r,!c&&t.trigger(a,"beforeitemhide",[this]),t.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&t.trigger(a,"itemhide",[this]),t.trigger(l,"itemshow",[this]))},end(){if(t.off(document,S,this.move,P),t.off(document,M,this.end,L),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},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()||this.slides[e].offsetWidth}}};function le(e){return t.css(e,"userSelect")!=="none"&&t.toArray(e.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function N(e,s=e.$el,i=""){if(s.id)return s.id;let n=`${e.$options.id}-${e._uid}${i}`;return t.$(`#${n}`)&&(n=N(e,s,`${i}-2`)),n}const m={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var pe={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:e},s)=>t.$(e,s),navChildren(){return t.children(this.nav)},selNavItem:({attrItem:e})=>`[${e}],[data-${e}]`,navItems(e,s){return t.$$(this.selNavItem,s)}},watch:{nav(e,s){t.attr(e,"role","tablist"),s&&this.$emit()},list(e){t.attr(e,"role","presentation")},navChildren(e){t.attr(e,"role","presentation")},navItems(e){for(const s of e){const i=t.data(s,this.attrItem),n=t.$("a,button",s)||s;let o,r=null;if(t.isNumeric(i)){const h=t.toNumber(i),a=this.slides[h];a&&(a.id||(a.id=N(this,a,`-item-${i}`)),r=a.id),o=this.t("slideX",t.toFloat(i)+1),t.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=N(this,this.list,"-items")),r=this.list.id),o=this.t(i);t.attr(n,{"aria-controls":r,"aria-label":t.attr(n,"aria-label")||o})}},slides(e){e.forEach((s,i)=>t.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(e){const s=this.navChildren.length;if(this.nav&&e!==s){t.empty(this.nav);for(let i=0;i<e;i++)t.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){t.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){t.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===m.SPACE)&&(e.preventDefault(),this.show(t.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:s,keyCode:i}=e,n=t.data(s,this.attrItem);if(!t.isNumeric(n))return;let o=i===m.HOME?0:i===m.END?"last":i===m.LEFT?"previous":i===m.RIGHT?"next":-1;~o&&(e.preventDefault(),this.show(o))}}],methods:{updateNav(){const e=this.getValidIndex();for(const s of this.navItems){const i=t.data(s,this.attrItem),n=t.$("a,button",s)||s;if(t.isNumeric(i)){const r=t.toNumber(i)===e;t.toggleClass(s,this.clsActive,r),t.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&t.matches(t.parent(s),":focus-within")&&n.focus()}else t.toggleClass(s,"uk-invisible",this.finite&&(i==="previous"&&e===0||i==="next"&&e>=this.maxIndex))}}}},fe={mixins:[he,ce,pe,ae],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:e},s)=>ge(s.offsetWidth/e),list:({selList:e},s)=>t.$(e,s),maxIndex(){return this.length-1},slides(){return t.children(this.list)},length(){return this.slides.length}},watch:{slides(e,s){s&&this.$emit()}},observe:re(),methods:{show(e,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),a=t.hasClass(this.slides,this.clsActive)&&this.slides[h],l=this.getIndex(e,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=me(e,h),this.prevIndex=h,this.index=l,a&&!t.trigger(a,"beforeitemhide",[this])||!t.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&t.trigger(a,"itemhidden",[this]),t.trigger(d,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]),c},getIndex(e=this.index,s=this.index){return t.clamp(t.getIndex(e,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(e=this.index,s=this.prevIndex){return this.getIndex(e,s)},_show(e,s,i){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:i?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}),!i&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(e,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(e),n},_getTransitioner(e=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,i*(t.isRtl?-1:1),n)}}};function me(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function ge(e){return .5*e+300}var ue={mixins:[fe],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:B,Transitioner:se},computed:{animation({animation:e,Animations:s}){return{...s[e]||s.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){t.addClass(e,this.clsActive)},itemshown({target:e}){t.addClass(e,this.clsActivated)},itemhidden({target:e}){t.removeClass(e,this.clsActive,this.clsActivated)}}},F={...B,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:C(1-.2)},{opacity:1,transform:C(1)}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:C(1-.2*e)},{opacity:e,transform:C(1-.2+.2*e)}]}}},j={mixins:[J,ue],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:F,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>"));const i=t.$("[uk-close]",e),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(t.append(this.container,e))},computed:{caption:({selCaption:e},s)=>t.$(e,s)},events:[{name:`${t.pointerMove} ${t.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),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({keyCode:e}){if(!this.isToggled(this.$el)||!this.draggable)return;let s=-1;e===m.LEFT?s="previous":e===m.RIGHT?s="next":e===m.HOME?s=0:e===m.END&&(s="last"),~s&&this.show(s)}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=F.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:i,type:n,alt:o="",poster:r,attrs:h={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!i)return;let a;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const d=x("img",{src:i,alt:o,...h});t.on(d,"load",()=>this.setItem(s,d)),t.on(d,"error",()=>this.setError(s))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=x("video",{src:i,poster:r,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...h});t.on(d,"loadedmetadata",()=>this.setItem(s,d)),t.on(d,"error",()=>this.setError(s))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(s,x("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...h}));else if(a=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,x("iframe",{src:`https://www.youtube${a[1]||""}.com/embed/${a[2]}${a[3]?`?${a[3]}`:""}`,width:1920,height:1080,...l,...h}));else if(a=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:c}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(s,x("iframe",{src:`https://player.vimeo.com/video/${a[1]}${a[2]?`?${a[2]}`:""}`,width:c,height:d,...l,...h}))}catch{this.setError(s)}}}],methods:{loadItem(e=this.index){const s=this.getItem(e);this.getSlide(s).childElementCount||t.trigger(this.$el,"itemload",[s])},getItem(e=this.index){return 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 x(e,s){const i=t.fragment(`<${e}>`);return t.attr(i,s),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",j),j});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -93,12 +93,8 @@
|
|
|
93
93
|
clsLeave: "uk-togglabe-leave"
|
|
94
94
|
},
|
|
95
95
|
computed: {
|
|
96
|
-
hasAnimation({ animation })
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
hasTransition({ animation }) {
|
|
100
|
-
return ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition));
|
|
101
|
-
}
|
|
96
|
+
hasAnimation: ({ animation }) => !!animation[0],
|
|
97
|
+
hasTransition: ({ animation }) => ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition))
|
|
102
98
|
},
|
|
103
99
|
methods: {
|
|
104
100
|
async toggleElement(targets, toggle, animate) {
|
|
@@ -276,9 +272,7 @@
|
|
|
276
272
|
role: "dialog"
|
|
277
273
|
},
|
|
278
274
|
computed: {
|
|
279
|
-
panel({ selPanel }, $el)
|
|
280
|
-
return util.$(selPanel, $el);
|
|
281
|
-
},
|
|
275
|
+
panel: ({ selPanel }, $el) => util.$(selPanel, $el),
|
|
282
276
|
transitionElement() {
|
|
283
277
|
return this.panel;
|
|
284
278
|
},
|
|
@@ -553,6 +547,46 @@
|
|
|
553
547
|
util.trigger(el, util.createEvent(type, false, false, data));
|
|
554
548
|
}
|
|
555
549
|
|
|
550
|
+
function callUpdate(instance, e = "update") {
|
|
551
|
+
if (!instance._connected) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
if (!instance._updates.length) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
if (!instance._queued) {
|
|
558
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
559
|
+
util.fastdom.read(() => {
|
|
560
|
+
if (instance._connected) {
|
|
561
|
+
runUpdates(instance, instance._queued);
|
|
562
|
+
}
|
|
563
|
+
delete instance._queued;
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
instance._queued.add(e.type || e);
|
|
567
|
+
}
|
|
568
|
+
function runUpdates(instance, types) {
|
|
569
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
570
|
+
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
let result;
|
|
574
|
+
if (read) {
|
|
575
|
+
result = read.call(instance, instance._data, types);
|
|
576
|
+
if (result && util.isPlainObject(result)) {
|
|
577
|
+
util.assign(instance._data, result);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
if (write && result !== false) {
|
|
581
|
+
util.fastdom.write(() => {
|
|
582
|
+
if (instance._connected) {
|
|
583
|
+
write.call(instance, instance._data, types);
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
556
590
|
function resize(options) {
|
|
557
591
|
return observe(util.observeResize, options, "resize");
|
|
558
592
|
}
|
|
@@ -560,7 +594,7 @@
|
|
|
560
594
|
return {
|
|
561
595
|
observe: observe2,
|
|
562
596
|
handler() {
|
|
563
|
-
this
|
|
597
|
+
callUpdate(this, emit);
|
|
564
598
|
},
|
|
565
599
|
...options
|
|
566
600
|
};
|
|
@@ -830,15 +864,11 @@
|
|
|
830
864
|
role: "region"
|
|
831
865
|
},
|
|
832
866
|
computed: {
|
|
833
|
-
nav({ selNav }, $el)
|
|
834
|
-
return util.$(selNav, $el);
|
|
835
|
-
},
|
|
867
|
+
nav: ({ selNav }, $el) => util.$(selNav, $el),
|
|
836
868
|
navChildren() {
|
|
837
869
|
return util.children(this.nav);
|
|
838
870
|
},
|
|
839
|
-
selNavItem({ attrItem }) {
|
|
840
|
-
return `[${attrItem}],[data-${attrItem}]`;
|
|
841
|
-
},
|
|
871
|
+
selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
|
|
842
872
|
navItems(_, $el) {
|
|
843
873
|
return util.$$(this.selNavItem, $el);
|
|
844
874
|
}
|
|
@@ -1018,12 +1048,8 @@
|
|
|
1018
1048
|
util.removeClass(this.slides, this.clsActive);
|
|
1019
1049
|
},
|
|
1020
1050
|
computed: {
|
|
1021
|
-
duration({ velocity }, $el)
|
|
1022
|
-
|
|
1023
|
-
},
|
|
1024
|
-
list({ selList }, $el) {
|
|
1025
|
-
return util.$(selList, $el);
|
|
1026
|
-
},
|
|
1051
|
+
duration: ({ velocity }, $el) => speedUp($el.offsetWidth / velocity),
|
|
1052
|
+
list: ({ selList }, $el) => util.$(selList, $el),
|
|
1027
1053
|
maxIndex() {
|
|
1028
1054
|
return this.length - 1;
|
|
1029
1055
|
},
|
|
@@ -1238,9 +1264,7 @@
|
|
|
1238
1264
|
this.$mount(util.append(this.container, $el));
|
|
1239
1265
|
},
|
|
1240
1266
|
computed: {
|
|
1241
|
-
caption({ selCaption }, $el)
|
|
1242
|
-
return util.$(selCaption, $el);
|
|
1243
|
-
}
|
|
1267
|
+
caption: ({ selCaption }, $el) => util.$(selCaption, $el)
|
|
1244
1268
|
},
|
|
1245
1269
|
events: [
|
|
1246
1270
|
{
|
|
@@ -1453,9 +1477,7 @@
|
|
|
1453
1477
|
props: { toggle: String },
|
|
1454
1478
|
data: { toggle: "a" },
|
|
1455
1479
|
computed: {
|
|
1456
|
-
toggles({ toggle }, $el)
|
|
1457
|
-
return util.$$(toggle, $el);
|
|
1458
|
-
}
|
|
1480
|
+
toggles: ({ toggle }, $el) => util.$$(toggle, $el)
|
|
1459
1481
|
},
|
|
1460
1482
|
watch: {
|
|
1461
1483
|
toggles(toggles) {
|