framework7 8.0.0-beta.1 → 8.0.0-beta.3
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/components/app/app-class.js +6 -2
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.less +22 -0
- package/components/dialog/dialog-md.less +1 -0
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog.css +1 -1
- package/components/notification/notification.d.ts +1 -1
- package/components/panel/panel-class.js +14 -0
- package/components/photo-browser/photo-browser-class.js +1 -0
- package/components/photo-browser/photo-browser.d.ts +2 -0
- package/components/photo-browser/photo-browser.js +2 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.less +36 -33
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.less +4 -0
- package/components/smart-select/smart-select-class.js +19 -5
- package/components/smart-select/smart-select.d.ts +4 -1
- package/components/smart-select/smart-select.js +2 -0
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +6 -18
- package/components/toolbar/toolbar-ios.less +1 -0
- package/framework7-bundle-rtl.css +88 -36
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +88 -36
- package/framework7-bundle.esm.js +3 -3
- package/framework7-bundle.js +789 -435
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +3 -3
- package/framework7-bundle.min.css +4 -4
- package/framework7-bundle.min.js +4 -4
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +3 -3
- package/framework7-lite.esm.js +3 -3
- package/framework7-rtl.css +4 -3
- package/framework7-rtl.min.css +4 -4
- package/framework7.css +4 -3
- package/framework7.esm.js +3 -3
- package/framework7.less +3 -3
- package/framework7.min.css +4 -4
- package/modules/router/back.js +22 -6
- package/modules/router/navigate.js +11 -2
- package/modules/router/router-class.js +3 -2
- package/modules/router/router.d.ts +1 -1
- package/package.json +5 -21
- package/components/accordion/accordion.lazy.js +0 -1
- package/components/actions/actions.lazy.js +0 -1
- package/components/area-chart/area-chart.lazy.js +0 -1
- package/components/autocomplete/autocomplete.lazy.js +0 -1
- package/components/breadcrumbs/breadcrumbs.lazy.js +0 -1
- package/components/calendar/calendar.lazy.js +0 -1
- package/components/card/card.lazy.js +0 -1
- package/components/checkbox/checkbox.lazy.js +0 -1
- package/components/chip/chip.lazy.js +0 -1
- package/components/color-picker/color-picker.lazy.js +0 -1
- package/components/contacts-list/contacts-list.lazy.js +0 -1
- package/components/data-table/data-table.lazy.js +0 -1
- package/components/dialog/dialog.lazy.js +0 -1
- package/components/fab/fab.lazy.js +0 -1
- package/components/form/form.lazy.js +0 -1
- package/components/gauge/gauge.lazy.js +0 -1
- package/components/grid/grid.lazy.js +0 -1
- package/components/infinite-scroll/infinite-scroll.lazy.js +0 -1
- package/components/input/input.lazy.js +0 -1
- package/components/list-index/list-index.lazy.js +0 -1
- package/components/login-screen/login-screen.lazy.js +0 -1
- package/components/messagebar/messagebar.lazy.js +0 -1
- package/components/messages/messages.lazy.js +0 -1
- package/components/notification/notification.lazy.js +0 -1
- package/components/panel/panel.lazy.js +0 -1
- package/components/photo-browser/photo-browser.lazy.js +0 -1
- package/components/picker/picker.lazy.js +0 -1
- package/components/pie-chart/pie-chart.lazy.js +0 -1
- package/components/popover/popover.lazy.js +0 -1
- package/components/popup/popup.lazy.js +0 -1
- package/components/preloader/preloader.lazy.js +0 -1
- package/components/progressbar/progressbar.lazy.js +0 -1
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +0 -1
- package/components/radio/radio.lazy.js +0 -1
- package/components/range/range.lazy.js +0 -1
- package/components/searchbar/searchbar.lazy.js +0 -1
- package/components/sheet/sheet.lazy.js +0 -1
- package/components/skeleton/skeleton.lazy.js +0 -1
- package/components/smart-select/smart-select.lazy.js +0 -1
- package/components/sortable/sortable.lazy.js +0 -1
- package/components/stepper/stepper.lazy.js +0 -1
- package/components/swipeout/swipeout.lazy.js +0 -1
- package/components/swiper/swiper.lazy.js +0 -1
- package/components/tabs/tabs.lazy.js +0 -1
- package/components/text-editor/text-editor.lazy.js +0 -1
- package/components/timeline/timeline.lazy.js +0 -1
- package/components/toast/toast.lazy.js +0 -1
- package/components/toggle/toggle.lazy.js +0 -1
- package/components/tooltip/tooltip.lazy.js +0 -1
- package/components/treeview/treeview.lazy.js +0 -1
- package/components/typography/typography.lazy.js +0 -1
- package/components/virtual-list/virtual-list.lazy.js +0 -1
- package/framework7-lite.js +0 -31
- package/framework7.js +0 -13027
- package/framework7.js.map +0 -1
- package/framework7.min.js +0 -14
- package/framework7.min.js.map +0 -1
- package/less/plugin.js +0 -15
package/framework7-bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 8.0.0-beta.
|
|
2
|
+
* Framework7 8.0.0-beta.3
|
|
3
3
|
* Full featured mobile HTML framework for building iOS & Android apps
|
|
4
4
|
* https://framework7.io/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2023 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: March 9, 2023
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
(function (global, factory) {
|
|
@@ -161,15 +161,15 @@
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
* Dom7 4.0.
|
|
164
|
+
* Dom7 4.0.6
|
|
165
165
|
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
|
166
166
|
* https://framework7.io/docs/dom7.html
|
|
167
167
|
*
|
|
168
|
-
* Copyright
|
|
168
|
+
* Copyright 2023, Vladimir Kharlampidi
|
|
169
169
|
*
|
|
170
170
|
* Licensed under MIT
|
|
171
171
|
*
|
|
172
|
-
* Released on:
|
|
172
|
+
* Released on: February 2, 2023
|
|
173
173
|
*/
|
|
174
174
|
|
|
175
175
|
/* eslint-disable no-proto */
|
|
@@ -610,6 +610,18 @@
|
|
|
610
610
|
}
|
|
611
611
|
return this;
|
|
612
612
|
}
|
|
613
|
+
function transitionStart$1(callback) {
|
|
614
|
+
const dom = this;
|
|
615
|
+
function fireCallBack(e) {
|
|
616
|
+
if (e.target !== this) return;
|
|
617
|
+
callback.call(this, e);
|
|
618
|
+
dom.off('transitionstart', fireCallBack);
|
|
619
|
+
}
|
|
620
|
+
if (callback) {
|
|
621
|
+
dom.on('transitionstart', fireCallBack);
|
|
622
|
+
}
|
|
623
|
+
return this;
|
|
624
|
+
}
|
|
613
625
|
function transitionEnd$1(callback) {
|
|
614
626
|
const dom = this;
|
|
615
627
|
function fireCallBack(e) {
|
|
@@ -1494,6 +1506,7 @@
|
|
|
1494
1506
|
transform: transform,
|
|
1495
1507
|
transition: transition$1,
|
|
1496
1508
|
transitionEnd: transitionEnd$1,
|
|
1509
|
+
transitionStart: transitionStart$1,
|
|
1497
1510
|
trigger: trigger,
|
|
1498
1511
|
val: val,
|
|
1499
1512
|
value: value,
|
|
@@ -3590,7 +3603,7 @@
|
|
|
3590
3603
|
lazyModulesPath: null,
|
|
3591
3604
|
initOnDeviceReady: true,
|
|
3592
3605
|
init: true,
|
|
3593
|
-
darkMode:
|
|
3606
|
+
darkMode: undefined,
|
|
3594
3607
|
iosTranslucentBars: true,
|
|
3595
3608
|
iosTranslucentModals: true,
|
|
3596
3609
|
component: undefined,
|
|
@@ -3802,7 +3815,11 @@
|
|
|
3802
3815
|
}
|
|
3803
3816
|
|
|
3804
3817
|
// Auto Dark Mode
|
|
3805
|
-
|
|
3818
|
+
if (typeof app.params.darkMode === 'undefined') {
|
|
3819
|
+
app.darkMode = $('html').hasClass('dark');
|
|
3820
|
+
} else {
|
|
3821
|
+
app.setDarkMode(app.params.darkMode);
|
|
3822
|
+
}
|
|
3806
3823
|
|
|
3807
3824
|
// Watch for online/offline state
|
|
3808
3825
|
const window = getWindow();
|
|
@@ -5821,12 +5838,16 @@
|
|
|
5821
5838
|
}
|
|
5822
5839
|
}
|
|
5823
5840
|
|
|
5824
|
-
function refreshPage() {
|
|
5841
|
+
function refreshPage(props) {
|
|
5842
|
+
if (props === void 0) {
|
|
5843
|
+
props = {};
|
|
5844
|
+
}
|
|
5825
5845
|
const router = this;
|
|
5826
5846
|
appRouterCheck(router, 'refreshPage');
|
|
5827
5847
|
return router.navigate(router.currentRoute.url, {
|
|
5828
5848
|
ignoreCache: true,
|
|
5829
|
-
reloadCurrent: true
|
|
5849
|
+
reloadCurrent: true,
|
|
5850
|
+
props
|
|
5830
5851
|
});
|
|
5831
5852
|
}
|
|
5832
5853
|
function forward(router, el, forwardOptions) {
|
|
@@ -6100,14 +6121,19 @@
|
|
|
6100
6121
|
if (((options.reloadCurrent || reloadDetail && otherDetailPageEl) && router.history.length) > 0 || options.replaceState) {
|
|
6101
6122
|
if (reloadDetail && detailsInBetweenRemoved > 0) {
|
|
6102
6123
|
router.history = router.history.slice(0, router.history.length - detailsInBetweenRemoved);
|
|
6124
|
+
router.propsHistory = router.propsHistory.slice(0, router.propsHistory.length - detailsInBetweenRemoved);
|
|
6103
6125
|
}
|
|
6104
6126
|
router.history[router.history.length - (options.reloadPrevious ? 2 : 1)] = url;
|
|
6127
|
+
router.propsHistory[router.propsHistory.length - (options.reloadPrevious ? 2 : 1)] = options.props || {};
|
|
6105
6128
|
} else if (options.reloadPrevious) {
|
|
6106
6129
|
router.history[router.history.length - 2] = url;
|
|
6130
|
+
router.propsHistory[router.propsHistory.length - 2] = options.props || {};
|
|
6107
6131
|
} else if (options.reloadAll) {
|
|
6108
6132
|
router.history = [url];
|
|
6133
|
+
router.propsHistory = [options.props || {}];
|
|
6109
6134
|
} else {
|
|
6110
6135
|
router.history.push(url);
|
|
6136
|
+
router.propsHistory.push(options.props || {});
|
|
6111
6137
|
}
|
|
6112
6138
|
}
|
|
6113
6139
|
router.saveHistory();
|
|
@@ -7176,11 +7202,13 @@
|
|
|
7176
7202
|
if (router.history.indexOf(options.route.url) >= 0) {
|
|
7177
7203
|
backIndex = router.history.length - router.history.indexOf(options.route.url) - 1;
|
|
7178
7204
|
router.history = router.history.slice(0, router.history.indexOf(options.route.url) + 2);
|
|
7205
|
+
router.propsHistory = router.propsHistory.slice(0, router.history.indexOf(options.route.url) + 2);
|
|
7179
7206
|
view.history = router.history;
|
|
7180
7207
|
} else if (router.history[[router.history.length - 2]]) {
|
|
7181
|
-
router.
|
|
7208
|
+
router.propsHistory[router.propsHistory.length - 2] = options.props || {};
|
|
7182
7209
|
} else {
|
|
7183
7210
|
router.history.unshift(router.url);
|
|
7211
|
+
router.propsHistory.unshift(options.props || {});
|
|
7184
7212
|
}
|
|
7185
7213
|
const $pageToRemove = $oldPage.prev('.page-previous');
|
|
7186
7214
|
let $navbarToRemove;
|
|
@@ -7306,11 +7334,14 @@
|
|
|
7306
7334
|
// Update History
|
|
7307
7335
|
if (options.replaceState) {
|
|
7308
7336
|
router.history[router.history.length - 1] = options.route.url;
|
|
7337
|
+
router.propsHistory[router.propsHistory.length - 1] = options.props || {};
|
|
7309
7338
|
} else {
|
|
7310
7339
|
if (router.history.length === 1) {
|
|
7311
7340
|
router.history.unshift(router.url);
|
|
7341
|
+
router.propsHistory.unshift(options.props || {});
|
|
7312
7342
|
}
|
|
7313
7343
|
router.history.pop();
|
|
7344
|
+
router.propsHistory.pop();
|
|
7314
7345
|
}
|
|
7315
7346
|
router.saveHistory();
|
|
7316
7347
|
|
|
@@ -7393,7 +7424,8 @@
|
|
|
7393
7424
|
const preloadPreviousPage = router.params.preloadPreviousPage || router.params[`${app.theme}SwipeBack`];
|
|
7394
7425
|
if (preloadPreviousPage && router.history[router.history.length - 2] && !isMaster) {
|
|
7395
7426
|
router.back(router.history[router.history.length - 2], {
|
|
7396
|
-
preload: true
|
|
7427
|
+
preload: true,
|
|
7428
|
+
props: router.propsHistory[router.propsHistory.length - 2] || {}
|
|
7397
7429
|
});
|
|
7398
7430
|
}
|
|
7399
7431
|
if (router.params.browserHistory) {
|
|
@@ -7443,6 +7475,7 @@
|
|
|
7443
7475
|
componentUrl
|
|
7444
7476
|
} = params;
|
|
7445
7477
|
if (options.route.url && router.url === options.route.url && !(options.reloadCurrent || options.reloadPrevious) && !router.params.allowDuplicateUrls) {
|
|
7478
|
+
router.allowPageChange = true;
|
|
7446
7479
|
return false;
|
|
7447
7480
|
}
|
|
7448
7481
|
if (!options.route && url) {
|
|
@@ -7505,6 +7538,7 @@
|
|
|
7505
7538
|
if (router.swipeBackActive) return router;
|
|
7506
7539
|
let navigateUrl;
|
|
7507
7540
|
let navigateOptions;
|
|
7541
|
+
let navigateProps;
|
|
7508
7542
|
let route;
|
|
7509
7543
|
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
|
|
7510
7544
|
navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};
|
|
@@ -7588,6 +7622,7 @@
|
|
|
7588
7622
|
}
|
|
7589
7623
|
router.currentRoute = previousRoute;
|
|
7590
7624
|
router.history.pop();
|
|
7625
|
+
router.propsHistory.pop();
|
|
7591
7626
|
router.saveHistory();
|
|
7592
7627
|
if (needHistoryBack && isBrokenBrowserHistory && !currentRouteWithoutBrowserHistory) {
|
|
7593
7628
|
History$1.back();
|
|
@@ -7630,7 +7665,8 @@
|
|
|
7630
7665
|
if (!navigateOptions.force && $previousPage.length && !skipMaster) {
|
|
7631
7666
|
if (router.params.browserHistory && $previousPage[0].f7Page && router.history[router.history.length - 2] !== $previousPage[0].f7Page.route.url) {
|
|
7632
7667
|
router.back(router.history[router.history.length - 2], extend$2(navigateOptions, {
|
|
7633
|
-
force: true
|
|
7668
|
+
force: true,
|
|
7669
|
+
props: router.propsHistory[router.propsHistory.length - 2] || {}
|
|
7634
7670
|
}));
|
|
7635
7671
|
return router;
|
|
7636
7672
|
}
|
|
@@ -7654,11 +7690,13 @@
|
|
|
7654
7690
|
}
|
|
7655
7691
|
if (!navigateUrl && router.history.length > 1) {
|
|
7656
7692
|
navigateUrl = router.history[router.history.length - 2];
|
|
7693
|
+
navigateProps = router.propsHistory[router.propsHistory.length - 2] || {};
|
|
7657
7694
|
}
|
|
7658
7695
|
if (skipMaster && !navigateOptions.force && router.history[router.history.length - 3]) {
|
|
7659
7696
|
return router.back(router.history[router.history.length - 3], extend$2({}, navigateOptions || {}, {
|
|
7660
7697
|
force: true,
|
|
7661
|
-
animate: false
|
|
7698
|
+
animate: false,
|
|
7699
|
+
props: router.propsHistory[router.propsHistory.length - 3] || {}
|
|
7662
7700
|
}));
|
|
7663
7701
|
}
|
|
7664
7702
|
if (skipMaster && !navigateOptions.force) {
|
|
@@ -7688,9 +7726,13 @@
|
|
|
7688
7726
|
}
|
|
7689
7727
|
const options = {};
|
|
7690
7728
|
if (route.route.options) {
|
|
7691
|
-
extend$2(options, route.route.options, navigateOptions
|
|
7729
|
+
extend$2(options, route.route.options, navigateOptions, {
|
|
7730
|
+
props: navigateProps || {}
|
|
7731
|
+
});
|
|
7692
7732
|
} else {
|
|
7693
|
-
extend$2(options, navigateOptions
|
|
7733
|
+
extend$2(options, navigateOptions, {
|
|
7734
|
+
props: navigateProps || {}
|
|
7735
|
+
});
|
|
7694
7736
|
}
|
|
7695
7737
|
options.route = route;
|
|
7696
7738
|
function resolve() {
|
|
@@ -7814,6 +7856,7 @@
|
|
|
7814
7856
|
params: view.params,
|
|
7815
7857
|
routes: view.routes,
|
|
7816
7858
|
history: view.history,
|
|
7859
|
+
propsHistory: [],
|
|
7817
7860
|
scrollHistory: view.scrollHistory,
|
|
7818
7861
|
cache: app.cache,
|
|
7819
7862
|
dynamicNavbar: app.theme === 'ios' && view.params.iosDynamicNavbar,
|
|
@@ -8807,11 +8850,11 @@
|
|
|
8807
8850
|
}
|
|
8808
8851
|
} else {
|
|
8809
8852
|
if (browserHistoryRoot && documentUrl.indexOf(browserHistoryRoot) >= 0) {
|
|
8810
|
-
documentUrl = documentUrl.
|
|
8853
|
+
documentUrl = documentUrl.substring(documentUrl.indexOf(browserHistoryRoot) + browserHistoryRoot.length);
|
|
8811
8854
|
if (documentUrl === '') documentUrl = '/';
|
|
8812
8855
|
}
|
|
8813
8856
|
if (browserHistorySeparator.length > 0 && documentUrl.indexOf(browserHistorySeparator) >= 0) {
|
|
8814
|
-
initialUrl = documentUrl.
|
|
8857
|
+
initialUrl = documentUrl.substring(documentUrl.indexOf(browserHistorySeparator) + browserHistorySeparator.length);
|
|
8815
8858
|
} else {
|
|
8816
8859
|
initialUrl = documentUrl;
|
|
8817
8860
|
}
|
|
@@ -18498,6 +18541,8 @@
|
|
|
18498
18541
|
modifyHtmlClasses = true;
|
|
18499
18542
|
}
|
|
18500
18543
|
const panel = this;
|
|
18544
|
+
// eslint-disable-next-line
|
|
18545
|
+
panel._openTransitionStarted = false;
|
|
18501
18546
|
const app = panel.app;
|
|
18502
18547
|
panel.opened = true;
|
|
18503
18548
|
app.panel.allowOpen = false;
|
|
@@ -18632,6 +18677,12 @@
|
|
|
18632
18677
|
$viewEl.add($containerEl.children('.page-content, .tabs'));
|
|
18633
18678
|
}
|
|
18634
18679
|
const transitionEndTarget = effect === 'reveal' ? $viewEl : $el;
|
|
18680
|
+
function panelTransitionStart() {
|
|
18681
|
+
transitionEndTarget.transitionStart(() => {
|
|
18682
|
+
// eslint-disable-next-line
|
|
18683
|
+
panel._openTransitionStarted = true;
|
|
18684
|
+
});
|
|
18685
|
+
}
|
|
18635
18686
|
function panelTransitionEnd() {
|
|
18636
18687
|
transitionEndTarget.transitionEnd(e => {
|
|
18637
18688
|
if ($(e.target).is(transitionEndTarget)) {
|
|
@@ -18647,6 +18698,7 @@
|
|
|
18647
18698
|
if ($backdropEl) {
|
|
18648
18699
|
$backdropEl.removeClass('not-animated');
|
|
18649
18700
|
}
|
|
18701
|
+
panelTransitionStart();
|
|
18650
18702
|
panelTransitionEnd();
|
|
18651
18703
|
$el.removeClass('panel-out not-animated').addClass('panel-in');
|
|
18652
18704
|
panel.onOpen();
|
|
@@ -18682,6 +18734,11 @@
|
|
|
18682
18734
|
$viewEl.add($containerEl.children('.page-content, .tabs'));
|
|
18683
18735
|
}
|
|
18684
18736
|
const transitionEndTarget = effect === 'reveal' ? $viewEl : $el;
|
|
18737
|
+
// eslint-disable-next-line
|
|
18738
|
+
if (!panel._openTransitionStarted) {
|
|
18739
|
+
// eslint-disable-next-line
|
|
18740
|
+
animate = false;
|
|
18741
|
+
}
|
|
18685
18742
|
function transitionEnd() {
|
|
18686
18743
|
if ($el.hasClass('panel-out')) {
|
|
18687
18744
|
panel.onClosed();
|
|
@@ -21829,7 +21886,7 @@
|
|
|
21829
21886
|
}
|
|
21830
21887
|
ss.$selectEl.trigger('change');
|
|
21831
21888
|
if (ss.params.setValueText) {
|
|
21832
|
-
ss
|
|
21889
|
+
ss.formatValueTextContent(optionText);
|
|
21833
21890
|
}
|
|
21834
21891
|
if (ss.params.closeOnSelect && ss.inputType === 'radio') {
|
|
21835
21892
|
ss.close();
|
|
@@ -21881,7 +21938,7 @@
|
|
|
21881
21938
|
ss.selectEl.value = newValue;
|
|
21882
21939
|
}
|
|
21883
21940
|
if (ss.params.setValueText) {
|
|
21884
|
-
ss
|
|
21941
|
+
ss.formatValueTextContent(optionText);
|
|
21885
21942
|
}
|
|
21886
21943
|
ss.$selectEl.trigger('change');
|
|
21887
21944
|
return ss;
|
|
@@ -21889,7 +21946,7 @@
|
|
|
21889
21946
|
unsetValue() {
|
|
21890
21947
|
const ss = this;
|
|
21891
21948
|
if (ss.params.setValueText) {
|
|
21892
|
-
ss
|
|
21949
|
+
ss.formatValueTextContent([]);
|
|
21893
21950
|
}
|
|
21894
21951
|
ss.$selectEl.find('option').each(optionEl => {
|
|
21895
21952
|
optionEl.selected = false;
|
|
@@ -21937,6 +21994,15 @@
|
|
|
21937
21994
|
$containerEl.find('.disabled').removeClass('disabled');
|
|
21938
21995
|
}
|
|
21939
21996
|
}
|
|
21997
|
+
formatValueTextContent(values) {
|
|
21998
|
+
const ss = this;
|
|
21999
|
+
const valueFormatted = ss.formatValueText(values);
|
|
22000
|
+
if (valueFormatted.includes('<') && valueFormatted.includes('>')) {
|
|
22001
|
+
ss.$valueEl.html(valueFormatted);
|
|
22002
|
+
} else {
|
|
22003
|
+
ss.$valueEl.text(valueFormatted);
|
|
22004
|
+
}
|
|
22005
|
+
}
|
|
21940
22006
|
formatValueText(values) {
|
|
21941
22007
|
const ss = this;
|
|
21942
22008
|
let textValue;
|
|
@@ -21970,7 +22036,7 @@
|
|
|
21970
22036
|
});
|
|
21971
22037
|
}
|
|
21972
22038
|
if (ss.params.setValueText) {
|
|
21973
|
-
ss
|
|
22039
|
+
ss.formatValueTextContent(valueArray);
|
|
21974
22040
|
}
|
|
21975
22041
|
}
|
|
21976
22042
|
getItemsData() {
|
|
@@ -21985,6 +22051,7 @@
|
|
|
21985
22051
|
const optionIcon = optionData.optionIcon || ss.params.optionIcon;
|
|
21986
22052
|
const optionIconIos = theme === 'ios' && (optionData.optionIconIos || ss.params.optionIconIos);
|
|
21987
22053
|
const optionIconMd = theme === 'md' && (optionData.optionIconMd || ss.params.optionIconMd);
|
|
22054
|
+
const optionInputIconPosition = optionData.inputIconPosition || ss.params.inputIconPosition || '';
|
|
21988
22055
|
const optionHasMedia = optionImage || optionIcon || optionIconIos || optionIconMd;
|
|
21989
22056
|
const optionColor = optionData.optionColor;
|
|
21990
22057
|
let optionClassName = optionData.optionClass || '';
|
|
@@ -22010,6 +22077,7 @@
|
|
|
22010
22077
|
icon: optionIcon,
|
|
22011
22078
|
iconIos: optionIconIos,
|
|
22012
22079
|
iconMd: optionIconMd,
|
|
22080
|
+
inputIconPosition: optionInputIconPosition,
|
|
22013
22081
|
color: optionColor,
|
|
22014
22082
|
className: optionClassName,
|
|
22015
22083
|
disabled: $optionEl[0].disabled,
|
|
@@ -22093,7 +22161,7 @@
|
|
|
22093
22161
|
itemHtml = $jsx$1("li", {
|
|
22094
22162
|
class: `${item.className || ''}${disabled ? ' disabled' : ''}`
|
|
22095
22163
|
}, $jsx$1("label", {
|
|
22096
|
-
class: `item-${item.inputType} item-content`
|
|
22164
|
+
class: `item-${item.inputType} ${item.inputIconPosition ? `item-${item.inputType}-icon-${item.inputIconPosition}` : ''} item-content`
|
|
22097
22165
|
}, $jsx$1("input", {
|
|
22098
22166
|
type: item.inputType,
|
|
22099
22167
|
name: item.inputName,
|
|
@@ -22411,6 +22479,7 @@
|
|
|
22411
22479
|
content: popupHtml,
|
|
22412
22480
|
push: ss.params.popupPush,
|
|
22413
22481
|
swipeToClose: ss.params.popupSwipeToClose,
|
|
22482
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22414
22483
|
on: {
|
|
22415
22484
|
popupOpen(popup) {
|
|
22416
22485
|
ss.onOpen('popup', popup.el);
|
|
@@ -22451,6 +22520,7 @@
|
|
|
22451
22520
|
closeByOutsideClick: true,
|
|
22452
22521
|
push: ss.params.sheetPush,
|
|
22453
22522
|
swipeToClose: ss.params.sheetSwipeToClose,
|
|
22523
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22454
22524
|
on: {
|
|
22455
22525
|
sheetOpen(sheet) {
|
|
22456
22526
|
ss.onOpen('sheet', sheet.el);
|
|
@@ -22487,6 +22557,7 @@
|
|
|
22487
22557
|
const popoverParams = {
|
|
22488
22558
|
content: popoverHtml,
|
|
22489
22559
|
targetEl: ss.$el,
|
|
22560
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22490
22561
|
on: {
|
|
22491
22562
|
popoverOpen(popover) {
|
|
22492
22563
|
ss.onOpen('popover', popover.el);
|
|
@@ -22590,6 +22661,7 @@
|
|
|
22590
22661
|
pageBackLinkText: 'Back',
|
|
22591
22662
|
popupCloseLinkText: 'Close',
|
|
22592
22663
|
popupTabletFullscreen: false,
|
|
22664
|
+
closeByBackdropClick: true,
|
|
22593
22665
|
sheetCloseLinkText: 'Done',
|
|
22594
22666
|
searchbar: false,
|
|
22595
22667
|
searchbarPlaceholder: 'Search',
|
|
@@ -22604,6 +22676,7 @@
|
|
|
22604
22676
|
navbarColorTheme: undefined,
|
|
22605
22677
|
routableModals: false,
|
|
22606
22678
|
url: 'select/',
|
|
22679
|
+
inputIconPosition: 'start',
|
|
22607
22680
|
cssClass: '',
|
|
22608
22681
|
/*
|
|
22609
22682
|
Custom render functions
|
|
@@ -30183,11 +30256,13 @@
|
|
|
30183
30256
|
Object.keys(object).forEach(key => {
|
|
30184
30257
|
try {
|
|
30185
30258
|
object[key] = null;
|
|
30186
|
-
} catch (e) {
|
|
30259
|
+
} catch (e) {
|
|
30260
|
+
// no getter for object
|
|
30187
30261
|
}
|
|
30188
30262
|
try {
|
|
30189
30263
|
delete object[key];
|
|
30190
|
-
} catch (e) {
|
|
30264
|
+
} catch (e) {
|
|
30265
|
+
// something got wrong
|
|
30191
30266
|
}
|
|
30192
30267
|
});
|
|
30193
30268
|
}
|
|
@@ -30227,9 +30302,9 @@
|
|
|
30227
30302
|
curTransform = curStyle.transform || curStyle.webkitTransform;
|
|
30228
30303
|
if (curTransform.split(',').length > 6) {
|
|
30229
30304
|
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
|
30230
|
-
}
|
|
30305
|
+
}
|
|
30306
|
+
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
30231
30307
|
// empty string instead in this case
|
|
30232
|
-
|
|
30233
30308
|
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
|
30234
30309
|
} else {
|
|
30235
30310
|
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
|
@@ -30237,14 +30312,18 @@
|
|
|
30237
30312
|
}
|
|
30238
30313
|
if (axis === 'x') {
|
|
30239
30314
|
// Latest Chrome and webkits Fix
|
|
30240
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
30241
|
-
|
|
30315
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
30316
|
+
// Crazy IE10 Matrix
|
|
30317
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
|
30318
|
+
// Normal Browsers
|
|
30242
30319
|
else curTransform = parseFloat(matrix[4]);
|
|
30243
30320
|
}
|
|
30244
30321
|
if (axis === 'y') {
|
|
30245
30322
|
// Latest Chrome and webkits Fix
|
|
30246
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
30247
|
-
|
|
30323
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
30324
|
+
// Crazy IE10 Matrix
|
|
30325
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
|
30326
|
+
// Normal Browsers
|
|
30248
30327
|
else curTransform = parseFloat(matrix[5]);
|
|
30249
30328
|
}
|
|
30250
30329
|
return curTransform || 0;
|
|
@@ -30390,7 +30469,6 @@
|
|
|
30390
30469
|
const prevEls = [];
|
|
30391
30470
|
while (el.previousElementSibling) {
|
|
30392
30471
|
const prev = el.previousElementSibling; // eslint-disable-line
|
|
30393
|
-
|
|
30394
30472
|
if (selector) {
|
|
30395
30473
|
if (prev.matches(selector)) prevEls.push(prev);
|
|
30396
30474
|
} else prevEls.push(prev);
|
|
@@ -30402,7 +30480,6 @@
|
|
|
30402
30480
|
const nextEls = [];
|
|
30403
30481
|
while (el.nextElementSibling) {
|
|
30404
30482
|
const next = el.nextElementSibling; // eslint-disable-line
|
|
30405
|
-
|
|
30406
30483
|
if (selector) {
|
|
30407
30484
|
if (next.matches(selector)) nextEls.push(next);
|
|
30408
30485
|
} else nextEls.push(next);
|
|
@@ -30418,8 +30495,8 @@
|
|
|
30418
30495
|
let child = el;
|
|
30419
30496
|
let i;
|
|
30420
30497
|
if (child) {
|
|
30421
|
-
i = 0;
|
|
30422
|
-
|
|
30498
|
+
i = 0;
|
|
30499
|
+
// eslint-disable-next-line
|
|
30423
30500
|
while ((child = child.previousSibling) !== null) {
|
|
30424
30501
|
if (child.nodeType === 1) i += 1;
|
|
30425
30502
|
}
|
|
@@ -30429,9 +30506,7 @@
|
|
|
30429
30506
|
}
|
|
30430
30507
|
function elementParents(el, selector) {
|
|
30431
30508
|
const parents = []; // eslint-disable-line
|
|
30432
|
-
|
|
30433
30509
|
let parent = el.parentElement; // eslint-disable-line
|
|
30434
|
-
|
|
30435
30510
|
while (parent) {
|
|
30436
30511
|
if (selector) {
|
|
30437
30512
|
if (parent.matches(selector)) parents.push(parent);
|
|
@@ -30492,20 +30567,21 @@
|
|
|
30492
30567
|
const screenWidth = window.screen.width;
|
|
30493
30568
|
const screenHeight = window.screen.height;
|
|
30494
30569
|
const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
|
30495
|
-
|
|
30496
30570
|
let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
|
30497
30571
|
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
|
30498
30572
|
const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
|
30499
30573
|
const windows = platform === 'Win32';
|
|
30500
|
-
let macos = platform === 'MacIntel';
|
|
30574
|
+
let macos = platform === 'MacIntel';
|
|
30501
30575
|
|
|
30576
|
+
// iPadOs 13 fix
|
|
30502
30577
|
const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];
|
|
30503
30578
|
if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
|
|
30504
30579
|
ipad = ua.match(/(Version)\/([\d.]+)/);
|
|
30505
30580
|
if (!ipad) ipad = [0, 1, '13_0_0'];
|
|
30506
30581
|
macos = false;
|
|
30507
|
-
}
|
|
30582
|
+
}
|
|
30508
30583
|
|
|
30584
|
+
// Android
|
|
30509
30585
|
if (android && !windows) {
|
|
30510
30586
|
device.os = 'android';
|
|
30511
30587
|
device.android = true;
|
|
@@ -30513,8 +30589,9 @@
|
|
|
30513
30589
|
if (ipad || iphone || ipod) {
|
|
30514
30590
|
device.os = 'ios';
|
|
30515
30591
|
device.ios = true;
|
|
30516
|
-
}
|
|
30592
|
+
}
|
|
30517
30593
|
|
|
30594
|
+
// Export object
|
|
30518
30595
|
return device;
|
|
30519
30596
|
}
|
|
30520
30597
|
function getDevice(overrides) {
|
|
@@ -30530,12 +30607,21 @@
|
|
|
30530
30607
|
let browser;
|
|
30531
30608
|
function calcBrowser() {
|
|
30532
30609
|
const window = getWindow();
|
|
30610
|
+
let needPerspectiveFix = false;
|
|
30533
30611
|
function isSafari() {
|
|
30534
30612
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
30535
30613
|
return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;
|
|
30536
30614
|
}
|
|
30615
|
+
if (isSafari()) {
|
|
30616
|
+
const ua = String(window.navigator.userAgent);
|
|
30617
|
+
if (ua.includes('Version/')) {
|
|
30618
|
+
const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));
|
|
30619
|
+
needPerspectiveFix = major < 16 || major === 16 && minor < 2;
|
|
30620
|
+
}
|
|
30621
|
+
}
|
|
30537
30622
|
return {
|
|
30538
|
-
isSafari: isSafari(),
|
|
30623
|
+
isSafari: needPerspectiveFix || isSafari(),
|
|
30624
|
+
needPerspectiveFix,
|
|
30539
30625
|
isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)
|
|
30540
30626
|
};
|
|
30541
30627
|
}
|
|
@@ -30660,12 +30746,13 @@
|
|
|
30660
30746
|
for (let i = 0; i < containerParents.length; i += 1) {
|
|
30661
30747
|
attach(containerParents[i]);
|
|
30662
30748
|
}
|
|
30663
|
-
}
|
|
30664
|
-
|
|
30749
|
+
}
|
|
30750
|
+
// Observe container
|
|
30665
30751
|
attach(swiper.el, {
|
|
30666
30752
|
childList: swiper.params.observeSlideChildren
|
|
30667
|
-
});
|
|
30753
|
+
});
|
|
30668
30754
|
|
|
30755
|
+
// Observe wrapper
|
|
30669
30756
|
attach(swiper.wrapperEl, {
|
|
30670
30757
|
attributes: false
|
|
30671
30758
|
});
|
|
@@ -30686,6 +30773,7 @@
|
|
|
30686
30773
|
}
|
|
30687
30774
|
|
|
30688
30775
|
/* eslint-disable no-underscore-dangle */
|
|
30776
|
+
|
|
30689
30777
|
var eventsEmitter = {
|
|
30690
30778
|
on(events, handler, priority) {
|
|
30691
30779
|
const self = this;
|
|
@@ -30806,8 +30894,9 @@
|
|
|
30806
30894
|
}
|
|
30807
30895
|
if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {
|
|
30808
30896
|
return;
|
|
30809
|
-
}
|
|
30897
|
+
}
|
|
30810
30898
|
|
|
30899
|
+
// Subtract paddings
|
|
30811
30900
|
width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);
|
|
30812
30901
|
height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);
|
|
30813
30902
|
if (Number.isNaN(width)) width = 0;
|
|
@@ -30824,8 +30913,8 @@
|
|
|
30824
30913
|
function getDirectionLabel(property) {
|
|
30825
30914
|
if (swiper.isHorizontal()) {
|
|
30826
30915
|
return property;
|
|
30827
|
-
}
|
|
30828
|
-
|
|
30916
|
+
}
|
|
30917
|
+
// prettier-ignore
|
|
30829
30918
|
return {
|
|
30830
30919
|
'width': 'height',
|
|
30831
30920
|
'margin-top': 'margin-left',
|
|
@@ -30875,8 +30964,9 @@
|
|
|
30875
30964
|
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
|
30876
30965
|
spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;
|
|
30877
30966
|
}
|
|
30878
|
-
swiper.virtualSize = -spaceBetween;
|
|
30967
|
+
swiper.virtualSize = -spaceBetween;
|
|
30879
30968
|
|
|
30969
|
+
// reset margins
|
|
30880
30970
|
slides.forEach(slideEl => {
|
|
30881
30971
|
if (rtl) {
|
|
30882
30972
|
slideEl.style.marginLeft = '';
|
|
@@ -30885,8 +30975,9 @@
|
|
|
30885
30975
|
}
|
|
30886
30976
|
slideEl.style.marginBottom = '';
|
|
30887
30977
|
slideEl.style.marginTop = '';
|
|
30888
|
-
});
|
|
30978
|
+
});
|
|
30889
30979
|
|
|
30980
|
+
// reset cssMode offsets
|
|
30890
30981
|
if (params.centeredSlides && params.cssMode) {
|
|
30891
30982
|
setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');
|
|
30892
30983
|
setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');
|
|
@@ -30894,8 +30985,9 @@
|
|
|
30894
30985
|
const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
|
|
30895
30986
|
if (gridEnabled) {
|
|
30896
30987
|
swiper.grid.initSlides(slidesLength);
|
|
30897
|
-
}
|
|
30988
|
+
}
|
|
30898
30989
|
|
|
30990
|
+
// Calc slides
|
|
30899
30991
|
let slideSize;
|
|
30900
30992
|
const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {
|
|
30901
30993
|
return typeof params.breakpoints[key].slidesPerView !== 'undefined';
|
|
@@ -30987,8 +31079,9 @@
|
|
|
30987
31079
|
}
|
|
30988
31080
|
if (gridEnabled) {
|
|
30989
31081
|
swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);
|
|
30990
|
-
}
|
|
31082
|
+
}
|
|
30991
31083
|
|
|
31084
|
+
// Remove last grid elements depending on width
|
|
30992
31085
|
if (!params.centeredSlides) {
|
|
30993
31086
|
const newSlidesGrid = [];
|
|
30994
31087
|
for (let i = 0; i < snapGrid.length; i += 1) {
|
|
@@ -31116,8 +31209,8 @@
|
|
|
31116
31209
|
return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];
|
|
31117
31210
|
}
|
|
31118
31211
|
return swiper.slides[index];
|
|
31119
|
-
};
|
|
31120
|
-
|
|
31212
|
+
};
|
|
31213
|
+
// Find slides currently in view
|
|
31121
31214
|
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
|
31122
31215
|
if (swiper.params.centeredSlides) {
|
|
31123
31216
|
(swiper.visibleSlides || []).forEach(slide => {
|
|
@@ -31132,23 +31225,27 @@
|
|
|
31132
31225
|
}
|
|
31133
31226
|
} else {
|
|
31134
31227
|
activeSlides.push(getSlideByIndex(swiper.activeIndex));
|
|
31135
|
-
}
|
|
31228
|
+
}
|
|
31136
31229
|
|
|
31230
|
+
// Find new height from highest slide in view
|
|
31137
31231
|
for (i = 0; i < activeSlides.length; i += 1) {
|
|
31138
31232
|
if (typeof activeSlides[i] !== 'undefined') {
|
|
31139
31233
|
const height = activeSlides[i].offsetHeight;
|
|
31140
31234
|
newHeight = height > newHeight ? height : newHeight;
|
|
31141
31235
|
}
|
|
31142
|
-
}
|
|
31236
|
+
}
|
|
31143
31237
|
|
|
31238
|
+
// Update Height
|
|
31144
31239
|
if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;
|
|
31145
31240
|
}
|
|
31146
31241
|
|
|
31147
31242
|
function updateSlidesOffset() {
|
|
31148
31243
|
const swiper = this;
|
|
31149
31244
|
const slides = swiper.slides;
|
|
31245
|
+
// eslint-disable-next-line
|
|
31246
|
+
const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;
|
|
31150
31247
|
for (let i = 0; i < slides.length; i += 1) {
|
|
31151
|
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
|
31248
|
+
slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset;
|
|
31152
31249
|
}
|
|
31153
31250
|
}
|
|
31154
31251
|
|
|
@@ -31166,8 +31263,9 @@
|
|
|
31166
31263
|
if (slides.length === 0) return;
|
|
31167
31264
|
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
|
31168
31265
|
let offsetCenter = -translate;
|
|
31169
|
-
if (rtl) offsetCenter = translate;
|
|
31266
|
+
if (rtl) offsetCenter = translate;
|
|
31170
31267
|
|
|
31268
|
+
// Visible Slides
|
|
31171
31269
|
slides.forEach(slideEl => {
|
|
31172
31270
|
slideEl.classList.remove(params.slideVisibleClass);
|
|
31173
31271
|
});
|
|
@@ -31197,8 +31295,8 @@
|
|
|
31197
31295
|
function updateProgress(translate) {
|
|
31198
31296
|
const swiper = this;
|
|
31199
31297
|
if (typeof translate === 'undefined') {
|
|
31200
|
-
const multiplier = swiper.rtlTranslate ? -1 : 1;
|
|
31201
|
-
|
|
31298
|
+
const multiplier = swiper.rtlTranslate ? -1 : 1;
|
|
31299
|
+
// eslint-disable-next-line
|
|
31202
31300
|
translate = swiper && swiper.translate && swiper.translate * multiplier || 0;
|
|
31203
31301
|
}
|
|
31204
31302
|
const params = swiper.params;
|
|
@@ -31217,8 +31315,12 @@
|
|
|
31217
31315
|
isEnd = true;
|
|
31218
31316
|
} else {
|
|
31219
31317
|
progress = (translate - swiper.minTranslate()) / translatesDiff;
|
|
31220
|
-
|
|
31221
|
-
|
|
31318
|
+
const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;
|
|
31319
|
+
const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;
|
|
31320
|
+
isBeginning = isBeginningRounded || progress <= 0;
|
|
31321
|
+
isEnd = isEndRounded || progress >= 1;
|
|
31322
|
+
if (isBeginningRounded) progress = 0;
|
|
31323
|
+
if (isEndRounded) progress = 1;
|
|
31222
31324
|
}
|
|
31223
31325
|
if (params.loop) {
|
|
31224
31326
|
const firstSlideIndex = elementIndex(swiper.slides.filter(el => el.getAttribute('data-swiper-slide-index') === '0')[0]);
|
|
@@ -31283,16 +31385,17 @@
|
|
|
31283
31385
|
}
|
|
31284
31386
|
if (activeSlide) {
|
|
31285
31387
|
// Active classes
|
|
31286
|
-
activeSlide.classList.add(params.slideActiveClass);
|
|
31388
|
+
activeSlide.classList.add(params.slideActiveClass);
|
|
31287
31389
|
|
|
31390
|
+
// Next Slide
|
|
31288
31391
|
let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
31289
31392
|
if (params.loop && !nextSlide) {
|
|
31290
31393
|
nextSlide = slides[0];
|
|
31291
31394
|
}
|
|
31292
31395
|
if (nextSlide) {
|
|
31293
31396
|
nextSlide.classList.add(params.slideNextClass);
|
|
31294
|
-
}
|
|
31295
|
-
|
|
31397
|
+
}
|
|
31398
|
+
// Prev Slide
|
|
31296
31399
|
let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
31297
31400
|
if (params.loop && !prevSlide === 0) {
|
|
31298
31401
|
prevSlide = slides[slides.length - 1];
|
|
@@ -31321,8 +31424,8 @@
|
|
|
31321
31424
|
} else if (translate >= slidesGrid[i]) {
|
|
31322
31425
|
activeIndex = i;
|
|
31323
31426
|
}
|
|
31324
|
-
}
|
|
31325
|
-
|
|
31427
|
+
}
|
|
31428
|
+
// Normalize slideIndex
|
|
31326
31429
|
if (params.normalizeSlideIndex) {
|
|
31327
31430
|
if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
|
|
31328
31431
|
}
|
|
@@ -31369,8 +31472,8 @@
|
|
|
31369
31472
|
swiper.realIndex = getVirtualRealIndex(activeIndex);
|
|
31370
31473
|
}
|
|
31371
31474
|
return;
|
|
31372
|
-
}
|
|
31373
|
-
|
|
31475
|
+
}
|
|
31476
|
+
// Get real index
|
|
31374
31477
|
let realIndex;
|
|
31375
31478
|
if (swiper.virtual && params.virtual.enabled && params.loop) {
|
|
31376
31479
|
realIndex = getVirtualRealIndex(activeIndex);
|
|
@@ -31487,8 +31590,9 @@
|
|
|
31487
31590
|
wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;
|
|
31488
31591
|
}
|
|
31489
31592
|
swiper.previousTranslate = swiper.translate;
|
|
31490
|
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
|
31593
|
+
swiper.translate = swiper.isHorizontal() ? x : y;
|
|
31491
31594
|
|
|
31595
|
+
// Check if we need to update progress
|
|
31492
31596
|
let newProgress;
|
|
31493
31597
|
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
|
31494
31598
|
if (translatesDiff === 0) {
|
|
@@ -31534,8 +31638,9 @@
|
|
|
31534
31638
|
const minTranslate = swiper.minTranslate();
|
|
31535
31639
|
const maxTranslate = swiper.maxTranslate();
|
|
31536
31640
|
let newTranslate;
|
|
31537
|
-
if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;
|
|
31641
|
+
if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;
|
|
31538
31642
|
|
|
31643
|
+
// Update progress
|
|
31539
31644
|
swiper.updateProgress(newTranslate);
|
|
31540
31645
|
if (params.cssMode) {
|
|
31541
31646
|
const isH = swiper.isHorizontal();
|
|
@@ -31578,7 +31683,6 @@
|
|
|
31578
31683
|
if (!swiper || swiper.destroyed) return;
|
|
31579
31684
|
if (e.target !== this) return;
|
|
31580
31685
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
31581
|
-
swiper.wrapperEl.removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
|
|
31582
31686
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
|
31583
31687
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
|
31584
31688
|
if (runCallbacks) {
|
|
@@ -31587,7 +31691,6 @@
|
|
|
31587
31691
|
};
|
|
31588
31692
|
}
|
|
31589
31693
|
swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
31590
|
-
swiper.wrapperEl.addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
|
|
31591
31694
|
}
|
|
31592
31695
|
}
|
|
31593
31696
|
return true;
|
|
@@ -31716,8 +31819,8 @@
|
|
|
31716
31819
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
|
31717
31820
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
|
31718
31821
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
|
31719
|
-
const translate = -snapGrid[snapIndex];
|
|
31720
|
-
|
|
31822
|
+
const translate = -snapGrid[snapIndex];
|
|
31823
|
+
// Normalize slideIndex
|
|
31721
31824
|
if (params.normalizeSlideIndex) {
|
|
31722
31825
|
for (let i = 0; i < slidesGrid.length; i += 1) {
|
|
31723
31826
|
const normalizedTranslate = -Math.floor(translate * 100);
|
|
@@ -31733,8 +31836,8 @@
|
|
|
31733
31836
|
slideIndex = i;
|
|
31734
31837
|
}
|
|
31735
31838
|
}
|
|
31736
|
-
}
|
|
31737
|
-
|
|
31839
|
+
}
|
|
31840
|
+
// Directions locks
|
|
31738
31841
|
if (swiper.initialized && slideIndex !== activeIndex) {
|
|
31739
31842
|
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
|
31740
31843
|
return false;
|
|
@@ -31747,15 +31850,17 @@
|
|
|
31747
31850
|
}
|
|
31748
31851
|
if (slideIndex !== (previousIndex || 0) && runCallbacks) {
|
|
31749
31852
|
swiper.emit('beforeSlideChangeStart');
|
|
31750
|
-
}
|
|
31853
|
+
}
|
|
31751
31854
|
|
|
31855
|
+
// Update progress
|
|
31752
31856
|
swiper.updateProgress(translate);
|
|
31753
31857
|
let direction;
|
|
31754
|
-
if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';
|
|
31858
|
+
if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';
|
|
31755
31859
|
|
|
31860
|
+
// Update Index
|
|
31756
31861
|
if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {
|
|
31757
|
-
swiper.updateActiveIndex(slideIndex);
|
|
31758
|
-
|
|
31862
|
+
swiper.updateActiveIndex(slideIndex);
|
|
31863
|
+
// Update Height
|
|
31759
31864
|
if (params.autoHeight) {
|
|
31760
31865
|
swiper.updateAutoHeight();
|
|
31761
31866
|
}
|
|
@@ -31823,14 +31928,12 @@
|
|
|
31823
31928
|
if (!swiper || swiper.destroyed) return;
|
|
31824
31929
|
if (e.target !== this) return;
|
|
31825
31930
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
31826
|
-
swiper.wrapperEl.removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
31827
31931
|
swiper.onSlideToWrapperTransitionEnd = null;
|
|
31828
31932
|
delete swiper.onSlideToWrapperTransitionEnd;
|
|
31829
31933
|
swiper.transitionEnd(runCallbacks, direction);
|
|
31830
31934
|
};
|
|
31831
31935
|
}
|
|
31832
31936
|
swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
31833
|
-
swiper.wrapperEl.addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
31834
31937
|
}
|
|
31835
31938
|
return true;
|
|
31836
31939
|
}
|
|
@@ -31873,7 +31976,8 @@
|
|
|
31873
31976
|
const swiper = this;
|
|
31874
31977
|
const {
|
|
31875
31978
|
enabled,
|
|
31876
|
-
params
|
|
31979
|
+
params,
|
|
31980
|
+
animating
|
|
31877
31981
|
} = swiper;
|
|
31878
31982
|
if (!enabled) return swiper;
|
|
31879
31983
|
let perGroup = params.slidesPerGroup;
|
|
@@ -31881,9 +31985,13 @@
|
|
|
31881
31985
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
|
31882
31986
|
}
|
|
31883
31987
|
const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;
|
|
31988
|
+
const isVirtual = swiper.virtual && params.virtual.enabled;
|
|
31884
31989
|
if (params.loop) {
|
|
31885
|
-
|
|
31886
|
-
|
|
31990
|
+
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
|
31991
|
+
swiper.loopFix({
|
|
31992
|
+
direction: 'next'
|
|
31993
|
+
});
|
|
31994
|
+
// eslint-disable-next-line
|
|
31887
31995
|
swiper._clientLeft = swiper.wrapperEl.clientLeft;
|
|
31888
31996
|
}
|
|
31889
31997
|
if (params.rewind && swiper.isEnd) {
|
|
@@ -31906,12 +32014,17 @@
|
|
|
31906
32014
|
snapGrid,
|
|
31907
32015
|
slidesGrid,
|
|
31908
32016
|
rtlTranslate,
|
|
31909
|
-
enabled
|
|
32017
|
+
enabled,
|
|
32018
|
+
animating
|
|
31910
32019
|
} = swiper;
|
|
31911
32020
|
if (!enabled) return swiper;
|
|
32021
|
+
const isVirtual = swiper.virtual && params.virtual.enabled;
|
|
31912
32022
|
if (params.loop) {
|
|
31913
|
-
|
|
31914
|
-
|
|
32023
|
+
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
|
32024
|
+
swiper.loopFix({
|
|
32025
|
+
direction: 'prev'
|
|
32026
|
+
});
|
|
32027
|
+
// eslint-disable-next-line
|
|
31915
32028
|
swiper._clientLeft = swiper.wrapperEl.clientLeft;
|
|
31916
32029
|
}
|
|
31917
32030
|
const translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
|
@@ -32058,13 +32171,22 @@
|
|
|
32058
32171
|
slides.forEach((el, index) => {
|
|
32059
32172
|
el.setAttribute('data-swiper-slide-index', index);
|
|
32060
32173
|
});
|
|
32061
|
-
swiper.loopFix(
|
|
32174
|
+
swiper.loopFix({
|
|
32175
|
+
slideRealIndex,
|
|
32176
|
+
direction: params.centeredSlides ? undefined : 'next'
|
|
32177
|
+
});
|
|
32062
32178
|
}
|
|
32063
32179
|
|
|
32064
|
-
function loopFix(
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32180
|
+
function loopFix(_temp) {
|
|
32181
|
+
let {
|
|
32182
|
+
slideRealIndex,
|
|
32183
|
+
slideTo = true,
|
|
32184
|
+
direction,
|
|
32185
|
+
setTranslate,
|
|
32186
|
+
activeSlideIndex,
|
|
32187
|
+
byController,
|
|
32188
|
+
byMousewheel
|
|
32189
|
+
} = _temp === void 0 ? {} : _temp;
|
|
32068
32190
|
const swiper = this;
|
|
32069
32191
|
if (!swiper.params.loop) return;
|
|
32070
32192
|
swiper.emit('beforeLoopFix');
|
|
@@ -32093,51 +32215,83 @@
|
|
|
32093
32215
|
return;
|
|
32094
32216
|
}
|
|
32095
32217
|
const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10));
|
|
32096
|
-
let loopedSlides = slidesPerView;
|
|
32218
|
+
let loopedSlides = params.loopedSlides || slidesPerView;
|
|
32097
32219
|
if (loopedSlides % params.slidesPerGroup !== 0) {
|
|
32098
32220
|
loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup;
|
|
32099
32221
|
}
|
|
32100
32222
|
swiper.loopedSlides = loopedSlides;
|
|
32101
32223
|
const prependSlidesIndexes = [];
|
|
32102
32224
|
const appendSlidesIndexes = [];
|
|
32103
|
-
|
|
32225
|
+
let activeIndex = swiper.activeIndex;
|
|
32226
|
+
if (typeof activeSlideIndex === 'undefined') {
|
|
32227
|
+
activeSlideIndex = elementIndex(swiper.slides.filter(el => el.classList.contains('swiper-slide-active'))[0]);
|
|
32228
|
+
} else {
|
|
32229
|
+
activeIndex = activeSlideIndex;
|
|
32230
|
+
}
|
|
32231
|
+
const isNext = direction === 'next' || !direction;
|
|
32232
|
+
const isPrev = direction === 'prev' || !direction;
|
|
32104
32233
|
let slidesPrepended = 0;
|
|
32105
|
-
let slidesAppended = 0;
|
|
32106
|
-
|
|
32234
|
+
let slidesAppended = 0;
|
|
32235
|
+
// prepend last slides before start
|
|
32107
32236
|
if (activeSlideIndex < loopedSlides) {
|
|
32108
32237
|
slidesPrepended = loopedSlides - activeSlideIndex;
|
|
32109
32238
|
for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) {
|
|
32110
32239
|
const index = i - Math.floor(i / slides.length) * slides.length;
|
|
32111
32240
|
prependSlidesIndexes.push(slides.length - index - 1);
|
|
32112
32241
|
}
|
|
32113
|
-
} else if (activeSlideIndex
|
|
32114
|
-
/* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {
|
|
32242
|
+
} else if (activeSlideIndex /* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {
|
|
32115
32243
|
slidesAppended = activeSlideIndex - (swiper.slides.length - loopedSlides * 2);
|
|
32116
32244
|
for (let i = 0; i < slidesAppended; i += 1) {
|
|
32117
32245
|
const index = i - Math.floor(i / slides.length) * slides.length;
|
|
32118
32246
|
appendSlidesIndexes.push(index);
|
|
32119
32247
|
}
|
|
32120
32248
|
}
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32249
|
+
if (isPrev) {
|
|
32250
|
+
prependSlidesIndexes.forEach(index => {
|
|
32251
|
+
slidesEl.prepend(swiper.slides[index]);
|
|
32252
|
+
});
|
|
32253
|
+
}
|
|
32254
|
+
if (isNext) {
|
|
32255
|
+
appendSlidesIndexes.forEach(index => {
|
|
32256
|
+
slidesEl.append(swiper.slides[index]);
|
|
32257
|
+
});
|
|
32258
|
+
}
|
|
32127
32259
|
swiper.recalcSlides();
|
|
32128
32260
|
if (params.watchSlidesProgress) {
|
|
32129
32261
|
swiper.updateSlidesOffset();
|
|
32130
32262
|
}
|
|
32131
32263
|
if (slideTo) {
|
|
32132
|
-
if (prependSlidesIndexes.length > 0) {
|
|
32264
|
+
if (prependSlidesIndexes.length > 0 && isPrev) {
|
|
32133
32265
|
if (typeof slideRealIndex === 'undefined') {
|
|
32134
|
-
swiper.
|
|
32266
|
+
const currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
32267
|
+
const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
|
|
32268
|
+
const diff = newSlideTranslate - currentSlideTranslate;
|
|
32269
|
+
if (byMousewheel) {
|
|
32270
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
32271
|
+
} else {
|
|
32272
|
+
swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);
|
|
32273
|
+
if (setTranslate) {
|
|
32274
|
+
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
32275
|
+
}
|
|
32276
|
+
}
|
|
32135
32277
|
} else {
|
|
32136
|
-
|
|
32278
|
+
if (setTranslate) {
|
|
32279
|
+
swiper.slideToLoop(slideRealIndex, 0, false, true);
|
|
32280
|
+
}
|
|
32137
32281
|
}
|
|
32138
|
-
} else if (appendSlidesIndexes.length > 0) {
|
|
32282
|
+
} else if (appendSlidesIndexes.length > 0 && isNext) {
|
|
32139
32283
|
if (typeof slideRealIndex === 'undefined') {
|
|
32140
|
-
swiper.
|
|
32284
|
+
const currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
32285
|
+
const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
|
|
32286
|
+
const diff = newSlideTranslate - currentSlideTranslate;
|
|
32287
|
+
if (byMousewheel) {
|
|
32288
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
32289
|
+
} else {
|
|
32290
|
+
swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
|
|
32291
|
+
if (setTranslate) {
|
|
32292
|
+
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
32293
|
+
}
|
|
32294
|
+
}
|
|
32141
32295
|
} else {
|
|
32142
32296
|
swiper.slideToLoop(slideRealIndex, 0, false, true);
|
|
32143
32297
|
}
|
|
@@ -32145,6 +32299,23 @@
|
|
|
32145
32299
|
}
|
|
32146
32300
|
swiper.allowSlidePrev = allowSlidePrev;
|
|
32147
32301
|
swiper.allowSlideNext = allowSlideNext;
|
|
32302
|
+
if (swiper.controller && swiper.controller.control && !byController) {
|
|
32303
|
+
const loopParams = {
|
|
32304
|
+
slideRealIndex,
|
|
32305
|
+
slideTo: false,
|
|
32306
|
+
direction,
|
|
32307
|
+
setTranslate,
|
|
32308
|
+
activeSlideIndex,
|
|
32309
|
+
byController: true
|
|
32310
|
+
};
|
|
32311
|
+
if (Array.isArray(swiper.controller.control)) {
|
|
32312
|
+
swiper.controller.control.forEach(c => {
|
|
32313
|
+
if (c.params.loop) c.loopFix(loopParams);
|
|
32314
|
+
});
|
|
32315
|
+
} else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
|
|
32316
|
+
swiper.controller.control.loopFix(loopParams);
|
|
32317
|
+
}
|
|
32318
|
+
}
|
|
32148
32319
|
swiper.emit('loopFix');
|
|
32149
32320
|
}
|
|
32150
32321
|
|
|
@@ -32163,7 +32334,7 @@
|
|
|
32163
32334
|
newSlidesOrder[index] = slideEl;
|
|
32164
32335
|
});
|
|
32165
32336
|
slides.forEach(slideEl => {
|
|
32166
|
-
slideEl.
|
|
32337
|
+
slideEl.removeAttribute('data-swiper-slide-index');
|
|
32167
32338
|
});
|
|
32168
32339
|
newSlidesOrder.forEach(slideEl => {
|
|
32169
32340
|
slidesEl.append(slideEl);
|
|
@@ -32199,6 +32370,7 @@
|
|
|
32199
32370
|
unsetGrabCursor
|
|
32200
32371
|
};
|
|
32201
32372
|
|
|
32373
|
+
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
32202
32374
|
function closestElement(selector, base) {
|
|
32203
32375
|
if (base === void 0) {
|
|
32204
32376
|
base = this;
|
|
@@ -32241,17 +32413,19 @@
|
|
|
32241
32413
|
}
|
|
32242
32414
|
if ('which' in e && e.which === 3) return;
|
|
32243
32415
|
if ('button' in e && e.button > 0) return;
|
|
32244
|
-
if (data.isTouched && data.isMoved) return;
|
|
32245
|
-
|
|
32246
|
-
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; // eslint-disable-next-line
|
|
32416
|
+
if (data.isTouched && data.isMoved) return;
|
|
32247
32417
|
|
|
32418
|
+
// change target el for shadow root component
|
|
32419
|
+
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
|
|
32420
|
+
// eslint-disable-next-line
|
|
32248
32421
|
const eventPath = event.composedPath ? event.composedPath() : event.path;
|
|
32249
32422
|
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
|
|
32250
32423
|
targetEl = eventPath[0];
|
|
32251
32424
|
}
|
|
32252
32425
|
const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
|
|
32253
|
-
const isTargetShadow = !!(e.target && e.target.shadowRoot);
|
|
32426
|
+
const isTargetShadow = !!(e.target && e.target.shadowRoot);
|
|
32254
32427
|
|
|
32428
|
+
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
32255
32429
|
if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {
|
|
32256
32430
|
swiper.allowClick = true;
|
|
32257
32431
|
return;
|
|
@@ -32262,7 +32436,9 @@
|
|
|
32262
32436
|
touches.currentX = e.pageX;
|
|
32263
32437
|
touches.currentY = e.pageY;
|
|
32264
32438
|
const startX = touches.currentX;
|
|
32265
|
-
const startY = touches.currentY;
|
|
32439
|
+
const startY = touches.currentY;
|
|
32440
|
+
|
|
32441
|
+
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
32266
32442
|
|
|
32267
32443
|
const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
|
32268
32444
|
const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
|
@@ -32345,6 +32521,8 @@
|
|
|
32345
32521
|
Object.assign(touches, {
|
|
32346
32522
|
startX: pageX,
|
|
32347
32523
|
startY: pageY,
|
|
32524
|
+
prevX: swiper.touches.currentX,
|
|
32525
|
+
prevY: swiper.touches.currentY,
|
|
32348
32526
|
currentX: pageX,
|
|
32349
32527
|
currentY: pageY
|
|
32350
32528
|
});
|
|
@@ -32414,52 +32592,95 @@
|
|
|
32414
32592
|
if (params.touchMoveStopPropagation && !params.nested) {
|
|
32415
32593
|
e.stopPropagation();
|
|
32416
32594
|
}
|
|
32595
|
+
let diff = swiper.isHorizontal() ? diffX : diffY;
|
|
32596
|
+
let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;
|
|
32597
|
+
if (params.oneWayMovement) {
|
|
32598
|
+
diff = Math.abs(diff) * (rtl ? 1 : -1);
|
|
32599
|
+
touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
|
|
32600
|
+
}
|
|
32601
|
+
touches.diff = diff;
|
|
32602
|
+
diff *= params.touchRatio;
|
|
32603
|
+
if (rtl) {
|
|
32604
|
+
diff = -diff;
|
|
32605
|
+
touchesDiff = -touchesDiff;
|
|
32606
|
+
}
|
|
32607
|
+
const prevTouchesDirection = swiper.touchesDirection;
|
|
32608
|
+
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
|
32609
|
+
swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';
|
|
32610
|
+
const isLoop = swiper.params.loop && !params.cssMode;
|
|
32417
32611
|
if (!data.isMoved) {
|
|
32418
|
-
if (
|
|
32419
|
-
swiper.loopFix(
|
|
32612
|
+
if (isLoop) {
|
|
32613
|
+
swiper.loopFix({
|
|
32614
|
+
direction: swiper.swipeDirection
|
|
32615
|
+
});
|
|
32420
32616
|
}
|
|
32421
32617
|
data.startTranslate = swiper.getTranslate();
|
|
32422
32618
|
swiper.setTransition(0);
|
|
32423
32619
|
if (swiper.animating) {
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
cancelable: true
|
|
32428
|
-
});
|
|
32429
|
-
swiper.wrapperEl.dispatchEvent(evt);
|
|
32620
|
+
const evt = new window.CustomEvent('transitionend', {
|
|
32621
|
+
bubbles: true,
|
|
32622
|
+
cancelable: true
|
|
32430
32623
|
});
|
|
32624
|
+
swiper.wrapperEl.dispatchEvent(evt);
|
|
32431
32625
|
}
|
|
32432
|
-
data.allowMomentumBounce = false;
|
|
32433
|
-
|
|
32626
|
+
data.allowMomentumBounce = false;
|
|
32627
|
+
// Grab Cursor
|
|
32434
32628
|
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
32435
32629
|
swiper.setGrabCursor(true);
|
|
32436
32630
|
}
|
|
32437
32631
|
swiper.emit('sliderFirstMove', e);
|
|
32438
32632
|
}
|
|
32633
|
+
let loopFixed;
|
|
32634
|
+
if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && Math.abs(diff) >= 1) {
|
|
32635
|
+
// need another loop fix
|
|
32636
|
+
swiper.loopFix({
|
|
32637
|
+
direction: swiper.swipeDirection,
|
|
32638
|
+
setTranslate: true
|
|
32639
|
+
});
|
|
32640
|
+
loopFixed = true;
|
|
32641
|
+
}
|
|
32439
32642
|
swiper.emit('sliderMove', e);
|
|
32440
32643
|
data.isMoved = true;
|
|
32441
|
-
let diff = swiper.isHorizontal() ? diffX : diffY;
|
|
32442
|
-
touches.diff = diff;
|
|
32443
|
-
diff *= params.touchRatio;
|
|
32444
|
-
if (rtl) diff = -diff;
|
|
32445
|
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
|
32446
32644
|
data.currentTranslate = diff + data.startTranslate;
|
|
32447
32645
|
let disableParentSwiper = true;
|
|
32448
32646
|
let resistanceRatio = params.resistanceRatio;
|
|
32449
32647
|
if (params.touchReleaseOnEdges) {
|
|
32450
32648
|
resistanceRatio = 0;
|
|
32451
32649
|
}
|
|
32452
|
-
if (diff > 0
|
|
32453
|
-
|
|
32454
|
-
|
|
32455
|
-
|
|
32456
|
-
|
|
32457
|
-
|
|
32650
|
+
if (diff > 0) {
|
|
32651
|
+
if (isLoop && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) {
|
|
32652
|
+
swiper.loopFix({
|
|
32653
|
+
direction: 'prev',
|
|
32654
|
+
setTranslate: true,
|
|
32655
|
+
activeSlideIndex: 0
|
|
32656
|
+
});
|
|
32657
|
+
}
|
|
32658
|
+
if (data.currentTranslate > swiper.minTranslate()) {
|
|
32659
|
+
disableParentSwiper = false;
|
|
32660
|
+
if (params.resistance) {
|
|
32661
|
+
data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;
|
|
32662
|
+
}
|
|
32663
|
+
}
|
|
32664
|
+
} else if (diff < 0) {
|
|
32665
|
+
if (isLoop && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) {
|
|
32666
|
+
swiper.loopFix({
|
|
32667
|
+
direction: 'next',
|
|
32668
|
+
setTranslate: true,
|
|
32669
|
+
activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))
|
|
32670
|
+
});
|
|
32671
|
+
}
|
|
32672
|
+
if (data.currentTranslate < swiper.maxTranslate()) {
|
|
32673
|
+
disableParentSwiper = false;
|
|
32674
|
+
if (params.resistance) {
|
|
32675
|
+
data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;
|
|
32676
|
+
}
|
|
32677
|
+
}
|
|
32458
32678
|
}
|
|
32459
32679
|
if (disableParentSwiper) {
|
|
32460
32680
|
e.preventedByNestedSwiper = true;
|
|
32461
|
-
}
|
|
32681
|
+
}
|
|
32462
32682
|
|
|
32683
|
+
// Directions locks
|
|
32463
32684
|
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
|
|
32464
32685
|
data.currentTranslate = data.startTranslate;
|
|
32465
32686
|
}
|
|
@@ -32468,8 +32689,9 @@
|
|
|
32468
32689
|
}
|
|
32469
32690
|
if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
|
|
32470
32691
|
data.currentTranslate = data.startTranslate;
|
|
32471
|
-
}
|
|
32692
|
+
}
|
|
32472
32693
|
|
|
32694
|
+
// Threshold
|
|
32473
32695
|
if (params.threshold > 0) {
|
|
32474
32696
|
if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
|
|
32475
32697
|
if (!data.allowThresholdMove) {
|
|
@@ -32485,18 +32707,19 @@
|
|
|
32485
32707
|
return;
|
|
32486
32708
|
}
|
|
32487
32709
|
}
|
|
32488
|
-
if (!params.followFinger || params.cssMode) return;
|
|
32710
|
+
if (!params.followFinger || params.cssMode) return;
|
|
32489
32711
|
|
|
32712
|
+
// Update active index in free mode
|
|
32490
32713
|
if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {
|
|
32491
32714
|
swiper.updateActiveIndex();
|
|
32492
32715
|
swiper.updateSlidesClasses();
|
|
32493
32716
|
}
|
|
32494
32717
|
if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {
|
|
32495
32718
|
swiper.freeMode.onTouchMove();
|
|
32496
|
-
}
|
|
32497
|
-
|
|
32498
|
-
swiper.updateProgress(data.currentTranslate);
|
|
32499
|
-
|
|
32719
|
+
}
|
|
32720
|
+
// Update progress
|
|
32721
|
+
swiper.updateProgress(data.currentTranslate);
|
|
32722
|
+
// Update translate
|
|
32500
32723
|
swiper.setTranslate(data.currentTranslate);
|
|
32501
32724
|
}
|
|
32502
32725
|
|
|
@@ -32530,15 +32753,17 @@
|
|
|
32530
32753
|
data.isMoved = false;
|
|
32531
32754
|
data.startMoving = false;
|
|
32532
32755
|
return;
|
|
32533
|
-
}
|
|
32534
|
-
|
|
32756
|
+
}
|
|
32757
|
+
// Return Grab Cursor
|
|
32535
32758
|
if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
32536
32759
|
swiper.setGrabCursor(false);
|
|
32537
|
-
}
|
|
32760
|
+
}
|
|
32538
32761
|
|
|
32762
|
+
// Time diff
|
|
32539
32763
|
const touchEndTime = now();
|
|
32540
|
-
const timeDiff = touchEndTime - data.touchStartTime;
|
|
32764
|
+
const timeDiff = touchEndTime - data.touchStartTime;
|
|
32541
32765
|
|
|
32766
|
+
// Tap, doubleTap, Click
|
|
32542
32767
|
if (swiper.allowClick) {
|
|
32543
32768
|
const pathTree = e.path || e.composedPath && e.composedPath();
|
|
32544
32769
|
swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);
|
|
@@ -32574,8 +32799,9 @@
|
|
|
32574
32799
|
currentPos
|
|
32575
32800
|
});
|
|
32576
32801
|
return;
|
|
32577
|
-
}
|
|
32802
|
+
}
|
|
32578
32803
|
|
|
32804
|
+
// Find current slide
|
|
32579
32805
|
let stopIndex = 0;
|
|
32580
32806
|
let groupSize = swiper.slidesSizesGrid[0];
|
|
32581
32807
|
for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
|
|
@@ -32598,8 +32824,8 @@
|
|
|
32598
32824
|
} else if (swiper.isEnd) {
|
|
32599
32825
|
rewindFirstIndex = 0;
|
|
32600
32826
|
}
|
|
32601
|
-
}
|
|
32602
|
-
|
|
32827
|
+
}
|
|
32828
|
+
// Find current slide size
|
|
32603
32829
|
const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
|
32604
32830
|
const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
|
|
32605
32831
|
if (timeDiff > params.longSwipesMs) {
|
|
@@ -32649,19 +32875,22 @@
|
|
|
32649
32875
|
params,
|
|
32650
32876
|
el
|
|
32651
32877
|
} = swiper;
|
|
32652
|
-
if (el && el.offsetWidth === 0) return;
|
|
32878
|
+
if (el && el.offsetWidth === 0) return;
|
|
32653
32879
|
|
|
32880
|
+
// Breakpoints
|
|
32654
32881
|
if (params.breakpoints) {
|
|
32655
32882
|
swiper.setBreakpoint();
|
|
32656
|
-
}
|
|
32883
|
+
}
|
|
32657
32884
|
|
|
32885
|
+
// Save locks
|
|
32658
32886
|
const {
|
|
32659
32887
|
allowSlideNext,
|
|
32660
32888
|
allowSlidePrev,
|
|
32661
32889
|
snapGrid
|
|
32662
32890
|
} = swiper;
|
|
32663
|
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
32891
|
+
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
32664
32892
|
|
|
32893
|
+
// Disable locks on resize
|
|
32665
32894
|
swiper.allowSlideNext = true;
|
|
32666
32895
|
swiper.allowSlidePrev = true;
|
|
32667
32896
|
swiper.updateSize();
|
|
@@ -32682,8 +32911,8 @@
|
|
|
32682
32911
|
timeout = setTimeout(() => {
|
|
32683
32912
|
swiper.autoplay.resume();
|
|
32684
32913
|
}, 500);
|
|
32685
|
-
}
|
|
32686
|
-
|
|
32914
|
+
}
|
|
32915
|
+
// Return locks after resize
|
|
32687
32916
|
swiper.allowSlidePrev = allowSlidePrev;
|
|
32688
32917
|
swiper.allowSlideNext = allowSlideNext;
|
|
32689
32918
|
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
|
@@ -32716,8 +32945,8 @@
|
|
|
32716
32945
|
swiper.translate = -wrapperEl.scrollLeft;
|
|
32717
32946
|
} else {
|
|
32718
32947
|
swiper.translate = -wrapperEl.scrollTop;
|
|
32719
|
-
}
|
|
32720
|
-
|
|
32948
|
+
}
|
|
32949
|
+
// eslint-disable-next-line
|
|
32721
32950
|
if (swiper.translate === 0) swiper.translate = 0;
|
|
32722
32951
|
swiper.updateActiveIndex();
|
|
32723
32952
|
swiper.updateSlidesClasses();
|
|
@@ -32734,14 +32963,19 @@
|
|
|
32734
32963
|
swiper.emit('setTranslate', swiper.translate, false);
|
|
32735
32964
|
}
|
|
32736
32965
|
|
|
32737
|
-
|
|
32738
|
-
|
|
32966
|
+
const processLazyPreloader = (swiper, imageEl) => {
|
|
32967
|
+
if (!swiper || swiper.destroyed || !swiper.params) return;
|
|
32739
32968
|
const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
|
|
32740
|
-
const slideEl =
|
|
32969
|
+
const slideEl = imageEl.closest(slideSelector());
|
|
32741
32970
|
if (slideEl) {
|
|
32742
32971
|
const lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
|
|
32743
32972
|
if (lazyEl) lazyEl.remove();
|
|
32744
32973
|
}
|
|
32974
|
+
};
|
|
32975
|
+
|
|
32976
|
+
function onLoad(e) {
|
|
32977
|
+
const swiper = this;
|
|
32978
|
+
processLazyPreloader(swiper, e.target);
|
|
32745
32979
|
swiper.update();
|
|
32746
32980
|
}
|
|
32747
32981
|
|
|
@@ -32757,8 +32991,9 @@
|
|
|
32757
32991
|
} = swiper;
|
|
32758
32992
|
const capture = !!params.nested;
|
|
32759
32993
|
const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
|
32760
|
-
const swiperMethod = method;
|
|
32994
|
+
const swiperMethod = method;
|
|
32761
32995
|
|
|
32996
|
+
// Touch Events
|
|
32762
32997
|
el[domMethod]('pointerdown', swiper.onTouchStart, {
|
|
32763
32998
|
passive: false
|
|
32764
32999
|
});
|
|
@@ -32777,21 +33012,24 @@
|
|
|
32777
33012
|
});
|
|
32778
33013
|
document[domMethod]('pointerleave', swiper.onTouchEnd, {
|
|
32779
33014
|
passive: true
|
|
32780
|
-
});
|
|
33015
|
+
});
|
|
32781
33016
|
|
|
33017
|
+
// Prevent Links Clicks
|
|
32782
33018
|
if (params.preventClicks || params.preventClicksPropagation) {
|
|
32783
33019
|
el[domMethod]('click', swiper.onClick, true);
|
|
32784
33020
|
}
|
|
32785
33021
|
if (params.cssMode) {
|
|
32786
33022
|
wrapperEl[domMethod]('scroll', swiper.onScroll);
|
|
32787
|
-
}
|
|
33023
|
+
}
|
|
32788
33024
|
|
|
33025
|
+
// Resize handler
|
|
32789
33026
|
if (params.updateOnWindowResize) {
|
|
32790
33027
|
swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);
|
|
32791
33028
|
} else {
|
|
32792
33029
|
swiper[swiperMethod]('observerUpdate', onResize, true);
|
|
32793
|
-
}
|
|
33030
|
+
}
|
|
32794
33031
|
|
|
33032
|
+
// Images loader
|
|
32795
33033
|
el[domMethod]('load', swiper.onLoad, {
|
|
32796
33034
|
capture: true
|
|
32797
33035
|
});
|
|
@@ -32837,8 +33075,9 @@
|
|
|
32837
33075
|
el
|
|
32838
33076
|
} = swiper;
|
|
32839
33077
|
const breakpoints = params.breakpoints;
|
|
32840
|
-
if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
|
|
33078
|
+
if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
|
|
32841
33079
|
|
|
33080
|
+
// Get breakpoint for window width and update parameters
|
|
32842
33081
|
const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);
|
|
32843
33082
|
if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
|
|
32844
33083
|
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
|
@@ -32847,7 +33086,7 @@
|
|
|
32847
33086
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
|
32848
33087
|
const wasEnabled = params.enabled;
|
|
32849
33088
|
if (wasMultiRow && !isMultiRow) {
|
|
32850
|
-
el.classList.remove(`${params.containerModifierClass}grid
|
|
33089
|
+
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
|
32851
33090
|
swiper.emitContainerClasses();
|
|
32852
33091
|
} else if (!wasMultiRow && isMultiRow) {
|
|
32853
33092
|
el.classList.add(`${params.containerModifierClass}grid`);
|
|
@@ -32855,8 +33094,9 @@
|
|
|
32855
33094
|
el.classList.add(`${params.containerModifierClass}grid-column`);
|
|
32856
33095
|
}
|
|
32857
33096
|
swiper.emitContainerClasses();
|
|
32858
|
-
}
|
|
33097
|
+
}
|
|
32859
33098
|
|
|
33099
|
+
// Toggle navigation, pagination, scrollbar
|
|
32860
33100
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
|
32861
33101
|
const wasModuleEnabled = params[prop] && params[prop].enabled;
|
|
32862
33102
|
const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
|
|
@@ -32961,8 +33201,8 @@
|
|
|
32961
33201
|
rtl,
|
|
32962
33202
|
el,
|
|
32963
33203
|
device
|
|
32964
|
-
} = swiper;
|
|
32965
|
-
|
|
33204
|
+
} = swiper;
|
|
33205
|
+
// prettier-ignore
|
|
32966
33206
|
const suffixes = prepareClasses(['initialized', params.direction, {
|
|
32967
33207
|
'free-mode': swiper.params.freeMode && params.freeMode.enabled
|
|
32968
33208
|
}, {
|
|
@@ -33040,6 +33280,7 @@
|
|
|
33040
33280
|
var defaults = {
|
|
33041
33281
|
init: true,
|
|
33042
33282
|
direction: 'horizontal',
|
|
33283
|
+
oneWayMovement: false,
|
|
33043
33284
|
touchEventsTarget: 'wrapper',
|
|
33044
33285
|
initialSlide: 0,
|
|
33045
33286
|
speed: 300,
|
|
@@ -33070,6 +33311,7 @@
|
|
|
33070
33311
|
// Effects
|
|
33071
33312
|
effect: 'slide',
|
|
33072
33313
|
// 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
|
33314
|
+
|
|
33073
33315
|
// Breakpoints
|
|
33074
33316
|
breakpoints: undefined,
|
|
33075
33317
|
breakpointsBase: 'window',
|
|
@@ -33121,6 +33363,8 @@
|
|
|
33121
33363
|
slideToClickedSlide: false,
|
|
33122
33364
|
// loop
|
|
33123
33365
|
loop: false,
|
|
33366
|
+
loopedSlides: null,
|
|
33367
|
+
loopPreventsSliding: true,
|
|
33124
33368
|
// rewind
|
|
33125
33369
|
rewind: false,
|
|
33126
33370
|
// Swiping/no swiping
|
|
@@ -33223,11 +33467,12 @@
|
|
|
33223
33467
|
el: containerEl
|
|
33224
33468
|
});
|
|
33225
33469
|
swipers.push(new Swiper$1(newParams));
|
|
33226
|
-
});
|
|
33227
|
-
|
|
33470
|
+
});
|
|
33471
|
+
// eslint-disable-next-line no-constructor-return
|
|
33228
33472
|
return swipers;
|
|
33229
|
-
}
|
|
33473
|
+
}
|
|
33230
33474
|
|
|
33475
|
+
// Swiper Instance
|
|
33231
33476
|
const swiper = this;
|
|
33232
33477
|
swiper.__swiper__ = true;
|
|
33233
33478
|
swiper.support = getSupport();
|
|
@@ -33252,14 +33497,17 @@
|
|
|
33252
33497
|
off: swiper.off.bind(swiper),
|
|
33253
33498
|
emit: swiper.emit.bind(swiper)
|
|
33254
33499
|
});
|
|
33255
|
-
});
|
|
33500
|
+
});
|
|
33256
33501
|
|
|
33257
|
-
|
|
33502
|
+
// Extend defaults with modules params
|
|
33503
|
+
const swiperParams = extend$1({}, defaults, allModulesParams);
|
|
33258
33504
|
|
|
33505
|
+
// Extend defaults with passed params
|
|
33259
33506
|
swiper.params = extend$1({}, swiperParams, extendedDefaults, params);
|
|
33260
33507
|
swiper.originalParams = extend$1({}, swiper.params);
|
|
33261
|
-
swiper.passedParams = extend$1({}, params);
|
|
33508
|
+
swiper.passedParams = extend$1({}, params);
|
|
33262
33509
|
|
|
33510
|
+
// add event listeners
|
|
33263
33511
|
if (swiper.params && swiper.params.on) {
|
|
33264
33512
|
Object.keys(swiper.params.on).forEach(eventName => {
|
|
33265
33513
|
swiper.on(eventName, swiper.params.on[eventName]);
|
|
@@ -33267,8 +33515,9 @@
|
|
|
33267
33515
|
}
|
|
33268
33516
|
if (swiper.params && swiper.params.onAny) {
|
|
33269
33517
|
swiper.onAny(swiper.params.onAny);
|
|
33270
|
-
}
|
|
33518
|
+
}
|
|
33271
33519
|
|
|
33520
|
+
// Extend Swiper
|
|
33272
33521
|
Object.assign(swiper, {
|
|
33273
33522
|
enabled: swiper.params.enabled,
|
|
33274
33523
|
el,
|
|
@@ -33337,13 +33586,15 @@
|
|
|
33337
33586
|
imagesToLoad: [],
|
|
33338
33587
|
imagesLoaded: 0
|
|
33339
33588
|
});
|
|
33340
|
-
swiper.emit('_swiper');
|
|
33589
|
+
swiper.emit('_swiper');
|
|
33341
33590
|
|
|
33591
|
+
// Init
|
|
33342
33592
|
if (swiper.params.init) {
|
|
33343
33593
|
swiper.init();
|
|
33344
|
-
}
|
|
33345
|
-
// eslint-disable-next-line no-constructor-return
|
|
33594
|
+
}
|
|
33346
33595
|
|
|
33596
|
+
// Return app instance
|
|
33597
|
+
// eslint-disable-next-line no-constructor-return
|
|
33347
33598
|
return swiper;
|
|
33348
33599
|
}
|
|
33349
33600
|
recalcSlides() {
|
|
@@ -33472,11 +33723,16 @@
|
|
|
33472
33723
|
const {
|
|
33473
33724
|
snapGrid,
|
|
33474
33725
|
params
|
|
33475
|
-
} = swiper;
|
|
33476
|
-
|
|
33726
|
+
} = swiper;
|
|
33727
|
+
// Breakpoints
|
|
33477
33728
|
if (params.breakpoints) {
|
|
33478
33729
|
swiper.setBreakpoint();
|
|
33479
33730
|
}
|
|
33731
|
+
[...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => {
|
|
33732
|
+
if (imageEl.complete) {
|
|
33733
|
+
processLazyPreloader(swiper, imageEl);
|
|
33734
|
+
}
|
|
33735
|
+
});
|
|
33480
33736
|
swiper.updateSize();
|
|
33481
33737
|
swiper.updateSlides();
|
|
33482
33738
|
swiper.updateProgress();
|
|
@@ -33553,8 +33809,9 @@
|
|
|
33553
33809
|
}
|
|
33554
33810
|
mount(element) {
|
|
33555
33811
|
const swiper = this;
|
|
33556
|
-
if (swiper.mounted) return true;
|
|
33812
|
+
if (swiper.mounted) return true;
|
|
33557
33813
|
|
|
33814
|
+
// Find el
|
|
33558
33815
|
let el = element || swiper.params.el;
|
|
33559
33816
|
if (typeof el === 'string') {
|
|
33560
33817
|
el = document.querySelector(el);
|
|
@@ -33571,13 +33828,13 @@
|
|
|
33571
33828
|
};
|
|
33572
33829
|
const getWrapper = () => {
|
|
33573
33830
|
if (el && el.shadowRoot && el.shadowRoot.querySelector) {
|
|
33574
|
-
const res = el.shadowRoot.querySelector(getWrapperSelector());
|
|
33575
|
-
|
|
33831
|
+
const res = el.shadowRoot.querySelector(getWrapperSelector());
|
|
33832
|
+
// Children needs to return slot items
|
|
33576
33833
|
return res;
|
|
33577
33834
|
}
|
|
33578
33835
|
return elementChildren(el, getWrapperSelector())[0];
|
|
33579
|
-
};
|
|
33580
|
-
|
|
33836
|
+
};
|
|
33837
|
+
// Find Wrapper
|
|
33581
33838
|
let wrapperEl = getWrapper();
|
|
33582
33839
|
if (!wrapperEl && swiper.params.createElements) {
|
|
33583
33840
|
wrapperEl = createElement('div', swiper.params.wrapperClass);
|
|
@@ -33603,39 +33860,58 @@
|
|
|
33603
33860
|
if (swiper.initialized) return swiper;
|
|
33604
33861
|
const mounted = swiper.mount(el);
|
|
33605
33862
|
if (mounted === false) return swiper;
|
|
33606
|
-
swiper.emit('beforeInit');
|
|
33863
|
+
swiper.emit('beforeInit');
|
|
33607
33864
|
|
|
33865
|
+
// Set breakpoint
|
|
33608
33866
|
if (swiper.params.breakpoints) {
|
|
33609
33867
|
swiper.setBreakpoint();
|
|
33610
|
-
}
|
|
33868
|
+
}
|
|
33611
33869
|
|
|
33612
|
-
|
|
33870
|
+
// Add Classes
|
|
33871
|
+
swiper.addClasses();
|
|
33613
33872
|
|
|
33614
|
-
|
|
33873
|
+
// Update size
|
|
33874
|
+
swiper.updateSize();
|
|
33615
33875
|
|
|
33876
|
+
// Update slides
|
|
33616
33877
|
swiper.updateSlides();
|
|
33617
33878
|
if (swiper.params.watchOverflow) {
|
|
33618
33879
|
swiper.checkOverflow();
|
|
33619
|
-
}
|
|
33880
|
+
}
|
|
33620
33881
|
|
|
33882
|
+
// Set Grab Cursor
|
|
33621
33883
|
if (swiper.params.grabCursor && swiper.enabled) {
|
|
33622
33884
|
swiper.setGrabCursor();
|
|
33623
|
-
}
|
|
33885
|
+
}
|
|
33624
33886
|
|
|
33887
|
+
// Slide To Initial Slide
|
|
33625
33888
|
if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
|
|
33626
33889
|
swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);
|
|
33627
33890
|
} else {
|
|
33628
33891
|
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);
|
|
33629
|
-
}
|
|
33892
|
+
}
|
|
33630
33893
|
|
|
33894
|
+
// Create loop
|
|
33631
33895
|
if (swiper.params.loop) {
|
|
33632
33896
|
swiper.loopCreate();
|
|
33633
|
-
}
|
|
33897
|
+
}
|
|
33634
33898
|
|
|
33635
|
-
|
|
33899
|
+
// Attach events
|
|
33900
|
+
swiper.attachEvents();
|
|
33901
|
+
[...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => {
|
|
33902
|
+
if (imageEl.complete) {
|
|
33903
|
+
processLazyPreloader(swiper, imageEl);
|
|
33904
|
+
} else {
|
|
33905
|
+
imageEl.addEventListener('load', e => {
|
|
33906
|
+
processLazyPreloader(swiper, e.target);
|
|
33907
|
+
});
|
|
33908
|
+
}
|
|
33909
|
+
});
|
|
33636
33910
|
|
|
33637
|
-
|
|
33911
|
+
// Init Flag
|
|
33912
|
+
swiper.initialized = true;
|
|
33638
33913
|
|
|
33914
|
+
// Emit
|
|
33639
33915
|
swiper.emit('init');
|
|
33640
33916
|
swiper.emit('afterInit');
|
|
33641
33917
|
return swiper;
|
|
@@ -33657,16 +33933,20 @@
|
|
|
33657
33933
|
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
|
33658
33934
|
return null;
|
|
33659
33935
|
}
|
|
33660
|
-
swiper.emit('beforeDestroy');
|
|
33936
|
+
swiper.emit('beforeDestroy');
|
|
33661
33937
|
|
|
33662
|
-
|
|
33938
|
+
// Init Flag
|
|
33939
|
+
swiper.initialized = false;
|
|
33663
33940
|
|
|
33664
|
-
|
|
33941
|
+
// Detach events
|
|
33942
|
+
swiper.detachEvents();
|
|
33665
33943
|
|
|
33944
|
+
// Destroy loop
|
|
33666
33945
|
if (params.loop) {
|
|
33667
33946
|
swiper.loopDestroy();
|
|
33668
|
-
}
|
|
33947
|
+
}
|
|
33669
33948
|
|
|
33949
|
+
// Cleanup styles
|
|
33670
33950
|
if (cleanStyles) {
|
|
33671
33951
|
swiper.removeClasses();
|
|
33672
33952
|
el.removeAttribute('style');
|
|
@@ -33679,8 +33959,9 @@
|
|
|
33679
33959
|
});
|
|
33680
33960
|
}
|
|
33681
33961
|
}
|
|
33682
|
-
swiper.emit('destroy');
|
|
33962
|
+
swiper.emit('destroy');
|
|
33683
33963
|
|
|
33964
|
+
// Detach emitter events
|
|
33684
33965
|
Object.keys(swiper.eventsListeners).forEach(eventName => {
|
|
33685
33966
|
swiper.off(eventName);
|
|
33686
33967
|
});
|
|
@@ -33743,6 +34024,7 @@
|
|
|
33743
34024
|
}
|
|
33744
34025
|
});
|
|
33745
34026
|
let cssModeTimeout;
|
|
34027
|
+
const document = getDocument();
|
|
33746
34028
|
swiper.virtual = {
|
|
33747
34029
|
cache: {},
|
|
33748
34030
|
from: undefined,
|
|
@@ -33756,8 +34038,8 @@
|
|
|
33756
34038
|
const params = swiper.params.virtual;
|
|
33757
34039
|
if (params.cache && swiper.virtual.cache[index]) {
|
|
33758
34040
|
return swiper.virtual.cache[index];
|
|
33759
|
-
}
|
|
33760
|
-
|
|
34041
|
+
}
|
|
34042
|
+
// eslint-disable-next-line
|
|
33761
34043
|
let slideEl;
|
|
33762
34044
|
if (params.renderSlide) {
|
|
33763
34045
|
slideEl = params.renderSlide.call(swiper, slide, index);
|
|
@@ -34074,7 +34356,6 @@
|
|
|
34074
34356
|
} = swiper;
|
|
34075
34357
|
let e = event;
|
|
34076
34358
|
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
|
34077
|
-
|
|
34078
34359
|
const kc = e.keyCode || e.charCode;
|
|
34079
34360
|
const pageUpDown = swiper.params.keyboard.pageUpDown;
|
|
34080
34361
|
const isPageUp = pageUpDown && kc === 33;
|
|
@@ -34082,8 +34363,8 @@
|
|
|
34082
34363
|
const isArrowLeft = kc === 37;
|
|
34083
34364
|
const isArrowRight = kc === 39;
|
|
34084
34365
|
const isArrowUp = kc === 38;
|
|
34085
|
-
const isArrowDown = kc === 40;
|
|
34086
|
-
|
|
34366
|
+
const isArrowDown = kc === 40;
|
|
34367
|
+
// Directions locks
|
|
34087
34368
|
if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {
|
|
34088
34369
|
return false;
|
|
34089
34370
|
}
|
|
@@ -34097,8 +34378,8 @@
|
|
|
34097
34378
|
return undefined;
|
|
34098
34379
|
}
|
|
34099
34380
|
if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {
|
|
34100
|
-
let inView = false;
|
|
34101
|
-
|
|
34381
|
+
let inView = false;
|
|
34382
|
+
// Check that swiper should be inside of visible area of window
|
|
34102
34383
|
if (elementParents(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && elementParents(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) {
|
|
34103
34384
|
return undefined;
|
|
34104
34385
|
}
|
|
@@ -34114,7 +34395,6 @@
|
|
|
34114
34395
|
const point = swiperCoord[i];
|
|
34115
34396
|
if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {
|
|
34116
34397
|
if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line
|
|
34117
|
-
|
|
34118
34398
|
inView = true;
|
|
34119
34399
|
}
|
|
34120
34400
|
}
|
|
@@ -34197,11 +34477,10 @@
|
|
|
34197
34477
|
const PAGE_HEIGHT = 800;
|
|
34198
34478
|
let sX = 0;
|
|
34199
34479
|
let sY = 0; // spinX, spinY
|
|
34200
|
-
|
|
34201
34480
|
let pX = 0;
|
|
34202
34481
|
let pY = 0; // pixelX, pixelY
|
|
34203
|
-
// Legacy
|
|
34204
34482
|
|
|
34483
|
+
// Legacy
|
|
34205
34484
|
if ('detail' in e) {
|
|
34206
34485
|
sY = e.detail;
|
|
34207
34486
|
}
|
|
@@ -34213,8 +34492,9 @@
|
|
|
34213
34492
|
}
|
|
34214
34493
|
if ('wheelDeltaX' in e) {
|
|
34215
34494
|
sX = -e.wheelDeltaX / 120;
|
|
34216
|
-
}
|
|
34495
|
+
}
|
|
34217
34496
|
|
|
34497
|
+
// side scrolling on FF with DOMMouseScroll
|
|
34218
34498
|
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
|
34219
34499
|
sX = sY;
|
|
34220
34500
|
sY = 0;
|
|
@@ -34242,8 +34522,9 @@
|
|
|
34242
34522
|
pX *= PAGE_HEIGHT;
|
|
34243
34523
|
pY *= PAGE_HEIGHT;
|
|
34244
34524
|
}
|
|
34245
|
-
}
|
|
34525
|
+
}
|
|
34246
34526
|
|
|
34527
|
+
// Fall-back if spin cannot be determined
|
|
34247
34528
|
if (pX && !sX) {
|
|
34248
34529
|
sX = pX < 1 ? -1 : 1;
|
|
34249
34530
|
}
|
|
@@ -34273,14 +34554,16 @@
|
|
|
34273
34554
|
if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {
|
|
34274
34555
|
// Prevent if time between scrolls is below configured threshold
|
|
34275
34556
|
return false;
|
|
34276
|
-
}
|
|
34557
|
+
}
|
|
34558
|
+
|
|
34559
|
+
// If the movement is NOT big enough and
|
|
34277
34560
|
// if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):
|
|
34278
34561
|
// Don't go any further (avoid insignificant scroll movement).
|
|
34279
|
-
|
|
34280
34562
|
if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {
|
|
34281
34563
|
// Return false as a default
|
|
34282
34564
|
return true;
|
|
34283
|
-
}
|
|
34565
|
+
}
|
|
34566
|
+
// If user is scrolling towards the end:
|
|
34284
34567
|
// If the slider hasn't hit the latest slide or
|
|
34285
34568
|
// if the slider is a loop and
|
|
34286
34569
|
// if the slider isn't moving right now:
|
|
@@ -34292,7 +34575,6 @@
|
|
|
34292
34575
|
// if the slider isn't moving right now:
|
|
34293
34576
|
// Go to prev slide and
|
|
34294
34577
|
// emit a scroll event.
|
|
34295
|
-
|
|
34296
34578
|
if (newEvent.direction < 0) {
|
|
34297
34579
|
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
|
34298
34580
|
swiper.slideNext();
|
|
@@ -34301,10 +34583,10 @@
|
|
|
34301
34583
|
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
|
34302
34584
|
swiper.slidePrev();
|
|
34303
34585
|
emit('scroll', newEvent.raw);
|
|
34304
|
-
}
|
|
34305
|
-
|
|
34306
|
-
lastScrollTime = new window.Date().getTime();
|
|
34307
|
-
|
|
34586
|
+
}
|
|
34587
|
+
// If you got here is because an animation has been triggered so store the current time
|
|
34588
|
+
lastScrollTime = new window.Date().getTime();
|
|
34589
|
+
// Return false as a default
|
|
34308
34590
|
return false;
|
|
34309
34591
|
}
|
|
34310
34592
|
function releaseScroll(newEvent) {
|
|
@@ -34335,7 +34617,6 @@
|
|
|
34335
34617
|
const targetElContainsTarget = targetEl && targetEl.contains(e.target);
|
|
34336
34618
|
if (!swiper.mouseEntered && !targetElContainsTarget && !params.releaseOnEdges) return true;
|
|
34337
34619
|
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
|
34338
|
-
|
|
34339
34620
|
let delta = 0;
|
|
34340
34621
|
const rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
|
34341
34622
|
const data = normalize(e);
|
|
@@ -34347,18 +34628,20 @@
|
|
|
34347
34628
|
delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
|
|
34348
34629
|
}
|
|
34349
34630
|
if (delta === 0) return true;
|
|
34350
|
-
if (params.invert) delta = -delta;
|
|
34631
|
+
if (params.invert) delta = -delta;
|
|
34351
34632
|
|
|
34633
|
+
// Get the scroll positions
|
|
34352
34634
|
let positions = swiper.getTranslate() + delta * params.sensitivity;
|
|
34353
34635
|
if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();
|
|
34354
|
-
if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();
|
|
34636
|
+
if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();
|
|
34637
|
+
|
|
34638
|
+
// When loop is true:
|
|
34355
34639
|
// the disableParentSwiper will be true.
|
|
34356
34640
|
// When loop is false:
|
|
34357
34641
|
// if the scroll positions is not on edge,
|
|
34358
34642
|
// then the disableParentSwiper will be true.
|
|
34359
34643
|
// if the scroll on edge positions,
|
|
34360
34644
|
// then the disableParentSwiper will be false.
|
|
34361
|
-
|
|
34362
34645
|
disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());
|
|
34363
34646
|
if (disableParentSwiper && swiper.params.nested) e.stopPropagation();
|
|
34364
34647
|
if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {
|
|
@@ -34368,34 +34651,38 @@
|
|
|
34368
34651
|
delta: Math.abs(delta),
|
|
34369
34652
|
direction: Math.sign(delta),
|
|
34370
34653
|
raw: event
|
|
34371
|
-
};
|
|
34654
|
+
};
|
|
34372
34655
|
|
|
34656
|
+
// Keep the most recent events
|
|
34373
34657
|
if (recentWheelEvents.length >= 2) {
|
|
34374
34658
|
recentWheelEvents.shift(); // only store the last N events
|
|
34375
34659
|
}
|
|
34376
34660
|
|
|
34377
34661
|
const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
|
|
34378
|
-
recentWheelEvents.push(newEvent);
|
|
34662
|
+
recentWheelEvents.push(newEvent);
|
|
34663
|
+
|
|
34664
|
+
// If there is at least one previous recorded event:
|
|
34379
34665
|
// If direction has changed or
|
|
34380
34666
|
// if the scroll is quicker than the previous one:
|
|
34381
34667
|
// Animate the slider.
|
|
34382
34668
|
// Else (this is the first time the wheel is moved):
|
|
34383
34669
|
// Animate the slider.
|
|
34384
|
-
|
|
34385
34670
|
if (prevEvent) {
|
|
34386
34671
|
if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {
|
|
34387
34672
|
animateSlider(newEvent);
|
|
34388
34673
|
}
|
|
34389
34674
|
} else {
|
|
34390
34675
|
animateSlider(newEvent);
|
|
34391
|
-
}
|
|
34392
|
-
// Return now so you don't hit the preventDefault.
|
|
34676
|
+
}
|
|
34393
34677
|
|
|
34678
|
+
// If it's time to release the scroll:
|
|
34679
|
+
// Return now so you don't hit the preventDefault.
|
|
34394
34680
|
if (releaseScroll(newEvent)) {
|
|
34395
34681
|
return true;
|
|
34396
34682
|
}
|
|
34397
34683
|
} else {
|
|
34398
34684
|
// Freemode or scrollContainer:
|
|
34685
|
+
|
|
34399
34686
|
// If we recently snapped after a momentum scroll, then ignore wheel events
|
|
34400
34687
|
// to give time for the deceleration to finish. Stop ignoring after 500 msecs
|
|
34401
34688
|
// or if it's a new scroll (larger delta or inverse sign as last event before
|
|
@@ -34408,9 +34695,6 @@
|
|
|
34408
34695
|
const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;
|
|
34409
34696
|
if (!ignoreWheelEvents) {
|
|
34410
34697
|
lastEventBeforeSnap = undefined;
|
|
34411
|
-
if (swiper.params.loop) {
|
|
34412
|
-
swiper.loopFix();
|
|
34413
|
-
}
|
|
34414
34698
|
let position = swiper.getTranslate() + delta * params.sensitivity;
|
|
34415
34699
|
const wasBeginning = swiper.isBeginning;
|
|
34416
34700
|
const wasEnd = swiper.isEnd;
|
|
@@ -34424,6 +34708,12 @@
|
|
|
34424
34708
|
if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {
|
|
34425
34709
|
swiper.updateSlidesClasses();
|
|
34426
34710
|
}
|
|
34711
|
+
if (swiper.params.loop) {
|
|
34712
|
+
swiper.loopFix({
|
|
34713
|
+
direction: newEvent.direction < 0 ? 'next' : 'prev',
|
|
34714
|
+
byMousewheel: true
|
|
34715
|
+
});
|
|
34716
|
+
}
|
|
34427
34717
|
if (swiper.params.freeMode.sticky) {
|
|
34428
34718
|
// When wheel scrolling starts with sticky (aka snap) enabled, then detect
|
|
34429
34719
|
// the end of a momentum scroll by storing recent (N=15?) wheel events.
|
|
@@ -34474,12 +34764,14 @@
|
|
|
34474
34764
|
swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
|
|
34475
34765
|
}, 500);
|
|
34476
34766
|
}
|
|
34477
|
-
}
|
|
34478
|
-
|
|
34479
|
-
if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay
|
|
34767
|
+
}
|
|
34480
34768
|
|
|
34481
|
-
|
|
34769
|
+
// Emit event
|
|
34770
|
+
if (!ignoreWheelEvents) emit('scroll', e);
|
|
34482
34771
|
|
|
34772
|
+
// Stop autoplay
|
|
34773
|
+
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
|
|
34774
|
+
// Return page scroll on edge positions
|
|
34483
34775
|
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
|
|
34484
34776
|
}
|
|
34485
34777
|
}
|
|
@@ -34588,8 +34880,9 @@
|
|
|
34588
34880
|
if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {
|
|
34589
34881
|
res = swiper.el.querySelector(el);
|
|
34590
34882
|
}
|
|
34591
|
-
}
|
|
34592
|
-
|
|
34883
|
+
}
|
|
34884
|
+
if (el && !res) return el;
|
|
34885
|
+
// if (Array.isArray(res) && res.length === 1) res = res[0];
|
|
34593
34886
|
return res;
|
|
34594
34887
|
}
|
|
34595
34888
|
function toggleEl(el, disabled) {
|
|
@@ -34597,7 +34890,7 @@
|
|
|
34597
34890
|
el = makeElementsArray(el);
|
|
34598
34891
|
el.forEach(subEl => {
|
|
34599
34892
|
if (subEl) {
|
|
34600
|
-
subEl.classList[disabled ? 'add' : 'remove'](params.disabledClass);
|
|
34893
|
+
subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' '));
|
|
34601
34894
|
if (subEl.tagName === 'BUTTON') subEl.disabled = disabled;
|
|
34602
34895
|
if (swiper.params.watchOverflow && swiper.enabled) {
|
|
34603
34896
|
subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);
|
|
@@ -34651,7 +34944,7 @@
|
|
|
34651
34944
|
el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
34652
34945
|
}
|
|
34653
34946
|
if (!swiper.enabled && el) {
|
|
34654
|
-
el.classList.add(params.lockClass);
|
|
34947
|
+
el.classList.add(...params.lockClass.split(' '));
|
|
34655
34948
|
}
|
|
34656
34949
|
};
|
|
34657
34950
|
nextEl.forEach(el => initButton(el, 'next'));
|
|
@@ -34666,7 +34959,7 @@
|
|
|
34666
34959
|
prevEl = makeElementsArray(prevEl);
|
|
34667
34960
|
const destroyButton = (el, dir) => {
|
|
34668
34961
|
el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
34669
|
-
el.classList.remove(swiper.params.navigation.disabledClass);
|
|
34962
|
+
el.classList.remove(...swiper.params.navigation.disabledClass.split(' '));
|
|
34670
34963
|
};
|
|
34671
34964
|
nextEl.forEach(el => destroyButton(el, 'next'));
|
|
34672
34965
|
prevEl.forEach(el => destroyButton(el, 'prev'));
|
|
@@ -34720,12 +35013,12 @@
|
|
|
34720
35013
|
}
|
|
34721
35014
|
});
|
|
34722
35015
|
const enable = () => {
|
|
34723
|
-
swiper.el.classList.remove(swiper.params.navigation.navigationDisabledClass);
|
|
35016
|
+
swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
34724
35017
|
init();
|
|
34725
35018
|
update();
|
|
34726
35019
|
};
|
|
34727
35020
|
const disable = () => {
|
|
34728
|
-
swiper.el.classList.add(swiper.params.navigation.navigationDisabledClass);
|
|
35021
|
+
swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
34729
35022
|
destroy();
|
|
34730
35023
|
};
|
|
34731
35024
|
Object.assign(swiper.navigation, {
|
|
@@ -34802,10 +35095,11 @@
|
|
|
34802
35095
|
const {
|
|
34803
35096
|
bulletActiveClass
|
|
34804
35097
|
} = swiper.params.pagination;
|
|
34805
|
-
bulletEl
|
|
35098
|
+
if (!bulletEl) return;
|
|
35099
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
34806
35100
|
if (bulletEl) {
|
|
34807
35101
|
bulletEl.classList.add(`${bulletActiveClass}-${position}`);
|
|
34808
|
-
bulletEl = bulletEl
|
|
35102
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
34809
35103
|
if (bulletEl) {
|
|
34810
35104
|
bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);
|
|
34811
35105
|
}
|
|
@@ -34828,8 +35122,8 @@
|
|
|
34828
35122
|
const params = swiper.params.pagination;
|
|
34829
35123
|
if (isPaginationDisabled()) return;
|
|
34830
35124
|
let el = swiper.pagination.el;
|
|
34831
|
-
el = makeElementsArray(el);
|
|
34832
|
-
|
|
35125
|
+
el = makeElementsArray(el);
|
|
35126
|
+
// Current/Total
|
|
34833
35127
|
let current;
|
|
34834
35128
|
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
|
34835
35129
|
const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
|
@@ -34839,8 +35133,8 @@
|
|
|
34839
35133
|
current = swiper.snapIndex;
|
|
34840
35134
|
} else {
|
|
34841
35135
|
current = swiper.activeIndex || 0;
|
|
34842
|
-
}
|
|
34843
|
-
|
|
35136
|
+
}
|
|
35137
|
+
// Types
|
|
34844
35138
|
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
|
34845
35139
|
const bullets = swiper.pagination.bullets;
|
|
34846
35140
|
let firstIndex;
|
|
@@ -35014,8 +35308,8 @@
|
|
|
35014
35308
|
}
|
|
35015
35309
|
if (!el || el.length === 0) return;
|
|
35016
35310
|
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {
|
|
35017
|
-
el = [...swiper.el.querySelectorAll(params.el)];
|
|
35018
|
-
|
|
35311
|
+
el = [...swiper.el.querySelectorAll(params.el)];
|
|
35312
|
+
// check if it belongs to another nested Swiper
|
|
35019
35313
|
if (el.length > 1) {
|
|
35020
35314
|
el = el.filter(subEl => {
|
|
35021
35315
|
if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;
|
|
@@ -35230,13 +35524,13 @@
|
|
|
35230
35524
|
el.style.opacity = 1;
|
|
35231
35525
|
timeout = setTimeout(() => {
|
|
35232
35526
|
el.style.opacity = 0;
|
|
35233
|
-
el.style.
|
|
35527
|
+
el.style.transitionDuration = '400ms';
|
|
35234
35528
|
}, 1000);
|
|
35235
35529
|
}
|
|
35236
35530
|
}
|
|
35237
35531
|
function setTransition(duration) {
|
|
35238
35532
|
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
|
35239
|
-
swiper.scrollbar.dragEl.style.
|
|
35533
|
+
swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`;
|
|
35240
35534
|
}
|
|
35241
35535
|
function updateSize() {
|
|
35242
35536
|
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
|
@@ -35310,11 +35604,11 @@
|
|
|
35310
35604
|
dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;
|
|
35311
35605
|
e.preventDefault();
|
|
35312
35606
|
e.stopPropagation();
|
|
35313
|
-
wrapperEl.style.
|
|
35314
|
-
dragEl.style.
|
|
35607
|
+
wrapperEl.style.transitionDuration = '100ms';
|
|
35608
|
+
dragEl.style.transitionDuration = '100ms';
|
|
35315
35609
|
setDragPosition(e);
|
|
35316
35610
|
clearTimeout(dragTimeout);
|
|
35317
|
-
el.style.
|
|
35611
|
+
el.style.transitionDuration = '0ms';
|
|
35318
35612
|
if (params.hide) {
|
|
35319
35613
|
el.style.opacity = 1;
|
|
35320
35614
|
}
|
|
@@ -35335,9 +35629,9 @@
|
|
|
35335
35629
|
if (!isTouched) return;
|
|
35336
35630
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
35337
35631
|
setDragPosition(e);
|
|
35338
|
-
wrapperEl.style.
|
|
35339
|
-
el.style.
|
|
35340
|
-
dragEl.style.
|
|
35632
|
+
wrapperEl.style.transitionDuration = '0ms';
|
|
35633
|
+
el.style.transitionDuration = '0ms';
|
|
35634
|
+
dragEl.style.transitionDuration = '0ms';
|
|
35341
35635
|
emit('scrollbarDragMove', e);
|
|
35342
35636
|
}
|
|
35343
35637
|
function onDragEnd(e) {
|
|
@@ -35353,13 +35647,13 @@
|
|
|
35353
35647
|
isTouched = false;
|
|
35354
35648
|
if (swiper.params.cssMode) {
|
|
35355
35649
|
swiper.wrapperEl.style['scroll-snap-type'] = '';
|
|
35356
|
-
wrapperEl.style.
|
|
35650
|
+
wrapperEl.style.transitionDuration = '';
|
|
35357
35651
|
}
|
|
35358
35652
|
if (params.hide) {
|
|
35359
35653
|
clearTimeout(dragTimeout);
|
|
35360
35654
|
dragTimeout = nextTick(() => {
|
|
35361
35655
|
el.style.opacity = 0;
|
|
35362
|
-
el.style.
|
|
35656
|
+
el.style.transitionDuration = '400ms';
|
|
35363
35657
|
}, 1000);
|
|
35364
35658
|
}
|
|
35365
35659
|
emit('scrollbarDragEnd', e);
|
|
@@ -35411,8 +35705,10 @@
|
|
|
35411
35705
|
if (typeof params.el === 'string' && swiper.isElement) {
|
|
35412
35706
|
el = swiper.el.shadowRoot.querySelector(params.el);
|
|
35413
35707
|
}
|
|
35414
|
-
if (!el) {
|
|
35708
|
+
if (!el && typeof params.el === 'string') {
|
|
35415
35709
|
el = document.querySelectorAll(params.el);
|
|
35710
|
+
} else if (!el) {
|
|
35711
|
+
el = params.el;
|
|
35416
35712
|
}
|
|
35417
35713
|
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) {
|
|
35418
35714
|
el = swiperEl.querySelector(params.el);
|
|
@@ -35523,6 +35819,7 @@
|
|
|
35523
35819
|
let y = el.getAttribute('data-swiper-parallax-y');
|
|
35524
35820
|
const scale = el.getAttribute('data-swiper-parallax-scale');
|
|
35525
35821
|
const opacity = el.getAttribute('data-swiper-parallax-opacity');
|
|
35822
|
+
const rotate = el.getAttribute('data-swiper-parallax-rotate');
|
|
35526
35823
|
if (x || y) {
|
|
35527
35824
|
x = x || '0';
|
|
35528
35825
|
y = y || '0';
|
|
@@ -35547,12 +35844,16 @@
|
|
|
35547
35844
|
const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));
|
|
35548
35845
|
el.style.opacity = currentOpacity;
|
|
35549
35846
|
}
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
} else {
|
|
35847
|
+
let transform = `translate3d(${x}, ${y}, 0px)`;
|
|
35848
|
+
if (typeof scale !== 'undefined' && scale !== null) {
|
|
35553
35849
|
const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));
|
|
35554
|
-
|
|
35850
|
+
transform += ` scale(${currentScale})`;
|
|
35555
35851
|
}
|
|
35852
|
+
if (rotate && typeof rotate !== 'undefined' && rotate !== null) {
|
|
35853
|
+
const currentRotate = rotate * progress * -1;
|
|
35854
|
+
transform += ` rotate(${currentRotate}deg)`;
|
|
35855
|
+
}
|
|
35856
|
+
el.style.transform = transform;
|
|
35556
35857
|
};
|
|
35557
35858
|
const setTranslate = () => {
|
|
35558
35859
|
const {
|
|
@@ -35570,7 +35871,7 @@
|
|
|
35570
35871
|
slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);
|
|
35571
35872
|
}
|
|
35572
35873
|
slideProgress = Math.min(Math.max(slideProgress, -1), 1);
|
|
35573
|
-
slideEl.querySelectorAll('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').forEach(subEl => {
|
|
35874
|
+
slideEl.querySelectorAll('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale], [data-swiper-parallax-rotate]').forEach(subEl => {
|
|
35574
35875
|
setTransform(subEl, slideProgress);
|
|
35575
35876
|
});
|
|
35576
35877
|
});
|
|
@@ -35585,7 +35886,7 @@
|
|
|
35585
35886
|
el.querySelectorAll('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').forEach(parallaxEl => {
|
|
35586
35887
|
let parallaxDuration = parseInt(parallaxEl.getAttribute('data-swiper-parallax-duration'), 10) || duration;
|
|
35587
35888
|
if (duration === 0) parallaxDuration = 0;
|
|
35588
|
-
parallaxEl.style.
|
|
35889
|
+
parallaxEl.style.transitionDuration = `${parallaxDuration}ms`;
|
|
35589
35890
|
});
|
|
35590
35891
|
};
|
|
35591
35892
|
on('beforeInit', () => {
|
|
@@ -35701,8 +36002,9 @@
|
|
|
35701
36002
|
if (e.target.matches(selector)) return true;
|
|
35702
36003
|
if ([...swiper.el.querySelectorAll(selector)].filter(containerEl => containerEl.contains(e.target)).length > 0) return true;
|
|
35703
36004
|
return false;
|
|
35704
|
-
}
|
|
36005
|
+
}
|
|
35705
36006
|
|
|
36007
|
+
// Events
|
|
35706
36008
|
function onGestureStart(e) {
|
|
35707
36009
|
if (!eventWithinSlide(e)) return;
|
|
35708
36010
|
const params = swiper.params.zoom;
|
|
@@ -35803,8 +36105,8 @@
|
|
|
35803
36105
|
gesture.slideWidth = gesture.slideEl.offsetWidth;
|
|
35804
36106
|
gesture.slideHeight = gesture.slideEl.offsetHeight;
|
|
35805
36107
|
gesture.imageWrapEl.style.transitionDuration = '0ms';
|
|
35806
|
-
}
|
|
35807
|
-
|
|
36108
|
+
}
|
|
36109
|
+
// Define if we need image drag
|
|
35808
36110
|
const scaledWidth = image.width * zoom.scale;
|
|
35809
36111
|
const scaledHeight = image.height * zoom.scale;
|
|
35810
36112
|
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
|
|
@@ -35842,8 +36144,9 @@
|
|
|
35842
36144
|
}
|
|
35843
36145
|
if (image.currentY > image.maxY) {
|
|
35844
36146
|
image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;
|
|
35845
|
-
}
|
|
36147
|
+
}
|
|
35846
36148
|
|
|
36149
|
+
// Velocity
|
|
35847
36150
|
if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
|
|
35848
36151
|
if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
|
|
35849
36152
|
if (!velocity.prevTime) velocity.prevTime = Date.now();
|
|
@@ -35871,14 +36174,16 @@
|
|
|
35871
36174
|
const momentumDistanceX = velocity.x * momentumDurationX;
|
|
35872
36175
|
const newPositionX = image.currentX + momentumDistanceX;
|
|
35873
36176
|
const momentumDistanceY = velocity.y * momentumDurationY;
|
|
35874
|
-
const newPositionY = image.currentY + momentumDistanceY;
|
|
36177
|
+
const newPositionY = image.currentY + momentumDistanceY;
|
|
35875
36178
|
|
|
36179
|
+
// Fix duration
|
|
35876
36180
|
if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
|
|
35877
36181
|
if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
|
|
35878
36182
|
const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
|
35879
36183
|
image.currentX = newPositionX;
|
|
35880
|
-
image.currentY = newPositionY;
|
|
36184
|
+
image.currentY = newPositionY;
|
|
35881
36185
|
|
|
36186
|
+
// Define if we need image drag
|
|
35882
36187
|
const scaledWidth = image.width * zoom.scale;
|
|
35883
36188
|
const scaledHeight = image.height * zoom.scale;
|
|
35884
36189
|
image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);
|
|
@@ -35962,9 +36267,14 @@
|
|
|
35962
36267
|
touchX = image.touchesStart.x;
|
|
35963
36268
|
touchY = image.touchesStart.y;
|
|
35964
36269
|
}
|
|
35965
|
-
|
|
35966
|
-
currentScale
|
|
35967
|
-
|
|
36270
|
+
const forceZoomRatio = typeof e === 'number' ? e : null;
|
|
36271
|
+
if (currentScale === 1 && forceZoomRatio) {
|
|
36272
|
+
touchX = undefined;
|
|
36273
|
+
touchY = undefined;
|
|
36274
|
+
}
|
|
36275
|
+
zoom.scale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio;
|
|
36276
|
+
currentScale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio;
|
|
36277
|
+
if (e && !(currentScale === 1 && forceZoomRatio)) {
|
|
35968
36278
|
slideWidth = gesture.slideEl.offsetWidth;
|
|
35969
36279
|
slideHeight = gesture.slideEl.offsetHeight;
|
|
35970
36280
|
offsetX = elementOffset(gesture.slideEl).left + window.scrollX;
|
|
@@ -36035,8 +36345,9 @@
|
|
|
36035
36345
|
gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)';
|
|
36036
36346
|
gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`);
|
|
36037
36347
|
gesture.slideEl = undefined;
|
|
36038
|
-
}
|
|
36348
|
+
}
|
|
36039
36349
|
|
|
36350
|
+
// Toggle Zoom
|
|
36040
36351
|
function zoomToggle(e) {
|
|
36041
36352
|
const zoom = swiper.zoom;
|
|
36042
36353
|
if (zoom.scale && zoom.scale !== 1) {
|
|
@@ -36060,8 +36371,9 @@
|
|
|
36060
36371
|
passiveListener,
|
|
36061
36372
|
activeListenerWithCapture
|
|
36062
36373
|
};
|
|
36063
|
-
}
|
|
36374
|
+
}
|
|
36064
36375
|
|
|
36376
|
+
// Attach/Detach Events
|
|
36065
36377
|
function enable() {
|
|
36066
36378
|
const zoom = swiper.zoom;
|
|
36067
36379
|
if (zoom.enabled) return;
|
|
@@ -36069,14 +36381,17 @@
|
|
|
36069
36381
|
const {
|
|
36070
36382
|
passiveListener,
|
|
36071
36383
|
activeListenerWithCapture
|
|
36072
|
-
} = getListeners();
|
|
36384
|
+
} = getListeners();
|
|
36385
|
+
|
|
36386
|
+
// Scale image
|
|
36073
36387
|
|
|
36074
36388
|
swiper.wrapperEl.addEventListener('pointerdown', onGestureStart, passiveListener);
|
|
36075
36389
|
swiper.wrapperEl.addEventListener('pointermove', onGestureChange, activeListenerWithCapture);
|
|
36076
36390
|
['pointerup', 'pointercancel'].forEach(eventName => {
|
|
36077
36391
|
swiper.wrapperEl.addEventListener(eventName, onGestureEnd, passiveListener);
|
|
36078
|
-
});
|
|
36392
|
+
});
|
|
36079
36393
|
|
|
36394
|
+
// Move image
|
|
36080
36395
|
swiper.wrapperEl.addEventListener('pointermove', onTouchMove, activeListenerWithCapture);
|
|
36081
36396
|
}
|
|
36082
36397
|
function disable() {
|
|
@@ -36086,14 +36401,16 @@
|
|
|
36086
36401
|
const {
|
|
36087
36402
|
passiveListener,
|
|
36088
36403
|
activeListenerWithCapture
|
|
36089
|
-
} = getListeners();
|
|
36404
|
+
} = getListeners();
|
|
36090
36405
|
|
|
36406
|
+
// Scale image
|
|
36091
36407
|
swiper.wrapperEl.removeEventListener('pointerdown', onGestureStart, passiveListener);
|
|
36092
36408
|
swiper.wrapperEl.removeEventListener('pointermove', onGestureChange, activeListenerWithCapture);
|
|
36093
36409
|
['pointerup', 'pointercancel'].forEach(eventName => {
|
|
36094
36410
|
swiper.wrapperEl.removeEventListener(eventName, onGestureEnd, passiveListener);
|
|
36095
|
-
});
|
|
36411
|
+
});
|
|
36096
36412
|
|
|
36413
|
+
// Move image
|
|
36097
36414
|
swiper.wrapperEl.removeEventListener('pointermove', onTouchMove, activeListenerWithCapture);
|
|
36098
36415
|
}
|
|
36099
36416
|
on('init', () => {
|
|
@@ -36175,24 +36492,26 @@
|
|
|
36175
36492
|
}();
|
|
36176
36493
|
this.x = x;
|
|
36177
36494
|
this.y = y;
|
|
36178
|
-
this.lastIndex = x.length - 1;
|
|
36495
|
+
this.lastIndex = x.length - 1;
|
|
36496
|
+
// Given an x value (x2), return the expected y2 value:
|
|
36179
36497
|
// (x1,y1) is the known point before given value,
|
|
36180
36498
|
// (x3,y3) is the known point after given value.
|
|
36181
|
-
|
|
36182
36499
|
let i1;
|
|
36183
36500
|
let i3;
|
|
36184
36501
|
this.interpolate = function interpolate(x2) {
|
|
36185
|
-
if (!x2) return 0;
|
|
36502
|
+
if (!x2) return 0;
|
|
36186
36503
|
|
|
36504
|
+
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
|
36187
36505
|
i3 = binarySearch(this.x, x2);
|
|
36188
|
-
i1 = i3 - 1;
|
|
36189
|
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
|
36506
|
+
i1 = i3 - 1;
|
|
36190
36507
|
|
|
36508
|
+
// We have our indexes i1 & i3, so we can calculate already:
|
|
36509
|
+
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
|
36191
36510
|
return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];
|
|
36192
36511
|
};
|
|
36193
36512
|
return this;
|
|
36194
|
-
}
|
|
36195
|
-
|
|
36513
|
+
}
|
|
36514
|
+
// xxx: for now i will just save one spline function to to
|
|
36196
36515
|
function getInterpolateFunction(c) {
|
|
36197
36516
|
if (!swiper.controller.spline) {
|
|
36198
36517
|
swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);
|
|
@@ -36210,9 +36529,9 @@
|
|
|
36210
36529
|
// the function does a lot of value caching for performance
|
|
36211
36530
|
const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
|
36212
36531
|
if (swiper.params.controller.by === 'slide') {
|
|
36213
|
-
getInterpolateFunction(c);
|
|
36532
|
+
getInterpolateFunction(c);
|
|
36533
|
+
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
|
36214
36534
|
// but it did not work out
|
|
36215
|
-
|
|
36216
36535
|
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
|
36217
36536
|
}
|
|
36218
36537
|
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
|
@@ -36252,10 +36571,6 @@
|
|
|
36252
36571
|
}
|
|
36253
36572
|
elementTransitionEnd(c.wrapperEl, () => {
|
|
36254
36573
|
if (!controlled) return;
|
|
36255
|
-
if (swiper.params.loop) swiper.loopFix(undefined, false);
|
|
36256
|
-
if (c.params.loop && swiper.params.controller.by === 'slide') {
|
|
36257
|
-
c.loopFix();
|
|
36258
|
-
}
|
|
36259
36574
|
c.transitionEnd();
|
|
36260
36575
|
});
|
|
36261
36576
|
}
|
|
@@ -36558,24 +36873,28 @@
|
|
|
36558
36873
|
};
|
|
36559
36874
|
const init = () => {
|
|
36560
36875
|
const params = swiper.params.a11y;
|
|
36561
|
-
swiper.el.append(liveRegion);
|
|
36876
|
+
swiper.el.append(liveRegion);
|
|
36562
36877
|
|
|
36878
|
+
// Container
|
|
36563
36879
|
const containerEl = swiper.el;
|
|
36564
36880
|
if (params.containerRoleDescriptionMessage) {
|
|
36565
36881
|
addElRoleDescription(containerEl, params.containerRoleDescriptionMessage);
|
|
36566
36882
|
}
|
|
36567
36883
|
if (params.containerMessage) {
|
|
36568
36884
|
addElLabel(containerEl, params.containerMessage);
|
|
36569
|
-
}
|
|
36885
|
+
}
|
|
36570
36886
|
|
|
36887
|
+
// Wrapper
|
|
36571
36888
|
const wrapperEl = swiper.wrapperEl;
|
|
36572
36889
|
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
|
36573
36890
|
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
36574
36891
|
addElId(wrapperEl, wrapperId);
|
|
36575
|
-
addElLive(wrapperEl, live);
|
|
36892
|
+
addElLive(wrapperEl, live);
|
|
36576
36893
|
|
|
36577
|
-
|
|
36894
|
+
// Slide
|
|
36895
|
+
initSlides();
|
|
36578
36896
|
|
|
36897
|
+
// Navigation
|
|
36579
36898
|
let {
|
|
36580
36899
|
nextEl,
|
|
36581
36900
|
prevEl
|
|
@@ -36587,12 +36906,17 @@
|
|
|
36587
36906
|
}
|
|
36588
36907
|
if (prevEl) {
|
|
36589
36908
|
prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage));
|
|
36590
|
-
}
|
|
36909
|
+
}
|
|
36591
36910
|
|
|
36911
|
+
// Pagination
|
|
36592
36912
|
if (hasClickablePagination()) {
|
|
36593
|
-
swiper.pagination.el.
|
|
36594
|
-
|
|
36913
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
36914
|
+
paginationEl.forEach(el => {
|
|
36915
|
+
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
36916
|
+
});
|
|
36917
|
+
}
|
|
36595
36918
|
|
|
36919
|
+
// Tab focus
|
|
36596
36920
|
swiper.el.addEventListener('focus', handleFocus, true);
|
|
36597
36921
|
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
|
36598
36922
|
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
|
@@ -36610,12 +36934,17 @@
|
|
|
36610
36934
|
}
|
|
36611
36935
|
if (prevEl) {
|
|
36612
36936
|
prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
|
36613
|
-
}
|
|
36937
|
+
}
|
|
36614
36938
|
|
|
36939
|
+
// Pagination
|
|
36615
36940
|
if (hasClickablePagination()) {
|
|
36616
|
-
swiper.pagination.el.
|
|
36617
|
-
|
|
36941
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
36942
|
+
paginationEl.forEach(el => {
|
|
36943
|
+
el.removeEventListener('keydown', onEnterOrSpaceKey);
|
|
36944
|
+
});
|
|
36945
|
+
}
|
|
36618
36946
|
|
|
36947
|
+
// Tab focus
|
|
36619
36948
|
swiper.el.removeEventListener('focus', handleFocus, true);
|
|
36620
36949
|
swiper.el.removeEventListener('pointerdown', handlePointerDown, true);
|
|
36621
36950
|
swiper.el.removeEventListener('pointerup', handlePointerUp, true);
|
|
@@ -36701,9 +37030,9 @@
|
|
|
36701
37030
|
if (swiper.params.history.root.length > 0) {
|
|
36702
37031
|
let root = swiper.params.history.root;
|
|
36703
37032
|
if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);
|
|
36704
|
-
value = `${root}/${key}
|
|
37033
|
+
value = `${root}/${key ? `${key}/` : ''}${value}`;
|
|
36705
37034
|
} else if (!location.pathname.includes(key)) {
|
|
36706
|
-
value = `${key}
|
|
37035
|
+
value = `${key ? `${key}/` : ''}${value}`;
|
|
36707
37036
|
}
|
|
36708
37037
|
if (swiper.params.history.keepQuery) {
|
|
36709
37038
|
value += location.search;
|
|
@@ -36750,7 +37079,12 @@
|
|
|
36750
37079
|
}
|
|
36751
37080
|
initialized = true;
|
|
36752
37081
|
paths = getPathValues(swiper.params.url);
|
|
36753
|
-
if (!paths.key && !paths.value)
|
|
37082
|
+
if (!paths.key && !paths.value) {
|
|
37083
|
+
if (!swiper.params.history.replaceState) {
|
|
37084
|
+
window.addEventListener('popstate', setHistoryPopState);
|
|
37085
|
+
}
|
|
37086
|
+
return;
|
|
37087
|
+
}
|
|
36754
37088
|
scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);
|
|
36755
37089
|
if (!swiper.params.history.replaceState) {
|
|
36756
37090
|
window.addEventListener('popstate', setHistoryPopState);
|
|
@@ -36987,8 +37321,9 @@
|
|
|
36987
37321
|
requestAnimationFrame(() => {
|
|
36988
37322
|
proceed();
|
|
36989
37323
|
});
|
|
36990
|
-
}
|
|
37324
|
+
}
|
|
36991
37325
|
|
|
37326
|
+
// eslint-disable-next-line
|
|
36992
37327
|
return delay;
|
|
36993
37328
|
};
|
|
36994
37329
|
const start = () => {
|
|
@@ -37180,12 +37515,10 @@
|
|
|
37180
37515
|
slideToIndex = clickedIndex;
|
|
37181
37516
|
}
|
|
37182
37517
|
if (swiper.params.loop) {
|
|
37183
|
-
|
|
37184
|
-
|
|
37185
|
-
|
|
37186
|
-
if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;
|
|
37518
|
+
swiper.slideToLoop(slideToIndex);
|
|
37519
|
+
} else {
|
|
37520
|
+
swiper.slideTo(slideToIndex);
|
|
37187
37521
|
}
|
|
37188
|
-
swiper.slideTo(slideToIndex);
|
|
37189
37522
|
}
|
|
37190
37523
|
function init() {
|
|
37191
37524
|
const {
|
|
@@ -37221,8 +37554,9 @@
|
|
|
37221
37554
|
function update(initial) {
|
|
37222
37555
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
37223
37556
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
37224
|
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
37557
|
+
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
37225
37558
|
|
|
37559
|
+
// Activate thumbs
|
|
37226
37560
|
let thumbsToActivate = 1;
|
|
37227
37561
|
const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
|
|
37228
37562
|
if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
|
|
@@ -37241,7 +37575,9 @@
|
|
|
37241
37575
|
}
|
|
37242
37576
|
} else {
|
|
37243
37577
|
for (let i = 0; i < thumbsToActivate; i += 1) {
|
|
37244
|
-
thumbsSwiper.slides[swiper.realIndex + i]
|
|
37578
|
+
if (thumbsSwiper.slides[swiper.realIndex + i]) {
|
|
37579
|
+
thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass);
|
|
37580
|
+
}
|
|
37245
37581
|
}
|
|
37246
37582
|
}
|
|
37247
37583
|
const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
|
|
@@ -37251,20 +37587,8 @@
|
|
|
37251
37587
|
let newThumbsIndex;
|
|
37252
37588
|
let direction;
|
|
37253
37589
|
if (thumbsSwiper.params.loop) {
|
|
37254
|
-
|
|
37255
|
-
|
|
37256
|
-
const nextThumbsIndex = thumbsSwiper.slides.indexOf(elementNextAll(thumbsSwiper.slides[currentThumbsIndex], `[data-swiper-slide-index="${swiper.realIndex}"]`)[0]);
|
|
37257
|
-
if (typeof prevThumbsIndex === 'undefined') {
|
|
37258
|
-
newThumbsIndex = nextThumbsIndex;
|
|
37259
|
-
} else if (typeof nextThumbsIndex === 'undefined') {
|
|
37260
|
-
newThumbsIndex = prevThumbsIndex;
|
|
37261
|
-
} else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {
|
|
37262
|
-
newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;
|
|
37263
|
-
} else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {
|
|
37264
|
-
newThumbsIndex = nextThumbsIndex;
|
|
37265
|
-
} else {
|
|
37266
|
-
newThumbsIndex = prevThumbsIndex;
|
|
37267
|
-
}
|
|
37590
|
+
const newThumbsSlide = thumbsSwiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`)[0];
|
|
37591
|
+
newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
|
|
37268
37592
|
direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
|
|
37269
37593
|
} else {
|
|
37270
37594
|
newThumbsIndex = swiper.realIndex;
|
|
@@ -37280,7 +37604,8 @@
|
|
|
37280
37604
|
} else {
|
|
37281
37605
|
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
|
37282
37606
|
}
|
|
37283
|
-
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {
|
|
37607
|
+
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {
|
|
37608
|
+
// newThumbsIndex = newThumbsIndex - slidesPerView + 1;
|
|
37284
37609
|
}
|
|
37285
37610
|
thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
|
|
37286
37611
|
}
|
|
@@ -37293,24 +37618,37 @@
|
|
|
37293
37618
|
if (!thumbs || !thumbs.swiper) return;
|
|
37294
37619
|
if (typeof thumbs.swiper === 'string' || thumbs.swiper instanceof HTMLElement) {
|
|
37295
37620
|
const document = getDocument();
|
|
37296
|
-
const
|
|
37297
|
-
|
|
37298
|
-
|
|
37299
|
-
|
|
37300
|
-
const onThumbsSwiper = e => {
|
|
37301
|
-
thumbs.swiper = e.detail[0];
|
|
37302
|
-
thumbsElement.removeEventListener('init', onThumbsSwiper);
|
|
37621
|
+
const getThumbsElementAndInit = () => {
|
|
37622
|
+
const thumbsElement = typeof thumbs.swiper === 'string' ? document.querySelector(thumbs.swiper) : thumbs.swiper;
|
|
37623
|
+
if (thumbsElement && thumbsElement.swiper) {
|
|
37624
|
+
thumbs.swiper = thumbsElement.swiper;
|
|
37303
37625
|
init();
|
|
37304
37626
|
update(true);
|
|
37305
|
-
|
|
37306
|
-
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37310
|
-
|
|
37627
|
+
} else if (thumbsElement) {
|
|
37628
|
+
const onThumbsSwiper = e => {
|
|
37629
|
+
thumbs.swiper = e.detail[0];
|
|
37630
|
+
thumbsElement.removeEventListener('init', onThumbsSwiper);
|
|
37631
|
+
init();
|
|
37632
|
+
update(true);
|
|
37633
|
+
thumbs.swiper.update();
|
|
37634
|
+
swiper.update();
|
|
37635
|
+
};
|
|
37636
|
+
thumbsElement.addEventListener('init', onThumbsSwiper);
|
|
37637
|
+
}
|
|
37638
|
+
return thumbsElement;
|
|
37639
|
+
};
|
|
37640
|
+
const watchForThumbsToAppear = () => {
|
|
37641
|
+
if (swiper.destroyed) return;
|
|
37642
|
+
const thumbsElement = getThumbsElementAndInit();
|
|
37643
|
+
if (!thumbsElement) {
|
|
37644
|
+
requestAnimationFrame(watchForThumbsToAppear);
|
|
37645
|
+
}
|
|
37646
|
+
};
|
|
37647
|
+
requestAnimationFrame(watchForThumbsToAppear);
|
|
37648
|
+
} else {
|
|
37649
|
+
init();
|
|
37650
|
+
update(true);
|
|
37311
37651
|
}
|
|
37312
|
-
init();
|
|
37313
|
-
update(true);
|
|
37314
37652
|
});
|
|
37315
37653
|
on('slideChange update resize observerUpdate', () => {
|
|
37316
37654
|
update();
|
|
@@ -37365,8 +37703,8 @@
|
|
|
37365
37703
|
const {
|
|
37366
37704
|
touchEventsData: data,
|
|
37367
37705
|
touches
|
|
37368
|
-
} = swiper;
|
|
37369
|
-
|
|
37706
|
+
} = swiper;
|
|
37707
|
+
// Velocity
|
|
37370
37708
|
if (data.velocities.length === 0) {
|
|
37371
37709
|
data.velocities.push({
|
|
37372
37710
|
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
|
@@ -37388,8 +37726,8 @@
|
|
|
37388
37726
|
rtlTranslate: rtl,
|
|
37389
37727
|
snapGrid,
|
|
37390
37728
|
touchEventsData: data
|
|
37391
|
-
} = swiper;
|
|
37392
|
-
|
|
37729
|
+
} = swiper;
|
|
37730
|
+
// Time diff
|
|
37393
37731
|
const touchEndTime = now();
|
|
37394
37732
|
const timeDiff = touchEndTime - data.touchStartTime;
|
|
37395
37733
|
if (currentPos < -swiper.minTranslate()) {
|
|
@@ -37414,9 +37752,9 @@
|
|
|
37414
37752
|
swiper.velocity /= 2;
|
|
37415
37753
|
if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {
|
|
37416
37754
|
swiper.velocity = 0;
|
|
37417
|
-
}
|
|
37755
|
+
}
|
|
37756
|
+
// this implies that the user stopped moving a finger then released.
|
|
37418
37757
|
// There would be no events with distance zero, so the last event is stale.
|
|
37419
|
-
|
|
37420
37758
|
if (time > 150 || now() - lastMoveEvent.time > 300) {
|
|
37421
37759
|
swiper.velocity = 0;
|
|
37422
37760
|
}
|
|
@@ -37476,8 +37814,8 @@
|
|
|
37476
37814
|
once('transitionEnd', () => {
|
|
37477
37815
|
swiper.loopFix();
|
|
37478
37816
|
});
|
|
37479
|
-
}
|
|
37480
|
-
|
|
37817
|
+
}
|
|
37818
|
+
// Fix duration
|
|
37481
37819
|
if (swiper.velocity !== 0) {
|
|
37482
37820
|
if (rtl) {
|
|
37483
37821
|
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
|
@@ -37604,8 +37942,8 @@
|
|
|
37604
37942
|
const {
|
|
37605
37943
|
rows,
|
|
37606
37944
|
fill
|
|
37607
|
-
} = swiper.params.grid;
|
|
37608
|
-
|
|
37945
|
+
} = swiper.params.grid;
|
|
37946
|
+
// Set slides order
|
|
37609
37947
|
let newSlideOrderIndex;
|
|
37610
37948
|
let column;
|
|
37611
37949
|
let row;
|
|
@@ -37693,7 +38031,7 @@
|
|
|
37693
38031
|
if (params.loop) {
|
|
37694
38032
|
swiper.loopCreate();
|
|
37695
38033
|
}
|
|
37696
|
-
if (!params.observer) {
|
|
38034
|
+
if (!params.observer || swiper.isElement) {
|
|
37697
38035
|
swiper.update();
|
|
37698
38036
|
}
|
|
37699
38037
|
}
|
|
@@ -37731,7 +38069,7 @@
|
|
|
37731
38069
|
if (params.loop) {
|
|
37732
38070
|
swiper.loopCreate();
|
|
37733
38071
|
}
|
|
37734
|
-
if (!params.observer) {
|
|
38072
|
+
if (!params.observer || swiper.isElement) {
|
|
37735
38073
|
swiper.update();
|
|
37736
38074
|
}
|
|
37737
38075
|
swiper.slideTo(newActiveIndex, 0, false);
|
|
@@ -37781,7 +38119,7 @@
|
|
|
37781
38119
|
if (params.loop) {
|
|
37782
38120
|
swiper.loopCreate();
|
|
37783
38121
|
}
|
|
37784
|
-
if (!params.observer) {
|
|
38122
|
+
if (!params.observer || swiper.isElement) {
|
|
37785
38123
|
swiper.update();
|
|
37786
38124
|
}
|
|
37787
38125
|
if (params.loop) {
|
|
@@ -37821,7 +38159,7 @@
|
|
|
37821
38159
|
if (params.loop) {
|
|
37822
38160
|
swiper.loopCreate();
|
|
37823
38161
|
}
|
|
37824
|
-
if (!params.observer) {
|
|
38162
|
+
if (!params.observer || swiper.isElement) {
|
|
37825
38163
|
swiper.update();
|
|
37826
38164
|
}
|
|
37827
38165
|
if (params.loop) {
|
|
@@ -37886,12 +38224,12 @@
|
|
|
37886
38224
|
on('transitionEnd', () => {
|
|
37887
38225
|
if (swiper.params.effect !== effect) return;
|
|
37888
38226
|
if (recreateShadows) {
|
|
37889
|
-
if (!getEffectParams || !getEffectParams().slideShadows) return;
|
|
37890
|
-
|
|
38227
|
+
if (!getEffectParams || !getEffectParams().slideShadows) return;
|
|
38228
|
+
// remove shadows
|
|
37891
38229
|
swiper.slides.forEach(slideEl => {
|
|
37892
38230
|
slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => shadowEl.remove());
|
|
37893
|
-
});
|
|
37894
|
-
|
|
38231
|
+
});
|
|
38232
|
+
// create new one
|
|
37895
38233
|
recreateShadows();
|
|
37896
38234
|
}
|
|
37897
38235
|
});
|
|
@@ -37954,14 +38292,11 @@
|
|
|
37954
38292
|
if (!swiper || swiper.destroyed) return;
|
|
37955
38293
|
eventTriggered = true;
|
|
37956
38294
|
swiper.animating = false;
|
|
37957
|
-
const
|
|
37958
|
-
|
|
37959
|
-
|
|
37960
|
-
bubbles: true,
|
|
37961
|
-
cancelable: true
|
|
37962
|
-
});
|
|
37963
|
-
swiper.wrapperEl.dispatchEvent(evt);
|
|
38295
|
+
const evt = new window.CustomEvent('transitionend', {
|
|
38296
|
+
bubbles: true,
|
|
38297
|
+
cancelable: true
|
|
37964
38298
|
});
|
|
38299
|
+
swiper.wrapperEl.dispatchEvent(evt);
|
|
37965
38300
|
});
|
|
37966
38301
|
});
|
|
37967
38302
|
}
|
|
@@ -38002,7 +38337,7 @@
|
|
|
38002
38337
|
const setTransition = duration => {
|
|
38003
38338
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38004
38339
|
transformElements.forEach(el => {
|
|
38005
|
-
el.style.
|
|
38340
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38006
38341
|
});
|
|
38007
38342
|
effectVirtualTransitionEnd({
|
|
38008
38343
|
swiper,
|
|
@@ -38155,7 +38490,7 @@
|
|
|
38155
38490
|
cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`;
|
|
38156
38491
|
}
|
|
38157
38492
|
}
|
|
38158
|
-
const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;
|
|
38493
|
+
const zFactor = (browser.isSafari || browser.isWebView) && browser.needPerspectiveFix ? -swiperSize / 2 : 0;
|
|
38159
38494
|
wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`;
|
|
38160
38495
|
wrapperEl.style.setProperty('--swiper-cube-translate-z', `${zFactor}px`);
|
|
38161
38496
|
};
|
|
@@ -38280,9 +38615,9 @@
|
|
|
38280
38615
|
const setTransition = duration => {
|
|
38281
38616
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38282
38617
|
transformElements.forEach(el => {
|
|
38283
|
-
el.style.
|
|
38618
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38284
38619
|
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
|
38285
|
-
shadowEl.style.
|
|
38620
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38286
38621
|
});
|
|
38287
38622
|
});
|
|
38288
38623
|
effectVirtualTransitionEnd({
|
|
@@ -38338,8 +38673,8 @@
|
|
|
38338
38673
|
const transform = swiper.translate;
|
|
38339
38674
|
const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;
|
|
38340
38675
|
const rotate = isHorizontal ? params.rotate : -params.rotate;
|
|
38341
|
-
const translate = params.depth;
|
|
38342
|
-
|
|
38676
|
+
const translate = params.depth;
|
|
38677
|
+
// Each slide offset from center
|
|
38343
38678
|
for (let i = 0, length = slides.length; i < length; i += 1) {
|
|
38344
38679
|
const slideEl = slides[i];
|
|
38345
38680
|
const slideSize = slidesSizesGrid[i];
|
|
@@ -38347,18 +38682,19 @@
|
|
|
38347
38682
|
const centerOffset = (center - slideOffset - slideSize / 2) / slideSize;
|
|
38348
38683
|
const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier;
|
|
38349
38684
|
let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
|
38350
|
-
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
|
38351
|
-
|
|
38685
|
+
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
|
38686
|
+
// var rotateZ = 0
|
|
38352
38687
|
let translateZ = -translate * Math.abs(offsetMultiplier);
|
|
38353
|
-
let stretch = params.stretch;
|
|
38354
|
-
|
|
38688
|
+
let stretch = params.stretch;
|
|
38689
|
+
// Allow percentage to make a relative stretch for responsive sliders
|
|
38355
38690
|
if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {
|
|
38356
38691
|
stretch = parseFloat(params.stretch) / 100 * slideSize;
|
|
38357
38692
|
}
|
|
38358
38693
|
let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;
|
|
38359
38694
|
let translateX = isHorizontal ? stretch * offsetMultiplier : 0;
|
|
38360
|
-
let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
|
|
38695
|
+
let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
|
|
38361
38696
|
|
|
38697
|
+
// Fix for ultra small values
|
|
38362
38698
|
if (Math.abs(translateX) < 0.001) translateX = 0;
|
|
38363
38699
|
if (Math.abs(translateY) < 0.001) translateY = 0;
|
|
38364
38700
|
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
|
@@ -38387,9 +38723,9 @@
|
|
|
38387
38723
|
const setTransition = duration => {
|
|
38388
38724
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38389
38725
|
transformElements.forEach(el => {
|
|
38390
|
-
el.style.
|
|
38726
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38391
38727
|
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
|
38392
|
-
shadowEl.style.
|
|
38728
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38393
38729
|
});
|
|
38394
38730
|
});
|
|
38395
38731
|
};
|
|
@@ -38479,12 +38815,12 @@
|
|
|
38479
38815
|
} else if (progress > 0) {
|
|
38480
38816
|
data = params.prev;
|
|
38481
38817
|
custom = true;
|
|
38482
|
-
}
|
|
38483
|
-
|
|
38818
|
+
}
|
|
38819
|
+
// set translate
|
|
38484
38820
|
t.forEach((value, index) => {
|
|
38485
38821
|
t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;
|
|
38486
|
-
});
|
|
38487
|
-
|
|
38822
|
+
});
|
|
38823
|
+
// set rotates
|
|
38488
38824
|
r.forEach((value, index) => {
|
|
38489
38825
|
r[index] = data.rotate[index] * Math.abs(progress * multiplier);
|
|
38490
38826
|
});
|
|
@@ -38493,8 +38829,9 @@
|
|
|
38493
38829
|
const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;
|
|
38494
38830
|
const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;
|
|
38495
38831
|
const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;
|
|
38496
|
-
const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
|
|
38832
|
+
const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
|
|
38497
38833
|
|
|
38834
|
+
// Set shadows
|
|
38498
38835
|
if (custom && data.shadow || !custom) {
|
|
38499
38836
|
let shadowEl = slideEl.querySelector('.swiper-slide-shadow');
|
|
38500
38837
|
if (!shadowEl && data.shadow) {
|
|
@@ -38516,9 +38853,9 @@
|
|
|
38516
38853
|
const setTransition = duration => {
|
|
38517
38854
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38518
38855
|
transformElements.forEach(el => {
|
|
38519
|
-
el.style.
|
|
38856
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38520
38857
|
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
|
38521
|
-
shadowEl.style.
|
|
38858
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38522
38859
|
});
|
|
38523
38860
|
});
|
|
38524
38861
|
effectVirtualTransitionEnd({
|
|
@@ -38630,9 +38967,9 @@
|
|
|
38630
38967
|
const setTransition = duration => {
|
|
38631
38968
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38632
38969
|
transformElements.forEach(el => {
|
|
38633
|
-
el.style.
|
|
38970
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38634
38971
|
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
|
38635
|
-
shadowEl.style.
|
|
38972
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38636
38973
|
});
|
|
38637
38974
|
});
|
|
38638
38975
|
effectVirtualTransitionEnd({
|
|
@@ -38656,15 +38993,15 @@
|
|
|
38656
38993
|
}
|
|
38657
38994
|
|
|
38658
38995
|
/**
|
|
38659
|
-
* Swiper 9.0.
|
|
38996
|
+
* Swiper 9.0.3
|
|
38660
38997
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
38661
38998
|
* https://swiperjs.com
|
|
38662
38999
|
*
|
|
38663
|
-
* Copyright 2014-
|
|
39000
|
+
* Copyright 2014-2023 Vladimir Kharlampidi
|
|
38664
39001
|
*
|
|
38665
39002
|
* Released under the MIT License
|
|
38666
39003
|
*
|
|
38667
|
-
* Released on:
|
|
39004
|
+
* Released on: February 6, 2023
|
|
38668
39005
|
*/
|
|
38669
39006
|
|
|
38670
39007
|
// Swiper Class
|
|
@@ -38672,9 +39009,9 @@
|
|
|
38672
39009
|
Swiper$1.use(modules);
|
|
38673
39010
|
|
|
38674
39011
|
/* underscore in name -> watch for changes */
|
|
38675
|
-
const paramsList = ['modules', 'init', '_direction', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideNextClass', 'slidePrevClass', 'wrapperClass', 'lazyPreloaderClass', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',
|
|
39012
|
+
const paramsList = ['modules', 'init', '_direction', 'oneWayMovement', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', 'loopedSlides', 'loopPreventsSliding', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideNextClass', 'slidePrevClass', 'wrapperClass', 'lazyPreloaderClass', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',
|
|
38676
39013
|
// modules
|
|
38677
|
-
'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control', '
|
|
39014
|
+
'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control', 'injectStyles', 'injectStylesUrls'];
|
|
38678
39015
|
|
|
38679
39016
|
function isObject(o) {
|
|
38680
39017
|
return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';
|
|
@@ -38724,6 +39061,14 @@
|
|
|
38724
39061
|
}
|
|
38725
39062
|
return attrName.replace(/-[a-z]/g, l => l.toUpperCase().replace('-', ''));
|
|
38726
39063
|
}
|
|
39064
|
+
function wrapperClass(className) {
|
|
39065
|
+
if (className === void 0) {
|
|
39066
|
+
className = '';
|
|
39067
|
+
}
|
|
39068
|
+
if (!className) return 'swiper-wrapper';
|
|
39069
|
+
if (!className.includes('swiper-wrapper')) return `swiper-wrapper ${className}`;
|
|
39070
|
+
return className;
|
|
39071
|
+
}
|
|
38727
39072
|
|
|
38728
39073
|
const formatValue = val => {
|
|
38729
39074
|
if (parseFloat(val) === Number(val)) return Number(val);
|
|
@@ -38767,6 +39112,9 @@
|
|
|
38767
39112
|
if (!allowedParams.includes(name)) return;
|
|
38768
39113
|
const value = formatValue(attr.value);
|
|
38769
39114
|
if (passedParams[name] && modulesParamsList.includes(attr.name)) {
|
|
39115
|
+
if (passedParams[name].constructor !== Object) {
|
|
39116
|
+
passedParams[name] = {};
|
|
39117
|
+
}
|
|
38770
39118
|
passedParams[name].enabled = value;
|
|
38771
39119
|
} else {
|
|
38772
39120
|
passedParams[name] = value;
|
|
@@ -38816,7 +39164,7 @@
|
|
|
38816
39164
|
scrollbarEl,
|
|
38817
39165
|
paginationEl
|
|
38818
39166
|
} = _ref;
|
|
38819
|
-
const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction');
|
|
39167
|
+
const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction' && key !== 'wrapperClass');
|
|
38820
39168
|
const {
|
|
38821
39169
|
params: currentParams,
|
|
38822
39170
|
pagination,
|
|
@@ -38967,18 +39315,19 @@
|
|
|
38967
39315
|
}
|
|
38968
39316
|
|
|
38969
39317
|
/**
|
|
38970
|
-
* Swiper Custom Element 9.0.
|
|
39318
|
+
* Swiper Custom Element 9.0.3
|
|
38971
39319
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
38972
39320
|
* https://swiperjs.com
|
|
38973
39321
|
*
|
|
38974
|
-
* Copyright 2014-
|
|
39322
|
+
* Copyright 2014-2023 Vladimir Kharlampidi
|
|
38975
39323
|
*
|
|
38976
39324
|
* Released under the MIT License
|
|
38977
39325
|
*
|
|
38978
|
-
* Released on:
|
|
39326
|
+
* Released on: February 6, 2023
|
|
38979
39327
|
*/
|
|
38980
39328
|
const SwiperFontCSS = `@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}`;
|
|
38981
|
-
const SwiperCSS = `:root{--swiper-theme-color:#007aff}.swiper,swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}:host(.swiper-vertical)>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight swiper-slide{height:auto}:host(.swiper-autoheight) .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}:host(.swiper-3d.swiper-css-mode) .swiper-wrapper{perspective:1200px}:host(.swiper-3d) .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d swiper-slide{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}:host(.swiper-css-mode)>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}:host(.swiper-css-mode)>.swiper-wrapper::-webkit-scrollbar{display:none}:host(.swiper-css-mode)>swiper-slide{scroll-snap-align:start start}:host(.swiper-horizontal.swiper-css-mode)>.swiper-wrapper{scroll-snap-type:x mandatory}:host(.swiper-vertical.swiper-css-mode)>.swiper-wrapper{scroll-snap-type:y mandatory}:host(.swiper-centered)>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}:host(.swiper-centered)>swiper-slide{scroll-snap-align:center center}:host(.swiper-centered.swiper-horizontal)>swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}:host(.swiper-centered.swiper-horizontal)>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}:host(.swiper-centered.swiper-vertical)>swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}:host(.swiper-centered.swiper-vertical)>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,swiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}:host(.swiper-virtual.swiper-css-mode) .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}:host(.swiper-virtual.swiper-css-mode.swiper-horizontal) .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}:host(.swiper-virtual.swiper-css-mode.swiper-vertical) .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-offset,10px);right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-offset,10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-offset,10px);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-offset,10px);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}:host(.swiper-rtl) .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;-ms-touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:1%;bottom:var(--swiper-scrollbar-offset,3px);z-index:50;height:var(--swiper-scrollbar-size,5px);width:98%}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;right:var(--swiper-scrollbar-offset,3px);top:1%;z-index:50;width:var(--swiper-scrollbar-size,5px);height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification,swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}:host(.swiper-free-mode)>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}:host(.swiper-grid)>.swiper-wrapper{flex-wrap:wrap}:host(.swiper-grid-column)>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode swiper-slide{transition-timing-function:ease-out}.swiper-fade swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade swiper-slide swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube swiper-slide swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev,.swiper-cube swiper-slide-next+swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-flip{overflow:visible}.swiper-flip swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip swiper-slide swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}`;
|
|
39329
|
+
const SwiperCSS = `:root{--swiper-theme-color:#007aff}.swiper,swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}:host(.swiper-vertical)>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight swiper-slide{height:auto}:host(.swiper-autoheight) .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}:host(.swiper-3d.swiper-css-mode) .swiper-wrapper{perspective:1200px}:host(.swiper-3d) .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d swiper-slide{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}:host(.swiper-css-mode)>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}:host(.swiper-css-mode)>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>swiper-slide{scroll-snap-align:start start}:host(.swiper-horizontal.swiper-css-mode)>.swiper-wrapper{scroll-snap-type:x mandatory}:host(.swiper-vertical.swiper-css-mode)>.swiper-wrapper{scroll-snap-type:y mandatory}:host(.swiper-centered)>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-centered>swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-centered.swiper-horizontal>swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}:host(.swiper-centered.swiper-horizontal)>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}:host(.swiper-centered.swiper-vertical)>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,swiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}:host(.swiper-virtual.swiper-css-mode) .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}:host(.swiper-virtual.swiper-css-mode.swiper-horizontal) .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}:host(.swiper-virtual.swiper-css-mode.swiper-vertical) .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,:host(.swiper-rtl) .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-prev:after,:host(.swiper-rtl) .swiper-button-next:after{content:'prev'}.swiper-button-next,:host(.swiper-rtl) .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-next:after,:host(.swiper-rtl) .swiper-button-prev:after{content:'next'}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}:host(.swiper-rtl) .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;-ms-touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification,swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}:host(.swiper-free-mode)>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}:host(.swiper-grid)>.swiper-wrapper{flex-wrap:wrap}:host(.swiper-grid-column)>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode swiper-slide{transition-timing-function:ease-out}.swiper-fade swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade swiper-slide swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube swiper-slide swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev,.swiper-cube swiper-slide-next+swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-flip{overflow:visible}.swiper-flip swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip swiper-slide swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}`;
|
|
39330
|
+
let globalInjectStyles = true;
|
|
38982
39331
|
const addGlobalStyles = (preInit, swiper) => {
|
|
38983
39332
|
let globalStyles = document.querySelector('style#swiper-element-styles');
|
|
38984
39333
|
const shouldOverwrite = globalStyles && globalStyles.preInit && !preInit;
|
|
@@ -39009,20 +39358,26 @@
|
|
|
39009
39358
|
});
|
|
39010
39359
|
}
|
|
39011
39360
|
cssStyles() {
|
|
39012
|
-
return [SwiperCSS,
|
|
39361
|
+
return [globalInjectStyles ? SwiperCSS : '',
|
|
39013
39362
|
// eslint-disable-line
|
|
39014
|
-
...(this.
|
|
39363
|
+
...(this.injectStyles && Array.isArray(this.injectStyles) ? this.injectStyles : [])].join('\n');
|
|
39015
39364
|
}
|
|
39016
39365
|
cssLinks() {
|
|
39017
|
-
return this.
|
|
39366
|
+
return this.injectStylesUrls || [];
|
|
39018
39367
|
}
|
|
39019
39368
|
render() {
|
|
39020
|
-
|
|
39021
|
-
|
|
39369
|
+
if (globalInjectStyles) {
|
|
39370
|
+
// global styles
|
|
39371
|
+
addGlobalStyles(false, this);
|
|
39372
|
+
}
|
|
39373
|
+
|
|
39022
39374
|
// local styles
|
|
39023
|
-
|
|
39024
|
-
|
|
39025
|
-
|
|
39375
|
+
const localStyles = this.cssStyles();
|
|
39376
|
+
if (localStyles.length) {
|
|
39377
|
+
this.stylesEl = document.createElement('style');
|
|
39378
|
+
this.stylesEl.textContent = localStyles;
|
|
39379
|
+
this.shadowEl.appendChild(this.stylesEl);
|
|
39380
|
+
}
|
|
39026
39381
|
this.cssLinks().forEach(url => {
|
|
39027
39382
|
const linkExists = document.querySelector(`link[href="${url}"]`);
|
|
39028
39383
|
if (linkExists) return;
|
|
@@ -39173,9 +39528,17 @@
|
|
|
39173
39528
|
}
|
|
39174
39529
|
|
|
39175
39530
|
// eslint-disable-next-line
|
|
39176
|
-
const register = ()
|
|
39531
|
+
const register = function (injectStyles) {
|
|
39532
|
+
if (injectStyles === void 0) {
|
|
39533
|
+
injectStyles = true;
|
|
39534
|
+
}
|
|
39177
39535
|
if (typeof window === 'undefined') return;
|
|
39178
|
-
|
|
39536
|
+
if (!injectStyles) {
|
|
39537
|
+
globalInjectStyles = false;
|
|
39538
|
+
}
|
|
39539
|
+
if (globalInjectStyles) {
|
|
39540
|
+
addGlobalStyles(true);
|
|
39541
|
+
}
|
|
39179
39542
|
if (!window.customElements.get('swiper-container')) window.customElements.define('swiper-container', SwiperContainer);
|
|
39180
39543
|
if (!window.customElements.get('swiper-slide')) window.customElements.define('swiper-slide', SwiperSlide);
|
|
39181
39544
|
};
|
|
@@ -39281,7 +39644,7 @@
|
|
|
39281
39644
|
on: {
|
|
39282
39645
|
pageBeforeRemove(page) {
|
|
39283
39646
|
const app = this;
|
|
39284
|
-
page.$el.find('.
|
|
39647
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39285
39648
|
app.swiper.destroy(swiperEl);
|
|
39286
39649
|
});
|
|
39287
39650
|
},
|
|
@@ -39293,50 +39656,38 @@
|
|
|
39293
39656
|
},
|
|
39294
39657
|
pageInit(page) {
|
|
39295
39658
|
const app = this;
|
|
39296
|
-
page.$el.find('.
|
|
39659
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39297
39660
|
initSwiper.call(app, swiperEl);
|
|
39298
39661
|
});
|
|
39299
39662
|
},
|
|
39300
39663
|
pageReinit(page) {
|
|
39301
39664
|
const app = this;
|
|
39302
|
-
page.$el.find('.
|
|
39665
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39303
39666
|
const swiper = app.swiper.get(swiperEl);
|
|
39304
39667
|
if (swiper && swiper.update) swiper.update();
|
|
39305
39668
|
});
|
|
39306
39669
|
},
|
|
39307
39670
|
tabMounted(tabEl) {
|
|
39308
39671
|
const app = this;
|
|
39309
|
-
$(tabEl).find('.
|
|
39672
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39310
39673
|
initSwiper.call(app, swiperEl);
|
|
39311
39674
|
});
|
|
39312
39675
|
},
|
|
39313
39676
|
tabShow(tabEl) {
|
|
39314
39677
|
const app = this;
|
|
39315
|
-
$(tabEl).find('.
|
|
39678
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39316
39679
|
const swiper = app.swiper.get(swiperEl);
|
|
39317
39680
|
if (swiper && swiper.update) swiper.update();
|
|
39318
39681
|
});
|
|
39319
39682
|
},
|
|
39320
39683
|
tabBeforeRemove(tabEl) {
|
|
39321
39684
|
const app = this;
|
|
39322
|
-
$(tabEl).find('.
|
|
39685
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39323
39686
|
app.swiper.destroy(swiperEl);
|
|
39324
39687
|
});
|
|
39325
39688
|
}
|
|
39326
39689
|
},
|
|
39327
39690
|
vnode: {
|
|
39328
|
-
'swiper-init': {
|
|
39329
|
-
insert(vnode) {
|
|
39330
|
-
const app = this;
|
|
39331
|
-
const swiperEl = vnode.elm;
|
|
39332
|
-
initSwiper.call(app, swiperEl);
|
|
39333
|
-
},
|
|
39334
|
-
destroy(vnode) {
|
|
39335
|
-
const app = this;
|
|
39336
|
-
const swiperEl = vnode.elm;
|
|
39337
|
-
app.swiper.destroy(swiperEl);
|
|
39338
|
-
}
|
|
39339
|
-
},
|
|
39340
39691
|
'tabs-swipeable-wrap': {
|
|
39341
39692
|
insert(vnode) {
|
|
39342
39693
|
const app = this;
|
|
@@ -39878,6 +40229,7 @@
|
|
|
39878
40229
|
const popupParams = {
|
|
39879
40230
|
content: popupHtml,
|
|
39880
40231
|
push: pb.params.popupPush,
|
|
40232
|
+
closeByBackdropClick: pb.params.closeByBackdropClick,
|
|
39881
40233
|
on: {
|
|
39882
40234
|
popupOpen(popup) {
|
|
39883
40235
|
pb.onOpen('popup', popup.el);
|
|
@@ -40018,6 +40370,7 @@
|
|
|
40018
40370
|
routableModals: false,
|
|
40019
40371
|
virtualSlides: true,
|
|
40020
40372
|
lazy: true,
|
|
40373
|
+
closeByBackdropClick: true,
|
|
40021
40374
|
renderNavbar: undefined,
|
|
40022
40375
|
renderToolbar: undefined,
|
|
40023
40376
|
renderCaption: undefined,
|
|
@@ -40028,6 +40381,7 @@
|
|
|
40028
40381
|
renderPopup: undefined,
|
|
40029
40382
|
renderStandalone: undefined,
|
|
40030
40383
|
swiper: {
|
|
40384
|
+
cssMode: false,
|
|
40031
40385
|
initialSlide: 0,
|
|
40032
40386
|
spaceBetween: 20,
|
|
40033
40387
|
speed: 300,
|