uikit 3.15.11-dev.fd61e70ff → 3.15.12-dev.2299ba0d4
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 +12 -0
- package/build/util.js +26 -20
- package/dist/css/uikit-core-rtl.css +3 -3
- 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 +3 -3
- 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 +14 -13
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +32 -30
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +160 -148
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +168 -156
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +19 -17
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +37 -36
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +38 -29
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +84 -73
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +38 -29
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +95 -78
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +40 -37
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +43 -39
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +12 -12
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +576 -527
- package/dist/js/uikit-core.min.js +1 -17
- package/dist/js/uikit-icons.js +3 -3
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +873 -798
- package/dist/js/uikit.min.js +1 -17
- package/package.json +14 -14
- package/src/js/api/boot.js +3 -1
- package/src/js/components/slider-parallax.js +9 -0
- package/src/js/core/drop.js +5 -1
- package/src/js/core/sticky.js +6 -7
- package/src/js/util/env.js +1 -3
- package/src/js/util/position.js +11 -6
- package/tests/navbar.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.12-dev.2299ba0d4 | 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')) :
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
var Class = {
|
|
10
10
|
connected() {
|
|
11
11
|
uikitUtil.addClass(this.$el, this.$options.id);
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
13
14
|
|
|
14
15
|
var Resize = {
|
|
15
16
|
connected() {var _this$$options$resize;
|
|
@@ -18,20 +19,21 @@
|
|
|
18
19
|
this.$emit('resize')));
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
22
24
|
|
|
23
25
|
var SliderAutoplay = {
|
|
24
26
|
props: {
|
|
25
27
|
autoplay: Boolean,
|
|
26
28
|
autoplayInterval: Number,
|
|
27
|
-
pauseOnHover: Boolean
|
|
28
|
-
|
|
29
|
+
pauseOnHover: Boolean
|
|
30
|
+
},
|
|
29
31
|
|
|
30
32
|
data: {
|
|
31
33
|
autoplay: false,
|
|
32
34
|
autoplayInterval: 7000,
|
|
33
|
-
pauseOnHover: true
|
|
34
|
-
|
|
35
|
+
pauseOnHover: true
|
|
36
|
+
},
|
|
35
37
|
|
|
36
38
|
connected() {
|
|
37
39
|
this.autoplay && this.startAutoplay();
|
|
@@ -63,8 +65,8 @@
|
|
|
63
65
|
} else {
|
|
64
66
|
this.startAutoplay();
|
|
65
67
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
+
}
|
|
69
|
+
}],
|
|
68
70
|
|
|
69
71
|
|
|
70
72
|
methods: {
|
|
@@ -83,7 +85,9 @@
|
|
|
83
85
|
|
|
84
86
|
stopAutoplay() {
|
|
85
87
|
this.interval && clearInterval(this.interval);
|
|
86
|
-
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
87
91
|
|
|
88
92
|
const pointerOptions = { passive: false, capture: true };
|
|
89
93
|
const pointerUpOptions = { passive: true, capture: true };
|
|
@@ -93,13 +97,13 @@
|
|
|
93
97
|
|
|
94
98
|
var SliderDrag = {
|
|
95
99
|
props: {
|
|
96
|
-
draggable: Boolean
|
|
97
|
-
|
|
100
|
+
draggable: Boolean
|
|
101
|
+
},
|
|
98
102
|
|
|
99
103
|
data: {
|
|
100
104
|
draggable: true,
|
|
101
|
-
threshold: 10
|
|
102
|
-
|
|
105
|
+
threshold: 10
|
|
106
|
+
},
|
|
103
107
|
|
|
104
108
|
created() {
|
|
105
109
|
for (const key of ['start', 'move', 'end']) {
|
|
@@ -137,16 +141,16 @@
|
|
|
137
141
|
}
|
|
138
142
|
|
|
139
143
|
this.start(e);
|
|
140
|
-
}
|
|
141
|
-
|
|
144
|
+
}
|
|
145
|
+
},
|
|
142
146
|
|
|
143
147
|
{
|
|
144
148
|
name: 'dragstart',
|
|
145
149
|
|
|
146
150
|
handler(e) {
|
|
147
151
|
e.preventDefault();
|
|
148
|
-
}
|
|
149
|
-
|
|
152
|
+
}
|
|
153
|
+
},
|
|
150
154
|
|
|
151
155
|
{
|
|
152
156
|
// iOS workaround for slider stopping if swiping fast
|
|
@@ -155,8 +159,8 @@
|
|
|
155
159
|
return this.list;
|
|
156
160
|
},
|
|
157
161
|
handler: uikitUtil.noop,
|
|
158
|
-
...pointerOptions
|
|
159
|
-
|
|
162
|
+
...pointerOptions
|
|
163
|
+
}],
|
|
160
164
|
|
|
161
165
|
|
|
162
166
|
methods: {
|
|
@@ -293,9 +297,9 @@
|
|
|
293
297
|
uikitUtil.css(this.list, { userSelect: '', pointerEvents: '' });
|
|
294
298
|
|
|
295
299
|
this.drag = this.percent = null;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
299
303
|
|
|
300
304
|
function hasSelectableText(el) {
|
|
301
305
|
return (
|
|
@@ -306,8 +310,8 @@
|
|
|
306
310
|
|
|
307
311
|
var SliderNav = {
|
|
308
312
|
data: {
|
|
309
|
-
selNav: false
|
|
310
|
-
|
|
313
|
+
selNav: false
|
|
314
|
+
},
|
|
311
315
|
|
|
312
316
|
computed: {
|
|
313
317
|
nav(_ref, $el) {let { selNav } = _ref;
|
|
@@ -320,8 +324,8 @@
|
|
|
320
324
|
|
|
321
325
|
navItems(_, $el) {
|
|
322
326
|
return uikitUtil.$$(this.selNavItem, $el);
|
|
323
|
-
}
|
|
324
|
-
|
|
327
|
+
}
|
|
328
|
+
},
|
|
325
329
|
|
|
326
330
|
update: {
|
|
327
331
|
write() {
|
|
@@ -339,8 +343,8 @@
|
|
|
339
343
|
this.updateNav();
|
|
340
344
|
},
|
|
341
345
|
|
|
342
|
-
events: ['resize']
|
|
343
|
-
|
|
346
|
+
events: ['resize']
|
|
347
|
+
},
|
|
344
348
|
|
|
345
349
|
events: [
|
|
346
350
|
{
|
|
@@ -353,13 +357,13 @@
|
|
|
353
357
|
handler(e) {
|
|
354
358
|
e.preventDefault();
|
|
355
359
|
this.show(uikitUtil.data(e.current, this.attrItem));
|
|
356
|
-
}
|
|
357
|
-
|
|
360
|
+
}
|
|
361
|
+
},
|
|
358
362
|
|
|
359
363
|
{
|
|
360
364
|
name: 'itemshow',
|
|
361
|
-
handler: 'updateNav'
|
|
362
|
-
|
|
365
|
+
handler: 'updateNav'
|
|
366
|
+
}],
|
|
363
367
|
|
|
364
368
|
|
|
365
369
|
methods: {
|
|
@@ -376,7 +380,9 @@
|
|
|
376
380
|
cmd === 'previous' && i === 0 || cmd === 'next' && i >= this.maxIndex));
|
|
377
381
|
|
|
378
382
|
}
|
|
379
|
-
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
};
|
|
380
386
|
|
|
381
387
|
var Slider = {
|
|
382
388
|
mixins: [SliderAutoplay, SliderDrag, SliderNav, Resize],
|
|
@@ -387,8 +393,8 @@
|
|
|
387
393
|
index: Number,
|
|
388
394
|
finite: Boolean,
|
|
389
395
|
velocity: Number,
|
|
390
|
-
selSlides: String
|
|
391
|
-
|
|
396
|
+
selSlides: String
|
|
397
|
+
},
|
|
392
398
|
|
|
393
399
|
data: () => ({
|
|
394
400
|
easing: 'ease',
|
|
@@ -401,8 +407,8 @@
|
|
|
401
407
|
clsActive: 'uk-active',
|
|
402
408
|
clsActivated: false,
|
|
403
409
|
Transitioner: false,
|
|
404
|
-
transitionOptions: {}
|
|
405
|
-
|
|
410
|
+
transitionOptions: {}
|
|
411
|
+
}),
|
|
406
412
|
|
|
407
413
|
connected() {
|
|
408
414
|
this.prevIndex = -1;
|
|
@@ -438,13 +444,13 @@
|
|
|
438
444
|
|
|
439
445
|
watch() {
|
|
440
446
|
this.$emit('resize');
|
|
441
|
-
}
|
|
442
|
-
|
|
447
|
+
}
|
|
448
|
+
},
|
|
443
449
|
|
|
444
450
|
length() {
|
|
445
451
|
return this.slides.length;
|
|
446
|
-
}
|
|
447
|
-
|
|
452
|
+
}
|
|
453
|
+
},
|
|
448
454
|
|
|
449
455
|
methods: {
|
|
450
456
|
show(index, force) {if (force === void 0) {force = false;}
|
|
@@ -533,8 +539,8 @@
|
|
|
533
539
|
'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
|
|
534
540
|
'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
|
|
535
541
|
this.easing,
|
|
536
|
-
...this.transitionOptions
|
|
537
|
-
|
|
542
|
+
...this.transitionOptions
|
|
543
|
+
});
|
|
538
544
|
|
|
539
545
|
if (!force && !prev) {
|
|
540
546
|
this._translate(1);
|
|
@@ -570,9 +576,9 @@
|
|
|
570
576
|
dir * (uikitUtil.isRtl ? -1 : 1),
|
|
571
577
|
options);
|
|
572
578
|
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
};
|
|
576
582
|
|
|
577
583
|
function getDirection(index, prevIndex) {
|
|
578
584
|
return index === 'next' ? 1 : index === 'previous' ? -1 : index < prevIndex ? -1 : 1;
|
|
@@ -598,12 +604,14 @@
|
|
|
598
604
|
}
|
|
599
605
|
},
|
|
600
606
|
|
|
601
|
-
events: ['resize']
|
|
607
|
+
events: ['resize']
|
|
608
|
+
}
|
|
609
|
+
};
|
|
602
610
|
|
|
603
611
|
var Lazyload = {
|
|
604
612
|
data: {
|
|
605
|
-
preload: 5
|
|
606
|
-
|
|
613
|
+
preload: 5
|
|
614
|
+
},
|
|
607
615
|
|
|
608
616
|
methods: {
|
|
609
617
|
lazyload(observeTargets, targets) {if (observeTargets === void 0) {observeTargets = this.$el;}if (targets === void 0) {targets = this.$el;}
|
|
@@ -622,14 +630,17 @@
|
|
|
622
630
|
}
|
|
623
631
|
}));
|
|
624
632
|
|
|
625
|
-
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
};
|
|
626
636
|
|
|
627
637
|
var SliderPreload = {
|
|
628
638
|
mixins: [Lazyload],
|
|
629
639
|
|
|
630
640
|
connected() {
|
|
631
641
|
this.lazyload(this.slides, this.getAdjacentSlides);
|
|
632
|
-
}
|
|
642
|
+
}
|
|
643
|
+
};
|
|
633
644
|
|
|
634
645
|
function translate(value, unit) {if (value === void 0) {value = 0;}if (unit === void 0) {unit = '%';}
|
|
635
646
|
value += value ? unit : '';
|
|
@@ -662,8 +673,8 @@
|
|
|
662
673
|
percent: 1 - percent,
|
|
663
674
|
duration,
|
|
664
675
|
timing,
|
|
665
|
-
dir
|
|
666
|
-
|
|
676
|
+
dir
|
|
677
|
+
});
|
|
667
678
|
|
|
668
679
|
uikitUtil.Transition.start(
|
|
669
680
|
list,
|
|
@@ -723,8 +734,8 @@
|
|
|
723
734
|
|
|
724
735
|
triggerUpdate(slide, "itemtranslate" + (translateIn ? 'in' : 'out'), {
|
|
725
736
|
dir,
|
|
726
|
-
percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0
|
|
727
|
-
|
|
737
|
+
percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0
|
|
738
|
+
});
|
|
728
739
|
}
|
|
729
740
|
},
|
|
730
741
|
|
|
@@ -753,8 +764,8 @@
|
|
|
753
764
|
|
|
754
765
|
getActives() {
|
|
755
766
|
return inView(list, getLeft(prev || next, list, center));
|
|
756
|
-
}
|
|
757
|
-
|
|
767
|
+
}
|
|
768
|
+
};
|
|
758
769
|
}
|
|
759
770
|
|
|
760
771
|
function getLeft(el, list, center) {
|
|
@@ -806,8 +817,8 @@
|
|
|
806
817
|
|
|
807
818
|
props: {
|
|
808
819
|
center: Boolean,
|
|
809
|
-
sets: Boolean
|
|
810
|
-
|
|
820
|
+
sets: Boolean
|
|
821
|
+
},
|
|
811
822
|
|
|
812
823
|
data: {
|
|
813
824
|
center: false,
|
|
@@ -816,8 +827,8 @@
|
|
|
816
827
|
selList: '.uk-slider-items',
|
|
817
828
|
selNav: '.uk-slider-nav',
|
|
818
829
|
clsContainer: 'uk-slider-container',
|
|
819
|
-
Transitioner
|
|
820
|
-
|
|
830
|
+
Transitioner
|
|
831
|
+
},
|
|
821
832
|
|
|
822
833
|
computed: {
|
|
823
834
|
avgWidth() {
|
|
@@ -892,10 +903,10 @@
|
|
|
892
903
|
transitionOptions() {
|
|
893
904
|
return {
|
|
894
905
|
center: this.center,
|
|
895
|
-
list: this.list
|
|
896
|
-
|
|
897
|
-
}
|
|
898
|
-
|
|
906
|
+
list: this.list
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
},
|
|
899
910
|
|
|
900
911
|
connected() {
|
|
901
912
|
uikitUtil.toggleClass(this.$el, this.clsContainer, !uikitUtil.$("." + this.clsContainer, this.$el));
|
|
@@ -921,8 +932,8 @@
|
|
|
921
932
|
this.updateActiveClasses();
|
|
922
933
|
},
|
|
923
934
|
|
|
924
|
-
events: ['resize']
|
|
925
|
-
|
|
935
|
+
events: ['resize']
|
|
936
|
+
},
|
|
926
937
|
|
|
927
938
|
events: {
|
|
928
939
|
beforeitemshow(e) {
|
|
@@ -970,8 +981,8 @@
|
|
|
970
981
|
|
|
971
982
|
itemshown() {
|
|
972
983
|
this.updateActiveClasses();
|
|
973
|
-
}
|
|
974
|
-
|
|
984
|
+
}
|
|
985
|
+
},
|
|
975
986
|
|
|
976
987
|
methods: {
|
|
977
988
|
reorder() {
|
|
@@ -1057,9 +1068,9 @@
|
|
|
1057
1068
|
} while (this.slides.length > j && currentLeft > left && currentLeft < right);
|
|
1058
1069
|
}
|
|
1059
1070
|
return Array.from(slides);
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1063
1074
|
|
|
1064
1075
|
function getMaxElWidth(list) {
|
|
1065
1076
|
return Math.max(0, ...uikitUtil.children(list).map((el) => uikitUtil.dimensions(el).width));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.11-dev.fd61e70ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){e.addClass(this.$el,this.$options.id)}},D={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},O={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){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.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const w={passive:!1,capture:!0},_={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",y="touchend touchcancel mouseup click input scroll";var E={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:W,passive:!0,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&P(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}},{name:b,el(){return this.list},handler:e.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,b,this.move,w),e.on(document,y,this.end,_),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,o=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&o>h;)this.drag-=h*this.dir,i=r,o-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=o/h;const l=n[i],c=n[r],f=this.index!==r,d=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),d&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!d&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!d&&c),f&&(!d&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,b,this.move,w),e.off(document,y,this.end,_),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 s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function P(s){return e.css(s,"userSelect")!=="none"&&e.toNodes(s.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var B={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},L={mixins:[O,E,B,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(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return $(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,o=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=V(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(d=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,d()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,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&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function V(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function $(s){return .5*s+300}var j={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);!~this.prevIndex||this.index!==s?this.show(s):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},q={data:{preload:5},methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const o of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',o).slice(0,this.preload-1).forEach(r=>e.removeAttr(r,"loading"));for(const o of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(o)}))}}},F={mixins:[q],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function S(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function H(s,t,n,i){let{center:o,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,o):p(t,h,o)+e.dimensions(t).width*n,f=t?p(t,h,o):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(d,a,g){a===void 0&&(a=0);const m=g?"linear":r;return d-=Math.round(d*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),A(this.getItemIn(),"itemin",{percent:a,duration:d,timing:m,dir:n}),s&&A(this.getItemIn(!0),"itemout",{percent:1-a,duration:d,timing:m,dir:n}),e.Transition.start(h,{transform:S(-f*(e.isRtl?-1:1),"px")},d,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(d,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(d,a,!0)},translate(d){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",S(e.clamp(-f+(a-a*d),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),K=this.getItemIn(!0);d=s?e.clamp(d,-1,1):0;for(const x of e.children(h)){const R=e.includes(g,x),T=x===m,z=x===K,Q=T||!z&&(R||n*(e.isRtl?-1:1)===-1^u(x,h)>u(s||t));A(x,"itemtranslate"+(Q?"in":"out"),{dir:n,percent:z?1-d:T?d:R?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(d){d===void 0&&(d=!1);let a=this.getActives(),g=C(h,p(t||s,h,o));if(d){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return C(h,p(s||t,h,o))}}}function p(s,t,n){const i=u(s,t);return n?i-G(s,t):Math.min(i,N(t))}function N(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function G(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function u(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function C(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(o=>{const r=u(o,s),h=r+Math.min(e.dimensions(o).width,n);return r>=t&&h<=i})}function A(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var M={mixins:[v,L,j,F],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:H},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+J(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=N(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],o=e.dimensions(this.list).width;for(let r=0;r<this.slides.length;r++){const h=e.dimensions(this.slides[r]).width;n+h>o&&(n=0),this.center?n<o/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>o/2&&(i.push(+r),n=o/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=$(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((o,r)=>e.css(o,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const o=this.getIndex(--i+s,s),r=this.slides[o];e.css(r,"order",o>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,o=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=o+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function J(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
1
|
+
/*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){e.addClass(this.$el,this.$options.id)}},D={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},O={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){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.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const w={passive:!1,capture:!0},_={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",y="touchend touchcancel mouseup click input scroll";var E={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:W,passive:!0,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&P(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}},{name:b,el(){return this.list},handler:e.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,b,this.move,w),e.on(document,y,this.end,_),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,o=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&o>h;)this.drag-=h*this.dir,i=r,o-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=o/h;const l=n[i],c=n[r],f=this.index!==r,d=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),d&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!d&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!d&&c),f&&(!d&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,b,this.move,w),e.off(document,y,this.end,_),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 s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function P(s){return e.css(s,"userSelect")!=="none"&&e.toNodes(s.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var B={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},L={mixins:[O,E,B,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(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return $(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,o=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=V(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(d=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,d()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,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&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function V(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function $(s){return .5*s+300}var j={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);!~this.prevIndex||this.index!==s?this.show(s):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},q={data:{preload:5},methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const o of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',o).slice(0,this.preload-1).forEach(r=>e.removeAttr(r,"loading"));for(const o of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(o)}))}}},F={mixins:[q],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function S(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function H(s,t,n,i){let{center:o,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,o):p(t,h,o)+e.dimensions(t).width*n,f=t?p(t,h,o):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(d,a,g){a===void 0&&(a=0);const m=g?"linear":r;return d-=Math.round(d*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),A(this.getItemIn(),"itemin",{percent:a,duration:d,timing:m,dir:n}),s&&A(this.getItemIn(!0),"itemout",{percent:1-a,duration:d,timing:m,dir:n}),e.Transition.start(h,{transform:S(-f*(e.isRtl?-1:1),"px")},d,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(d,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(d,a,!0)},translate(d){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",S(e.clamp(-f+(a-a*d),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),K=this.getItemIn(!0);d=s?e.clamp(d,-1,1):0;for(const x of e.children(h)){const R=e.includes(g,x),T=x===m,z=x===K,Q=T||!z&&(R||n*(e.isRtl?-1:1)===-1^u(x,h)>u(s||t));A(x,"itemtranslate"+(Q?"in":"out"),{dir:n,percent:z?1-d:T?d:R?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(d){d===void 0&&(d=!1);let a=this.getActives(),g=C(h,p(t||s,h,o));if(d){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return C(h,p(s||t,h,o))}}}function p(s,t,n){const i=u(s,t);return n?i-G(s,t):Math.min(i,N(t))}function N(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function G(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function u(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function C(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(o=>{const r=u(o,s),h=r+Math.min(e.dimensions(o).width,n);return r>=t&&h<=i})}function A(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var M={mixins:[v,L,j,F],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:H},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+J(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=N(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],o=e.dimensions(this.list).width;for(let r=0;r<this.slides.length;r++){const h=e.dimensions(this.slides[r]).width;n+h>o&&(n=0),this.center?n<o/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>o/2&&(i.push(+r),n=o/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=$(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((o,r)=>e.css(o,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const o=this.getIndex(--i+s,s),r=this.slides[o];e.css(r,"order",o>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,o=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=o+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function J(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.12-dev.2299ba0d4 | 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')) :
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
var Media = {
|
|
10
10
|
props: {
|
|
11
|
-
media: Boolean
|
|
12
|
-
|
|
11
|
+
media: Boolean
|
|
12
|
+
},
|
|
13
13
|
|
|
14
14
|
data: {
|
|
15
|
-
media: false
|
|
16
|
-
|
|
15
|
+
media: false
|
|
16
|
+
},
|
|
17
17
|
|
|
18
18
|
connected() {
|
|
19
19
|
const media = toMedia(this.media, this.$el);
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
|
|
35
35
|
disconnected() {var _this$offMediaObj;
|
|
36
36
|
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
37
|
-
}
|
|
38
|
-
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
39
|
|
|
40
40
|
function toMedia(value, element) {
|
|
41
41
|
if (uikitUtil.isString(value)) {
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
opacity: cssPropFn,
|
|
95
95
|
stroke: strokeFn,
|
|
96
96
|
bgx: backgroundFn,
|
|
97
|
-
bgy: backgroundFn
|
|
98
|
-
|
|
97
|
+
bgy: backgroundFn
|
|
98
|
+
};
|
|
99
99
|
|
|
100
100
|
const { keys } = Object;
|
|
101
101
|
|
|
@@ -119,14 +119,14 @@
|
|
|
119
119
|
result[prop] = props[prop](prop, $el, stops[prop], stops);
|
|
120
120
|
}
|
|
121
121
|
return result;
|
|
122
|
-
}
|
|
123
|
-
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
124
|
|
|
125
125
|
events: {
|
|
126
126
|
load() {
|
|
127
127
|
this.$emit();
|
|
128
|
-
}
|
|
129
|
-
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
130
|
|
|
131
131
|
methods: {
|
|
132
132
|
reset() {
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
this.props[prop](css, percent);
|
|
142
142
|
}
|
|
143
143
|
return css;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
147
|
|
|
148
148
|
function transformFn(prop, el, stops) {
|
|
149
149
|
let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
@@ -281,8 +281,8 @@
|
|
|
281
281
|
|
|
282
282
|
const dimEl = {
|
|
283
283
|
width: el.offsetWidth,
|
|
284
|
-
height: el.offsetHeight
|
|
285
|
-
|
|
284
|
+
height: el.offsetHeight
|
|
285
|
+
};
|
|
286
286
|
|
|
287
287
|
const bgProps = ['bgx', 'bgy'].filter((prop) => prop in props);
|
|
288
288
|
|
|
@@ -354,8 +354,8 @@
|
|
|
354
354
|
function toDimensions(image) {
|
|
355
355
|
return {
|
|
356
356
|
width: image.naturalWidth,
|
|
357
|
-
height: image.naturalHeight
|
|
358
|
-
|
|
357
|
+
height: image.naturalHeight
|
|
358
|
+
};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
|
|
@@ -443,8 +443,8 @@
|
|
|
443
443
|
mixins: [Parallax],
|
|
444
444
|
|
|
445
445
|
data: {
|
|
446
|
-
selItem: '!li'
|
|
447
|
-
|
|
446
|
+
selItem: '!li'
|
|
447
|
+
},
|
|
448
448
|
|
|
449
449
|
beforeConnect() {
|
|
450
450
|
this.item = uikitUtil.query(this.selItem, this.$el);
|
|
@@ -466,6 +466,10 @@
|
|
|
466
466
|
|
|
467
467
|
handler(_ref) {let { type, detail: { percent, duration, timing, dir } } = _ref;
|
|
468
468
|
uikitUtil.fastdom.read(() => {
|
|
469
|
+
if (!this.matchMedia) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
|
|
469
473
|
const propsFrom = this.getCss(getCurrentPercent(type, dir, percent));
|
|
470
474
|
const propsTo = this.getCss(isIn(type) ? 0.5 : dir > 0 ? 1 : 0);
|
|
471
475
|
uikitUtil.fastdom.write(() => {
|
|
@@ -473,8 +477,8 @@
|
|
|
473
477
|
uikitUtil.Transition.start(this.$el, propsTo, duration, timing).catch(uikitUtil.noop);
|
|
474
478
|
});
|
|
475
479
|
});
|
|
476
|
-
}
|
|
477
|
-
|
|
480
|
+
}
|
|
481
|
+
},
|
|
478
482
|
|
|
479
483
|
{
|
|
480
484
|
name: 'transitioncanceled transitionend',
|
|
@@ -487,8 +491,8 @@
|
|
|
487
491
|
|
|
488
492
|
handler() {
|
|
489
493
|
uikitUtil.Transition.cancel(this.$el);
|
|
490
|
-
}
|
|
491
|
-
|
|
494
|
+
}
|
|
495
|
+
},
|
|
492
496
|
|
|
493
497
|
{
|
|
494
498
|
name: 'itemtranslatein itemtranslateout',
|
|
@@ -501,13 +505,18 @@
|
|
|
501
505
|
|
|
502
506
|
handler(_ref2) {let { type, detail: { percent, dir } } = _ref2;
|
|
503
507
|
uikitUtil.fastdom.read(() => {
|
|
508
|
+
if (!this.matchMedia) {
|
|
509
|
+
this.reset();
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
|
|
504
513
|
const props = this.getCss(getCurrentPercent(type, dir, percent));
|
|
505
514
|
uikitUtil.fastdom.write(() => uikitUtil.css(this.$el, props));
|
|
506
515
|
});
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
516
|
+
}
|
|
517
|
+
}]
|
|
510
518
|
|
|
519
|
+
};
|
|
511
520
|
|
|
512
521
|
function isIn(type) {
|
|
513
522
|
return uikitUtil.endsWith(type, 'in');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,"--uk-breakpoint-"+e.substr(1)));else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:F,y:F,rotate:F,scale:F,color:I,backgroundColor:I,borderColor:I,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:j,bgy:j},{keys:P}=Object;var _={mixins:[g],props:W(P(y),"list"),data:W(P(y),void 0),computed:{props(e,t){const n={};for(const s in e)s in y&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=y[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let o=v(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>v([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=" "+e+"("+b(n,i)+o+")"}}function I(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),h=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]="rgba("+h+")"}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=v(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=" "+e+"("+(i+o)+")"}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=v(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(a=>{let[i]=a;return i})?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function j(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=p(t,c);return O(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const d=o[f].map(J=>{let[K]=J;return K}),w=Math.min(...d),C=Math.max(...d),B=d.indexOf(w)<d.indexOf(C),N=C-w;c[f]=(B?-N:0)-(B?w:C)+"px",a[f==="bgy"?"height":"width"]+=N}const h=r.Dimensions.cover(s,a);for(const f of i){const d=f==="bgy"?"height":"width",w=h[d]-a[d];c[f]="max("+p(t,f)+",-"+w+"px) + "+c[f]}const u=O(i,c,o);return(f,d)=>{u(f,d),f.backgroundSize=h.width+"px "+h.height+"px",f.backgroundRepeat="no-repeat"}}function p(e,t){return x(e,"background-position-"+t.substr(-1),"")}function O(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o["background-position-"+a.substr(-1)]="calc("+t[a]+" + "+i+"px)"}}}const M={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(M[t])return M[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{M[t]=$(n),r.trigger(e,r.createEvent("load",!1))},$(n)):M[t]=$(n)}function $(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const h=n[a-s-1][1],u=(c-h)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=h+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),o=>{let[,s]=o;return t<=s})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)/;function v(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:o,timing:s,dir:a}}=e;r.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(z(t,a,n)),c=this.getCss(D(t)?.5:a>0?1:0);r.fastdom.write(()=>{r.css(this.$el,i),r.Transition.start(this.$el,c,o,s).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:o}}=e;r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const s=this.getCss(z(t,o,n));r.fastdom.write(()=>r.css(this.$el,s))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});
|