uikit 3.11.2-dev.03e47c2ff → 3.11.2-dev.06fe7f1d0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/dist/css/uikit-core-rtl.css +12 -6
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +12 -6
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +12 -6
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +12 -6
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +3 -3
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +4 -14
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +4 -14
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +8 -9
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +8 -9
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +59 -78
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +8 -9
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +23 -45
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +357 -264
- 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 +414 -361
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/hooks.js +2 -2
- package/src/js/api/state.js +173 -140
- package/src/js/components/countdown.js +2 -2
- package/src/js/components/internal/slider-preload.js +4 -32
- package/src/js/components/slider.js +39 -42
- package/src/js/components/upload.js +2 -1
- package/src/js/core/accordion.js +6 -1
- package/src/js/core/core.js +2 -75
- package/src/js/core/cover.js +5 -1
- package/src/js/core/drop.js +3 -1
- package/src/js/core/form-custom.js +2 -2
- package/src/js/core/height-viewport.js +3 -0
- package/src/js/core/img.js +16 -24
- package/src/js/core/offcanvas.js +2 -1
- package/src/js/core/sticky.js +27 -33
- package/src/js/core/switcher.js +11 -3
- package/src/js/core/toggle.js +3 -1
- package/src/js/core/video.js +13 -1
- package/src/js/mixin/lazyload.js +20 -0
- package/src/js/mixin/parallax.js +8 -9
- package/src/js/mixin/slider.js +0 -6
- package/src/js/mixin/slideshow.js +0 -4
- package/src/js/mixin/swipe.js +72 -0
- package/src/js/util/index.js +1 -0
- package/src/js/util/observer.js +36 -0
- package/src/less/components/utility.less +6 -3
- package/src/scss/components/utility.scss +6 -3
- package/tests/parallax.html +2 -2
- package/tests/sticky-parallax.html +1 -1
- package/tests/utility.html +17 -0
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.06fe7f1d0 | 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() :
|
|
@@ -1470,6 +1470,41 @@
|
|
|
1470
1470
|
return { x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1) };
|
|
1471
1471
|
}
|
|
1472
1472
|
|
|
1473
|
+
// Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
1474
|
+
const hasIntersectionObserver =
|
|
1475
|
+
window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype;
|
|
1476
|
+
function observeIntersection(targets, cb, options, intersecting) {if (intersecting === void 0) {intersecting = true;}
|
|
1477
|
+
if (!hasIntersectionObserver) {
|
|
1478
|
+
return;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
const observer = new IntersectionObserver((entries, observer) => {
|
|
1482
|
+
if (!intersecting || entries.some((entry) => entry.isIntersecting)) {
|
|
1483
|
+
cb(entries, observer);
|
|
1484
|
+
}
|
|
1485
|
+
}, options);
|
|
1486
|
+
for (const el of toNodes(targets)) {
|
|
1487
|
+
observer.observe(el);
|
|
1488
|
+
}
|
|
1489
|
+
return observer;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
const hasResizeObserver = window.ResizeObserver;
|
|
1493
|
+
function observeResize(targets, cb, options) {if (options === void 0) {options = { box: 'border-box' };}
|
|
1494
|
+
if (!hasResizeObserver) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
const observer = new ResizeObserver((entries, observer) => {
|
|
1499
|
+
cb(entries, observer);
|
|
1500
|
+
});
|
|
1501
|
+
for (const el of toNodes(targets)) {
|
|
1502
|
+
observer.observe(el, options);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
return observer;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1473
1508
|
const strats = {};
|
|
1474
1509
|
|
|
1475
1510
|
strats.events =
|
|
@@ -2147,6 +2182,9 @@
|
|
|
2147
2182
|
memoize: memoize,
|
|
2148
2183
|
Deferred: Deferred,
|
|
2149
2184
|
MouseTracker: MouseTracker,
|
|
2185
|
+
hasIntersectionObserver: hasIntersectionObserver,
|
|
2186
|
+
observeIntersection: observeIntersection,
|
|
2187
|
+
observeResize: observeResize,
|
|
2150
2188
|
mergeOptions: mergeOptions,
|
|
2151
2189
|
parseOptions: parseOptions,
|
|
2152
2190
|
play: play,
|
|
@@ -2324,8 +2362,8 @@
|
|
|
2324
2362
|
};
|
|
2325
2363
|
|
|
2326
2364
|
function runUpdates(types) {
|
|
2327
|
-
for (const { read, write, events } of this.$options.update) {
|
|
2328
|
-
if (!types.has('update') &&
|
|
2365
|
+
for (const { read, write, events = [] } of this.$options.update) {
|
|
2366
|
+
if (!types.has('update') && !events.some((type) => types.has(type))) {
|
|
2329
2367
|
continue;
|
|
2330
2368
|
}
|
|
2331
2369
|
|
|
@@ -2419,7 +2457,7 @@
|
|
|
2419
2457
|
UIkit.prototype._initProps = function (props) {
|
|
2420
2458
|
let key;
|
|
2421
2459
|
|
|
2422
|
-
props = props || getProps(this.$options, this.$name);
|
|
2460
|
+
props = props || getProps$1(this.$options, this.$name);
|
|
2423
2461
|
|
|
2424
2462
|
for (key in props) {
|
|
2425
2463
|
if (!isUndefined(props[key])) {
|
|
@@ -2446,204 +2484,236 @@
|
|
|
2446
2484
|
}
|
|
2447
2485
|
}
|
|
2448
2486
|
}
|
|
2487
|
+
for (const { events = [] } of this.$options.update || []) {
|
|
2488
|
+
if (includes(events, 'scroll')) {
|
|
2489
|
+
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
2490
|
+
break;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2449
2493
|
};
|
|
2450
2494
|
|
|
2451
2495
|
UIkit.prototype._unbindEvents = function () {
|
|
2452
2496
|
this._events.forEach((unbind) => unbind());
|
|
2453
2497
|
delete this._events;
|
|
2498
|
+
unregisterScrollListener(this._uid);
|
|
2454
2499
|
};
|
|
2455
2500
|
|
|
2456
2501
|
UIkit.prototype._initObservers = function () {
|
|
2457
2502
|
this._observers = [initChildListObserver(this), initPropsObserver(this)];
|
|
2458
2503
|
};
|
|
2459
2504
|
|
|
2505
|
+
UIkit.prototype.registerObserver = function (observer) {
|
|
2506
|
+
this._observers.push(observer);
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2460
2509
|
UIkit.prototype._disconnectObservers = function () {
|
|
2461
2510
|
this._observers.forEach((observer) => observer == null ? void 0 : observer.disconnect());
|
|
2462
2511
|
};
|
|
2512
|
+
}
|
|
2463
2513
|
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
if (!props) {
|
|
2469
|
-
return data$1;
|
|
2470
|
-
}
|
|
2514
|
+
function getProps$1(opts, name) {
|
|
2515
|
+
const data$1 = {};
|
|
2516
|
+
const { args = [], props = {}, el } = opts;
|
|
2471
2517
|
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2518
|
+
if (!props) {
|
|
2519
|
+
return data$1;
|
|
2520
|
+
}
|
|
2475
2521
|
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2522
|
+
for (const key in props) {
|
|
2523
|
+
const prop = hyphenate(key);
|
|
2524
|
+
let value = data(el, prop);
|
|
2479
2525
|
|
|
2480
|
-
|
|
2526
|
+
if (isUndefined(value)) {
|
|
2527
|
+
continue;
|
|
2528
|
+
}
|
|
2481
2529
|
|
|
2482
|
-
|
|
2483
|
-
continue;
|
|
2484
|
-
}
|
|
2530
|
+
value = props[key] === Boolean && value === '' ? true : coerce(props[key], value);
|
|
2485
2531
|
|
|
2486
|
-
|
|
2532
|
+
if (prop === 'target' && (!value || startsWith(value, '_'))) {
|
|
2533
|
+
continue;
|
|
2487
2534
|
}
|
|
2488
2535
|
|
|
2489
|
-
|
|
2536
|
+
data$1[key] = value;
|
|
2537
|
+
}
|
|
2490
2538
|
|
|
2491
|
-
|
|
2492
|
-
const prop = camelize(key);
|
|
2493
|
-
if (props[prop] !== undefined) {
|
|
2494
|
-
data$1[prop] = coerce(props[prop], options[key]);
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2539
|
+
const options = parseOptions(data(el, name), args);
|
|
2497
2540
|
|
|
2498
|
-
|
|
2541
|
+
for (const key in options) {
|
|
2542
|
+
const prop = camelize(key);
|
|
2543
|
+
if (props[prop] !== undefined) {
|
|
2544
|
+
data$1[prop] = coerce(props[prop], options[key]);
|
|
2545
|
+
}
|
|
2499
2546
|
}
|
|
2500
2547
|
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
enumerable: true,
|
|
2548
|
+
return data$1;
|
|
2549
|
+
}
|
|
2504
2550
|
|
|
2505
|
-
|
|
2506
|
-
|
|
2551
|
+
function registerComputed(component, key, cb) {
|
|
2552
|
+
Object.defineProperty(component, key, {
|
|
2553
|
+
enumerable: true,
|
|
2507
2554
|
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
}
|
|
2555
|
+
get() {
|
|
2556
|
+
const { _computeds, $props, $el } = component;
|
|
2511
2557
|
|
|
2512
|
-
|
|
2513
|
-
|
|
2558
|
+
if (!hasOwn(_computeds, key)) {
|
|
2559
|
+
_computeds[key] = (cb.get || cb).call(component, $props, $el);
|
|
2560
|
+
}
|
|
2514
2561
|
|
|
2515
|
-
|
|
2516
|
-
|
|
2562
|
+
return _computeds[key];
|
|
2563
|
+
},
|
|
2517
2564
|
|
|
2518
|
-
|
|
2565
|
+
set(value) {
|
|
2566
|
+
const { _computeds } = component;
|
|
2519
2567
|
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2568
|
+
_computeds[key] = cb.set ? cb.set.call(component, value) : value;
|
|
2569
|
+
|
|
2570
|
+
if (isUndefined(_computeds[key])) {
|
|
2571
|
+
delete _computeds[key];
|
|
2572
|
+
}
|
|
2573
|
+
} });
|
|
2524
2574
|
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
function registerEvent(component, event, key) {
|
|
2578
|
+
if (!isPlainObject(event)) {
|
|
2579
|
+
event = { name: key, handler: event };
|
|
2525
2580
|
}
|
|
2526
2581
|
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
event = { name: key, handler: event };
|
|
2530
|
-
}
|
|
2582
|
+
let { name, el, handler, capture, passive, delegate, filter, self } = event;
|
|
2583
|
+
el = isFunction(el) ? el.call(component) : el || component.$el;
|
|
2531
2584
|
|
|
2532
|
-
|
|
2533
|
-
el
|
|
2585
|
+
if (isArray(el)) {
|
|
2586
|
+
el.forEach((el) => registerEvent(component, { ...event, el }, key));
|
|
2587
|
+
return;
|
|
2588
|
+
}
|
|
2534
2589
|
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
}
|
|
2590
|
+
if (!el || filter && !filter.call(component)) {
|
|
2591
|
+
return;
|
|
2592
|
+
}
|
|
2539
2593
|
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2594
|
+
component._events.push(
|
|
2595
|
+
on(
|
|
2596
|
+
el,
|
|
2597
|
+
name,
|
|
2598
|
+
delegate ? isString(delegate) ? delegate : delegate.call(component) : null,
|
|
2599
|
+
isString(handler) ? component[handler] : handler.bind(component),
|
|
2600
|
+
{ passive, capture, self }));
|
|
2543
2601
|
|
|
2544
|
-
component._events.push(
|
|
2545
|
-
on(
|
|
2546
|
-
el,
|
|
2547
|
-
name,
|
|
2548
|
-
delegate ? isString(delegate) ? delegate : delegate.call(component) : null,
|
|
2549
|
-
isString(handler) ? component[handler] : handler.bind(component),
|
|
2550
|
-
{ passive, capture, self }));
|
|
2551
2602
|
|
|
2603
|
+
}
|
|
2552
2604
|
|
|
2553
|
-
|
|
2605
|
+
function notIn(options, key) {
|
|
2606
|
+
return options.every((arr) => !arr || !hasOwn(arr, key));
|
|
2607
|
+
}
|
|
2554
2608
|
|
|
2555
|
-
|
|
2556
|
-
|
|
2609
|
+
function coerce(type, value) {
|
|
2610
|
+
if (type === Boolean) {
|
|
2611
|
+
return toBoolean(value);
|
|
2612
|
+
} else if (type === Number) {
|
|
2613
|
+
return toNumber(value);
|
|
2614
|
+
} else if (type === 'list') {
|
|
2615
|
+
return toList(value);
|
|
2557
2616
|
}
|
|
2558
2617
|
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
return toBoolean(value);
|
|
2562
|
-
} else if (type === Number) {
|
|
2563
|
-
return toNumber(value);
|
|
2564
|
-
} else if (type === 'list') {
|
|
2565
|
-
return toList(value);
|
|
2566
|
-
}
|
|
2618
|
+
return type ? type(value) : value;
|
|
2619
|
+
}
|
|
2567
2620
|
|
|
2568
|
-
|
|
2621
|
+
function toList(value) {
|
|
2622
|
+
return isArray(value) ?
|
|
2623
|
+
value :
|
|
2624
|
+
isString(value) ?
|
|
2625
|
+
value.
|
|
2626
|
+
split(/,(?![^(]*\))/).
|
|
2627
|
+
map((value) => isNumeric(value) ? toNumber(value) : toBoolean(value.trim())) :
|
|
2628
|
+
[value];
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
function normalizeData(_ref, _ref2) {let { data = {} } = _ref;let { args = [], props = {} } = _ref2;
|
|
2632
|
+
if (isArray(data)) {
|
|
2633
|
+
data = data.slice(0, args.length).reduce((data, value, index) => {
|
|
2634
|
+
if (isPlainObject(value)) {
|
|
2635
|
+
assign(data, value);
|
|
2636
|
+
} else {
|
|
2637
|
+
data[args[index]] = value;
|
|
2638
|
+
}
|
|
2639
|
+
return data;
|
|
2640
|
+
}, {});
|
|
2569
2641
|
}
|
|
2570
2642
|
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
map((value) => isNumeric(value) ? toNumber(value) : toBoolean(value.trim())) :
|
|
2578
|
-
[value];
|
|
2643
|
+
for (const key in data) {
|
|
2644
|
+
if (isUndefined(data[key])) {
|
|
2645
|
+
delete data[key];
|
|
2646
|
+
} else if (props[key]) {
|
|
2647
|
+
data[key] = coerce(props[key], data[key]);
|
|
2648
|
+
}
|
|
2579
2649
|
}
|
|
2580
2650
|
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
data = data.slice(0, args.length).reduce((data, value, index) => {
|
|
2584
|
-
if (isPlainObject(value)) {
|
|
2585
|
-
assign(data, value);
|
|
2586
|
-
} else {
|
|
2587
|
-
data[args[index]] = value;
|
|
2588
|
-
}
|
|
2589
|
-
return data;
|
|
2590
|
-
}, {});
|
|
2591
|
-
}
|
|
2651
|
+
return data;
|
|
2652
|
+
}
|
|
2592
2653
|
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
delete data[key];
|
|
2596
|
-
} else if (props[key]) {
|
|
2597
|
-
data[key] = coerce(props[key], data[key]);
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2654
|
+
function initChildListObserver(component) {
|
|
2655
|
+
const { el } = component.$options;
|
|
2600
2656
|
|
|
2601
|
-
|
|
2602
|
-
|
|
2657
|
+
const observer = new MutationObserver(() => component.$emit());
|
|
2658
|
+
observer.observe(el, {
|
|
2659
|
+
childList: true,
|
|
2660
|
+
subtree: true });
|
|
2603
2661
|
|
|
2604
|
-
function initChildListObserver(component) {
|
|
2605
|
-
const { el } = component.$options;
|
|
2606
2662
|
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
childList: true,
|
|
2610
|
-
subtree: true });
|
|
2663
|
+
return observer;
|
|
2664
|
+
}
|
|
2611
2665
|
|
|
2666
|
+
function initPropsObserver(component) {
|
|
2667
|
+
const { $name, $options, $props } = component;
|
|
2668
|
+
const { attrs, props, el } = $options;
|
|
2612
2669
|
|
|
2613
|
-
|
|
2670
|
+
if (!props || attrs === false) {
|
|
2671
|
+
return;
|
|
2614
2672
|
}
|
|
2615
2673
|
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
const { attrs, props, el } = $options;
|
|
2674
|
+
const attributes = isArray(attrs) ? attrs : Object.keys(props);
|
|
2675
|
+
const filter = attributes.map((key) => hyphenate(key)).concat($name);
|
|
2619
2676
|
|
|
2620
|
-
|
|
2621
|
-
|
|
2677
|
+
const observer = new MutationObserver((records) => {
|
|
2678
|
+
const data = getProps$1($options, $name);
|
|
2679
|
+
if (
|
|
2680
|
+
records.some((_ref3) => {let { attributeName } = _ref3;
|
|
2681
|
+
const prop = attributeName.replace('data-', '');
|
|
2682
|
+
return (
|
|
2683
|
+
prop === $name ? attributes : [camelize(prop), camelize(attributeName)]).
|
|
2684
|
+
some((prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
2685
|
+
}))
|
|
2686
|
+
{
|
|
2687
|
+
component.$reset();
|
|
2622
2688
|
}
|
|
2689
|
+
});
|
|
2623
2690
|
|
|
2624
|
-
|
|
2625
|
-
|
|
2691
|
+
observer.observe(el, {
|
|
2692
|
+
attributes: true,
|
|
2693
|
+
attributeFilter: filter.concat(filter.map((key) => "data-" + key)) });
|
|
2626
2694
|
|
|
2627
|
-
const observer = new MutationObserver((records) => {
|
|
2628
|
-
const data = getProps($options, $name);
|
|
2629
|
-
if (
|
|
2630
|
-
records.some((_ref3) => {let { attributeName } = _ref3;
|
|
2631
|
-
const prop = attributeName.replace('data-', '');
|
|
2632
|
-
return (
|
|
2633
|
-
prop === $name ? attributes : [camelize(prop), camelize(attributeName)]).
|
|
2634
|
-
some((prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
2635
|
-
}))
|
|
2636
|
-
{
|
|
2637
|
-
component.$reset();
|
|
2638
|
-
}
|
|
2639
|
-
});
|
|
2640
2695
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2696
|
+
return observer;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
const scrollListeners = new Map();
|
|
2700
|
+
let unbindScrollListener;
|
|
2701
|
+
function registerScrollListener(id, listener) {
|
|
2702
|
+
unbindScrollListener =
|
|
2703
|
+
unbindScrollListener ||
|
|
2704
|
+
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
2705
|
+
passive: true,
|
|
2706
|
+
capture: true });
|
|
2644
2707
|
|
|
2645
2708
|
|
|
2646
|
-
|
|
2709
|
+
scrollListeners.set(id, listener);
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
function unregisterScrollListener(id) {
|
|
2713
|
+
scrollListeners.delete(id);
|
|
2714
|
+
if (unbindScrollListener && !scrollListeners.size) {
|
|
2715
|
+
unbindScrollListener();
|
|
2716
|
+
unbindScrollListener = null;
|
|
2647
2717
|
}
|
|
2648
2718
|
}
|
|
2649
2719
|
|
|
@@ -2820,7 +2890,7 @@
|
|
|
2820
2890
|
UIkit.data = '__uikit__';
|
|
2821
2891
|
UIkit.prefix = 'uk-';
|
|
2822
2892
|
UIkit.options = {};
|
|
2823
|
-
UIkit.version = '3.11.2-dev.
|
|
2893
|
+
UIkit.version = '3.11.2-dev.06fe7f1d0';
|
|
2824
2894
|
|
|
2825
2895
|
globalAPI(UIkit);
|
|
2826
2896
|
hooksAPI(UIkit);
|
|
@@ -2846,27 +2916,7 @@
|
|
|
2846
2916
|
|
|
2847
2917
|
on(window, 'load resize', handleResize);
|
|
2848
2918
|
on(document, 'loadedmetadata load', handleResize, true);
|
|
2849
|
-
|
|
2850
|
-
if ('ResizeObserver' in window) {
|
|
2851
|
-
new ResizeObserver(handleResize).observe(document.documentElement);
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
// throttle `scroll` event (Safari triggers multiple `scroll` events per frame)
|
|
2855
|
-
let pending;
|
|
2856
|
-
on(
|
|
2857
|
-
window,
|
|
2858
|
-
'scroll',
|
|
2859
|
-
(e) => {
|
|
2860
|
-
if (pending) {
|
|
2861
|
-
return;
|
|
2862
|
-
}
|
|
2863
|
-
pending = true;
|
|
2864
|
-
fastdom.read(() => pending = false);
|
|
2865
|
-
|
|
2866
|
-
UIkit.update(null, e.type);
|
|
2867
|
-
},
|
|
2868
|
-
{ passive: true, capture: true });
|
|
2869
|
-
|
|
2919
|
+
observeResize(document.documentElement, handleResize);
|
|
2870
2920
|
|
|
2871
2921
|
let started = 0;
|
|
2872
2922
|
on(
|
|
@@ -2885,45 +2935,6 @@
|
|
|
2885
2935
|
},
|
|
2886
2936
|
true);
|
|
2887
2937
|
|
|
2888
|
-
|
|
2889
|
-
on(
|
|
2890
|
-
document,
|
|
2891
|
-
pointerDown,
|
|
2892
|
-
(e) => {
|
|
2893
|
-
if (!isTouch(e)) {
|
|
2894
|
-
return;
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
// Handle Swipe Gesture
|
|
2898
|
-
const pos = getEventPos(e);
|
|
2899
|
-
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
2900
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
2901
|
-
const { x, y } = getEventPos(e);
|
|
2902
|
-
|
|
2903
|
-
// swipe
|
|
2904
|
-
if (
|
|
2905
|
-
e.type !== 'scroll' && target && x && Math.abs(pos.x - x) > 100 ||
|
|
2906
|
-
y && Math.abs(pos.y - y) > 100)
|
|
2907
|
-
{
|
|
2908
|
-
setTimeout(() => {
|
|
2909
|
-
trigger(target, 'swipe');
|
|
2910
|
-
trigger(target, "swipe" + swipeDirection(pos.x, pos.y, x, y));
|
|
2911
|
-
});
|
|
2912
|
-
}
|
|
2913
|
-
});
|
|
2914
|
-
},
|
|
2915
|
-
{ passive: true });
|
|
2916
|
-
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
function swipeDirection(x1, y1, x2, y2) {
|
|
2920
|
-
return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ?
|
|
2921
|
-
x1 - x2 > 0 ?
|
|
2922
|
-
'Left' :
|
|
2923
|
-
'Right' :
|
|
2924
|
-
y1 - y2 > 0 ?
|
|
2925
|
-
'Up' :
|
|
2926
|
-
'Down';
|
|
2927
2938
|
}
|
|
2928
2939
|
|
|
2929
2940
|
function boot (UIkit) {
|
|
@@ -2988,6 +2999,23 @@
|
|
|
2988
2999
|
!hasClass(this.$el, this.$name) && addClass(this.$el, this.$name);
|
|
2989
3000
|
} };
|
|
2990
3001
|
|
|
3002
|
+
var Lazyload = {
|
|
3003
|
+
methods: {
|
|
3004
|
+
lazyload(observeTargets, targets) {if (observeTargets === void 0) {observeTargets = this.$el;}if (targets === void 0) {targets = this.$el;}
|
|
3005
|
+
this.registerObserver(
|
|
3006
|
+
observeIntersection(observeTargets, (entries, observer) => {
|
|
3007
|
+
for (const el of toNodes(isFunction(targets) ? targets() : targets)) {
|
|
3008
|
+
$$('[loading="lazy"]', el).forEach((el) => removeAttr(el, 'loading'));
|
|
3009
|
+
}
|
|
3010
|
+
for (const el of entries.
|
|
3011
|
+
filter((_ref) => {let { isIntersecting } = _ref;return isIntersecting;}).
|
|
3012
|
+
map((_ref2) => {let { target } = _ref2;return target;})) {
|
|
3013
|
+
observer.unobserve(el);
|
|
3014
|
+
}
|
|
3015
|
+
}));
|
|
3016
|
+
|
|
3017
|
+
} } };
|
|
3018
|
+
|
|
2991
3019
|
var Togglable = {
|
|
2992
3020
|
props: {
|
|
2993
3021
|
cls: Boolean,
|
|
@@ -3175,7 +3203,7 @@
|
|
|
3175
3203
|
}
|
|
3176
3204
|
|
|
3177
3205
|
var Accordion = {
|
|
3178
|
-
mixins: [Class, Togglable],
|
|
3206
|
+
mixins: [Class, Lazyload, Togglable],
|
|
3179
3207
|
|
|
3180
3208
|
props: {
|
|
3181
3209
|
targets: String,
|
|
@@ -3231,6 +3259,10 @@
|
|
|
3231
3259
|
} },
|
|
3232
3260
|
|
|
3233
3261
|
|
|
3262
|
+
connected() {
|
|
3263
|
+
this.lazyload();
|
|
3264
|
+
},
|
|
3265
|
+
|
|
3234
3266
|
events: [
|
|
3235
3267
|
{
|
|
3236
3268
|
name: 'click',
|
|
@@ -3366,6 +3398,8 @@
|
|
|
3366
3398
|
if (this.automute) {
|
|
3367
3399
|
mute(this.$el);
|
|
3368
3400
|
}
|
|
3401
|
+
|
|
3402
|
+
this.registerObserver(observeIntersection(this.$el, () => this.$emit('resize')));
|
|
3369
3403
|
},
|
|
3370
3404
|
|
|
3371
3405
|
update: {
|
|
@@ -3402,6 +3436,10 @@
|
|
|
3402
3436
|
automute: true },
|
|
3403
3437
|
|
|
3404
3438
|
|
|
3439
|
+
connected() {
|
|
3440
|
+
this.registerObserver(observeResize(this.$el, () => this.$emit('resize')));
|
|
3441
|
+
},
|
|
3442
|
+
|
|
3405
3443
|
update: {
|
|
3406
3444
|
read() {
|
|
3407
3445
|
const el = this.$el;
|
|
@@ -3527,7 +3565,7 @@
|
|
|
3527
3565
|
let active$1;
|
|
3528
3566
|
|
|
3529
3567
|
var drop = {
|
|
3530
|
-
mixins: [Container, Position, Togglable],
|
|
3568
|
+
mixins: [Container, Lazyload, Position, Togglable],
|
|
3531
3569
|
|
|
3532
3570
|
args: 'pos',
|
|
3533
3571
|
|
|
@@ -3581,6 +3619,7 @@
|
|
|
3581
3619
|
mode: this.mode }).
|
|
3582
3620
|
$el;
|
|
3583
3621
|
attr(this.target, 'aria-haspopup', true);
|
|
3622
|
+
this.lazyload(this.target);
|
|
3584
3623
|
}
|
|
3585
3624
|
},
|
|
3586
3625
|
|
|
@@ -3956,7 +3995,7 @@
|
|
|
3956
3995
|
name: 'change',
|
|
3957
3996
|
|
|
3958
3997
|
handler() {
|
|
3959
|
-
this.$
|
|
3998
|
+
this.$emit();
|
|
3960
3999
|
} },
|
|
3961
4000
|
|
|
3962
4001
|
|
|
@@ -3968,7 +4007,7 @@
|
|
|
3968
4007
|
},
|
|
3969
4008
|
|
|
3970
4009
|
handler() {
|
|
3971
|
-
this.$
|
|
4010
|
+
this.$emit();
|
|
3972
4011
|
} }] };
|
|
3973
4012
|
|
|
3974
4013
|
// Deprecated
|
|
@@ -4325,6 +4364,8 @@
|
|
|
4325
4364
|
}
|
|
4326
4365
|
|
|
4327
4366
|
var heightViewport = {
|
|
4367
|
+
mixins: [Class],
|
|
4368
|
+
|
|
4328
4369
|
props: {
|
|
4329
4370
|
expand: Boolean,
|
|
4330
4371
|
offsetTop: Boolean,
|
|
@@ -4784,7 +4825,6 @@
|
|
|
4784
4825
|
}
|
|
4785
4826
|
|
|
4786
4827
|
const nativeLazyLoad = ('loading' in HTMLImageElement.prototype);
|
|
4787
|
-
const nativeIsIntersecting = ('isIntersecting' in IntersectionObserverEntry.prototype); // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
4788
4828
|
|
|
4789
4829
|
var img = {
|
|
4790
4830
|
args: 'dataSrc',
|
|
@@ -4814,13 +4854,13 @@
|
|
|
4814
4854
|
},
|
|
4815
4855
|
|
|
4816
4856
|
watch() {
|
|
4817
|
-
this
|
|
4857
|
+
this.$reset();
|
|
4818
4858
|
} } },
|
|
4819
4859
|
|
|
4820
4860
|
|
|
4821
4861
|
|
|
4822
4862
|
connected() {
|
|
4823
|
-
if (this.loading !== 'lazy' || !
|
|
4863
|
+
if (this.loading !== 'lazy' || !hasIntersectionObserver) {
|
|
4824
4864
|
this.load();
|
|
4825
4865
|
return;
|
|
4826
4866
|
}
|
|
@@ -4836,28 +4876,27 @@
|
|
|
4836
4876
|
|
|
4837
4877
|
ensureSrcAttribute(this.$el);
|
|
4838
4878
|
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
if (entries.some((entry) => entry.isIntersecting)) {
|
|
4846
|
-
this.load();
|
|
4847
|
-
this.observer.disconnect();
|
|
4848
|
-
}
|
|
4879
|
+
this.registerObserver(
|
|
4880
|
+
observeIntersection(
|
|
4881
|
+
this.target,
|
|
4882
|
+
(entries, observer) => {
|
|
4883
|
+
this.load();
|
|
4884
|
+
observer.disconnect();
|
|
4849
4885
|
},
|
|
4850
|
-
{
|
|
4886
|
+
{
|
|
4887
|
+
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
4888
|
+
this.offsetLeft,
|
|
4889
|
+
'width') + "px" }));
|
|
4890
|
+
|
|
4891
|
+
|
|
4892
|
+
|
|
4851
4893
|
|
|
4852
|
-
this.observe();
|
|
4853
4894
|
},
|
|
4854
4895
|
|
|
4855
|
-
disconnected() {
|
|
4896
|
+
disconnected() {
|
|
4856
4897
|
if (this._data.image) {
|
|
4857
4898
|
this._data.image.onload = '';
|
|
4858
4899
|
}
|
|
4859
|
-
|
|
4860
|
-
(_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
|
|
4861
4900
|
},
|
|
4862
4901
|
|
|
4863
4902
|
update: {
|
|
@@ -4892,14 +4931,6 @@
|
|
|
4892
4931
|
removeAttr(image, 'loading');
|
|
4893
4932
|
setSrcAttrs(this.$el, image.currentSrc);
|
|
4894
4933
|
return this._data.image = image;
|
|
4895
|
-
},
|
|
4896
|
-
|
|
4897
|
-
observe() {
|
|
4898
|
-
if (this._connected && !this._data.image) {
|
|
4899
|
-
for (const el of this.target) {
|
|
4900
|
-
this.observer.observe(el);
|
|
4901
|
-
}
|
|
4902
|
-
}
|
|
4903
4934
|
} } };
|
|
4904
4935
|
|
|
4905
4936
|
|
|
@@ -5923,8 +5954,69 @@
|
|
|
5923
5954
|
RIGHT: 39,
|
|
5924
5955
|
DOWN: 40 };
|
|
5925
5956
|
|
|
5957
|
+
var Swipe = {
|
|
5958
|
+
props: {
|
|
5959
|
+
swiping: Boolean },
|
|
5960
|
+
|
|
5961
|
+
|
|
5962
|
+
data: {
|
|
5963
|
+
swiping: true },
|
|
5964
|
+
|
|
5965
|
+
|
|
5966
|
+
computed: {
|
|
5967
|
+
swipeTarget(props, $el) {
|
|
5968
|
+
return $el;
|
|
5969
|
+
} },
|
|
5970
|
+
|
|
5971
|
+
|
|
5972
|
+
connected() {
|
|
5973
|
+
if (!this.swiping) {
|
|
5974
|
+
return;
|
|
5975
|
+
}
|
|
5976
|
+
|
|
5977
|
+
registerEvent(this, {
|
|
5978
|
+
el: this.swipeTarget,
|
|
5979
|
+
name: pointerDown,
|
|
5980
|
+
passive: true,
|
|
5981
|
+
handler(e) {
|
|
5982
|
+
if (!isTouch(e)) {
|
|
5983
|
+
return;
|
|
5984
|
+
}
|
|
5985
|
+
|
|
5986
|
+
// Handle Swipe Gesture
|
|
5987
|
+
const pos = getEventPos(e);
|
|
5988
|
+
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
5989
|
+
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
5990
|
+
const { x, y } = getEventPos(e);
|
|
5991
|
+
|
|
5992
|
+
// swipe
|
|
5993
|
+
if (
|
|
5994
|
+
e.type !== 'scroll' && target && x && Math.abs(pos.x - x) > 100 ||
|
|
5995
|
+
y && Math.abs(pos.y - y) > 100)
|
|
5996
|
+
{
|
|
5997
|
+
setTimeout(() => {
|
|
5998
|
+
trigger(target, 'swipe');
|
|
5999
|
+
trigger(target, "swipe" + swipeDirection(pos.x, pos.y, x, y));
|
|
6000
|
+
});
|
|
6001
|
+
}
|
|
6002
|
+
});
|
|
6003
|
+
} });
|
|
6004
|
+
|
|
6005
|
+
} };
|
|
6006
|
+
|
|
6007
|
+
|
|
6008
|
+
function swipeDirection(x1, y1, x2, y2) {
|
|
6009
|
+
return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ?
|
|
6010
|
+
x1 - x2 > 0 ?
|
|
6011
|
+
'Left' :
|
|
6012
|
+
'Right' :
|
|
6013
|
+
y1 - y2 > 0 ?
|
|
6014
|
+
'Up' :
|
|
6015
|
+
'Down';
|
|
6016
|
+
}
|
|
6017
|
+
|
|
5926
6018
|
var offcanvas = {
|
|
5927
|
-
mixins: [Modal],
|
|
6019
|
+
mixins: [Modal, Swipe],
|
|
5928
6020
|
|
|
5929
6021
|
args: 'mode',
|
|
5930
6022
|
|
|
@@ -6557,34 +6649,29 @@
|
|
|
6557
6649
|
return window;
|
|
6558
6650
|
},
|
|
6559
6651
|
|
|
6652
|
+
filter() {
|
|
6653
|
+
return this.targetOffset !== false;
|
|
6654
|
+
},
|
|
6655
|
+
|
|
6560
6656
|
handler() {
|
|
6561
|
-
if (!
|
|
6657
|
+
if (!location.hash || scrollTop(window) === 0) {
|
|
6562
6658
|
return;
|
|
6563
6659
|
}
|
|
6564
6660
|
|
|
6565
|
-
|
|
6661
|
+
fastdom.read(() => {
|
|
6662
|
+
const targetOffset = offset($(location.hash));
|
|
6663
|
+
const elOffset = offset(this.$el);
|
|
6566
6664
|
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6665
|
+
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6666
|
+
scrollTop(
|
|
6667
|
+
window,
|
|
6668
|
+
targetOffset.top -
|
|
6669
|
+
elOffset.height -
|
|
6670
|
+
toPx(this.targetOffset, 'height') -
|
|
6671
|
+
toPx(this.offset, 'height'));
|
|
6572
6672
|
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
elTop + elHeight >= top &&
|
|
6576
|
-
elTop <= top + target.offsetHeight)
|
|
6577
|
-
{
|
|
6578
|
-
scrollTop(
|
|
6579
|
-
window,
|
|
6580
|
-
top -
|
|
6581
|
-
elHeight - (
|
|
6582
|
-
isNumeric(this.targetOffset) ? this.targetOffset : 0) -
|
|
6583
|
-
this._data.offset);
|
|
6584
|
-
|
|
6585
|
-
}
|
|
6586
|
-
});
|
|
6587
|
-
}
|
|
6673
|
+
}
|
|
6674
|
+
});
|
|
6588
6675
|
} }],
|
|
6589
6676
|
|
|
6590
6677
|
|
|
@@ -6615,20 +6702,19 @@
|
|
|
6615
6702
|
}
|
|
6616
6703
|
|
|
6617
6704
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
6705
|
+
const windowHeight = height(window);
|
|
6618
6706
|
|
|
6619
6707
|
let position = this.position;
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
position = height$1 > height(window) ? 'bottom' : 'top';
|
|
6708
|
+
if (position === 'auto' && height$1 > windowHeight) {
|
|
6709
|
+
position = 'bottom';
|
|
6623
6710
|
}
|
|
6624
6711
|
|
|
6625
|
-
let offset$1 = this.offset;
|
|
6712
|
+
let offset$1 = toPx(this.offset, 'height', referenceElement);
|
|
6626
6713
|
if (position === 'bottom') {
|
|
6627
|
-
offset$1 +=
|
|
6714
|
+
offset$1 += windowHeight - height$1;
|
|
6628
6715
|
}
|
|
6629
|
-
offset$1 = toPx(offset$1, 'height', referenceElement);
|
|
6630
6716
|
|
|
6631
|
-
const overflow = Math.max(0, height$1 + offset$1 -
|
|
6717
|
+
const overflow = Math.max(0, height$1 + offset$1 - windowHeight);
|
|
6632
6718
|
const topOffset = offset(referenceElement).top;
|
|
6633
6719
|
const offsetParentTop = offset(referenceElement.offsetParent).top;
|
|
6634
6720
|
|
|
@@ -6638,7 +6724,7 @@
|
|
|
6638
6724
|
const start = Math.max(top, topOffset) - offset$1;
|
|
6639
6725
|
const end = bottom ?
|
|
6640
6726
|
bottom - offset(this.$el).height + overflow - offset$1 :
|
|
6641
|
-
getScrollingElement(this.$el).scrollHeight -
|
|
6727
|
+
getScrollingElement(this.$el).scrollHeight - windowHeight;
|
|
6642
6728
|
|
|
6643
6729
|
return {
|
|
6644
6730
|
start,
|
|
@@ -6844,7 +6930,7 @@
|
|
|
6844
6930
|
}
|
|
6845
6931
|
|
|
6846
6932
|
var Switcher = {
|
|
6847
|
-
mixins: [Togglable],
|
|
6933
|
+
mixins: [Lazyload, Swipe, Togglable],
|
|
6848
6934
|
|
|
6849
6935
|
args: 'connect',
|
|
6850
6936
|
|
|
@@ -6852,8 +6938,7 @@
|
|
|
6852
6938
|
connect: String,
|
|
6853
6939
|
toggle: String,
|
|
6854
6940
|
itemNav: String,
|
|
6855
|
-
active: Number,
|
|
6856
|
-
swiping: Boolean },
|
|
6941
|
+
active: Number },
|
|
6857
6942
|
|
|
6858
6943
|
|
|
6859
6944
|
data: {
|
|
@@ -6861,7 +6946,6 @@
|
|
|
6861
6946
|
toggle: '> * > :first-child',
|
|
6862
6947
|
itemNav: false,
|
|
6863
6948
|
active: 0,
|
|
6864
|
-
swiping: true,
|
|
6865
6949
|
cls: 'uk-active',
|
|
6866
6950
|
attrItem: 'uk-switcher-item' },
|
|
6867
6951
|
|
|
@@ -6905,9 +6989,17 @@
|
|
|
6905
6989
|
return children(this.$el).filter((child) =>
|
|
6906
6990
|
this.toggles.some((toggle) => within(toggle, child)));
|
|
6907
6991
|
|
|
6992
|
+
},
|
|
6993
|
+
|
|
6994
|
+
swipeTarget() {
|
|
6995
|
+
return this.connects;
|
|
6908
6996
|
} },
|
|
6909
6997
|
|
|
6910
6998
|
|
|
6999
|
+
connected() {
|
|
7000
|
+
this.lazyload(this.$el, this.connects);
|
|
7001
|
+
},
|
|
7002
|
+
|
|
6911
7003
|
events: [
|
|
6912
7004
|
{
|
|
6913
7005
|
name: 'click',
|
|
@@ -7016,7 +7108,7 @@
|
|
|
7016
7108
|
const KEY_SPACE = 32;
|
|
7017
7109
|
|
|
7018
7110
|
var toggle = {
|
|
7019
|
-
mixins: [Media, Togglable],
|
|
7111
|
+
mixins: [Lazyload, Media, Togglable],
|
|
7020
7112
|
|
|
7021
7113
|
args: 'target',
|
|
7022
7114
|
|
|
@@ -7038,6 +7130,7 @@
|
|
|
7038
7130
|
if (!includes(this.mode, 'media') && !isFocusable(this.$el)) {
|
|
7039
7131
|
attr(this.$el, 'tabindex', '0');
|
|
7040
7132
|
}
|
|
7133
|
+
this.lazyload(this.$el, this.target);
|
|
7041
7134
|
},
|
|
7042
7135
|
|
|
7043
7136
|
computed: {
|
|
@@ -7390,8 +7483,8 @@
|
|
|
7390
7483
|
this.stop();
|
|
7391
7484
|
|
|
7392
7485
|
if (this.date && this.units.length) {
|
|
7393
|
-
this.$
|
|
7394
|
-
this.timer = setInterval(this.$
|
|
7486
|
+
this.$emit();
|
|
7487
|
+
this.timer = setInterval(() => this.$emit(), 1000);
|
|
7395
7488
|
}
|
|
7396
7489
|
},
|
|
7397
7490
|
|
|
@@ -8441,12 +8534,6 @@
|
|
|
8441
8534
|
} },
|
|
8442
8535
|
|
|
8443
8536
|
|
|
8444
|
-
events: {
|
|
8445
|
-
itemshown() {
|
|
8446
|
-
this.$update(this.list);
|
|
8447
|
-
} },
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
8537
|
methods: {
|
|
8451
8538
|
show(index, force) {if (force === void 0) {force = false;}
|
|
8452
8539
|
if (this.dragging || !this.length) {
|
|
@@ -8608,19 +8695,15 @@
|
|
|
8608
8695
|
|
|
8609
8696
|
|
|
8610
8697
|
events: {
|
|
8611
|
-
|
|
8612
|
-
this.$update(target);
|
|
8613
|
-
},
|
|
8614
|
-
|
|
8615
|
-
beforeitemshow(_ref3) {let { target } = _ref3;
|
|
8698
|
+
beforeitemshow(_ref2) {let { target } = _ref2;
|
|
8616
8699
|
addClass(target, this.clsActive);
|
|
8617
8700
|
},
|
|
8618
8701
|
|
|
8619
|
-
itemshown(
|
|
8702
|
+
itemshown(_ref3) {let { target } = _ref3;
|
|
8620
8703
|
addClass(target, this.clsActivated);
|
|
8621
8704
|
},
|
|
8622
8705
|
|
|
8623
|
-
itemhidden(
|
|
8706
|
+
itemhidden(_ref4) {let { target } = _ref4;
|
|
8624
8707
|
removeClass(target, this.clsActive, this.clsActivated);
|
|
8625
8708
|
} } };
|
|
8626
8709
|
|
|
@@ -9195,7 +9278,7 @@
|
|
|
9195
9278
|
|
|
9196
9279
|
|
|
9197
9280
|
events: {
|
|
9198
|
-
|
|
9281
|
+
load() {
|
|
9199
9282
|
this.$emit();
|
|
9200
9283
|
} },
|
|
9201
9284
|
|
|
@@ -9206,13 +9289,11 @@
|
|
|
9206
9289
|
},
|
|
9207
9290
|
|
|
9208
9291
|
getCss(percent) {
|
|
9209
|
-
|
|
9210
|
-
(
|
|
9292
|
+
const css = { transform: '', filter: '' };
|
|
9293
|
+
for (const prop in this.props) {
|
|
9211
9294
|
this.props[prop](css, percent);
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
{ transform: '', filter: '' });
|
|
9215
|
-
|
|
9295
|
+
}
|
|
9296
|
+
return css;
|
|
9216
9297
|
} } };
|
|
9217
9298
|
|
|
9218
9299
|
|
|
@@ -9395,8 +9476,9 @@
|
|
|
9395
9476
|
if (!image.naturalWidth) {
|
|
9396
9477
|
image.onload = () => {
|
|
9397
9478
|
dimensions[src] = toDimensions(image);
|
|
9398
|
-
trigger(el, '
|
|
9479
|
+
trigger(el, 'load');
|
|
9399
9480
|
};
|
|
9481
|
+
return toDimensions(image);
|
|
9400
9482
|
}
|
|
9401
9483
|
}
|
|
9402
9484
|
|
|
@@ -9587,40 +9669,11 @@
|
|
|
9587
9669
|
events: ['resize'] } };
|
|
9588
9670
|
|
|
9589
9671
|
var SliderPreload = {
|
|
9590
|
-
|
|
9591
|
-
if (window.IntersectionObserver) {
|
|
9592
|
-
this.observer = new IntersectionObserver(
|
|
9593
|
-
(entries) => {
|
|
9594
|
-
if (entries.some((entry) => entry.isIntersecting)) {
|
|
9595
|
-
removeLazyLoad(this.getAdjacentSlides());
|
|
9596
|
-
}
|
|
9597
|
-
},
|
|
9598
|
-
{ rootMargin: '50% 50%' });
|
|
9599
|
-
|
|
9600
|
-
this.observer.observe(this.$el);
|
|
9601
|
-
}
|
|
9602
|
-
},
|
|
9672
|
+
mixins: [Lazyload],
|
|
9603
9673
|
|
|
9604
|
-
|
|
9605
|
-
this.
|
|
9606
|
-
}
|
|
9607
|
-
|
|
9608
|
-
update: {
|
|
9609
|
-
read() {
|
|
9610
|
-
if (isVisible(this.$el)) {
|
|
9611
|
-
removeLazyLoad(this.getAdjacentSlides());
|
|
9612
|
-
}
|
|
9613
|
-
},
|
|
9614
|
-
|
|
9615
|
-
events: ['resize'] } };
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
function removeLazyLoad(elements) {if (elements === void 0) {elements = [];}
|
|
9620
|
-
for (const el of elements) {
|
|
9621
|
-
el && $$('img[loading="lazy"]', el).forEach((el) => removeAttr(el, 'loading'));
|
|
9622
|
-
}
|
|
9623
|
-
}
|
|
9674
|
+
connected() {
|
|
9675
|
+
this.lazyload(this.slides, this.getAdjacentSlides);
|
|
9676
|
+
} };
|
|
9624
9677
|
|
|
9625
9678
|
function Transitioner (prev, next, dir, _ref) {let { center, easing, list } = _ref;
|
|
9626
9679
|
const deferred = new Deferred();
|
|
@@ -9840,48 +9893,39 @@
|
|
|
9840
9893
|
return ~index ? index : this.length - 1;
|
|
9841
9894
|
},
|
|
9842
9895
|
|
|
9843
|
-
sets(_ref2) {let { sets } = _ref2;
|
|
9844
|
-
if (!
|
|
9896
|
+
sets(_ref2) {let { sets: enabled } = _ref2;
|
|
9897
|
+
if (!enabled) {
|
|
9845
9898
|
return;
|
|
9846
9899
|
}
|
|
9847
9900
|
|
|
9848
|
-
const width = dimensions$1(this.list).width / (this.center ? 2 : 1);
|
|
9849
|
-
|
|
9850
9901
|
let left = 0;
|
|
9851
|
-
|
|
9852
|
-
|
|
9902
|
+
const sets = [];
|
|
9903
|
+
const width = dimensions$1(this.list).width;
|
|
9904
|
+
for (let i in this.slides) {
|
|
9905
|
+
const slideWidth = dimensions$1(this.slides[i]).width;
|
|
9853
9906
|
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
if (slideRight > left) {
|
|
9859
|
-
if (!this.center && i > this.maxIndex) {
|
|
9860
|
-
i = this.maxIndex;
|
|
9861
|
-
}
|
|
9907
|
+
if (left + slideWidth > width) {
|
|
9908
|
+
left = 0;
|
|
9909
|
+
}
|
|
9862
9910
|
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
leftCenter -= slideWidth;
|
|
9871
|
-
} else {
|
|
9872
|
-
leftCenter = width;
|
|
9873
|
-
sets.push(i);
|
|
9874
|
-
left = slideLeft + width + (this.center ? slideWidth / 2 : 0);
|
|
9875
|
-
}
|
|
9911
|
+
if (this.center) {
|
|
9912
|
+
if (
|
|
9913
|
+
left < width / 2 &&
|
|
9914
|
+
left + slideWidth + dimensions$1(this.slides[+i + 1]).width / 2 > width / 2)
|
|
9915
|
+
{
|
|
9916
|
+
sets.push(+i);
|
|
9917
|
+
left = width / 2 - slideWidth / 2;
|
|
9876
9918
|
}
|
|
9919
|
+
} else if (left === 0) {
|
|
9920
|
+
sets.push(Math.min(+i, this.maxIndex));
|
|
9877
9921
|
}
|
|
9878
9922
|
|
|
9879
|
-
|
|
9923
|
+
left += slideWidth;
|
|
9924
|
+
}
|
|
9880
9925
|
|
|
9926
|
+
if (sets.length) {
|
|
9881
9927
|
return sets;
|
|
9882
|
-
}
|
|
9883
|
-
|
|
9884
|
-
return !isEmpty(sets) && sets;
|
|
9928
|
+
}
|
|
9885
9929
|
},
|
|
9886
9930
|
|
|
9887
9931
|
transitionOptions() {
|
|
@@ -9913,15 +9957,7 @@
|
|
|
9913
9957
|
this._translate(1);
|
|
9914
9958
|
}
|
|
9915
9959
|
|
|
9916
|
-
|
|
9917
|
-
const activeClasses = [
|
|
9918
|
-
this.clsActive,
|
|
9919
|
-
(!this.sets || includes(this.sets, toFloat(this.index))) && this.clsActivated ||
|
|
9920
|
-
''];
|
|
9921
|
-
|
|
9922
|
-
for (const slide of this.slides) {
|
|
9923
|
-
toggleClass(slide, activeClasses, includes(actives, slide));
|
|
9924
|
-
}
|
|
9960
|
+
this.updateActiveClasses();
|
|
9925
9961
|
},
|
|
9926
9962
|
|
|
9927
9963
|
events: ['resize'] },
|
|
@@ -9969,6 +10005,10 @@
|
|
|
9969
10005
|
if (~this.prevIndex) {
|
|
9970
10006
|
addClass(this._getTransitioner().getItemIn(), this.clsActive);
|
|
9971
10007
|
}
|
|
10008
|
+
},
|
|
10009
|
+
|
|
10010
|
+
itemshown() {
|
|
10011
|
+
this.updateActiveClasses();
|
|
9972
10012
|
} },
|
|
9973
10013
|
|
|
9974
10014
|
|
|
@@ -10006,6 +10046,18 @@
|
|
|
10006
10046
|
}
|
|
10007
10047
|
},
|
|
10008
10048
|
|
|
10049
|
+
updateActiveClasses() {
|
|
10050
|
+
const actives = this._getTransitioner(this.index).getActives();
|
|
10051
|
+
const activeClasses = [
|
|
10052
|
+
this.clsActive,
|
|
10053
|
+
(!this.sets || includes(this.sets, toFloat(this.index))) && this.clsActivated ||
|
|
10054
|
+
''];
|
|
10055
|
+
|
|
10056
|
+
for (const slide of this.slides) {
|
|
10057
|
+
toggleClass(slide, activeClasses, includes(actives, slide));
|
|
10058
|
+
}
|
|
10059
|
+
},
|
|
10060
|
+
|
|
10009
10061
|
getValidIndex(index, prevIndex) {if (index === void 0) {index = this.index;}if (prevIndex === void 0) {prevIndex = this.prevIndex;}
|
|
10010
10062
|
index = this.getIndex(index, prevIndex);
|
|
10011
10063
|
|
|
@@ -10986,6 +11038,7 @@
|
|
|
10986
11038
|
}
|
|
10987
11039
|
|
|
10988
11040
|
function chunk(files, size) {
|
|
11041
|
+
files = toArray(files);
|
|
10989
11042
|
const chunks = [];
|
|
10990
11043
|
for (let i = 0; i < files.length; i += size) {
|
|
10991
11044
|
chunks.push(files.slice(i, i + size));
|